forked from the-infocom-files/witness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththings.zil
1147 lines (1030 loc) · 31.2 KB
/
things.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
"THINGS for WITNESS
Copyright (C) 1983 Infocom, Inc. All rights reserved."
<OBJECT GLOBAL-OBJECTS
(FLAGS AN CONTBIT DOORBIT DRINKBIT ;DUPLICATE FEMALE FOODBIT FURNITURE
INVISIBLE LIGHTBIT LOCKED NDESCBIT ON-NOT-IN ONBIT OPENBIT
PERSON READBIT RLANDBIT RMUNGBIT SEARCHBIT SURFACEBIT TAKEBIT
TOOLBIT TOUCHBIT TRANSBIT TRYTAKEBIT VEHBIT WEAPONBIT WINDOWBIT)>
<OBJECT LOCAL-GLOBALS
(IN GLOBAL-OBJECTS)
(SYNONYM ZZKJLK) ;"This synonym is necessary - God knows">
<OBJECT PSEUDO-OBJECT
(DESC "pseudo" ;"Place holder (MUST BE 6 CHARACTERS!!!!!)")
(ACTION NULL-F ;"Place holder")>
<ROUTINE RANDOM-PSEUDO ()
<TELL "You can't do anything useful with that." CR>>
<OBJECT NOT-HERE-OBJECT
(DESC "such thing")
(ACTION NOT-HERE-OBJECT-F)>
<ROUTINE NOT-HERE-OBJECT-F ("AUX" TBL (PRSO? T) OBJ)
;"Protocol: return T if case was handled and msg TELLed,
<> if PRSO/PRSI ready to use"
<COND ;"This COND is game independent (except the TELL)"
(<AND <EQUAL? ,PRSO ,NOT-HERE-OBJECT>
<EQUAL? ,PRSI ,NOT-HERE-OBJECT>>
<TELL "(Those things aren't here!)" CR>
<RTRUE>)
(<EQUAL? ,PRSO ,NOT-HERE-OBJECT>
<SET TBL ,P-PRSO>)
(T
<SET TBL ,P-PRSI>
<SET PRSO? <>>)>
<COND (.PRSO?
<COND (<VERB? ASK-CONTEXT-ABOUT ASK-CONTEXT-FOR CLIMB-UP
EXAMINE FIND FOLLOW
LOOK-INSIDE LOOK-OUTSIDE SEARCH WHAT
$WHERE GIVE MAKE THROUGH WALK-TO>
<COND (<SET OBJ <FIND-NOT-HERE .TBL .PRSO?>>
<COND (<NOT <==? .OBJ ,NOT-HERE-OBJECT>>
<RTRUE>)>)
(T
<RFALSE>)>)>)
(T
<COND (<VERB? ASK-ABOUT ASK-FOR
SEARCH-OBJECT-FOR SGIVE TELL-ME>
<COND (<SET OBJ <FIND-NOT-HERE .TBL .PRSO?>>
<COND (<NOT <==? .OBJ ,NOT-HERE-OBJECT>>
<RTRUE>)>)
(T
<RFALSE>)>)>)>
;"Here is the default 'cant see any' printer"
<SETG P-WON <>>
<TELL "(You can't see any">
<NOT-HERE-PRINT>
<TELL " here!)" CR>
<RTRUE>>
<ROUTINE FIND-NOT-HERE (TBL PRSO? "AUX" M-F OBJ)
;"Protocol: return T if case was handled and msg TELLed,
,NOT-HERE-OBJECT if 'can't see' msg TELLed,
<> if PRSO/PRSI ready to use"
;"Here is where special-case code goes. <MOBY-FIND .TBL> returns
number of matches. If 1, then P-MOBY-FOUND is it. One may treat
the 0 and >1 cases alike or different. It doesn't matter. Always
return RFALSE (not handled) if you have resolved the problem."
<SET M-F <MOBY-FIND .TBL>>
<COND (,DEBUG
<TELL "[Moby-found " N .M-F " objects" "]" CR>)>
<COND (<==? 1 .M-F>
<COND (,DEBUG <TELL "[Namely: " D ,P-MOBY-FOUND "]" CR>)>
<COND (.PRSO? <SETG PRSO ,P-MOBY-FOUND>)
(T <SETG PRSI ,P-MOBY-FOUND>)>
<RFALSE>)
(<AND <L? 1 .M-F>
<SET OBJ <APPLY <GETP <SET OBJ <GET .TBL 1>> ,P?GENERIC>
.OBJ>>>
;"Protocol: returns .OBJ if that's the one to use,
,NOT-HERE-OBJECT if case was handled and msg TELLed,
<> if WHICH-PRINT should be called"
<COND (,DEBUG <TELL "[Generic: " D .OBJ "]" CR>)>
<COND (<==? .OBJ ,NOT-HERE-OBJECT> <RTRUE>)
(.PRSO? <SETG PRSO .OBJ>)
(T <SETG PRSI .OBJ>)>
<RFALSE>)
(<OR <AND <NOT .PRSO?>
<VERB? ASK-ABOUT ASK-FOR TELL-ME>>
<AND .PRSO?
<VERB? ASK-CONTEXT-ABOUT ASK-CONTEXT-FOR>>
<AND <NOT <==? ,WINNER ,PLAYER>>
<VERB? FIND WHAT GIVE SGIVE>>>
<COND (<VERB? ASK-ABOUT ASK-FOR> <TELL D ,PRSO>)
(T <TELL D <COND (<AND ,QCONTEXT
<==? ,HERE ,QCONTEXT-ROOM>
<==? ,HERE <META-LOC ,QCONTEXT>>>
,QCONTEXT)
(<NOT <==? ,WINNER ,PLAYER>>
,WINNER)
(T <FIND-FLAG ,HERE ,PERSON>)>>)>
<TELL
" looks confused. \"I don't know anything about any">
<NOT-HERE-PRINT>
<TELL "!\"" CR>
<RTRUE>)
(<NOT .PRSO?>
<TELL "You wouldn't find any">
<NOT-HERE-PRINT>
<TELL " there." CR>
<RTRUE>)
(T ,NOT-HERE-OBJECT)>>
<ROUTINE NOT-HERE-PRINT ()
<COND (<OR ,P-OFLAG ,P-MERGED>
<COND (,P-XADJ <TELL " "> <PRINTB ,P-XADJN>)>
<COND (,P-XNAM <TELL " "> <PRINTB ,P-XNAM>)>)
(<EQUAL? ,PRSO ,NOT-HERE-OBJECT>
<BUFFER-PRINT <GET ,P-ITBL ,P-NC1> <GET ,P-ITBL ,P-NC1L> <>>)
(T
<BUFFER-PRINT <GET ,P-ITBL ,P-NC2> <GET ,P-ITBL ,P-NC2L> <>>)>>
;<ROUTINE NO-TOUCH ()
<TELL
"Only clods fool around with these things for no good reason." CR>>
<OBJECT IT
(IN GLOBAL-OBJECTS)
(SYNONYM IT THEM THEY)
(DESC "it")
(FLAGS NDESCBIT AN)
(ACTION IT-F)>
<ROUTINE IT-F ()
<COND (<OR <AND <IOBJ? IT>
<VERB? ASK-ABOUT ASK-FOR SEARCH-OBJECT-FOR TELL-ME>>
<AND <DOBJ? IT>
<VERB? ASK-CONTEXT-ABOUT ASK-CONTEXT-FOR FIND WHAT>>>
<TELL "\"I'm not sure what you're talking about.\"" CR>)>>
<ROUTINE THE? (NOUN)
<COND (<OR <EQUAL? .NOUN ,MONICA-ROOM ,LINDER-ROOM ,LIMBO>
<EQUAL? .NOUN ,PHONG ,LINDER ,STILES>
<EQUAL? .NOUN ,GLOBAL-PHONG ,GLOBAL-LINDER ,GLOBAL-STILES>
<EQUAL? .NOUN ,MONICA ,GLOBAL-MONICA ,GLOBAL-TERRY>
<EQUAL? .NOUN ,IT ,YOU ,HIM-HER>
<EQUAL? .NOUN ,LINDER-WINDOW ,GLOBAL-DUFFY>>
<RTRUE>)
(T <TELL " the">)>>
<ROUTINE THIS-IS-IT (OBJ)
<SETG P-IT-OBJECT .OBJ>
<SETG P-IT-LOC ,HERE>>
<OBJECT RECURSIVE-BOOK
(IN BUTLER-TABLE)
(DESC "mystery book")
(ADJECTIVE MYSTERY IMPORTANT)
(SYNONYM BOOK)
(FDESC "A book is sitting on the bed-side table.")
(FLAGS TAKEBIT READBIT CONTBIT)
(CAPACITY 4)
(ACTION RECURSIVE-BOOK-F)>
<ROUTINE RECURSIVE-BOOK-F ()
<COND (<AND <VERB? ASK-FOR> <DOBJ? PHONG>>
<FCLEAR ,PRSI ,NDESCBIT>
<RFALSE>)
(<AND <VERB? GIVE TAKE> <IN? ,RECURSIVE-BOOK ,PHONG>>
<FCLEAR ,PRSO ,NDESCBIT>
<RFALSE>)
(<AND <VERB? DROP> <IN? ,PHONG ,BUTLER-ROOM>>
<MOVE ,RECURSIVE-BOOK ,PHONG>
<TELL "Phong picks up the book and starts to read." CR>)
(<VERB? EXAMINE>
<TELL
"This is a mystery story called 'Deadline,' just now published as a book."
CR>)
(<VERB? SEARCH READ OPEN LOOK-INSIDE>
<FSET ,RECURSIVE-BOOK ,OPENBIT>
<TELL
"The book is a novel-length version of 'Deadline,' a whodunit set in the
future in Connecticut. You start to read it, and it seems oddly
familiar, as if you might live through it yourself some day.">
<COND (<IN? ,GUN-RECEIPT ,RECURSIVE-BOOK>
<FCLEAR ,GUN-RECEIPT ,INVISIBLE>
<TELL
" A receipt of some kind is being used as a bookmark.">)>
<CRLF>)>>
<OBJECT GUN-RECEIPT
(IN RECURSIVE-BOOK)
(ADJECTIVE GUN)
(SYNONYM RECEIPT PAPER TICKET BOOKMARK)
(DESC "gun receipt")
(FLAGS TAKEBIT READBIT INVISIBLE)
(SIZE 1)
(ACTION GUN-RECEIPT-F)>
<ROUTINE GUN-RECEIPT-F ()
<COND (<VERB? EXAMINE READ>
<PUT 0 8 <BOR <GET 0 8> 2>>
<TELL
"\" FRITZI'S|
fine merchandise - quick loans|
Cabeza Plana, Calif.|
Number: 69105|
Date: 12/1/37|
Sold to: Nemo Newbourne|
Address: 137 E. Second Street|
|
Two handguns - - - - - - - - - $ 8.00|
|
[PAID]\"" CR>
<PUT 0 8 <BAND <GET 0 8> -3>>
<RTRUE>)>>
<OBJECT TELEGRAM
(IN PLAYER)
(DESC "telegram")
(SYNONYM TELEGRAM)
(FLAGS TAKEBIT READBIT)
(SIZE 1)
(TEXT "(You'll find the telegram in your game package.)")>
<OBJECT MATCHBOOK
(IN PLAYER)
(DESC "match book")
(ADJECTIVE MATCH)
(SYNONYM MATCHBOOK BOOK MATCHES ;HANDWR ;NUMBER)
(FLAGS TAKEBIT READBIT)
(ACTION MATCHBOOK-F)
(SIZE 1)
(TEXT "(You'll find the match book in your game package.)")>
<ROUTINE MATCHBOOK-F ()
<COND (<VERB? LAMP-ON SLAP>
<TELL "The matches don't seem to work." CR>)
(<VERB? LOOK-INSIDE OPEN>
<TELL
"(You'll find the match book in your game package.)"
;"The book is full of matches, and there is a phone number written on the
inside flap." CR>)
(<AND <VERB? LOOK-UP> <PHONE-IN? ,HERE>>
<TELL
"The listing for Stiles in the phone book is the same as the number
written in the match book." CR>)>>
<OBJECT PISTOL
(IN PLAYER)
(DESC "snub-nosed Colt")
(ADJECTIVE SNUB-NOSED)
(SYNONYM COLT PISTOL GUN ROSCOE)
(GENERIC GENERIC-GUN-F)
(FLAGS TAKEBIT WEAPONBIT)>
<OBJECT HANDCUFFS
(IN PLAYER)
(DESC "pair of handcuffs")
(ADJECTIVE HAND)
(SYNONYM PAIR CUFFS HANDCUFF NIPPERS)
(FLAGS TAKEBIT TOOLBIT)
(ACTION HANDCUFFS-F)>
<ROUTINE HANDCUFFS-F ()
<COND (<AND <VERB? TAKE> <DOBJ? HANDCUFFS>>
<COND (<AND <==? ,HANDCUFFS ,MONICA-TIED-WITH>
<OR <NOT ,PRSI> <==? ,PRSI ,MONICA>>>
<PERFORM ,V?UNTIE ,MONICA>
<RTRUE>)
(T <RFALSE>)>)>>
<OBJECT HOUSE
(IN LOCAL-GLOBALS)
(DESC "house")
(SYNONYM HOUSE ;WALL)
(ADJECTIVE LINDER)
;(GENERIC WALL-F)
(ACTION HOUSE-F)>
<ROUTINE HOUSE-F ()
<COND (<VERB? FIND>
<TELL "It's right here. Some detective you are." CR>)
(<AND <VERB? WALK-TO>
<EQUAL? ,HERE ,DRIVEWAY-ENTRANCE ,DRIVEWAY>>
<PERFORM ,V?WALK ,P?NORTH>
<RTRUE>)
(<VERB? THROUGH>
<COND (<AND <EQUAL? ,HERE ,FRONT-YARD>
<FSET? ,DINING-DOOR ,OPENBIT>>
<GOTO ,DINING-ROOM>)
(<AND <EQUAL? ,HERE ,FRONT-PORCH>
<FSET? ,FRONT-DOOR ,OPENBIT>>
<GOTO ,ENTRY>)
(<AND <EQUAL? ,HERE ,OFFICE-PORCH>
<FSET? ,OFFICE-BACK-DOOR ,OPENBIT>>
<GOTO ,OFFICE>)
(<AND <EQUAL? ,HERE ,BACK-YARD>
<FSET? ,MONICA-BACK-DOOR ,OPENBIT>>
<GOTO ,MONICA-ROOM>)
(<AND <EQUAL? ,HERE ,ROCK-GARDEN>
<FSET? ,LINDER-BACK-DOOR ,OPENBIT>>
<GOTO ,LINDER-ROOM>)
(T
<TELL "You might try the front door." CR>)>)
(<VERB? EXAMINE>
<TELL ;"? more detail?"
"The house looks like a mixture of
a California bungalow and East Asian influences." CR>)>>
<OBJECT FENCE
(IN LOCAL-GLOBALS)
(DESC "fence")
(SYNONYM FENCE)
(ACTION FENCE-F)>
<ROUTINE FENCE-F ()
<COND (<VERB? CLIMB-FOO CLIMB-ON CLIMB-UP>
<TELL
"You can't leave the property yet. It would mean your job." CR>)
(<VERB? LOOK-BEHIND LOOK-INSIDE LOOK-OUTSIDE>
<TELL "It's too dark to see anything." CR>)
(<VERB? FIND>
<TELL "It's right here. Some detective you are." CR>)
(<VERB? EXAMINE>
<TELL
"This is a Japanese-style \"shadow fence\" made of wooden slats, opaque
from most angles but designed to let breezes through." CR>)>>
<OBJECT GROUND
(IN GLOBAL-OBJECTS)
(DESC "ground")
(ADJECTIVE MUDDY)
(SYNONYM GROUND DIRT MUD ;SOIL AREA)
(ACTION GROUND-F)>
<ROUTINE GROUND-F ()
<COND (<AND <DOBJ? GROUND>
<VERB? ASK-CONTEXT-ABOUT ASK-CONTEXT-FOR FIND WHAT>>
<RFALSE>)
(<AND <IOBJ? GROUND>
<VERB? ASK-ABOUT ASK-FOR SEARCH-OBJECT-FOR TELL-ME>>
<RFALSE>)
(<NOT <==? <GETP ,HERE ,P?LINE> ,OUTSIDE-LINE-C>>
<SETG P-WON <>>
<TELL "(You can't see any" PRSO " here!)" CR>)
(<AND <VERB? PUT> <IOBJ? GROUND>>
<PERFORM ,V?DROP ,PRSO>
<RTRUE>)
(<VERB? EXAMINE SEARCH>
<TELL "You don't find anything new there." CR>)>>
<OBJECT FLOOR
(IN GLOBAL-OBJECTS)
(DESC "floor")
(SYNONYM FLOOR AREA)
(ACTION FLOOR-F)>
<ROUTINE FLOOR-F ()
<COND (<AND <DOBJ? FLOOR>
<VERB? ASK-CONTEXT-ABOUT ASK-CONTEXT-FOR FIND WHAT>>
<RFALSE>)
(<AND <IOBJ? FLOOR>
<VERB? ASK-ABOUT ASK-FOR SEARCH-OBJECT-FOR TELL-ME>>
<RFALSE>)
(<==? <GETP ,HERE ,P?LINE> ,OUTSIDE-LINE-C>
<SETG P-WON <>>
<TELL "(You can't see any" PRSO " here!)" CR>)
(<AND <VERB? PUT> <IOBJ? FLOOR>>
<PERFORM ,V?DROP ,PRSO>
<RTRUE>)
(<VERB? EXAMINE SEARCH>
<TELL "You don't find anything new there." CR>)>>
<OBJECT BRASS-LANTERN
(IN GLOBAL-OBJECTS)
(DESC "Brass Lantern")
(ADJECTIVE BRASS)
(SYNONYM LANTERN RESTAURANT)>
<OBJECT MUSIC
(IN GLOBAL-OBJECTS)
(DESC "music")
(SYNONYM MUSIC PROGRAM)
(ACTION MUSIC-F)>
<ROUTINE MUSIC-F ()
<COND (<VERB? LISTEN>
<COND (,RADIO-ON
<TELL
"You're too far away to make out what it is." CR>)
(T <TELL
"You'd enjoy it more if you turned on the radio." CR>)>)>>
<OBJECT SCOTCH
(IN LIQUOR-CABINET)
(DESC "bottle of Scotch")
(FDESC
"A half-filled bottle of Teacher's \"Highland Cream\" Scotch Whisky is
in the cabinet.")
(ADJECTIVE SCOTCH TEACHER)
(SYNONYM BOTTLE SCOTCH WHISKY WHISKEY)
(FLAGS TAKEBIT CONTBIT)
(ACTION LIQUOR-F)>
<OBJECT BOURBON
(IN LIQUOR-CABINET)
(DESC "bottle of Bourbon")
(FDESC
"A nearly-empty bottle of \"Jack Daniels\" Bourbon Whisky is in the
cabinet.")
(ADJECTIVE BOURBON JACK DANIEL)
(SYNONYM BOTTLE BOURBON WHISKY WHISKEY)
(FLAGS TAKEBIT CONTBIT)
(ACTION LIQUOR-F)>
<OBJECT DRINK
(IN GLOBAL-OBJECTS)
(DESC "drink")
(SYNONYM DRINK COCKTAIL BELT)
;(FLAGS TAKEBIT)
(ACTION LIQUOR-F)>
<ROUTINE SEEKING-DRINK? ()
<COND (<VERB? GIVE>
<COND (<AND <IOBJ? PLAYER> <NOT <==? ,WINNER ,PLAYER>>>
<RTRUE>)>)
(<VERB? SGIVE>
<COND (<AND <DOBJ? PLAYER> <NOT <==? ,WINNER ,PLAYER>>>
<RTRUE>)>)
(<VERB? ASK-FOR>
<COND (<FSET? ,PRSO ,PERSON>
<RTRUE>)>)
(<VERB? TAKE>
<COND (<FIND-FLAG ,HERE ,PERSON>
<RTRUE>)
(<AND ,PRSI <FSET? ,PRSI ,PERSON>>
<RTRUE>)>)>>
<GLOBAL DRUNK-FLAG <>>
<ROUTINE LIQUOR-F ()
<COND (<AND ,LINDER-FOLLOWS-YOU
<VERB? EXAMINE>>
<TELL
"Linder is drinking something that looks like whisky, straight up." CR>)
(<SEEKING-DRINK?>
<COND (,DRUNK-FLAG <NO-DRINK> <RTRUE>)>
<SETG DRUNK-FLAG T>
<COND (<EQUAL? ,MONICA ,WINNER ,PRSO ,PRSI>
<TELL
"\"So you want to dip your beak? Go ahead.\"" CR>)
(T
<MOVE ,DRINK ,PLAYER>
<FSET ,DRINK ,TAKEBIT>
<TELL
"\"I think we both need one.\" And so you both have one." CR>)>)
(<OR <VERB? DRINK>
<AND <VERB? OPEN> <DOBJ? SCOTCH BOURBON>>>
<COND (,DRUNK-FLAG <NO-DRINK> <RTRUE>)
(T
<SETG DRUNK-FLAG T>
<MOVE ,DRINK ,PLAYER>
<FSET ,DRINK ,TAKEBIT>
<TELL
"You take a belt of the stuff and roll it on your tongue before
swallowing. It's good whisky." CR>)>)>>
<ROUTINE NO-DRINK ()
<TELL
"You could drink this stuff all night, but you have work to do." CR>>
<OBJECT CIGARETTE
(IN GLOBAL-OBJECTS)
(DESC "cigarette")
(SYNONYM CIGARETTE SMOKE WEED CAMEL)
(FLAGS LIGHTBIT)
(SIZE 1)
(ACTION CIGARETTE-F)>
<ROUTINE CIGARETTE-F ()
<COND (<VERB? FIND SEARCH SEARCH-OBJECT-FOR>
<TELL
"Like any hard-boiled police detective, you must have a pack on you
somewhere." CR>)
(<VERB? EXAMINE>
<COND (<EQUAL? ,HERE ,KITCHEN>
<TELL "Phong's cigarettes are Lucky Strikes." CR>)
(T <TELL "All you can see is an ashtray full of butts." CR>)>)
(<VERB? SMOKE>
<TELL
"You light up a Camel, take a deep drag, and watch the smoke drift
through the air. A few more puffs, and you're ready to go to work
again." CR>)
(<OR <AND <VERB? GIVE TURN> <IOBJ? PLAYER> <NOT <==? ,WINNER ,PLAYER>>>
<AND <VERB? SGIVE> <DOBJ? PLAYER> <NOT <==? ,WINNER ,PLAYER>>>
<AND <VERB? ASK-FOR> <FSET? ,PRSO ,PERSON>>
<AND <VERB? TAKE>
<OR <FIND-FLAG ,HERE ,PERSON ,WINNER> ;<NOT ,PRSI>
<FSET? ,PRSI ,PERSON>>>>
<TELL
"\"I think we both need one.\" And so you both have one." CR>)>>
<OBJECT THREAT-NOTE
(DESC "threatening note")
(IN OFFICE-DESK)
(ADJECTIVE HAND WRITTEN HAND-WRITTEN STILES THREAT)
(SYNONYM NOTE ;LETTER ;HANDWR)
(FLAGS TAKEBIT READBIT INVISIBLE)
(SIZE 1)
(TEXT
"The note is written in a spidery hand on fine rag paper. It says:|
\"Linder --|
Since Virginia died, I've lost too much sleep because of you and
your harrassments. The time has come to put this matter to rest
once and for all. I'll be seeing you sooner than you imagine.|
-- Stiles\"")>
<OBJECT BROKEN-GLASS
(IN LOCAL-GLOBALS)
(DESC "pile of broken glass")
(ADJECTIVE BROKEN)
(SYNONYM PILE GLASS FRAGMENT SHARD)
(FLAGS INVISIBLE TRYTAKEBIT NDESCBIT)
(ACTION BROKEN-GLASS-F)>
<ROUTINE BROKEN-GLASS-F ()
<COND (<VERB? TAKE>
<TELL "You'd probably cut yourself on the sharp edges." CR>)>>
<OBJECT BROOM
(IN STORAGE-CLOSET)
(DESC "broom")
(LDESC "A broom is standing in the corner.")
(SYNONYM BROOM)
(FLAGS TAKEBIT)
;(ACTION BROKEN-GLASS-F)>
<OBJECT INSIDE-GUN
(IN CLOCK)
(DESC "hidden handgun")
(ADJECTIVE NEW CLOCK HIDDEN HAND)
(SYNONYM GUN HANDGUN PISTOL HEATER)
(FLAGS TAKEBIT WEAPONBIT INVISIBLE)
;(SIZE 2)
(GENERIC GENERIC-GUN-F)
(ACTION INSIDE-GUN-F)>
<OBJECT OUTSIDE-GUN
(IN PHONG)
(DESC "muddy handgun")
(ADJECTIVE OLD MUDDY HAND)
(SYNONYM GUN HANDGUN PISTOL HEATER)
(FLAGS TAKEBIT WEAPONBIT INVISIBLE)
;(SIZE 2)
(GENERIC GENERIC-GUN-F)
(ACTION OUTSIDE-GUN-F)>
<GLOBAL GUNS-MATCHED <>>
<ROUTINE INSIDE-GUN-F ()
<COND (<AND <VERB? COMPARE>
<OR <DOBJ? OUTSIDE-GUN> <IOBJ? OUTSIDE-GUN>>>
<COND (<==? ,P-ADVERB ,W?CAREFULLY>
<SETG GUNS-MATCHED T>
<TELL
"The two guns are virtually identical,"
" except that one has a very short barrel." CR>)
(T
<TELL
"The two guns appear to be very similar,"
" except that one has a very short barrel." CR>)>)
(<VERB? EXAMINE ;ANALYZE ;FINGERPRINT>
<TELL
"Y" "ou can see it's just a cheap low-quality handgun."
" The barrel is very short, as if someone sawed it off." CR>)
(<VERB? OPEN>
<TELL
"You open the gun, find no spare bullets inside, and close it again." CR>)
(<VERB? SMELL>
<TELL "It smells as though it's recently been fired." CR>)>>
<ROUTINE OUTSIDE-GUN-F ()
<COND (<VERB? EXAMINE ;ANALYZE ;FINGERPRINT>
<TELL
"The gun is muddy from the ground, but y"
"ou can see it's just a cheap low-quality handgun." CR>)
(<VERB? OPEN>
<TELL
"You open the gun, find no spare bullets inside, and close it again." CR>)
(<VERB? SMELL>
<TELL "It smells as though it's recently been fired." CR>)>>
<ROUTINE GENERIC-GUN-F (OBJ)
<COND (<VERB? ASK-ABOUT ASK-CONTEXT-ABOUT ASK-FOR ASK-CONTEXT-FOR
FIND TELL-ME WHAT
GIVE SGIVE SEARCH-OBJECT-FOR TAKE>
,GENERIC-GUN)
(<EQUAL? <LOC ,PISTOL> ,PLAYER ,HERE> <RFALSE>)
(T
<SETG P-WON <>>
<TELL "(You can't see any " "gun" " here!)" CR>
,NOT-HERE-OBJECT)>>
<OBJECT GENERIC-GUN
(IN GLOBAL-OBJECTS)
(DESC "handgun")
(SYNONYM $GNRC)>
<OBJECT GLOBAL-SHOT
(IN GLOBAL-OBJECTS)
(DESC "shot")
(ADJECTIVE GUN)
(SYNONYM SHOT GUNSHOT SHOOTING EXPLOSION)
(FLAGS INVISIBLE)>
<GLOBAL LINDER-SAW-MEDICAL-REPORT <>>
<GLOBAL MONICA-SAW-MEDICAL-REPORT <>>
<GLOBAL DUFFY-SAW-MEDICAL-REPORT <>>
<OBJECT MEDICAL-REPORT
(IN MONICA-ROOM)
(DESC "medical report")
(ADJECTIVE MEDICAL)
(SYNONYM REPORT PAPER)
(FLAGS TAKEBIT READBIT INVISIBLE)
(SIZE 1)
(TEXT
"After sifting through the medical officialese, you realize that the
report says that Linder has an advanced stomach tumor, and
that his death will come slowly and painfully.")>
<OBJECT AUTOPSY
(IN GLOBAL-OBJECTS)
(DESC "autopsy")
(SYNONYM AUTOPSY)
(FLAGS AN)>
<GLOBAL MONICA-SAW-CORONER-REPORT <>>
<OBJECT CLOCK-KEY
(IN MONICA)
(ADJECTIVE CLOCK)
(SYNONYM KEY)
(DESC "clock key")
(FLAGS TAKEBIT ;NDESCBIT TOOLBIT INVISIBLE)
(GENERIC GENERIC-KEY-F)
(SIZE 1)>
<OBJECT PHONG-KEYS
(IN PHONG)
(ADJECTIVE ;PHONG HOUSE)
(SYNONYM KEY KEYS SET)
(DESC "set of house keys")
(FLAGS TAKEBIT NDESCBIT TOOLBIT)
(GENERIC GENERIC-KEY-F)
(ACTION PHONG-KEYS-F)>
<ROUTINE PHONG-KEYS-F ()
<COND (<OR <AND <VERB? GIVE> <IOBJ? PLAYER> <==? ,WINNER ,PHONG>>
<AND <VERB? TAKE> <IN? ,PHONG-KEYS ,PHONG>>>
<COND (,PHONG-SEEN-CORPSE?
<MOVE ,PHONG-KEYS ,PLAYER>
<FCLEAR ,PHONG-KEYS ,NDESCBIT>
<TELL
"\"Here, you may as well take them. I don't see how Mr. Linder can
object now.\"" CR>)
(T <TELL
"\"I don't think Mr. Linder would like that.\"" CR>)>)>>
<ROUTINE GENERIC-KEY-F (OBJ)
<COND (<VERB? ASK-ABOUT ASK-CONTEXT-ABOUT ASK-FOR ASK-CONTEXT-FOR
FIND TELL-ME WHAT
GIVE SGIVE SEARCH-OBJECT-FOR TAKE>
,GENERIC-KEY)
(<EQUAL? <LOC ,PHONG-KEYS> ,PLAYER ,HERE> <RFALSE>)
(T
<SETG P-WON <>>
<TELL "(You can't see any " "key" " here!)" CR>
,NOT-HERE-OBJECT)>>
<OBJECT GENERIC-KEY
(IN GLOBAL-OBJECTS)
(SYNONYM $GNRC)
(DESC "key")>
<OBJECT HANDWRITING
(IN GLOBAL-OBJECTS)
(SYNONYM HANDWRITING WRITING)
(DESC "handwriting")
(ACTION HANDWRITING-F)>
<ROUTINE HANDWRITING-F ()
<COND (<AND <VERB? ANALYZE> <DOBJ? HANDWRITING> <NOT ,PRSI>
<EQUAL? ,PLAYER <LOC ,MATCHBOOK> <LOC ,THREAT-NOTE>>>
<TELL "You didn't say what to analyze the handwriting on." CR>)>>
<OBJECT GLOBAL-FINGERPRINTS
(IN GLOBAL-OBJECTS)
(SYNONYM FINGERPRINT)
(DESC "fingerprints")
(ACTION GLOBAL-FINGERPRINTS-F)>
<ROUTINE GLOBAL-FINGERPRINTS-F ()
<COND (<AND <VERB? TAKE> <==? ,PRSO ,GLOBAL-FINGERPRINTS>>
<COND (<NOT ,PRSI>
<TELL
"You didn't say what to take the fingerprints from." CR>)
(T
<PERFORM ,V?FINGERPRINT ,PRSI>
<RTRUE>)>)>>
"Global objects"
<OBJECT GLOBAL-MURDER
(IN GLOBAL-OBJECTS)
(DESC "murder")
(SYNONYM MURDER KILLING CRIME)>
<OBJECT GLOBAL-SUICIDE
(IN GLOBAL-OBJECTS)
(DESC "suicide")
(ADJECTIVE LATE MRS LINDER MOTHER VIRGINIA HER)
(SYNONYM SUICIDE)
(ACTION GLOBAL-SUICIDE-F)>
<ROUTINE GLOBAL-SUICIDE-F ("AUX" STR)
<COND (<AND <VERB? FIND> <NOT <EQUAL? ,WINNER ,PLAYER>>>
<TELL "\"She shot herself in the bathtub.\"" CR>)>>
<OBJECT RANDOM-CRIME
(IN GLOBAL-OBJECTS)
(DESC "other crime")
(FLAGS AN)
(ADJECTIVE OTHER MERCY)
(SYNONYM CRIME KILLING CONSPIRACY EUTHANASIA)>
<OBJECT GLOBAL-PTA
(IN GLOBAL-OBJECTS)
(DESC "Pacific Trade Associates")
(ADJECTIVE PACIFIC TRADE)
(SYNONYM ASSOCIATES COMPANY PTA BUSINESS)>
<OBJECT DANGER
(IN GLOBAL-OBJECTS)
(DESC "danger")
(SYNONYM DANGER THREAT WRONG PROBLEM)>
<OBJECT GLOBAL-WEATHER
(IN GLOBAL-OBJECTS)
(DESC "weather")
(SYNONYM WEATHER CLIMATE)>
<OBJECT TELEPHONE
(IN LOCAL-GLOBALS)
(DESC "telephone")
(SYNONYM TELEPHONE PHONE RECEIVER)
(FLAGS TRYTAKEBIT)
(ACTION TELEPHONE-F)>
<ROUTINE TELEPHONE-F ()
<COND (<VERB? PHONE>
<TELL
"You should type what number to call, for example \"DIAL HYACINTH
1031.\"" CR>)
(<VERB? REPLY> <TELL "Don't bother unless it rings." CR>)
(<VERB? RAISE TAKE>
<TELL "You lift the receiver and get a dial tone. Well done!" CR>)>>
<OBJECT CORONER
(IN GLOBAL-OBJECTS)
(DESC "coroner")
(SYNONYM CORONER DOCTOR AMBULANCE MORGUE ;POLICE)
(ACTION CORONER-F)>
<ROUTINE CORONER-F ()
<COND (<AND <VERB? PHONE> <PHONE-IN? ,HERE>>
<COND (<PROB 69>
<TELL
"You dial the number and wait a long time for someone to answer.
Finally you hear a voice: \"We're awful busy here. Call back in ten
minutes.\" He hangs up before you can say a word." CR>)
(T <TELL "You dial the number and get a busy signal." CR>)>)>>
<OBJECT BUTTON
(IN GLOBAL-OBJECTS)
(ADJECTIVE BUTLER)
(SYNONYM BUTTON)
(DESC "butler's button")
(FLAGS NDESCBIT)
(ACTION BUTTON-F)>
<ROUTINE BUTTON-F ()
<COND (<==? ,HERE ,FRONT-PORCH>
<COND (<IOBJ? BUTTON> <PERFORM ,PRSA ,PRSO ,DOORBELL> <RTRUE>)
(<DOBJ? BUTTON> <PERFORM ,PRSA ,DOORBELL ,PRSI> <RTRUE>)>
<RFALSE>)
(<OUTSIDE? ,HERE>
<TELL "There's no button here." CR>)
(<VERB? PUSH RING>
<COND (<IN? ,PHONG ,HERE>
<TELL
"Phong looks annoyed. \"You needn't ring for me. I'm right here.\"" CR>)
(T
<YOU-RANG>
<TELL "You barely hear a bell ring in the distance." CR>)>)>>
<ROUTINE YOU-RANG ()
<COND (<NOT <GET <GET ,GOAL-TABLES ,PHONG-C> ,GOAL-S>>
<SETG PHONG-CALLED T>
<SETG PHONG-OLD-LOC <LOC ,PHONG>>
<ESTABLISH-GOAL ,PHONG ,HERE>)>>
<OBJECT BLACK-WIRE
(IN GLOBAL-OBJECTS)
(ADJECTIVE BLACK)
(SYNONYM WIRE WIRES)
(DESC "black wire")
(FLAGS NDESCBIT)
(GENERIC GENERIC-WIRE-F)
(ACTION BLACK-WIRE-F)>
<ROUTINE BLACK-WIRE-F ()
<COND (<==? <GETP ,HERE ,P?LINE> ,OUTSIDE-LINE-C>
<TELL "There's no wire here." CR>)
(<AND <DOBJ? WHITE-WIRE>
<NOT <EQUAL? ,HERE ,WORKSHOP>>
<NOT <WINDOW-IN? ,HERE>>>
<TELL "There's no white wire here." CR>)
(<VERB? EXAMINE>
<COND (<DOBJ? BLACK-WIRE>
<COND (<EQUAL? ,HERE ,WORKSHOP>
<TELL
"You can see several kinds of " "black" " wire on spools, not to mention the
snarl in the junction box." CR>)
(T <TELL
"A pair of black wires goes from the butler's button into the floor." CR>)>)
(<EQUAL? ,HERE ,WORKSHOP>
<TELL
"You can see several kinds of " "white" " wire on spools, not to mention the
snarl in the junction box." CR>)
(T <TELL
"A pair of white wires goes from some sort of electric switch on the "
<COND (<EQUAL? ,HERE ,ENTRY ,GARAGE> "door") (T "sash")>
" into the frame." CR>)>)
(<VERB? FOLLOW>
<COND (<DOBJ? BLACK-WIRE>
<TELL "The wire goes into the floor and disappears." CR>)
(<EQUAL? ,HERE ,WORKSHOP>
<TELL "It just goes around and around the spools." CR>)
(T
<TELL "The wire goes into the wall and disappears." CR>)>)
(<VERB? TAKE>
<TELL "You don't really want to do that." CR>)>>
<OBJECT WHITE-WIRE
(IN GLOBAL-OBJECTS)
(ADJECTIVE WHITE)
(SYNONYM WIRE WIRES)
(DESC "white wire")
(FLAGS NDESCBIT)
(GENERIC GENERIC-WIRE-F)
(ACTION BLACK-WIRE-F)>
<OBJECT GLOBAL-AFFAIR
(IN GLOBAL-OBJECTS)
(DESC "love affair")
(ADJECTIVE LOVE VIRGINIA STILES)
(SYNONYM AFFAIR)>
<OBJECT MUDDY-SHOES
(IN SHOE-PLATFORM)
(DESC "pair of muddy boots")
(ADJECTIVE MUDDY DIRTY ADOBE GARDEN)
(SYNONYM BOOT BOOTS PAIR MUD)
(FLAGS TAKEBIT NDESCBIT INVISIBLE)
(ACTION MUDDY-SHOES-F)>
<ROUTINE MUDDY-SHOES-F ()
<COND (<AND <VERB? COMPARE PUT>
<OR <DOBJ? BACK-FOOTPRINTS BACK-FOOTPRINTS-CAST>
<IOBJ? BACK-FOOTPRINTS BACK-FOOTPRINTS-CAST>>>
<TELL
"The boots don't seem to match " ;"the plaster cast of "
"the foot prints that you found in the " "back yard." CR>)
(<AND <VERB? COMPARE PUT>
<OR <DOBJ? SIDE-FOOTPRINTS SIDE-FOOTPRINTS-CAST>
<IOBJ? SIDE-FOOTPRINTS SIDE-FOOTPRINTS-CAST>>>
<COND (<OR <VERB? PUT> <==? ,P-ADVERB ,W?CAREFULLY>>
<SETG SIDE-FOOTPRINTS-MATCHED T>
<TELL
"The boots and the foot prints match each other perfectly." CR>)
(T
<TELL
"The boots appear to be similar to " ;"the plaster cast of "
"the foot prints that you found in the " "side yard." CR>)>)
(<VERB? EXAMINE>
<TELL
"They're just ordinary gardening boots, with some fresh adobe mud around the
bottom." CR>)
(<VERB? TAKE>
<FCLEAR ,MUDDY-SHOES ,NDESCBIT>
<RFALSE>)>>
<OBJECT CHAIR
(IN LOCAL-GLOBALS)
(DESC "chair")
(SYNONYM CHAIR CHAIRS)
(FLAGS NDESCBIT FURNITURE)>
<OBJECT LAMP
(IN LOCAL-GLOBALS)
(DESC "lamp")
(SYNONYM LAMP)
(FLAGS NDESCBIT FURNITURE ONBIT)>
<OBJECT BED
(IN LOCAL-GLOBALS)
(DESC "bed")
(SYNONYM BED)
(FLAGS NDESCBIT SURFACEBIT CONTBIT OPENBIT FURNITURE VEHBIT)
(CAPACITY 30)
(ACTION BED-F)>
<ROUTINE BED-F ("OPTIONAL" (RARG 100))
<COND (<NOT <==? .RARG 100>> <RFALSE>)
(<AND <VERB? EXAMINE LOOK-INSIDE LOOK-ON>
<==? ,HERE ,MONICA-ROOM>
<IN? ,MONICA ,MONICA-ROOM>>
<TELL "Monica is lying on her bed, softly sobbing." CR>)
(<VERB? LOOK-UNDER>
<TELL
"If you wanted to find the bogey man, you're out of luck." CR>)>>
<OBJECT GLOBAL-CALL
(IN GLOBAL-OBJECTS)
(DESC "telephone call")
(ADJECTIVE TELEPHONE PHONE)
(SYNONYM CALL ;CONVERSATION LEFT RIGHT)
(ACTION GLOBAL-CALL-F)>
<ROUTINE GLOBAL-CALL-F ()
<COND (<VERB? TURN WALK>
<TELL "(Use compass directions to move around here.)" CR>)>>
<OBJECT MONEY
(IN GLOBAL-OBJECTS)
(SYNONYM MONEY LOOT PAYOFF BRIBE)
(DESC "money")
;(ACTION MONEY-F)>
<OBJECT WILL
(IN GLOBAL-OBJECTS)
(ADJECTIVE LINDER HIS)
(SYNONYM WILL TESTAMENT)
(DESC "Linder's will")>
<OBJECT INTNUM
(IN GLOBAL-OBJECTS)
(SYNONYM INTNUM)
(DESC "number")
;(ACTION INTNUM-F)>
<OBJECT TUMOR
(IN GLOBAL-OBJECTS)
(DESC "tumor")
(FLAGS INVISIBLE)
(ADJECTIVE ADVANCED STOMACH)
(SYNONYM TUMOR TUMOUR CANCER CARCINOMA)>
<OBJECT CORPSE
(IN OFFICE ;CARVED-CHAIR)
(DESC "body of Mr. Linder")
(ADJECTIVE MR BLOODY)
(SYNONYM BODY LINDER CORPSE WOUND ;STIFF)
(FLAGS INVISIBLE TAKEBIT ;NDESCBIT)
(SIZE 101)
(DESCFCN CORPSE-F)
(ACTION CORPSE-F)>
<ROUTINE CORPSE-F ("OPTIONAL" (ARG <>)
"AUX" (T <- ,PRESENT-TIME ,MURDER-TIME>))
<COND (<==? .ARG ,M-OBJDESC>
<TELL
"The body of Mr. Linder is still crumpled in a heap on the floor." CR>
<RTRUE>)
(<AND <VERB? ANALYZE> <DOBJ? CORPSE>>
<COND (<IOBJ? TUMOR> <SETG DUFFY-SAW-MEDICAL-REPORT T>)>
<TELL "Only the coroner can do that." CR>)
(<AND <VERB? ARREST> <DOBJ? CORPSE>> <ARREST ,GLOBAL-LINDER>)
(<AND <VERB? ASK-ABOUT ASK-FOR TELL PHONE $CALL> <DOBJ? CORPSE>>
<TELL "Talking to corpses will get you nowhere." CR>
,M-FATAL)
(<AND <VERB? TAKEOUT> ;"TAKE CORPSE OUTSIDE"
<IOBJ? OFFICE-BACK-DOOR MONICA-BACK-DOOR LINDER-BACK-DOOR>>
<TELL "You can't move" THE-PRSO "." CR>)
(<VERB? TIE-TO TIE-WITH>
<TELL "Don't tell me you think the body's going to run away!" CR>)
(<VERB? EXAMINE RUB>
<COND (<L? .T 10>
<TELL