-
Notifications
You must be signed in to change notification settings - Fork 38
/
gverbs.zap
2248 lines (1869 loc) · 40.7 KB
/
gverbs.zap
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
.FUNCT V-VERBOSE
SET 'VERBOSE,TRUE-VALUE
SET 'SUPER-BRIEF,FALSE-VALUE
PRINTR "Maximum verbosity."
.FUNCT V-BRIEF
SET 'VERBOSE,FALSE-VALUE
SET 'SUPER-BRIEF,FALSE-VALUE
PRINTR "Brief descriptions."
.FUNCT V-SUPER-BRIEF
SET 'SUPER-BRIEF,TRUE-VALUE
PRINTR "Superbrief descriptions."
.FUNCT V-INVENTORY
FIRST? WINNER \?ELS5
CALL PRINT-CONT,WINNER
RSTACK
?ELS5: PRINTR "You are empty-handed."
.FUNCT FINISH,WRD
CALL V-SCORE
?PRG1: CRLF
PRINTI "Would you like to restart the game from the beginning, restore a saved game position, or end this session of the game?
(Type RESTART, RESTORE, or QUIT):
>"
READ P-INBUF,P-LEXV
GET P-LEXV,1 >WRD
EQUAL? WRD,W?RESTART \?ELS7
RESTART
PRINTI "Failed."
CRLF
JUMP ?PRG1
?ELS7: EQUAL? WRD,W?RESTORE \?ELS11
RESTORE \?ELS14
PRINTI "Ok."
CRLF
JUMP ?PRG1
?ELS14: PRINTI "Failed."
CRLF
JUMP ?PRG1
?ELS11: EQUAL? WRD,W?QUIT,W?Q \?PRG1
QUIT
JUMP ?PRG1
.FUNCT V-QUIT,SCOR
CALL V-SCORE
PRINTI "Do you wish to leave the game? (Y is affirmative): "
CALL YES?
ZERO? STACK /?ELS7
QUIT
RTRUE
?ELS7: PRINTR "Ok."
.FUNCT V-RESTART
CALL V-SCORE,TRUE-VALUE
PRINTI "Do you wish to restart? (Y is affirmative): "
CALL YES?
ZERO? STACK /FALSE
PRINTI "Restarting."
CRLF
RESTART
PRINTR "Failed."
.FUNCT V-RESTORE
RESTORE \?ELS5
PRINTI "Ok."
CRLF
CALL V-FIRST-LOOK
RSTACK
?ELS5: PRINTR "Failed."
.FUNCT V-SAVE
SAVE \?ELS5
PRINTR "Ok."
?ELS5: PRINTR "Failed."
.FUNCT V-SCRIPT
GET 0,8
BOR STACK,1
PUT 0,8,STACK
PRINTI "Here begins a transcript of interaction with"
CRLF
CALL V-VERSION
RTRUE
.FUNCT V-UNSCRIPT
PRINTI "Here ends a transcript of interaction with"
CRLF
CALL V-VERSION
GET 0,8
BAND STACK,-2
PUT 0,8,STACK
RTRUE
.FUNCT V-VERSION,CNT=17
PRINTI "ZORK III: The Dungeon Master
Infocom interactive fiction - a fantasy story
Copyright 1982, 1983, 1984, 1986"
PRINTI " Infocom, Inc. All rights reserved."
CRLF
PRINTI "ZORK is a registered trademark of Infocom, Inc.
Release "
GET 0,1
BAND STACK,2047
PRINTN STACK
PRINTI " / Serial number "
?PRG9: IGRTR? 'CNT,23 \?ELS13
JUMP ?REP10
?ELS13: GETB 0,CNT
PRINTC STACK
JUMP ?PRG9
?REP10: CRLF
RTRUE
.FUNCT V-VERIFY
PRINTI "Verifying disk..."
CRLF
VERIFY \?ELS7
PRINTR "The disk is correct."
?ELS7: CRLF
PRINTR "** Disk Failure **"
.FUNCT V-COMMAND-FILE
DIRIN 1
RTRUE
.FUNCT V-RANDOM
EQUAL? PRSO,INTNUM /?ELS5
PRINTR "Illegal call to #RND."
?ELS5: SUB 0,P-NUMBER
RANDOM STACK
RTRUE
.FUNCT V-RECORD
DIROUT 4
RTRUE
.FUNCT V-UNRECORD
DIROUT -4
RTRUE
.FUNCT V-ADVENT
PRINTR "A hollow voice says ""Fool."""
.FUNCT V-ALARM
FSET? PRSO,ACTORBIT \?ELS5
CALL NULL-F
ZERO? STACK \TRUE
PRINTR "He's wide awake, or haven't you noticed..."
?ELS5: PRINTI "The "
PRINTD PRSO
PRINTR " isn't sleeping."
.FUNCT V-ANSWER
PRINTI "Nobody seems to be awaiting your answer."
CRLF
SET 'P-CONT,FALSE-VALUE
SET 'QUOTE-FLAG,FALSE-VALUE
RTRUE
.FUNCT V-ATTACK
FSET? PRSO,ACTORBIT /?ELS5
PRINTI "I've known strange people, but fighting a "
PRINTD PRSO
PRINTR "?"
?ELS5: ZERO? PRSI /?THN10
EQUAL? PRSI,HANDS \?ELS9
?THN10: PRINTI "Trying to attack a "
PRINTD PRSO
PRINTR " with your bare hands is suicidal."
?ELS9: IN? PRSI,WINNER /?ELS15
PRINTI "You aren't even holding the "
PRINTD PRSI
PRINTR "."
?ELS15: FSET? PRSI,WEAPONBIT /?ELS19
PRINTI "Trying to attack the "
PRINTD PRSO
PRINTI " with a "
PRINTD PRSI
PRINTR " is suicidal."
?ELS19: PRINTR "You can't."
.FUNCT V-BACK
PRINTR "Sorry, my memory is poor. Please give a direction."
.FUNCT V-BLAST
PRINTR "You can't blast anything by using words."
.FUNCT PRE-BOARD,AV
LOC WINNER >AV
EQUAL? PRSO,WATER-CHANNEL,TM-SEAT,LAKE /FALSE
FSET? PRSO,VEHBIT \?ELS5
IN? PRSO,HERE /?ELS8
PRINTI "The "
PRINTD PRSO
PRINTI " must be on the ground to be boarded."
CRLF
RETURN 2
?ELS8: FSET? AV,VEHBIT \FALSE
PRINTI "You are already in the "
PRINTD AV
PRINTI "!"
CRLF
RETURN 2
?ELS5: EQUAL? PRSO,WATER,GLOBAL-WATER \?ELS18
CALL PERFORM,V?SWIM,PRSO
RTRUE
?ELS18: PRINTI "You have a theory on how to board a "
PRINTD PRSO
PRINTI ", perhaps?"
CRLF
RETURN 2
.FUNCT V-BOARD,AV
PRINTI "You are now in the "
PRINTD PRSO
PRINTI "."
CRLF
MOVE WINNER,PRSO
GETP PRSO,P?ACTION
CALL STACK,M-ENTER
RTRUE
.FUNCT V-BREATHE
CALL PERFORM,V?INFLATE,PRSO,LUNGS
RSTACK
.FUNCT V-BRUSH
PRINTR "If you wish, but heaven only knows why."
.FUNCT V-BUG
PRINTR "Bug? Not in a flawless program like this! (Cough, cough)."
.FUNCT TELL-NO-PRSI
PRINTR "You didn't say with what!"
.FUNCT PRE-BURN
ZERO? PRSI \?ELS5
CALL TELL-NO-PRSI
RSTACK
?ELS5: FSET? PRSI,FLAMEBIT \?ELS7
FSET? PRSI,ONBIT /FALSE
?ELS7: PRINTI "With a "
PRINTD PRSI
PRINTR "??!?"
.FUNCT V-BURN
CALL NULL-F
ZERO? STACK \FALSE
FSET? PRSO,BURNBIT \?ELS7
IN? PRSO,WINNER /?THN13
IN? WINNER,PRSO \?ELS12
?THN13: CALL REMOVE-CAREFULLY,PRSO
PRINTI "The "
PRINTD PRSO
PRINTI " catches fire. Unfortunately, you were "
IN? WINNER,PRSO \?ELS21
PRINTI "in"
JUMP ?CND19
?ELS21: PRINTI "holding"
?CND19: CALL JIGS-UP,STR?25
RSTACK
?ELS12: CALL REMOVE-CAREFULLY,PRSO
PRINTI "The "
PRINTD PRSO
PRINTR " catches fire and is consumed."
?ELS7: PRINTI "You can't burn a "
PRINTD PRSO
PRINTR "."
.FUNCT V-CHOMP
PRINTR "Preposterous!"
.FUNCT V-CLIMB-DOWN
CALL V-CLIMB-UP,P?DOWN,PRSO
RSTACK
.FUNCT V-CLIMB-FOO
EQUAL? PRSO,ROPE,GLOBAL-ROPE \?ELS5
PUSH P?DOWN
JUMP ?CND1
?ELS5: PUSH P?UP
?CND1: CALL V-CLIMB-UP,STACK,TRUE-VALUE
RSTACK
.FUNCT V-CLIMB-ON
FSET? PRSO,VEHBIT \?ELS5
CALL V-CLIMB-UP,P?UP,TRUE-VALUE
RTRUE
?ELS5: PRINTI "You can't climb onto the "
PRINTD PRSO
PRINTR "."
.FUNCT V-CLIMB-UP,DIR=P?UP,OBJ=0,X,TX,?TMP1
ZERO? OBJ /?CND1
EQUAL? PRSO,ROOMS /?CND1
SET 'OBJ,PRSO
?CND1: GETPT HERE,DIR >TX
ZERO? TX /?ELS10
ZERO? OBJ /?CND11
PTSIZE TX >X
EQUAL? X,NEXIT /?THN18
EQUAL? X,CEXIT,DEXIT,UEXIT \?CND11
GETB TX,0
CALL GLOBAL-IN?,PRSO,STACK
ZERO? STACK \?CND11
?THN18: PRINTI "The "
PRINTD OBJ
PRINTI " do"
EQUAL? OBJ,STAIRS /?CND24
PRINTI "es"
?CND24: PRINTI "n't lead "
EQUAL? DIR,P?UP \?ELS33
PRINTI "up"
JUMP ?CND31
?ELS33: PRINTI "down"
?CND31: PRINTR "ward."
?CND11: CALL DO-WALK,DIR
RTRUE
?ELS10: ZERO? OBJ /?ELS43
GETPT PRSO,P?SYNONYM >X
PTSIZE X
CALL ZMEMQ,W?WALL,X,STACK
ZERO? STACK /?ELS43
PRINTR "Climbing the walls is to no avail."
?ELS43: CALL NULL-F
ZERO? STACK /?ELS49
PRINTR "There are no climbable trees here."
?ELS49: EQUAL? OBJ,FALSE-VALUE,ROOMS \?ELS53
PRINTR "You can't go that way."
?ELS53: PRINTR "You can't do that!"
.FUNCT V-CLOSE
FSET? PRSO,CONTBIT /?ELS5
FSET? PRSO,DOORBIT /?ELS5
PRINTI "You must tell me how to do that to a "
PRINTD PRSO
PRINTR "."
?ELS5: FSET? PRSO,SURFACEBIT /?ELS11
GETP PRSO,P?CAPACITY
ZERO? STACK /?ELS11
FSET? PRSO,OPENBIT \?ELS18
FCLEAR PRSO,OPENBIT
PRINTI "Closed."
CRLF
ZERO? LIT /TRUE
CALL LIT?,HERE >LIT
ZERO? LIT \TRUE
PRINTR "It is now pitch black."
?ELS18: PRINTR "It is already closed."
?ELS11: FSET? PRSO,DOORBIT \?ELS33
FSET? PRSO,OPENBIT \?ELS38
FCLEAR PRSO,OPENBIT
PRINTI "The "
PRINTD PRSO
PRINTR " is now closed."
?ELS38: PRINTR "It is already closed."
?ELS33: PRINTR "You cannot close that."
.FUNCT V-COMMAND
FSET? PRSO,ACTORBIT \?ELS5
PRINTI "The "
PRINTD PRSO
PRINTR " pays no attention."
?ELS5: PRINTR "You cannot talk to that!"
.FUNCT V-COUNT
EQUAL? PRSO,BLESSINGS \?ELS5
PRINTR "Well, for one, you are playing Zork..."
?ELS5: PRINTR "You have lost your mind."
.FUNCT V-CROSS
PRINTR "You can't cross that!"
.FUNCT V-CURSES
ZERO? PRSO /?ELS5
FSET? PRSO,ACTORBIT \?ELS11
PRINTR "Insults of this nature won't help you."
?ELS11: PRINTR "What a loony!"
?ELS5: PRINTR "Such language in a high-class establishment like this!"
.FUNCT V-CUT
FSET? PRSO,ACTORBIT \?ELS5
CALL PERFORM,V?ATTACK,PRSO,PRSI
RSTACK
?ELS5: FSET? PRSO,BURNBIT \?ELS7
FSET? PRSI,WEAPONBIT \?ELS7
IN? WINNER,PRSO \?CND10
PRINTR "Not a bright idea, especially since you're in it."
?CND10: CALL REMOVE-CAREFULLY,PRSO
PRINTI "Your skillful "
PRINTD PRSI
PRINTI "smanship slices the "
PRINTD PRSO
PRINTR " into innumerable slivers which blow away."
?ELS7: FSET? PRSI,WEAPONBIT /?ELS18
PRINTI "The ""cutting edge"" of a "
PRINTD PRSI
PRINTR " is hardly adequate."
?ELS18: PRINTI "Strange concept, cutting the "
PRINTD PRSO
PRINTR "...."
.FUNCT V-DEFLATE
PRINTR "Come on, now!"
.FUNCT V-DIG
ZERO? PRSI \?CND1
SET 'PRSI,HANDS
?CND1: FSET? PRSI,TOOLBIT \?ELS8
PRINTI "Digging with the "
PRINTD PRSI
PRINTR " is slow and tedious."
?ELS8: PRINTI "Digging with a "
PRINTD PRSI
PRINTR " is silly."
.FUNCT V-DISEMBARK
EQUAL? PRSO,ROOMS \?ELS5
LOC WINNER
FSET? STACK,VEHBIT \?ELS5
LOC WINNER
CALL PERFORM,V?DISEMBARK,STACK
RTRUE
?ELS5: LOC WINNER
EQUAL? STACK,PRSO /?ELS9
PRINTI "You're not in that!"
CRLF
RETURN 2
?ELS9: FSET? HERE,RLANDBIT \?ELS15
PRINTI "You are on your own feet again."
CRLF
MOVE WINNER,HERE
RTRUE
?ELS15: PRINTI "You realize that getting out here would be fatal."
CRLF
RETURN 2
.FUNCT V-DISENCHANT
PRINTR "Nothing happens."
.FUNCT V-DRINK
CALL V-EAT
RSTACK
.FUNCT V-DRINK-FROM
PRINTR "How peculiar!"
.FUNCT PRE-DROP
LOC WINNER
EQUAL? PRSO,STACK \FALSE
CALL PERFORM,V?DISEMBARK,PRSO
RTRUE
.FUNCT V-DROP
CALL IDROP
ZERO? STACK /FALSE
PRINTR "Dropped."
.FUNCT V-EAT,EAT?=0,DRINK?=0,NOBJ=0
FSET? PRSO,FOODBIT /?PRD6
PUSH 0
JUMP ?PRD7
?PRD6: PUSH 1
?PRD7: SET 'EAT?,STACK
ZERO? EAT? /?ELS5
IN? PRSO,WINNER /?ELS10
LOC PRSO
IN? STACK,WINNER /?ELS10
PRINTI "You're not holding that."
CRLF
JUMP ?CND8
?ELS10: EQUAL? PRSA,V?DRINK \?ELS16
PRINTI "How can you drink that?"
JUMP ?CND8
?ELS16: PRINTI "Thank you very much. It really hit the spot."
CALL REMOVE-CAREFULLY,PRSO
?CND8: CRLF
RTRUE
?ELS5: FSET? PRSO,DRINKBIT \?ELS24
SET 'DRINK?,TRUE-VALUE
LOC PRSO >NOBJ
IN? PRSO,GLOBAL-OBJECTS /?THN30
CALL GLOBAL-IN?,GLOBAL-WATER,HERE
ZERO? STACK \?THN30
EQUAL? PRSO,PSEUDO-OBJECT \?ELS29
?THN30: CALL HIT-SPOT
RSTACK
?ELS29: ZERO? NOBJ /?THN34
CALL ACCESSIBLE?,NOBJ
ZERO? STACK \?ELS33
?THN34: PRINTR "There isn't any water here."
?ELS33: CALL ACCESSIBLE?,NOBJ
ZERO? STACK /?ELS39
PRINTI "You have to be holding the "
PRINTD NOBJ
PRINTR " first."
?ELS39: FSET? NOBJ,OPENBIT /?ELS43
PRINTI "You'll have to open the "
PRINTD NOBJ
PRINTR " first."
?ELS43: CALL HIT-SPOT
RSTACK
?ELS24: ZERO? EAT? \FALSE
ZERO? DRINK? \FALSE
PRINTI "I don't think that the "
PRINTD PRSO
PRINTR " would agree with you."
.FUNCT HIT-SPOT
EQUAL? PRSO,WATER \?CND1
CALL GLOBAL-IN?,GLOBAL-WATER,HERE
ZERO? STACK \?CND1
CALL REMOVE-CAREFULLY,PRSO
?CND1: PRINTR "Thank you very much. I was rather thirsty (from all this talking, probably)."
.FUNCT V-ECHO,LST,MAX,ECH=0,CNT
PRINTR "echo echo ..."
.FUNCT V-ENCHANT
CALL NULL-F
CALL V-DISENCHANT
RSTACK
.FUNCT REMOVE-CAREFULLY,OBJ,OLIT
EQUAL? OBJ,P-IT-OBJECT \?CND1
SET 'P-IT-OBJECT,FALSE-VALUE
?CND1: SET 'OLIT,LIT
REMOVE OBJ
CALL LIT?,HERE >LIT
ZERO? OLIT /TRUE
EQUAL? OLIT,LIT /TRUE
PRINTR "You are left in the dark..."
.FUNCT V-ENTER
CALL DO-WALK,P?IN
RSTACK
.FUNCT V-EXAMINE
GETP PRSO,P?TEXT
ZERO? STACK /?ELS5
GETP PRSO,P?TEXT
PRINT STACK
CRLF
RTRUE
?ELS5: FSET? PRSO,CONTBIT /?THN10
FSET? PRSO,DOORBIT \?ELS9
?THN10: CALL V-LOOK-INSIDE
RSTACK
?ELS9: PRINTI "There's nothing special about the "
PRINTD PRSO
PRINTR "."
.FUNCT V-EXIT
EQUAL? PRSO,FALSE-VALUE,ROOMS \?ELS5
LOC WINNER
FSET? STACK,VEHBIT \?ELS5
LOC WINNER
CALL PERFORM,V?DISEMBARK,STACK
RTRUE
?ELS5: ZERO? PRSO /?ELS9
IN? WINNER,PRSO \?ELS9
CALL PERFORM,V?DISEMBARK,PRSO
RTRUE
?ELS9: CALL DO-WALK,P?OUT
RSTACK
.FUNCT V-EXORCISE
PRINTR "What a bizarre concept!"
.FUNCT PRE-FILL,TX
ZERO? PRSI \?CND1
GETPT HERE,P?GLOBAL >TX
ZERO? TX /?ELS6
PTSIZE TX
SUB STACK,1
CALL ZMEMQB,GLOBAL-WATER,TX,STACK
ZERO? STACK /?ELS6
CALL PERFORM,V?FILL,PRSO,GLOBAL-WATER
RTRUE
?ELS6: LOC WINNER
IN? WATER,STACK \?ELS10
CALL PERFORM,V?FILL,PRSO,WATER
RTRUE
?ELS10: PRINTR "There is nothing to fill it with."
?CND1: EQUAL? PRSI,WATER /FALSE
EQUAL? PRSI,GLOBAL-WATER /FALSE
CALL PERFORM,V?PUT,PRSI,PRSO
RTRUE
.FUNCT V-FILL
ZERO? PRSI \?ELS5
CALL GLOBAL-IN?,GLOBAL-WATER,HERE
ZERO? STACK /?ELS10
CALL PERFORM,V?FILL,PRSO,GLOBAL-WATER
RTRUE
?ELS10: LOC WINNER
IN? WATER,STACK \?ELS12
CALL PERFORM,V?FILL,PRSO,WATER
RTRUE
?ELS12: PRINTR "There's nothing to fill it with."
?ELS5: PRINTR "You may know how to do that, but I don't."
.FUNCT V-FIND,L
LOC PRSO >L
EQUAL? PRSO,HANDS,LUNGS \?ELS5
PRINTR "Within six feet of your head, assuming you haven't left that somewhere."
?ELS5: EQUAL? PRSO,ME \?ELS9
PRINTR "You're around here somewhere..."
?ELS9: EQUAL? L,GLOBAL-OBJECTS \?ELS13
PRINTR "You find it."
?ELS13: IN? PRSO,WINNER \?ELS17
PRINTR "You have it."
?ELS17: IN? PRSO,HERE /?THN22
CALL GLOBAL-IN?,PRSO,HERE
ZERO? STACK \?THN22
EQUAL? PRSO,PSEUDO-OBJECT \?ELS21
?THN22: PRINTR "It's right here."
?ELS21: FSET? L,ACTORBIT \?ELS27
PRINTI "The "
PRINTD L
PRINTR " has it."
?ELS27: FSET? L,SURFACEBIT \?ELS31
PRINTI "It's on the "
PRINTD L
PRINTR "."
?ELS31: FSET? L,CONTBIT \?ELS35
PRINTI "It's in the "
PRINTD L
PRINTR "."
?ELS35: PRINTR "Beats me."
.FUNCT V-FOLLOW
PRINTR "You're nuts!"
.FUNCT V-FROBOZZ
PRINTR "The FROBOZZ Corporation created, owns, and operates this dungeon."
.FUNCT PRE-GIVE
CALL HELD?,PRSO
ZERO? STACK \FALSE
PRINTI "That's easy for you to say since you don't even have the "
PRINTD PRSO
PRINTR "."
.FUNCT V-GIVE
FSET? PRSI,ACTORBIT /?ELS5
PRINTI "You can't give a "
PRINTD PRSO
PRINTI " to a "
PRINTD PRSI
PRINTR "!"
?ELS5: PRINTI "The "
PRINTD PRSI
PRINTR " refuses it politely."
.FUNCT V-HATCH
PRINTR "Bizarre!"
.FUNCT V-HELLO
ZERO? PRSO /?ELS5
FSET? PRSO,ACTORBIT \?ELS11
PRINTI "The "
PRINTD PRSO
PRINTR " bows his head to you in greeting."
?ELS11: PRINTI "It's a well known fact that only schizophrenics say ""Hello"" to a "
PRINTD PRSO
PRINTR "."
?ELS5: CALL PICK-ONE,HELLOS
PRINT STACK
CRLF
RTRUE
.FUNCT V-INCANT
PRINTI "The incantation echoes back faintly, but nothing else happens."
CRLF
SET 'QUOTE-FLAG,FALSE-VALUE
SET 'P-CONT,FALSE-VALUE
RTRUE
.FUNCT V-INFLATE
PRINTR "How can you inflate that?"
.FUNCT V-KICK
CALL HACK-HACK,STR?26
RSTACK
.FUNCT V-KISS
PRINTR "I'd sooner kiss a pig."
.FUNCT V-KNOCK
FSET? PRSO,DOORBIT \?ELS5
PRINTR "Nobody's home."
?ELS5: PRINTI "Why knock on a "
PRINTD PRSO
PRINTR "?"
.FUNCT V-LAMP-OFF
FSET? PRSO,LIGHTBIT \?ELS3
FSET? PRSO,ONBIT /?ELS6
PRINTR "It is already off."
?ELS6: FCLEAR PRSO,ONBIT
ZERO? LIT /?CND11
CALL LIT?,HERE >LIT
?CND11: PRINTI "The "
PRINTD PRSO
PRINTI " is now off."
CRLF
ZERO? LIT \TRUE
PRINTI "It is now pitch black."
CRLF
RTRUE
?ELS3: PRINTR "You can't turn that off."
.FUNCT V-LAMP-ON
FSET? PRSO,LIGHTBIT \?ELS3
FSET? PRSO,ONBIT \?ELS6
PRINTR "It is already on."
?ELS6: FSET PRSO,ONBIT
PRINTI "The "
PRINTD PRSO
PRINTI " is now on."
CRLF
ZERO? LIT \TRUE
CALL LIT?,HERE >LIT
CRLF
CALL V-LOOK
RTRUE
?ELS3: FSET? PRSO,BURNBIT \?ELS17
PRINTI "If you wish to burn the "
PRINTD PRSO
PRINTR ", you should say so."
?ELS17: PRINTR "You can't turn that on."
.FUNCT V-LAUNCH
FSET? PRSO,VEHBIT \?ELS5
PRINTR "You can't launch that by saying ""launch""!"
?ELS5: PRINTR "That's pretty weird."
.FUNCT V-LEAN-ON
PRINTR "Getting tired?"
.FUNCT V-LEAP,TX,S
ZERO? PRSO /?ELS5
IN? PRSO,HERE \?ELS11
FSET? PRSO,ACTORBIT \?ELS16
PRINTI "The "
PRINTD PRSO
PRINTR " is too big to jump over."
?ELS16: CALL V-SKIP
RSTACK
?ELS11: PRINTR "That would be a good trick."
?ELS5: GETPT HERE,P?DOWN >TX
ZERO? TX /?ELS26
PTSIZE TX >S
EQUAL? S,2 /?THN32
EQUAL? S,4 \?ELS31
GETB TX,1
VALUE STACK
ZERO? STACK \?ELS31
?THN32: PRINTI "This was not a very safe place to try jumping."
CRLF
CALL PICK-ONE,JUMPLOSS
CALL JIGS-UP,STACK
RSTACK
?ELS31: CALL NULL-F
ZERO? STACK \TRUE
CALL V-SKIP
RSTACK
?ELS26: CALL V-SKIP
RSTACK
.FUNCT V-LEAVE
CALL DO-WALK,P?OUT
RSTACK
.FUNCT V-LISTEN
PRINTI "The "
PRINTD PRSO
PRINTR " makes no sound."
.FUNCT V-LOCK
PRINTR "It doesn't seem to work."
.FUNCT V-LOOK
CALL DESCRIBE-ROOM,TRUE-VALUE
ZERO? STACK /FALSE
CALL DESCRIBE-OBJECTS,TRUE-VALUE
RSTACK
.FUNCT V-LOOK-BEHIND
PRINTI "There is nothing behind the "
PRINTD PRSO
PRINTR "."
.FUNCT V-LOOK-INSIDE
FSET? PRSO,DOORBIT \?ELS5
FSET? PRSO,OPENBIT \?ELS8
PRINTI "The "
PRINTD PRSO
PRINTI " is open, but I can't tell what's beyond it."
JUMP ?CND6
?ELS8: PRINTI "The "
PRINTD PRSO
PRINTI " is closed."
?CND6: CRLF
RTRUE
?ELS5: FSET? PRSO,CONTBIT \?ELS16
FSET? PRSO,ACTORBIT \?ELS21
PRINTR "There is nothing special to be seen."
?ELS21: CALL SEE-INSIDE?,PRSO
ZERO? STACK /?ELS25
FIRST? PRSO \?ELS30
CALL PRINT-CONT,PRSO
ZERO? STACK \TRUE
?ELS30: FSET? PRSO,SURFACEBIT \?ELS34
PRINTI "There is nothing on the "
PRINTD PRSO
PRINTR "."
?ELS34: PRINTI "The "
PRINTD PRSO
PRINTR " is empty."
?ELS25: PRINTI "The "
PRINTD PRSO
PRINTR " is closed."
?ELS16: PRINTI "You can't look inside a "
PRINTD PRSO
PRINTR "."
.FUNCT V-LOOK-ON
FSET? PRSO,SURFACEBIT \?ELS5
CALL PERFORM,V?LOOK-INSIDE,PRSO
RTRUE
?ELS5: PRINTI "Look on a "
PRINTD PRSO
PRINTR "???"
.FUNCT V-LOOK-UNDER
PRINTR "There is nothing but dust there."
.FUNCT V-LOWER
CALL HACK-HACK,STR?30
RSTACK
.FUNCT V-MAKE
PRINTR "You can't do that."
.FUNCT V-MELT
PRINTI "It's not clear that a "
PRINTD PRSO
PRINTR " can be melted."
.FUNCT PRE-MOVE
CALL HELD?,PRSO
ZERO? STACK /FALSE
PRINTR "You aren't an accomplished enough juggler."
.FUNCT V-MOVE
FSET? PRSO,TAKEBIT \?ELS5
PRINTI "Moving the "
PRINTD PRSO
PRINTR " reveals nothing."
?ELS5: PRINTI "You can't move the "
PRINTD PRSO
PRINTR "."
.FUNCT V-MUMBLE
PRINTR "You'll have to speak up if you expect me to hear you!"
.FUNCT PRE-MUNG
EQUAL? PRSO,BEAM /FALSE
ZERO? PRSI /?THN8
FSET? PRSI,WEAPONBIT /FALSE
?THN8: PRINTI "Trying to destroy the "
PRINTD PRSO
PRINTI " with "
ZERO? PRSI \?ELS14
PRINTI "your bare hands"
JUMP ?CND12
?ELS14: PRINTI "a "
PRINTD PRSI
?CND12: PRINTR " is futile."
.FUNCT V-MUNG
FSET? PRSO,ACTORBIT \?ELS5
CALL PERFORM,V?ATTACK,PRSO
RTRUE
?ELS5: PRINTR "Nice try."
.FUNCT V-ODYSSEUS
CALL NULL-F
ZERO? STACK \TRUE
PRINTR "Wasn't he a sailor?"
.FUNCT V-OIL
PRINTR "You probably put spinach in your gas tank, too."
.FUNCT V-OPEN,F,STR
FSET? PRSO,CONTBIT \?ELS5
GETP PRSO,P?CAPACITY
ZERO? STACK /?ELS5