-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathglobals.zil
More file actions
3060 lines (2796 loc) · 95.5 KB
/
globals.zil
File metadata and controls
3060 lines (2796 loc) · 95.5 KB
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 S-TEXT 0>
<CONSTANT S-WINDOW 1>
<CONSTANT H-NORMAL 0>
<CONSTANT H-INVERSE 1>
<CONSTANT H-BOLD 2>
<CONSTANT H-ITALIC 4>
<CONSTANT D-SCREEN-ON 1>
<CONSTANT D-SCREEN-OFF -1>
<CONSTANT D-PRINTER-ON 2>
<CONSTANT D-PRINTER-OFF -2>
<CONSTANT D-TABLE-ON 3>
<CONSTANT D-TABLE-OFF -3>
<CONSTANT D-RECORD-ON 4>
<CONSTANT D-RECORD-OFF -4>
<CONSTANT SL-TABLE:TABLE <ITABLE NONE 80>> "status line constructed here"
<GLOBAL OHERE:OBJECT <>>
<GLOBAL OLD-LEN:NUMBER 0>
<ROUTINE INIT-STATUS-LINE ()
<COND (<L? ,WIDTH 38>
<TELL "[Screen too narrow.]" CR>
<QUIT>)>
<SETG OHERE <>>
<SETG OLD-LEN 0>
<SPLIT 1>
<SCREEN ,S-WINDOW>
<HLIGHT ,H-INVERSE>
<CURSET 1 1>
<PRINT-SPACES ,WIDTH>
<COND (<G? ,WIDTH 74>
<CURSET 1 51>
<TELL "Score:">
<CURSET 1 64>
<TELL "Time:">)>
<HLIGHT ,H-NORMAL>
<SCREEN ,S-TEXT>
<RTRUE>>
<ROUTINE UPDATE-STATUS-LINE ()
<SCREEN ,S-WINDOW>
;<BUFOUT <>>
<HLIGHT ,H-NORMAL>
<HLIGHT ,H-INVERSE>
<COND (<NOT <EQUAL? ,HERE ,OHERE>>
<SETG OHERE ,HERE>
;<DIROUT ,D-SCREEN-OFF> ; "Screen off."
<DIROUT ,D-TABLE-ON ,SL-TABLE> ; "Table on."
<SAY-HERE>
<DIROUT ,D-TABLE-OFF> ; "Table off."
;<DIROUT ,D-SCREEN-ON> ; "Screen on."
<CURSET 1 2>
<PRINT-SPACES ,OLD-LEN> ; "Erase old HERE desc"
<SETG OLD-LEN <GET ,SL-TABLE 0>> ;"Print new HERE desc."
<CURSET 1 2>
<SAY-HERE>)>
<COND (<G? ,WIDTH 74>
<CURSET 1 58>
<TELL N ,SCORE " "> ;"for 110 to 80 score bug"
<CURSET 1 70>
<TELL N ,MOVES>)
(T
<DIROUT ,D-TABLE-ON ,SL-TABLE>
<TELL N ,SCORE "/" N ,MOVES " ">
<DIROUT ,D-TABLE-OFF>
<CURSET 1 <- ,WIDTH <+ <GET ,SL-TABLE 0> 1>>>
<TELL N ,SCORE "/" N ,MOVES " ">)>
<HLIGHT ,H-NORMAL>
<SCREEN ,S-TEXT> ;"Back to main screen."
<RTRUE>>
<ROUTINE PRINT-SPACES (N "AUX" AMT)
<REPEAT ()
<COND (<G? .N ,BLANKS-LEN>
<SET AMT ,BLANKS-LEN>)
(T
<SET AMT .N>)>
<PRINTT ,BLANKS .AMT>
<COND (<L=? <SET N <- .N .AMT>> 0>
<RTRUE>)>>>
<CONSTANT BLANKS-LEN 10>
<CONSTANT BLANKS <ITABLE ,BLANKS-LEN (BYTE) !\ >>
<ROUTINE SAY-HERE ()
<COND (<ZERO? ,LIT?>
<TELL "Darkness">)
(T
<TELL D ,HERE>
<COND (<AND <G? ,WIDTH 74>
<FSET? <LOC ,ADVENTURER> ,VEHBIT>>
<TELL ", in the " D <LOC ,ADVENTURER>>)>)>
<RTRUE>>
<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
(SYNONYM ZZMGCK)
(DESC "it")
(FLAGS INVISIBLE TOUCHBIT SURFACEBIT TRYTAKEBIT MUNGBIT MUNGEDBIT
SCRAMBLEDBIT WORNBIT OPENBIT SEARCHBIT TRANSBIT WEARBIT
READBIT ACIDBIT ACTIVEBIT)>
<OBJECT LOCAL-GLOBALS
(LOC 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
(IN TO ROOMS)
(DESC "it")>
<OBJECT INTNUM
(LOC GLOBAL-OBJECTS)
(SYNONYM INTNUM)
(DESC "number")>
<OBJECT PSEUDO-OBJECT
(DESC "pseudoxyz")
(ACTION GO)>
<OBJECT IT
(LOC GLOBAL-OBJECTS)
(SYNONYM IT THAT THIS HIM)
(DESC "random object")
(FLAGS NDESCBIT)>
<OBJECT STAIRS
(LOC LOCAL-GLOBALS)
(SYNONYM STAIRS STEPS GANGWAY STAIRWAY)
(DESC "stairway")
(FLAGS NDESCBIT CLIMBBIT)>
<OBJECT GROUND
(LOC 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
(LOC 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
(LOC 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
(LOC 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
(LOC 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
(LOC 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
(LOC LOCAL-GLOBALS)
(SYNONYM LIGHT LIGHTS)
(ADJECTIVE RED DAZZLING GLOWING BLINKING WARNING BRIGHT COLORED FLASHING)
(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
(LOC GLOBAL-OBJECTS)
(SYNONYM DOORWAY PORTAL OPENING)
(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
(LOC LOCAL-GLOBALS)
(SYNONYM CONTROL PANEL DIALS GAUGES)
(ADJECTIVE CONTROL 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
(LOC GLOBAL-OBJECTS)
(DESC "game")
(SYNONYM BOCCI CHESS HIDER-AND-SEEKER HUCKA-BUCKA SEEKER BEANSTALK)
(ADJECTIVE HIDER HUCKA BUCKA)
(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
(LOC 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
(LOC 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
(LOC DECK-NINE)
(SYNONYM ADMIRAL SMITHE SPAM EGGS)
(ADJECTIVE ORANGE OPENER)
(DESC "player")
(FLAGS NDESCBIT INVISIBLE)>
<OBJECT ME
(LOC 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>)>>
;<GLOBAL DUMMY
<PLTABLE "Look around."
"You think it isn't?"
"I think you've already done that.">>
<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)
<COND (<AND <PRSO? ,NOT-HERE-OBJECT>
<PRSI? ,NOT-HERE-OBJECT>>
<TELL "Those things aren't here!" CR>
<RTRUE>)
(<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-XADJ>)>
<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> <>>)>>
^L
;"Begin-game stuff aboard the Feinstein"
<ROOM BRIG
(LOC 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 SORRY "The cell door is locked.")
(FLAGS RLANDBIT ONBIT)
(PSEUDO "GRAFFITI" GRAFFITI-PSEUDO "DOOR" DOOR-PSEUDO)>
<ROOM DECK-NINE
(LOC 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
(LOC ADVENTURER)
(DESC "Patrol-issue self-contained multi-purpose scrub brush")
(SYNONYM BRUSH SCRUBBRUSH SCRUBRUSH)
(ADJECTIVE SCRUB PATROL SELF-CONTAINED MULTI MULTI-PURPOSE PURPOSE)
(FLAGS TAKEBIT)
(SIZE 10)>
<OBJECT CHRONOMETER
(LOC 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
(LOC 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
(LOC 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 supercomfy.">
<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>)>>
<OBJECT DIARY
(LOC ADVENTURER)
(DESC "diary")
(SYNONYM DIARY MACHINE RECORDER)
(ADJECTIVE BATTERED OLD)
(FLAGS ACIDBIT TAKEBIT READBIT TRANSBIT)
(CAPACITY 0)
(SIZE 3)
(ACTION DIARY-F)>
;<ROUTINE DIARY-F ()
<COND (<VERB? READ EXAMINE>
<TELL "You've scribbled in a diary ever since you can
remember. You turn on this battered old electro-book; the screen blanks,
clears and types, \"Doo not plaee with mee until Aamee kodes mee in.\""
CR>)>>
<GLOBAL DIARY-CTR 0>
<ROUTINE DIARY-F ()
<COND (<VERB? OPEN CLOSE>
<TELL "It's not that kind of diary." CR>)
(<VERB? EXAMINE>
<TELL
"You've used this battered old recording machine as a diary for years. It
includes a little button">
<COND (<FSET? ,DIARY ,ACTIVEBIT>
<TELL ", which is flashing,">)>
<TELL
" and a microphone/speaker. To read its screen, type READ DIARY." CR>)
;(<AND <VERB? READ>
<NOT <FSET? ,DIARY ,ACTIVEBIT>>>
;<QUEUE I-DIARY-READER -1>
<FSET ,DIARY ,ACTIVEBIT>
<SETG DIARY-CTR 0>
<READ-DIARY>)
(<VERB? READ>
<COND (<IN? ,BLATHER ,HERE>
<TELL
"Blather stops you, scribbling madly. \"I warned you, Ensign!
That's another two hundred demerits!\"" CR>)
(<NOT <FSET? ,DIARY ,ACTIVEBIT>>
;<QUEUE I-DIARY-READER -1>
<FSET ,DIARY ,ACTIVEBIT>
<SETG DIARY-CTR 0>
<READ-DIARY>)
(T
<WORDS-ON-SCREEN>)>)>>
<OBJECT DIARY-BUTTON
(LOC DIARY)
(DESC "little button")
(SYNONYM BUTTON)
(ADJECTIVE LITTLE)
(FLAGS NDESCBIT)
(SIZE 0)
(ACTION DIARY-BUTTON-F)>
<ROUTINE DIARY-BUTTON-F ()
<COND (<VERB? PUSH>
<COND (<FSET? ,DIARY ,ACTIVEBIT>
<COND (<EQUAL? ,DIARY-CTR 14>
<FCLEAR ,DIARY ,ACTIVEBIT>
<SETG DIARY-CTR 0>
<TELL
"\"END OF DIARY -- REWINDING\" flashes across the screen; the machine whirrs,
stops, and the little button flickers off." CR>)
(T
<READ-DIARY>)>)
(T
<TELL "Nothing happens." CR>)>)
(<AND <VERB? EXAMINE>
<FSET? ,DIARY ,ACTIVEBIT>>
<TELL "It is flashing." CR>)>>
<CONSTANT DIARY-ENTRIES
<PTABLE
"Bug #46"
"July 22 -- Transferred from S.P.S. Trilobyte to S.P.S.
Feinstein for the third of my four tours of duty. I'm truly going to miss
my commander, Ensign First Class Lim. He was a friend in every respect --
someone you could always go to with a problem, someone I could really look
up to. We would sometimes talk long into the night. He would tell me
about his home world of Ash-Down V, and I would talk about growing up on
Gallium. I'd get pretty homesick sometimes, even though Gallium is not
exactly one of the garden spots of the universe. I just hope my new
commander is half as nice as Lim.||
This new ship seems pretty swell. I'm in a cabin with only five
other ensigns, and I've got one-and-a-half cubic meters of locker space!"
"July 23 -- Met my new commander today -- Ensign Cadet First
Class Blather. He seems like a real krip. (Excuse the language, Diary.) But
that might just be a bad first impression."
"July 25 -- One of my cabin mates, Gorund, organized a Double
Fanucci tournament among all the Ensigns Seventh Class. We were playing
during the 150-millichron rec period after lunch, and Blather burst in and
confiscated the sets and told us that playing war games was a violation of
patrol regulations. But Ensign Whirp, who's studying to be a patrol lawyer,
said she couldn't find anything about it in the regulations anywhere.|
BLATHER IS REALLY A TOTAL MEGAKRIP!!!"
"July 28 -- I went to see the personnel officer today to find
out what my new duties would involve. He showed me a list of all the open
assignments, and I decided to put in for the grotch-feeding detail. We picked
up a few grotches when we were on Crassus, and we're taking them to the
Zoology Labs on Tremain so that maybe they can figure out how an animal can
produce 47 times its weight in trot every day."
"Bozbar 7 -- Everyone from the P.O. to the ship's cook has
approved my application for the grotch-feeding detail -- except Blather. I
have an appointment to see him tomorrow. Wish me luck."
"Bozbar 8 -- TROT!! Blather rejected my application! And to
make it worse, he said that since I seem to love grotches so much, he's
assigning me to clean out their cages. TROT AND DOUBLE TROT!!"
"Bozbar 26 -- I haven't had time to keep my diary lately,
because Blather's been watching us all like a Teleran bird. Also, last
week he found the diary during a surprise inspection, gave me 200 demerits,
and told me that diaries were against regulations. But I'll be frobbed if
I'm going to stop. I've started hiding the diary inside my official documents
file, and I keep that hidden in the air duct. From now on I'll have to sneak
away somewhere to use it."
"Bozbar 27 -- Greeting from the Deck Four Supply Closet of the
S.P.S. Feinstein. I hope I'm not tempting fate, sneaking around with my diary
this way. I used to be as much of a disbeliever in destiny as the next guy,
but not anymore. Not since the time my mom warned my dad not to tempt fate
by walking across the astral plains after dark, when the computerized analysis
showed a 43% chance of resulting injury. My dad, stubborn as always, just
laughed at her and went right on taking his nightly strolls. THE VERY NEXT
SUMMER HE WENT WALKING AT NIGHT ON THE PLAINS AND STUMBLED OVER A CRATER AND
BRUISED HIS KNEE! Gosh!"
"Bozbar 28 -- We entered planetary orbit today, a non-human
world called Accardi-3 (although the natives call it something like
Blow'k-bibben-gordo). They're not officially part of the union. The rumors
say that we're picking up a special ambassador to take back to Tremain for
negotiations on joining the union. Tomorrow we have to put on our dress
uniforms for some special welcoming ceremony."
"August 2 -- I caught a glimpse of the alien ambassador during
the welcoming ceremonies yesterday. He looks like a cross between a tree
trunk and a melting ice cream cone. But at least the ceremony got me out of
cleaning the grotch cages today."
"August 7 -- Went to the mandatory Patrol Informational
Tri-vision Triple Feature last night. We saw 'Treatment For Space Lice
Infestation,' 'Shoreleave Shirley: How to Guard Against Contracting Alien
Diseases,' and 'The Oxygen Tank: Your Galvanized Buddy in the Vacuum.'
Blather confined half the ensigns to quarters for hooting during the second
feature. (The other half had fallen asleep during the first feature.)"
"August 24 -- TROT THAT TROTTING KRIP!! I applied for
astrophysics training for the next quarter, but Blather says my work for the
special assignment task force hasn't been good enough, so not only did he
reject my astrophysics application, but he says I'll have to take remedial
scrubbing next quarter. WHAT A TROTTING KRIP!||
You know, for the first time I'm beginning to have doubts about
whether I'm really cut out for the patrol. When I was growing up on Gallium,
it was always taken for granted that I would join up when I came of age. My
family has served in the patrol for five generations. In fact, my
great-great-grandfather was a high admiral and one of the founding fathers of
the Patrol! But I seem to be permanently stuck at Ensign 7th, and Blather is
making my life miserable..."
"Septem 4 -- We left hyperspace today at about 7600; weren't
scheduled to for about another two weeks. The grapevine says we have special
orders to investigate a planetary system here. Apparently, some of the
archaeologists back on Varshon think it might have been part of the Second
Union. I can't imagine why anyone would settle out here in this remote
corner of the galaxy."
"Septem 5 -- That krip has done it again! I missed two little
pellets of trot when I was when I was cleaning out the grotch cages yesterday,
and Blather gave me 100 demerits and assigned me two extra shifts of deck
scrubbing -- including Deck Nine, the filthiest deck on the ship! I'm
considering asking for a transfer -- or if things get worse, I might even
abandon ship!">>
<ROUTINE READ-DIARY ()
<SETG DIARY-CTR <+ ,DIARY-CTR 1>>
<COND (<EQUAL? ,DIARY-CTR 1>
<TELL "Words start to scroll across the screen:||">)>
<WORDS-ON-SCREEN>>
<ROUTINE WORDS-ON-SCREEN ()
<TELL "\"11,344 ">
<TELL <GET ,DIARY-ENTRIES ,DIARY-CTR> "\"">
<COND (<NOT <EQUAL? ,DIARY-CTR 14>>
<TELL CR CR
"The single word, \"More,\" appears at the bottom of the diary
screen, and the little button flashes.">)>
<CRLF>>
<ROOM REACTOR-LOBBY
(LOC 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 SORRY "Ensign Blather pushes you roughly back toward your post.")
(EAST SORRY "Ensign Blather blocks your way, snarling angrily.")
(FLAGS RLANDBIT ONBIT)
(GLOBAL CORRIDOR-DOOR)>
<ROOM GANGWAY
(LOC 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
(LOC 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 SORRY "Blather throws you to the deck and makes you do 20 push-ups.")
(WEST SORRY "Blather throws you to the deck and makes you do 20 push-ups.")
(NORTH SORRY "Blather blocks your path, growling about extra galley duty.")
(FLAGS RLANDBIT ONBIT)
(GLOBAL STAIRS)>
;<OBJECT MEASLE
(DESC "Lt. Measle")
(LDESC
"The Feinstein's record officer, Lieutenant Measle, is here.")
(SYNONYM MEASLE OFFICER)
(ADJECTIVE LT LIEUTENANT RECORD)
(FLAGS ACTORBIT)
(ACTION MEASLE-F)>
;<ROUTINE MEASLE-F ()
<COND (<VERB? ATTACK KICK>
<TELL "Lt. Measle summons Ensign Blather, who throws
you in the brig." CR>
<GOTO ,BRIG>)>>
<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>