-
Notifications
You must be signed in to change notification settings - Fork 24
/
globals.zil
2739 lines (2495 loc) · 83.9 KB
/
globals.zil
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"GLOBALS for PLANETFALL
(C) COPYRIGHT 1983 INFOCOM INC. ALL RIGHTS RESERVED
This file contains Global Objects and their associated routines,
as well as all routines associated with BOTH complexes. It also
contains the opening sequence which occurs prior to planetfall."
<CONSTANT DEFAULT-MOVE 20>
;"REM OFFSETS 31 30 29 28 27 26 25 24 23 22 21 20 ,LOW-DIRECTION "
<DIRECTIONS NORTH NE EAST SE SOUTH SW WEST NW UP DOWN IN OUT>
"SUBTITLE GLOBAL OBJECTS"
<GLOBAL LOAD-ALLOWED 100>
<OBJECT GLOBAL-OBJECTS
(FLAGS INVISIBLE TOUCHBIT SURFACEBIT TRYTAKEBIT MUNGBIT MUNGEDBIT
SCRAMBLEDBIT WORNBIT OPENBIT SEARCHBIT TRANSBIT WEARBIT)>
<OBJECT LOCAL-GLOBALS
(IN GLOBAL-OBJECTS)
(SYNONYM ZZMGCK)
(VALUE 0)
(CONTFCN 0)
(DESCFCN 0)
(SIZE 0)
;(PSEUDO "FOO")>
;"Yes, this synonym for LOCAL-GLOBALS needs to exist... sigh"
<OBJECT ROOMS>
<OBJECT INTNUM
(IN GLOBAL-OBJECTS)
(SYNONYM INTNUM)
(DESC "number")>
<OBJECT PSEUDO-OBJECT
(DESC "pseudo")
(ACTION GO)>
<OBJECT IT
(IN GLOBAL-OBJECTS)
(SYNONYM IT THAT THIS HIM)
(DESC "random object")
(FLAGS NDESCBIT)>
<OBJECT STAIRS
(IN LOCAL-GLOBALS)
(SYNONYM STAIRS STEPS GANGWAY STAIRWAY)
(DESC "stairway")
(FLAGS NDESCBIT CLIMBBIT)>
<OBJECT GROUND
(IN GLOBAL-OBJECTS)
(SYNONYM GROUND EARTH FLOOR DECK)
(DESC "floor")
(FLAGS NDESCBIT)
(ACTION GROUND-F)>
<ROUTINE GROUND-F ()
<COND (<AND <VERB? PUT>
<EQUAL? ,PRSI ,GROUND>>
<PERFORM ,V?DROP ,PRSO>
<RTRUE>)
(<VERB? CLIMB-ON BOARD>
<SETG C-ELAPSED 28>
<TELL
"You sit down on the floor. After a brief rest, you stand again." CR>)
(<AND <VERB? EXAMINE>
<EQUAL? ,HERE ,ADMIN-CORRIDOR-S>>
<TELL "A narrow, jagged crevice runs across the floor." CR>)>>
<OBJECT WINDOW
(IN LOCAL-GLOBALS)
(DESC "window")
(SYNONYM WINDOW PORT VIEWPORT)
(ADJECTIVE VIEW)
(FLAGS NDESCBIT)
(ACTION WINDOW-F)>
<ROUTINE WINDOW-F ()
<COND (<VERB? LOOK-INSIDE>
<COND (<EQUAL? ,HERE ,BIO-LOCK-EAST>
<TELL
"You can see a large laboratory, dimly illuminated. A blue glow comes from
a crack in the northern wall of the lab. Shadowy, ominous shapes move about
within the room.">
<COND (<NOT <FSET? ,MINI-CARD ,TOUCHBIT>>
<TELL
" On the floor, just inside the door, you can see a magnetic-striped card.">)>
<CRLF>)
(<EQUAL? ,HERE ,BIO-LAB>
<TELL "You see the Bio Lock." CR>)
(<OR
<EQUAL? ,HERE ,ALFIE-CONTROL-EAST ,ALFIE-CONTROL-WEST>
<EQUAL? ,HERE ,BETTY-CONTROL-EAST ,BETTY-CONTROL-WEST>>
<TELL "You see ">
<DESCRIBE-VIEW>
<TELL CR>)
(<EQUAL? ,HERE ,BALCONY>
<TELL "Water. Lots and lots of water." CR>)
(<EQUAL? ,HERE ,HELICOPTER>
<TELL "You see the helipad and the ocean beyond." CR>)
(<EQUAL? ,HERE ,ESCAPE-POD>
<COND (<L? ,TRIP-COUNTER 2>
<TELL
"You can see debris from the exploding Feinstein." CR>)
(<G? ,TRIP-COUNTER 8>
<TELL
"You can see a planet, hopefully a hospitable one." CR>)
(T
<TELL
"The window has polarized to blackness." CR>)>)
(<EQUAL? ,HERE ,LARGE-OFFICE>
<TELL
"You can see the dormitories and other parts of the
complex in the distance. Water is visible in every direction." CR>)>)
(<AND <VERB? THROUGH>
<EQUAL? ,HERE ,BALCONY>>
<JIGS-UP
"You slice yourself to ribbons on the broken windows and then plummet
into the swirling ocean below. Very clever.">)
(<VERB? OPEN>
<TELL "This window doesn't open." CR>)
(<AND <VERB? EXAMINE>
<EQUAL? ,HERE ,BALCONY>>
<TELL "They're shattered." CR>)
(<VERB? MUNG>
<COND (<EQUAL? ,HERE ,BALCONY>
<TELL "They're already broken." CR>)
(T
<TELL "It's made of tough Zynoid plastic." CR>)>)>>
<OBJECT CLIFF
(IN LOCAL-GLOBALS)
(DESC "cliff")
(SYNONYM CLIFF)
(FLAGS NDESCBIT)
(ACTION CLIFF-F)>
<ROUTINE CLIFF-F ()
<COND (<EQUAL? ,HERE ,WEST-WING>
<COND (<VERB? LEAP>
<JIGS-UP "Brilliant idea!">)
(<VERB? THROW-OFF>
<COND (<EQUAL? ,PRSO ,LASER>
<DISABLE <INT I-WARMTH>>)>
<REMOVE ,PRSO>
<TELL
"The " D ,PRSO " falls into the ocean below." CR>)>)
(T
<COND (<VERB? CLIMB-UP CLIMB-FOO>
<DO-WALK ,P?UP>)
(<VERB? CLIMB-DOWN>
<DO-WALK ,P?DOWN>)>)>>
<OBJECT OCEAN
(IN LOCAL-GLOBALS)
(DESC "ocean")
(SYNONYM OCEAN)
(ADJECTIVE ENDLESS)
(FLAGS VOWELBIT NDESCBIT)
(ACTION OCEAN-F)>
<ROUTINE OCEAN-F ()
<COND (<VERB? TAKE THROUGH RUB>
<TELL "You can't reach the ocean from here." CR>)
(<VERB? EXAMINE>
<TELL "It stretches as far as you can see." CR>)>>
<OBJECT TABLES
(IN LOCAL-GLOBALS)
(DESC "table")
(SYNONYM TABLE TABLES)
(FLAGS NDESCBIT)
(ADJECTIVE ROUND CONFERENCE SMALL WIDE LONG)
(ACTION TABLES-F)>
<ROUTINE TABLES-F ()
<COND (<AND <VERB? LOOK-UNDER>
<EQUAL? ,HERE ,MESS-HALL>>
<TELL
"Wow!!! Under the table are three keys, a sack of food, a reactor elevator
access pass, one hundred gold pieces ... Just kidding. Actually, there's
nothing there." CR>)
(<AND <VERB? PUT-ON>
<EQUAL? ,PRSI ,TABLES>>
<TELL
"That would accomplish nothing useful." CR>)>>
<OBJECT SHELVES
(IN LOCAL-GLOBALS)
(SYNONYM SHELF SHELVES)
(DESC "shelf")
(FLAGS NDESCBIT)
(ACTION SHELVES-F)>
<ROUTINE SHELVES-F ()
<COND (<VERB? EXAMINE>
<TELL "The shelves are pretty dusty." CR>)
(<AND <VERB? PUT-ON>
<EQUAL? ,PRSI ,SHELVES>>
<TELL "That would be a waste of time." CR>)>>
<OBJECT LIGHTS
(IN LOCAL-GLOBALS)
(SYNONYM LIGHT LIGHTS)
(ADJECTIVE RED DAZZLI GLOWIN BLINKI WARNIN BRIGHT COLORE FLASHI)
(DESC "light")
(FLAGS NDESCBIT)
(ACTION LIGHTS-F)>
<ROUTINE LIGHTS-F ()
<COND (<AND <VERB? EXAMINE>
<EQUAL? ,HERE ,COMPUTER-ROOM>>
<TELL
"The red light would seem to indicate a malfunction in the computer." CR>)>>
<OBJECT GLOBAL-DOORWAY
(IN GLOBAL-OBJECTS)
(SYNONYM DOORWA PORTAL OPENIN)
(ADJECTIVE NORTH SOUTH EAST WEST NE SE NW SW)
(DESC "doorway")
(FLAGS NDESCBIT)
(ACTION GLOBAL-DOORWAY-F)>
<ROUTINE GLOBAL-DOORWAY-F ()
<COND (<VERB? THROUGH>
<USE-DIRECTIONS>)
(<VERB? OPEN CLOSE>
<TELL "It's just an opening; you can't open or close it." CR>)
(<VERB? LOOK-INSIDE>
<TELL "Can't see much from here. Try going there." CR>)>>
<ROUTINE USE-DIRECTIONS ()
<TELL "Use compass directions for movement." CR>>
<ROUTINE NO-CLOSE ()
<TELL "There's no way to close it." CR>>
<OBJECT CONTROLS
(IN LOCAL-GLOBALS)
(SYNONYM CONTRO PANEL DIALS GAUGES)
(ADJECTIVE CONTRO COMPLEX)
(DESC "set of controls")
(FLAGS NDESCBIT)
(ACTION CONTROLS-F)>
<ROUTINE CONTROLS-F ()
<COND (<OR <EQUAL? ,HERE ,UPPER-ELEVATOR ,LOWER-ELEVATOR ,BOOTH-1>
<EQUAL? ,HERE ,REACTOR-ELEVATOR ,BOOTH-2 ,BOOTH-3>>
<COND (<VERB? EXAMINE>
<TELL
"The control panel is a simple one, as described. Just a small slot
and two buttons." CR>)>)
(<VERB? RUB MOVE TURN SET TAKE EXAMINE PUSH PULL>
<COND (<EQUAL? ,HERE ,HELICOPTER>
<TELL
"The controls are covered and locked." CR>)
(<EQUAL? ,HERE ,ESCAPE-POD>
<TELL
"The controls are entirely automated." CR>)
(T
<TELL
"The controls are incredibly complicated and you shouldn't even
be thinking about touching them." CR>)>)
(<AND <EQUAL? ,HERE ,HELICOPTER>
<VERB? OPEN UNLOCK>>
<TELL
"You don't even have the orange key!" CR>)>>
<OBJECT GLOBAL-GAMES
(IN GLOBAL-OBJECTS)
(DESC "game")
(SYNONYM BOCCI CHESS HIDER- HUCKA-)
(FLAGS NDESCBIT)
(ACTION GLOBAL-GAMES-F)>
<ROUTINE GLOBAL-GAMES-F ()
<COND (<VERB? PLAY>
<COND (<IN? ,FLOYD ,HERE>
<PERFORM ,V?PLAY-WITH ,FLOYD>
<RTRUE>)
(T
<TELL "Okay. Gee, that was fun." CR>)>)>>
<OBJECT HANDS
(IN GLOBAL-OBJECTS)
(SYNONYM PAIR HANDS)
(ADJECTIVE BARE)
(DESC "pair of hands")
(FLAGS NDESCBIT)
(ACTION HANDS-F)>
<ROUTINE HANDS-F ()
<COND (<VERB? SHAKE>
<COND (<IN? ,AMBASSADOR ,HERE>
<TELL "A repulsive idea." CR>)
(<IN? ,BLATHER ,HERE>
<TELL "Saluting might be a better idea." CR>)
(<AND <IN? ,FLOYD ,HERE>
<FSET? ,FLOYD ,RLANDBIT>>
<TELL
"You shake one of Floyd's grasping extensions." CR>)
(T
<TELL "There's no one to shake hands with." CR>)>)>>
<OBJECT SLEEP
(IN GLOBAL-OBJECTS)
(DESC "sacred act of sleeping")
(SYNONYM SLEEP)
(FLAGS NDESCBIT)
(ACTION SLEEP-F)>
<ROUTINE SLEEP-F ()
<COND (<VERB? WALK-TO>
<V-SLEEP>)>>
<OBJECT ADVENTURER
(IN DECK-NINE)
(SYNONYM ADMIRA SMITHE SPAM EGGS)
(ADJECTIVE ORANGE OPENER)
(DESC "player")
(FLAGS NDESCBIT INVISIBLE)>
<OBJECT ME
(IN GLOBAL-OBJECTS)
(SYNONYM ME MYSELF SELF WE)
(DESC "you")
(FLAGS ACTORBIT)
(ACTION CRETIN-F)>
<ROUTINE CRETIN-F ()
<COND (<VERB? GIVE>
<PERFORM ,V?TAKE ,PRSO>
<RTRUE>)
(<VERB? SCRUB>
<TELL
"If only you'd done that before the last inspection, you wouldn't have
gotten 300 demerits." CR>)
(<VERB? DROP>
<TELL "Huh?" CR>)
(<VERB? SMELL>
<TELL "Phew!" CR>)
(<VERB? FOLLOW>
<TELL "It would be hard not to." CR>)
(<VERB? EAT>
<TELL "Auto-cannibalism is not the answer." CR>)
(<VERB? ATTACK MUNG>
<COND (<==? ,PRSO ,ME>
<JIGS-UP "If you insist.... Poof, you're dead!">)
(ELSE <TELL "What a silly idea!" CR>)>)
(<VERB? TAKE>
<TELL "How romantic!" CR>)
(<VERB? DISEMBARK>
<TELL "You'll have to do that on your own." CR>)
(<VERB? EXAMINE>
<TELL "That's difficult unless your eyes are prehensile."
CR>)>>
<ROUTINE DDESC (DOOR)
<COND (<FSET? .DOOR ,OPENBIT>
<TELL "open">)
(T
<TELL "closed">)>>
<ROUTINE ALREADY-OPEN ()
<TELL "It's already open!" CR>>
<ROUTINE IS-CLOSED ()
<TELL "It is closed!" CR>>
<ROUTINE V-THROUGH ("OPTIONAL" (OBJ <>) "AUX" M)
<COND (<AND <NOT .OBJ> <FSET? ,PRSO ,VEHBIT>>
<PERFORM ,V?BOARD ,PRSO>
<RTRUE>)
(<AND <NOT .OBJ> <NOT <FSET? ,PRSO ,TAKEBIT>>>
<TELL
"You hit your head against the " D ,PRSO " as you attempt this feat." CR>)
(.OBJ
<TELL "You can't do that!" CR>)
(<IN? ,PRSO ,ADVENTURER>
<TELL "That would involve quite a contortion!" CR>)
(T
<TELL <PICK-ONE ,YUKS> CR>)>>
<ROUTINE FIND-IN (WHERE WHAT "AUX" W)
<SET W <FIRST? .WHERE>>
<COND (<NOT .W> <RFALSE>)>
<REPEAT ()
<COND (<FSET? .W .WHAT> <RETURN .W>)
(<NOT <SET W <NEXT? .W>>> <RETURN <>>)>>>
;"Stuff added for the NOT-HERE object"
<OBJECT NOT-HERE-OBJECT
(DESC "such thing" ;"[not here]")
(ACTION NOT-HERE-OBJECT-F)>
<ROUTINE NOT-HERE-OBJECT-F ("AUX" TBL (PRSO? T) OBJ)
;"Protocol: return T if case was handled and msg TELLed,
<> if PRSO/PRSI ready to use"
;"This COND is game independent (except the TELL)"
<COND (<AND <EQUAL? ,PRSO ,NOT-HERE-OBJECT>
<EQUAL? ,PRSI ,NOT-HERE-OBJECT>>
<TELL "Those things aren't here!" CR>
<RTRUE>)
(<EQUAL? ,PRSO ,NOT-HERE-OBJECT>
<SET TBL ,P-PRSO>)
(T
<SET TBL ,P-PRSI>
<SET PRSO? <>>)>
<COND (.PRSO?
<COND (<VERB? TYPE>
<PERFORM ,V?TYPE ,FLOYD>
<RTRUE>)
(<OR <VERB? EXAMINE>
<AND <EQUAL? ,WINNER ,FLOYD>
<VERB? TAKE FIND>>>
<COND (<SET OBJ <FIND-NOT-HERE .TBL .PRSO?>>
<COND (<NOT <==? .OBJ ,NOT-HERE-OBJECT>>
<RTRUE>)>)
(T
<RFALSE>)>)>)>
;"Here is the default 'cant see any' printer"
<COND (<EQUAL? ,WINNER ,ADVENTURER>
<TELL "You can't see any">
<NOT-HERE-PRINT .PRSO?>
<TELL " here!" CR>
<COND (<VERB? TELL>
<SETG P-CONT <>>
<SETG QUOTE-FLAG <>>
<RFATAL>)>)
(T
<TELL "The " D ,WINNER " seems confused. \"I don't see any">
<NOT-HERE-PRINT .PRSO?>
<TELL " here!\"" CR>)>
<RTRUE>>
<ROUTINE FIND-NOT-HERE (TBL PRSO? "AUX" M-F OBJ)
;"Protocol: return T if case was handled and msg TELLed,
,NOT-HERE-OBJECT if 'can't see' msg TELLed,
<> if PRSO/PRSI ready to use"
;"Here is where special-case code goes. <MOBY-FIND .TBL> returns
number of matches. If 1, then P-MOBY-FOUND is it. One may treat
the 0 and >1 cases alike or different. It doesn't matter. Always
return RFALSE (not handled) if you have resolved the problem."
<SET M-F <MOBY-FIND .TBL>>
;<COND (<AND <G? .M-F 1>
<SET OBJ <GETP <1 .TBL> ,P?GLOBAL>>>
<SET M-F 1>
<SETG P-MOBY-FOUND .OBJ>)>
<COND (<==? 1 .M-F>
<COND (.PRSO? <SETG PRSO ,P-MOBY-FOUND>)
(T <SETG PRSI ,P-MOBY-FOUND>)>
<RFALSE>)
(<NOT .PRSO?>
<TELL "You wouldn't find any">
<NOT-HERE-PRINT .PRSO?>
<TELL " there." CR>
<RTRUE>)
(T ,NOT-HERE-OBJECT)>>
<ROUTINE NOT-HERE-PRINT (PRSO?)
<COND (<OR ,P-OFLAG ,P-MERGED>
<COND (,P-XADJ <TELL " "> <PRINTB ,P-XADJN>)>
<COND (,P-XNAM <TELL " "> <PRINTB ,P-XNAM>)>)
(.PRSO?
<BUFFER-PRINT <GET ,P-ITBL ,P-NC1> <GET ,P-ITBL ,P-NC1L> <>>)
(T
<BUFFER-PRINT <GET ,P-ITBL ,P-NC2> <GET ,P-ITBL ,P-NC2L> <>>)>>
;"Begin-game stuff aboard the Feinstein"
<ROOM BRIG
(IN ROOMS)
(DESC "Brig")
(LDESC
"You are in the Feinstein's brig. Graffiti cover
the walls. The cell door to the south is locked.")
(C-MOVE <TABLE
;"OUT" 0 ;"IN" 0 ;"DOWN" 0 ;"UP" 0
;"NW" 0 ;"WEST" 0 ;"SW" 0 ;"SOUTH" 0
;"SE" 0 ;"EAST" 0 ;"NE" 0 ;"NORTH" 0>)
(SOUTH "The cell door is locked.")
(FLAGS RLANDBIT ONBIT)
(PSEUDO "GRAFFITI" GRAFFITI-PSEUDO "DOOR" DOOR-PSEUDO)>
<ROOM DECK-NINE
(IN ROOMS)
(DESC "Deck Nine")
(C-MOVE <TABLE
;"OUT" 0 ;"IN" 0 ;"DOWN" 0 ;"UP" 0
;"NW" 0 ;"WEST"15 ;"SW" 0 ;"SOUTH" 0
;"SE" 0 ;"EAST"15 ;"NE" 0 ;"NORTH" 0>)
(EAST TO REACTOR-LOBBY IF CORRIDOR-DOOR IS OPEN)
(WEST TO ESCAPE-POD IF POD-DOOR IS OPEN)
(IN TO ESCAPE-POD IF POD-DOOR IS OPEN)
(UP TO GANGWAY IF GANGWAY-DOOR IS OPEN)
(FLAGS RLANDBIT ONBIT)
(GLOBAL POD-DOOR CORRIDOR-DOOR GANGWAY-DOOR STAIRS GLOBAL-POD)
(PSEUDO "TRANSL" TRANSLATOR-PSEUDO "SLIME" SLIME-PSEUDO)
(ACTION DECK-NINE-F)>
<ROUTINE DECK-NINE-F (RARG)
<COND (<EQUAL? .RARG ,M-LOOK>
<TELL
"This is a featureless corridor similar to every other corridor on the ship.
It curves away to starboard, and a gangway leads up">
<COND (<FSET? ,GANGWAY-DOOR ,OPENBIT>
<TELL ".">)
(T
<TELL
", but both of these are blocked by closed bulkheads.">)>
<TELL
" To port is the entrance to one of the ship's primary escape pods. The
pod bulkhead is ">
<DDESC ,POD-DOOR>
<TELL "." CR>)>>
<OBJECT SCRUB-BRUSH
(IN ADVENTURER)
(DESC "Patrol-issue self-contained multi-purpose scrub brush")
(SYNONYM BRUSH SCRUBB SCRUBR)
(ADJECTIVE SCRUB PATROL SELF-CONTAINED MULTI)
(FLAGS TAKEBIT)
(SIZE 10)>
<OBJECT CHRONOMETER
(IN ADVENTURER)
(DESC "chronometer")
(SYNONYM CHRONOMETER WRISTWATCH WATCH)
(ADJECTIVE WRIST)
(SIZE 10)
(FLAGS MUNGBIT TAKEBIT WEARBIT WORNBIT)
(ACTION CHRONOMETER-F)>
<ROUTINE CHRONOMETER-F ()
<COND (<VERB? EXAMINE READ>
<TELL
"It is a standard wrist chronometer with a digital display. ">
<TELL-TIME>
<TELL " The back is engraved with
the message \"Good luck in the Patrol! Love, Mom and Dad.\"" CR>)>>
<ROUTINE TELL-TIME ()
<TELL "According to the chronometer, the current time is ">
<COND (<FSET? ,CHRONOMETER ,MUNGEDBIT>
<TELL N ,MUNGED-TIME>)
(T
<TELL N ,INTERNAL-MOVES>)>
<TELL ".">>
<GLOBAL MUNGED-TIME 0>
<OBJECT ID-CARD
(IN PATROL-UNIFORM)
(DESC "ID card")
(SYNONYM CARD CARDS)
(ADJECTIVE PATROL ID IDENTIFICATION)
(FLAGS VOWELBIT TAKEBIT READBIT)
(SIZE 3)
(TEXT
"\"STELLAR PATROL|
Special Assignment Task Force|
ID Number: 6172-531-541\"")>
<OBJECT PATROL-UNIFORM
(IN ADVENTURER)
(DESC "Patrol uniform")
(LDESC
"A slightly wrinkled Patrol uniform is lying here.")
(SYNONYM UNIFORM POCKET SUIT)
(ADJECTIVE PATROL WRINKLED)
(FLAGS TAKEBIT WORNBIT WEARBIT CONTBIT SEARCHBIT OPENBIT)
(CAPACITY 10)
(ACTION PATROL-UNIFORM-F)>
<ROUTINE PATROL-UNIFORM-F ()
<COND (<VERB? EXAMINE>
<TELL
"It is a standard-issue one-pocket Stellar Patrol uniform, a miracle of modern
technology. It will keep its owner warm in cold climates and cool in warm
locales. It provides protection against mild radiation, repels all insects,
absorbs sweat, promotes healthy skin tone, and on top of everything else,
it is super-comfy.">
<COND (<EQUAL? ,TRIP-COUNTER 15>
<TELL
" There are definitely worse things to find yourself wearing when stranded
on a strange planet.">)>
<TELL CR>)
(<AND <VERB? WEAR>
<FSET? ,LAB-UNIFORM ,WORNBIT>>
<TELL
"It won't fit over the lab uniform." CR>)
(<AND <VERB? TAKE-OFF>
<FSET? ,PATROL-UNIFORM ,WORNBIT>>
<FCLEAR ,PATROL-UNIFORM ,WORNBIT>
<TELL "You have removed your Patrol uniform.">
<COND (<EQUAL? ,TRIP-COUNTER 15>
<TELL
" You suddenly realize how warm it is. You also feel naked and vulnerable.">)>
<COND (<IN? ,BLATHER ,HERE>
<TELL
" \"Removing your uniform while on duty? Five hundred demerits!\"">)
(<IN? ,FLOYD ,HERE>
<TELL
" Floyd giggles. \"You look funny without any clothes on.\"">)>
<TELL CR>)
(<VERB? OPEN CLOSE>
<TELL
"There's no way to open or close the pocket of the " D ,PRSO "." CR>)>>
<ROOM REACTOR-LOBBY
(IN ROOMS)
(DESC "Reactor Lobby")
(LDESC
"The corridor widens here as it nears the main drive area. To starboard is
the Ion Reactor that powers the vessel, and aft of here is the Auxiliary
Control Room. The corridor continues to port.")
(C-MOVE <TABLE
;"OUT" 0 ;"IN" 0 ;"DOWN" 0 ;"UP" 0
;"NW" 0 ;"WEST"15 ;"SW" 0 ;"SOUTH" 0
;"SE" 0 ;"EAST" 0 ;"NE" 0 ;"NORTH" 0>)
(WEST TO DECK-NINE IF CORRIDOR-DOOR IS OPEN)
(SOUTH "Ensign Blather pushes you roughly back toward your post.")
(EAST "Ensign Blather blocks your way, snarling angrily.")
(FLAGS RLANDBIT ONBIT)
(GLOBAL CORRIDOR-DOOR)>
<ROOM GANGWAY
(IN ROOMS)
(DESC "Gangway")
(LDESC
"This is a steep metal gangway connecting Deck Eight, above, and Deck
Nine, below.")
(C-MOVE <TABLE
;"OUT" 0 ;"IN" 0 ;"DOWN"10 ;"UP" 0
;"NW" 0 ;"WEST" 0 ;"SW" 0 ;"SOUTH" 0
;"SE" 0 ;"EAST" 0 ;"NE" 0 ;"NORTH" 0>)
(UP TO DECK-EIGHT)
(DOWN TO DECK-NINE IF GANGWAY-DOOR IS OPEN)
(FLAGS RLANDBIT ONBIT)
(GLOBAL GANGWAY-DOOR STAIRS)
(ACTION GANGWAY-F)>
<ROUTINE GANGWAY-F (RARG)
<COND (<EQUAL? .RARG ,M-END>
<COND (<AND <PROB 15>
<EQUAL? ,BLOWUP-COUNTER 0>>
<TELL
"You hear a distant bellowing ... something about an Ensign Seventh Class
whose life is in danger." CR>)>)>>
<ROOM DECK-EIGHT
(IN ROOMS)
(DESC "Deck Eight")
(LDESC
"This is a featureless corridor leading port and starboard. A gangway leads
down, and to fore is the Hyperspatial Jump Machinery Room.")
(C-MOVE <TABLE
;"OUT" 0 ;"IN" 0 ;"DOWN"10 ;"UP" 0
;"NW" 0 ;"WEST" 0 ;"SW" 0 ;"SOUTH" 0
;"SE" 0 ;"EAST" 0 ;"NE" 0 ;"NORTH" 0>)
(DOWN TO GANGWAY)
(EAST "Blather throws you to the deck and makes you do 20 push-ups.")
(WEST "Blather throws you to the deck and makes you do 20 push-ups.")
(NORTH "Blather blocks your path, growling about extra galley duty.")
(FLAGS RLANDBIT ONBIT)
(GLOBAL STAIRS)>
<GLOBAL BLATHER-LEAVE 0>
<GLOBAL BRIGS-UP 0>
<ROUTINE I-BLATHER ()
<COND (<EQUAL? ,HERE ,DECK-EIGHT ,REACTOR-LOBBY>
<COND (<IN? ,BLATHER ,HERE>
<SETG BRIGS-UP <+ ,BRIGS-UP 1>>
<COND (<G? ,BRIGS-UP 3>
<TELL CR
"Blather loses his last vestige of patience and drags you to the Feinstein's
brig. He throws you in, and the door clangs shut behind you." CR CR>
<GOTO ,BRIG>
<ROB ,ADVENTURER ,CRAG>
<MOVE ,PADLOCK ,HERE>
<FCLEAR ,PADLOCK ,TAKEBIT>)
(T
<TELL CR
"\"I said to return to your post, Ensign Seventh Class!\" bellows Blather,
turning a deepening shade of crimson." CR>)>)
(<EQUAL? ,BLOWUP-COUNTER 0>
<MOVE ,BLATHER ,HERE>
<THIS-IS-IT ,BLATHER>
<TELL CR
"Ensign Blather, his uniform immaculate, enters and notices you are away
from your post. \"Twenty demerits, Ensign Seventh Class!\" bellows Blather.
\"Forty if you're not back on Deck Nine in five seconds!\" He curls his face
into a hideous mask of disgust at your unbelievable negligence." CR>)>)
(<EQUAL? ,HERE ,DECK-NINE>
<COND (<AND <EQUAL? ,BLATHER-LEAVE 3>
<IN? ,BLATHER ,HERE>>
<SETG BLATHER-LEAVE 0>
<REMOVE ,BLATHER>
<TELL CR
"Blather, adding fifty more demerits for good measure, moves off in search
of more young ensigns to terrorize." CR>)
(<IN? ,BLATHER ,DECK-NINE>
<SETG BLATHER-LEAVE <+ ,BLATHER-LEAVE 1>>
<RFALSE>)
(<AND <NOT <IN? ,AMBASSADOR ,HERE>>
<EQUAL? ,BLOWUP-COUNTER 0>
<PROB 5>>
<MOVE ,BLATHER ,HERE>
<THIS-IS-IT ,BLATHER>
<TELL CR
"Ensign First Class Blather swaggers in. He studies your work with half-closed
eyes. \"You call this polishing, Ensign Seventh Class?\" he sneers. \"We have
a position for an Ensign Ninth Class in the toilet-scrubbing division,
you know. Thirty demerits.">
<COND (<NOT <FSET? ,PATROL-UNIFORM ,WORNBIT>>
<TELL
" And another sixty for improper dress!">)>
<TELL
"\" He glares at you, his arms crossed." CR>)>)>>
<OBJECT BLATHER
(DESC "Ensign First Class")
(LDESC
"Ensign First Class Blather is standing before you, furiously scribbling
demerits onto an oversized clipboard.")
(SYNONYM ENSIGN BLATHER)
(ADJECTIVE ENSIGN FIRST CLASS)
(SIZE 150)
(FLAGS VOWELBIT ACTORBIT)
(ACTION BLATHER-F)>
<ROUTINE BLATHER-F ()
<COND (<OR <VERB? TALK HELLO>
<EQUAL? ,BLATHER ,WINNER>>
<TELL
"Blather shouts \"Speak when you're spoken to, Ensign Seventh Class!\" He
breaks three pencil points in a frenzied rush to give you more demerits." CR>
<SETG P-CONT <>>
<SETG QUOTE-FLAG <>>
<RFATAL>)
(<VERB? ATTACK KICK>
<JIGS-UP
"Blather removes several of your appendages and internal organs.">)
(<VERB? SALUTE>
<TELL
"Blather's sneer softens a bit. \"First right thing you've done today. Only
five demerits.\"" CR>)
(<AND <VERB? THROW>
<EQUAL? ,BLATHER ,PRSI>>
<MOVE ,PRSO ,HERE>
<TELL
"The " D ,PRSO " bounces off Blather's bulbous nose. He becomes livid, orders
you to do five hundred push-ups, gives you ten thousand demerits, and assigns
you five years of extra galley duty." CR>)
(<VERB? EXAMINE>
<TELL
"Ensign Blather is a tall, beefy officer with a tremendous, misshapen nose.
His uniform is perfect in every respect, and the crease in his trousers
could probably slice diamonds in half." CR>)
(<VERB? TAKE>
<TELL
"Blather brushes you away, muttering about suspended shore leave." CR>)>>
<OBJECT AMBASSADOR
(DESC "alien ambassador")
(LDESC
"A high-ranking ambassador from a newly-contacted alien race is standing
here on three of his legs, and watching you with seven of his eyes.")
(SYNONYM AMBASSADOR)
(ADJECTIVE VERY IMPORTANT ALIEN HIGH-RANKING HIGH RANKING)
(SIZE 150)
(FLAGS VOWELBIT ACTORBIT)
(ACTION AMBASSADOR-F)>
<OBJECT CELERY
(DESC "piece of celery")
(SYNONYM CELERY PIECE STALK)
(FLAGS NDESCBIT FOODBIT)
(ACTION CELERY-F)>
<ROUTINE CELERY-F ()
<COND (<VERB? EAT>
<JIGS-UP
"Oops. Looks like Blow'k-Bibben-Gordoan metabolism is not
compatible with our own. You die of all sorts of convulsions.">)
(<VERB? TAKE>
<TELL
"The ambassador seems perturbed by your lack of normal protocol." CR>)>>
<GLOBAL AMBASSADOR-LEAVE 0>
<ROUTINE I-AMBASSADOR ()
<COND (<AND <G? ,AMBASSADOR-LEAVE 2>
<IN? ,AMBASSADOR ,HERE>>
<REMOVE ,AMBASSADOR>
<REMOVE ,CELERY>
<COND (<EQUAL? ,HERE ,DECK-NINE>
<TELL CR
"The ambassador grunts a polite farewell, and disappears up the gangway,
leaving a trail of dripping slime." CR>)>
<DISABLE <INT I-AMBASSADOR>>)
(<IN? ,AMBASSADOR ,DECK-NINE>
<SETG AMBASSADOR-LEAVE <+ ,AMBASSADOR-LEAVE 1>>
<COND (<EQUAL? ,HERE ,DECK-NINE>
<TELL CR "The ambassador ">
<TELL <PICK-ONE ,AMBASSADOR-QUOTES> CR>)
(T
<RFALSE>)>)
(<EQUAL? ,HERE ,DECK-NINE>
<COND (<AND <NOT <IN? ,AMBASSADOR ,HERE>>
<NOT <IN? ,BLATHER ,HERE>>
<EQUAL? ,BLOWUP-COUNTER 0>
<PROB 15>>
<MOVE ,AMBASSADOR ,HERE>
<MOVE ,CELERY ,HERE>
<THIS-IS-IT ,AMBASSADOR>
<MOVE ,BROCHURE ,ADVENTURER>
<TELL CR
"The alien ambassador from the planet Blow'k-bibben-Gordo ambles toward you
from down the corridor. He is munching on something resembling an enormous
stalk of celery, and he leaves a trail of green slime on the deck. He stops
nearby, and you wince as a pool of slime begins forming beneath him on your
newly-polished deck. The ambassador wheezes loudly and hands you a brochure
outlining his planet's major exports."CR>)>)>>
<OBJECT BROCHURE
(DESC "brochure")
(LDESC
"Unfortunately, one of those stupid Blow'k-bibben-Gordo brochures is here.")
(SYNONYM BROCHURE PAMPHLET LEAFLET)
(FLAGS ACIDBIT TAKEBIT READBIT)
(SIZE 4)
(TEXT
"\"The leading export of Blow'k-bibben-Gordo is the adventure game|
|
*** PLANETFALL ***|
|
written by S. Eric Meretzky.|
Buy one today. Better yet, buy a thousand.\"")>
<GLOBAL AMBASSADOR-QUOTES
<PLTABLE
"introduces himself as Br'gun-te'elkner-ipg'nun."
"asks if you are performing some sort of religious ceremony."
"inquires whether you are interested in a game of Bocci."
"recites a plea for coexistence between your races."
"asks where Admiral Smithers can be found."
"remarks that all humans look alike to him."
"offers you a bit of celery.">>
<ROUTINE AMBASSADOR-F ()
<COND (<OR <VERB? TALK HELLO>
<EQUAL? ,AMBASSADOR ,WINNER>>
<TELL
"The ambassador taps his translator, and then touches his center knee to his
left ear (the Blow'k-bibben-Gordoan equivalent of shrugging)." CR>
<SETG P-CONT <>>
<SETG QUOTE-FLAG <>>
<RFATAL>)
(<AND <VERB? ASK-FOR>
<EQUAL? ,PRSI ,CELERY>>
<TELL
"The ambassador seems willing to let you eat some of it, but I doubt he wants
to part with the entire stalk." CR>)
(<VERB? ATTACK KICK>
<TELL
"The ambassador is startled, and emits an amazing quantity of slime which
spreads across the section of the deck you just polished." CR>)
(<VERB? EXAMINE>
<TELL
"The ambassador has around twenty eyes, seven of which are currently
open. Half of his six legs are retracted. Green slime oozes from
multiple orifices in his scaly skin. He speaks through a mechanical
translator slung around his neck." CR>)
(<VERB? LISTEN>
<TELL
"The alien makes a wheezing noise as he breathes." CR>)>>
<ROOM ESCAPE-POD
(IN ROOMS)
(DESC "Escape Pod")
(C-MOVE <TABLE
;"OUT" 0 ;"IN" 0 ;"DOWN" 0 ;"UP" 0
;"NW" 0 ;"WEST" 0 ;"SW" 0 ;"SOUTH" 0
;"SE" 0 ;"EAST" 0 ;"NE" 0 ;"NORTH" 0>)
(EAST PER POD-EXIT-F)
(OUT PER POD-EXIT-F)
(UP PER POD-EXIT-F)
(FLAGS RLANDBIT ONBIT)
(VALUE 3)
(GLOBAL POD-DOOR CONTROLS LIGHTS GLOBAL-POD WINDOW)
(ACTION ESCAPE-POD-F)>
<OBJECT GLOBAL-POD
(IN LOCAL-GLOBALS)
(DESC "escape pod")
(SYNONYM POD)
(ADJECTIVE EMERGENCY ESCAPE PRIMARY)
(FLAGS VOWELBIT VEHBIT NDESCBIT)
(ACTION GLOBAL-POD-F)>
<ROUTINE GLOBAL-POD-F ()
<COND (<VERB? THROUGH BOARD WALK-TO>
<COND (<EQUAL? ,HERE ,ESCAPE-POD>
<TELL "You're already in it!" CR>)
(T
<DO-WALK ,P?WEST>
<RTRUE>)>)
(<VERB? EXIT DISEMBARK DROP>
<COND (<EQUAL? ,HERE ,DECK-NINE>
<TELL "You're not in it!" CR>)
(T
<DO-WALK ,P?OUT>
<RTRUE>)>)
(<VERB? OPEN>
<PERFORM ,V?OPEN ,POD-DOOR>
<RTRUE>)>>
<ROUTINE POD-EXIT-F ()
<COND (<G? ,BLOWUP-COUNTER 4>
<COND (<EQUAL? ,PRSO ,P?EAST>
<TELL ,CANT-GO CR>
<RFALSE>)
(<NOT <FSET? ,POD-DOOR ,OPENBIT>>
<TELL "The pod door is closed." CR>
<RFALSE>)
(T
<SETG C-ELAPSED 30>
,UNDERWATER)>)
(T
<COND (<EQUAL? ,PRSO ,P?UP>
<TELL ,CANT-GO CR>
<RFALSE>)
(<NOT <FSET? ,POD-DOOR ,OPENBIT>>
<TELL "The pod door is closed." CR>
<RFALSE>)
(T
,DECK-NINE)>)>>
<OBJECT SAFETY-WEB
(IN ESCAPE-POD)
(DESC "safety web")
(SYNONYM MASS WEB WEBBING NET)
(ADJECTIVE SAFETY)
(FLAGS CLIMBBIT VEHBIT NDESCBIT)
(ACTION SAFETY-WEB-F)>
<ROUTINE SAFETY-WEB-F ("OPTIONAL" (RARG ,M-OBJECT))
<COND (<AND <VERB? EXAMINE>
<EQUAL? .RARG ,M-OBJECT>>
<TELL
"The safety webbing fills most of the pod. It could accomodate
from one to, perhaps, twenty people." CR>)
(<AND <VERB? TAKE>
<EQUAL? .RARG ,M-OBJECT>>
<TELL
"The safety web seems to be more intended for getting into than
grabbing onto." CR>)
(<AND <VERB? BOARD CLIMB-ON>
<EQUAL? .RARG ,M-OBJECT>>
<MOVE ,ADVENTURER ,SAFETY-WEB>
<TELL
"You are now safely cushioned within the web." CR>)
(<AND <VERB? OPEN TAKE>
<EQUAL? .RARG ,M-BEG>>
<COND (<EQUAL? ,PRSO ,SAFETY-WEB>
<TELL "You're in it!" CR>)
(T
<TELL "You can't reach it from here." CR>)>)
(<AND <VERB? WALK>
<EQUAL? .RARG ,M-BEG>>
<TELL "You'll have to stand up, first." CR>)
(<AND <VERB? EXIT DISEMBARK DROP STAND>
<EQUAL? .RARG ,M-OBJECT>
<IN? ,ADVENTURER ,SAFETY-WEB>>
<MOVE ,ADVENTURER ,HERE>
<COND (<AND <G? ,TRIP-COUNTER 14>
<EQUAL? <GET <INT I-SINK-POD> ,C-ENABLED?> 0>>
<ENABLE <QUEUE I-SINK-POD -1>>
<TELL
"As you stand, the pod shifts slightly and you feel it falling.
A moment later, the fall stops with a shock, and you see water
rising past the viewport." CR>)
(T
<TELL "You are standing again." CR>)>)>>
<OBJECT TOWEL
(DESC "towel")
(SYNONYM TOWEL)
(SIZE 10)