-
Notifications
You must be signed in to change notification settings - Fork 27
/
verbs.zil
5346 lines (4951 loc) · 142 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
ZORK ZERO
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<BEGIN-SEGMENT 0>
<DEFAULTS-DEFINED INIT-HINT-SCREEN>
;"subtitle game commands"
<GLOBAL VERBOSITY 1> ;"0 = superbrief, 1 = brief, 2 = verbose"
<ROUTINE V-VERBOSE ()
<SETG VERBOSITY 2>
<TELL "Maximum verbosity." CR CR>
<V-LOOK>>
<ROUTINE V-BRIEF ()
<SETG VERBOSITY 1>
<TELL "Brief descriptions." CR>>
<ROUTINE V-SUPERBRIEF ()
<SETG VERBOSITY 0>
<TELL "Superbrief descriptions." CR>>
<ROUTINE NOT-IN-DEMO ()
<TELL
"[Sorry, but that command is not available in this demonstration version.]"CR>>
<ROUTINE V-SAVE ("AUX" X WRD COLOR-SAME)
<COND (<SAVE-UNDO-CHECK>
<RTRUE>)>
<COND (,DEMO-VERSION?
<NOT-IN-DEMO>
<RFATAL>)>
<PUTB ,G-INBUF 2 0>
<SETG P-CONT <>> ;"flush anything on input line after SAVE"
<SET X <SAVE>>
<COND (<ZERO? .X>
<SETG P-CONT -1>
<TELL "SAVE failed!" CR>
<RFATAL>)
(<EQUAL? .X 1>
<RESTORE-ORPHAN>
<TELL "SAVE completed." CR>
<RFATAL>)>
<SET WRD <WINGET ,S-TEXT ,WCOLOR>>
<COND (<AND <EQUAL? <SHIFT .WRD -8> ,FG-COLOR>
<EQUAL? <BAND .WRD 255> ,BG-COLOR>>
<SET COLOR-SAME T>)
(T
<SET COLOR-SAME <>>)>
<COLOR ,FG-COLOR ,BG-COLOR>
<SETG OLD-HERE <>>
<SETUP-SCREEN>
<V-$REFRESH>
<RESTORE-ORPHAN>
<TELL "Okay, restored." CR CR>
<SETG P-CONT -1> ;<RFATAL>
<V-LOOK>>
<ROUTINE SAVE-UNDO-CHECK ()
<COND (<EQUAL? ,HERE ,ROOM-OF-THREE-DOORS>
<TELL
"[You can't SAVE or UNDO here. You'll have to solve the puzzle!]" CR>)>>
<ROUTINE RESTORE-ORPHAN ()
<COND (<AND <IN? ,JESTER ,HERE>
,LIT
<OR <AND <EQUAL? ,HERE ,ENTRANCE-HALL>
<NOT <FSET? ,PORTCULLIS ,OPENBIT>>>
<AND <EQUAL? ,HERE ,SOLAR>
<IN? ,EAST-KEY ,JESTER>>
<EQUAL? ,HERE ,OUBLIETTE>
<AND <EQUAL? ,HERE ,CAVE-IN>
<IN? ,PIT-BOMB ,LOCAL-GLOBALS>>
<AND <EQUAL? ,HERE ,TAX-OFFICE>
<IN? ,ZORKMID-COIN ,LOCAL-GLOBALS>>
<AND <EQUAL? ,HERE ,STREAM>
<FSET? ,DIPLOMA ,TRYTAKEBIT>>>>
<SETUP-ORPHAN "answer">)>>
<ROUTINE V-RESTORE ()
<COND (,DEMO-VERSION?
<NOT-IN-DEMO>
<RFATAL>)>
<COND (<NOT <RESTORE>>
<TELL ,FAILED>)>>
<ROUTINE V-UNDO ("AUX" X)
<SETG OLD-HERE <>>
<SETG OLD-REGION <>>
<COND (<NOT <SAVE-UNDO-CHECK>>
<SET X <IRESTORE>>
<COND (<EQUAL? .X -1>
<TELL "UNDO is unavailable on your computer system." CR>)
(T
<TELL ,FAILED>)>)>>
<ROUTINE V-SCRIPT ()
<COND (,DEMO-VERSION?
<NOT-IN-DEMO>
<RFATAL>)>
<TELL "[Transcript on.]" CR>
<DIROUT ,D-PRINTER-ON>
<CORP-NOTICE "begins">
<RTRUE>>
<ROUTINE V-UNSCRIPT ()
<COND (,DEMO-VERSION?
<NOT-IN-DEMO>
<RFATAL>)>
<CORP-NOTICE "ends">
<DIROUT ,D-PRINTER-OFF>
<TELL "[Transcript off.]" CR>
<DIROUT ,D-SCREEN-OFF>
<CRLF> ;"to transcript only"
<DIROUT ,D-SCREEN-ON>
<RTRUE>>
<ROUTINE CORP-NOTICE (STRING)
<DIROUT ,D-SCREEN-OFF>
<TELL
"Here " .STRING " a transcript of interaction with" ;" ZORK ZERO." CR>
<V-VERSION>
<DIROUT ,D-SCREEN-ON>
<RTRUE>>
<GLOBAL COLOR-NOTE <>>
<GLOBAL FG-COLOR 1>
<GLOBAL BG-COLOR 1>
<ROUTINE V-COLOR ("AUX" (DEFAULT <>))
<COND (<NOT ,COLOR-NOTE>
<SETG COLOR-NOTE T>
<TELL
"Aesthetically, we recommend not changing the standard setting, which
is black text on a white background. ">
<COND (<AND <EQUAL? <LOWCORE INTID> ,MACINTOSH>
<MAC-II?>>
<TELL
"Also, if your Mac II displays only 16 colors, you probably won't get
the color you ask for. ">)>
<TELL "Do you still want to go ahead?" CR "(Y or N) >">
<COND (<NOT <Y?>>
<RTRUE>)>)>
<CRLF>
<REPEAT ()
<DO-COLOR>
<TELL
"You should now get " <GET ,COLOR-TABLE ,FG-COLOR> " text on a "
<GET ,COLOR-TABLE ,BG-COLOR> " background. Is that what you want?|
(Y or N) >">
<COND (<Y?>
<RETURN>)>
<COND (<AND <EQUAL? <LOWCORE INTID> ,MACINTOSH>
<NOT <MAC-II?>>>
<COND (<EQUAL? ,BG-COLOR 2>
<SETG BG-COLOR 9>
<SETG FG-COLOR 2>)
(T
<SETG BG-COLOR 2>
<SETG FG-COLOR 9>)>
<RETURN>)>
<TELL CR
"Do you want to pick again, or would you like to just go back to the
standard colors? (Type Y to pick again) >">
<COND (<Y?>
<CRLF>)
(T
<SET DEFAULT T>
<RETURN>)>>
<COND (.DEFAULT
<COLOR 1 1>)
(T
<COLOR ,FG-COLOR ,BG-COLOR>)>
<V-$REFRESH>>
<ROUTINE DO-COLOR ()
<COND (<AND <EQUAL? <LOWCORE INTID> ,MACINTOSH>
<NOT <MAC-II?>>> ;"b&w Mac"
<COND (<EQUAL? ,BG-COLOR 2>
<SETG BG-COLOR 9>
<SETG FG-COLOR 2>)
(T
<SETG BG-COLOR 2>
<SETG FG-COLOR 9>)>)
(T
<SETG FG-COLOR <PICK-COLOR ,FG-COLOR "text" T>>
<SETG BG-COLOR <PICK-COLOR ,BG-COLOR "background">>)>>
<ROUTINE PICK-COLOR (WHICH STRING "OPTIONAL" (SETTING-FG <>) "AUX" CHAR)
<TELL
"The current " .STRING " color is " <GET ,COLOR-TABLE .WHICH> ,PERIOD-CR>
<FONT 4>
<TELL
" 1 --> WHITE 4 --> GREEN" CR
" 2 --> BLACK 5 --> YELLOW" CR
" 3 --> RED 6 --> BLUE" CR>
<FONT 1>
<TELL
"Type a number to select the " .STRING " color you want. >">
<REPEAT ()
<COND (,DEMO-VERSION?
<SET CHAR <INPUT-DEMO 1>>)
(T
<SET CHAR <INPUT 1>>)>
<SET CHAR <- .CHAR 48>> ;"convert from ASCII"
<COND (<EQUAL? .CHAR 1> ;"white is really 9, not 1"
<SET CHAR 9>)>
<COND (<EQUAL? .CHAR 2 3 4 5 6 9>
<COND (<AND <NOT .SETTING-FG>
<EQUAL? .CHAR ,FG-COLOR>>
<TELL CR
"You can't make the background the same
color as the text! Pick another color. >">)
(T
<RETURN>)>)
(T
<TELL CR ,TYPE-A-NUMBER "6. >">)>>
<CRLF> <CRLF>
<RETURN .CHAR>>
<CONSTANT COLOR-TABLE
<TABLE ;0 "no change"
;1 "the default color"
;2 "black"
;3 "red"
;4 "green"
;5 "yellow"
;6 "blue"
;7 "magenta"
;8 "cyan"
;9 "white">>
<END-SEGMENT>
<BEGIN-SEGMENT STARTUP>
<ROUTINE V-CREDITS ()
<CENTER-1 "Z O R K Z E R O" T>
<CENTER-1 "The Revenge of Megaboz" T>
<CRLF>
<CENTER-1 "designed and written by" T>
<CENTER-1 "Steve Meretzky">
<CRLF>
<CENTER-1 "based on a concept by" T>
<CENTER-2 "Tim Anderson" "Marc Blank">
<CENTER-2 "Dave Lebling" "Steve Meretzky">
<CRLF>
<CENTER-1 "original graphics designed for the Amiga by" T>
<CENTER-1 "James Shook">
<CRLF>
<CENTER-1 "graphical translations" T>
<CENTER-3 "Tanya Allan" "Andy Briggs" "Denise Audette">
<CENTER-2 "Joy Pulver" "Charlie Voner">
<CRLF>
<CENTER-1 "design and implementation of InfoParser Mark Two" T>
<CENTER-2 "Tim Anderson" "Stu Galley">
<CRLF>
<CENTER-1 "design and implementation of XZIP development system" T>
<CENTER-2 "Tim Anderson" "Dave Lebling">
<CRLF>
<CENTER-1 "interpreter implementation" T>
<CENTER-1 "Macintosh: Duncan Blanchard">
<CENTER-1 "Apple II: Jon Arnold">
<CENTER-1 "IBM: Scott Fray">
<CENTER-1 "Amiga: Clarence Din">
<CRLF>
<CENTER-1 "testing" T>
<CENTER-3 "Kurt Boutin" "Gary Brennan" "Amy Briggs">
<CENTER-3 "Liz Cyr-Jones" "Craig Fields" "Jacob Galley">
<CENTER-3 "Adam Glass" "Tyler Gore" "Matt Hillman">
<CENTER-3 "Shaun Kelly" "Adam Levesque" "Patti Pizer">
<CENTER-2 "Joe Prosser" "Steve Watkins">
<CRLF>
<CENTER-1 "package design" T>
<CENTER-2 "Carl Genatassio" "Elizabeth Langosy">
<CRLF>
<CENTER-1 "calendar design" T>
<CENTER-2 "Amy Briggs" "Elizabeth Langosy">
<CENTER-1 "Steve Meretzky">
<CRLF>
<CENTER-1 "calendar art" T>
<CENTER-1 "Ed Parker">>
<END-SEGMENT>
<BEGIN-SEGMENT 0>
<ROUTINE V-DIAGNOSE ()
<COND (<G? ,DESERT-DEATH 0>
<TELL "You're ">
<COND (<G? ,DESERT-DEATH 4>
<TELL "about to pass out">)
(<G? ,DESERT-DEATH 2>
<TELL "dangerously close to passing out">)
(T
<TELL "feeling a bit faint">)>
<TELL " from the heat." CR>)
(,ALLIGATOR
<TELL "You're a perfectly healthy alligator." CR>)
(,TURNED-INTO
<COND (<EQUAL? ,TURNED-INTO ,VIOLIN>
<TELL
"You're fit as a fiddle. In fact, you ARE a fiddle." CR>)
(T
<TELL
"You are" A ,TURNED-INTO ". Other details of health pale in comparison." CR>)>)
(<FSET? ,CLOWN-NOSE ,WORNBIT>
<TELL
"You're having a bit of trouble breathing, thanks to the " D ,CLOWN-NOSE
" on your nose." CR>)
(<G? ,HUNGER-COUNT 0>
<TELL "You feel ">
<COND (<EQUAL? ,HUNGER-COUNT 2>
<TELL "very ">)
(<EQUAL? ,HUNGER-COUNT 3>
<TELL "incredibly ">)>
<TELL "hungry." CR>)
(T
<TELL "You're as fit as a fiddle." CR>)>>
<ROUTINE V-INVENTORY ()
<SETG D-BIT <- ,WORNBIT>>
<COND (<NOT <D-CONTENTS ,WINNER <> <+ ,D-ALL? ,D-PARA?>>>
<COND (,TURNED-INTO
<TELL "You are carrying nothing.">)
(T
<TELL "You are empty-">
<COND (,ALLIGATOR
<TELL "claw">)
(T
<TELL "hand">)>
<TELL "ed.">)>)>
<SETG D-BIT ,WORNBIT>
<D-CONTENTS ,WINNER <> <+ ,D-ALL? ,D-PARA?>>
<SETG D-BIT <>>
<COND (<AND <FSET? ,GLOVE ,WORNBIT>
<NOT ,GLOVE-COMMENT>>
<SETG GLOVE-COMMENT T>
<TELL
" [It's probably none of my business, but when you wear that single glove you
resemble singer Michael Flathead, formerly of the Flathead Five.]">)>
<CRLF>>
<GLOBAL GLOVE-COMMENT <>>
<GLOBAL BORDER-ON T>
<ROUTINE V-MODE ()
<CLEAR -1>
<COND (,BORDER-ON
<SETG BORDER-ON <>>)
(T
<SETG BORDER-ON T>)>
<SPLIT-BY-PICTURE ,CURRENT-SPLIT>
<SCREEN ,S-FULL>
<INIT-STATUS-LINE T>
<SCREEN ,S-TEXT>
<TELL "Border o">
<COND (,BORDER-ON
<TELL "n">)
(T
<TELL "ff">)>
<TELL " (obviously)." CR>>
<ROUTINE V-QUIT ()
;<PARSER-REPORT>
<V-SCORE>
<DO-YOU-WISH "leave the game">
<COND (<Y?>
<QUIT>)
(T
<TELL ,OK>)>>
<ROUTINE V-RESTART ()
<V-SCORE>
<DO-YOU-WISH "restart">
<COND (<Y?>
<TELL "Restarting." CR>
<COLOR 1 1> ;"return to default colors before screen clears"
<RESTART>
<TELL ,FAILED>)>>
<ROUTINE DO-YOU-WISH (STRING)
<TELL CR "Do you really want to " .STRING " (y or n)? >">>
<ROUTINE FINISH ("AUX" (REPEATING <>) (CNT 0))
<PROG ()
<CRLF>
<COND (<NOT .REPEATING>
<SET REPEATING T>
<V-SCORE>)>
<UPDATE-STATUS-LINE>
<TELL
"Would you like to start over, restore a saved position, ">
<COND (<NOT <EQUAL? ,HERE ,ROOM-OF-THREE-DOORS>>
<TELL "undo your last turn, ">)>
<TELL "end this session of the game, or ">
<COND (<EQUAL? ,SCORE 1000>
<TELL "see the credits?" CR>)
(T
<TELL "get a hint?" CR>)>
<TELL "(Type RESTART, RESTORE, ">
<COND (<NOT <EQUAL? ,HERE ,ROOM-OF-THREE-DOORS>>
<TELL "UNDO, ">)>
<TELL "QUIT, or ">
<COND (<EQUAL? ,SCORE 1000>
<TELL "CREDITS">)
(T
<TELL "HINT">)>
<TELL "): >">
<PUTB ,P-LEXV 0 10>
<PUTB ,P-INBUF 1 0>
<COND (,DEMO-VERSION?
<READ-DEMO ,P-INBUF ,P-LEXV>)
(T
<READ ,P-INBUF ,P-LEXV>)>
<MOUSE-INPUT?>
<PUTB ,P-LEXV 0 ,LEXV-LENGTH>
<SET CNT <+ .CNT 1>>
<COND (<EQUAL? <GET ,P-LEXV 1> ,W?RESTART>
<COLOR 1 1> ;"return to default before screen clears"
<RESTART>
<TELL ,FAILED>
<AGAIN>)
(<AND <EQUAL? <GET ,P-LEXV 1> ,W?RESTORE>
<NOT <RESTORE>>>
<TELL ,FAILED>
<AGAIN>)
(<OR <EQUAL? <GET ,P-LEXV 1> ,W?QUIT ,W?Q>
<G? .CNT 10>>
;<PARSER-REPORT>
<QUIT>)
(<AND <EQUAL? <GET ,P-LEXV 1> ,W?UNDO>
<V-UNDO>>
<AGAIN>)
(<AND <EQUAL? <GET ,P-LEXV 1> ,W?CREDIT ,W?CREDITS>>
<V-CREDITS>
<AGAIN>)
(<EQUAL? <GET ,P-LEXV 1> ,W?HINTS ,W?HINT ,W?HELP
,W?CLUE ,W?CLUES>
<V-HINT>
<AGAIN>)>
<AGAIN>>>
<ROUTINE V-VERSION ()
<TELL
"ZORK ZERO: The Revenge of Megaboz|
Copyright (c) 1988 by Infocom, Inc. All rights reserved.|
ZORK is a registered trademark of Infocom, Inc." CR>
<INTERPRETER-ID>
<TELL "Release " N <BAND <LOWCORE ZORKID> *3777*> " / Serial number ">
<LOWCORE-TABLE SERIAL 6 PRINTC>
<CRLF>>
<ROUTINE INTERPRETER-ID ()
;"changed 7/21/88 per mail from TAA"
;"changed again 9/12/88 per mail from Duncan"
<TELL
<GET ,MACHINES <LOWCORE INTID>> " Interpreter version "
N <LOWCORE (ZVERSION 0)> "." N <LOWCORE INTVR> CR>>
<CONSTANT MACHINES
<LTABLE "Dec-20"
"Apple IIe"
"Macintosh"
"Amiga"
"Atari ST"
"IBM"
"Commodore 128"
"Commodore 64"
"Apple IIc"
"Apple IIgs"
""
"">>
<ROUTINE MAC-II? ()
<PICINF ,ICON-OFFSET ,PICINF-TBL>
<COND (<EQUAL? <GET ,PICINF-TBL 0> 0>
<RTRUE>)
(T
<RFALSE>)>>
;<CONSTANT D-RECORD-ON 4>
;<CONSTANT D-RECORD-OFF -4>
<END-SEGMENT>
<BEGIN-SEGMENT STARTUP>
<ROUTINE V-$COMMAND ()
<DIRIN 1>
<RTRUE>>
<ROUTINE V-$RANDOM ()
<COND (<NOT <PRSO? ,INTNUM>>
<TELL "ILLEGAL." CR>)
(T
<RANDOM <- 0 ,P-NUMBER>>
<RTRUE>)>>
<ROUTINE V-$RECORD ()
<DIROUT ,D-RECORD-ON> ;"all READS and INPUTS get sent to command file"
<RTRUE>>
<ROUTINE V-$UNRECORD ()
<DIROUT ,D-RECORD-OFF>
<RTRUE>>
<ROUTINE V-$VERIFY ()
<COND (<AND <PRSO? ,INTNUM>
<EQUAL? ,P-NUMBER 232>>
<TELL N ,SERIAL CR>)
(T
<INTERPRETER-ID>
<TELL "Verifying..." CR>
<COND (<VERIFY>
<TELL ,OK>)
(T
<TELL "** Bad **" CR>)>)>>
<CONSTANT SERIAL 0>
<END-SEGMENT>
<BEGIN-SEGMENT 0>
<REPLACE-DEFINITION REFRESH
<ROUTINE V-$REFRESH ("OPTIONAL" (DONT-CLEAR <>))
<COND (<EQUAL? ,P-CAN-UNDO 2> ;"called because of an UNDO"
<RESTORE-ORPHAN> ;"set up the riddle-answer orphans"
<SETG DIR-CNT 0> ;"clear the chess-piece-move table")>
<COND (<EQUAL? ,CURRENT-SPLIT ,MAP-TOP-LEFT-LOC>
<DO-MAP>)
(<EQUAL? ,CURRENT-SPLIT ,B-SPLIT>
<DRAW-TOWER>)
(<EQUAL? ,CURRENT-SPLIT ,PBOZ-SPLIT>
<SETUP-PBOZ>)
(<EQUAL? ,CURRENT-SPLIT ,SN-SPLIT>
<SETUP-SN>)
(<EQUAL? ,CURRENT-SPLIT ,F-SPLIT>
<SETUP-FANUCCI>)
(T
<COND (.DONT-CLEAR
<INIT-SL-WITH-SPLIT ,CURRENT-SPLIT T>)
(T
<INIT-STATUS-LINE>)>
<UPDATE-STATUS-LINE>
<LOWCORE FLAGS <BAND <LOWCORE FLAGS> -5>>
<COND (<EQUAL? ,P-CAN-UNDO 2>
<TELL "[Undone.]" CR>)>)>
<RTRUE>>>
<END-SEGMENT>
<BEGIN-SEGMENT STARTUP>
;<GLOBAL DEBUG <>>
;<ROUTINE V-$DEBUG ()
<TELL "O">
<COND (,DEBUG
<SETG DEBUG <>>
<TELL "ff">)
(T
<SETG DEBUG T>
<TELL "n">)>
<TELL ,PERIOD-CR>>
;<ROUTINE V-$SKIP ()
<COND (<NOT ,PRSO>
<V-VERSION>
<CRLF>
<DEQUEUE I-PROLOGUE>
<DEQUEUE I-GIVE-OBJECT>
<DEQUEUE I-TAKE-OBJECT>
<MOVE ,PARCHMENT ,GREAT-HALL>
<MOVE ,CAULDRON ,BANQUET-HALL>
<MOVE ,STRAW ,SCULLERY>
<ROB ,PROTAGONIST>
<REMOVE ,DIMWIT>
<REMOVE ,MEGABOZ>
<MOVE ,UNOPENED-NUT ,ROOT-CELLAR>
<FCLEAR ,BANQUET-HALL ,TOUCHBIT>
<FCLEAR ,SCULLERY ,TOUCHBIT>
<FCLEAR ,KITCHEN ,TOUCHBIT>
<FCLEAR ,ROOT-CELLAR ,ONBIT>
<FCLEAR ,WINE-CELLAR ,ONBIT>
<SETG UNDER-TABLE <>>
<SETG MID-NAME-NUM <- <RANDOM 12> 1>>
<SETG DIAL-NUMBER <RANDOM 2400>>
<SETG HOLEY-SLAB <GET ,SLAB-TABLE <- <RANDOM 7> 1>>>
<MOVE ,CALENDAR ,GREAT-HALL>
<MOVE ,PROCLAMATION ,ENTRANCE-HALL>
<REMOVE ,TABLES>
<REMOVE ,BANQUET-FOOD>
<MOVE ,CROWN ,TREASURE-CHEST>
<FSET ,CROWN ,TAKEBIT>
<MOVE ,ROBE ,TRUNK>
<FSET ,ROBE ,TAKEBIT>
<GOTO ,GREAT-HALL>)
(T
<MOVE ,CANDLE ,PROTAGONIST>
<FSET ,PORTCULLIS ,OPENBIT>
<FSET ,EAST-DOOR ,OPENBIT>
<FSET ,WEST-DOOR ,OPENBIT>
<SETG NUT-EATEN T>
<SETG SECRET-PASSAGE-OPEN T>
<FSET ,DRAWBRIDGE ,OPENBIT>
<COND (<PRSO? ,CAULDRON>
<GOTO ,BANQUET-HALL>
<MOVE ,NOTEBOOK ,HERE>
<COND (<EQUAL? ,SACRED-WORD-NUMBER 10>
<SETG SACRED-WORD-NUMBER <- <RANDOM 10> 1>>)>
<MOVE ,CROWN ,HERE>
<MOVE ,SCEPTRE ,HERE>
<MOVE ,ZORKMID-BILL ,HERE>
<MOVE ,DIPLOMA ,HERE>
<FCLEAR ,DIPLOMA ,TRYTAKEBIT>
<FCLEAR ,DIPLOMA ,NDESCBIT>
<MOVE ,SILK-TIE ,HERE>
<MOVE ,STOCK-CERTIFICATE ,HERE>
<MOVE ,QUILL-PEN ,HERE>
<MOVE ,MANUSCRIPT ,HERE>
<MOVE ,VIOLIN ,HERE>
<MOVE ,METRONOME ,HERE>
<MOVE ,FAN ,HERE>
<MOVE ,FLASK ,HERE>
<MOVE ,SCREWDRIVER ,HERE>
<MOVE ,LANTERN ,HERE>
<FCLEAR ,LANTERN ,TRYTAKEBIT>
<MOVE ,SCALE-MODEL ,HERE>
<MOVE ,T-SQUARE ,HERE>
<MOVE ,BAT ,HERE>
<FCLEAR ,BAT ,TRYTAKEBIT>
<MOVE ,DUMBBELL ,HERE>
<MOVE ,LANCE ,HERE>
<MOVE ,SADDLE ,HERE>
<MOVE ,SPYGLASS ,HERE>
<FCLEAR ,SPYGLASS ,TRYTAKEBIT>
<MOVE ,SEAMANS-CAP ,HERE>
<MOVE ,EASLE ,HERE>
<MOVE ,LANDSCAPE ,HERE>)
(<PRSO? ,T-OF-B>
<GOTO ,JESTERS-QUARTERS>)
(<PRSO? ,PBOZ-OBJECT>
<GOTO ,PEG-ROOM>)
(<PRSO? ,DOUBLE-FANUCCI>
<GOTO ,CASINO>)
(<PRSO? ,HOTHOUSE>
<MOVE ,DIRIGIBLE ,SMALLER-HANGAR>
<GOTO ,HOTHOUSE>)
(<PRSO? ,REBUS>
<REMOVE ,REBUS-MOUSE>
<REMOVE ,REBUS-GOOSE>
<REMOVE ,REBUS-SLIME-MONSTER>
<REMOVE ,REBUS-CAMEL>
<REMOVE ,REBUS-SNAKE>
<REMOVE ,REBUS-FISH>
<FSET ,BASEMENT-REBUS-BUTTON ,TOUCHBIT>
<FSET ,CLOSET-REBUS-BUTTON ,TOUCHBIT>
<FSET ,CRAG-REBUS-BUTTON ,TOUCHBIT>
<FSET ,CRAWL-REBUS-BUTTON ,TOUCHBIT>
<FSET ,GROTTO-REBUS-BUTTON ,TOUCHBIT>
<FSET ,ATTIC-REBUS-BUTTON ,TOUCHBIT>
<GOTO ,GALLERY>)
(<PRSO? ,ORACLE-OBJECT>
<MOVE ,RUBY ,DEPRESSION>
<FSET ,RUBY ,NDESCBIT>
<FSET ,RUBY ,NALLBIT>
<MOVE ,AMULET ,PROTAGONIST>
<GOTO ,ORACLE>)
(T
<TELL ,HUH>)>)>>
<END-SEGMENT>
;"subtitle real verbs"
<BEGIN-SEGMENT 0>
<ROUTINE V-ALARM ()
<COND (<PRSO? ,ROOMS ,ME>
<PERFORM-PRSA ,ME>
<RTRUE>)
(<FSET? ,PRSO ,ANIMATEDBIT>
<COND (<FSET? ,PRSO ,FEMALEBIT>
<TELL "Sh">)
(T
<TELL "H">)>
<TELL "e's wide awake, or haven't you noticed..." CR>)
(T
<TELL "You're nuts." CR>)>>
;<ROUTINE V-ANAGRAM ("AUX" LEN R)
<DIROUT ,D-TABLE-ON ,SLINE>
<SET LEN <NP-LEXBEG <GET-NP ,PRSO>>>
<COND (<EQUAL? ,PRSO ,INTQUOTE>
<SET LEN <ZREST .LEN <* 2 ,LEXV-ELEMENT-SIZE-BYTES>>>)>
<SET R <NP-LEXEND <GET-NP ,PRSO>>>
<COND (<EQUAL? ,PRSO ,INTQUOTE>
<SET R <ZBACK .R ,LEXV-ELEMENT-SIZE-BYTES>>)>
<BUFFER-PRINT .LEN .R <> T>
<DIROUT ,D-TABLE-OFF>
<TELL "How about \"">
<SET LEN <GET ,SLINE 0>>
<REPEAT ()
<COND (<EQUAL? .LEN 0>
<RETURN>)>
<SET R <+ <RANDOM .LEN> 1>>
<PRINTC <GETB ,SLINE .R>>
<PUTB ,SLINE .R <GETB ,SLINE <+ .LEN 1>>>
<SET LEN <- .LEN 1>>>
<SETG AWAITING-REPLY 1>
<QUEUE I-REPLY 2>
<TELL "\"? [It's not a very good anagram routine, is it?]" CR>>
;<ROUTINE V-APPLAUD ()
<TELL "\"Clap.\"" CR>>
<ROUTINE V-ASK-ABOUT ("AUX" OWINNER)
<COND (<PRSO? ,ME>
<PERFORM ,V?TELL ,ME>
<RTRUE>)
(<FSET? ,PRSO ,ACTORBIT>
<SET OWINNER ,WINNER>
<SETG WINNER ,PRSO>
<PERFORM ,V?TELL-ABOUT ,ME ,PRSI>
<SETG WINNER .OWINNER>
<THIS-IS-IT ,PRSI>
<THIS-IS-IT ,PRSO>
<RTRUE>)
(T
<PERFORM ,V?TELL ,PRSO>
<RTRUE>)>>
<ROUTINE V-ASK-FOR ()
<COND (<PRSO? ,BROGMOID>
<TELL ,TALK-TO-BROGMOID>)
(T
<TELL "Unsurprisingly," T ,PRSO " doesn't oblige." CR>)>>
<ROUTINE V-ASK-NO-ONE-FOR ("AUX" ACTOR)
<COND (<SET ACTOR <FIND-IN ,HERE ,ACTORBIT>>
<PERFORM ,V?ASK-FOR .ACTOR ,PRSO>
<RTRUE>)
(T
<TELL "There's no one here to ask." CR>)>>
<ROUTINE V-BEHEAD ("OPTIONAL" (CALLED-BY-V-HANG <>))
<TELL "You usually need a ">
<COND (.CALLED-BY-V-HANG
<TELL "noose">)
(T
<TELL "axe">)>
<TELL " to do this">
<COND (<AND <NOT <FSET? ,PRSO ,ACTORBIT>>
<NOT <EQUAL? ,PRSO ,ME>>>
<TELL
", and besides, it doesn't look like" T ,PRSO " even has a ">
<COND (.CALLED-BY-V-HANG
<TELL "neck">)
(T
<TELL "head">)>)>
<TELL ,PERIOD-CR>>
;<ROUTINE V-BEND ()
<COND (<EQUAL? ,P-PRSA-WORD ,W?SPREAD>
<COND (<FSET? ,PRSO ,ACTORBIT>
<V-ENTER>)
(T
<HACK-HACK "Spreading">)>)
(T
<HACK-HACK "Bending">)>>
<ROUTINE V-BITE ()
<HACK-HACK "Biting">>
<ROUTINE V-BURN ()
<COND (<NOT ,PRSI>
<COND (<SETG PRSI <FIND-IN ,PROTAGONIST ,FLAMEBIT>>
<TELL "[with" T ,PRSI "]" CR>
<PERFORM ,V?BURN ,PRSO ,PRSI>
<RTRUE>)
(T
<TELL "Your burning gaze is insufficient." CR>
<RTRUE>)>)>
<COND (<NOT <FSET? ,PRSI ,FLAMEBIT>>
<TELL "With" A ,PRSI "??!?" CR>)
(<FSET? ,PRSO ,BURNBIT>
<TELL "Instantly," T ,PRSO " catches fire and is consumed.">
<COND (<ULTIMATELY-IN? ,PRSO>
<JIGS-UP
" Unfortunately, you were holding it at the time.">)
(T
<REMOVE ,PRSO>
<CRLF>)>)
(<PRSO? ,CANDLE>
<FSET ,CANDLE ,FLAMEBIT>
<FSET ,CANDLE ,ONBIT>
<TELL "You relight the candle." CR>)
(T
<TELL ,YOU-CANT "burn" AR ,PRSO>)>>
<ROUTINE V-BUY ()
<TELL "That's not for sale." CR>>
<ROUTINE V-CALL ()
<COND (<PRSO? ,INTQUOTE>
<V-SAY>)
(<AND <VISIBLE? ,PRSO>
<NOT <IN? ,PRSO ,GLOBAL-OBJECTS>>>
<PERFORM ,V?TELL ,PRSO>
<RTRUE>)
(T
<DO-FIRST "invent the telephone">)>>
<ROUTINE V-CATCH ()
<COND (,PRSI
<TELL
"Sorry," T ,PRSI " isn't much help in catching" TR ,PRSO>)
(T
<TELL "The only thing you're likely to catch is a cold." CR>)>>
<ROUTINE V-CHASTISE ()
<COND (<PRSO? ,INTDIR>
<TELL
,YOULL-HAVE-TO "go in that direction to see what's there." CR>)
(T
<USE-PREPOSITIONS "LOOK " "AT" "INSIDE" "UNDER">)>>
<ROUTINE USE-PREPOSITIONS (VRB PREP1 PREP2 PREP3)
<TELL
"[Use prepositions to indicate precisely what you want to do: " .VRB .PREP1
" the object, " .VRB .PREP2 " it, " .VRB .PREP3 " it, etc.]" CR>>
;<ROUTINE V-CHEER ()
<COND (<PRSO? ,ROOMS>
<TELL ,OK>)
(T
<TELL "Probably," T ,PRSO " is as happy as possible." CR>)>>
<ROUTINE V-CLEAN ()
<SETG AWAITING-REPLY 1>
<QUEUE I-REPLY 2>
<TELL "Do you also do windows?" CR>>
<ROUTINE V-CLIMB ()
<COND (<PRSO? ,ROOMS>
<DO-WALK ,P?UP>)
(<AND <ULTIMATELY-IN? ,PRSO>
<NOT <PRSO? ,WALDO>>
<NOT <IN? ,PRSO ,WALDO>>>
<TELL ,HOLDING-IT>)
(T
<IMPOSSIBLES>)>>
<ROUTINE V-CLIMB-DOWN ()
<COND (<PRSO? ,ROOMS>
<DO-WALK ,P?DOWN>)
(<AND <ULTIMATELY-IN? ,PRSO>
<NOT <PRSO? ,WALDO>>
<NOT <IN? ,PRSO ,WALDO>>>
<TELL ,HOLDING-IT>)
(T
<IMPOSSIBLES>)>>
<ROUTINE V-CLIMB-ON ()
<COND (<AND <PRSO? ,CAMEL>
<IN? ,PROTAGONIST ,CAMEL>
<EQUAL? ,P-PRSA-WORD ,W?RIDE>>
<TELL
"[You'll have to say which direction you want to ride in.]" CR>)
(<AND <PRSO? ,INTDIR>
<VISIBLE? ,CAMEL>>
<COND (<IN? ,PROTAGONIST ,CAMEL>
<PERFORM ,V?RIDE-DIR ,CAMEL ,PRSO>
<RTRUE>)
(T
<DO-FIRST "mount" ,CAMEL>)>)
(<FSET? ,PRSO ,VEHBIT>
<PERFORM ,V?ENTER ,PRSO>
<RTRUE>)
(<AND <ULTIMATELY-IN? ,PRSO>
<NOT <PRSO? ,WALDO>>
<NOT <IN? ,PRSO ,WALDO>>>
<TELL ,HOLDING-IT>)
(<EQUAL? <PARSE-PARTICLE1 ,PARSE-RESULT> ,W?IN>
<CANT-VERB-A-PRSO "climb into">)
(T
<CANT-VERB-A-PRSO "climb onto">)>>
<ROUTINE V-CLIMB-OVER ()
<COND (<AND <ULTIMATELY-IN? ,PRSO>
<NOT <PRSO? ,WALDO>>
<NOT <IN? ,PRSO ,WALDO>>>
<TELL ,HOLDING-IT>)
(T
<IMPOSSIBLES>)>>
<ROUTINE V-CLIMB-UP ()
<COND (<PRSO? ,ROOMS>
<DO-WALK ,P?UP>)
(<AND <ULTIMATELY-IN? ,PRSO>
<NOT <PRSO? ,WALDO>>
<NOT <IN? ,PRSO ,WALDO>>>
<TELL ,HOLDING-IT>)
(T
<IMPOSSIBLES>)>>
<ROUTINE V-CLOSE ()
<COND (<OR <FSET? ,PRSO ,SURFACEBIT>
<FSET? ,PRSO ,ACTORBIT>
<AND <FSET? ,PRSO ,VEHBIT>
<NOT <PRSO? ,DB ,LADDER
,IRON-MAIDEN ,SNAKE-PIT ,WATER-CHAMBER>>>>
<YOU-MUST-TELL-ME>)
(<OR <FSET? ,PRSO ,DOORBIT>
<FSET? ,PRSO ,CONTBIT>>
<COND (<FSET? ,PRSO ,OPENBIT>
<FCLEAR ,PRSO ,OPENBIT>
<TELL "Okay," T ,PRSO " is now closed." CR>
<NOW-DARK?>)
(T
<TELL ,ALREADY-IS>)>)
(T
<YOU-MUST-TELL-ME>)>>
<ROUTINE V-COUGH ()
<COND (<AND <EQUAL? ,HERE ,ICKY-CAVE>
<NOT <IN? ,SICKLY-WITCH ,HERE>>>
<COND (,LIT
<MOVE ,SICKLY-WITCH ,HERE>
<MOVE ,PRICKLY-WITCH ,HERE>
<TELL
"Two witches appear, spraying fumigation spells throughout the cave. One
of the witches, less healthy than the other, frets, \"Oh, dear, I'm not
certain my frail body can stand all these germs!\" The other witch, less
friendly than the first, gives you a blistering glare. \"What manners! I
certainly wouldn't walk into YOUR home and start spewing phlegm around!\"">
<COND (<IN? ,JESTER ,HERE>
<REMOVE-J>
<TELL CR
" They notice the jester for the first time." ,WITCH-REMOVES-J>)
(T
<CRLF>)>)
(T
<TELL
"You hear, briefly, a sound that just might be witches disinfecting
a cave. But, in the dark, who can really tell for sure?" CR>)>)
(T
<TELL
"Hmmm. You seem to be catching a cold. [Can't say I'm surprised,
considering you spent last night sleeping on the cold stone floor
of Flatheadia castle.]" CR>)>>
<ROUTINE PRE-COUNT ()
<COND (<EQUAL? ,PRSO ,ROOMS> ;"multiple objects?"
<TELL "There are " N ,P-MULT ,PERIOD-CR>)>>
<ROUTINE V-COUNT ()
<IMPOSSIBLES>>
<ROUTINE V-CRAWL-UNDER ()
<COND (<NOT <FSET? ,PRSO ,TAKEBIT>>
<TELL-HIT-HEAD>)
(T
<IMPOSSIBLES>)>>
<ROUTINE V-CROSS ()
<V-WALK-AROUND>>
<ROUTINE V-CUT ()
<COND (<NOT ,PRSI>
<IMPOSSIBLES>)
(T
<TELL "Strange concept, cutting" TR ,PRSO>)>>
<ROUTINE V-DATE ()
<TELL
"\"It was on a fateful day in the year 883 GUE...\" is how poets of the
future will begin their tales of your quest. Not being a poet of the
future, you think of it as the 14th day of Mumberbur." CR>>
<ROUTINE V-DECODE ()
<TELL ,YOULL-HAVE-TO "figure it out yourself." CR>>
;<ROUTINE V-DEFLATE ()
<IMPOSSIBLES>>
<ROUTINE V-DIG ()
<COND (<PRSI? ,SHOVEL>
<COND (<NOT <PRSO? ,GROUND>>
<IMPOSSIBLES>)
(<AND <NOT <FSET? ,HERE ,OUTSIDEBIT>>
<NOT <FSET? ,HERE ,DESERTBIT>>>
<TELL "The floor is a bit harder than the shovel." CR>)
(<AND <EQUAL? ,JUMP-X ,STUMP-X>
<EQUAL? ,JUMP-Y ,STUMP-Y>
<IN? ,TREASURE-CHEST ,LOCAL-GLOBALS>>