-
Notifications
You must be signed in to change notification settings - Fork 27
/
things.zap
11637 lines (10699 loc) · 265 KB
/
things.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 HANDLE-SIGNS?,X
INTBL? PRSA,MOVEVERBS,NMVERBS >X \FALSE
PRINTR "Signs are for reading."
.FUNCT BILLBOARD-PSEUDO
FSET PSEUDO-OBJECT,TRYTAKE
ZERO? NOW-PRSI? \FALSE
EQUAL? PRSA,V?EXAMINE,V?READ,V?LOOK-ON \?CCL5
PRINT STR?744
ICALL1 FROTZEN-SIGN
RTRUE
?CCL5: CALL1 HANDLE-SIGNS?
ZERO? STACK /FALSE
RTRUE
.FUNCT FROTZEN-SIGN
PRINTI " says,"
CRLF
CRLF
HLIGHT H-MONO
EQUAL? HOST,MACINTOSH /?CND1
HLIGHT H-BOLD
?CND1: PRINTI "WELCOME TO THE FIELDS OF FROTZEN"
CRLF
HLIGHT H-NORMAL
HLIGHT H-MONO
PRINTI " Last sign for next 120 bloits."
CRLF
HLIGHT H-NORMAL
RTRUE
.FUNCT SUN-F,X
FSET? HERE,INDOORS /?CTR2
CALL1 PLAIN-ROOM?
ZERO? STACK \?CTR2
EQUAL? HERE,NE-WALL \?CCL3
?CTR2: ICALL2 NOT-VISIBLE,SUN
RETURN 2
?CCL3: EQUAL? PRSA,V?EXAMINE,V?LOOK-INSIDE \?CCL10
ICALL1 CTHE-PRINT
PRINTI " is as bright as ever"
EQUAL? HERE,XROADS,ON-PIKE \?CND11
PRINTI ", except to the "
EQUAL? HERE,ON-PIKE \?CCL15
PRINTB W?WEST
JUMP ?CND11
?CCL15: PRINTB W?EAST
?CND11: PRINT PERIOD
RTRUE
?CCL10: EQUAL? PRSA,V?FOLLOW \?CCL17
ICALL2 DO-WALK,P?SOUTH
RTRUE
?CCL17: INTBL? PRSA,TOUCHVERBS,NTOUCHES >X /?CTR18
INTBL? PRSA,E-VERBS,ENTER-VERBS >X /?CTR18
EQUAL? PRSA,V?LOOK-BEHIND \FALSE
?CTR18: ICALL1 IMPOSSIBLE
RTRUE
.FUNCT NOT-VISIBLE,OBJ
ICALL1 PCLEAR
ICALL2 CTHE-PRINT,OBJ
PRINTI " isn't visible"
PRINT AT-MOMENT
RTRUE
.FUNCT SKY-F,X
FSET? HERE,INDOORS \?CCL3
ICALL2 NOT-VISIBLE,SKY
RETURN 2
?CCL3: EQUAL? PRSA,V?EXAMINE,V?LOOK-INSIDE,V?LOOK-UP /?CTR6
EQUAL? PRSA,V?SEARCH \?CCL7
?CTR6: EQUAL? HERE,IN-SKY \?CND10
ICALL1 V-LOOK
RTRUE
?CND10: ICALL PERFORM,V?EXAMINE,SUN
RTRUE
?CCL7: EQUAL? PRSA,V?FLY-UP,V?WALK-TO,V?ENTER /?CTR12
EQUAL? PRSA,V?THROUGH,V?CLIMB-ON,V?CLIMB-UP \?CCL13
?CTR12: ICALL1 V-FLY
RTRUE
?CCL13: EQUAL? PRSA,V?EXIT,V?FLY-DOWN,V?CLIMB-DOWN /?CTR16
EQUAL? PRSA,V?LEAVE,V?CLIMB-DOWN \?CCL17
?CTR16: ICALL1 V-LAND
RTRUE
?CCL17: INTBL? PRSA,TOUCHVERBS,NTOUCHES >X /?CTR20
EQUAL? PRSA,V?LOOK-BEHIND,V?LAND-ON \FALSE
?CTR20: ICALL1 IMPOSSIBLE
RTRUE
.FUNCT BREEZE-F,X
FSET BREEZE,SEEN
FSET? HERE,INDOORS /?CTR2
EQUAL? HERE,APLANE,IN-GARDEN,IN-FROON /?CTR2
EQUAL? HERE,IN-SPLENDOR \?CCL3
?CTR2: PRINTI "There's no wind here to speak of."
CRLF
RETURN 2
?CCL3: INTBL? PRSA,SEEVERBS,NSVERBS >X \?CCL10
PRINTR "Wind is transparent."
?CCL10: EQUAL? PRSA,V?TOUCH \?CCL12
ICALL2 CTHE-PRINT,BREEZE
PRINTR " feels cool and fresh."
?CCL12: INTBL? PRSA,E-VERBS,ENTER-VERBS >X /?CTR13
INTBL? PRSA,X-VERBS,EXIT-VERBS >X \?CCL14
?CTR13: ICALL1 V-WALK-AROUND
RTRUE
?CCL14: INTBL? PRSA,TOUCHVERBS,NTOUCHES >X \FALSE
ICALL1 IMPOSSIBLE
RTRUE
.FUNCT PACK-F
ZERO? NOW-PRSI? /?CCL3
EQUAL? PRSA,V?PUT,V?EMPTY-INTO \FALSE
EQUAL? PRSO,RUG \?CCL8
ICALL1 NEVER-FIT
RTRUE
?CCL8: EQUAL? PRSO,PARASOL \FALSE
FSET? PRSO,OPENED \FALSE
ICALL2 YOUD-HAVE-TO,STR?536
RTRUE
?CCL3: EQUAL? PRSA,V?OPEN,V?OPEN-WITH \?CCL13
ICALL2 ITS-ALREADY,STR?518
RTRUE
?CCL13: EQUAL? PRSA,V?CLOSE \FALSE
PRINTR "It's not that type of pack."
.FUNCT CELLAR-DOOR-F,X
ZERO? NOW-PRSI? \FALSE
EQUAL? PRSA,V?EXAMINE,V?LOOK-ON,V?LOOK-BEHIND \?CCL5
FSET? PRSO,MUNGED \?CCL5
ICALL2 ITS-MUNGED,W?DOOR
RTRUE
?CCL5: EQUAL? PRSA,V?CLOSE \?CCL9
FSET? PRSO,MUNGED \?CCL12
ICALL2 ITS-MUNGED,W?DOOR
RTRUE
?CCL12: FSET? PRSO,OPENED \FALSE
ICALL1 ICLOSE
PRINTI "You pull "
ICALL1 THE-PRINT
PRINTI " shut."
CRLF
EQUAL? HERE,AT-BOTTOM \TRUE
FCLEAR HERE,LIGHTED
ICALL1 SAY-IF-HERE-LIT
RTRUE
?CCL9: EQUAL? PRSA,V?OPEN,V?OPEN-WITH \?CCL17
FSET? PRSO,MUNGED \?CCL20
ICALL2 ITS-MUNGED,W?DOOR
RTRUE
?CCL20: FSET? PRSO,OPENED /FALSE
EQUAL? HERE,AT-BOTTOM \?CCL24
FSET? PRSO,LOCKED /?CCL24
ICALL1 LOCK-CELLAR-DOOR
RTRUE
?CCL24: ZERO? PRSI /FALSE
EQUAL? PRSA,V?OPEN-WITH \FALSE
ICALL2 CRASH-CELLAR-DOOR,PRSI
RTRUE
?CCL17: INTBL? PRSA,E-VERBS,ENTER-VERBS >X /?CTR30
INTBL? PRSA,X-VERBS,EXIT-VERBS >X \?CCL31
?CTR30: EQUAL? HERE,AT-BOTTOM \?CND34
ICALL2 DO-WALK,P?UP
RTRUE
?CND34: ICALL2 DO-WALK,P?DOWN
RTRUE
?CCL31: EQUAL? PRSA,V?KICK,V?HIT,V?MUNG /?CTR36
EQUAL? PRSA,V?LOOSEN,V?PUSH,V?SHAKE /?CTR36
EQUAL? PRSA,V?CUT,V?KNOCK \FALSE
?CTR36: FSET? PRSO,MUNGED \?CCL43
ICALL2 ITS-ALREADY,STR?745
RTRUE
?CCL43: FSET? PRSO,OPENED \?CCL45
ICALL2 ITS-ALREADY,STR?518
RTRUE
?CCL45: EQUAL? PRSA,V?KNOCK \?CND41
EQUAL? HERE,AT-BOTTOM \?CND47
PRINT YOU-HEAR
PRINTR "a muffled ""Har!"""
?CND47: PRINTI """Nobody down there,"" snickers "
ICALL2 THE-PRINT,COOK
PRINT PERIOD
RTRUE
?CND41: SET 'X,PRSI
EQUAL? PRSA,V?KICK \?CND49
SET 'X,FEET
?CND49: ICALL2 CRASH-CELLAR-DOOR,X
RTRUE
.FUNCT ITS-MUNGED,WRD
PRINTI "Little remains of the "
PRINTB WRD
PRINT PERIOD
RTRUE
.FUNCT CRASH-CELLAR-DOOR,OBJ,TBL
ASSIGNED? 'OBJ /?CND1
SET 'OBJ,HANDS
?CND1: ICALL2 ITALICIZE,STR?746
PRINTI "! Your "
EQUAL? OBJ,FALSE-VALUE,HANDS,ME \?CCL5
PRINTB W?FIST
JUMP ?CND3
?CCL5: EQUAL? OBJ,FEET \?CCL7
PRINTB W?FOOT
JUMP ?CND3
?CCL7: ICALL2 DPRINT,OBJ
?CND3: PRINTI " deals "
ICALL2 THE-PRINT,CELLAR-DOOR
PRINTI " a mighty blow"
GET STATS,STRENGTH
LESS? STACK,50 \?CND8
ICALL1 NOTE-NOISE
RTRUE
?CND8: FSET CELLAR-DOOR,OPENED
FCLEAR CELLAR-DOOR,LOCKED
FSET CELLAR-DOOR,MUNGED
FSET AT-BOTTOM,LIGHTED
GETPT CELLAR-DOOR,P?SYNONYM >TBL
PUT TBL,2,W?HOLE
PUT TBL,3,W?OPENING
GETP AT-BOTTOM,P?UP >TBL
PUT TBL,XTYPE,513
PUT TBL,XROOM,IN-KITCHEN
GETP IN-KITCHEN,P?DOWN >TBL
PUT TBL,XTYPE,513
PUT TBL,XROOM,AT-BOTTOM
GETP IN-KITCHEN,P?IN >TBL
PUT TBL,XTYPE,513
PUT TBL,XROOM,AT-BOTTOM
PRINTI ", shattering it and much of "
ICALL2 THE-PRINT,KITCHEN
PRINTI " wall into splinters"
ICALL1 RELOOK
PRINT TAB
PRINTI """Yow,"" murmurs "
EQUAL? HERE,AT-BOTTOM \?CND10
PRINTR "an admiring voice upstairs."
?CND10: FSET COOK,SEEN
ICALL2 THE-PRINT,COOK
PRINTR ", gawking at you admiringly."
.FUNCT NOTE-NOISE
PRINTR ", with little effect except for the noise."
.FUNCT CELLAR-STAIR-F,X
FSET? CELLAR-DOOR,OPENED /?CCL3
EQUAL? HERE,IN-KITCHEN \?CCL3
ICALL1 CANT-SEE-ANY
RETURN 2
?CCL3: EQUAL? HERE,IN-KITCHEN /?CND1
INTBL? PRSA,E-VERBS,CLIMB-ON-VERBS >X \?CND1
FSET? CELLAR-DOOR,OPENED \?CND10
ICALL2 DO-WALK,P?UP
RTRUE
?CND10: SET 'P-IT-OBJECT,CELLAR-DOOR
ICALL2 CTHE-PRINT,CELLAR-DOOR
PRINTR " at the top is closed."
?CND1: CALL2 HANDLE-STAIRS?,IN-KITCHEN
RSTACK
.FUNCT MIGHT-TRIP?
EQUAL? PRSA,V?PUT,V?PUT-ON,V?EMPTY-INTO /?CCL2
EQUAL? PRSA,V?THROW,V?THROW-OVER \FALSE
?CCL2: PRINTI "Better not. You might trip on "
FSET? PRSO,PLURAL \?CCL7
PRINTI "them"
JUMP ?CND5
?CCL7: PRINTI "it"
?CND5: PRINTR " later."
.FUNCT HANDLE-STAIRS?,TOP,X
EQUAL? HERE,TOP /?CND1
SET 'TOP,FALSE-VALUE
?CND1: ZERO? NOW-PRSI? /?CCL5
CALL1 MIGHT-TRIP?
ZERO? STACK /FALSE
RTRUE
?CCL5: EQUAL? PRSA,V?EXAMINE,V?LOOK-ON \?CCL9
ICALL1 CTHE-PRINT
PRINTI " leads "
ZERO? TOP /?CCL12
PRINTI "down"
JUMP ?CND10
?CCL12: PRINTI "up"
?CND10: PRINTR "ward."
?CCL9: EQUAL? PRSA,V?LOOK-UP \?CCL14
ZERO? TOP /?CND15
ICALL1 ALREADY-AT-TOP
RTRUE
?CND15: ICALL1 CANT-SEE-MUCH
RTRUE
?CCL14: EQUAL? PRSA,V?LOOK-DOWN \?CCL18
ZERO? TOP /?CND19
ICALL1 CANT-SEE-MUCH
RTRUE
?CND19: ICALL1 ALREADY-AT-BOTTOM
RTRUE
?CCL18: EQUAL? PRSA,V?FOLLOW,V?USE \?CCL22
ZERO? TOP /?CND23
ICALL2 DO-WALK,P?DOWN
RTRUE
?CND23: ICALL2 DO-WALK,P?UP
RTRUE
?CCL22: INTBL? PRSA,E-VERBS,CLIMB-ON-VERBS >X \?CCL26
ZERO? TOP /?CND27
ICALL1 ALREADY-AT-TOP
RTRUE
?CND27: ICALL2 DO-WALK,P?UP
RTRUE
?CCL26: INTBL? PRSA,X-VERBS,CLIMB-DOWN-VERBS >X \FALSE
ZERO? TOP /?CND31
ICALL2 DO-WALK,P?DOWN
RTRUE
?CND31: ICALL1 ALREADY-AT-BOTTOM
RTRUE
.FUNCT PUB-F,X
EQUAL? HERE,IN-PUB \?CCL3
CALL1 HERE-F
ZERO? STACK \TRUE
?CCL3: INTBL? PRSA,E-VERBS,ENTER-VERBS >X \?CCL7
ICALL2 DO-WALK,P?IN
RTRUE
?CCL7: EQUAL? PRSA,V?EXAMINE \?CCL9
EQUAL? HERE,OUTSIDE-PUB \?CND10
ICALL1 DESCRIBE-PUB-SIGN
RTRUE
?CND10: ICALL1 V-LOOK
RTRUE
?CCL9: EQUAL? PRSA,V?SMELL \?CCL13
PRINTR "Mouthwatering aromas hang in the air."
?CCL13: EQUAL? PRSA,V?LISTEN \FALSE
PRINTI "Raucous laughter"
PRINT STR?596
PRINT PERIOD
RTRUE
.FUNCT PUB-SIGN-F,X
ZERO? NOW-PRSI? /?CCL3
EQUAL? PRSA,V?PUT-ON,V?HANG-ON,V?EMPTY-INTO \?CCL6
EQUAL? PRSO,LANTERN,PARASOL \?CCL9
FIRST? PRSI >X \?CCL12
ICALL YOUD-HAVE-TO,STR?541,X
RTRUE
?CCL12: EQUAL? PRSO,PARASOL \?CND10
FSET? PRSO,OPENED \?CND10
ICALL2 YOUD-HAVE-TO,STR?536
RTRUE
?CND10: BOR NEW-DBOX,SHOWING-ALL >NEW-DBOX
MOVE PRSO,PRSI
PRINTI "You carefully hang "
ICALL1 THE-PRINT
EQUAL? PRSO,LANTERN \?CND16
PRINTI " back"
?CND16: PRINT SON
ICALL1 THEI-PRINT
PRINT PERIOD
RTRUE
?CCL9: EQUAL? PRSA,V?HANG-ON /FALSE
ICALL1 PRSO-SLIDES-OFF-PRSI
RTRUE
?CCL6: EQUAL? PRSA,V?PUT-UNDER \FALSE
ICALL PERFORM,V?DROP,PRSO
RTRUE
?CCL3: CALL2 NOUN-USED?,W?HOOK
ZERO? STACK /?CND1
EQUAL? PRSA,V?EXAMINE,V?LOOK-ON \?CCL23
FIRST? PUB-SIGN >X \?CND24
ICALL2 PRINTCA,X
PRINTR " hangs from it."
?CND24: PRINT XTHE
PRINTR "hook is empty."
?CCL23: INTBL? PRSA,MOVEVERBS,NMVERBS >X \?CND1
ICALL FIRMLY-ATTACHED,STR?747,PRSO,TRUE-VALUE
RTRUE
?CND1: EQUAL? PRSA,V?EXAMINE,V?LOOK-ON,V?READ \?CCL29
ICALL1 DESCRIBE-PUB-SIGN
RTRUE
?CCL29: EQUAL? PRSA,V?PUSH,V?TOUCH,V?SWING /?CTR30
EQUAL? PRSA,V?SHAKE,V?PULL,V?LOOK-BEHIND \?CCL31
?CTR30: ICALL1 CTHE-PRINT
PRINTR " swings back and forth for a moment."
?CCL31: INTBL? PRSA,MOVEVERBS,NMVERBS >X \FALSE
ICALL FIRMLY-ATTACHED,PRSO,PUB
RTRUE
.FUNCT LANTERN-F,TBL,X
ZERO? NOW-PRSI? /?CCL3
INTBL? PRSA,PUTVERBS,NUMPUTS >X \FALSE
ICALL2 ITS-SEALED,LANTERN
RTRUE
?CCL3: CALL2 NOUN-USED?,W?BATTERY
ZERO? STACK /?CCL7
INTBL? PRSA,SEEVERBS,NSVERBS >TBL /?CCL9
INTBL? PRSA,MOVEVERBS,NMVERBS >TBL /?CCL9
EQUAL? PRSA,V?REPAIR,V?REPLACE \?CND1
?CCL9: ICALL2 ITS-SEALED,LANTERN
RTRUE
?CCL7: CALL2 NOUN-USED?,W?SWITCH
ZERO? STACK /?CND1
INTBL? PRSA,MOVEVERBS,NMVERBS >TBL \?CCL16
ICALL FIRMLY-ATTACHED,STR?748,PRSO,TRUE-VALUE
RTRUE
?CCL16: EQUAL? PRSA,V?EXAMINE,V?LOOK-ON \?CND1
ICALL1 CTHE-PRINT
PRINTI "'s switch is o"
FSET? PRSO,OPENED \?CND18
PRINTR "ff."
?CND18: PRINTR "n."
?CND1: EQUAL? PRSA,V?EXAMINE,V?LOOK-INSIDE \?CCL22
ICALL1 CTHE-PRINT
FSET? PRSO,MUNGED \?CND23
PRINTR " is broken beyond repair."
?CND23: PRINTI " looks "
FSET? PRSO,MAPPED \?CCL27
PRINTI "good as new"
JUMP ?CND25
?CCL27: PRINTI "much as you'd expect it to after years of hanging outdoors"
?CND25: FSET? PRSO,LIGHTED \?CND28
PRINTI ". Its glow is "
GRTR? LAMP-LIFE,20 \?CCL32
PRINTR "bright and strong."
?CCL32: GRTR? LAMP-LIFE,10 \?CND30
PRINTR "a bit dim."
?CND30: PRINTI "fading rapidly"
?CND28: PRINT PERIOD
RTRUE
?CCL22: EQUAL? PRSA,V?LOOK-INSIDE,V?OPEN,V?UNPLUG \?CCL35
ICALL2 ITS-SEALED,LANTERN
RTRUE
?CCL35: EQUAL? PRSA,V?LAMP-ON,V?USE \?CCL37
FSET? PRSO,OPENED /?CCL40
ICALL2 ITS-SWITCHED,W?ON
RTRUE
?CCL40: CALL1 CANT-REACH-LANTERN?
ZERO? STACK \TRUE
FCLEAR PRSO,OPENED
ICALL2 ITALICIZE,STR?749
PRINTI ". "
FSET? PRSO,MUNGED /?CCL43
ZERO? LAMP-LIFE \?CND42
?CCL43: PRINTR "Nothing happens."
?CND42: ICALL1 CTHE-PRINT
PRINTI " emits a "
GRTR? LAMP-LIFE,20 \?CCL48
PRINTI "brilliant"
JUMP ?CND46
?CCL48: PRINTI "feeble"
?CND46: PRINTI " glow."
CRLF
ICALL1 LIGHT-LANTERN
RTRUE
?CCL37: EQUAL? PRSA,V?LIGHT-WITH \?CCL50
EQUAL? PRSI,FALSE-VALUE,HANDS \?CND51
ICALL PERFORM,V?LAMP-ON,PRSO
RTRUE
?CND51: PRINT CANT
PRINTI "light "
ICALL1 THE-PRINT
PRINT WITH
ICALL1 THEI-PRINT
PRINT PERIOD
RTRUE
?CCL50: EQUAL? PRSA,V?LAMP-OFF \?CCL54
FSET? PRSO,OPENED \?CCL57
ICALL2 ITS-SWITCHED,W?OFF
RTRUE
?CCL57: CALL1 CANT-REACH-LANTERN?
ZERO? STACK \TRUE
FSET PRSO,OPENED
ICALL2 ITALICIZE,STR?749
PRINTI ". "
FSET? PRSO,LIGHTED \?CND59
ICALL1 CTHE-PRINT
PRINTI " goes out."
CRLF
ICALL1 LANTERN-OUT
RTRUE
?CND59: PRINTI "You switch off "
ICALL1 THE-PRINT
PRINT PERIOD
RTRUE
?CCL54: EQUAL? PRSA,V?MUNG,V?HIT,V?KICK \?CCL62
FSET? PRSO,MUNGED \?CND63
PRINTR "It's already broken enough."
?CND63: ICALL2 ITALICIZE,STR?605
PRINTI "! You smash "
ICALL1 THE-PRINT
PRINT WITH
EQUAL? PRSA,V?KICK /?CTR66
EQUAL? PRSI,FEET \?CCL67
?CTR66: ICALL2 DPRINT,FEET
JUMP ?CND65
?CCL67: EQUAL? PRSI,FALSE-VALUE,HANDS \?CCL71
PRINTI "your fist"
JUMP ?CND65
?CCL71: ICALL1 THEI-PRINT
?CND65: PRINT PERIOD
ICALL1 BREAK-LANTERN
RTRUE
?CCL62: EQUAL? PRSA,V?THROW \?CCL73
FSET? PRSO,MUNGED /?CCL73
ICALL2 ITALICIZE,STR?750
PRINTC 33
CRLF
ICALL1 BREAK-LANTERN
RTRUE
?CCL73: EQUAL? PRSA,V?REPAIR \FALSE
FSET? PRSO,MUNGED \FALSE
PRINTR "You're not a member of the Guild of Lanternmakers."
.FUNCT ITS-SWITCHED,WRD
PRINTI "It's already switched "
PRINTB WRD
PRINT PERIOD
RTRUE
.FUNCT CANT-REACH-LANTERN?,L
LOC LANTERN >L
LOC PLAYER
EQUAL? L,PLAYER,STACK /FALSE
FSET? L,SURFACE /FALSE
ICALL TAKE-FIRST,LANTERN,L
RTRUE
.FUNCT LIGHT-LANTERN
BOR NEW-DBOX,3 >NEW-DBOX
CALL1 NO-LANTERN-HERE?
ZERO? STACK \TRUE
ICALL2 QUEUE,I-LANTERN
ICALL REPLACE-ADJ?,LANTERN,W?DARK,W?LIGHTED
ICALL2 LIGHT-ROOM-WITH,LANTERN
RTRUE
.FUNCT NO-LANTERN-HERE?,LEN
FSET? URGRUE,LIVING \FALSE
IN? GRUE,HERE \?CND1
ICALL2 EXUENT-MONSTER,GRUE
?CND1: CALL1 GRUE-ROOM?
ZERO? STACK /FALSE
ICALL2 VANISH,LANTERN
PRINT TAB
ICALL1 KERBLAM
PRINTI "A bolt of lightning "
EQUAL? HERE,IN-LAIR /?CND8
PRINTI "zigzags down the passageways, "
?CND8: PRINTI "strikes your lantern and blows it into little, tiny bits."
CRLF
FSET? LANTERN,LIGHTED \?CND10
ICALL1 LANTERN-OUT
?CND10: ICALL1 CHUCKLE
RTRUE
.FUNCT LANTERN-OUT
BOR NEW-DBOX,SHOWING-ALL >NEW-DBOX
FCLEAR LANTERN,LIGHTED
ICALL2 DEQUEUE,I-LANTERN
ICALL REPLACE-ADJ?,LANTERN,W?LIGHTED,W?DARK
ICALL1 SAY-IF-HERE-LIT
RTRUE
.FUNCT BREAK-LANTERN
FCLEAR PRSO,SEEN
FSET LANTERN,MUNGED
BOR NEW-DBOX,SHOWING-ALL >NEW-DBOX
ICALL REPLACE-ADJ?,LANTERN,W?ZZZP,W?BROKEN
FSET? LANTERN,LIGHTED \TRUE
ICALL1 LANTERN-OUT
RTRUE
.FUNCT GRUBBO-F,X
EQUAL? HERE,HILLTOP,N-MOOR,AT-LEDGE /?CCL3
CALL1 HERE-F
RSTACK
?CCL3: INTBL? PRSA,E-VERBS,ENTER-VERBS >X \?CCL5
SET 'X,P?EAST
EQUAL? HERE,N-MOOR \?CCL8
SET 'X,P?NORTH
JUMP ?CND6
?CCL8: EQUAL? HERE,AT-LEDGE \?CND6
SET 'X,P?SW
?CND6: ICALL2 DO-WALK,X
RTRUE
?CCL5: INTBL? PRSA,SEEVERBS,NSVERBS >X \FALSE
ICALL1 CANT-SEE-MUCH
RTRUE
.FUNCT SHILL-F
ZERO? NOW-PRSI? \FALSE
EQUAL? PRSA,V?TOUCH,V?SWING,V?SHAKE \?CCL5
PRINTR "Feels hefty."
?CCL5: EQUAL? PRSA,V?EXAMINE,V?LOOK-ON \?CCL7
PRINTR "Years of drifting on the open sea have toughened this stout club into a formidable skull-basher."
?CCL7: EQUAL? PRSA,V?WHAT \?CCL9
CALL2 NOUN-USED?,W?SHILLELAGH
ZERO? STACK /?CCL9
PRINTR "It's a club."
?CCL9: EQUAL? PRSA,V?TAKE \FALSE
FSET? PRSO,TOUCHED /FALSE
CALL1 ITAKE
ZERO? STACK /TRUE
PRINT XTHE
PRINTB W?DRIFTWOOD
PRINTI " begins to float out of reach as you bend over the side of the wharf. You strain your arm lower towards the water, lower... got it!"
CRLF
ICALL1 GET-SHILL
RTRUE
.FUNCT GET-SHILL
FSET SHILL,TOUCHED
ICALL2 DEQUEUE,I-SHILL
FSET SALT,SEEN
PRINT TAB
PRINTI """Found yerself a genu-ine "
ICALL2 DPRINT,SHILL
PRINTI " there, "
ICALL1 BOY-GIRL
PRINTI ","" remarks the artist"
IN? SHILL,PLAYER \?CND1
PRINTI " as you shake off the seawater"
?CND1: PRINTR ". ""Come in handy nowadays."""
.FUNCT SWORD-F
ZERO? NOW-PRSI? \FALSE
EQUAL? PRSA,V?EXAMINE \FALSE
PRINTR "It's of elvish workmanship."
.FUNCT AXE-F
ZERO? NOW-PRSI? \FALSE
EQUAL? PRSA,V?EXAMINE \FALSE
PRINTR "Just the thing for cleaving briskets, and other inconveniences."
.FUNCT DAGGER-F
ZERO? NOW-PRSI? \FALSE
EQUAL? PRSA,V?EXAMINE,V?LOOK-ON \FALSE
PRINTI "It's a very basic "
PRINTD PRSO
PRINTI " with a "
FSET? PRSO,MUNGED \?CCL8
PRINTB W?RUSTY
JUMP ?CND6
?CCL8: PRINTI "razor-sharp"
?CND6: PRINTR " blade."
.FUNCT PUBWALL-F,X
EQUAL? PRSA,V?EMPTY,V?TAKE /FALSE
EQUAL? PRSA,V?EXAMINE,V?LOOK-ON,V?LOOK-INSIDE /?CCL4
EQUAL? PRSA,V?SEARCH \?CND1
?CCL4: FIRST? PRSO >X \FALSE
ICALL2 PRINTCA,X
PRINTR " is imbedded there."
?CND1: CALL1 HANDLE-WALLS?
RSTACK
.FUNCT BOTTLE-F,C
CALL2 NOUN-USED?,W?MAILBOX
ZERO? STACK /?CCL3
ZERO? LIT? /?CND4
ZERO? NOW-PRSI? \?CND4
EQUAL? PRSA,V?OPEN \?CND4
FSET? PRSO,SEEN /?CND8
FSET PRSO,SEEN
PRINTI "Opening the small mailbox reveals a leaflet"
PRINT PTAB
ICALL1 KERBLAM
PRINTI "An Implementor appears in a dazzling flash! He slams the mailbox on "
ICALL2 THE-PRINT,BOTTLE
PRINTR " shut, wags a disapproving finger and disappears before you can speak or move."
?CND8: PRINT CANT
PRINTI "open the "
PRINT STR?751
PRINT PERIOD
RETURN 2
?CND4: ICALL USELESS,STR?751,TRUE-VALUE
RETURN 2
?CCL3: CALL1 SEE-COLOR?
ZERO? STACK /?CND1
INC 'C
CALL ADJ-USED?,W?GRAY,W?GREY,W?WHITE
ZERO? STACK /?CND1
CALL2 NOUN-USED?,W?HOUSE
ZERO? STACK \?CND1
PRINT XTHE
PRINTI "wine in "
ICALL2 THE-PRINT,BOTTLE
PRINTI " is red, not gray."
CRLF
RETURN 2
?CND1: ZERO? NOW-PRSI? /?CCL23
EQUAL? PRSA,V?LOOK-THRU \FALSE
EQUAL? PRSO,PRSI,ME,HEAD \?CND26
ICALL1 IMPOSSIBLE
RTRUE
?CND26: PRINTI "When viewed through "
ICALL1 THEI-PRINT
PRINTI ", "
EQUAL? PRSO,AMULET \?CND28
ZERO? AMULET-WORD \?CND30
ICALL1 SETUP-AMULET
?CND30: BOR NEW-DBOX,SHOWING-ALL >NEW-DBOX
PRINTI "the word """
GETP AMULET,P?NAME-TABLE
ICALL2 PRINT-TABLE,STACK
PRINTI """ stands out clearly against the swirls and flourishes of the "
PRINTD AMULET
PRINT PERIOD
RTRUE
?CND28: ICALL1 THE-PRINT
PRINTI " appears "
ZERO? C /?CND32
PRINTR "pale and ruddy."
?CND32: PRINTR "gray and muddy."
?CCL23: EQUAL? PRSA,V?EXAMINE,V?READ,V?LOOK-INSIDE /?CTR34
EQUAL? PRSA,V?SEARCH \?CCL35
?CTR34: EQUAL? PRSA,V?EXAMINE,V?READ \?CND38
PRINT XTHE
PRINTI "words """
ICALL2 ITALICIZE,STR?752
PRINTI ", bottled by "
ICALL2 FROBOZZ,STR?753
PRINTI ", Ltd"" appear on "
ICALL1 THE-PRINT
PRINTI "'s label, above a picture of a white house with a small mailbox."
EQUAL? PRSA,V?READ \?CND40
CRLF
RTRUE
?CND40: PRINTC SP
?CND38: PRINTI "A pale "
ZERO? C /?CCL44
PRINTB W?RED
JUMP ?CND42
?CCL44: PRINTB W?GRAY
?CND42: PRINTR " liquid swishes around inside. You can see right through it."
?CCL35: EQUAL? PRSA,V?SHAKE,V?SPIN \?CCL46
PRINT XTHE
ZERO? C /?CCL49
PRINTB W?RED
JUMP ?CND47
?CCL49: PRINTB W?GRAY
?CND47: PRINTI " liquid in "
ICALL1 THE-PRINT
PRINTR " swishes around."
?CCL46: EQUAL? PRSA,V?OPEN,V?DRINK,V?DRINK-FROM \?CCL51
ICALL1 CTHE-PRINT
PRINTR " is tightly corked."
?CCL51: EQUAL? PRSA,V?OPEN-WITH \?CCL53
PRINTI "You'll never open "
ICALL1 THE-PRINT
PRINT WITH
ICALL1 THEI-PRINT
PRINTR ". Only a corkscrew will do."
?CCL53: EQUAL? PRSA,V?HIT,V?MUNG,V?KICK \?CCL55
ICALL1 PRSO-SHATTER
PRINTI ", and wine "
PRINT STR?754
RTRUE
?CCL55: EQUAL? PRSA,V?SPIN \FALSE
EQUAL? P-PRSA-WORD,W?SPIN \FALSE
PRINTR "Lonely?"
.FUNCT CRATES-F
EQUAL? PRSA,V?LOOK-INSIDE,V?SEARCH,V?OPEN /?CTR2
EQUAL? PRSA,V?OPEN-WITH \?CCL3
?CTR2: PRINTR "They're all empty."
?CCL3: EQUAL? PRSA,V?SHAKE,V?KICK,V?PUSH \?CCL7
ICALL1 CTHE-PRINT
PRINTR " sways dangerously back and forth."
?CCL7: CALL2 HANDLE-STAIRS?,BARRELTOP
ZERO? STACK /FALSE
RTRUE
.FUNCT SETUP-AMULET,TBL
CALL2 PICK-ONE,MAGIC-WORDS >TBL
PUT TBL,2,1
GET TBL,0 >AMULET-WORD
GET TBL,1
PUTP AMULET,P?NAME-TABLE,STACK
GETPT AMULET,P?SYNONYM
PUT STACK,0,AMULET-WORD
GETPT AMULET,P?ADJECTIVE
PUT STACK,0,AMULET-WORD
FSET AMULET,NAMED
FSET AMULET,IDENTIFIED
FSET AMULET,PROPER
RFALSE
.FUNCT AMULET-F,X
ZERO? NOW-PRSI? \FALSE
CALL NOUN-USED?,W?STARS,W?STAR
ZERO? STACK \?CTR4
CALL2 ADJ-USED?,W?SILVER
ZERO? STACK /?CCL5
?CTR4: EQUAL? PRSA,V?EXAMINE,V?LOOK-ON,V?READ \?CCL10
ZERO? AMULET-TIMER /?CND11
GRTR? AMULET-STARS,1 \?CCL15
PRINT STR?755
JUMP ?CND13
?CCL15: PRINT STR?756
?CND13: PRINT STR?757
PRINTR "is glowing."
?CND11: PRINT STR?756
EQUAL? AMULET-STARS,1 /?CND16
PRINTC 115
?CND16: PRINT STR?757
PRINTI "twinkle"
EQUAL? AMULET-STARS,1 \?CND18
PRINTC 115
?CND18: PRINTR " with hidden power."
?CCL10: INTBL? PRSA,MOVEVERBS,NMVERBS >X \?CND1
PRINT STR?756
GRTR? AMULET-STARS,1 \?CCL23
PRINTI "s are "
JUMP ?CND21
?CCL23: PRINT SIS
?CND21: ICALL1 ETCHED
RTRUE
?CCL5: CALL NOUN-USED?,W?SWIRLS,W?FLOURISHES
ZERO? STACK \?CTR24
CALL2 ADJ-USED?,W?RED
ZERO? STACK /?CCL25
?CTR24: EQUAL? PRSA,V?EXAMINE,V?LOOK-ON,V?READ \?CCL30
PRINT XTHE
ICALL1 SAY-RED
PRINT STR?758
PRINTR " are skillfully wrought."
?CCL30: INTBL? PRSA,MOVEVERBS,NMVERBS >X \?CND1
PRINT XTHE
PRINTI "swirls are "
ICALL1 ETCHED
RTRUE
?CCL25: CALL NOUN-USED?,W?RUNES,W?RUNE
ZERO? STACK \?CCL32
CALL2 ADJ-USED?,W?GREEN
ZERO? STACK /?CND1
?CCL32: EQUAL? PRSA,V?READ,V?EXAMINE,V?LOOK-ON \?CCL37
ICALL1 READ-RUNES
RTRUE
?CCL37: INTBL? PRSA,MOVEVERBS,NMVERBS >X \?CND1
PRINT XTHE
PRINTI "runes are "
ICALL1 ETCHED
RTRUE
?CND1: CALL2 STRANGLE?,AMULET
ZERO? STACK /?CCL41
RETURN 2
?CCL41: EQUAL? PRSA,V?EXAMINE,V?LOOK-ON \?CCL45
ICALL1 CTHE-PRINT
PRINTI " is inscribed with "
ICALL1 SAY-GREEN
PRINTI " runes, "
PRINT STR?759
ICALL1 SAY-RED
PRINT STR?758
GRTR? AMULET-STARS,0 \?CND46
PRINT AND
EQUAL? AMULET-STARS,1 \?CCL50
PRINTR "a shiny star."
?CCL50: EQUAL? AMULET-STARS,2 \?CCL52
PRINTB W?TWO
JUMP ?CND48
?CCL52: PRINTB W?THREE
?CND48: PRINTI " shiny stars"
?CND46: PRINT PERIOD
RTRUE
?CCL45: EQUAL? PRSA,V?READ \?CCL54
ICALL1 READ-RUNES
RTRUE
?CCL54: EQUAL? PRSA,V?SAY,V?YELL \?CCL56
ZERO? AMULET-WORD /?CCL56
CALL2 NOUN-USED?,AMULET-WORD
ZERO? STACK /?CCL56
ICALL1 SAY-AMULET-WORD
RTRUE
?CCL56: EQUAL? PRSA,V?WEAR \?CCL61
ZERO? AMULET-TIMER /?CCL61
FSET? PRSO,WORN /?CCL61
ICALL1 PUTON
ICALL1 MEGA-STRENGTH
RTRUE
?CCL61: EQUAL? PRSA,V?TAKE-OFF \FALSE
ZERO? AMULET-TIMER /FALSE
IN? PRSO,PLAYER \FALSE
FSET? PRSO,WORN \FALSE
ICALL1 TAKEOFF
ICALL1 NORMAL-STRENGTH
RTRUE
.FUNCT STRANGLE?,OBJ,X
INTBL? PRSA,TOUCHVERBS,NTOUCHES >X \FALSE
FSET? SKELETON,SEEN /FALSE
FSET SKELETON,SEEN
GET STATS,ENDURANCE
MUL 20,STACK
DIV STACK,100 >CHOKE
ZERO? CHOKE \?CND6
INC 'CHOKE
?CND6: ICALL2 QUEUE,I-STRANGLE
BOR NEW-DBOX,SHOWING-ROOM >NEW-DBOX
SET 'LAST-MONSTER,SKELETON
SET 'LAST-MONSTER-DIR,FALSE-VALUE
SET 'P-IT-OBJECT,SKELETON
SET 'P-HIM-OBJECT,SKELETON
PRINTI "You reach down to touch "
ICALL2 THE-PRINT,OBJ
PRINTI ".."
PRINT PTAB
ICALL1 CLAMP
ICALL1 BMODE-ON
SUB 0,CHOKE
ICALL2 UPDATE-STAT,STACK
RTRUE
.FUNCT CLAMP
ICALL2 ITALICIZE,STR?521
PRINTR "! Ten bony fingers clamp around your throat!"
.FUNCT ETCHED
PRINTI "permanently etched onto the "
PRINTD PRSO
PRINT PERIOD
RTRUE
.FUNCT READ-RUNES
PRINT XTHE
ICALL1 SAY-GREEN
PRINTI " runes are hard to see. They're "
PRINT STR?759
PRINT LTHE
ICALL1 SAY-RED
PRINT STR?758
PRINTI " on the "
PRINTD PRSO
PRINT PERIOD
RTRUE
.FUNCT SAY-RED
CALL1 SEE-COLOR?
ZERO? STACK /?CND1
PRINTB W?RED
RFALSE
?CND1: PRINTB W?GRAY
RFALSE
.FUNCT SAY-GREEN
CALL1 SEE-COLOR?
ZERO? STACK /?CND1
PRINTB W?GREEN
RFALSE
?CND1: PRINTB W?GRAY
RFALSE
.FUNCT SAY-AMULET-WORD
ZERO? AMULET-STARS /?CND1
FSET? AMULET,NEUTRALIZED /?CND1
CALL2 NO-MAGIC-HERE?,AMULET
ZERO? STACK \TRUE