-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathverbs.zil
3056 lines (2719 loc) · 75.1 KB
/
verbs.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
"VERBS for ANTHILL (C)1986 Infocom Inc. All Rights Reserved."
;"subtitle describers: Mondo-tweked by Lebs for SEM from Leather"
<ROUTINE DESCRIBE-ROOM ("OPTIONAL" (VERB-IS-LOOK <>)
"AUX" (FIRST-VISIT <>))
<COND (<AND <NOT ,LIT>
<NOT <EQUAL? ,HERE ,ON-POOL-2>>>
<NOW-BLACK>
<CRLF>
<RFALSE>)>
<COND (<NOT <FSET? ,HERE ,TOUCHBIT>>
<FSET ,HERE ,TOUCHBIT>
<SET FIRST-VISIT T>)>
<TELL D ,HERE>
<COND (<FSET? <LOC ,PLAYER> ,VEHBIT>
<TELL ", on" T <LOC ,PLAYER>>)>
<CRLF>
<COND (<OR .VERB-IS-LOOK
<EQUAL? ,VERBOSITY 2>
<AND .FIRST-VISIT
<EQUAL? ,VERBOSITY 1>>>
;<TELL " 1 "> ;"when you enter room or do a look"
<COND (<NOT <APPLY <GETP ,HERE ,P?ACTION> ,M-LOOK>>
<TELL <GETP ,HERE ,P?LDESC>>)>
<CRLF>)>
<RTRUE>>
;"Print FDESCs, then DESCFCNs and LDESCs, then everything else. DESCFCNs
must handle M-OBJDESC? by RTRUEing (but not printing) if the DESCFCN would
like to handle printing the object's description. RFALSE otherwise. DESCFCNs
are responsible for doing the beginning-of-paragraph indentation."
<ROUTINE DESCRIBE-OBJECTS ("AUX" O STR (1ST? T) (AV <LOC ,WINNER>))
<SET O <FIRST? ,HERE>>
<COND (<NOT .O>
<RFALSE>)>
<REPEAT () ;"FDESCS and MISC."
<COND (<NOT .O>
<RETURN>)
(<AND <DESCRIBABLE? .O>
<NOT <FSET? .O ,TOUCHBIT>>
<SET STR <GETP .O ,P?FDESC>>>
<TELL CR ;" 2 " .STR>
<COND (<FSET? .O ,CONTBIT>
<DESCRIBE-CONTENTS .O T <+ ,D-ALL? ,D-PARA?>>)>
<CRLF>)>
<SET O <NEXT? .O>>>
<SET O <FIRST? ,HERE>>
<SET 1ST? T>
<REPEAT () ;"DESCFCNS"
<COND (<NOT .O>
<RETURN>)
(<OR <NOT <DESCRIBABLE? .O>>
<AND <GETP .O ,P?FDESC>
<NOT <FSET? .O ,TOUCHBIT>>>>
T)
(<AND <SET STR <GETP .O ,P?DESCFCN>>
<SET STR <APPLY .STR ,M-OBJDESC>>>
<COND (<AND <FSET? .O ,CONTBIT>
<N==? .STR ,M-FATAL>>
<DESCRIBE-CONTENTS .O T <+ ,D-ALL? ,D-PARA?>>)>
<CRLF>)
(<SET STR <GETP .O ,P?LDESC>>
<TELL ;" 3 " .STR> ;"don't forget to change this"
<COND (<FSET? .O ,CONTBIT>
<DESCRIBE-CONTENTS .O T <+ ,D-ALL? ,D-PARA?>>)>
<CRLF>)>
<SET O <NEXT? .O>>>
<DESCRIBE-CONTENTS ,HERE <> 0>
<COND (<AND .AV <NOT <EQUAL? ,HERE .AV>>>
<DESCRIBE-CONTENTS .AV <> 0>)>>
<CONSTANT D-ALL? 1> ;"print everything?"
<CONSTANT D-PARA? 2> ;"started paragraph?"
"<DESCRIBE-CONTENTS ,OBJECT-WHOSE-CONTENTS-YOU-WANT-DESCRIBED
level: -1 means only top level
0 means top-level (include crlf)
1 for all other levels
or string to print
all?: t if not being called from room-desc >"
<ROUTINE DESCRIBE-CONTENTS (OBJ "OPTIONAL" (LEVEL -1) (ALL? ,D-ALL?)
"AUX" (F <>) N (1ST? T) (IT? <>)
(START? <>) (TWO? <>) (PARA? <>))
<COND (<EQUAL? .LEVEL 2> ;"what is level 2?"
<SET LEVEL T>
<SET PARA? T>
<SET START? T>)
(<BTST .ALL? ,D-PARA?>
<SET PARA? T>)>
<SET N <FIRST? .OBJ>>
<COND (<OR .START?
<IN? .OBJ ,ROOMS>
<FSET? .OBJ ,ACTORBIT>
<AND <FSET? .OBJ ,CONTBIT>
<OR <FSET? .OBJ ,OPENBIT>
<FSET? .OBJ ,TRANSBIT>>
<FSET? .OBJ ,SEARCHBIT>
.N>>
<REPEAT ()
<COND (<OR <NOT .N>
<AND <DESCRIBABLE? .N>
<OR <BTST .ALL? ,D-ALL?>
<SIMPLE-DESC? .N>>>>
<COND
(.F
<COND
(.1ST?
<SET 1ST? <>>
<COND (<EQUAL? .LEVEL <> T>
<COND (<NOT .START?>
<COND (<NOT .PARA?>
<COND (<NOT <EQUAL? .OBJ
,PLAYER>>
;<TELL " 4 ">
<CRLF>
;"4--You can see a foo here or Sitting on the foo is a... ")>
<SET PARA? T>)
(<EQUAL? .LEVEL T>
<TELL " ">)>
<COND (<EQUAL? .OBJ ,HERE>
<TELL ,YOU-SEE>)
(<EQUAL? .OBJ ,PLAYER>
<TELL "You have">)
(<FSET? .OBJ ,SURFACEBIT>
<TELL "Sitting on" T .OBJ " is">)
(T
<TELL "It looks as if" T .OBJ>
<COND (<FSET? .OBJ ,ACTORBIT>
<TELL " has">)
(T
<TELL " contains">)>)>)>)
(<NOT <EQUAL? .LEVEL -1>>
<TELL .LEVEL>)>)
(T
<COND (.N
<TELL ",">)
(T
<TELL " and">)>)>
<TELL A .F>
<COND (<FSET? .F ,WORNBIT>
<COND ;(<EQUAL? .F ,LIP-BALM>
<TELL " (smeared all over your lips)">)
;(<EQUAL? .F ,COTTON-BALLS>
<TELL " (stuffed in " 'EARS ")">)
;(<EQUAL? .F ,CLOTHES-PIN>
<TELL " (pinned to " 'NOSE ")">)
(T
<TELL " (being worn)">)>)
(<FSET? .F ,ONBIT>
<TELL " (providing light)">)
;(<EQUAL? .F ,COMIC-BOOK>
<TELL " (stuck in your back pocket)">)>
<COND (<AND <NOT .IT?> <NOT .TWO?>>
<SET IT? .F>)
(T
<SET TWO? T>
<SET IT? <>>)>)>
<SET F .N>)>
<COND (.N
<SET N <NEXT? .N>>)>
<COND (<AND <NOT .F>
<NOT .N>>
<COND (<AND .IT?
<NOT .TWO?>>
<THIS-IS-IT .IT?>)>
<COND (<AND .1ST? .START?>
;<SET 1ST? <>>
<TELL " nothing">
<RFALSE>)>
<COND (<AND <NOT .1ST?>
<EQUAL? .LEVEL <> T>>
<COND (<EQUAL? .OBJ ,HERE>
<TELL " here">)>
<TELL ".">)>
<RETURN>)>>
<SET F <FIRST? .OBJ>>
<REPEAT ()
<COND (<NOT .F>
<RETURN>)
(<AND <FSET? .F ,CONTBIT>
<DESCRIBABLE? .F T>
<OR <BTST .ALL? ,D-ALL?>
<SIMPLE-DESC? .F>>>
<COND (<DESCRIBE-CONTENTS .F T
<COND (.PARA?
<+ ,D-ALL? ,D-PARA?>)
(T
,D-ALL?)>>
<SET 1ST? <>>
<SET PARA? T>)>)>
<SET F <NEXT? .F>>>
<COND (<AND <NOT .1ST?>
<EQUAL? .LEVEL <> T>
<EQUAL? .OBJ ,HERE <LOC ,WINNER>>>
<CRLF>)>
<NOT .1ST?>)>>
<ROUTINE DESCRIBABLE? (OBJ "OPT" (CONT? <>))
<COND (<FSET? .OBJ ,INVISIBLE>
<RFALSE>)
(<EQUAL? .OBJ ,WINNER>
<RFALSE>)
(<AND <EQUAL? .OBJ <LOC ,WINNER>>
<NOT <EQUAL? ,HERE <LOC ,WINNER>>>>
<RFALSE>)
(<AND <NOT .CONT?>
<FSET? .OBJ ,NDESCBIT>>
<RFALSE>)
;(<AND <EQUAL? .OBJ ,RAFT ,BARGE>
<EQUAL? ,HERE ,CANAL>
<NOT <ULTIMATELY-IN? .OBJ>>
<NOT <IN? .OBJ ,BARGE>>
<NOT <EQUAL? ,RAFT-LOC-NUM ,BARGE-LOC-NUM>>>
<RFALSE>)
(T
<RTRUE>)>>
<ROUTINE SIMPLE-DESC? (OBJ "AUX" STR)
<COND (<AND <GETP .OBJ ,P?FDESC>
<NOT <FSET? .OBJ ,TOUCHBIT>>>
<RFALSE>)
(<AND <SET STR <GETP .OBJ ,P?DESCFCN>>
<APPLY .STR ,M-OBJDESC?>>
<RFALSE>)
(<GETP .OBJ ,P?LDESC>
<RFALSE>)
(T
<RTRUE>)>>
;<ROUTINE DESCRIBE-VEHICLE () ;"for LOOK AT/IN vehicle when you're in it"
<TELL "Other than yourself, you can see">
<COND (<NOT <DESCRIBE-NOTHING>>
<TELL " on" TR ,PRSO>)>
<RTRUE>>
<ROUTINE DESCRIBE-NOTHING ()
<COND (<DESCRIBE-CONTENTS ,PRSO 2>
<COND (<NOT <IN? ,PLAYER ,PRSO>>
<CRLF>)>
<RTRUE>)
(T ;"nothing"
<RFALSE>)>>
<ROUTINE V-ALARM ()
<COND (<EQUAL? ,PRSO ,ME ,ROOMS>
<TELL "But you're ">)
(<FSET? ,PRSO ,ACTORBIT>
<BUT-THE ,PRSO>
<TELL "is ">)
(T
<WHAT-A-CONCEPT>
<RTRUE>)>
<TELL "already wide awake!" CR>>
<ROUTINE ALREADY-OPEN ()
<ITS-ALREADY "open">>
<ROUTINE ALREADY-CLOSED ()
<ITS-ALREADY "closed">>
; <ROUTINE V-ANSWER ()
<TELL "Nobody seems to be awaiting your answer." CR>
<PCLEAR>
<RFATAL>>
; <ROUTINE ANYMORE ()
<YOU-CANT-SEE>
<TELL "that anymore." CR>>
; <ROUTINE V-ASK-ABOUT ()
<COND (<EQUAL? ,PRSO ,ME>
<PERFORM ,V?TELL ,ME>
<RTRUE>)
; (<FSET? ,PRSO ,ACTORBIT>
<TELL
"After a moment's thought," T ,PRSO " denies any knowledge of" TR ,PRSI>
<COND (<EQUAL? ,PRSO ,PRSI>
<TELL " (Rather disingenuous, eh?)">)>
<CRLF>)
(T
<V-TELL>
<RTRUE>)>>
<ROUTINE V-ASK-ABOUT ()
<COND (<FSET? ,PRSO ,ACTORBIT>
<SETG WINNER ,PRSO>
<PERFORM ,V?TELL ,PRSO>
<SETG WINNER ,PLAYER>
<RTRUE>)
(T
<V-ASK-FOR>)>>
<ROUTINE V-ASK-FOR ()
<COND (<EQUAL? ,PRSO ,ME ,ROOMS>
<PERFORM ,V?TELL ,ME>)
(T
<NOT-LIKELY ,PRSO "would respond">)>
<PCLEAR>
<RFATAL>>
; <ROUTINE V-BACK ()
<V-WALK-AROUND>>
<ROUTINE V-BITE ()
<HACK-HACK "Biting">>
<ROUTINE V-BLOW-INTO ()
<COND (<FSET? ,PRSO ,ACTORBIT>
<PERFORM ,V?USE ,PRSO>
<RTRUE>)
(T
<HACK-HACK "Blowing">)>>
; <ROUTINE BLT (WHO WHERE "AUX" N X (CNT 0))
<SET X <FIRST? .WHO>>
<REPEAT ()
<COND (<NOT .X> <RETURN .CNT>)>
<SET N <NEXT? .X>>
<MOVE .X .WHERE>
<SET CNT <+ .CNT 1>>
<SET X .N>>>
; <ROUTINE PRE-BOARD ("AUX" AV)
<SET AV <LOC ,PLAYER>>
<COND (<FSET? ,PRSO ,VEHBIT>
<COND (<FSET? .AV ,VEHBIT>
<TELL "You're already in ">
;<ARTICLE ,PRSO T>
<TELL D .AV "!" CR>)
(T
<RFALSE>)>)
(T
<TELL ,YOU-CANT "get into ">
<ARTICLE ,PRSO T>
<TELL D ,PRSO "!" CR>)>
<RFATAL>>
; <ROUTINE V-BOARD ("AUX" AV)
#DECL ((AV) OBJECT)
<TELL "You are now in" TR ,PRSO>
<MOVE ,WINNER ,PRSO>
<APPLY <GETP ,PRSO ,P?ACTION> ,M-ENTER>
<RTRUE>>
<ROUTINE PRE-BOARD ()
<COND (<PRSO? <LOC ,PLAYER>>
<TELL "Look around you." CR>)
(<ULTIMATELY-IN? ,PRSO>
<TELL "You're holding it!" CR>)>>
<ROUTINE V-BOARD ()
<COND (<FSET? ,PRSO ,VEHBIT>
<MOVE ,PLAYER ,PRSO>
<TELL "You are now on" T ,PRSO "." CR>
;<APPLY <GETP ,PRSO ,P?ACTION> ,M-ENTER>
;<RTRUE>)
(T
<TELL "You can't get into" T ,PRSO "!" CR>)>>
; <ROUTINE V-BOW ()
<HACK-HACK "Paying respect to">>
<GLOBAL YUKS
<LTABLE 0
;"Get real."
"You can't be serious."
"Don't be silly.">>
<ROUTINE V-BURN ()
<COND (<FSET? ,PRSI ,FLAMEBIT>
<COND (<FSET? ,PRSO ,BURNBIT>
<REMOVE ,PRSO>
<TELL
"The " D ,PRSO " catches fire and is reduced to ashes." CR>)
(T
<TELL ,PYRO>)>)
(T
<TELL "With" A ,PRSI "? " <PICK-ONE ,YUKS> CR>)>>
<GLOBAL PYRO "This isn't a scene from Uncle Buddy's movie \"Pyromaniac.\"~">
<ROUTINE V-BUY ()
<COND (<NOT <VISIBLE? ,PRSO>>
<CANT-SEE-ANY ,PRSO>
<RTRUE>)
(<AND <NOT <FSET? ,PRSO ,TAKEBIT>>
<NOT <FSET? ,PRSO ,TRYTAKEBIT>>>
<TELL ,YOU-CANT "buy that!" CR>)
(<ULTIMATELY-IN? ,PRSO>
<TELL "You already have one." CR>)
(,PRSI
<NOT-LIKELY ,PRSI "would buy that">)
(T
<TELL "You don't have any money." CR>)>>
<ROUTINE CANT-CLOSE-THAT ()
<TELL ,YOU-CANT "close that!" CR>>
; <ROUTINE CANT-ENTER (LOC "OPTIONAL" (LEAVE <>))
<TELL ,YOU-CANT>
<COND (.LEAVE
<TELL "leave">)
(T
<TELL "enter">)>
<TELL T .LOC " from here." CR>>
<ROUTINE CANT-GO ()
<TELL ,YOU-CANT "go that way." CR>>
<ROUTINE CANT-LOCK ("OPTIONAL" (UN? <>))
<TELL ,YOU-CANT> ;<TELL ,YOU-CANT " ">
<COND (.UN?
<TELL "un">)>
<TELL "lock" T ,PRSO "!" CR>>
<ROUTINE V-CHASTISE ()
<COND (<NOT ,LIT>
<TOO-DARK>)
(<PRSO? ,INTDIR>
<TELL
"You'll have to go in that direction to see what's there." CR>)
(T
<TELL
"Use prepositions to indicate precisely what you want to do. For example, LOOK AT the object, LOOK INSIDE it, LOOK UNDER it, etc." CR>)>>
<ROUTINE V-CLEAN ()
<NOT-A "janitor">>
; <ROUTINE V-CLEAN ()
<COND (<EQUAL? ,PRSO ,DUST ,ART>
<TELL "You'd be here all day!" CR>)
(<AND ,PRSI
<NOT <EQUAL? ,PRSI ,BROOM ,BLANKET>>>
<HARD-TIME-WITH ,PRSI>)
(T
<NOT-A "janitor">)>>
"climb"
<ROUTINE V-CLIMB ()
<PERFORM ,V?CLIMB-UP ,PRSO>
<RTRUE>>
<ROUTINE V-CLIMB-DOWN ()
<COND (<EQUAL? ,PRSO ,ROOMS>
<DO-WALK ,P?DOWN>)
(T
<WHAT-A-CONCEPT>)>>
; <ROUTINE V-CLIMB-FOO ()
<COND (<OR <NOT ,PRSO>
<EQUAL? ,PRSO ,ROOMS>>
<DO-WALK ,P?UP>)
(T
<WHAT-A-CONCEPT>)>>
<ROUTINE V-CLIMB-ON ()
<COND (<EQUAL? ,P-PRSA-WORD ,W?HOLD>
<PERFORM ,V?TAKE ,PRSO>
<RTRUE>)
(T
<TELL ,YOU-CANT "climb onto that." CR>)>>
<ROUTINE V-CLIMB-OVER ()
<COND (<EQUAL? ,PRSO ,ROOMS>
<V-WALK-AROUND>)
(T
<TELL ,YOU-CANT "climb over that." CR>)>>
<ROUTINE V-CLIMB-UP ()
<COND (<EQUAL? ,PRSO ,ROOMS>
<DO-WALK ,P?UP>)
(T
<WHAT-A-CONCEPT>)>>
<ROUTINE V-CLOSE ()
<COND (<FSET? ,PRSO ,ACTORBIT>
<NOT-A "surgeon">)
(<FSET? ,PRSO ,SURFACEBIT>
<CANT-CLOSE-THAT>)
(<AND <NOT <FSET? ,PRSO ,CONTBIT>>
<NOT <FSET? ,PRSO ,DOORBIT>>>
<PERFORM ,V?OPEN ,PRSO>
<RTRUE>)
(<AND <NOT <FSET? ,PRSO ,SURFACEBIT>>
<NOT <EQUAL? <GETP ,PRSO ,P?CAPACITY> 0>>>
<COND (<FSET? ,PRSO ,OPENBIT>
<NOW-CLOSED-OR-OPEN ,PRSO>
<SAY-IF-NOT-LIT>)
(T
<ALREADY-CLOSED>)>)
(<FSET? ,PRSO ,DOORBIT>
<COND (<FSET? ,PRSO ,OPENBIT>
<FCLEAR ,PRSO ,OPENBIT>
<SAY-THE ,PRSO>
<TELL " " <PICK-ONE ,DOOR-NOISES> " as it closes." CR>)
(T
<ALREADY-CLOSED>)>)
(T
<CANT-CLOSE-THAT>)>>
; "Count # objects being carried by THING"
;<ROUTINE CCOUNT (THING "AUX" OBJ (CNT 0))
<SET OBJ <FIRST? .THING>>
<REPEAT ()
<COND (.OBJ
<COND (<NOT <FSET? .OBJ ,WORNBIT>>
<SET CNT <+ .CNT 1>>)>
<SET OBJ <NEXT? .OBJ>>)
(T
<RETURN>)>>
<RETURN .CNT>>
<ROUTINE V-COMPARE ()
<TELL "You compare the two items and find nothing interesting." CR>>
<ROUTINE V-COUNT ()
<WASTE-OF-TIME>>
<ROUTINE V-COVER ()
<PERFORM ,V?PUT-ON ,PRSI ,PRSO>
<RTRUE>>
<ROUTINE V-CROSS ()
<TELL ,YOU-CANT "cross that!" CR>>
; <ROUTINE V-CURSE ()
<TELL "Such language!" CR>>
<ROUTINE V-CUT ()
<NOT-LIKELY ,PRSI "could cut anything">>
<GLOBAL DEBUG <>>
<ROUTINE V-$DEBUG ()
<COND (,DEBUG
<SETG DEBUG <>>
<TELL "Debug off." CR>)
(T
<SETG DEBUG T>
<TELL "Debug on." CR>)>>
; <ROUTINE V-DEFLATE ()
<WHAT-A-CONCEPT>>
;<GLOBAL FIRST-WARNING? T>
<ROUTINE V-DIAGNOSE ()
<TELL "You're in good health">
<COND (<PROB 50>
<TELL "... at the moment">)>
<TELL "." CR>>
<ROUTINE V-DIG-WITH ()
<PERFORM ,V?DIG ,GROUND ,PRSO>
<RTRUE>>
<ROUTINE V-DIG ()
<COND (<NOT ,PRSI>
<COND (<IN? ,SHOVEL ,PLAYER>
<SETG PRSI ,SHOVEL>
<TELL "[with the shovel]" CR>)
(T
<SETG PRSI ,HANDS>
<TELL "[with your hands]" CR>)>)>
<COND (<PRSO? ,GROUND ,SAND>
<COND (<NOT <PRSI? ,SHOVEL>>
<TELL
"I suppose you also excavate tunnels with a teaspoon." CR>)
(<OR <PRSO? ,SAND>
<EQUAL? ,HERE ,BEACH>>
<TELL "You find nothing, so you fill in the hole." CR>)
(<EQUAL? <GETP ,HERE ,P?CAPACITY> 2> ;"walkway rooms"
<TELL
"You attempt to dig in the stone path, but it proves too tough for
your efforts." CR>)
(<EQUAL? <GETP ,HERE ,P?CAPACITY> 0>
<TELL "The ground is too hard here." CR>)
(<OR <EQUAL? <GETP ,HERE ,P?CAPACITY> 10>
<EQUAL? <GETP ,HERE ,P?CAPACITY> 20>>
<TELL "You can't dig a hole here!" CR>)
(T
<COND (<EQUAL? ,HERE ,HEART-OF-MAZE>
<COND (<IN? ,HEART-OF-MAZE-HOLE ,HEART-OF-MAZE>
<TELL "You already dug a hole here." CR>)
(T
<TELL
"You dig a hole and uncover" AR ,RUBBER-STAMP>
<MOVE ,HEART-OF-MAZE-HOLE
,HEART-OF-MAZE>)>)
(T
<COND (<AND <EQUAL? <GETP ,HERE ,P?CAPACITY> 1>
<G? <GETB ,HM-TABLE ,HM-ROOM> 15>>
<TELL "You've already dug a hole here." CR>)
(<EQUAL? <GETP ,HERE ,P?CAPACITY> 1>
<MOVE ,MAZE-HOLE ,HERE>
<PUTB ,HM-TABLE ,HM-ROOM <ORB <GETB ,HM-TABLE ,HM-ROOM> ,X-H>>
<SETG HM-BITS <GETB ,HM-TABLE ,HM-ROOM>>
<TELL "You dig a good sized hole, but find nothing." CR>)>)>)>)
(T
<WASTE-OF-TIME>)>>
<ROUTINE V-DISEMBARK ()
<COND (<NOT <EQUAL? <LOC ,PLAYER> ,PRSO>>
<TELL "Look around you." CR>
<RFATAL>)
(T
<MOVE ,WINNER ,HERE>
<TELL "You are no longer on" T ,PRSO "." CR>
;<COND (<OR <EQUAL? <LOC ,PLAYER> ,LEFT-END>
<EQUAL? <LOC ,PLAYER> ,RIGHT-END>>
<SETG ON-PLANK <>>
<TELL "SETG ON-PLANK <>">)>)>>
<ROUTINE V-DRINK ()
<TELL ,YOU-CANT "drink that!" CR>>
<ROUTINE V-DRINK-FROM ()
<WHAT-A-CONCEPT>>
"drop"
; <ROUTINE PRE-DROP ()
<COND (<EQUAL? ,PRSO <LOC ,WINNER>>
<PERFORM ,V?DISEMBARK ,PRSO>
<RTRUE>)>>
<ROUTINE SPECIAL-DROP ()
<COND (<EQUAL? ,HERE ,ROOF-1 ,ROOF-2>
<COND (<OR <AND <PRSO? ,FINCH>
<NOT <FSET? ,FINCH ,BROKEN-BIT>>>
<AND <ULTIMATELY-IN? ,FINCH ,PRSO>
<NOT <FSET? ,FINCH ,BROKEN-BIT>>>>
<BREAK-FINCH T>)>
<COND (<AND
<PRSO? ,RED-CANDLE ,WHITE-CANDLE ,BLUE-CANDLE>
<FSET? ,PRSO ,FLAMEBIT>>
<BLOW-OUT-CANDLE ,PRSO T>)>
<MOVE ,PRSO ,PATIO>
<TELL "The " D ,PRSO " slides off the roof." CR>)
(<EQUAL? ,HERE ,ON-POOL-1 ,ON-POOL-2 ,INLET ,IN-POOL-1
,IN-POOL-2>
<PERFORM ,V?PUT ,PRSO ,WATER>
<RTRUE>)
(<OR <EQUAL? ,HERE ,CHIMNEY-2>
<EQUAL? ,HERE ,CHIMNEY-1>>
<PERFORM ,V?PUT ,PRSO ,CHIMNEY>
<RTRUE>)>>
<ROUTINE V-DROP ()
<COND (<SPECIAL-DROP>
<RTRUE>)
(<IDROP>
<TELL "Dropped." CR>)>>
<ROUTINE IDROP ()
<COND (<DONT-HAVE? ,PRSO>
T)
(<AND <NOT <IN? ,PRSO ,WINNER>>
<NOT <FSET? <LOC ,PRSO> ,OPENBIT>>>
<TELL ,YOU-CANT "do that while" T ,PRSO>
<IS-CLOSED>
<CRLF>)
(<FSET? ,PRSO ,WORNBIT>
<TELL "You'll have to take off" T ,PRSO " first." CR>)
(T
;<MOVE ,PRSO <LOC ,WINNER>>
<MOVE ,PRSO ,HERE>
;"stuff dropped when on plank to room not plank"
<RTRUE>)>
<RFALSE>>
<ROUTINE V-EAT ()
<NOT-LIKELY ,PRSO "would agree with you">>
<ROUTINE V-EMPTY ("AUX" OBJ NXT)
<COND (<FSET? ,PRSO ,CONTBIT>
<COND (<FSET? ,PRSO ,OPENBIT>
<SET OBJ <FIRST? ,PRSO>>
<COND (.OBJ
<REPEAT ()
<COND (.OBJ
<SET NXT <NEXT? .OBJ>>
<COND (<NOT <FSET? .OBJ
,NARTICLEBIT>>
<TELL "The ">)>
<TELL D .OBJ ": ">
<PERFORM ,V?TAKE .OBJ ,PRSO>
<SET OBJ .NXT>)
(T
<RETURN>)>>)
(T
<BUT-THE ,PRSO>
<TELL "is already empty!" CR>)>)
(T
<ITS-CLOSED ,PRSO>)>)
(T
<TELL ,YOU-CANT "empty that!" CR>)>
<RTRUE>>
<ROUTINE V-ENTER ()
<COND (<EQUAL? ,PRSO ,ROOMS>
<DO-WALK ,P?IN>)
(<FSET? ,PRSO ,DOORBIT>
<DO-WALK <OTHER-SIDE ,PRSO>>)
(<IN? ,PRSO ,WINNER>
<TELL "That would involve quite a contortion!" CR>)
(<FSET? ,PRSO ,WEARBIT>
<PRESUMABLY-YOU-WANT-TO "wear" ,PRSO>
<PERFORM ,V?WEAR ,PRSO>
<RTRUE>)
(<FSET? ,PRSO ,VEHBIT>
<PERFORM ,V?BOARD ,PRSO>
<RTRUE>)
(T
<TELL
"You hit your head against" T ,PRSO " as you attempt this feat." CR>)>>
;<ROUTINE PRE-EXAMINE ()
<COND (<NOT ,LIT>
<TOO-DARK>
<RTRUE>)
(T
<RFALSE>)>>
<ROUTINE PRE-EXAMINE ()
<COND (<NOT ,LIT>
<TOO-DARK>
<RTRUE>)>
;<COND (<EQUAL? ,ROPED ,PRSO>
<TELL "The rope is tied to" T ,PRSO "." CR>
<RTRUE>)>>
<GLOBAL YAWNS <LTABLE 0 "unusual" "interesting" "extraordinary" "special">>
<ROUTINE V-EXAMINE ()
<COND (<FSET? ,PRSO ,DOORBIT>
<TELL "It looks as if" T ,PRSO " is ">
<COND (<FSET? ,PRSO ,OPENBIT>
<TELL "open">)
(T
<TELL "closed">)>
<TELL "." CR>
<RTRUE>)
(<FSET? ,PRSO ,SURFACEBIT>
<V-LOOK-ON>)
(<FSET? ,PRSO ,CONTBIT>
<COND (<OR <FSET? ,PRSO ,OPENBIT>
<FSET? ,PRSO ,TRANSBIT>>
<V-LOOK-INSIDE>)
(T
<ITS-CLOSED ,PRSO>)>)
(<FSET? ,PRSO ,READBIT>
<PERFORM ,V?READ ,PRSO>)
(T
<TELL
"You see nothing " <PICK-ONE ,YAWNS> " about" TR ,PRSO>)>>
<ROUTINE V-EXIT ()
<DO-WALK ,P?OUT>>
; <ROUTINE V-EXIT ()
<COND (<IN? ,PRSO ,POCKET>
<PERFORM ,V?TAKE ,PRSO>
<RTRUE>)
(T
<DO-WALK ,P?OUT>)>>
; <ROUTINE V-EXIT ()
<COND (<AND ,PRSO <FSET? ,PRSO ,VEHBIT>>
<PERFORM ,V?DISEMBARK ,PRSO>
<RTRUE>)
(T
<DO-WALK ,P?OUT>)>>
<ROUTINE FAILED ()
<TELL "Failed." CR>>
;<ROUTINE PRE-FEED ()
<COND (<PRE-GIVE T>
<RTRUE>)
(T
<RFALSE>)>>
;<ROUTINE V-FEED ()
<V-GIVE T>>
;<ROUTINE V-SFEED ()
<PERFORM ,V?FEED ,PRSI ,PRSO>
<RTRUE>>
<ROUTINE V-FILL ()
<COND (<NOT ,PRSI>
<COND (<GLOBAL-IN? ,WATER ,HERE>
<PERFORM ,V?FILL ,PRSO ,WATER>
<RTRUE>)
(<FSET? ,PRSO ,CONTBIT>
<TELL "There's nothing to fill it with." CR>)
(T
<V-STAND-UNDER>)>)
(<EQUAL? ,PRSI ,PORTABLE-WATER ,WATER>
<COND (<NOT <GLOBAL-IN? ,WATER ,HERE>>
<CANT-SEE-ANY ,WATER>)
(<NOT <EQUAL? ,PRSO ,BUCKET>>
<V-STAND-UNDER>)
(<AND <FIRST? ,BUCKET>
<NOT <EQUAL? <FIRST? ,BUCKET> ,PORTABLE-WATER>>>
<TELL
"That would get the stuff in the bucket all wet." CR>)
(T
<MOVE ,PORTABLE-WATER ,BUCKET>
<QUEUE I-DRIP 2>
<SETG AMOUNT-OF-WATER 26>
<TELL
"You fill" T ,BUCKET ", which naturally leaks slowly." CR>)>)
(<EQUAL? ,PRSI ,PORTABLE-WATER>
<PERFORM ,V?POUR ,PORTABLE-WATER ,PRSO>
<THIS-IS-IT ,PRSO>
<RTRUE>)
(T
<V-STAND-UNDER>)>>
<ROUTINE V-FIND ("AUX" L)
<SET L <LOC ,PRSO>>
<COND (<EQUAL? ,PRSO ,ME ,HANDS>
<TELL "You're right here">)
(<IN? ,PRSO ,PLAYER>
<TELL "You're holding it">)
(<OR <IN? ,PRSO ,HERE>
<EQUAL? ,PRSO ,PSEUDO-OBJECT>>
<BUT-THE ,PRSO>
<TELL "is right in front of you">)
(<IN? ,PRSO ,LOCAL-GLOBALS>
<HOW?>
<RTRUE>)
(<AND <FSET? .L ,ACTORBIT>
<VISIBLE? .L>>
<TELL "It looks as if" T .L " has it">)
(<AND <SEE-INSIDE? .L>
<VISIBLE? .L>>
<TELL "It's ">
<COND (<FSET? .L ,SURFACEBIT>
<TELL "on">)
(T
<TELL "in">)>
<TELL T .L>)
(T
<TELL "You'll have to do that yourself">)>
<TELL "." CR>>
<ROUTINE FIND-IN (WHERE WHAT "AUX" W)
<SET W <FIRST? .WHERE>>
<COND (<NOT .W>
<RFALSE>)>
<REPEAT ()
<COND (<FSET? .W .WHAT>
<RETURN .W>)
(<NOT <SET W <NEXT? .W>>>
<RETURN <>>)>>>
<ROUTINE FINISH ("OPTIONAL" (REPEATING <>) "AUX" WORD)
<CRLF>
<COND (<NOT .REPEATING>
<V-SCORE>
<CRLF>)>
<TELL
"Do you want to restart the story, restore a saved position, or quit?~
~
(Please type RESTART, RESTORE or QUIT.) >">
<READ ,P-INBUF ,P-LEXV>
<SET WORD <GET ,P-LEXV 1>>
<COND (<EQUAL? .WORD ,W?RESTAR>
<RESTART>
<FAILED>
<FINISH T>)
(<EQUAL? .WORD ,W?RESTOR>
<COND (<RESTORE>
<SAY-OKAY>)
(T
<FAILED>
<FINISH T>)>)
(<EQUAL? .WORD ,W?QUIT ,W?Q>
<QUIT>)
(T
<FINISH T>)>>
<ROUTINE V-FLY ()
;<TELL ,YOU-CANT "do that!" CR>
<TELL "That's not in the script!" CR>>
<ROUTINE V-FOCUS ()
<TELL "It's your thinking that's out of focus." CR>>
<ROUTINE V-FOLLOW ("AUX" WHERE)
<SET WHERE <LOC ,PRSO>>
<BUT-THE ,PRSO>
<TELL "is ">
<COND (<OR <EQUAL? .WHERE ,HERE>
<GLOBAL-IN? ,PRSO ,HERE>>
<TELL "right here in front of you">)
(<EQUAL? .WHERE ,PLAYER>
<TELL "in" D ,HANDS "s">)
(<IN? .WHERE ,PLAYER>
<TELL "in" T .WHERE>)
(T
<TELL "nowhere to be seen">)>
<TELL "!" CR>>
"give"
<ROUTINE PRE-GIVE ()
<COND (<OR <NOT ,PRSO>
<NOT ,PRSI>>
<REFERRING>
<RTRUE>)
; (<AND <FSET? ,PRSO ,ACTORBIT>
<ULTIMATELY-IN? ,PRSI>>
<PERFORM ,V?GIVE ,PRSI ,PRSO>
<RTRUE>)
; (<AND <FSET? ,PRSI ,ACTORBIT>
<DONT-HAVE? ,PRSO>>
<RTRUE>)
(<OR <IN? ,PRSO ,LOCAL-GLOBALS>
<IN? ,PRSO ,PSEUDO-OBJECT>>
<NOT-HOLDING>
<RTRUE>)
(<DONT-HAVE? ,PRSO>
<RTRUE>)
(<NOT <FSET? ,PRSI ,ACTORBIT>>
<TELL ,YOU-CANT "give anything to that!" CR>
<RTRUE>)
(<FSET? ,PRSO ,WORNBIT>
<TAKE-OFF-PRSO-FIRST>)
(T
<RFALSE>)>>
<ROUTINE V-GIVE ()
<COND (<FSET? ,PRSI ,ACTORBIT>
<TELL "Politely," T ,PRSI " refuses your offer." CR>)>>
<ROUTINE V-SGIVE ()
<PERFORM ,V?GIVE ,PRSI ,PRSO>
<RTRUE>>
; <ROUTINE GO-NEXT (TBL "AUX" VAL)
#DECL ((TBL) TABLE (VAL) ANY)
<COND (<SET VAL <LKP ,HERE .TBL>>
<GOTO .VAL>)>>
;<ROUTINE V-GOTO (RM "OPTIONAL" (V? T) "AUX" OLIT OHERE)
<SET OHERE ,HERE>
<SET OLIT ,LIT>
<MOVE ,WINNER .RM>
<SETG HERE .RM>
<SETG LIT <LIT? ,HERE>>
;<ROPE-EXITS>
;<COND (<ULTIMATELY-IN? ,ROPE>
<MOVE ,ROPE ,HERE>
<COND (<AND <NOT <ULTIMATELY-IN? ,ROPED>>
<FSET? ,ROPED ,TAKEBIT>>
<TELL
"As you exit you drag" T ,ROPED " along with you." CR CR>
<MOVE ,ROPED ,HERE>)
(<ULTIMATELY-IN? ,ROPED>
<SNAKES>)
(<NOT <FSET? ,ROPED ,TAKEBIT>>
<TUG>)>)>
;<COND (<AND <NOT .OLIT>
<NOT ,LIT>
<NOT ,FIRST-WARNING?>
<PROB 0>> ;"change prob to 0 for now"
<TELL
"Oh, no! Something lurked out of the darkness and devoured you!" CR>
<FINISH>)>
<APPLY <GETP ,HERE ,P?ACTION> ,M-ENTER>
<COND (<NOT <EQUAL? ,HERE .RM>>
<RTRUE>)
(.V?
;<V-FIRST-LOOK>)>
<RTRUE>>
<ROUTINE GOTO (RM "OPTIONAL" (V? T) "AUX" OLIT OHERE X)
<SET X <APPLY <GETP ,HERE ,P?ACTION> ,M-EXIT>>
<SET OHERE ,HERE>
<SET OLIT ,LIT>
<MOVE ,WINNER .RM>
<SETG HERE .RM>
<SETG LIT <LIT? ,HERE>>
;<ROPE-EXITS>
;<COND (<AND <NOT .OLIT>
<NOT ,LIT>
<NOT ,FIRST-WARNING?>
<PROB 0>> ;"change prob to 0 for now"