-
Notifications
You must be signed in to change notification settings - Fork 11
/
dome.zap
1412 lines (1272 loc) · 37.2 KB
/
dome.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 AQUADOME-F
EQUAL? PRSA,V?WHAT,V?FIND /?THN6
EQUAL? PRSA,V?ASK-ABOUT \?ELS5
FSET? PRSO,PERSON \?ELS5
?THN6: EQUAL? NOW-TERRAIN,SEA-TERRAIN \?ELS14
EQUAL? HERE,SUB \?ELS14
CALL PERFORM,V?FIND,PLAYER
RTRUE
?ELS14: ZERO? SUB-IN-OPEN-SEA /?ELS18
PRINTI "Its location is stored in the "
PRINTD AUTO-PILOT
PRINTR "'s computer memory."
?ELS18: ZERO? SUB-IN-DOME \FALSE
EQUAL? NOW-TERRAIN,SEA-TERRAIN /FALSE
PRINTI """The "
PRINTD AQUADOME
PRINTI " encloses the "
PRINT URS
PRINTI " of "
PRINTD IU-GLOBAL
PRINTI ", on the ocean floor off the Atlantic coast. Most "
CALL PRINT-NAME,LAST-NAME
PRINTI " subs can reach it by "
PRINTD AUTO-PILOT
PRINTR "."""
?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS29
LESS? DISTANCE-FROM-BAY,AQUADOME-VISIBLE /?ELS29
SET 'P-WON,FALSE-VALUE
GETP LOCAL-SUB,P?TEXT
PRINT STACK
CRLF
RTRUE
?ELS29: EQUAL? PRSA,V?LOOK-OUTSIDE,V?LOOK-INSIDE \?ELS35
CALL PERFORM,PRSA,WINDOW
RTRUE
?ELS35: EQUAL? PRSA,V?THROUGH \?ELS37
EQUAL? HERE,SUB,CRAWL-SPACE \FALSE
PRINTR "Wait until you're close enough."
?ELS37: EQUAL? PRSA,V?WALK-AROUND \?ELS46
CALL GO-NEXT,IN-DOME-AROUND
ZERO? STACK /TRUE
EQUAL? WINNER,PLAYER /TRUE
CALL OKAY
RTRUE
?ELS46: EQUAL? PRSA,V?WALK-TO \FALSE
ZERO? SUB-IN-DOME /?ELS58
PRINTR "You're in it!"
?ELS58: ZERO? SUB-IN-OPEN-SEA /?ELS63
PRINTI "Let the "
PRINTD AUTO-PILOT
PRINTR " handle that."
?ELS63: PRINTR "First you must reach the open sea."
.FUNCT IN-DOME?,RM
EQUAL? RM,SUB,CRAWL-SPACE \?ELS5
RETURN SUB-IN-DOME
?ELS5: CALL ZMEMQ,RM,IN-DOME-AROUND
ZERO? STACK /FALSE
RTRUE
.FUNCT AIR-ROOM?,RM
EQUAL? RM,FOOT-OF-RAMP,AIRLOCK,AIRLOCK-WALL /TRUE
EQUAL? RM,CENTER-OF-DOME,OUTSIDE-ADMIN-BLDG /TRUE
EQUAL? RM,BLY-OFFICE,SUB /TRUE
RFALSE
.FUNCT THROUGH-ROOF?,RM,HR=0
ZERO? HR \?CND1
SET 'HR,HERE
?CND1: EQUAL? HR,SUB,CRAWL-SPACE,AIRLOCK \?ELS8
EQUAL? RM,SUB,CRAWL-SPACE,AIRLOCK /FALSE
RTRUE
?ELS8: EQUAL? RM,SUB,CRAWL-SPACE,AIRLOCK /TRUE
RFALSE
.FUNCT WINDOW-F,POP
EQUAL? PRSA,V?BRUSH \?ELS5
PRINTR "The window is clean enough without your interference."
?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS9
PRINTR "The window is a simple plastic sheet, giving a view of the dome outside."
?ELS9: EQUAL? PRSA,V?LOOK-OUTSIDE,V?LOOK-INSIDE \?ELS13
ZERO? SNARK-ATTACK-COUNT \?ELS18
PRINTR "You can see the dome outside."
?ELS18: MOVE BLY,HERE
PRINTI "The "
PRINTD AQUADOME
PRINTI "'s search lights probe the ocean, but the "
PRINTD GLOBAL-WATER
PRINTI " is too murky for the beams to penetrate.
""Tip's right!"" "
PRINTD BLY
PRINTI " says. ""That must be the "
PRINTD SNARK
PRINTI " out there. Its tentacles churned up silt from the seabed that way during its first attack, "
CALL PRINT-NAME,FIRST-NAME
PRINTR "!"""
?ELS13: EQUAL? PRSA,V?MUNG \?ELS26
PRINTR "Vandalism is for vandals, not famous inventors!"
?ELS26: EQUAL? PRSA,V?UNLOCK /?THN31
EQUAL? PRSA,V?LOCK,V?CLOSE,V?OPEN \FALSE
?THN31: PRINTR "The window can't be opened."
.FUNCT EXERCISE-TRACK-F
EQUAL? PRSA,V?WALK-TO,V?THROUGH,V?FIND \FALSE
ZERO? SUB-IN-DOME /FALSE
PRINTR "You don't need exercise!"
.FUNCT AIRLOCK-F,RARG=0
EQUAL? RARG,M-ENTER \?ELS5
ZERO? GREENUP-ESCAPE \?THN11
ZERO? GREENUP-TRAPPED /FALSE
?THN11: MOVE LOWELL,HERE
MOVE ANTRIM,HERE
PRINTR "Two of the crew are with you."
?ELS5: EQUAL? RARG,M-LOOK \?ELS16
PRINTI "You're now in the "
PRINTD AIRLOCK
PRINTR ", at the foot of the ramp."
?ELS16: ZERO? RARG \FALSE
CALL REMOTE-VERB?
ZERO? STACK /?ELS23
EQUAL? PRSA,V?WALK-TO,V?THROUGH \FALSE
?ELS23: ZERO? SUB-IN-DOME \?ELS27
CALL SUB-OUTSIDE-AIRLOCK?
ZERO? STACK \?ELS27
CALL NOT-HERE,AIRLOCK
RSTACK
?ELS27: EQUAL? PRSA,V?EMPTY \?ELS31
ZERO? AIRLOCK-FULL \?ELS36
CALL ALREADY,AIRLOCK,STR?65
RSTACK
?ELS36: FSET? AIRLOCK-HATCH,OPENBIT \?ELS38
CALL YOU-CANT,FALSE-VALUE,AIRLOCK-HATCH,STR?21
RSTACK
?ELS38: EQUAL? HERE,SUB,CRAWL-SPACE /?THN41
EQUAL? HERE,BLY-OFFICE,FOOT-OF-RAMP \FALSE
?THN41: CALL QUEUE,I-AIRLOCK-EMPTY,2
PUT STACK,0,1
PRINTR "This will take 1 turn."
?ELS31: EQUAL? PRSA,V?FILL \?ELS46
ZERO? AIRLOCK-FULL /?ELS49
CALL ALREADY,AIRLOCK,STR?66
RTRUE
?ELS49: FSET? AIRLOCK-ELECTRICITY,ONBIT /?ELS52
CALL YOU-CANT,FALSE-VALUE,AIRLOCK-ELECTRICITY,STR?39
RTRUE
?ELS52: CALL AIRLOCK-POP?
ZERO? STACK /?CND47
CALL YOU-CANT,FALSE-VALUE,AIRLOCK,STR?67
RTRUE
?CND47: ZERO? GREENUP-ESCAPE \?CND55
FSET? SUB-DOOR,OPENBIT \?CND58
CALL YOU-CANT,FALSE-VALUE,SUB-DOOR,STR?21
RTRUE
?CND58: FSET? AIRLOCK-ROOF,OPENBIT \?CND55
CALL THIS-IS-IT,AIRLOCK-ROOF
PRINTI "A safety mechanism prevents it. The "
PRINTD AIRLOCK-ROOF
PRINTR " is open!"
?CND55: ZERO? GREENUP-ESCAPE /?ELS70
GRTR? 4,GREENUP-ESCAPE \?ELS70
PRINTI "Greenup is frantically scrambling back up the ladder to avoid being swept off and drowned! "
CALL GREENUP-CUFF
PRINTI "Tip immediately empties the "
PRINTD AIRLOCK
PRINTR " again."
?ELS70: EQUAL? HERE,SUB,CRAWL-SPACE /?THN79
EQUAL? HERE,BLY-OFFICE,FOOT-OF-RAMP \FALSE
?THN79: CALL QUEUE,I-AIRLOCK-EMPTY,2
PUT STACK,0,1
PRINTR "This will take 1 turn."
?ELS46: EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS84
CALL PERFORM,PRSA,AIRLOCK-HATCH
RTRUE
?ELS84: EQUAL? PRSA,V?WALK-TO,V?THROUGH \FALSE
ZERO? SUB-IN-DOME \?CND87
EQUAL? HERE,SUB,CRAWL-SPACE \?CND87
CALL TOO-BAD-BUT,PRSO,STR?16
RTRUE
?CND87: SET 'PRSO,AIRLOCK
CALL CHEERS?
RFALSE
.FUNCT CHEERS?
EQUAL? WINNER,PLAYER \FALSE
CALL ZMEMQ,HERE,IN-DOME-AROUND
ZERO? STACK /FALSE
EQUAL? HERE,AIRLOCK,AIRLOCK-WALL /FALSE
CALL READY-FOR-SNARK?
ZERO? STACK /FALSE
PRINTI "Cheers follow as you start up the ladder into the "
PRINTD AIRLOCK
PRINTR "."
.FUNCT I-AIRLOCK-EMPTY
ZERO? AIRLOCK-FULL /?ELS5
FSET? AIRLOCK-HATCH,OPENBIT /FALSE
SET 'AIRLOCK-FULL,FALSE-VALUE
CRLF
PRINTI "The "
PRINTD AIRLOCK
PRINTI " is now clear of "
PRINTD GLOBAL-WATER
PRINTI " and filled with air at sea-level pressure."
FSET? ENGINE,ONBIT \?CND12
FCLEAR ENGINE,ONBIT
PRINTI " The engine shuts off."
?CND12: FSET AIRLOCK-ROOF,OPENBIT
CALL THIS-IS-IT,SUB-DOOR
CRLF
PRINTI "The roof of the "
PRINTD AIRLOCK
PRINTI " is sliding open, and the "
PRINTD SUB
PRINTI " is in dry dock.
A ramp swings down from the top of the "
PRINTD AIRLOCK
PRINTI "'s north wall to your "
PRINTD SUB-DOOR
PRINTI "."
CRLF
RETURN 2
?ELS5: SET 'AIRLOCK-FULL,TRUE-VALUE
CRLF
PRINTI "The "
PRINTD AIRLOCK
PRINTI " is now filled with "
PRINTD GLOBAL-WATER
PRINTI "."
CRLF
ZERO? SUB-IN-DOME /FALSE
PRINTI "The adjustable cradle then releases the "
PRINTD SUB
PRINTR "'s keel from its grip."
.FUNCT GREENUP-LADDER-F
EQUAL? PRSA,V?THROUGH,V?CLIMB-UP /?THN6
EQUAL? PRSA,V?CLIMB-ON,V?CLIMB-DOWN,V?BOARD \FALSE
?THN6: PRINTI "The "
PRINTD GREENUP-LADDER
PRINTR " is only for emergencies."
.FUNCT AIRLOCK-RAMP-F
EQUAL? PRSA,V?CLIMB-ON,V?CLIMB-DOWN,V?BOARD \?ELS5
EQUAL? HERE,AIRLOCK-WALL \?ELS5
CALL DO-WALK,P?SOUTH
RTRUE
?ELS5: EQUAL? PRSA,V?CLIMB-ON,V?CLIMB-UP,V?BOARD \FALSE
EQUAL? HERE,AIRLOCK \FALSE
CALL DO-WALK,P?NORTH
RTRUE
.FUNCT AIRLOCK-WALL-F,ARG=0
EQUAL? ARG,M-LOOK \FALSE
PRINTI "You're now atop the north wall of the "
PRINTD AQUADOME
PRINTI "'s "
PRINTD AIRLOCK
PRINTI "."
CRLF
PRINTI "This gives you a bird's-eye view of the whole "
PRINT URS
PRINTI " of "
PRINTD IU-GLOBAL
PRINTI ".
The dome is a transparent hemisphere made of plastic of great strength, developed by you for this specific purpose. The dome encloses the four attached buildings of the "
PRINT URS
PRINTI ": the workshop/lab and dormitory in the western half of the dome, and the administration and communication buildings in the eastern half.
"
FSET? AIR-SUPPLY-SYSTEM,MUNGBIT \?CND10
PRINTI "In the very center is the "
PRINTD AIR-SUPPLY-SYSTEM
PRINTI ". This is in a cylinder that runs from the floor to the top of the dome. It extracts oxygen from "
PRINTD GLOBAL-WATER
PRINTI " and emits it through small holes around its base to keep the air fresh at all times.
"
?CND10: PRINTI "A ladder goes from here down to the floor of the "
PRINTD AQUADOME
PRINTI ", outside the "
PRINTD AIRLOCK
PRINTI "'s north wall.
"
CALL CREW-5-TOGETHER?
ZERO? STACK /FALSE
IN? CREW,FOOT-OF-RAMP \FALSE
FSET? BLY,MUNGBIT /FALSE
PRINTD BLY
PRINTI " and her five "
PRINTD CREW
PRINTI " are"
FSET? FOOT-OF-RAMP,TOUCHBIT /?CND26
PRINTI " waiting to greet you"
?CND26: PRINTR " at the foot of this ladder."
.FUNCT AIRLOCK-LADDER-F
EQUAL? PRSA,V?CLIMB-ON,V?CLIMB-DOWN,V?BOARD \?ELS5
EQUAL? HERE,AIRLOCK-WALL \?ELS5
CALL DO-WALK,P?NORTH
RTRUE
?ELS5: EQUAL? PRSA,V?CLIMB-ON,V?CLIMB-UP,V?BOARD \FALSE
EQUAL? HERE,FOOT-OF-RAMP \FALSE
CALL DO-WALK,P?SOUTH
RTRUE
.FUNCT CREW-F
ZERO? DOME-AIR-BAD? /?THN8
FSET? AIR-SUPPLY-SYSTEM,MUNGBIT /?ELS5
?THN8: EQUAL? PRSA,V?ASK-ABOUT \?ELS13
FSET? PRSO,PERSON \?ELS13
EQUAL? PRSI,CREW-GLOBAL,CREW /?THN10
?ELS13: EQUAL? PRSA,V?WHAT \?ELS15
EQUAL? PRSO,CREW-GLOBAL,CREW /?THN10
?ELS15: EQUAL? PRSA,V?TELL-ABOUT \?ELS5
EQUAL? PRSO,PLAYER \?ELS5
?THN10: PRINTI """The crew consists of:
Doctor Walt Horvak, marine biologist and first-aid medic;
"
PRINTD ANTRIM
PRINTI ", laser expert and frogman;
"
PRINTD SIEGEL
PRINTI ", electronics expert in charge of communications; and
"
PRINTD GREENUP
PRINTI " and "
PRINTD LOWELL
PRINTR ", diver-technicians."""
?ELS5: EQUAL? PRSA,V?TELL-ABOUT,V?TELL /?THN24
EQUAL? PRSA,V?ASK-FOR,V?ASK-ABOUT,V?ASK \?ELS21
?THN24: EQUAL? PRSO,CREW \?ELS21
PRINTI "You'd better talk to one crew member at a time."
CRLF
RETURN 2
?ELS21: EQUAL? PRSA,V?HELLO,V?GOODBYE \?ELS31
EQUAL? PRSO,CREW \?ELS31
PRINTD PRSO
PRINTR " nods at you."
?ELS31: EQUAL? PRSA,V?EXAMINE,V?DIAGNOSE \FALSE
ZERO? DOME-AIR-BAD? /?ELS42
PRINTD BLY
PRINTR " and the two divers, Greenup and Lowell, are without oxygen."
?ELS42: PRINTR "All the crew members are okay now."
.FUNCT CREW-GLOBAL-F,L
CALL SPEAKING-VERB?
ZERO? STACK /?ELS5
EQUAL? PRSO,CREW-GLOBAL \?ELS5
PRINTI "The "
PRINTD CREW-GLOBAL
CALL NOT-HERE-PERSON,CREW
SET 'P-CONT,FALSE-VALUE
RTRUE
?ELS5: EQUAL? PRSA,V?WALK-TO \?ELS11
CALL PERFORM,PRSA,CREW
RTRUE
?ELS11: CALL CREW-F
RSTACK
.FUNCT GENERIC-BADGE-F,OBJ
RETURN BADGE-GLOBAL
.FUNCT BADGE-GLOBAL-F
ZERO? SUB-IN-DOME /?THN6
CALL FIND-FLAG,HERE,PERSON,WINNER
ZERO? STACK \?ELS5
?THN6: CALL NOT-HERE,BADGE-GLOBAL-3
RSTACK
?ELS5: EQUAL? PRSA,V?READ,V?EXAMINE,V?ANALYZE \FALSE
CALL EXAMINE-BADGE
CRLF
RTRUE
.FUNCT EXAMINE-BADGE
ZERO? DOME-AIR-BAD? /?ELS5
FSET? AIR-SUPPLY-SYSTEM,MUNGBIT \?ELS11
PRINTI "The badge is turning red! The air is becoming unbreathable!"
RTRUE
?ELS11: PRINTI "The badge is less red now. The air is improving."
RTRUE
?ELS5: PRINTI "When a badge turns red, the air is no longer breathable. It's not red now."
RTRUE
.FUNCT BAD-AIR?
ZERO? DOME-AIR-BAD? /FALSE
FSET? AIR-SUPPLY-SYSTEM,MUNGBIT \FALSE
CALL AIR-SUPPLY-VERB?
ZERO? STACK \FALSE
PRINTI "Shouldn't you fix the "
PRINTD AIR-SUPPLY-SYSTEM
PRINTR " first?"
.FUNCT TROUBLE-BREATHING?
EQUAL? PRSA,V?WAIT-UNTIL,V?WAIT-FOR /FALSE
IN? OXYGEN-GEAR,PLAYER \?THN8
FSET? OXYGEN-GEAR,ONBIT /FALSE
?THN8: PRINTI "You are having "
GRTR? 13,DOME-AIR-BAD? /?CND12
PRINTI "real "
?CND12: PRINTR "trouble breathing."
.FUNCT TIP-REPORTS?
EQUAL? HERE,CENTER-OF-DOME /FALSE
CALL CORRIDOR-LOOK,AIR-SUPPLY-SYSTEM
ZERO? STACK \FALSE
EQUAL? HERE,SUB,CRAWL-SPACE,AIRLOCK \?CND8
MOVE TIP,AIRLOCK-WALL
?CND8: PRINTI "Tip, who is standing near the exit, reports that "
RTRUE
.FUNCT I-DOME-AIR,CALLED?=0,X
FSET? AIR-SUPPLY-SYSTEM,MUNGBIT \?ELS5
ZERO? DOME-AIR-BAD? \?CND6
SET 'DOME-AIR-BAD?,INITIAL-DOME-AIR-BAD
SET 'DOME-AIR-CRIME,TRUE-VALUE
CALL QUEUE,I-DOME-AIR,-1
PUT STACK,0,1
CALL VISIBLE?,BLY >X
FSET BLY,MUNGBIT
FSET GREENUP,MUNGBIT
FSET LOWELL,MUNGBIT
CALL TIP-REPORTS?
ZERO? STACK \?CND9
PRINTI "Suddenly you realize that "
?CND9: PRINTI "Zoe is literally gasping for breath. Her face is turning reddish-purple! She clutches her throat...
Everyone"
ZERO? CALLED? /?ELS18
JUMP ?CND16
?ELS18: IN? OXYGEN-GEAR,PLAYER \?ELS21
FSET? OXYGEN-GEAR,ONBIT \?ELS21
PRINTI ", except you,"
JUMP ?CND16
?ELS21: PRINTI ", including yourself,"
?CND16: PRINTR " is having trouble breathing!"
?CND6: CALL TROUBLE-BREATHING?
INC 'DOME-AIR-BAD?
EQUAL? 7,DOME-AIR-BAD? \?ELS36
CRLF
PRINTI "In 10 turns Bly, Greenup and Lowell, who were not carrying "
PRINTD OXYGEN-GEAR
PRINTI ", will suffocate from lack of oxygen. In 20 turns, "
IN? OXYGEN-GEAR,PLAYER \?ELS41
PRINTI "you and the others"
JUMP ?CND39
?ELS41: PRINTI "those"
?CND39: PRINTI " who do have "
PRINTD OXYGEN-GEAR
PRINTR " will have exhausted their supply of oxygen. Need we say more?"
?ELS36: EQUAL? 13,DOME-AIR-BAD? \?ELS51
CRLF
PRINTI "Zoe Bly and the two crew members without "
PRINTD OXYGEN-GEAR
PRINTI " now have only 4 TURNS left to live! Their lives depend on you, "
CALL PRINT-NAME,FIRST-NAME
PRINTI "!"
CRLF
FSET? ACCESS-PLATE,OPENBIT /TRUE
FSET? UNIVERSAL-TOOL,TOUCHBIT /TRUE
FSET UNIVERSAL-TOOL,TOUCHBIT
FCLEAR UNIVERSAL-TOOL,NDESCBIT
MOVE UNIVERSAL-TOOL,PLAYER
PRINTI "Tip"
IN? TIP,HERE /?CND61
MOVE TIP,HERE
PRINTI " runs up and"
?CND61: PRINTI " gives you a "
PRINTD UNIVERSAL-TOOL
PRINTI " and says, ""Here, "
CALL PRINT-NAME,FIRST-NAME
FSET? CENTER-OF-DOME,TOUCHBIT \?ELS70
PRINTR ", open the cylinder with this! It'll fit anything!"""
?ELS70: PRINTI ", maybe you can use this somehow."""
CRLF
RTRUE
?ELS51: EQUAL? 17,DOME-AIR-BAD? \FALSE
LOC SPECIAL-TOOL
EQUAL? STACK,BLY-OFFICE,HORVAK /?PRD79
PUSH 0
JUMP ?PRD80
?PRD79: PUSH 1
?PRD80: SET 'X,STACK
MOVE HORVAK,CENTER-OF-DOME
PRINTI "
At this desperate moment, "
CALL TIP-REPORTS?
PRINTD HORVAK
PRINTI " runs from the "
PRINTD BLY-OFFICE
ZERO? X /?ELS89
LOC ELECTROLYTE-RELAY
EQUAL? STACK,AIR-SUPPLY-SYSTEM,CENTER-OF-DOME,HORVAK \?ELS89
CALL QUEUE,I-BLY-PRIVATELY,3
PUT STACK,0,1
MOVE SPECIAL-TOOL,HORVAK
FCLEAR SPECIAL-TOOL,INVISIBLE
FSET SPECIAL-TOOL,TOUCHBIT
REMOVE SPECIAL-TOOL-GLOBAL
CALL FIX-AIR-SUPPLY
SET 'HORVAK-FIXED-AIR,TRUE-VALUE
PRINTI ". He's clutching an oddly-shaped gadget.
"
CALL TIP-SAYS
PRINTI "Hey, that's the "
PRINTD SPECIAL-TOOL
PRINTI "!""
"
FSET? ACCESS-PLATE,OPENBIT /?CND96
FSET ACCESS-PLATE,OPENBIT
FSET AIR-SUPPLY-SYSTEM,OPENBIT
PRINTI "Using the "
PRINTD SPECIAL-TOOL
PRINTI ", "
PRINTD HORVAK
PRINTI " quickly opens the "
PRINTD ACCESS-PLATE
PRINTI ". "
?CND96: PRINTI "Inside the cylinder, the "
PRINTD ELECTROLYTE-RELAY
PRINTI " has come unscrewed and fallen out of its socket. Horvak"
IN? ELECTROLYTE-RELAY,HORVAK /?CND103
PRINTI " takes it and"
?CND103: PRINTI " screws it back in place; and within seconds, a fresh supply of oxygen is flowing out into the "
PRINTD AQUADOME
PRINTR "."
?ELS89: PRINTI ". He "
LOC HORVAK
EQUAL? HERE,STACK \?ELS118
PUSH STR?69
JUMP ?CND114
?ELS118: PUSH STR?62
?CND114: PRINT STACK
PRINTI "s, ""I never wanted it to go this far! I sabotaged the "
PRINTD AIR-SUPPLY-SYSTEM
PRINTI " to embarrass "
PRINTD BLY
PRINTI ", but now I can't find the "
ZERO? X /?ELS123
PRINTD ELECTROLYTE-RELAY
JUMP ?CND121
?ELS123: PRINTD SPECIAL-TOOL
?CND121: PRINTI " to fix it!""
As Doc breaks down in tears and Bly suffocates, you realize there's no point in continuing your mission."
CALL FINISH
RSTACK
?ELS5: SUB DOME-AIR-BAD?,DOME-AIR-FIX-RATE >DOME-AIR-BAD?
LESS? 0,DOME-AIR-BAD? /FALSE
CALL INT,I-DOME-AIR
PUT STACK,0,0
CALL QUEUE,I-ANTRIM-TO-SUB,10
PUT STACK,0,1
SET 'DOME-AIR-BAD?,FALSE-VALUE
FSET? BLY,MUNGBIT \FALSE
FCLEAR BLY,MUNGBIT
FCLEAR GREENUP,MUNGBIT
FCLEAR LOWELL,MUNGBIT
CALL VISIBLE?,BLY
ZERO? STACK /FALSE
CALL VISIBLE?,GREENUP
ZERO? STACK /FALSE
CALL VISIBLE?,LOWELL
ZERO? STACK /FALSE
ZERO? HORVAK-FIXED-AIR \?CND152
CRLF
PRINTD HORVAK
PRINTI " has just returned from the "
PRINTD BLY-OFFICE
PRINTI ", where he went to get Bly's "
PRINTD OXYGEN-GEAR
PRINTI ", but it's no longer needed."
CRLF
?CND152: CRLF
PRINTD BLY
PRINTI " is sitting up and her normal color has returned. Ditto for Greenup and Lowell, who collapsed. All are recovering from their temporary lack of air."
CRLF
CALL TELL-HINT,41,ELECTROLYTE-RELAY
RTRUE
.FUNCT FOOT-OF-RAMP-F,ARG=0
EQUAL? ARG,M-BEG \?ELS5
EQUAL? PRSA,V?WALK \FALSE
EQUAL? PRSO,P?UP,P?SOUTH \FALSE
CALL CHEERS?
RFALSE
?ELS5: EQUAL? ARG,M-ENTER \?ELS17
CALL READY-FOR-SNARK?
ZERO? STACK \?THN23
ZERO? GREENUP-ESCAPE \?THN23
ZERO? GREENUP-TRAPPED /?ELS22
?THN23: MOVE BLY,HERE
MOVE ANTRIM,HERE
MOVE HORVAK,HERE
MOVE SIEGEL,HERE
MOVE LOWELL,HERE
ZERO? GREENUP-ESCAPE \?THN30
ZERO? GREENUP-TRAPPED /?ELS29
?THN30: PRINTI "The rest of the "
PRINTD CREW
PRINTR " are with you."
?ELS29: PRINTD BLY
PRINTR " and the others gather to shake your hand and wish you luck on your perilous mission."
?ELS22: ZERO? BLY-WELCOMED \FALSE
SET 'BLY-WELCOMED,TRUE-VALUE
PRINTD BLY
PRINTI " says, """
CALL BLY-WELCOME
PRINTR """"
?ELS17: EQUAL? ARG,M-LOOK \?ELS45
CALL CREW-5-TOGETHER?
ZERO? STACK /?ELS50
IN? CREW,FOOT-OF-RAMP \?ELS50
FSET? BLY,MUNGBIT /?ELS50
FSET? CREW,TOUCHBIT /?ELS57
FSET CREW,TOUCHBIT
CALL QUEUE,I-BLY-PRIVATELY,15
PUT STACK,0,1
PRINTI "You're now face-to-face with Zoe Bly and the "
PRINTD CREW
PRINTI ". They are wearing badges which show the air quality in the "
PRINTD AQUADOME
PRINTR "."
?ELS57: PRINTI "You're at the foot of the ladder. "
IN? BLY,FOOT-OF-RAMP \?ELS66
PRINTI "Zoe Bly and t"
JUMP ?CND64
?ELS66: PRINTI "T"
?CND64: PRINTI "he "
PRINTD CREW
PRINTR " are still here."
?ELS50: PRINTR "You're now at the foot of the ladder."
?ELS45: EQUAL? ARG,M-END \FALSE
EQUAL? EXCLAM-DOME-AIR-BAD,DOME-AIR-BAD? \FALSE
FSET? AIR-SUPPLY-SYSTEM,MUNGBIT \FALSE
CRLF
CALL BADGES-RED,TRUE-VALUE
RTRUE
.FUNCT BADGES-RED,SHOUT?=0
ZERO? BADGES-RED-SAID? \FALSE
SET 'BADGES-RED-SAID?,TRUE-VALUE
ZERO? SHOUT? /?CND6
PRINTI "Someone shouts, "
?CND6: PRINTI """Our badges are turning red! The air's bad! Everyone use your "
PRINTD OXYGEN-GEAR
PRINTR "!"""
.FUNCT OUTSIDE-DORM-F,RARG=0
EQUAL? RARG,M-LOOK \FALSE
CALL FROM-HERE,P?WEST,P?SOUTH
RSTACK
.FUNCT FROM-HERE,DIR1,DIR2
PRINTI "From here, you can go "
CALL DIR-PRINT,DIR1,FALSE-VALUE
PRINTI " or "
CALL DIR-PRINT,DIR2,FALSE-VALUE
PRINTR " into the building."
.FUNCT WOMENS-QUARTERS-F,RARG=0
EQUAL? RARG,M-LOOK \FALSE
CALL QUARTERS-F,WOMENS-QUARTERS,STR?70
RSTACK
.FUNCT GENERIC-FURNITURE-F,OBJ
ZERO? SUB-IN-TANK /?ELS5
RETURN WORKBENCH
?ELS5: RETURN HORVAK-LOCKER
.FUNCT MENS-QUARTERS-F,RARG=0
EQUAL? RARG,M-LOOK \FALSE
CALL QUARTERS-F,MENS-QUARTERS,STR?71
RSTACK
.FUNCT QUARTERS-F,RM,STR
PRINTI "You're in the "
PRINTD RM
PRINTI ". "
PRINT STR
PRINTR " of the room is a bunk and locker. In the center of the room are a table and chairs."
.FUNCT HORVAK-LOCKER-F
EQUAL? PRSA,V?LOOK-INSIDE \?ELS5
FSET? HORVAK-LOCKER,OPENBIT \?ELS5
PRINTI "The locker contains mostly clothing, toilet articles and books."
IN? DIARY,HORVAK-LOCKER \?CND10
PRINTI " One of the books is labeled DIARY."
IN? PHOTO,DIARY \?CND10
FCLEAR PHOTO,INVISIBLE
PRINTI " Something has been inserted between its pages."
?CND10: CRLF
RTRUE
?ELS5: EQUAL? PRSA,V?UNLOCK,V?OPEN-WITH,V?OPEN \FALSE
EQUAL? PRSO,HORVAK-LOCKER \FALSE
FSET? HORVAK-LOCKER,OPENBIT /FALSE
FSET? HORVAK-LOCKER,LOCKED \?CND24
EQUAL? PRSI,UNIVERSAL-TOOL /?CND24
CALL THIS-IS-IT,HORVAK-KEY
PRINTI "It's locked. The normal way to open its lock (which you yourself designed, "
CALL PRINT-NAME,FIRST-NAME
PRINTR ") is with a key."
?CND24: FCLEAR HORVAK-LOCKER,LOCKED
FSET HORVAK-LOCKER,OPENBIT
FSET DIARY,TAKEBIT
CALL PERFORM,V?LOOK-INSIDE,HORVAK-LOCKER
RTRUE
.FUNCT HORVAK-KEY-F
EQUAL? PRSI,HORVAK \?ELS9
EQUAL? PRSA,V?TAKE /?THN6
?ELS9: EQUAL? PRSO,HORVAK \FALSE
EQUAL? PRSA,V?SEARCH-FOR,V?ASK-FOR \FALSE
?THN6: EQUAL? WINNER,PLAYER \?ELS16
PRINTI "Be warned, "
CALL PRINT-NAME,FIRST-NAME
PRINTI ", that he will never willingly surrender it. You have no right to demand it without a search warrant. The "
PRINTD AQUADOME
PRINTR " is neither a military establishment nor a ship at sea, so you could get in legal trouble."
?ELS16: CALL HE-SHE-IT,WINNER,TRUE-VALUE,STR?72
PRINTI ", "
CALL PRINT-NAME,FIRST-NAME
PRINTI ". Do not pursue this any further, or you will lose the respect and cooperation of the "
PRINTD CREW
PRINTR ", and thereby abort your rescue mission. If you attempt to use force, they may even mutiny and place you under arrest."
.FUNCT DIARY-F
EQUAL? PRSA,V?OPEN \?ELS5
FSET? DIARY,OPENBIT /?ELS5
IN? PHOTO,DIARY \?ELS5
FSET DIARY,OPENBIT
MOVE PHOTO,HERE
PRINTR "As you do so, a picture falls out. Oh, oh! It's a snapshot of Zoe Bly!"
?ELS5: EQUAL? PRSA,V?LOOK-INSIDE,V?READ \FALSE
FSET? DIARY,OPENBIT /?ELS16
PRINTR "You must open it first."
?ELS16: PRINTI "You quickly discover references to Zoe Bly. It seems clear that "
PRINTD HORVAK
PRINTI " has fallen for Zoe. But her unsentimental manner is a large obstacle.
The last entry reads:
""If only I could find some way to break down that icy reserve of Zoe's, and make her realize she's not just a scientific thinking machine or a commanding officer...!
There must be some way! She doesn't do everything by the rule book. She even breaks regulations at times. If I can prove this and embarrass her, maybe she'll realize she's just a human being like the rest of us -- and not only a human being, but a warm, desirable woman...!""
"
FSET? SPECIAL-TOOL,TOUCHBIT \TRUE
PRINTI "
Well! It sounds as if "
PRINTD HORVAK
PRINTI " found the answer to his problem by sabotaging the "
PRINTD AIR-SUPPLY-SYSTEM
PRINTI " -- at a time when "
PRINTD BLY
PRINTI " was breaking regulations by not wearing her "
PRINTD OXYGEN-GEAR
PRINTR "!"
.FUNCT PHOTO-F
EQUAL? PRSA,V?TELL-ABOUT,V?EXAMINE,V?ANALYZE \FALSE
PRINTI "It's a "
PRINTD PHOTO
PRINTI " of "
PRINTD BLY
PRINTR "."
.FUNCT OUTSIDE-WORKSHOP-F,RARG=0
EQUAL? RARG,M-LOOK \FALSE
CALL FROM-HERE,P?WEST,P?NORTH
RSTACK
.FUNCT WORKSHOP-F,RARG=0
EQUAL? RARG,M-LOOK \FALSE
PRINTI "The "
PRINTD WORKSHOP
PRINTR " is equipped for mechanical repair work. It contains assorted hand tools, machine tools, and spare parts."
.FUNCT WORKSHOP-STUFF-F
EQUAL? PRSA,V?MAKE \FALSE
PRINTR "That's too difficult, even for a famous young inventor."
.FUNCT DOME-LAB-F,RARG=0,MAGLOC
EQUAL? RARG,M-LOOK \?ELS5
PRINTI "The "
PRINTD DOME-LAB
PRINTI " is equipped for all sorts of marine biochemical research. "
CALL ROOM-IS-CROWDED
RSTACK
?ELS5: EQUAL? RARG,M-ENTER \FALSE
FSET? AIR-SUPPLY-SYSTEM,MUNGBIT /FALSE
IN? BLY,DOME-LAB /?CND12
MOVE BLY,DOME-LAB
PRINTD BLY
PRINTI " comes too."
CRLF
?CND12: FSET? HORVAK,BUSYBIT /?CND17
IN? HORVAK,DOME-LAB /?CND17
MOVE HORVAK,DOME-LAB
PRINTD HORVAK
PRINTI " comes too."
CRLF
?CND17: ZERO? HORVAK-TOLD-AH \TRUE
FSET? DART,MUNGBIT \TRUE
FSET? HORVAK,BUSYBIT /TRUE
SET 'HORVAK-TOLD-AH,TRUE-VALUE
CRLF
PRINTD HORVAK
PRINTI " says:
"""
CALL PRINT-NAME,FIRST-NAME
PRINTI ", right after the Snark ceased its attack, I detected a high concentration of A.H. molecules in the "
PRINTD GLOBAL-WATER
PRINTI " around the "
PRINTD AQUADOME
PRINTI ". Have you ever heard of such a phenomenon before?"""
CALL YES?
ZERO? STACK \?CND31
PRINTI """I can make up an intense tranquilizer to subdue the "
PRINTD SNARK
PRINTI ","" "
PRINTD HORVAK
PRINTI " continues. ""You could use one of our aquatic dart guns to inject it into the creature. You could mount the gun on one of the "
PRINTD SUB
PRINTI "'s "
PRINTD CLAW
PRINTI "s.
But without knowing the creature's biochemistry, there's no guarantee the 'trank' will work. Shall I go ahead and make some up, anyhow?"""
CALL YES? >MAGLOC
?CND31: CALL META-LOC,MAGAZINE >MAGLOC
CALL IN-DOME?,MAGLOC
ZERO? STACK /TRUE
CALL TIP-SAYS
PRINTI "Wait a minute! Wasn't there something about A.H. molecules in that "
PRINTD MAGAZINE
PRINTI "? Shall "
EQUAL? MAGLOC,HERE \?ELS43
PRINTI "we"
JUMP ?CND41
?ELS43: PRINTI "I get it and"
?CND41: PRINTI " see?"""
CALL THIS-IS-IT,MAGAZINE
CALL YES?
ZERO? STACK /TRUE
IN? MAGAZINE,PLAYER /?CND55
MOVE MAGAZINE,PLAYER
PRINTI "Tip "
EQUAL? MAGLOC,HERE /?CND60
PRINTI "returns quickly and "
?CND60: PRINTI "hands you the "
PRINTD MAGAZINE
PRINTI ". "
?CND55: CALL THIS-IS-IT,HORVAK
PRINTD HORVAK
PRINTR " looks interested. ""I'd like to see that."""
.FUNCT OUTSIDE-COMM-BLDG-F,RARG=0
EQUAL? RARG,M-LOOK \FALSE
CALL FROM-HERE,P?EAST,P?NORTH
RSTACK
.FUNCT COMM-BLDG-F,RARG=0
EQUAL? RARG,M-LOOK \FALSE
PRINTI "The "
PRINTD COMM-BLDG
PRINTI " has both a "
PRINTD VIDEOPHONE
PRINTI " for communicating with other places and the "
PRINTD SONAR-EQUIPMENT
PRINTI " for detecting objects in the "
PRINTD GLOBAL-WATER
PRINTR " around the dome."
.FUNCT SONAR-EQUIPMENT-F
EQUAL? PRSA,V?LAMP-OFF \?ELS5
PRINTR "It should stay on all the time."
?ELS5: EQUAL? PRSA,V?TELL-ABOUT,V?LOOK-ON,V?LOOK-INSIDE /?THN10
EQUAL? PRSA,V?READ,V?EXAMINE,V?ANALYZE \?ELS9
?THN10: PRINTI "The "
PRINTD SONAR-EQUIPMENT
PRINTI " detects objects in the "
PRINTD GLOBAL-WATER
PRINTI " near the "
PRINTD AQUADOME
PRINTR "."
?ELS9: EQUAL? PRSA,V?TIE-TO \FALSE
EQUAL? PRSI,SONAR-EQUIPMENT \FALSE
CALL PERFORM,V?PUT,PRSO,PRSI
RTRUE
.FUNCT MICROPHONE-DOME-F
CALL MICROPHONE-F,TRUE-VALUE
RSTACK
.FUNCT GALLEY-F,RARG=0
EQUAL? RARG,M-LOOK \FALSE
PRINTR "This room serves as both galley and mess; the crew can both prepare food and eat it here."
.FUNCT OUTSIDE-ADMIN-BLDG-F,RARG=0
EQUAL? RARG,M-LOOK \FALSE
CALL FROM-HERE,P?EAST,P?SOUTH
RSTACK
.FUNCT BLY-OFFICE-F,ARG=0
EQUAL? ARG,M-LOOK \?ELS5
PRINTI "The "
PRINTD BLY-OFFICE
PRINTI " is small but tidy, with a single door leading out and a good view of the ocean through the "
PRINTD WINDOW
PRINTR "."
?ELS5: EQUAL? ARG,M-ENTER \?ELS9
FSET? AIR-SUPPLY-SYSTEM,MUNGBIT /?ELS9
IN? BLY,BLY-OFFICE \?ELS16
ZERO? GREENUP-ESCAPE \?ELS16
ZERO? GREENUP-TRAPPED \?ELS16
ZERO? GREENUP-CUFFED \?ELS16
ZERO? ZOE-MENTIONED-EVIDENCE \?ELS16
FCLEAR BLY,NDESCBIT
PRINTI "As you enter the office, "
CALL ZOE-MENTIONS-EVIDENCE
RSTACK
?ELS16: ZERO? GREENUP-ESCAPE /FALSE
IN? BLY,BLY-OFFICE /FALSE
MOVE BLY,BLY-OFFICE
PRINTR "Zoe comes with you."
?ELS9: EQUAL? ARG,M-BEG \?ELS28
CALL EXIT-VERB?
ZERO? STACK /?ELS28
ZERO? GREENUP-ESCAPE /?ELS35
CALL HE-SHE-IT,WINNER,TRUE-VALUE
PRINTR "'d better stay here and trap Greenup."
?ELS35: FSET? SPECIAL-TOOL,INVISIBLE \FALSE
EQUAL? WINNER,PLAYER \FALSE
PRINTI "As you start to leave, you notice "
CALL SPECIAL-TOOL-VISIBLE
RSTACK
?ELS28: EQUAL? PRSA,V?SEARCH-FOR,V?SEARCH \FALSE
FSET? SPECIAL-TOOL,INVISIBLE \FALSE
PRINTI "You find "
CALL SPECIAL-TOOL-VISIBLE
RSTACK
.FUNCT SPECIAL-TOOL-VISIBLE
FCLEAR SPECIAL-TOOL,INVISIBLE
FSET SPECIAL-TOOL,TOUCHBIT
REMOVE SPECIAL-TOOL-GLOBAL
CALL THIS-IS-IT,SPECIAL-TOOL
PRINTI "an oddly shaped metallic object lying under Zoe's desk. It must be the "
PRINTD SPECIAL-TOOL
PRINTR "!"
.FUNCT ZOE-MENTIONS-EVIDENCE
SET 'ZOE-MENTIONED-EVIDENCE,TRUE-VALUE
MOVE TRAITOR,GLOBAL-OBJECTS
CALL THIS-IS-IT,EVIDENCE
CALL QUEUE,I-BLY-SAYS,6
PUT STACK,0,1
CALL SAID-TO,BLY
PRINTI "Zoe"