-
Notifications
You must be signed in to change notification settings - Fork 13
/
bshelter.zap
937 lines (864 loc) · 24.8 KB
/
bshelter.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
.FUNCT MATCHBOX-F
EQUAL? PRSA,V?EXAMINE \?ELS5
PRINTR "You see a picture of Santa Claus in his sleigh. The sleigh is filled with computer games from Infocom, and the reindeer pulling it look strained."
?ELS5: EQUAL? PRSA,V?TAKE \FALSE
FCLEAR MATCHBOX,NDESCBIT
RFALSE
.FUNCT WAX-COAT-F
EQUAL? PRSA,V?SCRAPE-OFF \FALSE
EQUAL? PRSI,GREEN-MATCH,RED-MATCH \FALSE
FSET? PRSI,WAXED-BIT \FALSE
FCLEAR PRSI,WAXED-BIT
IN? PRSO,PRSI \?ELS13
REMOVE PRSO
JUMP ?CND8
?ELS13: REMOVE WAX-COAT-2
?CND8: PRINTI "You scrape the wax coating off"
CALL TRPRINT,PRSI
RSTACK
.FUNCT MATCH-F,WAXED
EQUAL? PRSA,V?EXAMINE \?ELS5
PRINTI "It's the wooden, self-lighting variety of match. The "
CALL DPRINT,PRSO
FSET? PRSO,WAXED-BIT \?ELS8
PRINTI " head is coated with a thin layer of wax"
JUMP ?CND6
?ELS8: FSET? PRSO,WETBIT \?ELS10
PRINTI " is wet"
JUMP ?CND6
?ELS10: PRINTI " is "
FSET? PRSO,ONBIT /?CND13
PRINTI "not "
?CND13: PRINTI "lit"
?CND6: PRINTR "."
?ELS5: EQUAL? PRSA,V?KILL,V?LAMP-ON \?ELS17
IN? PRSO,PLAYER /?ELS22
PRINTI "You're not holding"
CALL TRPRINT,PRSO
RSTACK
?ELS22: FSET? PRSO,FLAMEBIT \?ELS24
PRINTR "It's already lit."
?ELS24: GETP PRSO,P?MATCH-LIFE
ZERO? STACK \?ELS26
PRINTR "You can't. It's all used up."
?ELS26: FSET? PRSO,WETBIT \?ELS28
PRINTR "It's wet. It won't light now."
?ELS28: EQUAL? HERE,IN-POOL-1,IN-POOL-2,UNDERPASS-1 /?THN31
EQUAL? HERE,UNDERPASS-2 \?ELS30
?THN31: PRINTR "Not even Uncle Buddy's best special effects men could light a match under water!"
?ELS30: EQUAL? HERE,ON-POOL-1,ON-POOL-2,INLET \?ELS34
PRINTR "You'd better find some dry land first."
?ELS34: CALL QUEUE,I-MATCH-BURN,-1
FSET PRSO,ONBIT
IN? WAX-COAT-1,PRSO \?ELS39
REMOVE WAX-COAT-1
JUMP ?CND37
?ELS39: IN? WAX-COAT-2,PRSO \?CND37
REMOVE WAX-COAT-2
?CND37: FSET PRSO,FLAMEBIT
FSET? PRSO,WAXED-BIT \?ELS44
FCLEAR PRSO,WAXED-BIT
PRINTI "The wax coating melts away as you light"
CALL TRPRINT,PRSO
JUMP ?CND42
?ELS44: PRINTI "Okay,"
CALL TPRINT,PRSO
PRINTI " is now lit."
CRLF
?CND42: CALL NOW-LIT?
RTRUE
?ELS17: EQUAL? PRSA,V?LAMP-OFF \?ELS48
FSET? PRSO,ONBIT \?ELS53
CALL BLOW-OUT-MATCH,PRSO
RSTACK
?ELS53: PRINTR "It's not lit."
?ELS48: EQUAL? PRSA,V?CLOSE,V?OPEN \FALSE
CALL CANT-OPEN-CLOSE
RSTACK
.FUNCT I-MATCH-BURN
FSET? RED-MATCH,ONBIT \?CND1
CALL MATCH-BURN,RED-MATCH
?CND1: FSET? GREEN-MATCH,ONBIT \FALSE
CALL MATCH-BURN,GREEN-MATCH
RSTACK
.FUNCT MATCH-BURN,OBJ
GETP OBJ,P?MATCH-LIFE
ZERO? STACK \?ELS5
CALL BLOW-OUT-MATCH,OBJ,TRUE-VALUE
RSTACK
?ELS5: GETP OBJ,P?MATCH-LIFE
SUB STACK,1
PUTP OBJ,P?MATCH-LIFE,STACK
RTRUE
.FUNCT BLOW-OUT-MATCH,OBJ,ADD-CR=0
FCLEAR OBJ,ONBIT
FCLEAR OBJ,FLAMEBIT
FSET? RED-MATCH,ONBIT /?CND1
FSET? GREEN-MATCH,ONBIT /?CND1
CALL DEQUEUE,I-MATCH-BURN
?CND1: CALL VISIBLE?,OBJ
ZERO? STACK /FALSE
ZERO? ADD-CR /?CND11
CRLF
?CND11: PRINTI "The "
CALL DPRINT,OBJ
PRINTI " goes out, turns to ashes, falls to the ground and disappears."
CRLF
CALL SAY-IF-NOT-LIT
REMOVE OBJ
RTRUE
.FUNCT BOAT-DOCK-F,RARG
EQUAL? RARG,M-LOOK \FALSE
PRINTI "You are in a large grotto standing on a boat dock. Moonlight trickling through the grotto's opening to the north reflects off the water, dimly illuminating this area. A wooden walkway leads north out of the grotto. A pool of sea water covers the bottom of the grotto."
RTRUE
.FUNCT PORTABLE-WATER-F
EQUAL? PRSA,V?ENTER,V?SWIM \?ELS5
CALL GLOBAL-IN?,WATER,HERE
ZERO? STACK /?ELS10
CALL PERFORM,PRSA,WATER
RTRUE
?ELS10: PRINTI "You'd never fit into"
LOC PORTABLE-WATER
CALL TPRINT,STACK
PRINTR "!"
?ELS5: EQUAL? PRSA,V?TASTE,V?DRINK-FROM,V?DRINK \?ELS14
CALL NOT-HOLDING-WATER?
ZERO? STACK \TRUE
PRINTR "You take a sip."
?ELS14: EQUAL? PRSA,V?EMPTY,V?DROP,V?THROW /?THN26
EQUAL? PRSA,V?POUR,V?PUT,V?PUT-ON \?ELS23
?THN26: EQUAL? PRSO,PORTABLE-WATER \?ELS23
CALL NOT-HOLDING-WATER?
ZERO? STACK \TRUE
REMOVE PORTABLE-WATER
FCLEAR PORTABLE-WATER,NDESCBIT
SET 'AMOUNT-OF-WATER,0
CALL DEQUEUE,I-DRIP
EQUAL? PRSA,V?EMPTY \?CND35
PRINTR "You pour the water out of the bucket."
?CND35: ZERO? PRSI /?ELS42
FSET PRSI,WETBIT
FSET? PRSI,FLAMEBIT \?CND44
FCLEAR PRSI,FLAMEBIT
FCLEAR PRSI,ONBIT
EQUAL? PRSI,RED-CANDLE \?ELS49
CALL STOP-RED-BURNING
JUMP ?CND47
?ELS49: EQUAL? PRSI,WHITE-CANDLE \?ELS51
CALL STOP-WHITE-BURNING
JUMP ?CND47
?ELS51: EQUAL? PRSI,BLUE-CANDLE \?ELS53
CALL STOP-BLUE-BURNING
JUMP ?CND47
?ELS53: EQUAL? PRSI,GREEN-MATCH,RED-MATCH \?CND47
CALL DEQUEUE,I-MATCH-BURN
?CND47: PRINTR "You douse the flame with water."
?CND44: PRINTR "You pour water over it, making a mess."
?ELS42: REMOVE PORTABLE-WATER
PRINTR "The water pours out, making a mess."
?ELS23: EQUAL? PRSA,V?PUT-ON,V?PUT \?ELS59
EQUAL? PRSI,PORTABLE-WATER \?ELS59
IN? PORTABLE-WATER,BUCKET \?ELS59
CALL PERFORM,V?PUT,PRSO,BUCKET
RTRUE
?ELS59: EQUAL? PRSA,V?GIVE \?ELS63
EQUAL? PRSO,PORTABLE-WATER \?ELS63
FSET? PRSI,ACTORBIT \?ELS63
CALL PERFORM,V?POUR,PORTABLE-WATER
RTRUE
?ELS63: EQUAL? PRSA,V?EXAMINE,V?SEARCH,V?LOOK-INSIDE \FALSE
LOC PORTABLE-WATER
CALL PERFORM,PRSA,STACK
RTRUE
.FUNCT WATER-F
EQUAL? HERE,UPSTAIRS-BATHROOM,KITCHEN,LADIES-ROOM /?THN6
EQUAL? HERE,MENS-ROOM \?ELS5
?THN6: PRINTR "Hmmm. It seems the water has been turned off."
?ELS5: EQUAL? PRSA,V?DISEMBARK \?ELS9
CALL DO-WALK,P?OUT
RTRUE
?ELS9: EQUAL? PRSA,V?ENTER,V?SWIM \?ELS11
EQUAL? HERE,NORTH-GARDEN \?ELS14
PRINTR "The pond's too shallow for swimming."
?ELS14: FSET? SKIS,WORNBIT \?ELS16
PRINT DOG-PADDLE
CRLF
RTRUE
?ELS16: CALL ULTIMATELY-IN?,LADDER
ZERO? STACK /?ELS18
PRINTI "You won't be able to swim carrying"
CALL TRPRINT,LADDER
RTRUE
?ELS18: EQUAL? HERE,INLET,ON-POOL-1,IN-POOL-1 /?THN21
EQUAL? HERE,UNDERPASS-1,UNDERPASS-2,IN-POOL-2 /?THN21
EQUAL? HERE,ON-POOL-2 \?CND12
?THN21: PRINTR "You swim a few yards."
?CND12: CALL ALL-WET,PLAYER
PRINTI "As you enter the chilly water, goose bumps cover your body and your teeth chatter a bit."
CRLF
CRLF
IN? BUCKET,PLAYER \?CND23
MOVE PORTABLE-WATER,BUCKET
CALL QUEUE,I-DRIP,1
?CND23: EQUAL? HERE,BOAT-DOCK \?ELS28
CALL GOTO,ON-POOL-1
JUMP ?CND26
?ELS28: EQUAL? HERE,LEDGE \?ELS30
CALL GOTO,ON-POOL-2
JUMP ?CND26
?ELS30: CALL GOTO,INLET
?CND26: CALL ULTIMATELY-IN?,FLASHLIGHT
ZERO? STACK /?CND33
FSET? FLASHLIGHT,ONBIT \?CND33
FCLEAR FLASHLIGHT,ONBIT
CRLF
PRINTI "Oops! Your flashlight went out. The water ruined it."
CRLF
?CND33: CALL ULTIMATELY-IN?,RED-CANDLE
ZERO? STACK /?CND38
FSET? RED-CANDLE,ONBIT \?CND38
CALL BLOW-OUT-CANDLE,RED-CANDLE
?CND38: CALL ULTIMATELY-IN?,WHITE-CANDLE
ZERO? STACK /?CND43
FSET? WHITE-CANDLE,ONBIT \?CND43
CALL BLOW-OUT-CANDLE,WHITE-CANDLE
?CND43: CALL ULTIMATELY-IN?,BLUE-CANDLE
ZERO? STACK /?CND48
FSET? BLUE-CANDLE,ONBIT \?CND48
CALL BLOW-OUT-CANDLE,BLUE-CANDLE
?CND48: CALL ULTIMATELY-IN?,GREEN-MATCH
ZERO? STACK /?CND53
FSET? GREEN-MATCH,FLAMEBIT \?CND53
CALL ULTIMATELY-IN?,RED-MATCH
ZERO? STACK /?CND53
FSET? RED-MATCH,FLAMEBIT \?CND53
FCLEAR RED-MATCH,ONBIT
FCLEAR RED-MATCH,FLAMEBIT
REMOVE RED-MATCH
FCLEAR GREEN-MATCH,ONBIT
FCLEAR GREEN-MATCH,FLAMEBIT
REMOVE GREEN-MATCH
PRINTI "You drop the lit "
CALL DPRINT,GREEN-MATCH
PRINTI " and the lit "
CALL DPRINT,RED-MATCH
PRINTC 46
CRLF
?CND53: CALL ULTIMATELY-IN?,RED-MATCH
ZERO? STACK /?CND58
FSET? RED-MATCH,FLAMEBIT \?CND58
FCLEAR RED-MATCH,ONBIT
FCLEAR RED-MATCH,FLAMEBIT
REMOVE RED-MATCH
PRINTI "You drop the lit "
CALL DPRINT,RED-MATCH
PRINTC 46
CRLF
?CND58: CALL ULTIMATELY-IN?,GREEN-MATCH
ZERO? STACK /TRUE
FSET? GREEN-MATCH,FLAMEBIT \TRUE
FCLEAR GREEN-MATCH,ONBIT
FCLEAR GREEN-MATCH,FLAMEBIT
REMOVE GREEN-MATCH
PRINTI "You drop the lit "
CALL DPRINT,GREEN-MATCH
PRINTR "."
?ELS11: EQUAL? PRSA,V?TAKE \?ELS69
EQUAL? PRSO,WATER \?ELS69
IN? BUCKET,PLAYER \?ELS69
CALL PERFORM,V?FILL,BUCKET,WATER
RTRUE
?ELS69: EQUAL? PRSA,V?PUT \?ELS73
EQUAL? PRSI,WATER \?ELS73
EQUAL? HERE,NORTH-GARDEN \?ELS80
CALL PERFORM,V?PUT,PRSO,POND
RTRUE
?ELS80: REMOVE PRSO
PRINTI "The "
CALL DPRINT,PRSO
PRINTR " disappears into the ocean water."
?ELS73: EQUAL? PRSA,V?LOOK-INSIDE \?ELS84
EQUAL? HERE,NORTH-GARDEN \?ELS89
CALL PERFORM,V?LOOK-INSIDE,POND
RTRUE
?ELS89: PRINTR "You see nothing unusual about sea water."
?ELS84: EQUAL? PRSA,V?DRINK \FALSE
EQUAL? PRSO,WATER \FALSE
PRINTR "You take a sip."
.FUNCT ALL-WET,THING,OBJ
FSET THING,WETBIT
FIRST? THING >OBJ /?KLU17
?KLU17:
?PRG1: ZERO? OBJ /?REP2
FSET OBJ,WETBIT
FIRST? OBJ \?CND6
CALL ALL-WET,OBJ
?CND6: NEXT? OBJ >OBJ /?PRG1
JUMP ?PRG1
?REP2: FSET? RED-MATCH,WAXED-BIT \?CND9
FCLEAR RED-MATCH,WETBIT
?CND9: FSET? GREEN-MATCH,WAXED-BIT \FALSE
FCLEAR GREEN-MATCH,WETBIT
RTRUE
.FUNCT TO-BOAT-DOCK
EQUAL? HERE,ON-POOL-1 \FALSE
PRINTI "You climb out of the pool and onto the boat dock. The night air makes you shiver."
CRLF
CRLF
RETURN BOAT-DOCK
.FUNCT UNDER-WATER-F
PRINTI "You take a deep breath then plunge down."
CRLF
CRLF
EQUAL? HERE,ON-POOL-1 \?ELS3
CALL GOTO,IN-POOL-1
JUMP ?CND1
?ELS3: CALL GOTO,IN-POOL-2
?CND1: SET 'BREATH,6
CALL QUEUE,I-BREATH,-1
RFALSE
.FUNCT I-BREATH
DEC 'BREATH
EQUAL? BREATH,3 \?ELS5
CRLF
PRINTR "You feel pressure building in your chest. You won't be able to hold your breath much longer."
?ELS5: EQUAL? BREATH,2 \?ELS7
CRLF
PRINTR "The pressure is increasing. Your feel as if your lungs are going to rupture!"
?ELS7: EQUAL? BREATH,1 \?ELS9
CRLF
PRINTR "You can't hold the air in your lungs any longer. You open your mouth and the air bursts out."
?ELS9: ZERO? BREATH \FALSE
CRLF
PRINTI "As you gasp for your next breath, you suck in a mouthful of cold sea water. You swim frantically a short distance then pass out. Later you awake to find yourself on the beach."
CRLF
CRLF
CALL GOTO,BEACH
RSTACK
.FUNCT OUT-OF-WATER-F
CALL DEQUEUE,I-BREATH
PRINTI "You come to the surface and catch your breath."
CRLF
CRLF
EQUAL? HERE,IN-POOL-1 \?ELS5
RETURN ON-POOL-1
?ELS5: EQUAL? HERE,IN-POOL-2 \FALSE
RETURN ON-POOL-2
.FUNCT TO-UNDERPASS-EAST
PRINTI "You swim east through a narrow, jagged passage."
CRLF
CRLF
RETURN UNDERPASS-1
.FUNCT TO-UNDERPASS-WEST
PRINTI "You swim west through a narrow, jagged passage."
CRLF
CRLF
RETURN UNDERPASS-2
.FUNCT IN-POOL-2-F,RARG
EQUAL? RARG,M-LOOK \FALSE
PRINTI "You are swimming underwater. In the darkness, you can't make out your surroundings here."
CALL LIT?,ON-POOL-2
ZERO? STACK /TRUE
PRINTI " However you do notice a faint light above you."
RTRUE
.FUNCT ON-POOL-2-F,RARG
EQUAL? RARG,M-LOOK \FALSE
PRINTI "You are swimming on the surface of a pool "
CALL LIT?,HERE
ZERO? STACK /?ELS10
PRINTI "inside a small grotto. To the north is a small ledge."
RTRUE
?ELS10: PRINTI "in the dark. From the sound of your breathing you can tell this is a fairly small area."
RTRUE
.FUNCT BOMB-SHELTER-F,RARG
EQUAL? RARG,M-LOOK \?ELS5
PRINTI "With its concrete walls and floor this room looks as if it might be a bomb shelter. A heavy-duty sawhorse has"
CALL APRINT,PLANK
PRINTI " across it. "
FSET? BS-SAFE,ON-GROUND-BIT \?ELS8
PRINTI "A "
CALL DPRINT,BS-SAFE
PRINTI " is on"
CALL TPRINT,LEFT-END
JUMP ?CND6
?ELS8: PRINTI "Suspended above the left end of the plank by"
CALL APRINT,ROPE
EQUAL? ROPE-LIFE,1,2 \?CND11
PRINTI ", which is burning,"
?CND11: PRINTI " is"
CALL APRINT,BS-SAFE
PRINTI ". The rope stretches from the safe, through a pulley in the ceiling, to the floor where it is tied to a pipe running along the wall"
?CND6: PRINTI ". In the ceiling above"
CALL TPRINT,RIGHT-END
PRINTI " there is a"
FSET? HATCH,OPENBIT \?ELS16
PRINTI "n open"
JUMP ?CND14
?ELS16: PRINTI " closed"
?CND14: PRINTI " hatch. A long chain hangs down from"
CALL TPRINT,HATCH
PRINTI ". Just beneath"
CALL TPRINT,HATCH
PRINTI " there is a "
FSET? LADDER,HUNG-BIT \?CND19
CALL DPRINT,LADDER
PRINTI " hanging from a "
?CND19: PRINTI "pair of heavy-duty metal hooks protruding from the wall. There is a doorway leading south."
RTRUE
?ELS5: EQUAL? RARG,M-BEG \FALSE
EQUAL? PRSA,V?HANG-UP \FALSE
ZERO? PRSI \FALSE
CALL PERFORM,V?HANG-UP,PRSO,HOOKS
RTRUE
.FUNCT HATCH-F
EQUAL? PRSA,V?PUT \?ELS5
EQUAL? PRSI,HATCH \?ELS5
FSET? HATCH,OPENBIT \?ELS12
CALL PERFORM,V?PUT,PRSO,HATCH-HOLE
RTRUE
?ELS12: PRINTR "The hatch is closed!"
?ELS5: EQUAL? PRSA,V?OPEN \?ELS16
FSET? HATCH,OPENBIT /?ELS16
EQUAL? HERE,BOMB-SHELTER \?ELS23
PRINTR "That's for you to figure out."
?ELS23: PRINTR "There doesn't seem to be any way to open it from this side."
?ELS16: EQUAL? PRSA,V?EXAMINE \?ELS27
FSET? HATCH,OPENBIT \?ELS27
PRINTI "The "
CALL DPRINT,HATCH
PRINTR " is open, revealing a hole about the size of a manhole."
?ELS27: EQUAL? PRSA,V?CLOSE \?ELS31
FSET? HATCH,OPENBIT \?ELS31
EQUAL? HERE,BOMB-SHELTER \?ELS38
PRINTR "That's for you to figure out."
?ELS38: FCLEAR HATCH,OPENBIT
FSET HATCH-HOLE,INVISIBLE
PRINTR "With a show of strength which would make Aunt Hildegarde proud, you manage to close the heavy hatch."
?ELS31: EQUAL? PRSA,V?ENTER \FALSE
EQUAL? HERE,CLIFF \?ELS47
CALL DO-WALK,P?DOWN
RSTACK
?ELS47: CALL DO-WALK,P?UP
RSTACK
.FUNCT CHAIN-F
EQUAL? PRSA,V?CLIMB-UP,V?PULL \?ELS5
PRINTI "You pull on the "
CALL DPRINT,CHAIN
EQUAL? PRSA,V?CLIMB-UP \?CND6
PRINTI " as you attempt to climb"
?CND6: PRINTI " and"
CALL TPRINT,HATCH
FSET? HATCH,OPENBIT \?ELS11
PRINTI " drops, covering the"
FCLEAR HATCH,OPENBIT
FSET HATCH-HOLE,INVISIBLE
JUMP ?CND9
?ELS11: PRINTI " pops up, revealing a"
FSET HATCH,OPENBIT
FCLEAR HATCH-HOLE,INVISIBLE
?CND9: PRINTI " hole in the ceiling."
EQUAL? PRSA,V?CLIMB-UP \?CND14
PRINTI " The chain is too slippery to climb."
?CND14: CRLF
RTRUE
?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS18
PRINTI "The "
CALL DPRINT,CHAIN
PRINTR " hangs down to about eye-level from the hatch above."
?ELS18: EQUAL? PRSA,V?TAKE \FALSE
PRINTR "You can't take the chain; it's attached to the hatch."
.FUNCT ENDS-F,RARG=0
EQUAL? RARG,M-BEG \?ELS5
CALL TOUCHING?,PRSO
ZERO? STACK /?ELS5
LOC PLAYER
CALL ULTIMATELY-IN?,PRSO,STACK
ZERO? STACK \?ELS5
PRINT YOU-CANT
PRINTI "reach it from here. You'll have to step off"
LOC PLAYER
CALL TPRINT,STACK
PRINTR " first."
?ELS5: ZERO? RARG \FALSE
EQUAL? PRSA,V?EXAMINE \?ELS12
PRINTI "The "
CALL DPRINT,PRSO
PRINTI " is "
EQUAL? PRSO,RIGHT-END \?ELS19
EQUAL? WHICH-END-IS-UP,RIGHT-END /?THN16
?ELS19: EQUAL? PRSO,LEFT-END \?ELS15
EQUAL? WHICH-END-IS-UP,LEFT-END \?ELS15
?THN16: PRINTI "in the air"
JUMP ?CND13
?ELS15: PRINTI "on the ground"
?CND13: PRINTR "."
?ELS12: EQUAL? PRSA,V?LOWER,V?PUSH-DOWN \?ELS25
ZERO? PRSI \?ELS25
EQUAL? PRSO,WHICH-END-IS-UP /?ELS32
CALL ITS-ALREADY,STR?173
RSTACK
?ELS32: FSET? BS-SAFE,ON-GROUND-BIT \?ELS34
PRINTR "It won't budge. The safe is on the other end. You should have eaten more carrots as Aunt Hildegarde told you to, instead of feeding them to the dog. It might have improved your eyesight."
?ELS34: LOC PLAYER
EQUAL? PRSO,STACK \?ELS36
PRINTI "How can you do that to"
CALL TPRINT,PRSO
PRINTR " when you're standing on it?"
?ELS36: EQUAL? PRSO,WHICH-END-IS-UP \?ELS38
IN? PLAYER,LEFT-END /?THN41
IN? PLAYER,RIGHT-END \?ELS38
?THN41: PRINTI "You can't lower"
CALL TPRINT,PRSO
PRINTI " when you're standing on"
LOC PLAYER
CALL TRPRINT,STACK
RSTACK
?ELS38: PRINTI "You push down the "
EQUAL? WHICH-END-IS-UP,RIGHT-END \?ELS47
SET 'WHICH-END-IS-UP,LEFT-END
PRINTI "right"
JUMP ?CND45
?ELS47: SET 'WHICH-END-IS-UP,RIGHT-END
PRINTI "left"
?CND45: PRINTR " end of the plank and the other end goes up."
?ELS25: EQUAL? PRSA,V?RAISE \?ELS51
ZERO? PRSI \?ELS51
EQUAL? PRSO,WHICH-END-IS-UP \?ELS58
CALL ITS-ALREADY,STR?174
RSTACK
?ELS58: LOC PLAYER
EQUAL? PRSO,STACK \?ELS60
PRINTI "How can you raise"
CALL TPRINT,PRSO
PRINTR " when you're standing on it?"
?ELS60: EQUAL? PRSO,LEFT-END \?ELS62
FSET? BS-SAFE,ON-GROUND-BIT \?ELS62
PRINTR "You can't raise the left end when the safe is on it."
?ELS62: PRINTI "You raise the "
EQUAL? WHICH-END-IS-UP,RIGHT-END \?ELS69
SET 'WHICH-END-IS-UP,LEFT-END
PRINTI "left"
JUMP ?CND67
?ELS69: SET 'WHICH-END-IS-UP,RIGHT-END
PRINTI "right"
?CND67: PRINTR " end of the plank and the other end goes down."
?ELS51: EQUAL? PRSA,V?CLIMB-ON,V?STAND-ON \?ELS73
EQUAL? WHICH-END-IS-UP,PRSO \?ELS78
CALL IN-AIR
RSTACK
?ELS78: FSET? BS-SAFE,ON-GROUND-BIT \?ELS80
PRINT YOU-CANT
PRINTI "do that. The "
CALL DPRINT,BS-SAFE
PRINTR " is already there."
?ELS80: FSET? SKIS,WORNBIT \?ELS82
PRINTI "You step onto"
CALL TPRINT,PLANK
PRINTR " but ski right off."
?ELS82: CALL PERFORM,V?BOARD,PRSO
RTRUE
?ELS73: EQUAL? PRSA,V?PUT-ON,V?PUT \FALSE
CALL SLIDES-OFF
RSTACK
.FUNCT IN-AIR
PRINTR "It's in the air. How can you stand on it?"
.FUNCT GENERIC-PLANK-F
EQUAL? PRSA,V?CLIMB-ON,V?STAND-ON /FALSE
RETURN PLANK
.FUNCT PLANK-F
EQUAL? PRSA,V?CLIMB-ON,V?STAND-ON \?ELS5
ZERO? LIT \?ELS5
CALL TOO-DARK
RSTACK
?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS9
PRINTI "The "
CALL DPRINT,PLANK
PRINTI " is about 12 feet long and several inches thick. The right end of the plank is "
EQUAL? WHICH-END-IS-UP,RIGHT-END \?ELS12
PRINTI "in the air "
JUMP ?CND10
?ELS12: PRINTI "on the ground "
?CND10: PRINTI "and the left end is "
EQUAL? WHICH-END-IS-UP,RIGHT-END \?ELS17
PRINTI "on the ground"
FSET? BS-SAFE,ON-GROUND-BIT \?CND15
PRINTI " with"
CALL APRINT,BS-SAFE
PRINTI " sitting on it"
JUMP ?CND15
?ELS17: PRINTI "in the air"
?CND15: PRINTR "."
?ELS9: EQUAL? PRSA,V?DISEMBARK \?ELS24
IN? PLAYER,RIGHT-END /?THN27
IN? PLAYER,LEFT-END \?ELS24
?THN27: LOC PLAYER
CALL PERFORM,V?DISEMBARK,STACK
RTRUE
?ELS24: EQUAL? PRSA,V?PUSH-DOWN \?ELS30
ZERO? PRSI \?ELS30
CALL ENDS-F
RSTACK
?ELS30: EQUAL? PRSA,V?TAKE \?ELS34
PRINT SPINACH
CRLF
RTRUE
?ELS34: EQUAL? PRSA,V?PUT-ON,V?PUT \FALSE
CALL SLIDES-OFF
RSTACK
.FUNCT SLIDES-OFF
PRINTI "The "
CALL DPRINT,PRSO
PRINTI " slides off onto the ground."
CRLF
MOVE PRSO,HERE
RTRUE
.FUNCT PULLEY-PSEUDO
EQUAL? PRSA,V?EXAMINE \FALSE
PRINTR "The pulley is firmly attached to the ceiling."
.FUNCT PIPE-F
EQUAL? PRSA,V?UNTIE \?ELS5
PRINTR "You can't even loosen the knot because of the weight of the safe."
?ELS5: EQUAL? PRSA,V?EXAMINE \FALSE
PRINTI "The "
CALL DPRINT,PIPE
PRINTI " runs along a wall of the bomb shelter"
ZERO? ROPE-LIFE /?CND8
PRINTI ". There is a rope tied to it"
?CND8: PRINTR "."
.FUNCT BS-SAFE-F
EQUAL? PRSA,V?TURN-RIGHT,V?TURN-LEFT \?ELS5
EQUAL? PRSI,INTNUM \?ELS5
FSET? BS-SAFE,ON-GROUND-BIT /?ELS12
PRINTR "You can't reach the safe from here."
?ELS12: GRTR? P-NUMBER,10 \?ELS19
PRINTR "The dial only goes to 10."
?ELS19: SET 'BS-SAFE-DIAL-NUMBER,P-NUMBER
PRINTI "You turn the dial to "
PRINTN BS-SAFE-DIAL-NUMBER
PRINTC 46
FSET? BS-SAFE,OPENBIT /?ELS24
ZERO? STEPS-THROUGH-BS-SAFE \?ELS24
EQUAL? PRSA,V?TURN-LEFT \?ELS24
EQUAL? BS-SAFE-DIAL-NUMBER,4 \?ELS24
SET 'STEPS-THROUGH-BS-SAFE,1
JUMP ?CND22
?ELS24: FSET? BS-SAFE,OPENBIT /?ELS28
EQUAL? STEPS-THROUGH-BS-SAFE,1 \?ELS28
EQUAL? PRSA,V?TURN-RIGHT \?ELS28
EQUAL? BS-SAFE-DIAL-NUMBER,5 \?ELS28
SET 'STEPS-THROUGH-BS-SAFE,2
JUMP ?CND22
?ELS28: FSET? BS-SAFE,OPENBIT /?ELS32
EQUAL? STEPS-THROUGH-BS-SAFE,2 \?ELS32
EQUAL? PRSA,V?TURN-LEFT \?ELS32
EQUAL? BS-SAFE-DIAL-NUMBER,7 \?ELS32
SET 'STEPS-THROUGH-BS-SAFE,3
FCLEAR BS-SAFE,LOCKEDBIT
PRINTI " You hear a faint click."
JUMP ?CND22
?ELS32: SET 'STEPS-THROUGH-BS-SAFE,0
?CND22: CRLF
RTRUE
?ELS5: EQUAL? PRSA,V?TURN-LEFT,V?TURN-RIGHT,V?TURN \?ELS38
FSET? BS-SAFE,ON-GROUND-BIT /?ELS43
PRINTR "You can't reach the safe from here."
?ELS43: EQUAL? PRSI,FALSE-VALUE,ROOMS \?ELS50
PRINTR "You didn't say what number you wanted to turn the dial to, or the direction."
?ELS50: EQUAL? PRSI,INTNUM \?ELS52
PRINTI "You didn't say whether you wanted to turn the dial RIGHT to "
PRINTN P-NUMBER
PRINTI " or LEFT to "
PRINTN P-NUMBER
PRINTR "."
?ELS52: PRINTR "Huh?"
?ELS38: EQUAL? PRSA,V?EXAMINE \?ELS56
PRINTI "The "
CALL DPRINT,BS-SAFE
PRINTI " is "
FSET? BS-SAFE,ON-GROUND-BIT \?ELS59
PRINTI "sitting on"
CALL TPRINT,LEFT-END
PRINTI ". There is a dial on the safe which can be set to any number between 0 and 10. The dial is set to "
PRINTN BS-SAFE-DIAL-NUMBER
JUMP ?CND57
?ELS59: PRINTI "suspended overhead by"
CALL APRINT,ROPE
?CND57: PRINTI ". There is a small plaque on the front of"
CALL TPRINT,BS-SAFE
PRINTI ". "
RFALSE
?ELS56: EQUAL? PRSA,V?CLOSE \FALSE
FSET? BS-SAFE,OPENBIT \FALSE
FSET BS-SAFE,LOCKEDBIT
RFALSE
.FUNCT PLAQUE-F
FSET? BS-SAFE,ON-GROUND-BIT /?ELS5
PRINTI "It's up too high. "
PRINT YOU-CANT
PRINTR "read it from here."
?ELS5: EQUAL? PRSA,V?READ \FALSE
CALL FIXED-FONT-ON
PRINTI " LEVY, REGAN, LEBLING
SAFE COMPANY
UPPER SANDUSKY, OHIO
1936"
CALL FIXED-FONT-OFF
RSTACK
.FUNCT CORPSE-LINE-F
EQUAL? PRSA,V?EXAMINE \?ELS5
IN? CORPSE-LINE,FILM-PROJECTOR \?ELS10
FSET? FILM-PROJECTOR,ONBIT \?ELS10
CALL PERFORM,V?EXAMINE,PROJECTION-SCREEN
RTRUE
?ELS10: PRINTR "It's a copy of the film ""A Corpse Line,"" on a large film reel."
?ELS5: EQUAL? PRSA,V?TAKE \?ELS16
IN? CORPSE-LINE,FILM-PROJECTOR \FALSE
FSET? FILM-PROJECTOR,ONBIT \FALSE
PRINTI "Even a nonunion projectionist like yourself should know how dangerous it is to try to take film from"
CALL APRINT,FILM-PROJECTOR
PRINTR " while it's running."
?ELS16: EQUAL? PRSA,V?PUT \?ELS25
FSET? FILM-PROJECTOR,ONBIT \?ELS25
EQUAL? PRSI,FILM-PROJECTOR \?ELS25
PRINTI "You start to put"
CALL TPRINT,CORPSE-LINE
PRINTI " in"
CALL TPRINT,FILM-PROJECTOR
PRINTI ", but glance up at a sign on the wall. The sign states: Remember, Perry Projectionist sez, ""Never try to put film in"
CALL APRINT,FILM-PROJECTOR
PRINTR " that's turned on."""
?ELS25: EQUAL? PRSA,V?SHOW \FALSE
PRINTR "It is a little more complicated than that."
.FUNCT RUBBER-STAMP-F
EQUAL? PRSA,V?EXAMINE \FALSE
PRINTR "It's the large rubber stamp Buck Palace used to mail the POW's to the Pentagon in Uncle Buddy's ""Address Unknown."""
.FUNCT ROPE-F
EQUAL? PRSA,V?UNTIE,V?TIE,V?TAKE \?ELS5
EQUAL? ROPE-LIFE,1,2 \?ELS10
PRINTR "You'd burn your hand. It's on fire!"
?ELS10: PRINTI "You can't even loosen the knot because of the weight of"
CALL TRPRINT,BS-SAFE
RSTACK
?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS14
EQUAL? ROPE-LIFE,2 \?ELS19
PRINTI "One end of"
CALL TPRINT,ROPE
PRINTI " is tied around"
CALL TPRINT,BS-SAFE
PRINTR " and the other end is tied to a pipe running along the wall."
?ELS19: EQUAL? ROPE-LIFE,1 \FALSE
PRINTI "The rope is burning and is tied to"
CALL TRPRINT,BS-SAFE
RSTACK
?ELS14: EQUAL? PRSA,V?PUT-UNDER \?ELS23
EQUAL? PRSO,WHITE-CANDLE,BLUE-CANDLE,RED-CANDLE \?ELS23
FSET? PRSO,FLAMEBIT \?ELS23
CALL PERFORM,V?BURN,ROPE,PRSO
RTRUE
?ELS23: EQUAL? PRSA,V?BURN \?ELS27
CALL SET-FLAME-SOURCE
ZERO? STACK \TRUE
FSET? PRSI,FLAMEBIT /?ELS34
PRINTR "Huh?"
?ELS34: LESS? ROPE-LIFE,3 \?ELS36
CALL ITS-ALREADY,STR?175
RSTACK
?ELS36: EQUAL? ROPE-LIFE,3 \FALSE
PRINTI "You touch the flame to the rope then pull it back. The rope catches fire and begins to burn."
CRLF
SET 'ROPE-LIFE,2
FSET ROPE,ONBIT
CALL QUEUE,I-ROPE-BURN,2
RSTACK
?ELS27: EQUAL? PRSA,V?PULL \?ELS40
FSET? BS-SAFE,ON-GROUND-BIT /?ELS40
PRINTI "You pull on"
CALL TPRINT,ROPE
PRINTR " but nothing happens."
?ELS40: EQUAL? PRSA,V?TIE \?ELS44
PRINT YOU-CANT
PRINTI " do that. The "
CALL DPRINT,ROPE
PRINTI " is already tied to"
CALL TRPRINT,BS-SAFE
RSTACK
?ELS44: EQUAL? PRSA,V?CLIMB-UP \FALSE
PRINTR "You climb the rope, almost reaching the safe, then lose your grip and drop to the ground."
.FUNCT I-ROPE-BURN
DEC 'ROPE-LIFE
ZERO? ROPE-LIFE \?ELS5
CRLF
CALL DEQUEUE,I-ROPE-BURN
CALL BURN-THROUGH-ROPE
RSTACK
?ELS5: CRLF
PRINTI "The "
CALL DPRINT,ROPE
PRINTI " continues to burn."
CRLF
CALL QUEUE,I-ROPE-BURN,-1
RTRUE
.FUNCT BURN-THROUGH-ROPE
EQUAL? HERE,TUNNEL /?THN4
EQUAL? HERE,LEDGE \?ELS3
?THN4: PRINTI "You hear a crash echo from the bomb shelter."
CRLF
JUMP ?CND1
?ELS3: EQUAL? HERE,BOMB-SHELTER \?CND1
PRINTI "As the flame burns through"
CALL TPRINT,ROPE
PRINTI " it snaps and"
CALL TPRINT,BS-SAFE
PRINTI " crashes down on"
CALL TPRINT,LEFT-END
LOC PLAYER
EQUAL? STACK,RIGHT-END \?ELS10
PRINTI ". The "
CALL DPRINT,RIGHT-END
PRINTI " catapults you up"
FSET? HATCH,OPENBIT \?ELS13
PRINTI " through the opening in the ceiling. The thrilling sensation of flying ends as you land on your feet on a cliff."
CRLF
CRLF
CALL GOTO,CLIFF
JUMP ?CND1
?ELS13: CALL JIGS-UP,STR?176
JUMP ?CND1
?ELS10: LOC PLAYER
EQUAL? STACK,LEFT-END \?ELS17
CALL JIGS-UP,STR?177
JUMP ?CND1
?ELS17: PRINTI ". The rope burns up and turns to ashes."
CRLF
?CND1: FSET BS-SAFE,ON-GROUND-BIT
SET 'ROPE-LIFE,0
FCLEAR ROPE,ONBIT
REMOVE ROPE
SET 'WHICH-END-IS-UP,RIGHT-END
RETURN WHICH-END-IS-UP
.FUNCT I-SUNRISE
FSET? HERE,OUTDOORSBIT /?THN6
GETP HERE,P?CAPACITY
EQUAL? STACK,20 \FALSE
?THN6: EQUAL? MOVES,547 \?ELS12
CALL QUEUE,I-SUNRISE,10
CALL DEQUEUE,I-NOISE
CRLF
PRINTR "The sun begins to rise over the colony."
?ELS12: EQUAL? MOVES,557 \FALSE
FSET GAME-ROOM,ONBIT
FSET SHORT-HALL,ONBIT
FSET OUTSIDE-PARLOR,ONBIT
FSET FOYER,ONBIT
FSET LIVING-ROOM,ONBIT
FSET KITCHEN,ONBIT
FSET DINING-ROOM,ONBIT
FSET BEDROOM-1,ONBIT
FSET BEDROOM-2,ONBIT
FSET BEDROOM-3,ONBIT
FSET UPSTAIRS-HALL-EAST,ONBIT
FSET UPSTAIRS-HALL-MIDDLE,ONBIT
FSET UPSTAIRS-HALL-WEST,ONBIT
CRLF
PRINTR "The sun rises in the sky, signalling a new day in Malibu."
.ENDI