-
Notifications
You must be signed in to change notification settings - Fork 19
/
places.zil
1157 lines (1076 loc) · 32.1 KB
/
places.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
"PLACES for BUREAUCRACY: Copyright 1987 Infocom, Inc. All rights reserved."
<FILE-FLAGS MDL-ZIL?>
;<SETG END-GAME? <>>
"*** YOUR HOUSE ***"
<VOC "ZZSTREET" NOUN>
<DEFINE PARSE-RANDOM-LOC (ADJ NAM STUFF "AUX" OBJ)
<COND (<AND <==? .ADJ ,W?INTNUM>
<==? .NAM ,W?ZZSTREET>>
<SET OBJ <FIRST? ,ROOMS>>
<REPEAT ()
<COND (<==? ,P-NUMBER <GETP .OBJ ,P?STADDR>>
<RETURN>)>
<COND (<NOT <SET OBJ <NEXT? .OBJ>>> <RETURN>)>>
<COND (<NOT .OBJ>
<TELL "[" N ,P-NUMBER
" " <SHOW-FIELD ,STREET-NAME> " isn't a valid address.]"
CR>)>
.OBJ)
(<THIS-IT? ,YOUR-HOUSE>
,YOUR-HOUSE)
(<AND <==? .NAM ,W?ROOM>
<OR <F? .ADJ>
<==? .ADJ ,W?THIS>>>
<COND (<IS? ,HERE ,INDOORS> ,HERE)
(T
<TELL "You aren't in a room." CR>
,FATAL-VALUE)>)
(T
<SET OBJ <FIRST? ,ROOMS>>
<REPEAT (TBL)
<COND (<AND <SET TBL <GETPT .OBJ ,P?SYNONYM>>
<INTBL? .NAM .TBL </ <PTSIZE .TBL> 2>>
<OR <NOT .ADJ>
<AND <SET TBL <GETPT .OBJ ,P?ADJECTIVE>>
<INTBL? .ADJ .TBL
</ <PTSIZE .TBL> 2>>>>>
<RETURN>)>
<COND (<NOT <SET OBJ <NEXT? .OBJ>>> <RETURN>)>>
.OBJ)>>
<CONSTANT PARSE-RANDOM-LOC-VEC <PTABLE PARSE-RANDOM-LOC 0>>
<OBJECT FROOM
(LOC ROOMS)
(DESC "front room")
(SYNONYM ROOM PARLOR)
(ADJECTIVE LIVING OTHER FRONT)
(FLAGS IN-TOWN NO-NERD LIGHTED LOCATION INDOORS)
(THINGS PARSE-RANDOM-LOC-VEC)
(EXIT-TO OUTSIDE-HOUSE)
(ENTER-FROM <PTABLE P?WEST OUTSIDE-HOUSE>)
(EAST TO OUTSIDE-HOUSE)
(OUT TO OUTSIDE-HOUSE)
(IN PER INTO-HOUSE)
(WEST PER INTO-HOUSE)
(GLOBAL FROOM-DOOR YOUR-WINDOWS DOORBELL BROOM YOUR-HOUSE FROOM)
(GENERIC GENERIC-ROOM-F)
(ACTION FROOM-F)>
<DEFINE GENERIC-ROOM-F (TBL "AUX" (LEN <ZGET .TBL 0>))
<SET TBL <ZREST .TBL 2>>
<COND (<INTBL? ,HERE .TBL .LEN>
,HERE)
(T <>)>>
<DEFINE INTO-HOUSE ()
<COND (<IN? ,DMAN ,FROOM>
<TELL CTHE ,DMAN " clears his throat, and you hesitate." CR>
<>)
(T
,BROOM)>>
<DEFINE FROOM-F ("OPTIONAL" (CONTEXT <>))
<COND (<EQUAL? .CONTEXT ,M-LOOK>
<COND (,END-GAME?
<TELL ,THIS-IS "the front room of your new house.
While you were absent, the removals firm delivered all your belongings
and installed them exactly where you had specified. The carpets have been
laid, the curtains hang luxuriously in the windows, your books have been
arranged in order and the record player is playing your favourite album">)
(T
<TELL ,THIS-IS "the living room of "
D ,YOUR-HOUSE
", a pretty nice room, actually. At least, it will be when all your stuff has arrived as the removals company said they would have done yesterday and now say they will do while you're on vacation. At the moment, however, it's a bit dull. Plain white, no carpets, no curtains, no furniture. A room to go bughouse in, really. Another room is visible to the west, and a">
<OPEN-CLOSED ,FROOM-DOOR>
<TELL " leads outside">)>
<TELL ,PERIOD>
T)
(<==? .CONTEXT ,M-EXIT>
<COND (<EQUAL? ,P-WALK-DIR ,P?IN ,P?WEST>
<>)
(<NOT <IS? ,FROOM-DOOR ,OPENED>>
<ITS-CLOSED ,FROOM-DOOR>
T)
(<IN? ,DMAN ,FROOM>
<TELL CTHE ,DMAN " is standing in the way." CR>
<I-DMAN>
T)
(T <>)>)
(<T? .CONTEXT> <>)
(<AND <HERE? FROOM>
<ADJ-USED? ,W?OTHER>>
<COND (<THIS-PRSO?> <PERFORM ,PRSA ,BROOM ,PRSI>)
(T <PERFORM ,PRSA ,PRSO ,BROOM>)>)
(<HANDLE-ROOM? ,FROOM ,P?EAST> T)
(T
<>)>>
<OBJECT BROOM
(LOC ROOMS)
(DESC "back room")
(SYNONYM ROOM)
(ADJECTIVE BACK OTHER)
(FLAGS IN-TOWN NO-NERD LIGHTED LOCATION INDOORS)
(EXIT-TO FROOM)
(ENTER-FROM <PTABLE P?WEST FROOM>)
(EAST TO FROOM)
(OUT TO FROOM)
(GLOBAL FROOM-DOOR YOUR-WINDOWS DOORBELL FROOM YOUR-HOUSE BROOM)
(GENERIC GENERIC-ROOM-F)
(ACTION BROOM-F)>
<DEFINE BROOM-F ("OPTIONAL" (CONTEXT <>))
<COND (<EQUAL? .CONTEXT ,M-LOOK>
<COND (,END-GAME?
<TELL "You're in the back room of " D ,YOUR-HOUSE
". Pausing briefly to note how accurately this
jolly nice room reflects your new status, you sensibly ">
<COND (<NOT <META-IN? ,END-MAIL ,PLAYER>>
<TELL "wonder why you haven't read your mail
yet." CR>)
(T
<TELL "read your mail.">
<PERFORM ,V?READ ,END-MAIL>)>)
(T
<TELL "You're in the back room of "
D , YOUR-HOUSE
", another nice room, at present suitable for lining with latex padding and bouncing off the walls, but likely to be pretty impressive and upwardly mobile once the removals men have sorted out their little problem. The exit leads east to the living room." CR>)>
T)
(<==? .CONTEXT ,M-EXIT>
<COND (<IS? ,MACHINE ,SEEN>
<TELL "You'd better hang up the phone first." CR>
T)
(T <>)>)
(<T? .CONTEXT> <>)
(<AND <HERE? BROOM>
<ADJ-USED? ,W?OTHER>>
<COND (<THIS-PRSO?> <PERFORM ,PRSA ,FROOM ,PRSI>)
(T <PERFORM ,PRSA ,PRSO ,FROOM>)>)
(<HANDLE-ROOM? ,BROOM ,P?WEST> T)
(T
<>)>>
<OBJECT OUTSIDE-HOUSE
(LOC ROOMS)
(DESC "Street")
(THINGS PARSE-RANDOM-LOC-VEC)
(SDESC SAY-STREET-ADDRESS)
(FLAGS IN-TOWN LIGHTED LOCATION NOARTICLE)
(NORTH TO ST-B)
(EAST TO IN-ALLEY)
(WEST TO FROOM IF FROOM-DOOR IS OPEN)
(IN PER ENTER-FROM-OUTSIDE)
(SOUTH TO OUTSIDE-MANSION)
(GLOBAL FROOM-DOOR YOUR-WINDOWS STREETNUMBERS GSTREET
CAB CAB-DRIVER YOUR-HOUSE)
(STADDR 69)
(LDESC "You're standing on a well-kept sidewalk to the east of your new house. The street bears north and south. There's an overgrown alleyway to the east.")
(ACTION OUTSIDE-HOUSE-F)>
<DEFINE OUTSIDE-HOUSE-F ("OPT" (CONTEXT <>))
<COND (<==? .CONTEXT ,M-EXIT>
<COND (<AND <==? ,GOTO-LOC ,FROOM>
<MORE-MESSAGES?>>
<SETUP-NEXT-MESSAGES>
<TELL "You hear the tail end of a message on your answering machine" ,PCR>)>
<>)
(T <>)>>
"*** DOWNTOWN ***"
<OBJECT ST-A
(LOC ROOMS)
(DESC "Downtown")
(SDESC SAY-STREET-ADDRESS)
(THINGS PARSE-RANDOM-LOC-VEC)
(FLAGS IN-TOWN LIGHTED LOCATION NOARTICLE)
(IN PER WHICH-WAY-IN)
(SEE-N BANK)
(SEE-E THALL)
(SEE-W AGENCY)
(NORTH PER TO-BANK)
(EAST TO THALL)
(SOUTH TO ST-B)
(WEST PER ENTER-AGENCY)
(GLOBAL CAB CAB-DRIVER STREETNUMBERS GSTREET THALL BANK AGENCY)
(STADDR 67)
(LDESC "This is the commercial district. You see a rather shabby brownstone tenement (obviously once a grand family house) to the east, and a travel agency (which is trying to look like a bank) to the west. The Fillmore Fiduciary Trust Bank (which is trying to look like a travel agency) lies to the north. The street continues south.")>
<DEFINE FROB-IS-CLOSED (STR)
<TELL "The " .STR " is closed." CR>
<>>
<DEFINE ENTER-AGENCY ()
<COND (<T? ,END-GAME?>
<FROB-IS-CLOSED "travel agency">)
(T
<THIS-IS-IT ,AGENT>
<TELL "You step into the travel agency" ,PCR>
,AGENCY)>>
<OBJECT ST-B
(LOC ROOMS)
(DESC "Downtown")
(SDESC SAY-STREET-ADDRESS)
(THINGS PARSE-RANDOM-LOC-VEC)
(FLAGS IN-TOWN LIGHTED LOCATION NOARTICLE)
(NORTH TO ST-A)
(SEE-E DINER)
(SEE-W BSTORE)
(SEE-S OUTSIDE-HOUSE)
(EAST PER ENTER-DINER)
(WEST PER ENTER-SHOP)
(SOUTH TO OUTSIDE-HOUSE)
(IN PER WHICH-WAY-IN)
(GLOBAL STREETNUMBERS GSTREET CAB CAB-DRIVER DINER BSTORE)
(STADDR 68)
(LDESC "You see a rather run-down restaurant to the east, and one of those bookstores which looks as if it wouldn't have anything you want to buy to the west. The street continues north and south.")>
<DEFINE ENTER-SHOP ()
<COND (<T? ,END-GAME?>
<FROB-IS-CLOSED "bookstore">)
(T
<TELL "You step into the bookstore" ,PCR>
,BSTORE)>>
<DEFINE ENTER-DINER ()
<COND (<T? ,END-GAME?>
<FROB-IS-CLOSED "restaurant">)
(<IN? ,BAG ,PLAYER>
<TELL "In many ways, bringing the llama food with you is a wise move. However, due to strict public health laws (enacted for your safety and convenience), this restaurant doesn't permit customers to bring in competing varieties of food. Better leave it outside" ,PERIOD>
<>)
(T
<TELL "You step into the dingy restaurant" ,PCR>
,DINER)>>
<DEFINE SAY-STREET-ADDRESS ("OPTIONAL" (X <>) "AUX" Y)
<COND (<T? .X>
<SET Y <GETP .X ,P?STADDR>>)
(<AND %<COND (<GASSIGNED? ZILCH> '<T? ,PRSO>)
(T '<TYPE? ,PRSO OBJECT>)>
<T? <SET Y <GETP ,PRSO ,P?STADDR>>>>
T)
(T
<SET Y <GETP ,HERE ,P?STADDR>>)>
<TELL N .Y " ">
<SHOW-FIELD ,STREET-NAME>
T>
<OBJECT IN-ALLEY
(LOC ROOMS)
(DESC "alley")
(FLAGS IN-TOWN LIGHTED LOCATION VOWEL)
(THINGS PARSE-RANDOM-LOC-VEC)
(SYNONYM ALLEY ALLEYWAY)
(EXIT-TO OUTSIDE-HOUSE)
(ENTER-FROM <PTABLE P?EAST OUTSIDE-HOUSE>)
(NORTH TO DINER IF KITCHEN-DOOR IS OPEN)
(EAST SORRY "The fence blocks your path.")
(IN TO DINER IF KITCHEN-DOOR IS OPEN)
(SOUTH PER IN-ALLEY-S)
(WEST TO OUTSIDE-HOUSE)
(GLOBAL KITCHEN-DOOR FENCE)
(ACTION IN-ALLEY-F)>
<DEFINE IN-ALLEY-S ()
<TELL "You squeeze yourself through the gap" ,PCR>
,BEHIND-MANSION>
<DEFINE IN-ALLEY-F ("OPTIONAL" (CONTEXT <>))
<COND (<EQUAL? .CONTEXT ,M-LOOK>
<TELL ,THIS-IS "an overgrown, grassy alley, surrounded by a tall creosoted fence. A">
<OPEN-CLOSED ,KITCHEN-DOOR>
<TELL " leads north; there's a gap in the fence to the south. The exit leads west." CR>
T)
(<EQUAL? .CONTEXT ,M-ENTERED>
<COND (<IS? ,KITCHEN-DOOR ,OPENED>
<SETG P-IT-OBJECT ,KITCHEN-DOOR>
<UNMAKE ,KITCHEN-DOOR ,OPENED>
<TELL CR "Somebody slams " THE ,KITCHEN-DOOR
" shut." CR>
T)
(T
<>)>)
(<T? .CONTEXT> <>)
(<AND <HERE? OUTSIDE-HOUSE>
<VERB? LOOK>>
<TELL "It looks like an ordinary overgrown grassy alley from here. Probably looks like that from anywhere, in fact." CR>)
(<HERE? IN-ALLEY>
<HERE-F>)
(<ENTERING?>
<COND (<HERE? OUTSIDE-HOUSE>
<DO-WALK ,P?EAST>
T)
(<HERE? DINER>
<DO-WALK ,P?SOUTH>
T)
(<HERE? BEHIND-MANSION>
<DO-WALK ,P?NORTH>
T)
(T <>)>)
(T <>)>>
<OBJECT AGENCY
(LOC ROOMS)
(DESC "travel agency")
(SYNONYM AGENCY BUILDING)
(ADJECTIVE TRAVEL)
(FLAGS IN-TOWN NO-NERD LIGHTED LOCATION INDOORS)
(THINGS PARSE-RANDOM-LOC-VEC)
(ENTER-FROM <PTABLE P?WEST ST-A>)
(EXIT-TO ST-A)
(OUT TO ST-A)
(EAST TO ST-A)
(IN SORRY "You're already inside as far as you can go.")
(LDESC "You're in a travel agency which is trying to look like a bank. The exit is to the east.")
(ACTION AGENCY-F)>
<DEFINE AGENCY-F ("OPT" (CONTEXT <>))
<COND (<T? .CONTEXT> <>)
(<HERE? AGENCY>
<HERE-F>)
(<AND <ENTERING?>
<HERE? ST-A>>
<DO-WALK ,P?WEST>)
(T <>)>>
<OBJECT VISA-SIGN
(LOC AGENCY)
(DESC "sign")
(FLAGS READABLE)
(SYNONYM SIGN NOTICE)
(ADJECTIVE LARGE)
(DESCFCN VISA-SIGN-F)
(ACTION VISA-SIGN-F)>
<DEFINE VISA-SIGN-F ("OPTIONAL" (CONTEXT <>))
<COND (<EQUAL? .CONTEXT ,M-OBJDESC>
<TELL "A large sign is hanging on the wall behind the desk.">
T)
(<T? .CONTEXT>
<>)
(<THIS-PRSI?>
<>)
(<VERB? EXAMINE READ LOOK-ON>
<TELL "The sign says:|
|
DON'T FORGET YOUR VISA!|
|
Be sure to ask your travel agent about visa requirements!" CR>
T)
(T
<>)>>
<OBJECT REQUIREMENTS
(LOC GLOBAL-OBJECTS)
(DESC "visa requirements")
(FLAGS NODESC PLURAL)
(SYNONYM REQUIREMENTS VISA)
(ADJECTIVE VISA MY)
(ACTION REQUIREMENTS-F)>
<DEFINE REQUIREMENTS-F ()
<COND (<SEEING?>
<CANT-SEE-ANY-STR "any">
,FATAL-VALUE)
(T
<TELL ,CANT "do that with " Q ,REQUIREMENTS ,PERIOD>
T)>>
<OBJECT VISA
(LOC BTABLE)
(DESC "your passport")
(FLAGS NOARTICLE TAKEABLE READABLE)
(SIZE 3)
(SYNONYM PASSPORT VISA)
(ADJECTIVE MY YOUR)
(ACTION VISA-F)>
<DEFINE VISA-F ()
<COND (<THIS-PRSI?>
<COND (<PUTTING?>
<WASTE-OF-TIME>
T)
(T
<>)>)
(<VERB? EXAMINE LOOK-ON LOOK-INSIDE READ OPEN>
<TELL "You flip open " Q ,PRSO ", ">
<TELL
"glance to make sure your French visa is still readable, shudder at the picture, wonder if you " ITAL "really" " look like a dead llama, and close the book." CR>
T)
(<VERB? CLOSE>
<ALREADY-CLOSED>
T)
(T
<>)>>
<OBJECT BSTORE
(LOC ROOMS)
(DESC "bookshop")
(SYNONYM BOOKSTORE STORE BOOKSHOP SHOP BUILDING)
(ADJECTIVE BOOK)
(FLAGS IN-TOWN NO-NERD LIGHTED LOCATION INDOORS)
(THINGS PARSE-RANDOM-LOC-VEC)
(ENTER-FROM <PTABLE P?WEST ST-B>)
(EXIT-TO ST-B)
(OUT TO ST-B)
(EAST TO ST-B)
(ACTION BSTORE-F)>
<DEFINE BSTORE-F ("OPTIONAL" (CONTEXT <>))
<COND (<EQUAL? .CONTEXT ,M-LOOK>
<TELL ,THIS-IS
"a not-very-nice bookstore which sells \"packages\" and \"products\" rather than books. Shelves groan with " D ,BESTSELLERS
" and bargain " D ,CUTOUTS ". The exit is to the east." CR>
T)
(<EQUAL? .CONTEXT ,M-ENTERED>
<SETG P-HIM-OBJECT ,CLERK>
<SETG P-THEM-OBJECT ,SOFTWARE>
<MAKE ,CLERK ,TOUCHED>
<QUEUE I-CLERK>
<TELL CR CTHE ,CLERK>
<COND (<IS? ,CLERK ,SEEN>
<TELL " recognises you, and scowls impatiently." CR>
T)
(T
<TELL " nods a greeting, and looks you up and down."
CR>)>
T)
(<EQUAL? .CONTEXT ,M-EXIT>
<DEQUEUE I-CLERK>
<COND (<QUEUED? ,I-CLERK-TRADE>
<DEQUEUE ,I-CLERK-TRADE>)>
<COND (<IS? ,CLERK ,SEEN>
<TELL CTHE ,CLERK " scowls again">)
(T
<MAKE ,CLERK ,SEEN>
<TELL "\"Have a nice day,\" calls " THE ,CLERK>)>
<TELL " as you leave" ,PCR>
<>)
(<AND <==? .CONTEXT ,M-BEG>
<OR <EQUAL? ,P-PRSA-WORD ,W?STEAL>
<AND <VERB? TAKE> <PRSO? REGISTER>>>>
<TELL "The City Legal Department employs 176 qualified lawyers, most of whom are hoping that you will steal the bookstore's property so that they can bring long, involved and pompous cases against you and send you to gaol. Their mothers all boast about them, oddly enough." CR>
T)
(<T? .CONTEXT> <>)
(<HERE? BSTORE>
<HERE-F>)
(<AND <ENTERING?>
<HERE? ST-B>>
<DO-WALK ,P?WEST>
T)
(T
<>)>>
<OBJECT DINER
(LOC ROOMS)
(DESC "restaurant")
(SYNONYM RESTAURANT DINER MILLIE\'S)
(ADJECTIVE MILLIE\'S)
(FLAGS IN-TOWN NO-NERD LIGHTED LOCATION INDOORS)
(THINGS PARSE-RANDOM-LOC-VEC)
(ODOR BURGER)
(GLOBAL FOOD KITCHEN-DOOR)
(EXIT-TO ST-B)
(ENTER-FROM <PTABLE P?EAST ST-B>)
(WEST TO ST-B)
(OUT TO ST-B)
(SOUTH PER LEAVE-BY-BACK-DOOR)
(ACTION DINER-F)>
;<SETG MEAL-STATE 0>
<MSETG MS-ORDERED-FROM-WAITRESS 1>
<MSETG MS-ORDERED-FROM-WAITER 2>
<MSETG MS-RECEIVED-FOOD 3>
<MSETG MS-PAID-FOR-FOOD 4>
<DEFINE LEAVE-BY-BACK-DOOR ()
<COND (<IS? ,KITCHEN-DOOR ,OPENED>
,IN-ALLEY)
(T
<TELL "The door is closed" ,PERIOD>
<COND (<AND <G=? ,MEAL-STATE ,MS-ORDERED-FROM-WAITER>
<L? ,MEAL-STATE ,MS-PAID-FOR-FOOD>>
<I-WAITER-ARRIVES T>)>
<>)>>
<DEFINE DINER-F ("OPTIONAL" (CONTEXT <>))
<COND (<EQUAL? .CONTEXT ,M-LOOK>
<TELL
"You're in a fast-food restaurant. This is merely a bureaucratic convention, since the food is not really fast. Nor is it really food. There's an exit out to the street, and a somewhat grubby ">
<COND (<IS? ,KITCHEN-DOOR ,OPENED>
<TELL "(but open) ">)>
<TELL "door to the south." CR>
T)
(<==? .CONTEXT ,M-EXIT>
<COND (<EQUAL? ,P-WALK-DIR ,P?SOUTH>
<TELL "You slither out the back way, wondering why you never see any live dogs hanging around this restaurant" ,PCR>
<>)
(<AND <G? ,MEAL-STATE ,MS-ORDERED-FROM-WAITRESS>
<N==? ,MEAL-STATE ,MS-PAID-FOR-FOOD>>
<DEQUEUE I-WAITER-ARRIVES>
<I-WAITER-ARRIVES T>
T)
(ELSE
<TELL "You push your way out of the restaurant" ,PCR>
<>)>)
(<EQUAL? .CONTEXT ,M-ENTERING>
<COND (<==? ,MEAL-STATE ,MS-PAID-FOR-FOOD>
<>)
(<==? ,MEAL-STATE ,MS-RECEIVED-FOOD>
;"Re-entering after having eaten without paying."
<QUEUE-WAITER>
<>)
(<==? ,MEAL-STATE ,MS-ORDERED-FROM-WAITRESS>
<QUEUE-WAITER>
<>)
(T
<QUEUE-WAITRESS>
<COND (<IS? ,KITCHEN-DOOR ,OPENED>
<UNMAKE ,KITCHEN-DOOR ,OPENED>
<TELL CR "You hear a door slam shut in the back"
,PCR>)>
<>)>)
(<==? .CONTEXT ,M-BEG>
<COND (<VERB? SIT>
<TELL "You're not unnaturally assuming that all
restaurants have places to sit. This one doesn't. But don't worry about
it, you won't want to linger over your meal." CR>
T)>)
(<T? .CONTEXT> <>)
(<HERE? DINER>
<HERE-F>)
(<ENTERING?>
<COND (<HERE? ST-B>
<DO-WALK ,P?EAST>
T)
(<HERE? IN-ALLEY>
<DO-WALK ,P?NORTH>
T)
(T <>)>)
(T
<>)>>
<OBJECT FOOD
(LOC LOCAL-GLOBALS)
(DESC "your meal")
(FLAGS NODESC NOARTICLE)
(SYNONYM FOOD HAMBURGER BURGER SANDWICH MEAL FRIES
DRINK BEER WINE SODA)
(ACTION FOOD-F)>
<DEFINE FOOD-F ()
<COND (<VERB? WAIT-FOR>
<TELL "A marvellous idea. And, of course, it's exactly what they ">
<ITALICIZE "want">
<TELL " you to do." CR>
T)
(<VERB? REQUEST EAT BUY>
<COND (<==? ,MEAL-STATE ,MS-ORDERED-FROM-WAITER>
<COND (<VERB? REQUEST>
<TELL "You already did. Or are you trying to play ">
<ITALICIZE "Amnesia">
<TELL "?" CR>)
(ELSE
<TELL ,CANT "eat it until you've got it." CR>)>)
(<G=? ,MEAL-STATE ,MS-RECEIVED-FOOD>
<TELL "You've already got whatever you're going to get."
CR>)
(T
<TELL
"You'll just have to wait for someone to take your order."
CR>)>
T)
(<G=? ,MEAL-STATE ,MS-RECEIVED-FOOD>
<TELL "We'll admit that you didn't get everything you ordered, but
at least the service was prompt." CR>)
(ELSE
<TELL "What food? Come on, ">
<ITALICIZE "what">
<TELL " food? We've just about had enough of this. We're up to ">
<ITALICIZE "here">
<TELL " with it. Most people would have finished by now, but you? Oh, good grief." CR>
T)>>
<DEFINE QUEUE-WAITER ()
<COND (<AND <G=? ,MEAL-STATE ,MS-ORDERED-FROM-WAITRESS>
<L? ,MEAL-STATE ,MS-PAID-FOR-FOOD>>
<SETG P-HIM-OBJECT ,NOT-HERE-OBJECT>
<COND (<QUEUED? I-WAITER-ARRIVES>
<DEQUEUE I-WAITER-ARRIVES>)>
<QUEUE I-WAITER-ARRIVES 2>)>
<>>
<DEFINE QUEUE-WAITRESS ()
<SETG P-HER-OBJECT ,NOT-HERE-OBJECT>
<QUEUE I-WAITRESS-ARRIVES 2>
<>>
<OBJECT KITCHEN-DOOR
(LOC LOCAL-GLOBALS)
(DESC "back door")
(FLAGS NODESC DOORLIKE OPENABLE)
(SYNONYM DOOR DOORWAY)
(ADJECTIVE CLOSED SHUT BACK)
(ACTION KITCHEN-DOOR-F)>
<DEFINE KITCHEN-DOOR-F ()
<COND (<THIS-PRSI?>
<>)
(<AND <VERB? EXAMINE LOOK-ON>
<HERE? IN-ALLEY>>
<EXAMINE-KITCHEN-DOOR>
T)
(<AND <VERB? OPEN>
<NOT <IS? ,PRSO ,OPENED>>
<HERE? IN-ALLEY>>
<EXAMINE-KITCHEN-DOOR>
T)
(<ENTERING?>
<COND (<HERE? DINER>
<DO-WALK ,P?SOUTH>)
(T
<DO-WALK ,P?NORTH>)>
T)
(T
<>)>>
<DEFINE EXAMINE-KITCHEN-DOOR ()
<TELL "The">
<OPEN-CLOSED <> <>>
<TELL " has no handle on this side." CR>>
"*** FARM ***"
<OBJECT OUTSIDE-FARM
(LOC ROOMS)
(DESC "Street")
(SDESC SAY-STREET-ADDRESS)
(THINGS PARSE-RANDOM-LOC-VEC)
(FLAGS IN-TOWN LIGHTED LOCATION NOARTICLE)
(NORTH PER OUTSIDE-FARM-N)
(WEST TO IN-FARM IF FARM-DOOR IS OPEN)
(EAST SORRY "You have no objection to having your path blocked by such nice trees. You also have no choice.")
(IN TO IN-FARM IF FARM-DOOR IS OPEN)
(SOUTH PER OUTSIDE-FARM-S)
(GLOBAL FARM-DOOR STREETNUMBERS GSTREET CAB CAB-DRIVER IN-FARM)
(STADDR 71)
(ACTION OUTSIDE-FARM-F)>
<DEFINE OUTSIDE-FARM-S ()
<COND (<SPY-STILL-HERE?>
<>)
(T
,OUTSIDE-FORT)>>
<DEFINE OUTSIDE-FARM-N ()
<COND (<SPY-STILL-HERE?>
<>)
(T
,OUTSIDE-MANSION)>>
<DEFINE SPY-STILL-HERE? ()
<COND (<IN? ,SPY ,HERE>
<TELL "You hesitate when " THE ,SPY
" clears his throat." CR>
<I-SPY>
T)
(T
<>)>>
<DEFINE OUTSIDE-FARM-F ("OPTIONAL" (CONTEXT <>))
<COND (<EQUAL? .CONTEXT ,M-LOOK>
<TELL "A modest, ochre-and-aubergine striped llama-farm farmhouse stands to the west, its "
D ,FARM-DOOR>
<COND (<IS? ,FARM-DOOR ,OPENED>
<TELL " wide open">)
(ELSE
<TELL " closed">)>
<TELL ". The street continues north and south" ,PERIOD>
T)
(<EQUAL? .CONTEXT ,M-ENTERED>
<COND (<IN? ,SPY ,OUTSIDE-FARM>
<SETG P-HIM-OBJECT ,SPY>)
(<IN? ,SPY ,IN-FARM>
<MOVE ,SPY ,OUTSIDE-FARM>
<SETG P-HIM-OBJECT ,SPY>
<TELL CR CTHE ,SPY
" follows you out of the farmhouse." CR>
T)
(T
<>)>)
(T
<>)>>
<OBJECT IN-FARM
(LOC ROOMS)
(DESC "farmhouse")
(SYNONYM FARM FARMHOUSE HOUSE)
(ADJECTIVE FARM)
(FLAGS IN-TOWN NO-NERD LIGHTED LOCATION INDOORS)
(EXIT-TO OUTSIDE-FARM)
(ENTER-FROM <PTABLE P?WEST OUTSIDE-FARM>)
(EAST TO OUTSIDE-FARM)
(OUT TO OUTSIDE-FARM)
(IN SORRY "You're already inside as far as you can go.")
(GLOBAL FARM-DOOR)
(ACTION IN-FARM-F)>
<DEFINE NOISE-AT-DOOR ()
<TELL "A sound at the door makes you hesitate." CR>
T>
<DEFINE IN-FARM-F ("OPTIONAL" (CONTEXT <>))
<COND (<EQUAL? .CONTEXT ,M-LOOK>
<TELL
"You're in the ochre-and-aubergine llama-farm farmhouse. The place has obviously been ransacked. The exit is to the east." CR>
T)
(<EQUAL? .CONTEXT ,M-ENTERED>
<COND (<T? ,END-GAME?> <>)
(<NOT <IS? ,SPY ,SEEN>>
<QUEUE I-SPY>
<>)
(<IN? ,SPY ,OUTSIDE-FARM>
<MOVE ,SPY ,IN-FARM>
<SETG P-HIM-OBJECT ,SPY>
<TELL CR CTHE ,SPY " follows you inside." CR>
T)
(T
<>)>)
(<==? .CONTEXT ,M-EXIT>
<COND (<NOT <IS? ,FARM-DOOR ,OPENED>>
<ITS-CLOSED ,FARM-DOOR>
T)
(<NOT <IS? ,SPY ,SEEN>>
<NOISE-AT-DOOR>
T)
(<IN? ,SPY ,IN-FARM>
<TELL "You push past " THE ,SPY ,PCR>
<>)
(T <>)>)
(<T? .CONTEXT> <>)
(<HERE? IN-FARM>
<HERE-F>)
(<AND <ENTERING?>
<HERE? OUTSIDE-FARM>>
<DO-WALK ,P?WEST>)
(<VERB? EXAMINE LOOK-ON>
<COND (<HERE? IN-FARM>
<PERFORM ,V?LOOK>)
(T
<HERE? OUTSIDE-FARM>
<TELL "It's just a normal, puce 'n' tangerine striped
suburban llama-farmer's house. Its " D ,FARM-DOOR " is ">
<COND (<IS? ,FARM-DOOR ,OPENED>
<TELL "open">)
(T
<TELL "closed">)>
<TELL ,PERIOD>)>)
(T
<>)>>
"*** MANSION ***"
<OBJECT OUTSIDE-MANSION
(LOC ROOMS)
(DESC "Street")
(THINGS PARSE-RANDOM-LOC-VEC)
(SYNONYM MANSION HOUSE HOME BUILDING NOARTICLE)
(ADJECTIVE DILAPIDATED OLD)
(SDESC SAY-STREET-ADDRESS)
(FLAGS IN-TOWN LIGHTED LOCATION NOARTICLE)
(NORTH TO OUTSIDE-HOUSE)
(SEE-E OUTSIDE-MANSION)
(SEE-S OUTSIDE-FARM)
(SEE-N OUTSIDE-HOUSE)
(WEST SORRY "Trees block your path.")
(SOUTH TO OUTSIDE-FARM)
(EAST PER ENTER-MANSION)
(IN PER ENTER-MANSION)
(GLOBAL MANSION-DOOR STREETNUMBERS GSTREET RADIO CAB CAB-DRIVER)
(HEAR RADIO)
(STADDR 70)
(ACTION OUTSIDE-MANSION-F)>
<DEFINE ENTER-MANSION ()
<COND (<IS? ,MANSION-DOOR ,OPENED>
<THIS-IS-IT ,MATRON>
<TELL CTHE ,MATRON " is standing in your way." CR>)
(T
<ITS-CLOSED ,MANSION-DOOR>)>
<>>
<DEFINE OUTSIDE-MANSION-F ("OPTIONAL" (CONTEXT <>))
<COND (<EQUAL? .CONTEXT ,M-LOOK>
<TELL
"You're standing west of a mansion; its rather ornate door is ">
<COND (<IS? ,MANSION-DOOR ,OPENED>
<TELL "open">)
(T
<TELL "closed">)>
<TELL ". The road continues north and south." CR>
<MENTION-RECORDING>
T)
(<EQUAL? .CONTEXT ,M-ENTERED>
<QUEUE I-RADIO>
<COND (<IN? ,MATRON ,OUTSIDE-MANSION>
<THIS-IS-IT ,MATRON>)>
T)
(<T? .CONTEXT> <>)
(<THIS-PRSI?> <>)
(<ENTERING?>
<COND (<HERE? BEHIND-MANSION IN-PORCH>
<DO-WALK ,P?WEST> T)
(<HERE? OUTSIDE-MANSION>
<DO-WALK ,P?EAST> T)
(<HERE? TROPHY-ROOM>
<ALREADY-IN> T)
(T <>)>)
(<EXITING?>
<COND (<HERE? IN-PORCH>
<DO-WALK ,P?EAST>)
(<HERE? TROPHY-ROOM>
<DO-WALK ,P?NORTH ,P?EAST>)
(T <NOT-IN>)>
T)
(<HERE? IN-PORCH TROPHY-ROOM>
<HERE-F>)
(T
<>)>>
<DEFINE MENTION-RECORDING ("AUX" (X <>))
<CRLF>
<COND (<PROB 50>
<SET X T>
<TELL "A recording of ">)
(T
<TELL "You can hear ">)>
<SAY-MUZAK>
<TUNE-MENTIONED? T>
<COND (<T? .X>
<TELL " is">)>
<TELL " playing in the mansion." CR>
T>
<OBJECT FENCE
(LOC LOCAL-GLOBALS)
(DESC "fence")
(ACTION FENCE-F)
(SYNONYM FENCE GAP)
(ADJECTIVE TALL)
(FLAGS NODESC)>
<DEFINE FENCE-F ()
<COND (<THIS-PRSI?> <>)
(<VERB? EXAMINE>
<TELL "It's just your average unclimbable fence. There does seem to
be a body-sized gap in it." CR>)
(<VERB? ENTER THROUGH>
<COND (<HERE? BEHIND-MANSION>
<DO-WALK ,P?NORTH>)
(<HERE? IN-ALLEY>
<DO-WALK ,P?SOUTH>)>)
(<VERB? CLIMB-OVER CLIMB-UP>
<TELL ,CANT "climb the fence." CR>)
(T <>)>>
<OBJECT BEHIND-MANSION
(LOC ROOMS)
(DESC "behind mansion")
(FLAGS IN-TOWN NO-NERD LIGHTED LOCATION)
(THINGS PARSE-RANDOM-LOC-VEC)
(EXIT-TO IN-ALLEY)
(NORTH PER BEHIND-MANSION-N)
(EAST SORRY "The fence blocks your path.")
(IN TO IN-PORCH IF PORCH-DOOR IS OPEN)
(SOUTH SORRY "The fence blocks your path.")
(WEST TO IN-PORCH IF PORCH-DOOR IS OPEN)
(GLOBAL PORCH-DOOR FENCE RADIO)
(HEAR RADIO)
(ACTION BEHIND-MANSION-F)>
<DEFINE BEHIND-MANSION-N ()
<TELL "You squeeze through the gap" ,PCR>
,IN-ALLEY>
<DEFINE BEHIND-MANSION-F ("OPTIONAL" (CONTEXT <>))
<COND (<EQUAL? .CONTEXT ,M-LOOK>
<TELL "You're in the back garden of a mansion. You can enter the house through a door to the west, and there's a gap in the fence to the north." CR>
<MENTION-RECORDING>
T)
(<EQUAL? .CONTEXT ,M-ENTERED>
<QUEUE I-RADIO>
T)
(T
<>)>>
<OBJECT IN-PORCH
(LOC ROOMS)
(DESC "porch")
(FLAGS IN-TOWN NO-NERD LIGHTED LOCATION INDOORS)
(SYNONYM PORCH)
(THINGS PARSE-RANDOM-LOC-VEC)
(EXIT-TO BEHIND-MANSION)
(ENTER-FROM <PTABLE P?WEST BEHIND-MANSION>)
(OUT TO BEHIND-MANSION IF PORCH-DOOR IS OPEN)
(EAST TO BEHIND-MANSION IF PORCH-DOOR IS OPEN)
(IN TO TROPHY-ROOM)
(SOUTH TO TROPHY-ROOM)
(GLOBAL PORCH-DOOR PMATRON RADIO)
(HEAR RADIO)
(ACTION IN-PORCH-F)>
<DEFINE IN-PORCH-F ("OPTIONAL" (CONTEXT <>) "AUX" (SOMETHING <>))
<COND (<EQUAL? .CONTEXT ,M-LOOK>
<TELL "Welcome to the porch. It is a porch. Doors from this porch lead south and east. The overall effect is rather porchy." CR>
<MENTION-RECORDING>
T)
(<EQUAL? .CONTEXT ,M-ENTERED>
<SETG P-HIM-OBJECT ,MACAW>
<>)
(<==? .CONTEXT ,M-ENTERING>
<COND (<ZERO? <ZGET ,MACAW-TABLE ,MACAW-POLITICS>>
<COND (<PROB 50>
<ZPUT ,MACAW-TABLE ,MACAW-POLITICS ,MACAW-RIGHT>
<ZPUT <GETPT ,PAINTING ,P?SYNONYM>
0 ,W?GORBACHEV>)
(ELSE
<ZPUT <GETPT ,PAINTING ,P?SYNONYM> 0 ,W?REAGAN>
<ZPUT ,MACAW-TABLE ,MACAW-POLITICS
,MACAW-LEFT>)>)>)
(<EQUAL? .CONTEXT ,M-EXIT>
<UNMAKE ,MACAW ,SEEN>
<>)
(<==? .CONTEXT ,M-BEG>
<COND (<AND <VERB? EXAMINE LOOK-ON SEARCH>
<PRSO? GROUND>>
<COND (<T? <FIND-NEXT ,HERE T
,GROUND-PRINT-CONTENTS-TEST>>
<SET SOMETHING T>
<TELL ,YOU-SEE>
<PRINT-CONTENTS ,HERE
,GROUND-PRINT-CONTENTS-TEST>
<TELL " on the " D ,GROUND ".">)>
<COND (<FIRST? ,UNDER-PERCH>
<COND (.SOMETHING
<TELL " You also see ">)
(T
<TELL ,YOU-SEE>)>
<SET SOMETHING T>
<PRINT-CONTENTS ,UNDER-PERCH>
<TELL " under " THE ,PERCH ".">)>
<ZCRLF>)>)
(<T? .CONTEXT> <>)
(<HERE? IN-PORCH>
<HERE-F>)
(<ENTERING?>
<COND (<HERE? BEHIND-MANSION>
<DO-WALK ,P?WEST> T)
(<HERE? TROPHY-ROOM>
<DO-WALK ,P?EAST> T)
(T <>)>)
(T
<>)>>
<OBJECT TROPHY-ROOM
(LOC ROOMS)
(DESC "trophy room")
(THINGS PARSE-RANDOM-LOC-VEC)
(EXIT-TO IN-PORCH)
(ENTER-FROM <PTABLE P?SOUTH IN-PORCH>)
(SYNONYM ROOM)
(ADJECTIVE TROPHY)
(FLAGS IN-TOWN NO-NERD LIGHTED LOCATION INDOORS)
(OUT TO IN-PORCH)
(NORTH TO IN-PORCH)
(WEST SORRY "Come off it. Just look at that elephant gun. (By the way, what would an elephant be doing with a gun?)")
(IN PER WHICH-WAY-IN)
(GLOBAL MHALL PMATRON RADIO MANSION-DOOR)
(HEAR RADIO)
(ACTION TROPHY-ROOM-F)>
<DEFINE TROPHY-ROOM-F ("OPTIONAL" (CONTEXT <>))
<COND (<EQUAL? .CONTEXT ,M-LOOK>