forked from historicalsource/arthur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kitchen.zil
1362 lines (1320 loc) · 31.6 KB
/
kitchen.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 : KITCHEN.ZIL"
; "auth : $Author: RAB $"
; "date : $Date: 15 May 1989 18:09:56 $"
; "rev : $Revision: 1.108 $"
; "vers : 1.0"
;"---------------------------------------------------------------------------"
; "Tavern kitchen"
; "Copyright (C) 1989 Infocom, Inc. All rights reserved."
;"***************************************************************************"
<INCLUDE "PDEFS"> ; "Because PARSE-ACTION used in this file."
;"---------------------------------------------------------------------------"
; "RM-TAV-KITCHEN"
;"---------------------------------------------------------------------------"
<ROOM RM-TAV-KITCHEN
(LOC ROOMS)
(DESC "tavern kitchen")
(FLAGS FL-INDOORS FL-LIGHTED)
(SYNONYM KITCHEN)
(ADJECTIVE TAVERN)
(NORTH TO RM-TAVERN)
(OUT TO RM-TAVERN)
(GLOBAL LG-THATCH LG-WALL RM-TAVERN)
(ACTION RT-RM-TAV-KITCHEN)
>
<ROUTINE RT-RM-TAV-KITCHEN ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<COND
(<IN? ,CH-COOK ,RM-TAV-KITCHEN>
<FSET ,CH-COOK ,FL-SEEN>
<FSET ,TH-CUPBOARD ,FL-SEEN>
<TELL
"The kitchen is dominated by a mean-looking cook who is working at a table
with his back to a" open ,TH-CUPBOARD " cupboard."
>
<COND
(<IN? ,TH-BIRD ,TH-CAGE>
<FSET ,TH-BIRD ,FL-SEEN>
<FSET ,TH-CAGE ,FL-SEEN>
<TELL " Above his head is a beautiful caged bird who ">
<COND
(<MC-CONTEXT? ,M-LOOK>
<TELL "is chattering frantically at you">
)
(T
<TELL "starts to chatter as soon as you come in">
)
>
<TELL ".">
)
>
<COND
(<AND <IN? ,TH-CHEESE ,TH-TAVERN-TABLE>
<FSET? ,TH-CHEESE ,FL-NO-LIST>
>
<TELL
" Near the edge of the table is a small, stale piece of cheese."
>
)
>
<CRLF>
; <FSET ,TH-TAVERN-TABLE ,FL-NO-DESC>
; <FSET ,TH-CUPBOARD ,FL-NO-DESC>
; <FSET ,TH-CAGE ,FL-NO-DESC>
; <FSET ,TH-BIRD ,FL-NO-DESC>
; <FSET ,CH-COOK ,FL-NO-DESC>
<RFALSE>
)
(T
<TELL
"You are in the small kitchen that is tucked away in the back of the tavern.
The only exit lies to the north.|"
>
<RFALSE>
)
>
)
; (<MC-CONTEXT? ,M-BEG>
<FCLEAR ,TH-TAVERN-TABLE ,FL-NO-DESC>
<FCLEAR ,TH-CUPBOARD ,FL-NO-DESC>
<FCLEAR ,TH-CAGE ,FL-NO-DESC>
<FCLEAR ,TH-BIRD ,FL-NO-DESC>
<FCLEAR ,CH-COOK ,FL-NO-DESC>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTER>
<COND
(<IN? ,CH-COOK ,RM-TAV-KITCHEN>
<SETG GL-PICTURE-NUM ,K-PIC-COOK>
)
(T
<SETG GL-PICTURE-NUM ,K-PIC-TAV-KITCHEN>
)
>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTERED>
<COND
(<IN? ,CH-COOK ,RM-TAV-KITCHEN>
<COND
(<IN? ,TH-BIRD ,TH-CAGE>
<TELL
"|The cook takes a backhanded swipe at the bird and mutters, \"Sharrup.\"" CR
>
)
>
)
>
)
(<MC-CONTEXT? ,M-END>
<COND
(<VERB? TRANSFORM>
<COND
(<IN? ,CH-COOK ,RM-TAV-KITCHEN>
<COND
(<NOT <MC-FORM? ,GL-OLD-FORM>>
<TELL
"|\"Sorcery!! Work of the Devil!!\" The cook picks up a knife and skewers
you through the heart." ,K-HEEDED-WARNING-MSG
>
<RT-END-OF-GAME>
)
(,GL-FORM-ABORT
<TELL
"|Fortunately, it all happened so quickly that" the ,CH-COOK " didn't notice." CR
>
)
>
)
(<AND <MC-FORM? ,K-FORM-OWL>
<NOT <MC-FORM? ,GL-OLD-FORM>>
<NOT <FSET? ,TH-BIRD ,FL-LOCKED>>
>
<FSET ,TH-BIRD ,FL-LOCKED>
<TELL
"|The bird watches your transformation without surprise. Its chattering
suddenly becomes intelligible to you. \"Mon dieu, but you are slow! I know
you must 'ate zat man because of ze way ee cooks. In my country we would
'ave 'im killed. But ee 'as some spices 'idden away in ze cupboard, and ze
key to ze cupboard ees 'idden in ze thatch. "
>
<COND
(<IN? ,TH-BIRD ,TH-CAGE>
<TELL
"Queekly now, before ze sadist returns. Open ze cage and I weel get ze key
for you.\"" CR
>
)
(T
<TELL "Would you like me to get eet for you?\"|">
<COND
(<YES? T>
<MOVE ,TH-CUPBOARD-KEY ,RM-TAV-KITCHEN>
<TELL ,K-BIRD-GETS-KEY-MSG>
)
(T
<TELL
"\"No? Non? You do not want ze spices?\" He shakes his bird-like head. \"I
will never understand ze English. Au revoir, mon ami.\" " The ,TH-BIRD
>
)
>
<REMOVE ,TH-BIRD>
<MOVE ,TH-DROPPING ,TH-TAVERN-TABLE>
<TELL ,K-DROPPING-MSG>
)
>
)
>
)
>
)
(.CONTEXT
<RFALSE>
)
>
>
<ROUTINE RT-RESET-KITCHEN ()
<COND
(<IN? ,TH-BIRD ,RM-TAV-KITCHEN>
<MOVE ,TH-BIRD ,TH-CAGE>
)
(<NOT <LOC ,TH-BIRD>>
<FSET ,TH-BIRD ,FL-ASLEEP>
)
>
<COND
(<OR <IN? ,TH-SPICE-BOTTLE ,RM-TAV-KITCHEN>
<IN? ,TH-SPICE-BOTTLE ,TH-TAVERN-TABLE>
<IN? ,TH-SPICE-BOTTLE ,TH-CAGE>
>
<MOVE ,TH-SPICE-BOTTLE ,TH-CUPBOARD>
<FCLEAR ,TH-CUPBOARD ,FL-LOCKED>
)
>
<COND
(<OR <IN? ,TH-CUPBOARD-KEY ,RM-TAV-KITCHEN>
<IN? ,TH-CUPBOARD-KEY ,TH-TAVERN-TABLE>
<IN? ,TH-CUPBOARD-KEY ,TH-CAGE>
>
<MOVE ,TH-CUPBOARD-KEY ,TH-CUPBOARD>
<FCLEAR ,TH-CUPBOARD ,FL-LOCKED>
)
>
<FCLEAR ,TH-CAGE ,FL-OPEN>
<FCLEAR ,TH-CUPBOARD ,FL-OPEN>
>
;"---------------------------------------------------------------------------"
; "CH-COOK"
;"---------------------------------------------------------------------------"
<OBJECT CH-COOK
(LOC RM-TAV-KITCHEN)
(DESC "cook")
(FLAGS FL-ALIVE FL-NO-LIST FL-OPEN FL-PERSON FL-SEARCH)
(SYNONYM COOK RUFFIAN MAN PERSON)
(ADJECTIVE FAT NASTY LOOKING NASTY-LOOKING)
(ACTION RT-CH-COOK)
>
<CONSTANT K-COOK-IGNORES-MSG "The cook ignores you and continues about his business.|">
<CONSTANT K-NOT-NOW-MSG "\"Not now, boy. I'm busy.\"|">
<CONSTANT K-GET-OUT-MSG " \"Get out of here, you mangy">
<CONSTANT K-FAT-CHANCE-MSG "\"Fat chance.\"|">
<CONSTANT K-COOK-RESUMES-WORK-MSG " and resumes his work at the table.|">
<CONSTANT K-HANDS-OFF-MSG "The cook cuffs you on the head. \"Hands off.\"|">
<CONSTANT K-NO-SPICE-MSG
"The cook takes a sidelong glance at the cupboard and then says gruffly, \"I
don't use no spices. Too 'ard to come by.\"|">
<ROUTINE RT-CH-COOK ("OPT" (CONTEXT <>))
<COND
(<AND <MC-CONTEXT? ,M-WINNER <>>
<VERB? HELLO GOODBYE THANK>
>
<TELL ,K-COOK-IGNORES-MSG>
<COND
(<VERB? THANK>
<COND
(<NOT <FSET? ,CH-PLAYER ,FL-AIR>>
<FSET ,CH-PLAYER ,FL-AIR>
<RT-SCORE-MSG 10 0 0 0>
)
>
)
>
<RTRUE>
)
(<MC-CONTEXT? ,M-WINNER>
<COND
(<IN? ,CH-COOK ,RM-TAVERN>
<TELL ,K-NOT-NOW-MSG>
)
(<AND <VERB? TELL-ABOUT>
<MC-PRSO? ,CH-PLAYER>
>
<RFALSE>
)
(<VERB? WHO WHAT>
<RFALSE>
)
(<VERB? WHERE>
<COND
(<MC-PRSO? ,TH-CUPBOARD-KEY>
<TELL "\"None o' yer business.\"" CR>
)
(<MC-PRSO? ,CH-FARMERS>
<TELL
"\"Sittin' out there with their noses in their ale. Same as always.\"" CR
>
)
(<MC-PRSO? ,TH-SPICE-BOTTLE ,TH-SPICE>
<TELL ,K-NO-SPICE-MSG>
)
(T
<TELL "\"Don't know nuthin' 'bout no ">
<NP-PRINT ,PRSO-NP>
<TELL ".\"" CR>
)
>
)
(<VERB? OPEN>
<COND
(<MC-PRSO? ,TH-CUPBOARD ,TH-CAGE>
<TELL ,K-FAT-CHANCE-MSG>
)
(T
<TELL ,K-COOK-IGNORES-MSG>
)
>
)
(T
<TELL ,K-COOK-IGNORES-MSG>
)
>
)
(.CONTEXT
<RFALSE>
)
(,NOW-PRSI
<COND
(<VERB? SHOW GIVE>
<COND
(<MC-PRSO? ,TH-SPICE-BOTTLE ,TH-SPICE>
<MOVE ,TH-SPICE-BOTTLE ,TH-CUPBOARD>
<FCLEAR ,TH-CUPBOARD ,FL-OPEN>
<TELL
The ,CH-COOK " snatches the bottle away from you and says, \"'Ow did you get
that?\" He cuffs you on the side of the head"
>
<COND
(<MC-HERE? ,RM-TAV-KITCHEN>
<TELL
", replaces the bottle in the cupboard, and closes the door." CR
>
)
(T
<MOVE ,CH-COOK ,RM-TAV-KITCHEN>
<COND
(<IN? ,TH-CHEESE ,TH-TAVERN-TABLE>
<FSET ,TH-CHEESE ,FL-NO-LIST>
)
>
<FSET ,TH-TAVERN-TABLE ,FL-NO-LIST>
<FSET ,TH-CUPBOARD ,FL-NO-LIST>
<FSET ,TH-CAGE ,FL-NO-LIST>
<FSET ,TH-BIRD ,FL-NO-LIST>
; <FSET ,CH-COOK ,FL-NO-LIST>
<RT-DEQUEUE ,RT-I-COOK>
<RT-QUEUE ,RT-I-COOK <+ ,GL-MOVES <+ 4 <RANDOM 4>>>>
<TELL " and returns to the kitchen." CR>
)
>
)
(<MC-PRSO? ,TH-WHISKY ,TH-WHISKY-JUG>
<MOVE ,TH-WHISKY-JUG ,TH-CUPBOARD>
<FCLEAR ,TH-CUPBOARD ,FL-OPEN>
<TELL
The ,CH-COOK " snatches the jug away from you and says, \"A young lad like
you shouldn't be messin with the likes of that. \""
>
<COND
(<MC-HERE? ,RM-TAV-KITCHEN>
<TELL
"He puts the jug in the cupboard and closes the door." CR
>
)
(T
<MOVE ,CH-COOK ,RM-TAV-KITCHEN>
<COND
(<IN? ,TH-CHEESE ,TH-TAVERN-TABLE>
<FSET ,TH-CHEESE ,FL-NO-LIST>
)
>
<FSET ,TH-TAVERN-TABLE ,FL-NO-LIST>
<FSET ,TH-CUPBOARD ,FL-NO-LIST>
<FSET ,TH-CAGE ,FL-NO-LIST>
<FSET ,TH-BIRD ,FL-NO-LIST>
; <FSET ,CH-COOK ,FL-NO-LIST>
<RT-DEQUEUE ,RT-I-COOK>
<RT-QUEUE ,RT-I-COOK <+ ,GL-MOVES <+ 4 <RANDOM 4>>>>
<TELL "He glances at the jug and returns to the kitchen." CR>
)
>
<RT-SCORE-MSG 0 -1 0 0>
)
(<MC-PRSO? ,TH-CHEESE>
<REMOVE ,TH-CHEESE>
<TELL
"The cook snatches the cheese away from you and pops it into his mouth. \"Why
you little thief!\" he says. \"I should have you thrown in Lot's dungeon. But
instead I'll settle for this.\" He gives you a swift kick in the rear end." CR
>
<RT-SCORE-MSG 0 -1 0 0>
)
(<MC-PRSO? ,TH-BRACELET ,TH-GOLD-KEY ,TH-SILVER-KEY ,TH-RAVEN-EGG>
<TELL
"\"Where did the likes of you get the likes of that? I want no part of your
stolen loot.\"" CR
>
)
>
)
>
)
(<AND <VERB? TELL>
,P-CONT
>
; "Message and RFATAL if don't want knight to become winner"
<RFALSE>
)
(<VERB? ASK-FOR>
<TELL ,K-FAT-CHANCE-MSG>
)
(<VERB? ASK-ABOUT>
<COND
(<IN? ,CH-COOK ,RM-TAVERN>
<TELL ,K-NOT-NOW-MSG>
)
(<MC-PRSI? ,CH-FARMERS>
<TELL "\"Mangy bunch of lie-abouts.\"" CR>
)
(<MC-PRSI? ,TH-PASSWORD>
<TELL "\"How should I know? I don't read poetry.\"" CR>
)
(<MC-PRSI? ,CH-LOT ,TH-MASTER>
<TELL
"\"How would I know anything about Lot, him with his castles and passwords
and such?\"" CR
>
)
(<MC-PRSI? ,TH-BIRD>
<COND
(<IN? ,TH-BIRD ,TH-CAGE>
<TELL
"\"A proper nuisance, he is. But come Lot's coronation, his goose will be
cooked. Heh Heh.\"" CR
>
)
(T
<TELL
"The cook fixes you with a viscious stare and says, \"If I ever find out who
opened that cage, I'll throttle him with my own hands.\"" CR
>
)
>
)
(<MC-PRSI? ,TH-SPICE>
<TELL ,K-NO-SPICE-MSG>
)
(<MC-PRSI? ,TH-CUPBOARD-KEY>
<TELL "\"None o' yer business.\"" CR>
)
(<MC-PRSI? ,TH-CUPBOARD>
<TELL "\"Keep yer hands off. There's nothing in there.\"" CR>
)
(<MC-PRSI? ,RM-TAVERN ,RM-TAV-KITCHEN ,GLOBAL-HERE>
<TELL
The ,CH-COOK " shrugs his shoulders and mumbles, \"It's a livin'.\"" CR
>
)
(<MC-PRSI? ,TH-CHEESE>
<COND
(<IN? ,TH-CHEESE ,TH-TAVERN-TABLE>
<TELL "\"Keep yer hands off.\"" CR>
)
(T
<TELL
"\"Somebody nicked it, and I'd better not find out who it was\"" CR
>
)
>
)
(<MC-PRSI? ,CH-COOK>
<TELL
"\"I prepare plain food for plain people. Nothin' fancy about me.\"" CR
>
)
(<MC-PRSI? ,TH-BEER ,TH-TANKARDS>
<TELL "\"Come back when you're older.\"" CR>
)
(<MC-PRSI? ,CH-MERLIN>
<TELL
"\"Don't get too many wizards in here. They don't drink much, you know.\"" CR
>
)
(<MC-PRSI? ,CH-PLAYER>
<TELL
"\"You're nowt but a meddlesome lad. Go away before I box your ears.\"" CR
>
)
(<MC-PRSI? ,CH-IDIOT>
<TELL
"\"He's just here on holiday. Monday he goes back to his regular job at
the Post Office.\"" CR
>
)
(<MC-PRSI? ,TH-CAGE>
<TELL
"\"If you was just a little smaller, I'd pop you in there and keep you for a
pet. Har har.\"" CR
>
)
(<MC-PRSI? ,TH-EXCALIBUR>
<TELL
"\"Having it right across the way was good for business. I'm sorry to see it
gone.\"" CR
>
)
(T
<TELL "\"Don't know nuthin' 'bout no ">
<NP-PRINT ,PRSI-NP>
<TELL ".\"" CR>
)
>
)
(<VERB? EXAMINE>
<FSET ,CH-COOK ,FL-SEEN>
<TELL "He is a fat, nasty-looking ruffian." CR>
)
(<AND <VERB? CALL>
<MC-HERE? ,RM-TAVERN ,RM-TAV-KITCHEN>
<NOT <IN? ,CH-COOK ,HERE>>
>
<TELL The+verb ,CH-COOK "stalk" " ">
<COND
(<MC-HERE? ,RM-TAVERN>
<TELL "out of">
)
(T
<TELL "into">
)
>
<TELL
" the kitchen. When he sees it is you who has disturbed him, he cuffs you on
the head and throws you out of the tavern.||"
>
<RT-RESET-TAVERN>
<RT-RESET-KITCHEN>
<RT-GOTO ,RM-TOWN-SQUARE T>
)
(<TOUCH-VERB?>
<TELL
The ,CH-COOK " cuffs you on the head and says, \"Quit your silly games, boy.
Else I'll thrash you proper.\"" CR
>
)
>
>
<GLOBAL GL-COOK-NUM:NUMBER 0 <> BYTE>
<ROUTINE RT-I-COOK ()
<COND
(<FSET? ,CH-PLAYER ,FL-ASLEEP>
<MOVE ,CH-COOK ,RM-TAV-KITCHEN>
<COND
(<IN? ,TH-CHEESE ,TH-TAVERN-TABLE>
<FSET ,TH-CHEESE ,FL-NO-LIST>
)
>
<FSET ,TH-TAVERN-TABLE ,FL-NO-LIST>
<FSET ,TH-CUPBOARD ,FL-NO-LIST>
<FSET ,TH-CAGE ,FL-NO-LIST>
<FSET ,TH-BIRD ,FL-NO-LIST>
; <FSET ,CH-COOK ,FL-NO-LIST>
<SETG GL-PICTURE-NUM ,K-PIC-COOK>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
>
<RT-RESET-KITCHEN>
<RT-QUEUE ,RT-I-COOK <+ <RT-IS-QUEUED? ,RT-I-SLEEP> <+ 3 <RANDOM 4>>>>
<RFALSE>
)
(<IN? ,CH-COOK ,RM-TAV-KITCHEN>
<SETG GL-COOK-NUM 0>
<MOVE ,CH-COOK ,RM-TAVERN>
<COND
(<IN? ,TH-CHEESE ,TH-TAVERN-TABLE>
<FCLEAR ,TH-CHEESE ,FL-NO-LIST>
)
>
<FCLEAR ,TH-TAVERN-TABLE ,FL-NO-LIST>
<FCLEAR ,TH-CUPBOARD ,FL-NO-LIST>
<FCLEAR ,TH-CAGE ,FL-NO-LIST>
<FCLEAR ,TH-BIRD ,FL-NO-LIST>
; <FCLEAR ,CH-COOK ,FL-NO-LIST>
<RT-QUEUE ,RT-I-COOK <+ ,GL-MOVES <+ 3 <RANDOM 4>>>>
<COND
(<MC-HERE? ,RM-TAVERN>
<TELL
"|One of the customers calls for more ale, and the cook comes out of the
kitchen." CR
>
)
(<MC-HERE? ,RM-TAV-KITCHEN>
<SETG GL-PICTURE-NUM ,K-PIC-TAV-KITCHEN>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
>
<TELL
"|The cook leaves the room in response to a shout from a thirsty customer." CR
>
)
>
)
(<ZERO? ,GL-COOK-NUM>
<SETG GL-COOK-NUM 1>
<RT-QUEUE ,RT-I-COOK <+ ,GL-MOVES 1>>
<COND
(<MC-HERE? ,RM-TAV-KITCHEN>
<TELL
"|You hear a step outside the door. The cook is returning." CR
>
)
>
)
(T
<SETG GL-COOK-NUM 0>
<MOVE ,CH-COOK ,RM-TAV-KITCHEN>
<COND
(<IN? ,TH-CHEESE ,TH-TAVERN-TABLE>
<FSET ,TH-CHEESE ,FL-NO-LIST>
)
>
<FSET ,TH-TAVERN-TABLE ,FL-NO-LIST>
<FSET ,TH-CUPBOARD ,FL-NO-LIST>
<FSET ,TH-CAGE ,FL-NO-LIST>
<FSET ,TH-BIRD ,FL-NO-LIST>
; <FSET ,CH-COOK ,FL-NO-LIST>
<RT-QUEUE ,RT-I-COOK <+ ,GL-MOVES 4 <RANDOM 4>>>
<COND
(<MC-HERE? ,RM-TAVERN>
<TELL "|The cook disappears into the kitchen." CR>
)
(<MC-HERE? ,RM-TAV-KITCHEN>
<SETG GL-PICTURE-NUM ,K-PIC-COOK>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
>
<TELL "|The cook comes into the kitchen">
<COND
(<MC-FORM? ,K-FORM-ARTHUR>
<COND
(<IN? ,TH-BIRD ,RM-TAV-KITCHEN>
<TELL
" and sees that the bird has escaped. He chases it around the room for
several minutes before finally catching it. He stuffs it back into the cage,
gives you a suspicious glance," ,K-COOK-RESUMES-WORK-MSG
>
)
(<OR <FSET? ,TH-CUPBOARD ,FL-OPEN>
<AND
<NOT <LOC ,TH-BIRD>>
<NOT <FSET? ,TH-BIRD ,FL-ASLEEP>>
>
>
<TELL " and sees that">
<COND
(<FSET? ,TH-CUPBOARD ,FL-OPEN>
<TELL the ,TH-CUPBOARD " is open">
)
>
<COND
(<NOT <LOC ,TH-BIRD>>
<FSET ,TH-BIRD ,FL-ASLEEP>
<COND
(<FSET? ,TH-CUPBOARD ,FL-OPEN>
<TELL " and">
)
>
<TELL the ,TH-BIRD " is gone">
)
>
<TELL
", he cuffs you on the side of the head and boots you out the door, saying,"
,K-GET-OUT-MSG " brat.\"||"
>
<RT-GOTO ,RM-TAVERN T>
)
(T
<COND
(<IN? ,TH-BIRD ,TH-CAGE>
<TELL
", takes a backhanded swipe at the bird, mutters, \"Sharrup.\""
>
)
>
<TELL ,K-COOK-RESUMES-WORK-MSG>
)
>
)
(T
<COND
(<MC-FORM? ,K-FORM-TURTLE>
<TELL
", sees you on the floor, and picks you up. He carries you out of the tavern
and drops you in the town square."
>
)
(T
<TELL
". He sees you and says" ,K-GET-OUT-MSG form ".\" He shoos you out into the
tavern, and the farmers shoo you out into the town square."
>
)
>
<CRLF>
<CRLF>
<RT-RESET-TAVERN>
<RT-GOTO ,RM-TOWN-SQUARE T>
)
>
)
>
<RT-RESET-KITCHEN>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-CAGE"
;"---------------------------------------------------------------------------"
<OBJECT TH-CAGE
(LOC RM-TAV-KITCHEN)
(DESC "cage")
(FLAGS FL-CONTAINER FL-NO-LIST FL-OPENABLE FL-SEARCH FL-TRANSPARENT)
(SYNONYM CAGE BIRDCAGE)
(ADJECTIVE BIRD)
(CAPACITY 20)
(ACTION RT-TH-CAGE)
>
<ROUTINE RT-TH-CAGE ("OPT" (CONTEXT <>))
<COND
(.CONTEXT
<RFALSE>
)
(<AND <TOUCH-VERB?>
<IN? ,CH-COOK ,RM-TAV-KITCHEN>
>
<TELL ,K-HANDS-OFF-MSG>
)
(<AND <TOUCH-VERB?>
<NOT <MC-FORM? ,K-FORM-ARTHUR>>
>
<COND
(<MC-FORM? ,K-FORM-OWL>
<TELL
"You flutter around the cage for a few moments, but don't make any progess." CR
>
)
(<MC-FORM? ,K-FORM-SALAMANDER>
<TELL
"You try to scope out a route that will take you up the wall, across the
roof, and down towards the cage - but it looks like such a long journey
that you decide to stay where you are." CR
>
)
(T
<RT-CANT-REACH-MSG ,TH-CAGE>
)
>
)
(<VERB? OPEN>
<COND
(<FSET? ,TH-CAGE ,FL-OPEN>
<RT-ALREADY-MSG ,TH-CAGE "open">
)
(<NOT <IN? ,TH-BIRD ,TH-CAGE>>
<RFALSE>
)
(T
<RT-FREE-BIRD-MSG>
)
>
)
(<VERB? ENTER>
<COND
(<NOT <MC-FORM? ,K-FORM-SALAMANDER>> ;<RT-OBJ-TOO-LARGE? ,WINNER ,TH-CAGE>
<TELL The+verb ,WINNER "are" " too big to fit in" the ,TH-CAGE "." CR>
)
>
)
(<AND <VERB? LISTEN>
<NOT <FSET? ,TH-BIRD ,FL-LOCKED>>
>
<THIS-IS-IT ,TH-BIRD>
<TELL ,K-BIRD-SOUNDS-MSG>
)
>
>
;"---------------------------------------------------------------------------"
; "TH-BIRD"
;"---------------------------------------------------------------------------"
<OBJECT TH-BIRD
(LOC TH-CAGE)
(DESC "bird")
(FLAGS FL-ALIVE FL-NO-LIST)
(SYNONYM BIRD)
(SIZE 5)
(GENERIC RT-GN-BIRD)
(ACTION RT-TH-BIRD)
>
; "TH-BIRD Flags:"
; " FL-BROKEN - Player has gotten points for releasing bird."
; " FL-LOCKED - Player has understood bird by becoming an owl."
; " FL-ASLEEP - Cook has seen that the bird is gone."
<CONSTANT K-BIRD-CHATTERS-MSG
"The bird chatters an answer back to you and then looks frustrated that you
don't understand.|">
<CONSTANT K-BIRD-GETS-KEY-MSG
"The bird flies up and disappears into the thatch of the roof. Moments
later, a key falls to the floor. The bird pokes his head out of the thatch,">
<CONSTANT K-DROPPING-MSG
" leaves a small present on the table for the cook, and then flies out the
door.|">
<CONSTANT K-LET-OUT-MSG
"\"Sacre bleu! Ze time she ees flying, and I am not. Open ze cage and let me
out of 'ere.\"|">
<CONSTANT K-BIRD-SOUNDS-MSG
"It sounds as if the bird is trying to tell you something.|">
<ROUTINE RT-TH-BIRD ("OPT" (CONTEXT <>))
<COND
(<AND <VERB? HELLO GOODBYE THANK>
<MC-CONTEXT? ,M-WINNER <>>
>
<COND
(<MC-FORM? ,K-FORM-OWL>
<COND
(<VERB? HELLO>
<TELL "\"'Allo.\"" CR>
)
(<VERB? GOODBYE>
<TELL
"\"Mon Dieu! You can not leeve me 'ere. Zis man intends to COOK me. And with
no spices!!! You cannot be so cruel.\"" CR
>
)
(<VERB? THANK>
<TELL "\"Mais non. It is I who will be thanking you.\"|">
<COND
(<NOT <FSET? ,CH-PLAYER ,FL-AIR>>
<FSET ,CH-PLAYER ,FL-AIR>
<RT-SCORE-MSG 10 0 0 0>
)
>
<RTRUE>
)
>
)
(T
<TELL ,K-BIRD-CHATTERS-MSG>
)
>
)
(<MC-CONTEXT? ,M-WINNER>
<COND
(<MC-FORM? ,K-FORM-OWL>
<COND
(<AND <VERB? TELL-ABOUT>
<MC-PRSO? ,CH-PLAYER>
>
<RFALSE>
)
(<VERB? WHO WHAT>
<RFALSE>
)
(<VERB? WHERE>
<COND
(<MC-PRSO? ,TH-CUPBOARD-KEY>
<TELL
"\"I 'ave already told you thees. Ze key is in ze thatch.\"" CR
>
)
(<MC-PRSO? ,TH-SPICE ,TH-SPICE-BOTTLE>
<TELL
"\"Ze spices, zey are 'idden away in ze cupboard.\"" CR
>
)
>
)
(T
<TELL ,K-LET-OUT-MSG>
)
>
)
(T
<TELL ,K-BIRD-CHATTERS-MSG>
)
>
)
(.CONTEXT
<RFALSE>
)
(,NOW-PRSI
<RFALSE>
)
(<AND <VERB? TELL>
,P-CONT
>
; "Message and RFATAL if don't want bird to become winner"
<RFALSE>
)
(<VERB? ASK-ABOUT>
<COND
(<MC-FORM? ,K-FORM-OWL>
<COND
(<MC-PRSI? ,TH-BIRD>
<TELL
"\"I 'ave just flown in from ze coast, and mon dieu are my arms tired.\"" CR
>
)
(<MC-PRSI? ,TH-CUPBOARD-KEY>
<TELL
"\"I 'ave already told you thees. Ze key is in ze thatch.\"" CR
>
)
(<MC-PRSI? ,CH-COOK>
<TELL
"\"Ee ees a barbarian. 'Ow do I know thees? Ee overcooks ze food and ee 'as
no knowledge of ze sauces. But I suppose eet ees not 'is fault - Ee ees
English.\"" CR
>
)
(<MC-PRSI? ,TH-SPICE-BOTTLE ,TH-SPICE>
<TELL
"\"In thees country, ze spice is rare. Eet ees why I only come 'ere on
'olidays.\"" CR
>
)
(<MC-PRSI? ,CH-MERLIN>
<TELL
"\"Eef 'ee ees such a great weezard, why does 'ee not make 'eemself ze
gourmet dejeuner, instead of all ze time eating ze nuts and berries?\"" CR
>
)
(<MC-PRSI? ,CH-LOT>
<TELL
"\"Bah! I weel not speak of 'eem. 'Ee drinks red wine with ze feesh and white
wine with ze meats. Surely when 'ee dies 'ee weel go to hell.\"" CR
>
)
(T
<TELL ,K-LET-OUT-MSG>
)
>
)
(T
<TELL ,K-BIRD-CHATTERS-MSG>
)
>
)
(<AND <TOUCH-VERB?>
<IN? ,CH-COOK ,RM-TAV-KITCHEN>
>
<TELL ,K-HANDS-OFF-MSG>
)
(<AND <TOUCH-VERB?>
<NOT <MC-FORM? ,K-FORM-ARTHUR>>
>
<RT-CANT-REACH-MSG ,TH-CAGE>
)
(<VERB? EXAMINE>
<FSET ,TH-BIRD ,FL-SEEN>
<COND
(<FSET? ,TH-BIRD ,FL-LOCKED>
<TELL
The ,TH-BIRD " is looking at you quizzically, waiting for you to make up
your mind." CR
>
)
(<IN? ,TH-BIRD ,TH-CAGE>
<TELL
The ,TH-BIRD " is hopping up and down in the cage, chattering at you." CR
>
)
(T
<TELL
The ,TH-BIRD " is flying around and chattering at you as if it is trying to
tell you something." CR
>
)
>