forked from historicalsource/arthur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
leprchan.zil
1036 lines (994 loc) · 22.5 KB
/
leprchan.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 : LEPRCHAN.ZIL"
; "auth : $Author: DEB $"
; "date : $Date: 16 May 1989 1:18:10 $"
; "revs : $Revision: 1.96 $"
; "vers : 1.0"
;"---------------------------------------------------------------------------"
; "Leprechaun"
; "Copyright (C) 1989 Infocom, Inc. All rights reserved."
;"***************************************************************************"
<INCLUDE "PDEFS"> ; "Because PARSE-ACTION used in this file."
;"---------------------------------------------------------------------------"
; "RM-GLADE"
;"---------------------------------------------------------------------------"
<ROOM RM-GLADE
(LOC ROOMS)
(DESC "glade")
(FLAGS FL-LIGHTED)
(SYNONYM GLADE CLEARING)
(ADJECTIVE LEAFY FOREST)
(NORTH PER RT-UNDERGROWTH)
(NE PER RT-UNDERGROWTH)
(EAST PER RT-UNDERGROWTH)
(SE PER RT-UNDERGROWTH)
(SOUTH TO RM-CHESTNUT-PATH)
(SW PER RT-UNDERGROWTH)
(WEST PER RT-BEHIND-ROCK)
(NW PER RT-UNDERGROWTH)
(UP PER RT-FLY-UP)
(GLOBAL LG-ENCHANTED-TREES LG-FOREST RM-CHESTNUT-PATH)
(ACTION RT-RM-GLADE)
(THINGS
FOOT (TRACKS FOOTPRINTS PRINTS) RT-PS-TRACKS
<> (BUSH BUSHES UNDERGROWTH) RT-PS-UNDERGROWTH
)
>
<ROUTINE RT-RM-GLADE ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<COND
(<MC-CONTEXT? ,M-LOOK>
<TELL "You are ">
<COND
(<IN? ,CH-PLAYER ,TH-BEHIND-ROCK>
<COND
(<EQUAL? ,GL-HIDING ,TH-ROCK>
<TELL "hiding">
)
(T
<TELL "standing">
)
>
<TELL " behind" the ,TH-ROCK>
)
(T
<TELL "standing">
)
>
)
(T
<TELL "The track ends">
)
>
<TELL
" in a leafy glade that is ringed by dense undergrowth. A well-worn path
of tiny footprints emerges from the bushes on one side of the clearing and
disappears into the undergrowth on the other side"
>
<COND
(<NOT <EQUAL? ,GL-HIDING ,TH-ROCK>>
<FSET ,TH-ROCK ,FL-SEEN>
<TELL
", passing near a large rock that sits at the glade's westernmost edge"
>
)
>
<TELL ". The track leading back into the forest lies to the south.|">
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTER>
<SETG GL-PICTURE-NUM ,K-PIC-GLADE>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTERED>
<COND
(<NOT <FSET? ,CH-LEPRECHAUN ,FL-LOCKED>>
<FCLEAR ,TH-ROCK ,FL-LOCKED>
<RT-QUEUE ,RT-I-LEP-3 <+ ,GL-MOVES 2>>
)
>
)
(<MC-CONTEXT? ,M-EXIT>
<RT-DEQUEUE ,RT-I-LEP-1>
<RT-DEQUEUE ,RT-I-LEP-2>
<RT-DEQUEUE ,RT-I-LEP-3>
<RT-DEQUEUE ,RT-I-LEP-4>
<RFALSE>
)
(.CONTEXT
<RFALSE>
)
>
>
<ROUTINE RT-PS-TRACKS ("OPT" (CONTEXT <>) (ART <>) (CAP? <>))
<FSET ,PSEUDO-OBJECT ,FL-PLURAL>
<FCLEAR ,PSEUDO-OBJECT ,FL-VOWEL>
<COND
(<MC-CONTEXT? ,M-OBJDESC>
<COND
(.ART
<PRINT-ARTICLE ,PSEUDO-OBJECT .ART .CAP?>
)
>
<COND
(<EQUAL? .ART <> ,K-ART-THE ,K-ART-A ,K-ART-ANY>
<COND
(.ART
<TELL " ">
)
>
<TELL "footprints">
)
>
)
(<VERB? EXAMINE>
<THIS-IS-IT ,PSEUDO-OBJECT>
<TELL "They look like footprints from tiny shoes." CR>
)
; (<VERB? FOLLOW>
<THIS-IS-IT ,PSEUDO-OBJECT>
<TELL
"The tracks disappear into the dense undergrowth. You can't follow them." CR
>
)
>
>
<ROUTINE RT-PS-UNDERGROWTH ("OPT" (CONTEXT <>) (ART <>) (CAP? <>))
<FCLEAR ,PSEUDO-OBJECT ,FL-PLURAL>
<FSET ,PSEUDO-OBJECT ,FL-VOWEL>
<COND
(<MC-CONTEXT? ,M-OBJDESC>
<COND
(.ART
<PRINT-ARTICLE ,PSEUDO-OBJECT .ART .CAP?>
)
>
<COND
(<EQUAL? .ART <> ,K-ART-THE ,K-ART-A ,K-ART-ANY>
<COND
(.ART
<TELL " ">
)
>
<TELL "undergrowth">
)
>
)
(<VERB? EXAMINE LOOK-IN>
<THIS-IS-IT ,PSEUDO-OBJECT>
<TELL
"You peer into the undergrowth, but it's so dense that you can't see much." CR
>
)
(<VERB? ENTER>
<THIS-IS-IT ,PSEUDO-OBJECT>
<RT-UNDERGROWTH>
<RTRUE>
)
>
>
<ROUTINE RT-UNDERGROWTH ("OPT" (QUIET <>))
<COND
(<NOT .QUIET>
<TELL "The undergrowth is too thick to pass through." CR>
)
>
<RFALSE>
>
;"---------------------------------------------------------------------------"
; "CH-LEPRECHAUN"
;"---------------------------------------------------------------------------"
<OBJECT CH-LEPRECHAUN
(FLAGS FL-ALIVE FL-HAS-SDESC FL-TRY-TAKE FL-OPEN FL-PERSON FL-SEARCH)
(SYNONYM LEPRECHAUN SPRITE MAN PERSON)
(ADJECTIVE LITTLE SMALL)
(ACTION RT-CH-LEPRECHAUN)
>
; "CH-LEPRECHAUN flags:"
; " FL-LOCKED - Leprechaun has gotten spices and stays home."
<CONSTANT K-DISAPPEARS-MSG " disappears into the undergrowth.">
<GLOBAL GL-VOICE?:FLAG <> <> BYTE>
<ROUTINE RT-CH-LEPRECHAUN ("OPT" (CONTEXT <>) (ART <>) (CAP? <>))
<COND
(<MC-CONTEXT? ,M-OBJDESC>
<COND
(.ART
<PRINT-ARTICLE ,CH-LEPRECHAUN .ART .CAP?>
)
>
<COND
(<EQUAL? .ART <> ,K-ART-THE ,K-ART-A ,K-ART-ANY>
<COND
(.ART
<TELL " ">
)
>
<COND
(<MC-PROB? 50>
<TELL "leprechaun">
)
(T
<TELL "small person">
)
>
)
>
)
(<MC-CONTEXT? ,M-WINNER>
<RT-L-STARTLED-MSG>
)
(.CONTEXT
<RFALSE>
)
(<VERB? EXAMINE>
<FSET ,CH-LEPRECHAUN ,FL-SEEN>
<TELL The ,CH-LEPRECHAUN " is dressed all in green." CR>
)
(<VERB? TAKE CLIMB-ON>
<RT-JUMP-L-MSG>
)
>
>
<ROUTINE RT-JUMP-L-MSG ()
<MOVE ,CH-PLAYER ,RM-GLADE>
<SETG GL-HIDING <>>
<TELL "You">
<COND
(<MC-FORM? ,K-FORM-ARTHUR>
<TELL " leap">
)
(T
<TELL walk>
)
>
<TELL " out from behind the stone">
<COND
(<NOT <MC-FORM? ,K-FORM-ARTHUR>>
<RT-DEQUEUE ,RT-I-LEP-4>
<RT-DEQUEUE ,RT-I-LEP-5>
<REMOVE ,CH-LEPRECHAUN>
<RT-QUEUE ,RT-I-LEP-1 <+ ,GL-MOVES 3>>
<TELL ". Startled by your sudden movement," the ,CH-LEPRECHAUN>
<COND
(<IN? ,TH-SPICE-BOTTLE ,CH-LEPRECHAUN>
<MOVE ,TH-SPICE-BOTTLE ,RM-GLADE>
<TELL " drops the bottle and">
)
>
<TELL " dives into the undergrowth saying," ,K-SPRITE-MSG CR>
)
(<IN? ,TH-SPICE-BOTTLE ,CH-LEPRECHAUN>
<RT-DEQUEUE ,RT-I-LEP-4>
<RT-DEQUEUE ,RT-I-LEP-5>
<REMOVE ,CH-LEPRECHAUN>
<FSET ,CH-LEPRECHAUN ,FL-LOCKED>
<TELL
" and grab the leprechaun. He struggles to get free, but you hold on tight and
after a while he gives up. \"Ye caught me fair n' square, laddie,\" he says.
\"Now I'm beholden t'give ye something special. I regret t'tell ye that
the tales of the leprechaun's crock of gold are truly nought but a crock
themselves. But what I can give ye is this jug of home-brewed whisky, which
to any drinkin' man is worth more than gold itself.\" He produces a jug
and gives it to you. As you take it from him, he wriggles free
and" ,K-DISAPPEARS-MSG CR
>
<COND
(<RT-DO-TAKE ,TH-WHISKY-JUG T>
<RT-SCORE-MSG 0 3 0 1>
)
>
)
(T
<TELL " and make a dive for the little man. ">
<RT-L-STARTLED-MSG>
)
>
<SETG GL-PICTURE-NUM ,K-PIC-GLADE>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RTRUE>
>
<CONSTANT K-SPRITE-MSG
" \"Try, try, as hard as ye might. Ye won't catch me, I'm too fast a sprite.\""
>
<ROUTINE RT-L-STARTLED-MSG ()
<REMOVE ,CH-LEPRECHAUN>
<RT-DEQUEUE ,RT-I-LEP-4>
<RT-DEQUEUE ,RT-I-LEP-5>
<RT-QUEUE ,RT-I-LEP-1 <+ ,GL-MOVES 3>>
<COND
(<VERB? TRANSFORM>
<TELL
"The leprechaun catches sight of you before you can crouch down. "
>
)
>
<TELL "Momentarily startled, ">
<COND
(<VERB? TRANSFORM>
<TELL "he">
)
(T
<TELL "the leprechaun">
)
>
<TELL
" quickly recovers his composure and leaps into the bushes at the edge of the
clearing. As he disappears, his tiny voice trails after him in triumph,"
,K-SPRITE-MSG CR
>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RTRUE>
>
<ROUTINE RT-I-LEP-1 ()
<COND
(<FSET? ,CH-PLAYER ,FL-ASLEEP>
<RT-QUEUE ,RT-I-LEP-1 <+ <RT-IS-QUEUED? ,RT-I-SLEEP> 3>>
<RFALSE>
)
(<MC-HERE? ,RM-GLADE>
<RT-QUEUE ,RT-I-LEP-2 <+ ,GL-MOVES 1>>
<SETG GL-VOICE? T>
<COND
(<EQUAL? ,GL-HIDING ,TH-ROCK>
<TELL
"|You hear a strange murmuring coming from beneath" the ,TH-ROCK "." CR
>
)
>
)
>
>
<ROUTINE RT-I-LEP-2 ()
<COND
(<MC-HERE? ,RM-GLADE>
<RT-QUEUE ,RT-I-LEP-3 <+ ,GL-MOVES 2>>
<SETG GL-VOICE? <>>
<RFALSE>
)
>
>
<ROUTINE RT-I-LEP-3 ()
<COND
(<FSET? ,CH-PLAYER ,FL-ASLEEP>
<RT-QUEUE ,RT-I-LEP-1 <+ <RT-IS-QUEUED? ,RT-I-SLEEP> 3>>
<RFALSE>
)
(<MC-HERE? ,RM-GLADE>
<TELL "|You ">
<COND
(<EQUAL? ,GL-HIDING ,TH-ROCK>
<COND
(<FSET? ,TH-HEAD ,FL-LOCKED>
<FCLEAR ,TH-HEAD ,FL-LOCKED>
<TELL
"hear a noise and decide to poke your head out for a look. You "
>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
)
>
<FSET ,CH-LEPRECHAUN ,FL-SEEN>
<TELL
"see a leprechaun dressed all in green emerge from one side of"
the ,RM-GLADE "."
>
<COND
(<IN? ,TH-SPICE-BOTTLE ,RM-GLADE>
<TELL
" In the middle of" the ,RM-GLADE "," the ,CH-LEPRECHAUN " sees"
the ,TH-SPICE-BOTTLE ". He picks it up and says, \"Faith and it's just what
I've been lookin' for. A fine bottle of spices from the east.\" He "
>
<COND
(<IN? ,TH-SPICE ,TH-SPICE-BOTTLE>
<RT-QUEUE ,RT-I-LEP-4 <+ ,GL-MOVES 1>>
<MOVE ,CH-LEPRECHAUN ,RM-GLADE>
<MOVE ,TH-SPICE-BOTTLE ,CH-LEPRECHAUN>
<TELL "examines the label intently." CR>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
)
(T
<RT-QUEUE ,RT-I-LEP-1 <+ ,GL-MOVES 3>>
<REMOVE ,CH-LEPRECHAUN>
<TELL
"peers into the bottle and exclaims, \"Bah! Empty.\" He drops the bottle and
looks around saying, \"Now what silly ass has been littering the forest with
empty bottles?\" He spies you hiding behind the rock, dives into the
undergrowth, and cries out," ,K-SPRITE-MSG CR
>
)
>
)
(T
<CRLF>
<RT-QUEUE ,RT-I-LEP-4 <+ ,GL-MOVES 1>>
<MOVE ,CH-LEPRECHAUN ,RM-GLADE>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
)
>
<RTRUE>
)
(T
<RT-QUEUE ,RT-I-LEP-1 <+ ,GL-MOVES 3>>
<TELL
"hear a rustling in the undergrowth, as if something had approached"
the ,RM-GLADE ", but decided not to cross upon seeing you there." CR
>
)
>
)
>
>
<ROUTINE RT-I-LEP-4 ()
<COND
(<FSET? ,CH-PLAYER ,FL-ASLEEP>
<REMOVE ,CH-LEPRECHAUN>
<COND
(<IN? ,TH-SPICE-BOTTLE ,CH-LEPRECHAUN>
<FSET ,CH-LEPRECHAUN ,FL-LOCKED>
)
(T
<RT-QUEUE ,RT-I-LEP-1 <+ <RT-IS-QUEUED? ,RT-I-SLEEP> 3>>
)
>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
>
<RFALSE>
)
(<MC-HERE? ,RM-GLADE>
<COND
(<IN? ,CH-LEPRECHAUN ,RM-GLADE>
<COND
(<IN? ,TH-SPICE-BOTTLE ,CH-LEPRECHAUN>
<RT-QUEUE ,RT-I-LEP-5 <+ ,GL-MOVES 1>>
<TELL CR The ,CH-LEPRECHAUN " finishes reading the label." CR>
)
(T
<RT-QUEUE ,RT-I-LEP-1 <+ ,GL-MOVES 2>>
<REMOVE ,CH-LEPRECHAUN>
<TELL CR The ,CH-LEPRECHAUN ,K-DISAPPEARS-MSG CR>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RTRUE>
)
>
)
>
)
>
>
<ROUTINE RT-I-LEP-5 ()
<COND
(<AND <MC-HERE? ,RM-GLADE>
<IN? ,CH-LEPRECHAUN ,RM-GLADE>
>
<REMOVE ,CH-LEPRECHAUN>
<FSET ,CH-LEPRECHAUN ,FL-LOCKED>
<TELL CR The ,CH-LEPRECHAUN ,K-DISAPPEARS-MSG CR>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RTRUE>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-ROCK"
;"---------------------------------------------------------------------------"
<OBJECT TH-ROCK
(LOC RM-GLADE)
(DESC "rock")
(FLAGS FL-NO-DESC)
(SYNONYM ROCK STONE MURMUR MURMURING MURMURRING VOICE SOUND)
(ADJECTIVE LARGE)
(ACTION RT-TH-ROCK)
>
; "TH-ROCK flags:"
; " FL-BROKEN - Player has heard murmuring"
; " FL-LOCKED - Leprechaun loop shouldn't be reset when hide behind rock."
<ROUTINE RT-TH-ROCK ("OPT" (CONTEXT <>))
<COND
; (<AND <VERB? LISTEN>
<RT-IS-QUEUED? ,RT-I-LEP-2>
>
<SETG GL-VOICE? T>
)
(<VERB? HIDE-BEHIND>
<RT-BEHIND-ROCK>
<RTRUE>
)
(<VERB? LOOK-BEHIND>
<COND
(<SEE-ANYTHING-IN? ,TH-BEHIND-ROCK>
<TELL "You see">
<PRINT-CONTENTS ,TH-BEHIND-ROCK>
<TELL " behind" the ,TH-ROCK "." CR>
)
>
)
(<AND <VERB? EXIT>
<IN? ,CH-PLAYER ,TH-BEHIND-ROCK>
>
<RT-DO-WALK ,P?EAST>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-BEHIND-ROCK"
;"---------------------------------------------------------------------------"
<OBJECT TH-BEHIND-ROCK
(LOC RM-GLADE)
(DESC "behind the rock")
(FLAGS FL-CONTAINER FL-NO-ARTICLE FL-NO-DESC FL-OPEN FL-SEARCH)
(NORTH PER RT-UNDERGROWTH)
(EAST PER RT-LEAVE-ROCK)
(SOUTH PER RT-UNDERGROWTH)
(WEST PER RT-UNDERGROWTH)
(OUT PER RT-LEAVE-ROCK)
(CAPACITY K-CAP-MAX)
(ACTION RT-TH-BEHIND-ROCK)
>
<ROUTINE RT-TH-BEHIND-ROCK ("OPT" (CONTEXT <>) "AUX" L)
<COND
(<MC-CONTEXT? ,M-BEG>
<COND
(<VERB? LISTEN>
<COND
(<MC-PRSO? <> ,ROOMS ,TH-GROUND ,TH-ROCK>
<COND
(,GL-VOICE?
<FSET ,TH-ROCK ,FL-BROKEN>
<TELL
"A tiny voice floats up from somewhere below" the ,TH-ROCK ". \"'Tis no good
t'all. There's no taste to't. 'Tis flat as an Englishman's head. I'll cook it
a while longer and then try't again.\"" CR
>
)
(<FSET? ,TH-ROCK ,FL-BROKEN>
<TELL "The murmuring has stopped." CR>
)
>
)
>
)
(<AND <VERB? TELL>
,P-CONT
>
<RFALSE>
)
(<AND <VERB? TAKE CLIMB-ON>
<MC-PRSO? ,CH-LEPRECHAUN>
>
<RFALSE>
)
(<VERB? WALK>
<RFALSE>
)
(<OR <AND
<VERB? PUT-IN>
<MC-PRSI? ,RM-GLADE>
>
<AND
<VERB? THROW>
<IN? ,PRSI ,RM-GLADE>
>
>
<COND
(<OR <PRE-PUT>
<NOT <IDROP>>
>
<RTRUE>
)
(<IN? ,CH-LEPRECHAUN ,RM-GLADE>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-INVT ,K-UPD-OBJS>>
<MOVE ,PRSO ,RM-GLADE>
<RT-L-STARTLED-MSG>
)
(T
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-INVT ,K-UPD-OBJS>>
<MOVE ,PRSO ,RM-GLADE>
<TELL
The+verb ,WINNER "toss" the ,PRSO " into" the ,RM-GLADE "." CR
>
)
>
)
(<AND <IN? ,CH-LEPRECHAUN ,RM-GLADE>
<UNHIDE-VERB?>
>
<RT-L-STARTLED-MSG>
<RTRUE>
)
(<TOUCH-VERB?>
<SET L <LOC ,CH-PLAYER>>
<COND
(,PRSO
<COND
(<OR <MC-PRSO? ,ROOMS>
<EQUAL? <LOC ,PRSO> ,GLOBAL-OBJECTS ,GENERIC-OBJECTS>
>
)
(<NOT <RT-META-IN? ,PRSO .L>>
<COND
(<MC-PRSO? ,TH-ROCK>
<>
)
(T
<RT-CANT-REACH-MSG ,PRSO .L>
<RTRUE>
)
>
)
>
)
>
<COND
(,PRSI
<COND
(<OR <MC-PRSI? ,ROOMS>
<EQUAL? <LOC ,PRSI> ,GLOBAL-OBJECTS ,GENERIC-OBJECTS>
>
<RFALSE>
)
(<NOT <RT-META-IN? ,PRSI .L>>
<COND
(<MC-PRSI? ,TH-ROCK>
<RFALSE>
)
(T
<RT-CANT-REACH-MSG ,PRSI .L>
)
>
)
>
)
>
)
>
)
(<MC-CONTEXT? ,M-END>
<COND
(<AND <IN? ,CH-LEPRECHAUN ,RM-GLADE>
<VERB? TRANSFORM>
<NOT <MC-FORM? ,GL-OLD-FORM>>
<MC-FORM? ,K-FORM-ARTHUR>
>
<RT-L-STARTLED-MSG>
)
>
)
>
>
<ROUTINE RT-BEHIND-ROCK ("OPT" (QUIET <>))
<COND
(.QUIET
<RFALSE>
)
(<EQUAL? ,GL-HIDING ,TH-ROCK>
<RT-ALREADY-MSG ,WINNER "behind the rock">
)
(<AND <MC-FORM? ,K-FORM-TURTLE>
<PRE-WALK>
>
<RTRUE>
)
(T
<MOVE ,WINNER ,TH-BEHIND-ROCK>
<SETG GL-HIDING ,TH-ROCK>
<TELL
The+verb ,WINNER "hide" " behind" the ,TH-ROCK ". You peer around it and
discover that your hiding place affords an excellent view of the
clearing." CR
>
<COND
(<NOT <FSET? ,CH-LEPRECHAUN ,FL-LOCKED>>
<COND
(<NOT <FSET? ,TH-ROCK ,FL-LOCKED>>
<FSET ,TH-ROCK ,FL-LOCKED>
<RT-DEQUEUE ,RT-I-LEP-1>
<RT-DEQUEUE ,RT-I-LEP-2>
<RT-DEQUEUE ,RT-I-LEP-3>
<RT-DEQUEUE ,RT-I-LEP-4>
<RT-QUEUE ,RT-I-LEP-1 ,GL-MOVES>
)
>
)
>
<SETG GL-PICTURE-NUM ,K-PIC-GLADE-ROCK>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
)
>
<RFALSE>
>
<ROUTINE RT-LEAVE-ROCK ("OPT" (QUIET <>))
<COND
(.QUIET
<RETURN ,RM-GLADE>
)
(<EQUAL? ,GL-HIDING ,TH-ROCK>
<MOVE ,WINNER ,RM-GLADE>
<SETG GL-HIDING <>>
<COND
(<IN? ,CH-LEPRECHAUN ,RM-GLADE>
<RT-JUMP-L-MSG>
)
(T
<TELL The+verb ,WINNER "emerge" " from">
<COND
(<EQUAL? ,GL-HIDING ,TH-ROCK>
<TELL " hiding">
)
>
<TELL
the ,TH-BEHIND-ROCK " and" verb ,WINNER "are" " now in" the ,RM-GLADE "." CR
>
)
>
<SETG GL-PICTURE-NUM ,K-PIC-GLADE>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(T
<RT-UNDERGROWTH>
<RFALSE>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-WHISKY-JUG"
;"---------------------------------------------------------------------------"
<OBJECT TH-WHISKY-JUG
(DESC "whisky jug")
(FLAGS FL-CONTAINER FL-OPEN FL-SEARCH FL-TAKEABLE)
(SYNONYM JUG WHISKY WHISKEY NECK)
(ADJECTIVE WHISKY WHISKEY)
(OWNER TH-WHISKY-JUG) ;"for JUG'S NECK"
(SIZE 5 CAPACITY 1)
(GENERIC RT-GN-WHISKY)
(ACTION RT-TH-WHISKY-JUG)
>
<CONSTANT K-EVAPORATES-MSG " It quickly evaporates.">
<ROUTINE RT-TH-WHISKY-JUG ("OPT" (CONTEXT <>) "AUX" N TBL OBJ)
<COND
(.CONTEXT
<RFALSE>
)
(,NOW-PRSI
<COND
(<VERB? PUT-IN EMPTY>
<THIS-IS-IT ,TH-WHISKY-JUG>
<TELL "The jug's neck is too narrow." CR>
)
>
)
(<VERB? DRINK-FROM>
<COND
(<IN? ,TH-WHISKY ,TH-WHISKY-JUG>
<PERFORM ,V?DRINK ,TH-WHISKY>
<RTRUE>
)
(<IN? ,TH-WATER ,TH-WHISKY-JUG>
<PERFORM ,V?DRINK ,TH-WATER>
<RTRUE>
)
(T
<TELL "There is nothing to drink in" the ,TH-WHISKY-JUG "." CR>
)
>
)
(<VERB? EXAMINE READ>
<FSET ,TH-WHISKY-JUG ,FL-SEEN>
<RT-CENTER-STRING "XXX">
<RT-CENTER-STRING "MOTHER MACREE'S IRISH WHISKY">
)
(<VERB? FILL>
<COND
(<AND <MC-PRSI? ,TH-BARREL>
<NOT <IN? ,TH-BARREL-WATER ,TH-BARREL>>
>
<TELL "There isn't any water in" the ,TH-BARREL "." CR>
)
(<MC-PRSI? ,LG-LAKE ,RM-SHALLOWS ,LG-RIVER ,RM-FORD ,TH-BARREL-WATER ,TH-BARREL>
<COND
(<OR <IN? ,TH-WHISKY ,TH-WHISKY-JUG>
<IN? ,TH-WATER ,TH-WHISKY-JUG>
>
<TELL
The ,TH-WHISKY-JUG " is already filled with " D <FIRST? ,TH-WHISKY-JUG> "." CR
>
)
(T
<MOVE ,TH-WATER ,TH-WHISKY-JUG>
<TELL
The+verb ,WINNER "fill" the ,TH-WHISKY-JUG " with " D ,TH-WATER "." CR
>
)
>
)
>
)
(<VERB? EMPTY>
<COND
(<OR <IN? ,TH-WHISKY ,TH-WHISKY-JUG>
<IN? ,TH-WATER ,TH-WHISKY-JUG>
>
<SET OBJ <FIRST? ,TH-WHISKY-JUG>>
<REMOVE .OBJ>
<TELL
The+verb ,WINNER "pour" the .OBJ " out of" the ,TH-WHISKY-JUG "."
>
<COND
(<AND <EQUAL? .OBJ ,TH-WHISKY>
<MC-PRSI? ,TH-COTTAGE-FIRE ,TH-TAVERN-FIRE ,TH-CASTLE-FIRE>
>
<TELL
" As soon as the first drop of the incredibly potent brew hits" the ,PRSI
", a powerful explosion rips through" the ,HERE ", levelling everything in
it, including you." CR
>
<RT-END-OF-GAME>
)
(<FSET? ,HERE ,FL-WATER>
<TELL " It disappears into the water.">
)
(T
<TELL ,K-EVAPORATES-MSG>
)
>
<CRLF>
<COND
(<EQUAL? .OBJ ,TH-WHISKY>
<RT-SCORE-MSG 0 -1 0 0>
)
>
<RTRUE>
)
>
)
(<VERB? OPEN>
<RT-ALREADY-MSG ,TH-WHISKY-JUG "open">
)
(<VERB? BREAK>
<REMOVE ,TH-WHISKY-JUG>
<TELL "You smash" the ,TH-WHISKY-JUG ", and it shatters into a thousand pieces." CR>
<RT-SCORE-MSG 0 -3 0 0>
)
>
>
<ROUTINE RT-GN-WHISKY (TBL FINDER)
<COND
(<EQUAL? <PARSE-ACTION ,PARSE-RESULT> ,V?DRINK ,V?EAT ,V?ASK-ABOUT>
<RETURN ,TH-WHISKY>
)
(T
<TELL "[" The ,TH-WHISKY-JUG "]" CR>
<RETURN ,TH-WHISKY-JUG>
)
>
>
<ROUTINE RT-PUT-WHISKY-IN-FIRE-MSG (FIRE)
<TELL
"You toss the jug" in .FIRE "to" the .FIRE ". Seconds later, a powerful
explosion rips through" the ,HERE ", levelling everything in it, including
you." CR
>
<RT-END-OF-GAME>
>
;"---------------------------------------------------------------------------"
; "TH-WHISKY"
;"---------------------------------------------------------------------------"
<OBJECT TH-WHISKY
(LOC TH-WHISKY-JUG)
(DESC "whisky")
(FLAGS FL-COLLECTIVE FL-PLURAL FL-WATER)
(SYNONYM WHISKY WHISKEY ELIXIR)
(ADJECTIVE GOLDEN)
(SIZE 1)
(GENERIC RT-GN-WHISKY)
(ACTION RT-TH-WHISKY)
>
<GLOBAL GL-WHISKY-DRINK 0 <> BYTE>
<ROUTINE RT-TH-WHISKY ("OPT" (CONTEXT <>))
<COND
(<VERB? DRINK EAT>
<INC GL-WHISKY-DRINK>
<COND
(<L? ,GL-WHISKY-DRINK 4>
<TELL "You take a few sips. ">
<COND
(<EQUAL? ,GL-WHISKY-DRINK 1>
<TELL