-
Notifications
You must be signed in to change notification settings - Fork 124
/
globals.zil
2187 lines (1969 loc) · 62.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
THE HITCHHIKER'S GUIDE TO THE GALAXY
(c) Copyright 1984 Infocom, Inc. All Rights Reserved."
<DIRECTIONS ;"Do not change the order of the first 8 without consulting MARC!"
NORTH NE EAST SE SOUTH SW WEST NW UP DOWN IN OUT>
<GLOBAL LYING-DOWN <>>
<GLOBAL HERE <>>
<GLOBAL LIT <>>
<GLOBAL MOVES 0>
<GLOBAL SCORE 0>
<GLOBAL INDENTS
<PTABLE ""
" "
" "
" "
" "
" ">>
;"global objects and associated routines"
<OBJECT GLOBAL-OBJECTS
(FLAGS INVISIBLE TOUCHBIT SURFACEBIT TRYTAKEBIT OPENBIT REVISITBIT
SEARCHBIT TRANSBIT WEARBIT MUNGEDBIT ONBIT RLANDBIT WORNBIT)>
<OBJECT LOCAL-GLOBALS
(IN GLOBAL-OBJECTS)
(SYNONYM ZZMGCK)
(DESCFCN 0)
(GLOBAL GLOBAL-OBJECTS)
(FDESC "F")
(LDESC "F")
(PSEUDO "FOOBAR" V-WALK)
(SIZE 0)
(TEXT "")
(CAPACITY 0)>
;"Yes, this synonym for LOCAL-GLOBALS needs to exist... sigh"
<OBJECT ROOMS
(IN TO ROOMS)>
<OBJECT INTNUM
(IN GLOBAL-OBJECTS)
(DESC "number")
(SYNONYM INTNUM)
(ADJECTIVE NUMBER)>
<OBJECT PSEUDO-OBJECT
(DESC "pseudo")
(ACTION ME-F)>
<OBJECT IT
(IN GLOBAL-OBJECTS)
(SYNONYM IT THEM HER HIM)
(DESC "it")
(FLAGS VOWELBIT NARTICLEBIT NDESCBIT TOUCHBIT)>
<OBJECT NOT-HERE-OBJECT
(DESC "it")
(FLAGS NARTICLEBIT)
(ACTION NOT-HERE-OBJECT-F)>
<ROUTINE NOT-HERE-OBJECT-F ("AUX" TBL (PRSO? T) OBJ (X <>))
<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 (<OR <EQUAL? ,PRSA ,V?FIND ,V?FOLLOW ,V?CALL>
<EQUAL? ,PRSA ,V?WHAT ,V?WHERE ,V?WHO>
<EQUAL? ,PRSA ,V?WAIT-FOR ,V?WALK-TO ,V?WHAT-ABOUT>
<EQUAL? ,PRSA ,V?I-AM ,V?CARVE ,V?CALL-WITH>>
<SET X T>
<COND (<SET OBJ <FIND-NOT-HERE .TBL .PRSO?>>
<COND (<NOT <EQUAL? .OBJ ,NOT-HERE-OBJECT>>
<RTRUE>)>)
(T
<RFALSE>)>)>)
(T
<COND (<OR <EQUAL? ,PRSA ,V?ASK-ABOUT ,V?ASK-FOR ,V?TELL-ABOUT>
<EQUAL? ,PRSA ,V?MY-NAME>>
<SET X T>
<COND (<SET OBJ <FIND-NOT-HERE .TBL .PRSO?>>
<COND (<NOT <EQUAL? .OBJ ,NOT-HERE-OBJECT>>
<RTRUE>)>)
(T
<RFALSE>)>)>)>
;"Here is the default 'cant see any' printer"
<COND (.X
<TELL "You'll have to be more specific, I'm afraid." CR>)
(<EQUAL? ,WINNER ,PROTAGONIST>
<TELL "You can't ">
<COND (<EQUAL? ,P-XNAM ,W?POEM ,W?POETRY ,W?CONVER>
<TELL "hear">)
(T
<TELL "see">)>
<COND (<NOT <NAME? ,P-XNAM>>
<TELL " any">)>
<NOT-HERE-PRINT .PRSO?>
<TELL " here!" CR>)
(<OR <AND <EQUAL? ,WINNER ,FORD>
,FORD-SLEEPING>
<AND <EQUAL? ,WINNER ,BEAST>
<FSET? ,BEAST ,MUNGEDBIT>>>
<RFALSE>)
(T
<TELL "Looking confused,">
<ARTICLE ,WINNER T>
<TELL " says, \"I don't see">
<COND (<NOT <NAME? ,P-XNAM>>
<TELL " any">)>
<NOT-HERE-PRINT .PRSO?>
<TELL " here!\"" CR>)>
<FUCKING-CLEAR>>
<ROUTINE FIND-NOT-HERE (TBL PRSO? "AUX" M-F OBJ)
;"Special-case code goes here. <MOBY-FIND .TBL> returns # of matches. If 1,
then P-MOBY-FOUND is it. You can treat the 0 and >1 cases alike or differently.
Always return RFALSE (not handled) if you have resolved the problem."
<SET M-F <MOBY-FIND .TBL>>
;<COND (,DEBUG
<TELL "[Found " N .M-F " obj]" CR>)>
<COND (<EQUAL? 1 .M-F>
;<COND (,DEBUG
<TELL "[Namely: " D ,P-MOBY-FOUND "]" CR>)>
<COND (.PRSO?
<SETG PRSO ,P-MOBY-FOUND>)
(T
<SETG PRSI ,P-MOBY-FOUND>)>
<RFALSE>)
(<EQUAL? ,P-XNAM ,W?FLUFF>
<COND (.PRSO?
<SETG PRSO ,POCKET-FLUFF>)
(T
<SETG PRSI ,POCKET-FLUFF>)>
<RFALSE>)
(<EQUAL? ,P-XNAM ,W?TOOL ,W?TOOLS>
<COND (.PRSO?
<SETG PRSO ,TWEEZERS>)
(T
<SETG PRSI ,TWEEZERS>)>
<RFALSE>)
(T
,NOT-HERE-OBJECT)>>
<ROUTINE NOT-HERE-PRINT (PRSO?)
<COND ;(<NAME? ,P-XNAM>
<TELL "one by that name">)
(,P-OFLAG
<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> <>>)>>
<OBJECT LIGHT
(IN GLOBAL-OBJECTS)
(DESC "light")
(SYNONYM LIGHT LIGHTS LAMP)
(FLAGS LIGHTBIT)
(ACTION LIGHT-F)>
<ROUTINE LIGHT-F ()
<COND (<AND <OR <IN? ,FLEET ,HERE>
<EQUAL? ,HERE ,AIRLOCK ,INSIDE-WHALE>>
<VISIBLE? ,THUMB>>
<COND (<EQUAL? ,LIGHT ,PRSI>
<PERFORM ,PRSA ,PRSO ,THUMB>
<RTRUE>)
(T
<PERFORM ,PRSA ,THUMB ,PRSI>
<RTRUE>)>)
(<EQUAL? ,HERE ,GALLEY>
<UNIMPORTANT-THING-F>)
(<AND <EQUAL? ,LIGHT ,PRSO>
<VERB? FIND FOLLOW WHAT WHERE WALK-TO WHAT-ABOUT>>
<RFALSE>)
(<AND <EQUAL? ,LIGHT ,PRSI>
<VERB? ASK-ABOUT TELL-ABOUT>>
<RFALSE>)
(<NOT <EQUAL? ,HERE ,BEDROOM>>
<CANT-SEE ,LIGHT>)
(<VERB? LAMP-ON>
<COND (<FSET? ,HERE ,ONBIT>
<TELL "It is." CR>)
(T
<SETG LIT T>
<FSET ,HERE ,ONBIT>
<FSET ,DARK-OBJECT ,DARKBIT>
<MOVE ,DARK-OBJECT ,DARK>
<TELL
"Good start to the day. Pity it's going to be the worst one of your
life. The light is now on." CR CR>
<V-LOOK>)>)
(<VERB? LAMP-OFF>
<V-DIG>)>>
<OBJECT GLOBAL-SLEEP
(IN GLOBAL-OBJECTS)
(DESC "sleep")
(SYNONYM SLEEP NAP SNOOZE)
(FLAGS NARTICLEBIT)
(ACTION GLOBAL-SLEEP-F)>
<ROUTINE GLOBAL-SLEEP-F ()
<COND (<VERB? WALK-TO TAKE>
<PERFORM ,V?SLEEP>
<RTRUE>)>>
<OBJECT SPEECH
(IN GLOBAL-OBJECTS)
(DESC "speech")
(SYNONYM SPEECH)
(ACTION SPEECH-F)>
<ROUTINE SPEECH-F ()
<COND (<VERB? GIVE MAKE>
<TELL "This isn't the time">
<COND (<NOT <EQUAL? ,HERE ,DAIS>>
<TELL " or the place">)>
<TELL " for making speeches." CR>)
(<VERB? READ>
<TELL "It's extemporaneous." CR>)>>
<OBJECT GROUND
(IN GLOBAL-OBJECTS)
(SYNONYM FLOOR GROUND MUD)
(DESC "ground")
(ACTION GROUND-F)>
<ROUTINE GROUND-F ()
<COND (<AND <VERB? THROUGH>
<EQUAL? ,HERE ,ACCESS-SPACE>>
<TELL "The mesh is too fine." CR>)
(<VERB? CLIMB-UP CLIMB-ON CLIMB-FOO BOARD>
<V-DIG>)
(<VERB? LOOK-UNDER>
<V-COUNT>)
(<VERB? LEAVE>
<DO-WALK ,P?UP>)
(<VERB? LIE-DOWN>
<COND (<IN? ,PROTAGONIST ,BED>
<OUT-OF-FIRST ,BED>)
(,LYING-DOWN
<TELL ,YOU-ARE CR>)
(<EQUAL? ,HERE ,FRONT-OF-HOUSE>
<PERFORM ,V?BLOCK ,BULLDOZER>
<SETG P-IT-OBJECT ,GROUND>
<RTRUE>)
(T
<SETG LYING-DOWN T>
<TELL "You are now lying on the ground." CR>)>)
(<VERB? EXAMINE>
<COND (<EQUAL? ,HERE ,GUTS-ROOM>
<TELL
"The walls, floor, and ceiling are covered with little pieces of
flesh and bone." CR>)
(<EQUAL? ,HERE ,ACCESS-SPACE>
<TELL
"The floor is an open metal mesh, like the floor of a catwalk." CR>)>)
(<AND <VERB? LOOK-INSIDE>
<EQUAL? ,HERE ,ACCESS-SPACE>>
<PERFORM ,V?LOOK-INSIDE ,FISH-HOLE>
<SETG P-IT-OBJECT ,GROUND>
<RTRUE>)
(<AND <VERB? ENJOY>
<EQUAL? ,HERE ,FRONT-OF-HOUSE>
,LYING-DOWN>
<TELL
"It occurs to you that you've never deliberately lain in any mud before and
that it's actually a pleasant sort of squishy sensation. You let the mud ooze
between your toes. You may be here for some time, so you may as well make the
most of it." CR>)>>
<OBJECT WALLS
(IN GLOBAL-OBJECTS)
(FLAGS NDESCBIT TOUCHBIT)
(DESC "wall")
(SYNONYM WALL WALLS)
(ACTION WALLS-F)>
<ROUTINE WALLS-F ()
<COND (<AND <VERB? EXAMINE>
<EQUAL? ,HERE ,GUTS-ROOM>>
<PERFORM ,V?EXAMINE ,GROUND>
<RTRUE>)>>
<OBJECT CEILING
(IN GLOBAL-OBJECTS)
(FLAGS NDESCBIT TOUCHBIT)
(DESC "ceiling")
(SYNONYM CEILIN ROOF)
(ACTION CEILING-F)>
<ROUTINE CEILING-F ()
<COND (<VERB? LOOK-UNDER>
<PERFORM ,V?LOOK>
<RTRUE>)
(<AND <VERB? EXAMINE>
<EQUAL? ,HERE ,GUTS-ROOM>>
<PERFORM ,V?EXAMINE ,GROUND>
<RTRUE>)>>
<OBJECT WINDOW
(IN LOCAL-GLOBALS)
(DESC "window")
(SYNONYM WINDOW)
(FLAGS TRANSBIT)
(ACTION WINDOW-F)>
<ROUTINE WINDOW-F ()
<COND (<NOT ,LIT>
<TELL ,TOO-DARK CR>)
(<VERB? MUNG>
<PERFORM ,V?KILL ,WINDOW>
<RTRUE>)
(<EQUAL? ,HERE ,BEDROOM>
<COND (<VERB? LOOK-INSIDE EXAMINE>
<PERFORM ,V?OPEN ,CURTAINS>
<RTRUE>)
(<VERB? OPEN CLOSE>
<TELL
"The bloody thing's been jammed shut for months, now." CR>)>)
(<VERB? LOOK-INSIDE>
<TELL "You see the country lane." CR>)
(<VERB? OPEN CLOSE>
<TELL ,BUDGE CR>)>>
<OBJECT STAIRS
(IN LOCAL-GLOBALS)
(DESC "stairs")
(SYNONYM STAIR STAIRS STAIRW GANGWA)
(FLAGS NARTICLEBIT NDESCBIT)
(ACTION STAIRS-F)>
<ROUTINE STAIRS-F ()
<COND (<VERB? CLIMB-UP CLIMB-FOO>
<DO-WALK ,P?UP>)
(<VERB? CLIMB-DOWN>
<DO-WALK ,P?DOWN>)>>
<OBJECT AIR
(IN GLOBAL-OBJECTS)
(DESC "air")
(SYNONYM AIR)
(FLAGS VOWELBIT)>
<OBJECT SKY
(IN GLOBAL-OBJECTS)
(DESC "sky")
(SYNONYM SKY)
(ACTION SKY-F)>
<ROUTINE SKY-F ()
<COND (<NOT <FSET? ,HERE ,OUTSIDEBIT>>
<CANT-SEE ,SKY>)
(<AND <IN? ,FLEET ,HERE>
<VERB? EXAMINE>>
<TELL
"The sky is filled with the ships of the " D ,FLEET "." CR>)>>
<OBJECT STAR
(IN GLOBAL-OBJECTS)
(DESC "sun")
(SYNONYM STAR SUN SYSTEM SOL)
(ADJECTIVE APPROA STAR SOLAR SMALL UNREGA YELLOW ORANGE)
(FLAGS NDESCBIT)
(ACTION STAR-F)>
<ROUTINE STAR-F ()
<COND (<VERB? EXAMINE>
<COND (<EQUAL? ,HERE ,WAR-CHAMBER>
<TELL
"The approaching star is a small, unregarded yellow sun, with nine planets of
varying sizes. The " D ,THIRD-PLANET " catches your attention.">
<CRLF>)
(<EQUAL? ,HERE ,DAIS ,SPEEDBOAT>
<TELL "The sun is a smallish orange star." CR>)
(<EQUAL? ,HERE ,FRONT-OF-HOUSE ,COUNTRY-LANE ,BACK-OF-HOUSE>
<TELL "The sun is a smallish yellow star." CR>)
(T
<CANT-SEE ,STAR>)>)>>
<OBJECT HANDS
(IN GLOBAL-OBJECTS)
(SYNONYM HANDS HAND)
(ADJECTIVE BARE MY YOUR)
(DESC "your hand")
(FLAGS NDESCBIT TOUCHBIT NARTICLEBIT)
(ACTION HANDS-F)>
<ROUTINE HANDS-F (ACTOR)
<COND (<VERB? WAVE>
<SETG PRSO <>>
<PERFORM ,V?WAVE-AT>
<RTRUE>)
(<VERB? SHAKE>
<COND (<SET ACTOR <FIND-IN ,HERE ,ACTORBIT>>
<PERFORM ,V?THANK .ACTOR>
<RTRUE>)
(T
<TELL "Pleased to meet you." CR>)>)>>
<OBJECT TEETH
(IN GLOBAL-OBJECTS)
(DESC "your teeth")
(SYNONYM TEETH)
(ADJECTIVE YOUR MY)
(FLAGS NARTICLEBIT)>
<OBJECT HEAD
(IN GLOBAL-OBJECTS)
(DESC "your head")
(SYNONYM HEAD FACE)
(ADJECTIVE YOUR MY)
(FLAGS NARTICLEBIT)>
<OBJECT EYES
(IN GLOBAL-OBJECTS)
(DESC "your eyes")
(SYNONYM EYE EYES)
(ADJECTIVE YOUR MY)
(FLAGS NARTICLEBIT)
(ACTION EYES-F)>
<ROUTINE EYES-F ()
<COND (<VERB? OPEN>
<TELL "They are." CR>)
(<VERB? CLOSE>
<COND (<IN? ,BEAST ,HERE>
<TELL "The Beast doesn't notice." ,GETTING-CLOSE CR>)
(T
<TELL "That won't help." CR>)>)>>
<OBJECT EARS
(IN GLOBAL-OBJECTS)
(DESC "your ears")
(SYNONYM EAR EARS)
(ADJECTIVE YOUR MY)
(FLAGS NARTICLEBIT)>
<OBJECT PROTAGONIST
(SYNONYM PROTAG)
(DESC "it")
(FLAGS NDESCBIT INVISIBLE)
(ACTION PROTAGONIST-F)>
<ROUTINE PROTAGONIST-F ()
<COND (<AND <PRSO? ,NO-TEA>
,PRSI>
<NO-TEA-F>)>>
<OBJECT ME
(IN GLOBAL-OBJECTS)
(SYNONYM I ME MYSELF SELF)
(DESC "yourself")
(FLAGS ACTORBIT TOUCHBIT NARTICLEBIT)
(ACTION ME-F)>
<ROUTINE ME-F ("AUX" OLIT)
<COND (<VERB? TELL>
<TELL
"Talking to yourself is a sign of impending mental collapse." CR>
<FUCKING-CLEAR>)
(<VERB? LISTEN>
<TELL "Yes?" CR>)
(<VERB? ALARM>
<TELL ,YOU-ARE CR>)
(<AND <VERB? GIVE>
<PRSI? ,ME>>
<COND (<AND <IN? ,PRSO ,PROTAGONIST>
<NOT <PRSO? ,NO-TEA ,BABEL-FISH>>>
<PRE-TAKE>)
(T
<PERFORM ,V?TAKE ,PRSO>
<RTRUE>)>)
(<VERB? MOVE>
<V-WALK-AROUND>)
(<VERB? SEARCH>
<V-INVENTORY>
<RTRUE>)
(<OR <VERB? KILL MUNG>
<AND <VERB? SHOOT>
<PRSI? ,BLASTER>>>
<JIGS-UP "Done.">
<RTRUE>)
(<VERB? FIND>
<TELL "You're right here!" CR>)
(<VERB? WHO>
<TELL "You are " D ,IDENTITY-FLAG "." CR>)
(<AND <VERB? EXAMINE>
<EQUAL? ,HERE ,MAZE>>
<TELL
"You look perfectly normal (except that you're two microns tall)." CR>)
(<VERB? PULL-TOGETHER>
<TELL ,ZEN CR>)
(<VERB? FOLLOW>
<TELL
"I'd like to, but like most computers I don't have legs." CR>)>>
<OBJECT GLOBAL-ROOM
(IN GLOBAL-OBJECTS)
(DESC "room")
(SYNONYM ROOM CHAMBER PLACE HALL)
(ADJECTIVE AREA)
(ACTION GLOBAL-ROOM-F)>
<ROUTINE GLOBAL-ROOM-F ()
<COND (<VERB? LOOK EXAMINE LOOK-INSIDE>
<V-LOOK>
<RTRUE>)
(<VERB? THROUGH WALK-TO>
<V-WALK-AROUND>)
(<VERB? LEAVE EXIT>
<DO-WALK ,P?OUT>)
(<VERB? WALK-AROUND>
<COND (<EQUAL? ,HERE ,CAPTAINS-QUARTERS>
<V-STAND>)
(T
<TELL
"Walking around the room reveals nothing new. To move elsewhere, just type
the desired direction." CR>)>)
(<VERB? LAMP-ON>
<PERFORM ,V?LAMP-ON ,LIGHT>
<RTRUE>)>>
<OBJECT OBJECT-OF-GAME
(IN GLOBAL-OBJECTS)
(DESC "object of the game")
(SYNONYM OBJECT GAME GOAL)
(FLAGS VOWELBIT)
(ACTION OBJECT-OF-GAME-F)>
<ROUTINE OBJECT-OF-GAME-F ()
<COND (<VERB? WHAT>
<TELL "That's for me to know and you to find out." CR>)>>
<OBJECT CONTROLS
(IN LOCAL-GLOBALS)
(DESC "the controls")
(SYNONYM CONTRO PANEL CONSOL)
(ADJECTIVE CONTRO)
(FLAGS NARTICLEBIT)
(ACTION CONTROLS-F)>
<ROUTINE CONTROLS-F ()
<COND (<VERB? EXAMINE>
<COND (<EQUAL? ,HERE ,SPEEDBOAT>
<TELL
"The only control, other than those related to steering the boat, is the large
red " D ,AUTOPILOT-BUTTON ".">
<FINE-PRODUCT>
<CRLF>)
(<EQUAL? ,HERE ,BRIDGE>
<TELL
"Most of the controls are beyond your comprehension. ">
<COND (<IN? ,LARGE-RECEPTACLE ,HERE>
<TELL
"The simplest one is a " D ,LARGE-RECEPTACLE " of some kind.">
<COND (,DRIVE-TO-CONTROLS
<TELL " ">
<PERFORM ,V?EXAMINE ,LARGE-RECEPTACLE>
<RTRUE>)
(T
<CRLF>)>)
(T
<TELL
"A fused spot shows where a receptacle once was." CR>)>)>)>>
<OBJECT CONVERSATION
(IN LOCAL-GLOBALS)
(DESC "conversation")
(SYNONYM CONVER)
(FLAGS DARKBIT INVISIBLE)
(ACTION CONVERSATION-F)>
<ROUTINE CONVERSATION-F ()
<COND (<VERB? LISTEN>
<COND (<EQUAL? ,HERE ,FRONT-OF-HOUSE>
<TELL "You can't hear anything from here." CR>)
(T
<PERFORM ,V?LISTEN ,VLHURG>
<RTRUE>)>)>>
<OBJECT GUARDS
(IN LOCAL-GLOBALS) ;"just for the purpose of MOBY-FIND"
(DESC "one of the guards")
(SYNONYM ONE GUARD GUARDS)
(ADJECTIVE VOGON)
(FLAGS VOWELBIT NARTICLEBIT NDESCBIT ACTORBIT
CONTBIT SEARCHBIT OPENBIT)
(ACTION GUARDS-F)>
<ROUTINE GUARDS-F ()
<COND (<EQUAL? ,GUARDS ,WINNER>
<COND (<AND <VERB? TELL-ABOUT>
<PRSO? ,ME>>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?ASK-ABOUT ,GUARDS ,PRSI>
<SETG WINNER ,GUARDS>
<RTRUE>)
(<VERB? HELLO>
<SETG WINNER ,PROTAGONIST>
<PERFORM ,V?HELLO ,GUARDS>
<SETG WINNER ,GUARDS>
<RTRUE>)
(<EQUAL? ,HERE ,DAIS>
<COND (<OR <AND <IN? ,RIFLES ,GUARDS>
<VERB? SHOOT>
,DONT-FLAG>
<AND <IN? ,RIFLES ,GUARDS>
<VERB? DROP>
<PRSO? ,RIFLES>>>
<FCLEAR ,RIFLES ,NDESCBIT>
<ENABLE <QUEUE I-GUARDS 8>>
<MOVE ,RIFLES ,HERE>
<FSET ,RIFLES ,TAKEBIT>
<FSET ,RIFLES ,TRYTAKEBIT>
<TELL "The guards hesitate, then toss their "
D ,RIFLES "s into a pile in front of you." CR>)
(<VERB? SHOOT>
<COND (<IN? ,RIFLES ,GUARDS>
<JIGS-UP
"The air becomes thick with photon beams.">)
(T
<TELL
"Someone around here is being very stupid. Let's say it's the guards,
since they're only fictitious characters and therefore not potential
Infocom customers. The poor fictitious saps don't understand how they
can shoot without rifles." CR>)>)
(<AND <VERB? TAKE>
<PRSO? ,RIFLES>>
<COND (<IN? ,RIFLES ,GUARDS>
<TELL "\"We already have them!\"" CR>)
(T
<MOVE ,RIFLES ,GUARDS>
<ENABLE <QUEUE I-GUARDS 5>>
<TELL "They do so." CR>)>)
(<VERB? LEAVE>
<TELL
"\"We can't leave while you're in trouble, Mr. President!\"" CR>)
(T
<TELL
"You have failed to issue one of the small set of commands that the
guards' military intelligences are trained to understand." CR>
<FUCKING-CLEAR>)>)
(T
<COND (<HELD? ,BABEL-FISH ,PROTAGONIST>
<TELL "\"Resistance is useless!\"" CR>)
(T
<TELL "\"I">
<PRODUCE-GIBBERISH 1>
<CRLF>)>
<FUCKING-CLEAR>)>)
(<AND <EQUAL? ,HERE ,CAPTAINS-QUARTERS>
<VERB? TELL HELLO THANK>>
<PERFORM ,V?TELL ,VOGON-CAPTAIN>
<RTRUE>)
(<AND <EQUAL? ,HERE ,CAPTAINS-QUARTERS>
<AND <VERB? ASK-ABOUT ASK-FOR>
<EQUAL? ,GUARDS ,PRSO>>>
<PERFORM ,V?TELL ,VOGON-CAPTAIN>
<RTRUE>)
(<AND <VERB? EXAMINE>
<IN? ,RIFLES ,GUARDS>>
<TELL "They're holding " D ,RIFLES "s." CR>)
(<AND <EQUAL? ,HERE ,DAIS>
<VERB? SHOOT>>
<COND (<BLASTER-HOLD>
<RTRUE>)>
<TELL ,GUARDS-REALIZE>
<JIGS-UP
"Although you incinerate many, other guards arrive and incinerate you.">
<RTRUE>)
(<AND <VERB? GIVE>
<PRSO? ,BLASTER>>
<TELL "The guards are more than glad to disarm you. They">
<GUARD-DEATH>
<RTRUE>)
(<VERB? COUNT>
<COND (<EQUAL? ,HERE ,HOLD>
<TELL "One." CR>)
(<EQUAL? ,HERE ,CAPTAINS-QUARTERS>
<TELL "Several." CR>)
(T
<TELL "Many." CR>)>)>>
<ROUTINE WEAPON-PSEUDO ()
<COND (<NOT <IN? ,GUARDS ,HERE>>
<TELL "What weapon?" CR>)
(<VERB? SHOOT>
<TELL ,NOT-HOLDING " it." CR>)>>
<OBJECT FRUSTATION
(IN GLOBAL-OBJECTS)
(DESC "problem")
(SYNONYM FRUSTR PROBLE PUZZLE)
(ACTION FRUSTRATION-F)>
<ROUTINE FRUSTRATION-F ()
<COND (<VERB? ENJOY>
<TELL ,ZEN CR>)>>
<ROUTINE UNIMPORTANT-THING-F ()
<COND (<AND <VERB? ASK-ABOUT>
<PRSO? ,GUIDE>>
<RFALSE>)
(T
<TELL "That's not important; leave it alone." CR>)>>
;"DONT stuff"
<ROUTINE DONT-F ()
<COND (<VERB? PANIC>
<COND (<PROB 50>
<TELL
"Very clever. It looks like there's a lot you should be panicking about." CR>)
(T
<TELL
"Why not? Your position appears quite hopeless." CR>)>)
(<VERB? LOOK>
<SETG DONT-FLAG <>>
<PERFORM ,V?CLOSE ,EYES>
<RTRUE>)
(<VERB? WAIT>
<TELL "Time doesn't pass..." CR>)
(<VERB? TAKE>
<TELL "Not taken." CR>)
(<AND <VERB? LISTEN>
<VISIBLE? ,POETRY>>
<SETG DONT-FLAG <>>
<PERFORM ,V?LISTEN ,POETRY>
<RTRUE>)
(T
<TELL "Not done." CR>)>>
;"DARK stuff"
<GLOBAL VOGON-PROB 100>
<GLOBAL HEART-PROB 0>
<GLOBAL TRAAL-PROB 60>
<GLOBAL FLEET-PROB 0>
<GLOBAL WHALE-PROB 0>
<GLOBAL TRILLIAN-PROB 15>
<GLOBAL ZAPHOD-PROB 0>
<GLOBAL FORD-PROB 15>
<GLOBAL DREAMING <>>
<GLOBAL DARK-COUNTER 0>
<GLOBAL DARK-FLAG <>>
<GLOBAL CURRENT-EXIT 0>
<GLOBAL GROGGY <>>
<GLOBAL LYING-COUNTER 0>
<GLOBAL GUTS-ROOM <>>
<ROOM DARK
(IN ROOMS)
(SYNONYM SUNGLA GLASSE JANTA)
(ADJECTIVE JOO JANTA PERIL SENSIT)
(DESC "Dark")
(FLAGS RLANDBIT ONBIT)
(ACTION DARK-F)>
<ROUTINE DARK-F (RARG)
<COND (<EQUAL? .RARG ,M-ENTER>
<PUTP ,PROTAGONIST ,P?ACTION ,DARK-FUNCTION>
<ROB ,PROTAGONIST ,DARK-OBJECT>
<FSET ,CONVERSATION ,INVISIBLE>
<SETG DREAMING <>>
<SETG LYING-DOWN <>>
<REPEAT ()
<COND (<PROB ,HEART-PROB>
<SETG HEART-PROB 0>
<SETG VOGON-PROB 10>
<SETG DARK-FLAG ,ENTRY-BAY>
<SETG CURRENT-EXIT 3>)
(<PROB ,VOGON-PROB>
<SETG VOGON-PROB 0>
<SETG HEART-PROB 100>
<SETG DARK-FLAG ,HOLD>
<SETG CURRENT-EXIT 0>)
(<PROB ,TRAAL-PROB>
<COND (<NOT <EQUAL? ,TRAAL-PROB 10>>
<SETG TRAAL-PROB 10>
<SETG TRILLIAN-PROB 25>
<SETG FORD-PROB 25>
<SETG ZAPHOD-PROB 25>)>
<SETG DARK-FLAG ,LAIR>
<SETG CURRENT-EXIT 4>)
(<PROB ,TRILLIAN-PROB>
<SETG TRILLIAN-PROB 10>
<SETG DARK-FLAG ,LIVING-ROOM>
<SETG CURRENT-EXIT 2>)
(<PROB ,FORD-PROB>
<SETG FORD-PROB 10>
<SETG DARK-FLAG ,COUNTRY-LANE>
<SETG CURRENT-EXIT 1>)
(<PROB ,ZAPHOD-PROB>
<SETG ZAPHOD-PROB 10>
<SETG DARK-FLAG ,SPEEDBOAT>
<SETG CURRENT-EXIT 5>)
(<PROB ,FLEET-PROB>
<SETG FLEET-PROB 10>
<SETG DARK-FLAG ,WAR-CHAMBER>
<SETG CURRENT-EXIT 7>)
(<PROB ,WHALE-PROB> ;"this should always be 0"
<TELL "Bug #60" CR>
<SETG DARK-FLAG ,INSIDE-WHALE>
<SETG CURRENT-EXIT 6>)>
<COND (,DARK-FLAG
<RETURN>)>>
<RFALSE>)
(<EQUAL? .RARG ,M-LOOK>
<RTRUE>)>>
<OBJECT DARK-OBJECT
(IN GLOBAL-OBJECTS) ;"gets moved to Dark when you turn on the light"
(DESC "darkness")
(SYNONYM DARK DARKNE NOTHIN)
(FLAGS NDESCBIT NARTICLEBIT)>
<OBJECT SHADOW
(IN LOCAL-GLOBALS)
(DESC "shadow")
(SYNONYM SHADOW)
(FLAGS NDESCBIT)>
<OBJECT LIQUID
(IN LOCAL-GLOBALS)
(DESC "liquid")
(SYNONYM LIQUID)
(ADJECTIVE HOT COLD WARM WET SQUISH)
(FLAGS NDESCBIT DRINKBIT)>
<OBJECT PAINFUL-LIGHT
(IN LOCAL-GLOBALS)
(DESC "light")
(SYNONYM LIGHT)
(ADJECTIVE PAINFU BRIGHT)
(FLAGS NDESCBIT)>
<OBJECT STAR-DRIVE
(IN LOCAL-GLOBALS)
(DESC "star drive")
(SYNONYM DRIVE HUM)
(ADJECTIVE STAR DEEP DISTANT)
(FLAGS NDESCBIT)>
<ROUTINE DARK-FUNCTION ()
<COND (<VERB? QUIT RESTART RESTORE SCORE VERSION SAVE AGAIN HELP
VERBOSE BRIEF SUPER-BRIEF SCRIPT UNSCRIPT FOOTNOTE>
<>)
(,DONT-FLAG
<>)
(<VERB? PANIC YELL>
<TELL
"You yell as loudly as you can, but no sound emerges." CR>)
(<OR <VERB? RELAX>
<AND <VERB? ENJOY>
<PRSO? ,DARK-OBJECT>>>
<TELL
"You achieve a state of Negative Capability, and are able to be in
uncertainties, mysteries, doubts, without any irritable searching
after fact and reason (Footnote 1)." CR>)
(<AND <EQUAL? ,DARK-FLAG ,ENTRY-BAY ,WAR-CHAMBER>
<VERB? LISTEN>
<PRSO? ,DARK-OBJECT>
<MISSING?>>
<MOVE ,STAR-DRIVE ,HERE>
<SETG P-IT-OBJECT ,STAR-DRIVE>
<TELL
"You hear the deep and distant hum of a " D ,STAR-DRIVE " coming from far ">
<COND (<EQUAL? ,DARK-FLAG ,ENTRY-BAY>
<TELL "above">)
(T
<TELL "below">)>
<TELL ". There is an exit to port." CR>)
(<AND <VERB? WALK>
<MISSING?>
<EQUAL? ,DARK-FLAG ,WAR-CHAMBER ,ENTRY-BAY>
<IN? ,STAR-DRIVE ,HERE>>
<COND (<PRSO? ,P?SOUTH>
<COND (<L? ,LYING-COUNTER 4>
<TELL ,LYING-ABOUT-EXIT>)>
<TELL "You emerge from a small doorway...">
<LEAVE-DARK>)
(T
<TELL ,CANT-GO>
<COND (<PRSO? ,P?WEST>
<SETG LYING-COUNTER <+ ,LYING-COUNTER 1>>
<COND (<EQUAL? ,LYING-COUNTER 4>
<TELL
" " ,LYING-ABOUT-EXIT "There is an exit aft...">)>)>
<CRLF>)>)
(<AND <OR <PRSO? ,STAR-DRIVE>
<PRSI? ,STAR-DRIVE>>
<NOT <VERB? WALK>>>
<COND (<NOT <EQUAL? ,DARK-FLAG ,ENTRY-BAY ,WAR-CHAMBER>>
<CANT-SEE ,STAR-DRIVE>)
(<VERB? LISTEN>
<TELL "The sound comes from far ">
<COND (<EQUAL? ,DARK-FLAG ,ENTRY-BAY>
<TELL "above">)
(T
<TELL "below">)>
<TELL "." CR>)
(T
<>)>)
(<AND <EQUAL? ,DARK-FLAG ,COUNTRY-LANE ,SPEEDBOAT>
<VERB? EXAMINE>
<PRSO? ,DARK-OBJECT>
<MISSING?>>
<MOVE ,PAINFUL-LIGHT ,HERE>
<SETG P-IT-OBJECT ,PAINFUL-LIGHT>
<TELL "You see a painfully bright light that stabs at the ">
<COND (<EQUAL? ,DARK-FLAG ,COUNTRY-LANE>
<TELL "front">)
(T
<TELL "back">)>
<TELL " of your eyes." CR>)
(<AND <OR <PRSO? ,PAINFUL-LIGHT>
<PRSI? ,PAINFUL-LIGHT>>
<NOT <VERB? WALK>>>
<COND (<NOT <EQUAL? ,DARK-FLAG ,SPEEDBOAT ,COUNTRY-LANE>>
<CANT-SEE ,PAINFUL-LIGHT>)
(<VERB? EXAMINE>
<TELL "The light resolves itself into the bright ">
<COND (<EQUAL? ,DARK-FLAG ,COUNTRY-LANE>
<TELL "yellow Sun of Earth">)
(T
<TELL "orange Sun of " D ,DAMOGRAN>)>
<TELL ".">
<LEAVE-DARK>)>)
(<AND <EQUAL? ,DARK-FLAG ,LIVING-ROOM ,INSIDE-WHALE>
<VERB? RUB>
<PRSO? ,DARK-OBJECT>
<MISSING?>>
<MOVE ,LIQUID ,HERE>
<SETG P-IT-OBJECT ,LIQUID>
<TELL "It does feel a bit ">
<COND (<EQUAL? ,DARK-FLAG ,LIVING-ROOM>
<TELL "cold">)
(T
<TELL "warm">)>
<TELL
" and wet and squishy. There seems to be some liquid at your fingertips." CR>)
(<AND <OR <PRSO? ,LIQUID>
<PRSI? ,LIQUID>>
<NOT <VERB? WALK>>>
<COND (<NOT <EQUAL? ,DARK-FLAG ,LIVING-ROOM ,INSIDE-WHALE>>
<CANT-SEE ,LIQUID>)
(<EQUAL? ,DARK-FLAG ,LIVING-ROOM>
<COND (<VERB? EXAMINE RUB>
<TELL "It seems coldish." CR>)
(<VERB? TASTE DRINK>
<TELL
"It tastes just like wine. In fact, you realise with growing embarrassment
that " D ,HANDS " is sitting in a " D ,WINE ".">
<LEAVE-DARK>)>)
(<EQUAL? ,DARK-FLAG ,INSIDE-WHALE>
<COND (<VERB? EXAMINE RUB>
<TELL "It seems warmish." CR>)
(<VERB? TASTE DRINK>
<TELL
"Yucchhh! You are jerked to your senses by the realisation that you are
licking the lining of a whale's stomach.">
<LEAVE-DARK>)>)>)
(<AND <EQUAL? ,DARK-FLAG ,HOLD ,LAIR>
<VERB? SMELL>
<PRSO? ,DARK-OBJECT>