-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathshadow.zil
2219 lines (2021 loc) · 65.6 KB
/
shadow.zil
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
"SHADOW for
Zork III: The Dungeon Master
The Great Underground Empire (Part 3)
(c) Copyright 1982 Infocom, Inc. All Rights Reserved.
"
<ROOM CREEPY-CRAWL
(IN ROOMS)
(DESC "Creepy Crawl")
(LDESC
"You are in a dark and quite creepy crawlway with passages leaving to the
north, east, south, and southwest.")
(FLAGS RLANDBIT)
(NORTH TO JUNCTION)
(SOUTH TO FOGGY-ROOM)
(SW TO SHADOW-1)
(EAST TO TIGHT-SQUEEZE)
(ACTION CREEPY-CRAWL-F)>
<ROOM SHADOW-1
(IN ROOMS)
(DESC "Land of Shadow")
(LDESC
"You are at the eastern end of a dark, featureless landscape of shallow
hills. Paths to the east and southeast re-enter the rock.")
(FLAGS RLANDBIT)
(ACTION SHADOW-ROOMS)
(NE "Towering walls of rock bar your way.")
(NORTH "Towering walls of rock bar your way.")
(SOUTH TO SHADOW-5)
(EAST TO CREEPY-CRAWL)
(NW TO SHADOW-2)
(WEST TO SHADOW-3)
(SW TO SHADOW-4)
(SE TO FOGGY-ROOM)>
<ROOM SHADOW-2
(IN ROOMS)
(DESC "Land of Shadow")
(LDESC
"You are in a shadowy land of low, rolling hills stretching out to the west
and south. The land is bordered to the north by a massive stone wall.
Ancient and weathered, the wall has crumbled enough at one point to permit
passage.")
(FLAGS RLANDBIT)
(ACTION SHADOW-ROOMS)
(NE "A stone wall blocks the way.")
(NORTH TO CLEARING)
(NW "A stone wall blocks the way.")
(SE TO SHADOW-1)
(SW TO SHADOW-7)
(SOUTH TO SHADOW-3)
(WEST TO SHADOW-8)
(EAST TO SHADOW-1)
(GLOBAL RUBBLE STONE-WALL)>
<ROOM SHADOW-3
(IN ROOMS)
(DESC "Land of Shadow")
(LDESC
"You are in a dark and shadowy land. All around you are gentle hills and
eerie shadows. Far above, shrouded in mist, you can barely make out the
ceiling of the enormous cavern that spans this entire land.")
(FLAGS RLANDBIT)
(ACTION SHADOW-ROOMS)
(PSEUDO "MIST" MIST-PSEUDO)
(NW TO SHADOW-8)
(NE TO SHADOW-1)
(SE TO SHADOW-1)
(SW TO SHADOW-6)
(NORTH TO SHADOW-2)
(SOUTH TO SHADOW-4)
(WEST TO SHADOW-7)
(EAST TO SHADOW-1)>
<ROOM SHADOW-4
(IN ROOMS)
(DESC "Land of Shadow")
(LDESC
"You are in an ominously dark land of rolling hills. The ground becomes
softer to the south.")
(FLAGS RLANDBIT)
(ACTION SHADOW-ROOMS)
(NORTH TO SHADOW-3)
(EAST TO SHADOW-1)
(NE TO SHADOW-1)
(SE TO SHADOW-5)
(SOUTH TO SHADOW-5)
(SW "The ground becomes too soft to walk on in that direction.")
(WEST TO SHADOW-6)
(NW TO SHADOW-7)>
<ROOM SHADOW-5
(IN ROOMS)
(DESC "Land of Shadow")
(LDESC
"You are at the southern end of a shadowy land. The ground here is quite
soft, and the area is surrounded by quicksand on most sides. North of here
is a terrain of shallow hills.")
(FLAGS RLANDBIT)
(ACTION SHADOW-ROOMS)
(PSEUDO "QUICKS" QUICKSAND-PSEUDO)
(NORTH TO SHADOW-4)
(NW TO SHADOW-6)
(NE TO SHADOW-1)
(SE "The quicksand prevents movement in that direction.")
(WEST "The quicksand prevents movement in that direction.")
(SOUTH "The quicksand prevents movement in that direction.")
(SW "The quicksand prevents movement in that direction.")
(EAST "The quicksand prevents movement in that direction.")>
<ROOM SHADOW-6
(IN ROOMS)
(DESC "Land of Shadow")
(LDESC
"You are near the southern end of the land of shadow. The ground here is
soft and spongy, and it becomes quicksand to the south. North and east of here
are gentle, rolling hills. A gentle sea breeze wafts over a steeply sloping
path to the west.")
(FLAGS RLANDBIT)
(ACTION SHADOW-ROOMS)
(NORTH TO SHADOW-7)
(NW TO FLATHEAD-OCEAN)
(WEST TO FLATHEAD-OCEAN)
(DOWN TO FLATHEAD-OCEAN)
(SE TO SHADOW-5)
(EAST TO SHADOW-4)
(NE TO SHADOW-3)
(SOUTH "The quicksand prevents movement in that direction.")
(SW "The quicksand prevents movement in that direction.")
(PSEUDO "QUICKS" QUICKSAND-PSEUDO)>
<ROOM SHADOW-7
(IN ROOMS)
(DESC "Land of Shadow")
(LDESC
"You are in a land of dark shadows and shallow hills, which stretch out in all
directions. To the west, the land dips sharply.")
(FLAGS RLANDBIT)
(ACTION SHADOW-ROOMS)
(NE TO SHADOW-2)
(EAST TO SHADOW-3)
(SE TO SHADOW-4)
(SOUTH TO SHADOW-6)
(NORTH TO SHADOW-8)
(DOWN TO FLATHEAD-OCEAN)
(NW TO FLATHEAD-OCEAN)
(WEST TO FLATHEAD-OCEAN)
(SW TO FLATHEAD-OCEAN)>
<ROOM SHADOW-8
(IN ROOMS)
(DESC "Land of Shadow")
(LDESC
"You are standing atop a steep cliff, looking west over a vast ocean.
Far below, the surf pounds at a sandy beach. To the south and east are
rolling hills filled with eerie shadows. A path cut into the face of the
cliff descends toward the beach. To the north is a tall stone wall,
which ends at the cliff edge. It was obviously built long ago, and
directly north is a spot where you could climb over the rubble of the
decaying wall.")
(FLAGS RLANDBIT)
(ACTION SHADOW-ROOMS)
(SOUTH TO SHADOW-7)
(EAST TO SHADOW-2)
(SE TO SHADOW-3)
(SW TO FLATHEAD-OCEAN)
(WEST TO FLATHEAD-OCEAN)
(NE "A stone wall blocks the way.")
(NW "A stone wall blocks the way.")
(DOWN TO FLATHEAD-OCEAN)
(NORTH TO CLIFF)
(GLOBAL RUBBLE STONE-WALL)>
<ROOM FLATHEAD-OCEAN
(IN ROOMS)
(DESC "Flathead Ocean")
(FLAGS RLANDBIT ONBIT)
(NORTH TO CLIFF-BASE)
(ENTER"Between the rocks, wind, and waves, you wouldn't last a minute.")
(WEST "Between the rocks, wind, and waves, you wouldn't last a minute.")
(SW "Between the rocks, wind, and waves, you wouldn't last a minute.")
(NW "Between the rocks, wind, and waves, you wouldn't last a minute.")
(ACTION FLATHEAD-OCEAN-F)
(SE TO SHADOW-6)
(NE TO SHADOW-8)
(EAST TO SHADOW-7)
(SOUTH "The quicksand prevents movement here.")
(PSEUDO "QUICKS" QUICKSAND-PSEUDO "MIST" MIST-PSEUDO)>
<OBJECT SHADOW
(DESC "hooded figure")
(SYNONYM SHADOW FIGURE MAN WOMAN)
(ADJECTIVE HOODED CLOAKED)
(FLAGS ACTORBIT TRANSBIT CONTBIT OPENBIT)
(ACTION SHADOW-F)
(DESCFCN SHADOW-F)>
<OBJECT HOOD
(IN SHADOW)
(DESC "hood")
(SYNONYM HOOD)
(FLAGS NDESCBIT TRYTAKEBIT TAKEBIT WEARBIT)
(ACTION HOOD-F)>
<OBJECT CLOAK
(IN SHADOW)
(DESC "cloak")
(SYNONYM CLOAK)
(FLAGS NDESCBIT TRYTAKEBIT TAKEBIT WEARBIT)
(ACTION CLOAK-F)>
<GLOBAL DIRS
<LTABLE P?NORTH "north" P?SOUTH "south" P?EAST "east" P?WEST "west"
P?NW "northwest" P?NE "northeast" P?SE "southeast"
P?SW "southwest" P?UP "stairs" P?DOWN "stairs">>
<GLOBAL DIR-TBL <TABLE 0 0 0 0 0 0 0 0 0 0 0 0>>
<ROUTINE PICK-DIRECTION (RM "AUX" (NXT 0) (CNT 0) (OFFS 0))
<REPEAT ()
<COND (<==? <SET NXT <NEXTP .RM .NXT>> 0>
<RETURN>)
(<NOT <L? .NXT ,LOW-DIRECTION>>
<COND (<NOT <EQUAL? .NXT ,P?UP ,P?DOWN>>
<SET OFFS <+ .OFFS 1>>
<PUT ,DIR-TBL .OFFS .NXT>
<SET CNT <+ .CNT 1>>)>)>>
<GET ,DIR-TBL <RANDOM .CNT>>>
<ROUTINE SHADOW-F ("OPTIONAL" (RARG <>))
<COND (<==? .RARG ,M-OBJDESC>
<COND (<NOT ,BLOCKED-DIR>
<SETG BLOCKED-DIR <PICK-DIRECTION ,HERE>>)>
<TELL
"A cloaked and hooded person, carrying a sword not unlike your own,">
<COND (<G? ,S-STRENGTH 3>
<TELL "
is standing blocking the way to the ">
<TELL <LKP ,BLOCKED-DIR ,DIRS> "." CR>)
(T <TELL "
is here." CR>)>
<TELL "The hooded figure" <GET ,SHADOW-DIAG ,S-STRENGTH> CR>)
(<AND <VERB? GIVE> <==? ,PRSI ,SHADOW>>
<TELL
"The hooded figure isn't interested in your gifts." CR>)
(<HELLO? ,SHADOW>
<TELL
"The hooded figure does not respond to your words." CR>)
(<AND <VERB? ATTACK> <==? ,PRSI ,SWORD>>
<COND (<NOT ,SHADOW-POINT-2>
<SETG SCORE <+ ,SCORE 1>>
<SETG SHADOW-POINT-2 T>)>
<SHADOW-ATTACK>)
(<VERB? ATTACK>
<TELL
"The hooded figure ignores your feeble attack." CR>
<SETG ATTACK-MODE T>
<ENABLE <QUEUE I-CURE 10>>
<ENABLE <QUEUE I-SHADOW-REPLY -1>>)>>
<GLOBAL SHADOW-DIAG
<TABLE
"?"
" appears to be badly hurt and defenseless."
" is hurt, and its strength appears to be fading."
" has some wounds and is probably not capable of hindering your movement."
" has a light wound which hasn't affected its seemingly great strength."
" has a great deal of strength, perhaps matching your own.">>
<GLOBAL P-STRENGTH 5>
<GLOBAL S-STRENGTH 5>
<GLOBAL ATTACK-MODE <>>
<GLOBAL SHADOW-GONE <>>
<ROUTINE I-CURE ()
<COND (<NOT <==? ,P-STRENGTH 5>>
<SETG P-STRENGTH <+ ,P-STRENGTH 1>>)>
<COND (<NOT <==? ,S-STRENGTH 5>>
<SETG S-STRENGTH <+ ,S-STRENGTH 1>>)>
<COND (<NOT <==? <+ ,P-STRENGTH ,S-STRENGTH> 10>>
<QUEUE I-CURE 10>)>
<RFALSE>>
<ROUTINE SHADOW-ATTACK ()
<COND (<NOT ,ATTACK-MODE>
<ENABLE <QUEUE I-CURE 10>>
<SETG ATTACK-MODE T>
<ENABLE <QUEUE I-SHADOW-REPLY -1>>)>
<COND (<PROB <+ <* ,P-STRENGTH 10> 10>>
<COND (<PROB 85>
<SETG S-STRENGTH <- ,S-STRENGTH 1>>
<COND (<0? ,S-STRENGTH>
<SHADOW-DIES>
<RTRUE>)>
<TELL <RANDOM-ELEMENT ,P-HITS> CR>
<TELL "The figure" <GET ,SHADOW-DIAG ,S-STRENGTH> CR>)
(T
<SETG S-STRENGTH <- ,S-STRENGTH 2>>
<COND (<0? ,S-STRENGTH> <SETG S-STRENGTH 1>)
(<L? ,S-STRENGTH 1>
<SHADOW-DIES>
<RTRUE>)>
<TELL
"A sharp thrust and the hooded figure is badly wounded!" CR>
<TELL "The figure" <GET ,SHADOW-DIAG ,S-STRENGTH> CR>)>)
(T
<COND (<L? ,S-STRENGTH 2>
<TELL
"Your opponent blocks your attack with its sword." CR>)
(T <TELL <RANDOM-ELEMENT ,P-MISSES> CR>)>)>>
<GLOBAL P-HITS <LTABLE
"A good parry! Your sword wounds the hooded figure!"
"A quick stroke catches the hooded figure off guard! Blood trickles
down the figure's arm!"
"The hooded figure is hit with a quick slash!">>
<GLOBAL P-MISSES <LTABLE
"Your move was not quick enough and misses the mark."
"A quick stroke, but the hooded figure is on guard."
"A good stroke, but it's too slow."
"A good slash, but it misses by a mile."
"You charge, but the hooded figure jumps nimbly aside.">>
<GLOBAL S-HITS <LTABLE
"The hooded figure catches you off guard and wounds you!"
"You are wounded by a lightning thrust!"
"Your quick reflexes cannot stop the hooded figure's stroke! You are hit!">>
<ROUTINE I-SHADOW-REPLY ()
<COND (<OR <NOT ,ATTACK-MODE> <NOT <IN? ,SHADOW ,HERE>>>
<QUEUE I-SHADOW-REPLY 0>
<SETG ATTACK-MODE <>>
<RFALSE>)>
<COND (<AND <PROB <+ <* ,S-STRENGTH 10> 10>> <G? ,S-STRENGTH 1>>
<COND (<PROB 90>
<COND (<L? <SETG P-STRENGTH <- ,P-STRENGTH 1>> 1>
<SETG P-STRENGTH 1>
<TELL
"The hooded figure swings its sword and sends yours flying to the ground.
Although you are defenseless, the figure reaches for your sword and hands it
back to you, nodding grimly." CR>)
(T
<TELL <RANDOM-ELEMENT ,S-HITS> CR>)>)
(T
<COND (<L? <SETG P-STRENGTH <- ,P-STRENGTH 2>> 1>
<JIGS-UP
"In your wounded state, you cannot defend yourself against your still-quick
opponent. Slowly and carefully, the figure starts to remove its hood as you
fall to the ground, dead.">)
(T
<TELL
"A brilliant feint puts you off guard, and the hooded figure slips its
sword between your ribs. You are hurt very badly." CR>)>)>)
(<L? ,S-STRENGTH 3>
<TELL
"The hooded figure attempts a thrust, but its weakened state prevents
hitting you." CR>)
(T
<TELL <RANDOM-ELEMENT ,S-MISSES> CR>)>>
<GLOBAL S-MISSES <LTABLE
"The hooded figure stabs nonchalantly with its sword and misses."
"You dodge as the hooded figure comes in low."
"The hooded figure tries to sneak past your guard, but you twist away."
"The hooded figure thrusts, but you fight back and send it
flying to the ground!">>
<ROUTINE SHADOW-DIES ()
<TELL
"The hooded figure, fatally wounded, slumps to the ground. It gazes up at
you once, and you catch a brief glimpse of deep and sorrowful eyes. Before
you can react, the figure vanishes in a cloud of fetid vapor." CR>
<REMOVE ,SHADOW>
<SETG SHADOW-GONE T>
<SETG BLOCKED-DIR <>>>
<ROUTINE HOOD-F ()
<COND (<AND <VERB? LOOK-UNDER> <IN? ,HOOD ,SHADOW>>
<TELL
"The figure's hood casts a dark shadow over its face. There is no way from
where you stand to look beneath it." CR>)
(<AND <VERB? TAKE PUT> <IN? ,HOOD ,SHADOW>>
<COND (<==? ,S-STRENGTH 1>
<TELL
"You slowly remove the hood from your badly wounded opponent and recoil
in horror at the sight of your own face, weary and wounded. A faint
smile comes to the lips and then the face starts to change, very slowly,
into that of an old, wizened person. The image fades and with it the body
of your hooded opponent. The cloak remains on the ground." CR>
<REMOVE ,SHADOW>
<SETG SHADOW-GONE T>
<MOVE ,HOOD ,WINNER>
<FCLEAR ,HOOD ,NDESCBIT>
<MOVE ,CLOAK ,HERE>
<FCLEAR ,CLOAK ,NDESCBIT>)
(<==? ,S-STRENGTH 2>
<TELL
"The hooded figure, though recovering from wounds, is strong enough to
force you back." CR>)
(T
<TELL
"You cannot get close enough to the hooded figure to remove the hood." CR>)>)>>
<ROUTINE CLOAK-F ()
<COND (<AND <VERB? LOOK-UNDER> <IN? ,CLOAK ,SHADOW>>
<TELL
"You cannot get close enough to look underneath the cloak." CR>)
(<AND <VERB? TAKE> <IN? ,CLOAK ,SHADOW>>
<TELL
"The cloak is fastened around the neck of the hooded figure. It would be
difficult to remove." CR>)>>
<GLOBAL BLOCKED-DIR <>>
<ROUTINE SHADOW-ROOMS (RARG)
<COND (<AND <==? .RARG ,M-BEG>
<VERB? WALK>
<==? ,PRSO ,BLOCKED-DIR>>
<TELL "Your way is blocked by the hooded figure." CR>)
(<==? .RARG ,M-END>
<COND (<NOT <IN? ,SHADOW ,HERE>>
<SETG BLOCKED-DIR <>>
<REMOVE ,SHADOW>)>
<COND (,SHADOW-GONE <RFALSE>)
(<IN? ,SHADOW ,HERE>
<COND (<AND <PROB 30> <NOT ,ATTACK-MODE>>
<SETG ATTACK-MODE T>
<ENABLE <QUEUE I-CURE 10>>
<ENABLE <QUEUE I-SHADOW-REPLY -1>>)>)
(<PROB 30>
<TELL
"You can hear quiet footsteps nearby." CR>)
(<AND <PROB 30> ,LIT <G? ,S-STRENGTH 3>>
<SETG BLOCKED-DIR <PICK-DIRECTION ,HERE>>
<TELL
"Through the shadows, a cloaked and hooded figure appears before you,
blocking the ">
<TELL <LKP ,BLOCKED-DIR ,DIRS>
"ern exit from the room and carrying a
brightly glowing sword." CR>
<SHADOW-ARRIVAL>
<RTRUE>)>)>>
<ROUTINE SHADOW-ARRIVAL ()
<MOVE ,SHADOW ,HERE>
<COND (<NOT ,SHADOW-POINT-1>
<SETG SCORE <+ ,SCORE 1>>
<SETG SHADOW-POINT-1 T>)>
<COND (<NOT <IN? ,SWORD ,WINNER>>
<MOVE ,SWORD ,WINNER>
<COND (,SWORD-IN-STONE?
<TELL
"From nowhere, the sword from the junction appears in your hand, wildly
glowing!" CR>)
(T
<TELL
"Your sword, glowing wildly, appears in your hand!" CR>)>
<SETG SWORD-IN-STONE? <>>)>>
<GLOBAL SHADOW-POINT-1 <>>
<GLOBAL SHADOW-POINT-2 <>>
<ROUTINE CREEPY-CRAWL-F (RARG)
<COND (<==? .RARG ,M-END>
<SETG BLOCKED-DIR <>>
<RTRUE>)>>
;" Cooperative Problem"
<ROOM ZORK2-STAIR
(IN ROOMS)
(DESC "Endless Stair")
(LDESC
"You are at the bottom of a seemingly endless stair, winding its way
upward beyond your vision. An eerie light, coming from all around you,
casts strange shadows on the walls. To the south is a dark and winding
trail.")
(FLAGS ONBIT RLANDBIT)
(NORTH "The stairs are endless.")
(UP "The stairs are endless.")
(SOUTH TO JUNCTION)
(GLOBAL STAIRS)>
<ROOM JUNCTION
(IN ROOMS)
(DESC "Junction")
(LDESC
"You are at the junction of a north-south passage and an east-west
passage. To the north, you can make out the bottom of a stairway. The
ways to the east and south are relatively cramped, but a wider trail
leads to the west.")
(FLAGS RLANDBIT)
(WEST TO CLEARING)
(NORTH TO ZORK2-STAIR)
(SOUTH TO CREEPY-CRAWL)
(EAST TO DAMP-PASSAGE)>
<ROOM CLEARING
(IN ROOMS)
(DESC "Barren Area")
(LDESC
"You are west of the junction, where the rock-bound passage widens out
into a large, flat area. Although the land here is barren, you can see
vegetation to the west. South of here is a mighty wall of stone, ancient
and crumbling. To the southwest the wall has decayed enough to form an
opening, through which seeps a thin mist. A trail dips sharply into
rocky terrain to the northwest.")
(FLAGS RLANDBIT)
(SW TO SHADOW-2)
(NW TO SLOPE)
(SOUTH "A stone wall blocks your way.")
(SE "A stone wall blocks your way.")
(WEST TO CLIFF)
(EAST TO JUNCTION)
(GLOBAL RUBBLE STONE-WALL)
(PSEUDO "MIST" MIST-PSEUDO)>
<ROOM SLOPE
(IN ROOMS)
(DESC "Hairpin Loop")
(LDESC
"You are at a sharp turn on a narrow and steeply sloping path, strewn
with boulders of various sizes. The path climbs sharply toward a
desolate plain to the southeast. Southwest of here the path winds down
to the base of a cliff.")
(SE TO CLEARING)
(UP TO CLEARING)
(SW TO CLIFF-BASE)
(DOWN TO CLIFF-BASE)
(GLOBAL RUBBLE)
(FLAGS RLANDBIT)>
<ROOM CLIFF-BASE
(IN ROOMS)
(DESC "Cliff Base")
(LDESC
"You are at the base of a steep cliff. Directly above you is a wide
ledge and far above that some natural sunlight can be seen. To the
northeast is a steeply climbing path and the ground becomes sandy toward
the south.")
(FLAGS ONBIT RLANDBIT)
(UP "You can't get up the rock face.")
(SOUTH TO FLATHEAD-OCEAN)
(NE TO SLOPE)
(GLOBAL LEDGE)>
<ROOM CLIFF
(IN ROOMS)
(DESC "Cliff")
(FLAGS ONBIT RLANDBIT)
(DOWN TO CLIFF-LEDGE IF ROPE-FLAG ELSE "The drop would kill you.")
(UP "There's no tree here suitable for climbing.")
(SW TO SHADOW-8)
(EAST TO CLEARING)
(ACTION CLIFF-F)
(GLOBAL GLOBAL-MAN RUBBLE STONE-WALL CLIFF-OBJECT)
(PSEUDO "MIST" MIST-PSEUDO)>
<ROOM CLIFF-LEDGE
(IN ROOMS)
(DESC "Cliff Ledge")
(FLAGS ONBIT RLANDBIT)
(UP "You attempt the climb but slide back down.")
(DOWN TO CLIFF-BASE)
(ACTION CLIFF-LEDGE-F)
(GLOBAL RUBBLE GLOBAL-ROPE GLOBAL-MAN LEDGE CLIFF-OBJECT)>
<ROOM FOGGY-ROOM
(IN ROOMS)
(DESC "Foggy Room")
(LDESC
"You are in a dank passage filled with a wispy fog. A spooky passageway
leads north and a wider path heads off to the south. To the west, the
path leaves the rock and enters an eerie, shadowy land.")
(NORTH TO CREEPY-CRAWL)
(SOUTH TO LAKE-SHORE)
(WEST TO SHADOW-1)
(FLAGS RLANDBIT)>
<ROOM LAKE-SHORE
(IN ROOMS)
(DESC "Lake Shore")
(LDESC
"You are in a wide cavern on the north shore of a small lake. Some
polished stone steps lead to the southeast and a sheer rock face
prevents any movement around the lake to the southwest. The cavern is
dimly lit from above.")
(SE TO AQ-VIEW)
(DOWN TO AQ-VIEW)
(SOUTH "If you really want to enter the lake, you should say so.")
(SW "The sheer rock face prevents movement along the lake shore.")
(NORTH TO FOGGY-ROOM)
(FLAGS ONBIT RLANDBIT)
(GLOBAL LAKE STAIRS)
(PSEUDO "SHORE" SHORE-PSEUDO "BEACH" SHORE-PSEUDO)>
<ROOM AQ-VIEW
(IN ROOMS)
(DESC "Aqueduct View")
(LDESC
"This is a small balcony carved into a near-vertical cliff. To the east,
stretching from north to south, stands a monumental aqueduct supported by
mighty stone pillars, some of which are starting to crumble from age. You
feel a sense of loss and sadness as you ponder this once-proud structure and
the failure of the Empire which created this and other engineering marvels.
Some stone steps lead up to the northwest.")
(NW TO LAKE-SHORE)
(UP TO LAKE-SHORE)
(DOWN "The drop would be fatal.")
(FLAGS RLANDBIT ONBIT)
(GLOBAL AQUEDUCT STAIRS)>
<ROOM ON-LAKE
(IN ROOMS)
(DESC "On the Lake")
(LDESC
"You are floating on the surface of the lake. The water is ice cold and
your ability to survive here for long is very questionable. A swim north
puts you at your starting point. Conditions to the east are poor where
the lake turns into swamp. The west and south shores are suitable for
walking, however.")
(NORTH TO LAKE-SHORE)
(SOUTH TO SOUTH-SHORE)
(PSEUDO "SWAMP" SWAMP-PSEUDO)
(SE "The swamp is impassable.")
(EAST "The swamp is impassable.")
(NE "The swamp is impassable.")
(WEST TO FAR-SHORE)
(NW TO FAR-SHORE)
(SW TO SOUTH-SHORE)
(DOWN TO IN-LAKE)
(FLAGS RLANDBIT ONBIT)
(ACTION ON-LAKE-F)
(GLOBAL LAKE FISH)>
<ROOM IN-LAKE
(IN ROOMS)
(DESC "Underwater")
(LDESC
"You are below the surface of the lake. It turns out that the lake is quite
shallow and the bottom is only a few feet below you. Considering the frigid
temperature of the water, you should probably not plan an extended stay.
The lake bottom is sandy and a few hearty plants and algae live there.")
(UP TO ON-LAKE)
(DOWN "You are already at the bottom of the lake.")
(NORTH TO IN-LAKE)
(SOUTH TO IN-LAKE)
(EAST TO IN-LAKE)
(WEST TO IN-LAKE)
(NE TO IN-LAKE)
(NW TO IN-LAKE)
(SE TO IN-LAKE)
(SW TO IN-LAKE)
(FLAGS RLANDBIT ONBIT)
(ACTION IN-LAKE-F)
(GLOBAL LAKE FISH)>
<ROOM FAR-SHORE
(IN ROOMS)
(DESC "Western Shore")
(LDESC
"You are on the western shore of the lake. The ground here is quite
hard, but a few sickly reeds manage to grow near the water's edge. The
only path leads into the rock to the south.")
(EAST "If you want to enter the lake, you should say so.")
(SOUTH TO VIEW-ROOM)
(FLAGS RLANDBIT ONBIT)
(GLOBAL LAKE)
(PSEUDO "SHORE" SHORE-PSEUDO "BEACH" SHORE-PSEUDO)>
<OBJECT REEDS
(IN FAR-SHORE)
(SYNONYM REEDS)
(ADJECTIVE SICKLY)
(DESC "reeds")
(FLAGS NDESCBIT)>
<ROOM VIEW-ROOM
(IN ROOMS)
(DESC "Scenic Vista")
(LDESC "")
(FLAGS ONBIT RLANDBIT)
(NORTH TO FAR-SHORE)
(ACTION VIEW-ROOM-F)>
<OBJECT VIEWING-TABLE
(IN VIEW-ROOM)
(DESC "viewing table")
(SYNONYM TABLE SURFACE)
(ADJECTIVE VIEWING)
(FLAGS NDESCBIT)
(ACTION VIEWING-TABLE-F)>
<OBJECT TORCH
(IN VIEW-ROOM)
(DESC "torch")
(FDESC
"Mounted on one wall is a flaming torch, which fills the room with a flickering
light.")
(SYNONYM TORCH)
(FLAGS LIGHTBIT TAKEBIT ONBIT FLAMEBIT)
(ACTION TORCH-F)>
<OBJECT FRIED-TORCH
(DESC "burned-out torch")
(SYNONYM TORCH)
(ADJECTIVE BURNED DEAD)
(FLAGS TAKEBIT)
(ACTION FRIED-TORCH-F)>
<OBJECT CLIFF-OBJECT
(IN LOCAL-GLOBALS)
(DESC "cliff")
(SYNONYM CLIFF)
(ACTION CLIFF-OBJECT-F)>
<OBJECT STONE-WALL
(IN LOCAL-GLOBALS)
(DESC "stone wall")
(SYNONYM WALL)
(ADJECTIVE STONE MASSIVE)
(FLAGS NDESCBIT)>
<OBJECT LAKE
(IN LOCAL-GLOBALS)
(DESC "lake")
(SYNONYM LAKE WATER SURFACE)
(ACTION LAKE-F)>
<OBJECT AMULET
(DESC "golden amulet")
(SYNONYM AMULET OBJECT)
(ADJECTIVE GOLD GOLDEN SHINY)
(FLAGS TAKEBIT WEARBIT NDESCBIT)>
<OBJECT SAND
(IN IN-LAKE)
(DESC "sand")
(SYNONYM SAND FLOOR BOTTOM)
(FLAGS NDESCBIT)
(ACTION SAND-F)>
<OBJECT FRIED-LAMP
(DESC "lamp")
(SYNONYM LAMP LANTERN)
(ADJECTIVE BRASS)
(FLAGS TAKEBIT)
(SIZE 10)
(ACTION FRIED-LAMP-F)>
<OBJECT ALGAE
(IN IN-LAKE)
(DESC "plants and algae")
(SYNONYM PLANT PLANTS ALGAE)
(FLAGS NDESCBIT)
(ACTION ALGAE-F)>
<OBJECT SHINY-OBJECT
(IN IN-LAKE)
(DESC "shiny object")
(SYNONYM OBJECT AMULET)
(ADJECTIVE SHINY)
(FLAGS TRYTAKEBIT NDESCBIT)
(ACTION SHINY-OBJECT-F)>
<OBJECT LEDGE
(IN LOCAL-GLOBALS)
(DESC "ledge")
(SYNONYM LEDGE)
(ADJECTIVE WIDE)
(FLAGS NDESCBIT)
(ACTION LEDGE-F)>
<ROUTINE LEDGE-F ()
<COND (<AND <==? ,HERE ,CLIFF-LEDGE>
<VERB? THROW-OFF>
<==? ,PRSI ,LEDGE>>
<COND (<NOT <IN? ,PRSO ,WINNER>>
<TELL "You're not holding that!" CR>
<RTRUE>)>
<MOVE ,PRSO ,CLIFF-BASE>
<TELL
"The " D ,PRSO " falls to the base of the cliff below." CR>)>>
<OBJECT WAYBREAD
(IN CLIFF)
(DESC "piece of waybread")
(LDESC "A piece of bread is on the ground here.")
(FDESC
"It seems as if somebody has been here recently, as there is some fresh
bread lying beneath one of the other trees.")
(SYNONYM BREAD WAYBREAD PIECE)
(ADJECTIVE WAY FRESH)
(FLAGS TAKEBIT FOODBIT)
(SIZE 3)
(ACTION WAYBREAD-F)>
<ROUTINE WAYBREAD-F ()
<COND (<AND <VERB? CUT> <==? ,PRSI ,SWORD>>
<TELL
"The bread is crushed rather than cut by your sword, and the crumbs scatter to
the wind." CR>
<REMOVE ,WAYBREAD>)>>
<OBJECT ROPE
(IN CLIFF)
(DESC "rope")
(SYNONYM ROPE)
(ADJECTIVE LONG)
(FLAGS NDESCBIT TRYTAKEBIT)
(ACTION ROPE-F)>
<OBJECT GLOBAL-ROPE
(IN LOCAL-GLOBALS)
(DESC "rope")
(SYNONYM ROPE)
(ADJECTIVE DANGLING)
(ACTION GLOBAL-ROPE-F)>
<OBJECT TREE
(IN CLIFF)
(DESC "tree")
(SYNONYM TREE TREES)
(ADJECTIVE LARGE TALL)
(FLAGS NDESCBIT)
(ACTION TREE-F)>
<OBJECT STAFF
(DESC "wooden staff")
(SYNONYM STAFF)
(ADJECTIVE WOODEN)
(FLAGS TAKEBIT)
(SIZE 10)
(ACTION STAFF-F)>
<OBJECT BROKEN-STAFF
(DESC "broken staff")
(SYNONYM STAFF)
(ADJECTIVE BROKEN)
(FLAGS TAKEBIT)
(SIZE 10)
(ACTION STAFF-F)>
<ROUTINE STAFF-F ()
<COND (<AND <VERB? BURN> <==? ,PRSI ,TORCH>>
<REMOVE ,PRSO>
<JIGS-UP
"The staff is instantly consumed in a ball of flame. You along with it.">)>>
<OBJECT CHEST
(IN CLIFF-LEDGE)
(DESC "chest")
(FDESC
"A large chest, closed and locked, is lying among the boulders.")
(SYNONYM CHEST)
(ADJECTIVE LOCKED)
(FLAGS TAKEBIT CONTBIT)
(SIZE 40)
(CAPACITY 20)
(ACTION CHEST-F)>
<OBJECT GLOBAL-MAN
(IN LOCAL-GLOBALS)
(DESC "man")
(SYNONYM MAN FRIEND)
(FLAGS ACTORBIT)
(ACTION GLOBAL-MAN-F)>
<OBJECT VALUABLES
(IN MAN)
(DESC "pile of assorted valuables")
(SYNONYM VALUABLES TREASURE PILE)
(ADJECTIVE ASSORTED)
(FLAGS NDESCBIT TAKEBIT)
(ACTION VALUABLES-F)>
<OBJECT MAN
(SYNONYM MAN FRIEND)
(DESC "man")
(FLAGS ACTORBIT OPENBIT CONTBIT)
(ACTION MAN-F)>
<GLOBAL CHEST-LIFTED <>>
<ROUTINE I-MAN-APPEARS ()
<COND (<OR <NOT <==? ,HERE ,CLIFF-LEDGE>>
<NOT <EQUAL? <LOC ,CHEST> ,CLIFF-LEDGE ,WINNER>>>
<RFALSE>)
(,CHEST-TIED
<SETG MAN-SEEN T>
<TELL
"All at once, the chest is lifted from you. Looking up, you see a
man at the top of the cliff, pulling intently at the rope. \"That is
uncommonly good of you, I do say!\" He chuckles unpleasantly. \"Oh,
you are stuck, aren't you. Well, I'll be right back to get you!\"
He leaves your sight." CR>
<SETG CHEST-LIFTED T>
<MOVE ,CHEST ,MAN>
<FSET ,CHEST ,TOUCHBIT>
<SETG ROPE-FLAG <>>
<SETG CHEST-TIED <>>
<ENABLE <QUEUE I-MAN-RETURNS 10>>
<RTRUE>)
(T
<TELL
"At the edge of the cliff above you, a man appears. He looks down at
you and speaks. \"Hello, down there! You seem to have a problem. Maybe I
can help you.\" He chuckles in an unsettling sort of way. \"Perhaps if you
tied that chest to the end of the rope I might be able to drag it up for you.
Then, I'll be more than happy to help you up!\" He laughs again." CR>
<SETG MAN-FLAG T>
<SETG MAN-SEEN T>
<ENABLE <QUEUE I-MAN-PRESENT -1>>)>>
<GLOBAL MAN-SEEN <>>
<ROUTINE I-MAN-PRESENT ()
<COND (<OR <NOT <==? ,HERE ,CLIFF-LEDGE>>
<NOT ,MAN-FLAG>
<IN? ,CHEST ,MAN>>
<QUEUE I-MAN-PRESENT 0>
<SETG MAN-FLAG <>>
<RFALSE>)
(<G? <SETG MAN-WAITING <+ ,MAN-WAITING 1>> 10>
<TELL
"The man looks quite displeased. \"All right, then. I guess someone else
can always help me! See you around, sport!\" He disappears." CR>
<QUEUE I-MAN-PRESENT 0>
<SETG MAN-FLAG <>>
<RTRUE>)
(T <TELL <RANDOM-ELEMENT ,MAN-WAITS> CR>)>>
<ROUTINE CLIFF-BASE-F (RARG)
<COND (<AND <==? .RARG ,M-ENTER>
,CHEST-TIED>
<SETG CHEST-TIED <>>
<SETG ROPE-FLAG <>>
<QUEUE I-MAN-APPEARS 0>)>>
<GLOBAL MAN-WAITS <LTABLE
"The man appears to be getting somewhat impatient."
"Your friend at the cliff top has started pacing nervously around."
"\"Yoo hoo!\" calls the man at the brink of the cliff. \"Remember me?\""
"The man on the cliff waves at you. \"It would just take a moment to tie that
rope to the chest. I'd be much obliged, and there might even be something in
it for you!\""
"A few small stones fall near your feet. You look up and see your friend
waving. \"I haven't got all day, fella. Be a pal and pass up the chest!\""
"The man on the cliff clears his throat loudly. \"I don't mean to be rushing
you, but I do have some pressing engagements....\"">>
<GLOBAL MAN-WAITING 0>
<GLOBAL MAN-FLAG <>>
<GLOBAL MAN-POINT <>>
<GLOBAL MAN-GONE <>>
<ROUTINE CLIFF-LEDGE-F (RARG)
<COND (<AND <==? .RARG ,M-BEG>
<VERB? WALK>
<IN? ,CHEST ,WINNER>
,CHEST-TIED>
<TELL
"You can't go anywhere holding that chest. The rope is tied around it!" CR>)
(<AND <==? .RARG ,M-ENTER>
<NOT ,MAN-SEEN>
<NOT ,MAN-FLAG>
<NOT ,MAN-GONE>>
<COND (<NOT ,MAN-POINT>
<SETG SCORE <+ ,SCORE 1>>
<SETG MAN-POINT T>)>
<ENABLE <QUEUE I-MAN-APPEARS 5>>)
(<==? .RARG ,M-LOOK>
<TELL
"This is a rock-strewn ledge near the base of a tall cliff. The bottom of the
cliff is another fifteen feet below. You have little hope of climbing up the
cliff face, but you might be able to scramble down from here (though it's
doubtful you could return)." CR>
<COND (,ROPE-FLAG
<TELL
"A long piece of rope is dangling down from the top of the cliff and
is within your reach." CR>)>
<RTRUE>)>>
<ROUTINE CLIFF-F (RARG)
<COND (<AND <==? .RARG ,M-ENTER> <IN? ,CHEST ,MAN>>
<QUEUE I-MAN-RETURNS 0>
<MOVE ,CHEST ,HERE>
<FSET ,CHEST ,OPENBIT>
<SETG ROPE-FLAG T>
<SETG CHEST-TIED <>>
<SETG CHEST-OPENED T>
<RFALSE>)
(<==? .RARG ,M-LOOK>
<TELL
"This is a remarkable spot in the dungeon. Perhaps two hundred feet above
you is a gaping hole in the earth's surface through which pours bright
sunshine! A few seedlings from the world above, nurtured by the sunlight