-
Notifications
You must be signed in to change notification settings - Fork 0
/
igors-quest.adv
4131 lines (4017 loc) · 153 KB
/
igors-quest.adv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
######################################
# Igor's Quest
# Copyright © 2020 Garry Francis
######################################
loading_screen = title_screen
start_at = room01
start_theme = my_theme
treasure_room = room31
######################################
# Game Information
######################################
game_information {
copyright_message = Copyright © 2020 Garry Francis
game_name = Igor's Quest
game_version = 1.0.0
short_synopsis = Help Igor find the body parts for Frankenstein's monster.
uuid = 1d8cfa68-4987-46d6-988c-33a84bb6c90b
written_by = Garry Francis
year_of_original = 2020
year_of_release = 2020
}
######################################
# Booleans
######################################
booleans {
has_all_treasures : boolean "false";
has_bought_rulers : boolean "false";
has_fed_dog : boolean "false";
is_bag_full : boolean "false";
is_door_open : boolean "false";
is_end_game : boolean "false";
is_gate_open : boolean "false";
is_refresh : boolean "false";
}
######################################
# Integers
######################################
integers {
treasure_dropped : integer "0";
treasure_found : integer "0";
tune : integer "0";
tune_broken : integer "0";
turns : integer "0";
inventory_max : integer_const "5";
worn_max : integer_const "1";
}
######################################
# Strings
######################################
strings {
dog_name : string "vicious dog";
door_name : string "closed door";
gate_name : string "closed gate";
message : string "";
table_name : string "wooden table";
treasure_score : dynamic_string {(treasure_found * 5 + treasure_deposited() * 5 + "/" + treasure_total() * 10)}
}
######################################
# Game Settings
######################################
game_settings {
exit_list_calculation = basic
inventory_items_limit_var = inventory_max
inventory_worn_items_limit_var = worn_max
rewind_enabled = true
rollback_enabled = true
treasure_hunt_mode = bespoke
}
######################################
# Locations
######################################
locations {
room01 : location "Living Room";
room02 : location "Study";
room03 : location "Parlour";
room04 : location "Bridge";
room05 : location "Inner Courtyard";
room06 : location "Chapel";
room07 : location "Outer Courtyard";
room08 : location "Garden";
room09 : location "Stable";
room10 : location "Garden Shed";
room11 : location "Driveway";
room12 : location "Road";
room13 : location "Field";
room14 : location "Road";
room15 : location "Village Outskirts";
room16 : location "Roadside Stall";
room17 : location "Road";
room18 : location "Stationery Store";
room19 : location "Haberdashery";
room20 : location "Town Square";
room21 : location "Road";
room22 : location "Gym";
room23 : location "Camping Store";
room24 : location "Car Wash";
room25 : location "Road";
room26 : location "Dry Cleaner";
room27 : location "Railway Station";
room28 : location "Aquarium";
room29 : location "Fish Tank";
room30 : location "Road";
room31 : location "Laboratory";
}
######################################
# Connections
######################################
connections {
from, direction, to = [
room01, north_oneway, room04,
room01, east_oneway, room02,
room01, west_oneway, room03,
room01, up_oneway, room31,
room02, west_oneway, room01,
room03, east_oneway, room01,
room04, north_oneway, room05,
room04, south_oneway, room01,
room05, north_oneway, room07,
room05, south_oneway, room04,
room05, east_oneway, room06,
room05, west_oneway, room11,
room06, west_oneway, room05,
room07, north_oneway, room10,
room07, south_oneway, room05,
room07, east_oneway, room08,
room07, west_oneway, room09,
room08, west_oneway, room07,
room09, east_oneway, room07,
room10, south_oneway, room07,
room11, east_oneway, room05,
room11, west_oneway, room12,
room12, north_oneway, room13,
room12, south_oneway, room14,
room12, east_oneway, room11,
room13, south_oneway, room12,
room14, north_oneway, room12,
room14, south_oneway, room15,
room15, north_oneway, room14,
room15, south_oneway, room17,
room15, west_oneway, room16,
room16, east_oneway, room15,
room17, north_oneway, room15,
room17, south_oneway, room20,
room17, east_oneway, room19,
room17, west_oneway, room18,
room18, east_oneway, room17,
room19, west_oneway, room17,
room20, north_oneway, room17,
room20, south_oneway, room30,
room20, east_oneway, room25,
room20, west_oneway, room21,
room21, north_oneway, room22,
room21, south_oneway, room24,
room21, east_oneway, room20,
room21, west_oneway, room23,
room22, south_oneway, room21,
room23, east_oneway, room21,
room24, north_oneway, room21,
room25, north_oneway, room26,
room25, south_oneway, room28,
room25, east_oneway, room27,
room25, west_oneway, room20,
room26, south_oneway, room25,
room27, west_oneway, room25,
room28, north_oneway, room25,
room29, up_oneway, room28,
room30, north_oneway, room20,
room31, down_oneway, room01,
]
}
######################################
# Barriers
######################################
barriers {
block_door_north : block_path {
from = room01
to = room04
message = Bonk!
block_when_not = is_door_open
}
block_door_south : block_path {
from = room04
to = room01
message = Bonk!
block_when_not = is_door_open
}
block_gate_west : block_path {
from = room05
to = room11
message = Bonk!
block_when_not = is_gate_open
}
block_gate_east : block_path {
from = room11
to = room05
message = Bonk!
block_when_not = is_gate_open
}
block_lab_down : block_path {
from = room31
to = room01
message = Call Frankenstein.
block_when = is_end_game
show_blocked_exit = true
}
}
######################################
# Objects
######################################
objects {
// Room 1: Living Room
room : scenery "living room" start_at = "room01" conspicuous = "false";
door : scenery "{door_name}" start_at = "room01";
table : scenery "{table_name}" start_at = "room01";
legs : object "<l<12>><e<14>><g<12>><s<14>>" treasure = "true";
// Room 2: Study
study : scenery "study" start_at = "room02" conspicuous = "false";
frankenstein : scenery "Doctor Frankenstein" start_at = "room02";
bell : scenery "bell" start_at = "room02";
rope : scenery "rope" start_at = "room02";
// Room 3: Parlour
parlour : scenery "parlour" start_at = "room03" conspicuous = "false";
clock : scenery "grandfather clock" start_at = "room03";
hands : object "<h<12>><a<14>><n<12>><d<14>><s<12>>" treasure = "true";
piano : scenery "piano" start_at = "room03";
keys : scenery "keys" start_at = "room03" conspicuous = "false";
key : object "key";
// Room 4: Bridge
bridge : scenery "bridge" start_at = "room04" conspicuous = "false";
moat : scenery "moat" start_at = "room04";
// Room 5: Inner Courtyard
courtyard : scenery "courtyard" start_at = "room05" conspicuous = "false";
gate : scenery "{gate_name}" start_at = "room05";
chapel : scenery "chapel" start_at = "room05";
// Room 6: Chapel
chapel_06 : scenery "chapel" start_at = "room06" conspicuous = "false";
crucifix : scenery "crucifix" start_at = "room06";
// Room 7: Outer Courtyard
dog : scenery "{dog_name}" start_at = "room07";
shed : scenery "garden shed" start_at = "room07";
stable : scenery "stable" start_at = "room07";
garden : scenery "garden" start_at = "room07";
// Room 8: Garden
garden_08 : scenery "garden" start_at = "room08" conspicuous = "false";
carrot : object "carrot";
// Room 9: Stable
stable_09 : scenery "stable" start_at = "room09" conspicuous = "false";
hay : scenery "hay" start_at = "room09";
horse : scenery "horse" start_at = "room09";
// Room 10: Garden Shed
shed_10 : scenery "garden shed" start_at = "room10" conspicuous = "false";
spade : object "spade" start_at = "room10";
saw : object "saw" start_at = "room10";
// Room 11: Driveway
driveway : scenery "driveway" start_at = "room11" conspicuous = "false";
crest : scenery "family crest";
arms : object "<a<12>><r<14>><m<12>><s<14>>" treasure = "true";
// Room 12: Road 1
road : scenery "road" start_at = "room12" conspicuous = "false";
sign : scenery "sign" start_at = "room12";
// Room 13: Field
field : scenery "field" start_at = "room13" conspicuous = "false";
burrow : scenery "burrow" start_at = "room13";
rabbit : scenery "rabbit";
hare : scenery "hare";
hair : object "<h<12>><a<14>><i<12>><r<14>>" treasure = "true";
// Room 14: Road 2
// Room 15: Village Outskirts
outskirts : scenery "village outskirts" start_at = "room15" conspicuous = "false";
stall : scenery "roadside stall" start_at = "room15";
// Room 16: Roadside Stall
stall_16 : scenery "roadside stall" start_at = "room16" conspicuous = "false";
apple : object "apple" start_at = "room16";
peas : object "peas" start_at = "room16";
corn : object "corn" start_at = "room16";
ears : object "<e<12>><a<14>><r<12>><s<14>>" treasure = "true";
// Room 17: Road 3
stationery_store : scenery "stationery store" start_at = "room17";
haberdashery : scenery "haberdashery" start_at = "room17";
// Room 18: Stationery Store
stationery_store_18 : scenery "stationery store" start_at = "room18" conspicuous = "false";
attendant : scenery "attendant" start_at = "room18";
counter : scenery "counter" start_at = "room18";
pen : object "pen" start_at = "room18";
pencil : object "pencil" start_at = "room18";
rulers : object "rulers" start_at = "room18";
feet : object "<f<12>><e<14>><e<12>><t<14>>" treasure = "true";
// Room 19: Haberdashery
haberdashery_19 : scenery "haberdashery" start_at = "room19" conspicuous = "false";
cloth : object "cloth" start_at = "room19";
cotton : object "cotton" start_at = "room19";
needles : object "needles" start_at = "room19";
pins : object "pins";
eyes : object "<e<12>><y<14>><e<12>><s<14>>" treasure = "true";
// Room 20: Town Square
town_square : scenery "town square" conspicuous = "false";
// Room 21: Road 4
gym : scenery "gym" start_at = "room21";
wash : scenery "car wash" start_at = "room21";
camping_store : scenery "camping store" start_at = "room21";
// Room 22: Gym
gym_22 : scenery "gym" start_at = "room22" conspicuous = "false";
body_builder : scenery "body builder" start_at = "room22";
bar_bell : scenery "bar bell" start_at = "room22";
dumb_bell : scenery "dumb bell" start_at = "room22";
kettle_bell : scenery "kettle bell" start_at = "room22";
medicine_ball : scenery "medicine ball" start_at = "room22";
builder : scenery "builder";
body : object "<b<12>><o<14>><d<12>><y<14>>" treasure = "true";
// Room 23: Camping Store
camping_store_23 : scenery "camping store" start_at = "room23" conspicuous = "false";
sleeping_bag : scenery "sleeping bag" start_at = "room23";
bag : object "bag";
// Room 24: Car Wash
wash_24 : scenery "car wash" start_at = "room24" conspicuous = "false";
wetsuit : object "wetsuit" wearable = "true";
// Room 25: Road 5
cleaner : scenery "dry cleaner" start_at = "room25";
station : scenery "railway station" start_at = "room25";
aquarium : scenery "aquarium" start_at = "room25";
// Room 26: Dry Cleaner
cleaner_26 : scenery "dry cleaner" start_at = "room26" conspicuous = "false";
racks : scenery "racks" start_at = "room26";
suit : object "suit" wearable = "true";
// Room 27: Railway Station
station_27 : scenery "railway station" start_at = "room27" conspicuous = "false";
receipt : object "receipt" start_at = "room27";
// Room 28: Aquarium
aquarium_28 : scenery "aquarium" start_at = "room28" conspicuous = "false";
tank : scenery "fish tank" start_at = "room28";
// Room 29: Fish Tank
tank_29 : scenery "fish tank" start_at = "room29" conspicuous = "false";
fish : scenery "fish" start_at = "room29";
shark : scenery "shark" start_at = "room29";
hammer : object "hammer";
head : object "<h<12>><e<14>><a<12>><d<14>>" treasure = "true";
// Room 30: Road 6
house : scenery "mayor's house" start_at = "room30";
front_door : scenery "front door" start_at = "room30";
mat : scenery "mat" start_at = "room30";
meat : object "meat";
// Room 31: Laboratory
laboratory : scenery "laboratory" start_at = "room31" conspicuous = "false";
machinery : scenery "machinery" start_at = "room31";
bench : scenery "bench" start_at = "room31";
}
######################################
# On Startup
######################################
on_startup {
: print "Doctor Frankenstein comes running down the stairs puffing and panting.";
: print "<\"Igor, I've done it ... machine ready ... thunderstorm due tonight ... need fresh body parts: head, hair, eyes, ears, body, arms, hands, legs, feet.\"<#99f>>";
: print "He stops for breath before continuing, <\"You know what to do ... bring parts to lab ... pronto!\"<#99f>>";
: print "[[Press any key]]";
: press_any_key;
}
######################################
# On Command
######################################
on_command {
// Checks for diagonal movement
: match "ne _;nw _;se _;sw _" {
: print "No diagonal.";
: done;
}
// Self
: match "examine me" {
: print "Me Igor.";
: done;
}
: match "get me" {
: print "That silly.";
: done;
}
// Room 1: Living Room
: match "examine room" {
: if (is_at "room01") {
: if (original_noun1() == "living") {
: print "Not dead.";
: done;
}
: print "For living.";
: done;
}
}
// Door (floating object in room01 & 04)
: match "examine door" {
: if (is_present "door") {
: if (is_at "room01") {
: print "To north.";
}
: else {
: print "To south.";
}
: done;
}
}
: match "close door" {
: if (is_present "door") {
: if (!is_door_open) {
: print "Already closed.";
: done;
}
: set_false "is_door_open";
: set_string var = "door_name" text = "closed door";
: set_string var = "message" text = "Igor close.";
: gosub "refresh";
}
}
: match "enter door" {
: if (is_at "room01") {
: if (is_door_open) {
: goto "room04";
: redescribe;
}
: print "Bonk!";
: failure;
: done;
}
: if (is_at "room04") {
: if (is_door_open) {
: goto "room01";
: redescribe;
}
: print "Bonk!";
: failure;
: done;
}
}
: match "lock door" {
: if (is_present "door") {
: if (is_door_open) {
: print "Close first.";
: done;
}
: print "No lock.";
: done;
}
}
: match "open door" {
: if (is_present "door") {
: if (is_door_open) {
: print "Already open.";
: done;
}
: set_true "is_door_open";
: set_string var = "door_name" text = "open door";
: set_string var = "message" text = "Igor open.";
: gosub "refresh";
: done;
}
}
: match "unlock door" {
: if (is_present "door") {
: print "Not locked.";
: done;
}
}
// Table
: match "examine table" {
: if (is_present "table") {
: if (has_not_created "legs") {
: print "Four legs.";
: done;
}
: print "Two legs.";
: done;
}
}
: match "saw table" {
: if (is_present "table") {
: if (!is_carried "saw") {
: print "No saw.";
: done;
}
: print "Too big.";
: done;
}
}
// Legs (treasure)
: match "examine legs" {
: if (is_present "legs") {
: print "Two legs.";
: done;
}
: if (is_present "table") {
: if (has_not_created "legs") {
: print "Wooden legs.";
: done;
}
: print "Two missing.";
: done;
}
}
: match "break legs" {
: if (is_present "table" && has_not_created "legs") {
: print "Strong wood.";
: done;
}
}
: match "chop legs" {
: if (is_present "table" && has_not_created "legs") {
: print "No axe.";
: done;
}
}
: match "cut legs" {
: if (is_present "table" && has_not_created "legs") {
: print "No knife.";
: done;
}
}
: match "get legs" {
: if (is_present "table" && has_not_created "legs") {
: print "Belong table.";
: done;
}
}
: match "give legs;show legs" {
: if (is_present "frankenstein") {
: print "\"Take upstairs.\".";
: done;
}
}
: match "saw legs" {
: if (is_present "table") {
: if (!is_carried "saw") {
: print "Sore legs?";
: done;
}
: if (has_not_created "legs") {
: create "legs";
: set_string var = "table_name" text = "broken table";
: increment "treasure_found";
: success;
: set_string var = "message" text = "Table collapses.";
: gosub "refresh";
}
: print "Saw blunt.";
: done;
}
}
// Room 2: Study
: match "examine study" {
: if (is_at "room02") {
: print "Frankenstein's room.";
: done;
}
}
// Bell
: match "examine bell" {
: if (is_present "bell") {
: print "Rope attached.";
: done;
}
}
: match "hit bell;ring bell" {
: if (is_present "bell") {
: print "Use rope.";
: done;
}
}
// Frankenstein
: match "examine frankenstein" {
: if (is_present "frankenstein") {
: print "Looks excited.";
: done;
}
}
: match "ask frankenstein" {
: if (is_present "frankenstein") {
: print "\"Not now.\"";
: done;
}
}
: match "pat frankenstein" {
: if (is_present "frankenstein") {
: print "\"Go away.\"";
: done;
}
}
: match "talk frankenstein" {
: if (is_present "frankenstein") {
: print "\"Got everything?\"";
: done;
}
}
// Rope (floating object in room02 & 31)
: match "examine rope" {
: if (is_at "room02") {
: print "Leads upstairs.";
: done;
}
: if (is_at "room31") {
: print "Leads downstairs.";
: done;
}
}
: match "get rope" {
: if (is_present "rope") {
: print "Rope attached.";
: done;
}
}
: match "pull rope" {
: if (is_at "room02") {
: print "Try upstairs.";
: done;
}
: if (is_at "room31") {
: if (is_end_game) {
: print "Bell rings.";
: print "[[Press any key]]";
: press_any_key;
: clear_screen;
: print "Frankenstein comes running up the stairs to examine your booty and his face drops.\n<\"Igor, you idiot ... these aren't body parts ... how am I going to make a monster out of this rubbish? I should chop you up and use YOUR body parts!\"\n\"Sorry, master.\"<#99f>>";
: win_game;
}
: print "Not yet.";
: done;
}
}
: match "use rope" {
: if (is_present "rope") {
: print "Try PULL.";
: done;
}
}
// Room 3: Parlour
: match "examine parlour" {
: if (is_at "room03") {
: print "For relaxing.";
: done;
}
}
: match "listen -" {
: if (is_at "room03") {
: print "Tick, tock.";
: done;
}
}
// Clock
: match "examine clock" {
: if (is_present "clock") {
: if (has_not_created "hands") {
: print "Two hands.";
: done;
}
: print "Hands missing.";
: done;
}
}
: match "examine grandfather" {
: if (is_present "clock") {
: print "Misses grandmother.";
: done;
}
}
: match "repair clock" {
: if (is_present "clock" && !has_not_created "hands") {
: print "Can't fix.";
: done;
}
}
// Hand (singular), hour hand, minute hand
: match "examine hand" {
: if (is_present "clock" && has_not_created "hands") {
: print "Which one?";
: done;
}
}
: match "examine hour" {
: if ((is_present "clock" && has_not_created "hands") || is_present "hands") {
: print "Little hand.";
: done;
}
}
: match "examine minute" {
: if ((is_present "clock" && has_not_created "hands") || is_present "hands") {
: print "Big hand.";
: done;
}
}
: match "get hand;get hour;get minute" {
: if ((is_present "clock" && has_not_created "hands") || is_beside "hands") {
: print "Need both.";
: done;
}
}
// Hands (plural) (treasure)
: match "examine hands" {
: if (is_present "clock" && has_not_created "hands") {
: print "Hour, minute.";
: done;
}
: if (is_present "hands") {
: print "Two hands.";
: done;
}
}
: match "get hands" {
: if (is_present "clock" && has_not_created "hands") {
: if (carried() < carry_limit()) {
: pocket "hands";
: increment "treasure_found";
: success;
: print "Igor take.";
: done;
}
: print "Hands full.";
: done;
}
}
: match "give hands;show hands" {
: if (is_present "frankenstein") {
: print "\"Take upstairs.\".";
: done;
}
}
: match "insert hands" {
: if (is_present "clock" && is_carried "hands") {
: print "Can't fix.";
: done;
}
}
// Piano
: match "examine piano" {
: if (is_present "piano") {
: print "Ivory keys.";
: done;
}
}
: match "play piano" {
: if (is_present "piano") {
: if (has_not_created "key") {
: if (tune == 0) {
: if (sysvar_bool "sysvar_sound_enabled") {
: gosub "play_macdonald";
}
: else {
: print "[[Plays 'Old MacDonald had a Farm']]";
}
: print "Play another.";
}
: else_if (tune == 1) {
: if (sysvar_bool "sysvar_sound_enabled") {
: gosub "play_sheep";
}
: else {
: print "[[Plays 'Baa, Baa, Black Sheep']]";
}
: print "One more.";
}
: else_if (tune == 2) {
: if (sysvar_bool "sysvar_sound_enabled") {
: gosub "play_mary";
}
: else {
: print "[[Plays 'Mary had a Little Lamb']]";
}
: print "That's enough.";
}
: increment "tune";
: if (tune == 3) {
: set_integer var = "tune" value = "0";
}
}
: else {
: if (tune_broken == 0) {
: if (sysvar_bool "sysvar_sound_enabled") {
: gosub "play_macdonald_broken";
}
: else {
: print "[[Plays 'Old MacDonald had a Farm']]";
}
}
: else_if (tune_broken == 1) {
: if (sysvar_bool "sysvar_sound_enabled") {
: gosub "play_sheep_broken";
}
: else {
: print "[[Plays 'Baa, Baa, Black Sheep']]";
}
}
: else_if (tune_broken == 2) {
: if (sysvar_bool "sysvar_sound_enabled") {
: gosub "play_mary_broken";
}
: else {
: print "[[Plays 'Mary had a Little Lamb']]";
}
}
: increment "tune_broken";
: if (tune_broken == 3) {
: set_integer var = "tune_broken" value = "0";
}
: print "E missing.";
}
: done;
}
}
: match "repair piano" {
: if (is_present "piano" && is_carried "key") {
: print "Can't fix.";
: done;
}
}
// Keys (plural)
: match "examine keys" {
: if (is_present "keys") {
: if (has_not_created "key") {
: print "Key loose.";
: done;
}
: print "Key missing.";
: done;
}
}
// Key (singular)
: match "examine key" {
: if (is_present "key") {
: print "Oblong key.";
: done;
}
: if (is_present "keys") {
: print "Many keys.";
: done;
}
}
: match "get key" {
: if (is_present "keys") {
: if (has_not_created "key") {
: if (carried() < carry_limit()) {
: pocket "key";
: print "Igor take.";
: done;
}
: print "Hands full.";
: done;
}
: if (!is_present "key") {
: print "None loose.";
: done;
}
}
}
: match "insert key" {
: if (is_carried "key") {
: if (is_present "piano") {
: print "Can't fix.";
: done;
}
: if (is_present "mat") {
: swap o1 = "mat" o2 = "meat";
: destroy "key";
: set_string var = "message" text = "Fits hole.";
: gosub "refresh";
}
}
}
// Room 4: Bridge
: match "examine bridge" {
: if (is_at "room04") {
: print "Crosses moat.";
: done;
}
}
// Moat
: match "examine moat" {
: if (is_present "moat") {
: print "Very deep.";
: done;
}
}
: match "d _;jump -;jump moat;enter moat" {
: if (is_present "moat") {
: print "Igor dead.";
: end_game;
}
}
// Room 5: Inner Courtyard
// Courtyard (floating object in room05 & 07)
: match "examine courtyard" {
: if (is_present "courtyard") {
: print "Walled in.";
: done;
}
}
// Chapel
: match "examine chapel" {
: if (is_present "chapel") {
: print "To east.";
: done;
}
}
: match "enter chapel" {
: if (is_present "chapel") {
: goto "room06";
: redescribe;
}
}
// Gate (floating object in room05 & 11)
: match "examine gate" {
: if (is_present "gate") {
: if (is_at "room05") {
: print "To west.";
: done;
}
: if (is_gate_open) {
: print "Should close.";
: done;
}
: print "To east.";
: done;
}
}
: match "close gate" {
: if (is_present "gate") {
: if (!is_gate_open) {
: print "Already closed.";
: done;
}
: set_false "is_gate_open";
: set_string var = "gate_name" text = "closed gate";