-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathraven.zil
1506 lines (1446 loc) · 31.9 KB
/
raven.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
;"***************************************************************************"
; "game : Arthur"
; "file : RAVEN.ZIL"
; "auth : $Author: RAB $"
; "date : $Date: 15 May 1989 18:50:48 $"
; "revs : $Revision: 1.80 $"
; "vers : 1.0"
;"---------------------------------------------------------------------------"
; "Giant Raven Puzzle"
; "Copyright (C) 1989 Infocom, Inc. All rights reserved."
;"***************************************************************************"
<CONSTANT K-CLIMB-UP 1>
<CONSTANT K-CLIMB-DN 0>
<CONSTANT K-RAVEN-TREE-MAX 6>
<CONSTANT K-RAVEN-TREE-HALF </ ,K-RAVEN-TREE-MAX 2>>
<GLOBAL GL-RAV-P-CNT 0 <> BYTE>
;"***************************************************************************"
; "SUPPORT ROUTINES - NEEDED BUT WITH SILLY PARTS"
;"***************************************************************************"
;"---------------------------------------------------------------------------"
; "RT-RAV-CANT-CLIMB-UP"
;"---------------------------------------------------------------------------"
<ROUTINE RT-RAV-CANT-CLIMB-UP ()
<COND
(<MC-FORM? ,K-FORM-ARTHUR>
<TELL
"You can't climb the tree. There are no branches near the ground." CR
>
)
(<MC-FORM? ,K-FORM-BADGER>
<TELL "Your claws were designed for digging, not climbing." CR>
)
(<MC-FORM? ,K-FORM-TURTLE>
<TELL "Turtles can't climb trees." CR>
)
>
>
;"***************************************************************************"
; "SUPPORT ROUTINES - SERIOUS"
;"***************************************************************************"
;"---------------------------------------------------------------------------"
; "RT-RAV-CLIMBING"
;"---------------------------------------------------------------------------"
<ROUTINE RT-RAV-CLIMBING (UD-FLAG)
<TELL "You continue to climb ">
<COND
(<EQUAL? .UD-FLAG ,K-CLIMB-UP>
<TELL "up">
)
(T
<TELL "down">
)
>
<TELL " the tree. It looks like a long way ">
<COND
(<EQUAL? .UD-FLAG ,K-CLIMB-UP>
<COND
(<L=? ,GL-RAV-P-CNT ,K-RAVEN-TREE-HALF>
<TELL "up">
)
(T
<TELL "back down">
)
>
)
(T
<COND
(<L=? ,GL-RAV-P-CNT ,K-RAVEN-TREE-HALF>
<TELL "back up">
)
(T
<TELL "down">
)
>
)
>
<TELL "." CR>
>
;"---------------------------------------------------------------------------"
; "RT-FALL-OFF-TREE"
;"---------------------------------------------------------------------------"
<ROUTINE RT-FALL-OFF-TREE ()
<TELL
"|You lose your grip on" the ,RM-RAVEN-TREE " and fall to the ground. "
>
<COND
(<L? ,GL-RAV-P-CNT 4>
<MOVE ,CH-PLAYER ,RM-GROVE>
<TELL "You are a bit bruised and battered but otherwise alright." CR>
)
(T
<TELL "Too bad you were so far up. The fall was fatal.|">
<RT-END-OF-GAME>
)
>
>
;"***************************************************************************"
; "OBJECTS & OBJECT ACTIONS"
;"***************************************************************************"
;"---------------------------------------------------------------------------"
; "TH-RAVEN-EGG"
;"---------------------------------------------------------------------------"
<OBJECT TH-RAVEN-EGG
(LOC RM-RAVEN-NEST)
(DESC "gold egg")
(FLAGS FL-TAKEABLE)
(SYNONYM EGG)
(ADJECTIVE GIANT GOLD GOLDEN RAVEN)
(OWNER CH-RAVEN)
(SCORE 0)
(SIZE 15)
(GENERIC RT-GN-EGG)
(ACTION RT-TH-RAVEN-EGG)
>
; "TH-RAVEN-EGG flags:"
; " FL-BROKEN - Player has received points for taking egg from grove"
<ROUTINE RT-TH-RAVEN-EGG ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(<VERB? EXAMINE>
<FSET ,TH-RAVEN-EGG ,FL-SEEN>
<TELL "It is a huge hunk of gold in the shape of a perfect egg." CR>
)
(<VERB? SIT>
<TELL
"You squat down on top of the egg, clucking to yourself occasionally and
dutifully trying to fool the egg into thinking that you are a medieval hen.
Unfortunately, this has no effect, other than to make you feel ridiculous,
so after a while you get up." CR
>
<SETG GL-QUESTION 1>
<RT-AUTHOR-MSG "Geez! You'll try anything, won't you?">
)
>
>
;"***************************************************************************"
; "CHARACTERS & CHARACTER ACTIONS"
;"***************************************************************************"
;"---------------------------------------------------------------------------"
; "CH-RAVEN"
;"---------------------------------------------------------------------------"
<OBJECT CH-RAVEN
(LOC RM-ABOVE-FOREST)
(DESC "giant raven")
(FLAGS FL-ALIVE FL-NO-DESC FL-OPEN FL-SEARCH)
(SYNONYM RAVEN BIRD)
(ADJECTIVE GIANT BLACK)
(GENERIC RT-GN-BIRD)
(ACTION RT-CH-RAVEN)
(CONTFCN RT-CH-RAVEN)
>
; "CH-RAVEN flags:"
; " FL-BROKEN - Raven has returned one egg to the nest"
; " FL-LOCKED - Raven is retrieving an egg"
<CONSTANT K-RAVEN-SQUAWKS-MSG "The giant raven squawks at you in response.">
<ROUTINE RT-CH-RAVEN ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-WINNER>
<TELL ,K-RAVEN-SQUAWKS-MSG CR>
)
(.CONTEXT
<RFALSE>
)
(,NOW-PRSI
<RFALSE>
)
(<AND <VERB? TELL>
,P-CONT
>
<RFALSE>
)
(<AND <SPEAKING-VERB?>
<IN? ,CH-RAVEN ,HERE>
>
<TELL ,K-RAVEN-SQUAWKS-MSG CR>
)
(<VERB? EXAMINE>
<FSET ,CH-RAVEN ,FL-SEEN>
<COND
(<IN? ,CH-RAVEN ,HERE>
<TELL
The ,CH-RAVEN " is a huge bird with a wingspan of around twenty feet. It has
a long, sharp beak and "
>
<COND
; "Assumes the raven only carries one thing at a time."
(<FIRST? ,CH-RAVEN>
<TELL "is holding" the <FIRST? ,CH-RAVEN> " in its ">
)
>
<TELL "huge talons." CR>
)
(<IN? ,CH-RAVEN ,RM-GROVE>
<TELL
The ,CH-RAVEN " is below you in" the ,RM-GROVE "." CR
>
)
(<IN? ,CH-RAVEN ,RM-RAVEN-NEST>
<TELL
The ,CH-RAVEN " is in" the ,RM-RAVEN-NEST " at the top of" the ,RM-RAVEN-TREE "." CR
>
)
(<IN? ,CH-RAVEN ,RM-ABOVE-FOREST>
<COND
; "Assumes the raven only carries one thing at a time."
(<FIRST? ,CH-RAVEN>
<TELL
The ,CH-RAVEN " is struggling to bring" the <FIRST? ,CH-RAVEN> " up to its nest." CR
>
)
(T
<TELL
The ,CH-RAVEN " is circling far above you in the sky." CR
>
)
>
)
>
)
(<VERB? ATTACK>
<COND
(<AND <MC-HERE? ,RM-RAVEN-NEST>
<IN? ,CH-RAVEN ,RM-RAVEN-NEST>
>
<TELL
The+verb ,WINNER "flail" " wildly at the raven, but" his ,WINNER " blows have
no effect." CR
>
)
(T
<TELL The ,CH-RAVEN " isn't close enough." CR>
)
>
)
>
>
<GLOBAL GL-RAVEN-OBJ:OBJECT <>>
<CONSTANT K-RAVEN-APPROACH-MSG "You hear the beat of approaching wings.">
<ROUTINE RT-I-RAV-GROVE-1 ()
<COND
(<OR <NOT ,GL-RAVEN-OBJ>
<NOT <IN? ,GL-RAVEN-OBJ ,RM-GROVE>>
>
<RFALSE>
)
>
<FSET ,CH-RAVEN ,FL-LOCKED> ; "Raven on an egg mission."
<RT-QUEUE ,RT-I-RAV-GROVE-2 <+ ,GL-MOVES 1>>
<COND
(<FSET? ,CH-PLAYER ,FL-ASLEEP>
<RFALSE>
)
(<MC-HERE? ,RM-GROVE>
<TELL CR ,K-RAVEN-APPROACH-MSG CR>
)
(<MC-HERE? ,RM-ABOVE-FOREST ,RM-RAVEN-TREE>
<TELL
"|The glint catches the giant raven's eye and it swoops down towards"
the ,RM-GROVE "." CR
>
<COND
(<MC-HERE? ,RM-ABOVE-FOREST>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
>
)
>
<RTRUE>
)
(<MC-HERE? ,RM-RAVEN-NEST>
<TELL
"|You see" the ,CH-RAVEN " swoop down towards" the ,RM-GROVE "." CR
>
)
>
>
<CONSTANT K-RAVEN-SWOOP-MSG
"Suddenly a giant raven swoops down from the sky. ">
<ROUTINE RT-I-RAV-GROVE-2 ()
<COND
(<OR <NOT ,GL-RAVEN-OBJ>
<NOT <IN? ,GL-RAVEN-OBJ ,RM-GROVE>>
>
<FCLEAR ,CH-RAVEN ,FL-LOCKED>
<COND
(<FSET? ,CH-PLAYER ,FL-ASLEEP>
<RFALSE>
)
(<MC-HERE? ,RM-GROVE>
<TELL
CR ,K-RAVEN-SWOOP-MSG "It gets a very puzzled look on its face, and then
it flies back up out of sight." CR
>
)
>
)
(T
<RT-QUEUE ,RT-I-RAV-NEST-1 <+ ,GL-MOVES 2>>
<MOVE ,GL-RAVEN-OBJ ,CH-RAVEN>
<COND
(<FSET? ,CH-PLAYER ,FL-ASLEEP>
<RFALSE>
)
(<MC-HERE? ,RM-GROVE>
<TELL
CR ,K-RAVEN-SWOOP-MSG "It clutches" the ,GL-RAVEN-OBJ " in its talons and,
struggling from the weight, flies up out of sight." CR
>
)
(<MC-HERE? ,RM-ABOVE-FOREST ,RM-RAVEN-TREE>
<TELL
CR The ,CH-RAVEN " takes" the ,GL-RAVEN-OBJ " and begins struggling upward." CR
>
<COND
(<MC-HERE? ,RM-ABOVE-FOREST>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
>
)
>
<RTRUE>
)
>
)
>
>
<ROUTINE RT-I-RAV-NEST-1 ()
<RT-QUEUE ,RT-I-RAV-NEST-2 <+ ,GL-MOVES 1>>
<COND
(<FSET? ,CH-PLAYER ,FL-ASLEEP>
<RFALSE>
)
(<MC-HERE? ,RM-RAVEN-NEST>
<TELL CR ,K-RAVEN-APPROACH-MSG CR>
)
(<MC-HERE? ,RM-ABOVE-FOREST ,RM-RAVEN-TREE>
<TELL "|The raven approaches its nest." CR>
)
>
>
<ROUTINE RT-I-RAV-NEST-2 ("AUX" (1ST? <>) RM)
<COND
(<MC-HERE? ,RM-RAVEN-NEST>
<TELL CR The ,CH-RAVEN>
<COND
(<NOT <IN? ,CH-RAVEN ,RM-RAVEN-NEST>>
<COND
(<NOT <FSET? ,CH-PLAYER ,FL-ASLEEP>>
<SET 1ST? T>
)
>
<MOVE ,CH-RAVEN ,RM-RAVEN-NEST>
<FCLEAR ,CH-RAVEN ,FL-LOCKED>
<TELL " arrives in the nest">
<COND
(,GL-RAVEN-OBJ
<MOVE ,GL-RAVEN-OBJ ,RM-RAVEN-NEST>
<TELL ", drops" the ,GL-RAVEN-OBJ ",">
<COND
(<AND <EQUAL? ,GL-RAVEN-OBJ ,TH-RAVEN-EGG>
<GETP ,TH-RAVEN-EGG ,P?SCORE>
>
<FCLEAR ,TH-RAVEN-EGG ,FL-BROKEN>
<PUTP ,TH-RAVEN-EGG ,P?SCORE 0>
)
>
<SETG GL-RAVEN-OBJ <>>
)
>
<TELL " and ">
)
>
<COND
(<OR <MC-FORM? ,K-FORM-ARTHUR>
<FSET? ,CH-PLAYER ,FL-ASLEEP>
>
<COND
(.1ST?
<RT-QUEUE ,RT-I-RAV-NEST-2 <+ ,GL-MOVES 1>>
<TELL
" starts buffeting you with it's huge wings. The deafening squawks emerging
from it's sharp beak quickly convince you that it is unhappy at your presence.
The raven unsheathes its talons and fixes you with a glassy-eyed stare." CR
>
)
(T
<TELL
"'s razor-like talons dig into your flesh and kill you instantly.|"
>
<RT-END-OF-GAME>
)
>
)
(<MC-FORM? ,K-FORM-OWL ,K-FORM-SALAMANDER>
<RT-QUEUE ,RT-I-RAV-NEST-3 <+ ,GL-MOVES 2>>
<TELL " chases you out.||">
<COND
(<MC-FORM? ,K-FORM-OWL>
<RT-GOTO ,RM-ABOVE-FOREST T>
)
(T
<COND
(<SET RM <RT-CLIMB-DOWN>>
<RT-GOTO .RM T>
)
>
)
>
)
(<MC-FORM? ,K-FORM-TURTLE>
<TELL
" picks you up. He carries you off and drops you from a great height onto
a hard rock.|"
>
<RT-END-OF-GAME>
)
(<MC-FORM? ,K-FORM-BADGER>
<TELL " kills you.|">
<RT-END-OF-GAME>
)
>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
>
<RTRUE>
)
(T
<RT-QUEUE ,RT-I-RAV-NEST-3 <+ ,GL-MOVES 2>>
<MOVE ,CH-RAVEN ,RM-RAVEN-NEST>
<FCLEAR ,CH-RAVEN ,FL-LOCKED>
<COND
(,GL-RAVEN-OBJ
<MOVE ,GL-RAVEN-OBJ ,RM-RAVEN-NEST>
<COND
(<AND <EQUAL? ,GL-RAVEN-OBJ ,TH-RAVEN-EGG>
<GETP ,TH-RAVEN-EGG ,P?SCORE>
>
<FCLEAR ,TH-RAVEN-EGG ,FL-BROKEN>
<PUTP ,TH-RAVEN-EGG ,P?SCORE 0>
)
>
<SETG GL-RAVEN-OBJ <>>
)
>
<COND
(<FSET? ,CH-PLAYER ,FL-ASLEEP>
<RFALSE>
)
(<MC-HERE? ,RM-ABOVE-FOREST ,RM-RAVEN-TREE>
<TELL CR The ,CH-RAVEN " lands in the nest." CR>
<COND
(<MC-HERE? ,RM-ABOVE-FOREST>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
>
)
>
<RTRUE>
)
>
)
>
>
<ROUTINE RT-I-RAV-NEST-3 ("AUX" (EGG? <>))
<FSET ,CH-RAVEN ,FL-BROKEN>
<MOVE ,CH-RAVEN ,RM-ABOVE-FOREST>
<COND
(<AND <IN? ,TH-BRASS-EGG ,RM-RAVEN-NEST>
<IN? ,TH-RAVEN-EGG ,RM-RAVEN-NEST>
>
<SET EGG? T>
<MOVE ,TH-BRASS-EGG ,RM-GROVE>
<RT-RAVEN-WAIT-FOR ,TH-BRASS-EGG>
)
(<IN? ,TH-RAVEN-EGG ,RM-GROVE>
<RT-RAVEN-WAIT-FOR ,TH-RAVEN-EGG>
)
(<IN? ,TH-BRASS-EGG ,RM-GROVE>
<RT-RAVEN-WAIT-FOR ,TH-BRASS-EGG>
)
>
<COND
(<MC-HERE? ,RM-ABOVE-FOREST ,RM-RAVEN-TREE ,RM-GROVE>
<CRLF>
<COND
(.EGG?
<COND
(<MC-HERE? ,RM-GROVE>
<COND
(<FSET? ,CH-PLAYER ,FL-ASLEEP>
<TELL
"Suddenly, you are awakened by the sound of something crashing through the
leaves above. Your eyes fly open in a panic, and the last thing you ever
see is a large brass egg approaching your head at terminal velocity.
Seconds later, you, too, become terminal." CR
>
<RT-END-OF-GAME>
)
(T
<TELL
"Suddenly from above, you hear the sound of something heavy crashing through
leaves and branches. You glance up and then jump aside just in time to avoid
being killed by" the ,TH-BRASS-EGG ", which hits" the ,TH-GROUND " with a
loud \"WHUMP!\"||"
>
)
>
)
(T
<TELL
The ,CH-RAVEN " pushes" the ,TH-BRASS-EGG " out of the nest. It lands in"
the ,RM-GROVE ". "
>
)
>
)
>
<TELL
The ,CH-RAVEN " leaves the nest and resumes circling the forest.|"
>
<COND
(<MC-HERE? ,RM-ABOVE-FOREST>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
>
)
>
<RTRUE>
)
>
>
<ROUTINE RT-RAVEN-WAIT-FOR (OBJ "AUX" N)
<SETG GL-RAVEN-OBJ .OBJ>
<COND
(<FSET? ,CH-RAVEN ,FL-BROKEN>
<SET N 6>
)
(T
<SET N 2>
)
>
<RT-QUEUE ,RT-I-RAV-GROVE-1 <+ ,GL-MOVES .N>>
>
;"***************************************************************************"
; "ROOMS & ROOM ACTIONS"
;"***************************************************************************"
;"---------------------------------------------------------------------------"
; "RM-ABOVE-FOREST"
;"---------------------------------------------------------------------------"
<ROOM RM-ABOVE-FOREST
(LOC ROOMS)
(DESC "above forest")
(FLAGS FL-AIR FL-LIGHTED)
(DOWN PER RT-FLY-DOWN)
(SOUTH TO RM-ABOVE-EDGE-OF-WOODS)
(SW TO RM-ABOVE-MERCAVE)
(SE TO RM-ABOVE-MOOR)
(IN TO RM-RAVEN-NEST)
(UP SORRY K-NO-HIGHER-MSG)
(ADJACENT <TABLE (LENGTH BYTE PURE) RM-RAVEN-NEST T>)
(GLOBAL LG-FOREST LG-TOWER CH-RAVEN RM-RAVEN-NEST RM-RAVEN-TREE RM-GROVE)
(ACTION RT-RM-ABOVE-FOREST)
>
<CONSTANT K-FLY-HIGH-MSG "You are flying high above the forest.">
<ROUTINE RT-RM-ABOVE-FOREST ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<FSET ,RM-RAVEN-NEST ,FL-SEEN>
<FSET ,RM-RAVEN-TREE ,FL-SEEN>
<TELL ,K-FLY-HIGH-MSG " ">
<COND
(<EQUAL? ,OHERE ,RM-TOW-CLEARING>
<TELL "Y">
)
(T
<TELL "In the distance, y">
)
>
<TELL "ou see an ivory tower rising above the trees">
<COND
(<EQUAL? ,OHERE ,RM-TOW-CLEARING>
<TELL " nearby. In the distance,">
)
(T
<TELL ". Nearby, you see">
)
>
<TELL
" one tall tree sticks up above the rest. In its uppermost branches is a huge
nest"
>
<COND
(<OR <IN? ,CH-RAVEN ,RM-RAVEN-NEST>
<IN? ,TH-RAVEN-EGG ,RM-RAVEN-NEST>
>
<TELL ", and sitting in the nest is">
<COND
(<IN? ,CH-RAVEN ,RM-RAVEN-NEST>
<TELL the ,CH-RAVEN>
<COND
(<IN? ,TH-RAVEN-EGG ,RM-RAVEN-NEST>
<FSET ,TH-RAVEN-EGG ,FL-SEEN>
<TELL " and its solid gold egg">
)
>
)
(T
<FSET ,TH-RAVEN-EGG ,FL-SEEN>
<TELL " a solid gold giant raven's egg">
)
>
)
>
<TELL ".">
<COND
(<IN? ,CH-RAVEN ,RM-ABOVE-FOREST>
<FSET ,CH-RAVEN ,FL-SEEN>
<TELL " Looking around, you see the giant raven ">
<COND
(<AND ,GL-RAVEN-OBJ
<IN? ,GL-RAVEN-OBJ ,CH-RAVEN>
>
<TELL "struggling to bring" a ,GL-RAVEN-OBJ " up to its nest.">
)
(<FSET? ,CH-RAVEN ,FL-LOCKED>
<TELL "swooping down towards the grove.">
)
(T
<TELL "circling nearby.">
)
>
)
>
<FSET ,RM-GROVE ,FL-SEEN>
<TELL " Far below you, you see a grove." CR>
)
; (<MC-CONTEXT? ,M-V-LOOK ,M-LOOK>
<COND
(<MC-CONTEXT? ,M-LOOK>
<TELL "You are hovering over the forest.">
)
(T
<TELL ,K-FLY-HIGH-MSG>
)
>
<FSET ,RM-RAVEN-NEST ,FL-SEEN>
<FSET ,RM-RAVEN-TREE ,FL-SEEN>
<TELL
" You see a large raven's nest in the top of a nearby tree." CR
>
)
(<MC-CONTEXT? ,M-ENTER>
<SETG GL-PICTURE-NUM ,K-PIC-AIR-SCENE>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(.CONTEXT
<RFALSE>
)
>
>
;"---------------------------------------------------------------------------"
; "RM-RAV-PATH"
;"---------------------------------------------------------------------------"
<ROOM RM-RAV-PATH
(LOC ROOMS)
(DESC "trail")
(FLAGS FL-LIGHTED)
(SYNONYM PATH TRAIL)
(ADJECTIVE FOREST)
(NE TO RM-GROVE)
(SW TO RM-ENCHANTED-FOREST)
(UP PER RT-FLY-UP)
(GLOBAL LG-ENCHANTED-TREES LG-FOREST LG-PATH RM-GROVE)
(ACTION RT-RM-RAV-PATH)
>
<ROUTINE RT-RM-RAV-PATH ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<COND
(<MC-CONTEXT? ,M-LOOK>
<TELL
"You are" standing " on a narrow trail, deep within the enchanted forest."
>
)
(T
<COND
(<EQUAL? ,OHERE ,RM-ENCHANTED-FOREST>
<TELL
"The path soon peters out into little more than a trail that continues to
run to the northeast."
>
)
(T
<TELL
"The trail looks like it broadens into a path up ahead."
>
)
>
)
>
<CRLF>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTER>
<SETG GL-PICTURE-NUM ,K-PIC-FOREST-PATH>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(.CONTEXT
<RFALSE>
)
>
>
;"---------------------------------------------------------------------------"
; "RM-GROVE"
;"---------------------------------------------------------------------------"
<ROOM RM-GROVE
(LOC ROOMS)
(DESC "grove")
(FLAGS FL-LIGHTED)
(SYNONYM GROVE)
(ADJECTIVE FOREST)
(SW TO RM-RAV-PATH)
(UP PER RT-UP-RAV-GROVE)
(GLOBAL LG-ENCHANTED-TREES LG-FOREST LG-PATH RM-RAVEN-TREE RM-RAVEN-NEST)
(ACTION RT-RM-GROVE)
>
<ROUTINE RT-RM-GROVE ("OPT" (CONTEXT <>) "AUX" (RM <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<COND
(<MC-CONTEXT? ,M-LOOK>
<TELL
"You are in a grove of tall trees, deep within the enchanted forest."
>
)
(T
<COND
(<EQUAL? ,OHERE ,RM-RAV-PATH>
<TELL "The trail ends in a grove of tall trees.">
)
(T
<TELL "You descend to the forest floor below.|">
<RFALSE>
)
>
)
>
<FSET ,RM-RAVEN-TREE ,FL-SEEN>
<TELL
" One tree in particular seems taller than the rest. A path to the southwest
leads back into the forest.|"
>
<RFALSE>
)
(<MC-CONTEXT? ,M-BEG>
<COND
(<AND <VERB? LOOK-UP>
<MC-PRSO? ,ROOMS ,RM-RAVEN-TREE>
>
<FSET ,RM-RAVEN-NEST ,FL-SEEN>
<TELL "At the very top of the tree you can see a large nest." CR>
)
>
)
(<MC-CONTEXT? ,M-END>
<COND
(,GL-RAVEN-OBJ
<COND
(<IN? ,GL-RAVEN-OBJ ,CH-RAVEN>
<RFALSE>
)
(<NOT <IN? ,GL-RAVEN-OBJ ,RM-GROVE>>
<SETG GL-RAVEN-OBJ <>>
<RT-DEQUEUE ,RT-I-RAV-GROVE-1>
)
>
)
(<IN? ,TH-RAVEN-EGG ,RM-GROVE>
<RT-RAVEN-WAIT-FOR ,TH-RAVEN-EGG>
)
(<IN? ,TH-BRASS-EGG ,RM-GROVE>
<RT-RAVEN-WAIT-FOR ,TH-BRASS-EGG>
)
>
)
(<MC-CONTEXT? ,M-ENTER>
<SETG GL-PICTURE-NUM ,K-PIC-GROVE>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(.CONTEXT
<RFALSE>
)
(<VERB? WALK-TO ENTER LAND-ON>
<COND
(<MC-HERE? ,RM-RAVEN-NEST>
<COND
(<MC-FORM? ,K-FORM-OWL>
<RT-GOTO ,RM-GROVE>
)
(<MC-FORM? ,K-FORM-SALAMANDER>
<COND
(<SET RM <RT-CLIMB-DOWN>>
<RT-GOTO .RM>
)
>
<RTRUE>
)
(T
<TELL ,K-DEADLY-FALL-MSG CR>
)
>
)
(<MC-HERE? ,RM-ABOVE-FOREST>
<RT-GOTO ,RM-GROVE>
)
>
)
>
>
<ROUTINE RT-UP-RAV-GROVE ("OPT" (QUIET <>))
<COND
(.QUIET
<COND
(<OR <MC-FORM? ,K-FORM-OWL ,K-FORM-SALAMANDER>
<FSET? ,RM-RAVEN-TREE ,FL-TOUCHED>
>
<RETURN ,RM-RAVEN-TREE>
)
>
)
(<MC-FORM? ,K-FORM-OWL>
<RT-FLY-UP>
)
(<MC-FORM? ,K-FORM-SALAMANDER>
<RT-CLIMB-UP>
)
(T
<RT-RAV-CANT-CLIMB-UP>
<RFALSE>
)
>
>
;"---------------------------------------------------------------------------"
; "RM-RAVEN-TREE"
;"---------------------------------------------------------------------------"
<ROOM RM-RAVEN-TREE
(LOC ROOMS)
(DESC "huge tree")
(FLAGS FL-LIGHTED)
(SYNONYM TREE BRANCH BRANCHES)
(ADJECTIVE HUGE BIG TALL TALLER TALLEST RAVEN GIANT)
(OWNER CH-RAVEN)
(UP PER RT-CLIMB-UP)
(DOWN PER RT-CLIMB-DOWN)
(GLOBAL LG-FOREST RM-GROVE RM-RAVEN-NEST)
(GENERIC RT-GN-TREE)
(ACTION RT-RM-RAVEN-TREE)
>
<CONSTANT K-DEADLY-FALL-MSG "You would fall and kill yourself.">
<ROUTINE RT-RM-RAVEN-TREE ("OPT" (CONTEXT <>) "AUX" RM)
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<TELL "You are">
<COND
(<NOT <MC-CONTEXT? ,M-LOOK>>
<TELL " now">
)
>
<TELL " clinging to the side of" the ,RM-RAVEN-TREE "." CR>
)
(<MC-CONTEXT? ,M-ENTER>
<SETG GL-PICTURE-NUM ,K-PIC-RAVEN-TREE>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(<MC-CONTEXT? ,M-BEG>
<COND
(<AND <VERB? WALK-TO CLIMB-DOWN CLIMB-ON CLIMB-OVER ENTER>
<MC-PRSO? ,TH-GROUND>
>
<COND
(<VERB-WORD? ,W?JUMP ,W?LEAP ,W?DIVE>
<RT-JUMP-OFF-TREE-MSG>
)
(T
<RT-CLIMB-DOWN-TREE-MSG>
)
>
)
(<AND <VERB? WALK-TO CLIMB-UP ENTER>
<MC-PRSO? ,TH-SKY>
>
<RT-CLIMB-UP-TREE-MSG>
)
(<VERB? JUMP>
<RT-JUMP-OFF-TREE-MSG>
)
(<AND <VERB? EXAMINE LOOK-ON>
<MC-PRSO? ,TH-GROUND>
>
<TELL "The ground is ">
<COND
(<G? ,GL-RAV-P-CNT 3>
<TELL "far">
)
(<G? ,GL-RAV-P-CNT 1>
<TELL "a short distance">
)
(T
<TELL "just">
)
>
<TELL " below you." CR>
)
>
)
(<MC-CONTEXT? ,M-END>