-
Notifications
You must be signed in to change notification settings - Fork 21
/
globals.zil
732 lines (652 loc) · 16.7 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
"GLOBALS for
The Lurking Horror
(c) Copyright 1986 Infocom, Inc. All Rights Reserved."
"SOUND sound-id,[action],[volume]"
<ROUTINE SOUNDS (N "OPT" (OP ,S-START) (VOL 8))
<COND (<ZERO? .OP> <SET OP ,S-START>)>
<COND (<AND <L? <GET ,SOUND-FLAG 0> 0>
<EQUAL? .OP ,S-START>>
<PUT ,SOUND-FLAG 0 1>
<TELL CR
"[Use $SOUND to toggle sound usage on and off.]" CR CR>)>
<COND (<EQUAL? .N ,S-DRONE ,S-ATTACK ,S-PSYCHO ,S-MONSTR
,S-VOICE ,S-ZOMBIE ,S-CRETIN>
<PUT ,SOUND-FLAG 1 <+ <* .N 16> .VOL>>)>
<COND (<GET ,SOUND-FLAG 0>
<COND (<EQUAL? .OP ,S-STOP>
<PUT ,SOUND-FLAG 0 1>
<PUT ,SOUND-FLAG 1 0>)
(<EQUAL? .N ,S-DRONE ,S-ATTACK ,S-PSYCHO ,S-MONSTR
,S-VOICE ,S-ZOMBIE ,S-CRETIN>
<PUT ,SOUND-FLAG 0 <+ <* .N 16> .VOL>>
<PUT ,SOUND-FLAG 1 <+ <* .N 16> .VOL>>)
(ELSE
<PUT ,SOUND-FLAG 0 1>
<PUT ,SOUND-FLAG 1 0>)>
<COND (<EQUAL? .OP ,S-START>
<SOUND .N .OP .VOL>)
(ELSE
<SOUND .N .OP>)>)>>
<ROUTINE KILL-SOUNDS ()
<SOUNDS 0 ,S-STOP>
<SOUNDS 0 ,S-CLEANUP>>
<SYNTAX $SOUND = V-$SOUND>
<GLOBAL SOUND-FLAG <TABLE -1 0>>
<ROUTINE V-$SOUND ("AUX" X Y)
<SET X <GET ,SOUND-FLAG 1>>
<SET Y <GET ,SOUND-FLAG 0>>
<TELL "Sound ">
<COND (.Y
<KILL-SOUNDS>
<COND (<N==? .Y 1> <PUT ,SOUND-FLAG 1 .Y>)
(ELSE <PUT ,SOUND-FLAG 1 0>)>
<PUT ,SOUND-FLAG 0 0>
<TELL "off." CR>)
(ELSE
<PUT ,SOUND-FLAG 0 1>
<COND (.X
%<IFSOUND <SOUNDS </ .X 16>
,S-START
<MOD .X 16>>>)>
<TELL "on." CR>)>>
;"sound operations"
<CONSTANT S-INIT 1>
<CONSTANT S-START 2>
<CONSTANT S-STOP 3>
<CONSTANT S-CLEANUP 4>
;"sound ids (sounds marked with a * are looping sounds)"
<CONSTANT S-BEEP 1>
<CONSTANT S-BOOP 2>
<CONSTANT S-DRONE 10> ;"33K * drone of frob worshippers in dream"
<CONSTANT S-BLOOD 3> ;"50K axe hitting m.m."
<CONSTANT S-HATCH 6> ;"46K rusty hatch opening"
<CONSTANT S-ATTACK 4> ;"21K * rats attacking"
<CONSTANT S-ELCRSH 7> ;"60K elevator crashing"
<CONSTANT S-DIE 12> ;"44K screeching bird-like howl -- flier"
<CONSTANT S-PSYCHO 13> ;"57K * weird psychotic voice -- demon"
<CONSTANT S-MONSTR 18> ;"50K * sick pigs -- pit in altar area"
<CONSTANT S-VOICE 15> ;"52K * electronic one-two-three -- urchins"
<CONSTANT S-ZOMBIE 17> ;"39K * electronic frogs and grasshoppers -- frob"
<CONSTANT S-SPARKY 11> ;"40K electrical zap -- line in water"
<CONSTANT S-CRETIN 16> ;"25K * monster from the id -- frob frying"
<CONSTANT S-CRACK 8> ;" 8K crack of stone"
<CONSTANT S-GHIDRA 9> ;"58K frob flapping away"
;"sounds cut for reasons of space"
;<CONSTANT S-SQUEAL 5> ;"23K single rat"
;<CONSTANT S-STORMY 14> ;"54K * storm"
<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>
<SYNONYM NORTH N>
<SYNONYM SOUTH S>
<SYNONYM EAST E>
<SYNONYM WEST W>
<SYNONYM DOWN D>
<SYNONYM UP U>
<SYNONYM NE NORTHEAST>
<SYNONYM NW NORTHWEST>
<SYNONYM SE SOUTHEAST>
<SYNONYM SW SOUTHWEST>
<SYNONYM IN AHEAD>
<GLOBAL HERE <>>
<GLOBAL LIT <>>
<GLOBAL MOVES 0>
<GLOBAL SCORE 0>
;<GLOBAL DIR-TABLE
<PLTABLE 1 P?NORTH "north"
2 P?EAST "east"
4 P?WEST "west"
8 P?SOUTH "south"
16 P?NE "northeast"
32 P?NW "northwest"
64 P?SE "southeast"
128 P?SW "southwest">>
<CONSTANT DIR-BIT 1>
<CONSTANT DIR-DIR 2>
<CONSTANT DIR-NAME 3>
;<ROUTINE DIR-BASE (DIR I O "AUX" (L <GET ,DIR-TABLE 0>))
<DO (CNT 0 .L 3)
<COND (<EQUAL? <GET ,DIR-TABLE <+ .CNT .I>> .DIR>
<RETURN <GET ,DIR-TABLE <+ .CNT .O>>>)>>>
"global objects and associated routines"
<OBJECT GLOBAL-OBJECTS
(FLAGS AN
CONTBIT
DOORBIT
INVISIBLE
LOCKED
NDESCBIT
NOABIT
NOTHEBIT
ONBIT
OUTSIDE
OPENBIT
PERSON
POWERBIT
;RAIRBIT
READBIT
RLANDBIT
RMUNGBIT
;RWATERBIT
SEARCHBIT
SLIMEBIT
SURFACEBIT
TAKEBIT
THE
TOOLBIT
TOUCHBIT
TRANSBIT
TRYTAKEBIT
VEHBIT
WEAPONBIT
WEARBIT)>
<OBJECT LOCAL-GLOBALS
(IN GLOBAL-OBJECTS)
(SYNONYM ZZMGCK) ;"Yes, this needs to exist."
(DESCFCN 0)
(CONTFCN 0)
(GLOBAL GLOBAL-OBJECTS)
(FDESC "F")
(LDESC "F")
;(NAME 0)
;(PSEUDO "FOOBAR" V-WALK)
(THINGS 0)
(COUNT 0)
(SIZE 0)
(TEXT "")
(CAPACITY 0)>
<OBJECT ROOMS
(IN TO ROOMS)>
<GLOBAL P-DIRECTION <>>
<OBJECT INTDIR
(IN GLOBAL-OBJECTS)
(DESC "direction")>
<OBJECT INTNUM
(IN GLOBAL-OBJECTS)
(DESC "number")
(SYNONYM INTNUM)
(ADJECTIVE NUMBER)
(ACTION INTNUM-F)>
<ROUTINE INTNUM-F ()
<COND (<PRSO? ,INTNUM>
<COND (<HERE? ,CS-ELEVATOR-ROOM>
<REDIRECT ,INTNUM ,FLOOR-BUTTON>
<RTRUE>)
(<HERE? ,KITCHEN>
<PUT ,P-ADJW 0 ,W?INTNUM>
<REDIRECT ,INTNUM ,CONTROLS>
<RTRUE>)
(<VERB? PUSH>
<TELL S "There's no number ""to push here." CR>)>)>>
<OBJECT PSEUDO-OBJECT
(IN GLOBAL-OBJECTS)
(DESC "pseudo")
(ACTION RANDOM-PSEUDO)>
<OBJECT IT
(IN GLOBAL-OBJECTS)
(SYNONYM IT THEM OBJECT FROB)
(DESC "it")
(FLAGS AN NOABIT NOTHEBIT NDESCBIT TOUCHBIT)>
<OBJECT HIM
(IN GLOBAL-OBJECTS)
(SYNONYM HIM HER)
(DESC "him")
(FLAGS NOABIT NOTHEBIT NDESCBIT TOUCHBIT)>
<OBJECT NOT-HERE-OBJECT
(DESC "it")
(FLAGS NOABIT NOTHEBIT)
(ACTION NOT-HERE-OBJECT-F)>
"NOT-HERE-OBJECT-F returns false if it was successful in substituting
an object for the not-here-object. if it returns true, it failed for
some reason."
<ROUTINE NOT-HERE-OBJECT-F ("AUX" TBL (PRSO? T) (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>
<COND (<VERB? FOLLOW WAIT-FOR FIND
TELL WHAT WHERE WHO>
<SET X T>)>)
(T
<SET TBL ,P-PRSI>
<COND (<VERB? ASK-ABOUT ASK-FOR TELL-ABOUT>
<SET X T>)>
<SET PRSO? <>>)>
<COND (<AND .X <NOT <FIND-NOT-HERE .TBL .PRSO?>>>
<COND (<VERB? FOLLOW>
<TELL
"I'm afraid that's not possible." CR>
<RTRUE>)
(<VERB? WAIT-FOR>
<COND (<AND <PRSO? ,RATS>
<IN-TUNNEL? ,RATS>
<IN-TUNNEL?>>
<TELL "All in good time..." CR>
<RTRUE>)
(ELSE
<COND (<PLURAL? ,PRSO>
<TELL "They're">)
(ELSE
<TELL "He's">)>
<TELL " not expected any time soon." CR>
<RTRUE>)>)
(<AND <VERB? TELL>
<OR <NOT <EQUAL? <LOC ,PRSO>
,INF-1 ,INF-2 ,INF-3
,INF-4 ,INF-5>>
<NOT <HERE? ,INF-1 ,INF-2 ,INF-3
,INF-4 ,INF-5>>>>
;<CANT-SEE-ANY-HERE .PRSO?>
;<RTRUE>)
(ELSE
<RFALSE>)>)>
;"Here is the default 'cant see any' printer"
<CANT-SEE-ANY-HERE .PRSO?>>
<ROUTINE CANT-SEE-ANY-HERE (PRSO?)
<COND (<WINNER? ,PLAYER>
<TELL "You">)
(ELSE
<TELL CTHE ,WINNER>)>
<TELL " can't see any ">
<COND (,P-OFLAG
<COND (<PRINT-ADJT ,P-XADJNT>)>
<COND (,P-XNAM <PRINTB ,P-XNAM>)>)
(ELSE
<THING-PRINT .PRSO?>)>
<TELL " here." CR>
<END-QUOTE>>
<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>>
%<DEBUG-CODE
<COND (,ZDEBUG
<TELL "[Found " N .M-F " obj]" CR>)>>
<COND (<EQUAL? 1 .M-F>
%<DEBUG-CODE
<COND (,ZDEBUG
<TELL "[Namely: " D ,P-MOBY-FOUND "]" CR>)>>
<COND (.PRSO?
<SETG PRSO ,P-MOBY-FOUND>)
(T
<SETG PRSI ,P-MOBY-FOUND>)>
<RFALSE>)
(T
,NOT-HERE-OBJECT)>>
<OBJECT LIGHT
(IN GLOBAL-OBJECTS)
(DESC "light")
(SYNONYM LIGHT LIGHTS)
(ACTION LIGHT-F)>
<ROUTINE LIGHT-F ()
<COND (<VERB? LAMP-ON>
<COND (,LIT
<TELL ,IT-IS-ALREADY "light" ,PERIOD>)
(T
<TELL
"You need a light source!" CR>)>)
(<VERB? LAMP-OFF>
<TELL ,WASTE-OF-TIME>)>>
<OBJECT GLOBAL-HOLE
(IN LOCAL-GLOBALS)
(FLAGS NDESCBIT TOUCHBIT)
(DESC "hole")
(SYNONYM HOLE)
(ADJECTIVE MUDDY)
(ACTION GLOBAL-HOLE-F)>
<ROUTINE GLOBAL-HOLE-F ()
<COND (<P? DIG GLOBAL-HOLE *>
<PERFORM ,V?DIG ,PRSI>
<RTRUE>)
(<VERB? REACH-IN>
<TELL ,YOU-FIND-NOTHING " of interest." CR>)>>
<OBJECT CEILING
(IN GLOBAL-OBJECTS)
(FLAGS NDESCBIT TOUCHBIT)
(DESC "ceiling")
(SYNONYM CEILIN ROOF)
(ACTION CEILING-F)>
<ROUTINE CEILING-F ()
<COND (<VERB? LOOK-UNDER>
<NEW-VERB ,V?LOOK>
<RTRUE>)>>
<OBJECT AIR
(IN GLOBAL-OBJECTS)
(DESC "air")
(SYNONYM AIR COLD)
(FLAGS AN NOABIT)>
<OBJECT FEET
(IN GLOBAL-OBJECTS)
(SYNONYM FEET FOOT)
(DESC "your feet")
(FLAGS NDESCBIT TOOLBIT TOUCHBIT NOABIT NOTHEBIT)>
<OBJECT HANDS
(IN GLOBAL-OBJECTS)
(SYNONYM HANDS HAND)
(ADJECTIVE BARE MY)
(DESC "your hand")
(FLAGS NDESCBIT TOOLBIT TOUCHBIT NOABIT NOTHEBIT)
(GENERIC GENERIC-HAND-F)>
<ROUTINE GENERIC-HAND-F ()
,HAND>
<OBJECT HEAD
(IN GLOBAL-OBJECTS)
(DESC "your head")
(SYNONYM HEAD FACE)
(ADJECTIVE YOUR MY)
(FLAGS NOABIT NOTHEBIT)>
<OBJECT EYES
(IN GLOBAL-OBJECTS)
(DESC "your eyes")
(SYNONYM EYE EYES)
(ADJECTIVE YOUR MY)
(FLAGS NOABIT NOTHEBIT)
(ACTION EYES-F)>
<ROUTINE EYES-F ()
<COND (<VERB? OPEN>
<TELL "They are." CR>)
(<VERB? CLOSE>
<TELL "That won't help." CR>)
(<NOT ,LIT>
<TELL ,TOO-DARK>)>>
<OBJECT PLAYER
(IN TERMINAL-ROOM)
(SYNONYM PROTAG)
(DESC "it")
(FLAGS NDESCBIT INVISIBLE PERSON CONTBIT TRANSBIT)
(ACTION PLAYER-F)>
<ROUTINE PLAYER-F ("AUX" DOOR)
<COND (,ON-CABLE?
<COND (<OR <P? DROP ROOMS>
<VERB? DISEMBARK TAKE TAKE-OFF>
<HOSTILE-VERB?>
<AND <VERB? WALK>
<EQUAL? ,P-WALK-DIR ,P?DOWN>>>
<SETG ON-CABLE? <>>
<TELL "You let go of the cable and drop to the floor">
<COND (,RATS-HERE
<COND (<L? ,RATS-HERE 2>
<SETG RATS-HERE 2>)>
<TELL
" among the now-frenzied rats">)>
<TELL ,PERIOD>)>)
(,HOLDING-DOORS?
<SET DOOR <THIS-FLOOR-DOOR>>
<COND (<AND <NOT <PRSO? ,ELEVATOR-DOOR .DOOR>>
<NOT <PRSI? ,ELEVATOR-DOOR .DOOR>>
<NOT <GAME-VERB?>>
<NOT <PASSIVE-VERB?>>>
<TELL ,HOLDING-IS-ALL CR>)>)
(ELSE <RFALSE>)>>
<OBJECT ME
(IN GLOBAL-OBJECTS)
(SYNONYM ME MYSELF SELF)
(DESC "yourself")
(FLAGS PERSON TOUCHBIT NOABIT NOTHEBIT)
(ACTION ME-F)>
<ROUTINE MENTAL-COLLAPSE ()
<TELL
"Talking to yourself is a sign of impending mental collapse." CR>>
<ROUTINE ME-F ("AUX" OLIT)
<COND (<P? EXAMINE ,ME>
<V-DIAGNOSE>)
(<VERB? TELL HELP>
<MENTAL-COLLAPSE>
<END-QUOTE>)
(<VERB? LISTEN>
<TELL "Yes?" CR>)
(<VERB? WAKE>
<TELL ,YOU-ARE>
<TELL ,PERIOD>)
(<AND <WINNER? ,PLAYER>
<VERB? GIVE>>
<COND (<PRSO? ,ME>
<TELL ,WASTE-OF-TIME>)
(<PRSI? ,ME>
<COND (<IN? ,PRSO ,PLAYER>
<PRE-TAKE>)
(T
<PERFORM ,V?TAKE ,PRSO>
<RTRUE>)>)>)
(<VERB? MOVE>
<V-WALK-AROUND>)
(<VERB? SEARCH>
<V-INVENTORY>
<RTRUE>)
(<VERB? KILL MUNG BURY SMELL>
<JIGS-UP
"Verdict: suicide while the balance of the mind was disturbed.">
<RTRUE>)
(<VERB? WHO>
<V-WHAT>)
(<VERB? FOLLOW>
<TELL
"You're getting ahead of yourself." CR>)
(<VERB? LOOK-BEHIND>
<TELL
"You look back over your shoulder. ">
<COND (<PROB 80>
<TELL
S "There's nothing ""there." CR>)
(<PROB 80>
<TELL
"Was that a flicker of movement in the distance?" CR>)
(ELSE
<TELL
"You see something duck back into the shadows." CR>)>)>>
<OBJECT GLOBAL-ROOM
(IN GLOBAL-OBJECTS)
(DESC "room")
(SYNONYM ROOM CHAMBER PLACE BASEMENT)
(ADJECTIVE AREA)
(ACTION GLOBAL-ROOM-F)>
<ROUTINE GLOBAL-ROOM-F ()
<COND (<VERB? LOOK EXAMINE LOOK-INSIDE>
<V-LOOK>
<RTRUE>)
(<P? PUT * ,GLOBAL-ROOM>
<PERFORM ,V?DROP ,PRSO>
<RTRUE>)
(<VERB? THROUGH WALK-TO>
<V-WALK-AROUND>)
(<VERB? DROP LEAVE EXIT>
<DO-WALK ,P?OUT>)
(<VERB? WALK-AROUND>
<TELL
"Walking around the room reveals nothing new. To move elsewhere, just type
the desired direction." CR>)
(<VERB? LAMP-ON>
<NEW-PRSO ,LIGHT>
<RTRUE>)>>
<SETG C-NORTH 1>
<SETG C-EAST 2>
<SETG C-WEST 4>
<SETG C-SOUTH 8>
<SETG C-NE 16>
<SETG C-NW 32>
<SETG C-SE 64>
<SETG C-SW 128>
<CONSTANT C-NORTH 1>
<CONSTANT C-EAST 2>
<CONSTANT C-WEST 4>
<CONSTANT C-SOUTH 8>
<CONSTANT C-NE 16>
<CONSTANT C-NW 32>
<CONSTANT C-SE 64>
<CONSTANT C-SW 128>
<OBJECT NORTH-WALL
(IN GLOBAL-OBJECTS)
(DESC "north wall")
(SYNONYM WALL)
(ADJECTIVE NORTH)
(GENERIC GENERIC-WALL-F)
(ACTION WALL-F)>
<OBJECT EAST-WALL
(IN GLOBAL-OBJECTS)
(DESC "east wall")
(SYNONYM WALL)
(ADJECTIVE EAST)
(FLAGS AN)
(GENERIC GENERIC-WALL-F)
(ACTION WALL-F)>
<OBJECT WEST-WALL
(IN GLOBAL-OBJECTS)
(DESC "west wall")
(SYNONYM WALL)
(ADJECTIVE WEST)
(GENERIC GENERIC-WALL-F)
(ACTION WALL-F)>
<OBJECT SOUTH-WALL
(IN GLOBAL-OBJECTS)
(DESC "south wall")
(SYNONYM WALL)
(ADJECTIVE SOUTH)
(GENERIC GENERIC-WALL-F)
(ACTION WALL-F)>
<OBJECT WALL
(IN GLOBAL-OBJECTS)
(DESC "wall")
(SYNONYM WALL WALLS)
(GENERIC GENERIC-WALL-F)
(ACTION WALL-F)>
<ROUTINE GENERIC-WALL-F ()
,WALL>
<ROUTINE WALL-F ()
<COND (<VERB? EXAMINE>
<TELL ,IT-LOOKS-LIKE "a wall." CR>)
(<VERB? LOWER MUNG>
<TELL ,YOU-CANT "pull down a wall that easily." CR>)>>
<OBJECT DIRT
(IN GLOBAL-OBJECTS)
(DESC "dirt")
(SYNONYM RUBBLE DEBRIS DUST DIRT)
(FLAGS NOABIT)>
<OBJECT GROUND
(IN GLOBAL-OBJECTS)
(SYNONYM FLOOR GROUND FIELD)
(ADJECTIVE STONE SANDY TINY LEVEL)
(DESC "floor")
;(FLAGS NOABIT)
(ACTION GROUND-F)>
<ROUTINE GROUND-F ()
<COND (<VERB? EXAMINE>
<COND ;(<FSET? ,HERE ,RAIRBIT>
<TELL
"It's a long way down." CR>)
(ELSE
<TELL
"It's still there." CR>)>)
(<P? PUT * ,GROUND>
<PERFORM ,V?BURY ,PRSO>
<RTRUE>)
(<VERB? CLIMB-UP CLIMB-ON CLIMB-FOO BOARD>
<TELL ,WASTE-OF-TIME>)
(<VERB? LOOK-UNDER>
<TELL
"You never did master X-rays. Freshman physics was such a drag." CR>)>>
<OBJECT CORRIDOR
(IN GLOBAL-OBJECTS)
(DESC "passage")
(SYNONYM PASSAGE CORRIDOR EXIT TUNNEL)
(ADJECTIVE LONG DARK STEAM)
(ACTION CORRIDOR-F)>
<ROUTINE CORRIDOR-F ()
<COND (<VERB? THROUGH WALK-TO>
<V-WALK-AROUND>)
(<AND <VERB? FOLLOW CLIMB-DOWN>
<HERE? ,YUGGOTH ,BOWL-ROOM ,PLATFORM-ROOM>>
<DO-WALK ,P?DOWN>)
(<VERB? CLIMB-DOWN>
<COND (<HERE? ,DEAD-STORAGE>
<DO-WALK ,P?EAST>)>)>>
;<OBJECT LOCAL-WATER
(SYNONYM WATER)
(ADJECTIVE FRESH SALT SEA)
(DESC "water")
(FLAGS NOABIT)
(ACTION WATER-F)>
;<OBJECT WATER
(IN LOCAL-GLOBALS)
(SYNONYM WATER)
(DESC "water")
(FLAGS NDESCBIT NOABIT)
(ACTION WATER-F)>
;<ROUTINE WATER-F ()
<COND (<P? (POUR THROW) ,LOCAL-WATER>
<COND (<AND <LOC ,PRSO>
<IN? <LOC ,PRSO> ,WINNER>>
<PERFORM ,V?POUR <LOC ,PRSO>>
<RTRUE>)
(ELSE
<DONT-HAVE-THAT>)>)
(<VERB? EAT DRINK DRINK-FROM>
<COND (<PRSO? ,LOCAL-WATER>
<COND (<IN? <LOC ,PRSO> ,WINNER>
<COND (<FSET? <LOC ,PRSO> ,OPENBIT>
<REMOVE ,PRSO>)
(ELSE
<TELL-OPEN-CLOSED <LOC ,PRSO>>
<RTRUE>)>)
(<NOT <GLOBAL-IN? ,WATER ,HERE>>
<TELL ,YOU-DONT-HAVE THE <LOC ,PRSO> ,PERIOD>
<RTRUE>)>)>
<COND (<OR <AND <PRSO? ,LOCAL-WATER>
<FSET? ,PRSO ,RMUNGBIT>>
;<AND <PRSO? ,WATER>
<HERE? ;"ROOM WITH WATER">>>
<TELL
"It's bitter and you spit it out immediately.">)
(ELSE
<TELL
"That was refreshing, but you shouldn't drink untested water.">)>
<CRLF>)
(<VERB? REACH-IN RUB>
<TELL
"It's wet." CR>)
(<VERB? LOOK-INSIDE LOOK-UNDER>
<MAKE-OUT>)
;(<VERB? THROUGH LEAP>
<COND (<FSET? ,HERE ,RWATERBIT>
<TELL ,YOU-ARE ,PERIOD>)>)>>
<ROUTINE RANDOM-PSEUDO ()
<COND (<AND <EQUAL? ,P-PNAM ,W?SHAFT>
<VERB? EXAMINE LOOK-UP>>
<LIKE-A-SHAFT>)
(<AND <EQUAL? ,P-PNAM ,W?TRIANGLE>
<VERB? EXAMINE>>
<TELL
"It's \"Floppy Triangles,\" a work of modern sculpture." CR>)
(<VERB? EXAMINE LOOK-INSIDE LOOK-BEHIND>
<TELL S "You see nothing special about " "it." CR>)
(<VERB? TAKE>
<YOU-CANT-X-THAT "take">)>>
"sleep, hunger, etc."
;<GLOBAL LAST-SLEPT 40> ;"move when you last woke-up, for purposed of V-TIME"
<OBJECT GLOBAL-SLEEP
(IN GLOBAL-OBJECTS)
(DESC "sleep")
(SYNONYM SLEEP NAP)
(FLAGS NOABIT NOTHEBIT)
(ACTION GLOBAL-SLEEP-F)>
<ROUTINE GLOBAL-SLEEP-F ()
<COND (<VERB? WALK-TO TAKE>
<NEW-VERB ,V?SLEEP>
<RTRUE>)
(<VERB? FIND>
<TELL "Sleep anywhere." CR>)>>
<OBJECT NOISE
(IN GLOBAL-OBJECTS)
(DESC "noise")
(SYNONYM NOISE SOUND)>
<OBJECT SNOW
(IN GLOBAL-OBJECTS)
(DESC "snow")
(SYNONYM SNOW SNOWSTORM BLIZZARD)
(ACTION SNOW-F)>
<ROUTINE SNOW-F ()
<COND (<VERB? EXAMINE>
<COND (<FSET? ,HERE ,OUTSIDE>
<TELL "It's still coming down." CR>)
(ELSE <TELL "You are inside." CR>)>)>>