]> github.com/historicalsource and other repositories - zork1.git/blob - 1actions.zil
Update README.md
[zork1.git] / 1actions.zil
1 "1ACTIONS for
2                 Zork I: The Great Underground Empire
3         (c) Copyright 1983 Infocom, Inc. All Rights Reserved."
4
5 "SUBTITLE THE WHITE HOUSE"
6
7 <ROUTINE WEST-HOUSE (RARG)
8          <COND (<EQUAL? .RARG ,M-LOOK>
9                 <TELL
10 "You are standing in an open field west of a white house, with a boarded
11 front door.">
12                 <COND (,WON-FLAG
13                        <TELL
14 " A secret path leads southwest into the forest.">)>
15                 <CRLF>)>>
16
17 <ROUTINE EAST-HOUSE (RARG)
18          <COND (<EQUAL? .RARG ,M-LOOK>
19                 <TELL
20 "You are behind the white house. A path leads into the forest
21 to the east. In one corner of the house there is a small window
22 which is ">
23                 <COND (<FSET? ,KITCHEN-WINDOW ,OPENBIT>
24                        <TELL "open.">)
25                       (T <TELL "slightly ajar.">)>
26                 <CRLF>)>>
27
28 <ROUTINE OPEN-CLOSE (OBJ STROPN STRCLS)
29          <COND (<VERB? OPEN>
30                 <COND (<FSET? .OBJ ,OPENBIT>
31                        <TELL <PICK-ONE ,DUMMY>>)
32                       (T
33                        <TELL .STROPN>
34                        <FSET .OBJ ,OPENBIT>)>
35                 <CRLF>)
36                (<VERB? CLOSE>
37                 <COND (<FSET? .OBJ ,OPENBIT>
38                        <TELL .STRCLS>
39                        <FCLEAR .OBJ ,OPENBIT>
40                        T)
41                       (T <TELL <PICK-ONE ,DUMMY>>)>
42                 <CRLF>)>>
43
44 <ROUTINE BOARD-F ()
45          <COND (<VERB? TAKE EXAMINE>
46                 <TELL "The boards are securely fastened." CR>)>>
47
48 <ROUTINE TEETH-F ()
49          <COND (<AND <VERB? BRUSH>
50                      <EQUAL? ,PRSO ,TEETH>>
51                 <COND (<AND <EQUAL? ,PRSI ,PUTTY>
52                             <IN? ,PRSI ,WINNER>>
53                        <JIGS-UP
54 "Well, you seem to have been brushing your teeth with some sort of
55 glue. As a result, your mouth gets glued together (with your nose)
56 and you die of respiratory failure.">)
57                       (<NOT ,PRSI>
58                        <TELL
59 "Dental hygiene is highly recommended, but I'm not sure what you want
60 to brush them with." CR>)
61                       (T
62                        <TELL "A nice idea, but with a " D ,PRSI "?" CR>)>)>>
63
64 <ROUTINE GRANITE-WALL-F ()
65          <COND (<EQUAL? ,HERE ,NORTH-TEMPLE>
66                 <COND (<VERB? FIND>
67                        <TELL "The west wall is solid granite here." CR>)
68                       (<VERB? TAKE RAISE LOWER>
69                        <TELL "It's solid granite." CR>)>)
70                (<EQUAL? ,HERE ,TREASURE-ROOM>
71                 <COND (<VERB? FIND>
72                        <TELL "The east wall is solid granite here." CR>)
73                       (<VERB? TAKE RAISE LOWER>
74                        <TELL "It's solid granite." CR>)>)
75                (<EQUAL? ,HERE ,SLIDE-ROOM>
76                 <COND (<VERB? FIND READ>
77                        <TELL "It only SAYS \"Granite Wall\"." CR>)
78                       (T <TELL "The wall isn't granite." CR>)>)
79                (T
80                 <TELL "There is no granite wall here." CR>)>>
81
82 <ROUTINE SONGBIRD-F ()
83          <COND (<VERB? FIND TAKE>
84                 <TELL "The songbird is not here but is probably nearby." CR>)
85                (<VERB? LISTEN>
86                 <TELL "You can't hear the songbird now." CR>)
87                (<VERB? FOLLOW>
88                 <TELL "It can't be followed." CR>)
89                (T
90                 <TELL "You can't see any songbird here." CR>)>>
91
92 <ROUTINE WHITE-HOUSE-F ()
93     <COND (<EQUAL? ,HERE ,KITCHEN ,LIVING-ROOM ,ATTIC>
94            <COND (<VERB? FIND>
95                   <TELL "Why not find your brains?" CR>)
96                  (<VERB? WALK-AROUND>
97                   <GO-NEXT ,IN-HOUSE-AROUND>
98                   T)>)
99           (<NOT <OR <EQUAL? ,HERE ,EAST-OF-HOUSE ,WEST-OF-HOUSE>
100                     <EQUAL? ,HERE ,NORTH-OF-HOUSE ,SOUTH-OF-HOUSE>>>
101            <COND (<VERB? FIND>
102                   <COND (<EQUAL? ,HERE ,CLEARING>
103                          <TELL "It seems to be to the west." CR>)
104                         (T
105                          <TELL "It was here just a minute ago...." CR>)>)
106                  (T <TELL "You're not at the house." CR>)>)
107           (<VERB? FIND>
108            <TELL
109 "It's right here! Are you blind or something?" CR>)
110           (<VERB? WALK-AROUND>
111            <GO-NEXT ,HOUSE-AROUND>
112            T)
113           (<VERB? EXAMINE>
114            <TELL
115 "The house is a beautiful colonial house which is painted white.
116 It is clear that the owners must have been extremely wealthy." CR>)
117           (<VERB? THROUGH OPEN>
118            <COND (<EQUAL? ,HERE ,EAST-OF-HOUSE>
119                   <COND (<FSET? ,KITCHEN-WINDOW ,OPENBIT>
120                          <GOTO ,KITCHEN>)
121                         (T
122                          <TELL "The window is closed." CR>
123                          <THIS-IS-IT ,KITCHEN-WINDOW>)>)
124                  (T
125                   <TELL "I can't see how to get in from here." CR>)>)
126           (<VERB? BURN>
127            <TELL "You must be joking." CR>)>>
128
129 ;"0 -> no next, 1 -> success, 2 -> failed move"
130
131 <ROUTINE GO-NEXT (TBL "AUX" VAL)
132          <COND (<SET VAL <LKP ,HERE .TBL>>
133                 <COND (<NOT <GOTO .VAL>> 2)
134                       (T 1)>)>>
135
136 <ROUTINE FOREST-F ()
137          <COND (<VERB? WALK-AROUND>
138                 <COND (<OR <EQUAL? ,HERE
139                                ,WEST-OF-HOUSE ,NORTH-OF-HOUSE
140                                ,SOUTH-OF-HOUSE>
141                            <EQUAL? ,HERE ,EAST-OF-HOUSE>>
142                        <TELL "You aren't even in the forest." CR>)>
143                 <GO-NEXT ,FOREST-AROUND>)
144                (<VERB? DISEMBARK>
145                 <TELL "You will have to specify a direction." CR>)
146                (<VERB? FIND>
147                 <TELL "You cannot see the forest for the trees." CR>)
148                (<VERB? LISTEN>
149                 <TELL "The pines and the hemlocks seem to be murmuring."
150                       CR>)>>
151
152 <ROUTINE MOUNTAIN-RANGE-F ()
153          <COND (<VERB? CLIMB-UP CLIMB-DOWN CLIMB-FOO>
154                 <TELL "Don't you believe me? The mountains are impassable!"
155                       CR>)>>
156
157 <ROUTINE WATER-F ("AUX" AV W PI?)
158          <COND (<VERB? SGIVE> <RFALSE>)
159                (<VERB? THROUGH BOARD>
160                 <TELL <PICK-ONE ,SWIMYUKS> CR>
161                 <RTRUE>)
162                (<VERB? FILL>    ;"fill bottle with water =>"
163                 <SET W ,PRSI>      ;"put water in bottle"
164                 <SETG PRSA ,V?PUT>
165                 <SETG PRSI ,PRSO>
166                 <SETG PRSO .W>
167                 <SET PI? <>>)
168                (<OR <EQUAL? ,PRSO ,GLOBAL-WATER>
169                     <EQUAL? ,PRSO ,WATER>>
170                 <SET W ,PRSO>
171                 <SET PI? <>>)
172                (ELSE
173                 <SET W ,PRSI>
174                 <COND (.W <SET PI? T>)>)>
175          <COND (<EQUAL? .W ,GLOBAL-WATER>
176                 <SET W ,WATER>
177                 <COND (<VERB? TAKE PUT> <REMOVE-CAREFULLY .W>)>)>
178          <COND (.PI? <SETG PRSI .W>)
179                (T <SETG PRSO .W>)>
180          <SET AV <LOC ,WINNER>>
181          <COND (<NOT <FSET? .AV ,VEHBIT>> <SET AV <>>)>
182          <COND (<AND <VERB? TAKE PUT> <NOT .PI?>>
183                 <COND (<AND .AV
184                             <OR <EQUAL? .AV ,PRSI>
185                                 <AND <NOT ,PRSI>
186                                      <NOT <IN? .W .AV>>>>>
187                        <TELL "There is now a puddle in the bottom of the "
188                              D .AV "." CR>
189                        <REMOVE-CAREFULLY ,PRSO>
190                        <MOVE ,PRSO .AV>)
191                       (<AND ,PRSI <NOT <EQUAL? ,PRSI ,BOTTLE>>>
192                        <TELL "The water leaks out of the " D ,PRSI
193                              " and evaporates immediately." CR>
194                        <REMOVE-CAREFULLY .W>)
195                       (<IN? ,BOTTLE ,WINNER>
196                        <COND (<NOT <FSET? ,BOTTLE ,OPENBIT>>
197                               <TELL "The bottle is closed." CR>
198                               <THIS-IS-IT ,BOTTLE>)
199                              (<NOT <FIRST? ,BOTTLE>>
200                               <MOVE ,WATER ,BOTTLE>
201                               <TELL "The bottle is now full of water." CR>)
202                              (T
203                               <TELL "The water slips through your fingers." CR>
204                               <RTRUE>)>)
205                       (<AND <IN? ,PRSO ,BOTTLE>
206                             <VERB? TAKE>
207                             <NOT ,PRSI>>
208                        <TELL
209 "It's in the bottle. Perhaps you should take that instead." CR>)
210                       (T
211                        <TELL "The water slips through your fingers." CR>)>)
212                (.PI?
213                 <COND (<AND <VERB? PUT>
214                             <GLOBAL-IN? ,RIVER ,HERE>>
215                        <PERFORM ,V?PUT ,PRSO ,RIVER>)
216                       (ELSE
217                        <TELL "Nice try." CR>)>
218                 <RTRUE>)
219                (<VERB? DROP GIVE>
220                 <COND (<AND <VERB? DROP>
221                             <IN? ,WATER ,BOTTLE>
222                             <NOT <FSET? ,BOTTLE ,OPENBIT>>>
223                        <TELL "The bottle is closed." CR>
224                        <RTRUE>)>
225                 <REMOVE-CAREFULLY ,WATER>
226                 <COND (.AV
227                        <TELL "There is now a puddle in the bottom of the "
228                              D .AV "." CR>
229                        <MOVE ,WATER .AV>)
230                       (T
231                        <TELL
232 "The water spills to the floor and evaporates immediately." CR>
233                        <REMOVE-CAREFULLY ,WATER>)>)
234                (<VERB? THROW>
235                 <TELL
236 "The water splashes on the walls and evaporates immediately." CR>
237                 <REMOVE-CAREFULLY ,WATER>)>>
238
239 <GLOBAL KITCHEN-WINDOW-FLAG <>>
240
241 <ROUTINE KITCHEN-WINDOW-F ()
242          <COND (<VERB? OPEN CLOSE>
243                 <SETG KITCHEN-WINDOW-FLAG T>
244                 <OPEN-CLOSE ,KITCHEN-WINDOW
245 "With great effort, you open the window far enough to allow entry."
246 "The window closes (more easily than it opened).">)
247                (<AND <VERB? EXAMINE>
248                      <NOT ,KITCHEN-WINDOW-FLAG>>
249                 <TELL
250 "The window is slightly ajar, but not enough to allow entry." CR>)
251                (<VERB? WALK BOARD THROUGH>
252                 <COND (<EQUAL? ,HERE ,KITCHEN>
253                        <DO-WALK ,P?EAST>)
254                       (T
255                        <DO-WALK ,P?WEST>)>
256                 <RTRUE>)
257                (<VERB? LOOK-INSIDE>
258                 <TELL "You can see ">
259                 <COND (<EQUAL? ,HERE ,KITCHEN>
260                        <TELL "a clear area leading towards a forest." CR>)
261                       (T
262                        <TELL "what appears to be a kitchen." CR>)>)>>
263
264 <ROUTINE GHOSTS-F ()
265          <COND (<VERB? TELL>
266                 <TELL "The spirits jeer loudly and ignore you." CR>
267                 <SETG P-CONT <>>)
268                (<VERB? EXORCISE>
269                 <TELL "Only the ceremony itself has any effect." CR>)
270                (<AND <VERB? ATTACK MUNG> <EQUAL? ,PRSO ,GHOSTS>>
271                 <TELL "How can you attack a spirit with material objects?" CR>)
272                (T
273                 <TELL "You seem unable to interact with these spirits." CR>)>>
274
275 <GLOBAL CAGE-TOP T>
276
277 <ROUTINE BASKET-F ()
278          <COND (<VERB? RAISE>
279                 <COND (,CAGE-TOP
280                        <TELL <PICK-ONE ,DUMMY> CR>)
281                       (T
282                        <MOVE ,RAISED-BASKET ,SHAFT-ROOM>
283                        <MOVE ,LOWERED-BASKET ,LOWER-SHAFT>
284                        <SETG CAGE-TOP T>
285                        <THIS-IS-IT ,RAISED-BASKET>
286                        <TELL
287 "The basket is raised to the top of the shaft." CR>)>)
288                (<VERB? LOWER>
289                 <COND (<NOT ,CAGE-TOP>
290                        <TELL <PICK-ONE ,DUMMY> CR>)
291                       (T
292                        <MOVE ,RAISED-BASKET ,LOWER-SHAFT>
293                        <MOVE ,LOWERED-BASKET ,SHAFT-ROOM>
294                        <THIS-IS-IT ,LOWERED-BASKET>
295                        <TELL
296 "The basket is lowered to the bottom of the shaft." CR>
297                        <SETG CAGE-TOP <>>
298                        <COND (<AND ,LIT <NOT <SETG LIT <LIT? ,HERE>>>>
299                               <TELL "It is now pitch black." CR>)>
300                        T)>)
301                (<OR <EQUAL? ,PRSO ,LOWERED-BASKET>
302                     <EQUAL? ,PRSI ,LOWERED-BASKET>>
303                 <TELL "The basket is at the other end of the chain." CR>)
304                (<AND <VERB? TAKE>
305                      <EQUAL? ,PRSO ,RAISED-BASKET ,LOWERED-BASKET>>
306                 <TELL "The cage is securely fastened to the iron chain." CR>)>>
307
308 <ROUTINE BAT-F ()
309          <COND (<VERB? TELL>
310                 <FWEEP 6>
311                 <SETG P-CONT <>>)
312                (<VERB? TAKE ATTACK MUNG>
313                 <COND (<EQUAL? <LOC ,GARLIC> ,WINNER ,HERE>
314                        <TELL "You can't reach him; he's on the ceiling." CR>)
315                       (T <FLY-ME>)>)>>
316
317 <ROUTINE FLY-ME ()
318          <FWEEP 4>
319          <TELL
320 "The bat grabs you by the scruff of your neck and lifts you away...." CR CR>
321          <GOTO <PICK-ONE ,BAT-DROPS> <>>
322          <COND (<NOT <EQUAL? ,HERE ,ENTRANCE-TO-HADES>>
323                 <V-FIRST-LOOK>)>
324          T>
325
326 <ROUTINE FWEEP (N)
327          <REPEAT ()
328                  <COND (<L? <SET N <- .N 1>> 1> <RETURN>)
329                        (T <TELL "    Fweep!" CR>)>>
330          <CRLF>>
331
332 <GLOBAL BAT-DROPS
333       <LTABLE 0
334               MINE-1
335               MINE-2
336               MINE-3
337               MINE-4
338               LADDER-TOP
339               LADDER-BOTTOM
340               SQUEEKY-ROOM
341               MINE-ENTRANCE>>
342
343 <ROUTINE BELL-F ()
344          <COND (<VERB? RING>
345                 <COND (<AND <EQUAL? ,HERE ,LLD-ROOM>
346                             <NOT ,LLD-FLAG>>
347                        <RFALSE>)
348                       (T
349                        <TELL "Ding, dong." CR>)>)>>
350
351 <ROUTINE HOT-BELL-F ()
352          <COND (<VERB? TAKE>
353                 <TELL "The bell is very hot and cannot be taken." CR>)
354                (<OR <VERB? RUB> <AND <VERB? RING> ,PRSI>>
355                 <COND (<FSET? ,PRSI ,BURNBIT>
356                        <TELL "The " D ,PRSI " burns and is consumed." CR>
357                        <REMOVE-CAREFULLY ,PRSI>)
358                       (<EQUAL? ,PRSI ,HANDS>
359                        <TELL "The bell is too hot to touch." CR>)
360                       (T
361                        <TELL "The heat from the bell is too intense." CR>)>)
362                (<VERB? POUR-ON>
363                 <REMOVE-CAREFULLY ,PRSO>
364                 <TELL "The water cools the bell and is evaporated." CR>
365                 <QUEUE I-XBH 0>
366                 <I-XBH>)
367                (<VERB? RING>
368                 <TELL "The bell is too hot to reach." CR>)>>
369
370 <ROUTINE BOARDED-WINDOW-FCN ()
371          <COND (<VERB? OPEN>
372                 <TELL "The windows are boarded and can't be opened." CR>)
373                (<VERB? MUNG>
374                 <TELL "You can't break the windows open." CR>)>>
375
376 <ROUTINE NAILS-PSEUDO ()
377          <COND (<VERB? TAKE>
378                 <TELL
379 "The nails, deeply imbedded in the door, cannot be removed." CR>)>>
380
381 <ROUTINE CRACK-FCN ()
382          <COND (<VERB? THROUGH>
383                 <TELL "You can't fit through the crack." CR>)>>
384
385 <ROUTINE KITCHEN-FCN (RARG)
386         <COND (<EQUAL? .RARG ,M-LOOK>
387                <TELL
388 "You are in the kitchen of the white house. A table seems to
389 have been used recently for the preparation of food. A passage
390 leads to the west and a dark staircase can be seen leading
391 upward. A dark chimney leads down and to the east is a small
392 window which is ">
393                <COND (<FSET? ,KITCHEN-WINDOW ,OPENBIT>
394                       <TELL "open." CR>)
395                      (T
396                       <TELL "slightly ajar." CR>)>)
397               (<==? .RARG ,M-BEG>
398                <COND (<AND <VERB? CLIMB-UP> <EQUAL? ,PRSO ,STAIRS>>
399                       <DO-WALK ,P?UP>)
400                      (<AND <VERB? CLIMB-UP> <EQUAL? ,PRSO ,STAIRS>>
401                       <TELL "There are no stairs leading down." CR>)>)>>
402
403 <ROUTINE STONE-BARROW-FCN (RARG)
404          <COND (<AND <EQUAL? .RARG ,M-BEG>
405                      <OR <VERB? ENTER>
406                          <AND <VERB? WALK>
407                               <EQUAL? ,PRSO ,P?WEST ,P?IN>>
408                          <AND <VERB? THROUGH>
409                               <EQUAL? ,PRSO ,BARROW>>>>
410                 <TELL
411 "Inside the Barrow|
412 As you enter the barrow, the door closes inexorably behind you. Around
413 you it is dark, but ahead is an enormous cavern, brightly lit. Through
414 its center runs a wide stream. Spanning the stream is a small wooden
415 footbridge, and beyond a path leads into a dark tunnel. Above the
416 bridge, floating in the air, is a large sign. It reads:  All ye who
417 stand before this bridge have completed a great and perilous adventure
418 which has tested your wit and courage. You have mastered">
419                 <COND (<EQUAL? <BAND <GETB 0 1> 8> 0>
420                        <TELL "
421 the first part of the ZORK trilogy. Those who pass over this bridge must be
422 prepared to undertake an even greater adventure that will severely test your
423 skill and bravery!|
424 |
425 The ZORK trilogy continues with \"ZORK II: The Wizard of Frobozz\" and
426 is completed in \"ZORK III: The Dungeon Master.\"" CR>)
427                       (T
428                        <TELL "
429 ZORK: The Great Underground Empire.|" CR>)>
430                 <FINISH>)>>
431
432 <ROUTINE BARROW-DOOR-FCN ()
433          <COND (<VERB? OPEN CLOSE>
434                 <TELL "The door is too heavy." CR>)>>
435
436 <ROUTINE BARROW-FCN ()
437          <COND (<VERB? THROUGH>
438                 <DO-WALK ,P?WEST>)>>
439
440 \\f
441
442 <ROUTINE TROPHY-CASE-FCN ()
443     <COND (<AND <VERB? TAKE> <EQUAL? ,PRSO ,TROPHY-CASE>>
444            <TELL
445 "The trophy case is securely fastened to the wall." CR>)>>
446         
447 <GLOBAL RUG-MOVED <>>
448
449 <ROUTINE LIVING-ROOM-FCN (RARG "AUX" RUG? TC)
450         <COND (<EQUAL? .RARG ,M-LOOK>
451                <TELL
452 "You are in the living room. There is a doorway to the east">
453                <COND (,MAGIC-FLAG
454                       <TELL
455 ". To the
456 west is a cyclops-shaped opening in an old wooden door, above which is
457 some strange gothic lettering, ">)
458                      (T
459                       <TELL
460 ", a wooden
461 door with strange gothic lettering to the west, which appears to be
462 nailed shut, ">)>
463                <TELL "a trophy case, ">
464                <SET RUG? ,RUG-MOVED>
465                <COND (<AND .RUG? <FSET? ,TRAP-DOOR ,OPENBIT>>
466                       <TELL
467                        "and a rug lying beside an open trap door.">)
468                      (.RUG?
469                       <TELL "and a closed trap door at your feet.">)
470                      (<FSET? ,TRAP-DOOR ,OPENBIT>
471                       <TELL "and an open trap door at your feet.">)
472                      (T
473                       <TELL
474                        "and a large oriental rug in the center of the room.">)>
475                <CRLF>
476                T)
477               (<EQUAL? .RARG ,M-END>
478                <COND (<OR <VERB? TAKE>
479                           <AND <VERB? PUT>
480                                <EQUAL? ,PRSI ,TROPHY-CASE>>>
481                       <COND (<IN? ,PRSO ,TROPHY-CASE>
482                              <TOUCH-ALL ,PRSO>)>
483                       <SETG SCORE <+ ,BASE-SCORE <OTVAL-FROB>>>
484                       <SCORE-UPD 0>
485                       <RFALSE>)>)>>
486
487 <ROUTINE TOUCH-ALL (OBJ "AUX" F)
488          <SET F <FIRST? .OBJ>>
489          <REPEAT ()
490                  <COND (<NOT .F> <RETURN>)
491                        (T
492                         <FSET .F ,TOUCHBIT>
493                         <COND (<FIRST? .F> <TOUCH-ALL .F>)>)>
494                  <SET F <NEXT? .F>>>>
495
496 <ROUTINE OTVAL-FROB ("OPTIONAL" (O ,TROPHY-CASE) "AUX" F (SCORE 0))
497          <SET F <FIRST? .O>>
498          <REPEAT ()
499                  <COND (<NOT .F> <RETURN .SCORE>)>
500                  <SET SCORE <+ .SCORE <GETP .F ,P?TVALUE>>>
501                  <COND (<FIRST? .F> <OTVAL-FROB .F>)>
502                  <SET F <NEXT? .F>>>>
503
504 <ROUTINE TRAP-DOOR-FCN ()
505     <COND (<VERB? RAISE>
506            <PERFORM ,V?OPEN ,TRAP-DOOR>
507            <RTRUE>)
508           (<AND <VERB? OPEN CLOSE>
509                 <EQUAL? ,HERE ,LIVING-ROOM>>
510            <OPEN-CLOSE ,PRSO
511 "The door reluctantly opens to reveal a rickety staircase descending into
512 darkness."
513 "The door swings shut and closes.">)
514           (<AND <VERB? LOOK-UNDER> <EQUAL? ,HERE LIVING-ROOM>>
515            <COND (<FSET? ,TRAP-DOOR ,OPENBIT>
516                   <TELL
517 "You see a rickety staircase descending into darkness." CR>)
518                  (T <TELL "It's closed." CR>)>)
519           (<EQUAL? ,HERE ,CELLAR>
520            <COND (<AND <VERB? OPEN UNLOCK>
521                        <NOT <FSET? ,TRAP-DOOR ,OPENBIT>>>
522                   <TELL
523 "The door is locked from above." CR>)
524                  (<AND <VERB? CLOSE> <NOT <FSET? ,TRAP-DOOR ,OPENBIT>>>
525                   <FCLEAR ,TRAP-DOOR ,TOUCHBIT>
526                   <FCLEAR ,TRAP-DOOR ,OPENBIT>
527                   <TELL "The door closes and locks." CR>)
528                  (<VERB? OPEN CLOSE>
529                   <TELL <PICK-ONE ,DUMMY> CR>)>)>>
530
531 <ROUTINE CELLAR-FCN (RARG)
532   <COND (<EQUAL? .RARG ,M-LOOK>
533          <TELL
534 "You are in a dark and damp cellar with a narrow passageway leading
535 north, and a crawlway to the south. On the west is the bottom of a
536 steep metal ramp which is unclimbable." CR>)
537         (<EQUAL? .RARG ,M-ENTER>
538          <COND (<AND <FSET? ,TRAP-DOOR ,OPENBIT>
539                      <NOT <FSET? ,TRAP-DOOR ,TOUCHBIT>>>
540                 <FCLEAR ,TRAP-DOOR ,OPENBIT>
541                 <FSET ,TRAP-DOOR ,TOUCHBIT>
542                 <TELL
543 "The trap door crashes shut, and you hear someone barring it." CR CR>)>)>>
544
545 <ROUTINE CHIMNEY-F ()
546          <COND (<VERB? EXAMINE>
547                 <TELL "The chimney leads ">
548                 <COND (<==? ,HERE ,KITCHEN>
549                        <TELL "down">)
550                       (T <TELL "up">)>
551                 <TELL "ward, and looks climbable." CR>)>>
552
553 <ROUTINE UP-CHIMNEY-FUNCTION ("AUX" F)
554   <COND (<NOT <SET F <FIRST? ,WINNER>>>
555          <TELL "Going up empty-handed is a bad idea." CR>
556          <RFALSE>)
557         (<AND <OR <NOT <SET F <NEXT? .F>>>
558                   <NOT <NEXT? .F>>>
559               <IN? ,LAMP ,WINNER>>
560          <COND (<NOT <FSET? ,TRAP-DOOR ,OPENBIT>>
561                 <FCLEAR ,TRAP-DOOR ,TOUCHBIT>)>
562          <RETURN ,KITCHEN>)
563         (T
564          <TELL "You can't get up there with what you're carrying." CR>
565          <RFALSE>)>>
566
567 <ROUTINE TRAP-DOOR-EXIT ()
568          <COND (,RUG-MOVED
569                 <COND (<FSET? ,TRAP-DOOR ,OPENBIT>
570                        <RETURN ,CELLAR>)
571                       (T
572                        <TELL "The trap door is closed." CR>
573                        <THIS-IS-IT ,TRAP-DOOR>
574                        <RFALSE>)>)
575                (T
576                 <TELL "You can't go that way." CR>
577                 <RFALSE>)>>
578
579 <ROUTINE RUG-FCN ()
580    <COND (<VERB? RAISE>
581           <TELL "The rug is too heavy to lift">
582           <COND (,RUG-MOVED
583                  <TELL "." CR>)
584                 (T
585                  <TELL
586 ", but in trying to take it you have
587 noticed an irregularity beneath it." CR>)>)
588          (<VERB? MOVE PUSH>
589           <COND (,RUG-MOVED
590                  <TELL
591 "Having moved the carpet previously, you find it impossible to move
592 it again." CR>)
593                 (T
594                  <TELL
595 "With a great effort, the rug is moved to one side of the room, revealing
596 the dusty cover of a closed trap door." CR>
597                  <FCLEAR ,TRAP-DOOR ,INVISIBLE>
598                  <THIS-IS-IT ,TRAP-DOOR>
599                  <SETG RUG-MOVED T>)>)
600          (<VERB? TAKE>
601           <TELL
602 "The rug is extremely heavy and cannot be carried." CR>)
603          (<AND <VERB? LOOK-UNDER>
604                <NOT ,RUG-MOVED>
605                <NOT <FSET? ,TRAP-DOOR ,OPENBIT>>>
606           <TELL
607 "Underneath the rug is a closed trap door. As you drop the corner of the
608 rug, the trap door is once again concealed from view." CR>)
609          (<VERB? CLIMB-ON>
610           <COND (<AND <NOT ,RUG-MOVED>
611                       <NOT <FSET? ,TRAP-DOOR ,OPENBIT>>>
612                  <TELL
613 "As you sit, you notice an irregularity underneath it. Rather than be
614 uncomfortable, you stand up again." CR>)
615                 (ELSE
616                  <TELL "I suppose you think it's a magic carpet?" CR>)>)>>
617
618 \\f
619
620 "SUBTITLE TROLL"
621
622 <ROUTINE AXE-F ()
623          <COND (,TROLL-FLAG <>)
624                (T <WEAPON-FUNCTION ,AXE ,TROLL>)>>
625
626 <ROUTINE STILETTO-FUNCTION ()
627          <WEAPON-FUNCTION ,STILETTO ,THIEF>>
628
629 <ROUTINE WEAPON-FUNCTION (W V)
630         <COND (<NOT <IN? .V ,HERE>> <RFALSE>)
631               (<VERB? TAKE>
632                <COND (<IN? .W .V>
633                       <TELL
634 "The " D .V " swings it out of your reach." CR>)
635                      (T
636                       <TELL
637 "The " D .W " seems white-hot. You can't hold on to it." CR>)>
638                T)>>
639
640 <ROUTINE TROLL-FCN ("OPTIONAL" (MODE <>))
641          <COND (<VERB? TELL>
642                 <SETG P-CONT <>>
643                 <TELL "The troll isn't much of a conversationalist." CR>)
644                (<EQUAL? .MODE ,F-BUSY?>
645                 <COND (<IN? ,AXE ,TROLL> <>)
646                       (<AND <IN? ,AXE ,HERE> <PROB 75 90>>
647                        <FSET ,AXE ,NDESCBIT>
648                        <FCLEAR ,AXE ,WEAPONBIT>
649                        <MOVE ,AXE ,TROLL>
650                        <PUTP ,TROLL ,P?LDESC
651 "A nasty-looking troll, brandishing a bloody axe, blocks all passages out
652 of the room.">
653                        <AND <IN? ,TROLL ,HERE>
654                             <TELL
655 "The troll, angered and humiliated, recovers his weapon. He appears to have
656 an axe to grind with you." CR>>
657                       T)
658                      (<IN? ,TROLL ,HERE>
659                       <PUTP ,TROLL ,P?LDESC
660 "A pathetically babbling troll is here.">
661                       <TELL
662 "The troll, disarmed, cowers in terror, pleading for his life in
663 the guttural tongue of the trolls." CR>
664                       T)>)
665               (<EQUAL? .MODE ,F-DEAD>
666                <COND (<IN? ,AXE ,TROLL>
667                       <MOVE ,AXE ,HERE>
668                       <FCLEAR ,AXE ,NDESCBIT>
669                       <FSET ,AXE ,WEAPONBIT>)>
670                <SETG TROLL-FLAG T>)
671               (<EQUAL? .MODE ,F-UNCONSCIOUS>
672                <FCLEAR ,TROLL ,FIGHTBIT>
673                <COND (<IN? ,AXE ,TROLL>
674                       <MOVE ,AXE ,HERE>
675                       <FCLEAR ,AXE ,NDESCBIT>
676                       <FSET ,AXE ,WEAPONBIT>)>
677                <PUTP ,TROLL ,P?LDESC
678 "An unconscious troll is sprawled on the floor. All passages
679 out of the room are open.">
680                <SETG TROLL-FLAG T>)
681               (<EQUAL? .MODE ,F-CONSCIOUS>
682                <COND (<IN? ,TROLL ,HERE>
683                       <FSET ,TROLL ,FIGHTBIT>
684                       <TELL
685 "The troll stirs, quickly resuming a fighting stance." CR>)>
686                <COND (<IN? ,AXE ,TROLL>
687                       <PUTP ,TROLL ,P?LDESC
688 "A nasty-looking troll, brandishing a bloody axe, blocks
689 all passages out of the room.">)
690                      (<IN? ,AXE ,TROLL-ROOM>
691                       <FSET ,AXE ,NDESCBIT>
692                       <FCLEAR ,AXE ,WEAPONBIT>
693                       <MOVE ,AXE ,TROLL>
694                       <PUTP ,TROLL ,P?LDESC
695 "A nasty-looking troll, brandishing a bloody axe, blocks
696 all passages out of the room.">)
697                      (T
698                       <PUTP ,TROLL ,P?LDESC
699 "A troll is here.">)>
700                <SETG TROLL-FLAG <>>)
701               (<EQUAL? .MODE ,F-FIRST?>
702                <COND (<PROB 33>
703                       <FSET ,TROLL ,FIGHTBIT>
704                       <SETG P-CONT <>>
705                       T)>)
706               (<NOT .MODE>
707                <COND (<VERB? EXAMINE>
708                       <TELL <GETP ,TROLL ,P?LDESC> CR>)
709                      (<OR <AND <VERB? THROW GIVE>
710                                ,PRSO
711                                <EQUAL? ,PRSI ,TROLL>>
712                           <VERB? TAKE MOVE MUNG>>
713                       <AWAKEN ,TROLL>
714                       <COND (<VERB? THROW GIVE>
715                              <COND (<AND <EQUAL? ,PRSO ,AXE>
716                                          <IN? ,AXE ,WINNER>>
717                                     <TELL
718 "The troll scratches his head in confusion, then takes the axe." CR>
719                                     <FSET ,TROLL ,FIGHTBIT>
720                                     <MOVE ,AXE ,TROLL>
721                                     <RTRUE>)
722                                    (<EQUAL? ,PRSO ,TROLL ,AXE>
723                                     <TELL
724 "You would have to get the " D ,PRSO " first, and that seems unlikely." CR>
725                                     <RTRUE>)>
726                              <COND (<VERB? THROW>
727                                     <TELL
728 "The troll, who is remarkably coordinated, catches the " D ,PRSO>)
729                                    (T
730                                     <TELL
731 "The troll, who is not overly proud, graciously accepts the gift">)>
732                              <COND (<AND <PROB 20>
733                                          <EQUAL? ,PRSO ,KNIFE ,SWORD ,AXE>>
734                                     <REMOVE-CAREFULLY ,PRSO>
735                                     <TELL
736 " and eats it hungrily. Poor troll, he dies from an internal hemorrhage
737 and his carcass disappears in a sinister black fog." CR>
738                                     <REMOVE-CAREFULLY ,TROLL>
739                                     <APPLY <GETP ,TROLL ,P?ACTION> ,F-DEAD>
740                                     <SETG TROLL-FLAG T>)
741                                    (<EQUAL? ,PRSO ,KNIFE ,SWORD ,AXE>
742                                     <MOVE ,PRSO ,HERE>
743                                     <TELL
744 " and, being for the moment sated, throws it back. Fortunately, the
745 troll has poor control, and the " D ,PRSO " falls to the floor. He does
746 not look pleased." CR>
747                                     <FSET ,TROLL ,FIGHTBIT>)
748                                    (T
749                                     <TELL
750 " and not having the most discriminating tastes, gleefully eats it." CR>
751                                     <REMOVE-CAREFULLY ,PRSO>)>)
752                             (<VERB? TAKE MOVE>
753                              <TELL
754 "The troll spits in your face, grunting \"Better luck next time\" in a
755 rather barbarous accent." CR>)
756                             (<VERB? MUNG>
757                              <TELL
758 "The troll laughs at your puny gesture." CR>)>)
759                      (<VERB? LISTEN>
760                       <TELL
761 "Every so often the troll says something, probably uncomplimentary, in
762 his guttural tongue." CR>)
763                      (<AND ,TROLL-FLAG <VERB? HELLO>>
764                       <TELL "Unfortunately, the troll can't hear you." CR>)>)>>
765
766 \\f
767
768 "SUBTITLE GRATING/MAZE"
769
770 ;<GLOBAL LEAVES-GONE <>> ;"no longer used?"
771 <GLOBAL GRATE-REVEALED <>>
772 <GLOBAL GRUNLOCK <>>
773
774 <ROUTINE LEAVES-APPEAR ()
775         <COND (<AND <NOT <FSET? ,GRATE ,OPENBIT>>
776                     <NOT ,GRATE-REVEALED>>
777                <COND (<VERB? MOVE TAKE>
778                       <TELL
779 "In disturbing the pile of leaves, a grating is revealed." CR>)
780                      (T <TELL
781 "With the leaves moved, a grating is revealed." CR>)>
782                <FCLEAR ,GRATE ,INVISIBLE>
783                <SETG GRATE-REVEALED T>)>
784         <>>
785
786 <ROUTINE LEAF-PILE ()
787         <COND (<VERB? COUNT>
788                <TELL "There are 69,105 leaves here." CR>)
789               (<VERB? BURN>
790                <LEAVES-APPEAR>
791                <REMOVE-CAREFULLY ,PRSO>
792                <COND (<IN? ,PRSO ,HERE>
793                       <TELL
794 "The leaves burn." CR>)
795                      (T
796                       <JIGS-UP
797 "The leaves burn, and so do you.">)>)
798               (<VERB? CUT>
799                <TELL "You rustle the leaves around, making quite a mess." CR>
800                <LEAVES-APPEAR>
801                <RTRUE>)
802               (<VERB? MOVE TAKE>
803                <COND (<VERB? MOVE>
804                       <TELL "Done." CR>)>
805                <COND (,GRATE-REVEALED <RFALSE>)>
806                <LEAVES-APPEAR>
807                <COND (<VERB? TAKE> <RFALSE>)
808                      (T <RTRUE>)>)
809               (<AND <VERB? LOOK-UNDER>
810                     <NOT ,GRATE-REVEALED>>
811                <TELL
812 "Underneath the pile of leaves is a grating. As you release the leaves,
813 the grating is once again concealed from view." CR>)>>
814  
815 <ROUTINE CLEARING-FCN (RARG)
816          <COND (<EQUAL? .RARG ,M-ENTER>
817                 <COND (<NOT ,GRATE-REVEALED>
818                        <FSET ,GRATE ,INVISIBLE>)>)
819                (<EQUAL? .RARG ,M-LOOK>
820                 <TELL
821 "You are in a clearing, with a forest surrounding you on all sides. A
822 path leads south.">
823                 <COND (<FSET? ,GRATE ,OPENBIT>
824                        <CRLF>
825                        <TELL
826 "There is an open grating, descending into darkness.">)
827                       (,GRATE-REVEALED
828                        <CRLF>
829                        <TELL
830 "There is a grating securely fastened into the ground.">)>
831                 <CRLF>)>>
832
833 <ROUTINE MAZE-11-FCN (RARG)
834          <COND (<EQUAL? .RARG ,M-ENTER>
835                 <FCLEAR ,GRATE ,INVISIBLE>)
836                (<EQUAL? .RARG ,M-LOOK>
837                 <TELL
838 "You are in a small room near the maze. There are twisty passages
839 in the immediate vicinity." CR>
840                 <COND (<FSET? ,GRATE ,OPENBIT>
841                        <TELL
842  "Above you is an open grating with sunlight pouring in.">)
843                       (,GRUNLOCK
844                        <TELL "Above you is a grating.">)
845                       (T
846                        <TELL
847  "Above you is a grating locked with a skull-and-crossbones lock.">)>
848                 <CRLF>)>>
849
850 <ROUTINE GRATE-FUNCTION ()
851          <COND (<AND <VERB? OPEN> <EQUAL? ,PRSI ,KEYS>>
852                 <PERFORM ,V?UNLOCK ,GRATE ,KEYS>
853                 <RTRUE>)
854                (<VERB? LOCK>
855                 <COND (<EQUAL? ,HERE ,GRATING-ROOM>
856                        <SETG GRUNLOCK <>>
857                        <TELL "The grate is locked." CR>)
858                       (<EQUAL? ,HERE ,GRATING-CLEARING>
859                        <TELL "You can't lock it from this side." CR>)>)
860                (<AND <VERB? UNLOCK> <EQUAL? ,PRSO ,GRATE>>
861                 <COND (<AND <EQUAL? ,HERE ,GRATING-ROOM> <EQUAL? ,PRSI ,KEYS>>
862                        <SETG GRUNLOCK T>
863                        <TELL "The grate is unlocked." CR>)
864                       (<AND <EQUAL? ,HERE ,GRATING-CLEARING>
865                             <EQUAL? ,PRSI ,KEYS>>
866                        <TELL "You can't reach the lock from here." CR>)
867                       (T
868                        <TELL
869 "Can you unlock a grating with a " D ,PRSI "?" CR>)>)
870                (<VERB? PICK>
871                 <TELL "You can't pick the lock." CR>)
872                (<VERB? OPEN CLOSE>
873                 <COND (,GRUNLOCK
874                        <OPEN-CLOSE ,GRATE
875                                    <COND (<EQUAL? ,HERE ,CLEARING>
876                                           "The grating opens.")
877                                          (T
878 "The grating opens to reveal trees above you.")>
879                                    "The grating is closed.">
880                        <COND (<FSET? ,GRATE ,OPENBIT>
881                               <COND (<AND <NOT <EQUAL? ,HERE ,CLEARING>>
882                                           <NOT ,GRATE-REVEALED>>
883                                      <TELL
884 "A pile of leaves falls onto your head and to the ground." CR>
885                                      <SETG GRATE-REVEALED T>
886                                      <MOVE ,LEAVES ,HERE>)>
887                               <FSET ,GRATING-ROOM ,ONBIT>)
888                              (T <FCLEAR ,GRATING-ROOM ,ONBIT>)>)
889                       (T <TELL "The grating is locked." CR>)>)
890                (<AND <VERB? PUT> <EQUAL? ,PRSI ,GRATE>>
891                 <COND (<G? <GETP ,PRSO ,P?SIZE> 20>
892                        <TELL "It won't fit through the grating." CR>)
893                       (T
894                        <MOVE ,PRSO ,GRATING-ROOM>
895                        <TELL
896 "The " D ,PRSO " goes through the grating into the darkness below." CR>)>)>>
897
898 <ROUTINE MAZE-DIODES ()
899          <TELL
900 "You won't be able to get back up to the tunnel you are going through
901 when it gets to the next room." CR CR>
902          <COND (<EQUAL? ,HERE ,MAZE-2> ,MAZE-4)
903                (<EQUAL? ,HERE ,MAZE-7> ,DEAD-END-1)
904                (<EQUAL? ,HERE ,MAZE-9> ,MAZE-11)
905                (<EQUAL? ,HERE ,MAZE-12> ,MAZE-5)>>
906
907 <ROUTINE RUSTY-KNIFE-FCN ()
908         <COND (<VERB? TAKE>
909                <AND <IN? ,SWORD ,WINNER>
910                     <TELL
911 "As you touch the rusty knife, your sword gives a single pulse of blinding
912 blue light." CR>>
913                <>)
914               (<OR <AND <EQUAL? ,PRSI ,RUSTY-KNIFE>
915                         <VERB? ATTACK>>
916                    <AND <VERB? SWING>
917                         <EQUAL? ,PRSO ,RUSTY-KNIFE>
918                         ,PRSI>>
919                <REMOVE-CAREFULLY ,RUSTY-KNIFE>
920                <JIGS-UP
921 "As the knife approaches its victim, your mind is submerged by an
922 overmastering will. Slowly, your hand turns, until the rusty blade
923 is an inch from your neck. The knife seems to sing as it savagely
924 slits your throat.">)>>
925
926 <ROUTINE KNIFE-F ()
927          <COND (<VERB? TAKE>
928                 <FCLEAR ,ATTIC-TABLE ,NDESCBIT>
929                 <RFALSE>)>>
930
931 <ROUTINE SKELETON ()
932          <COND (<VERB? TAKE RUB MOVE PUSH RAISE LOWER ATTACK KICK KISS>
933                 <TELL
934 "A ghost appears in the room and is appalled at your desecration of
935 the remains of a fellow adventurer. He casts a curse on your valuables
936 and banishes them to the Land of the Living Dead. The ghost leaves,
937 muttering obscenities." CR>
938                 <ROB ,HERE ,LAND-OF-LIVING-DEAD 100>
939                 <ROB ,ADVENTURER ,LAND-OF-LIVING-DEAD>
940                 T)>>
941
942 \\f
943
944 <ROUTINE TORCH-OBJECT ()
945     <COND (<VERB? EXAMINE>
946            <TELL "The torch is burning." CR>)
947           (<AND <VERB? POUR-ON>
948                 <EQUAL? ,PRSI ,TORCH>>
949            <TELL "The water evaporates before it gets close." CR>)
950           (<AND <VERB? LAMP-OFF> <FSET? ,PRSO ,ONBIT>>
951            <TELL
952 "You nearly burn your hand trying to extinguish the flame." CR>)>>
953
954 \\f
955
956 "SUBTITLE MIRROR, MIRROR, ON THE WALL"
957
958 <ROUTINE MIRROR-ROOM (RARG)
959          <COND (<EQUAL? .RARG ,M-LOOK>
960                 <TELL
961 "You are in a large square room with tall ceilings. On the south wall
962 is an enormous mirror which fills the entire wall. There are exits
963 on the other three sides of the room." CR>
964                 <COND (,MIRROR-MUNG
965                        <TELL
966 "Unfortunately, the mirror has been destroyed by your recklessness." CR>)>)>>
967
968 <GLOBAL MIRROR-MUNG <>>
969 <GLOBAL LUCKY T>
970
971 <ROUTINE MIRROR-MIRROR ("AUX" (RM2 ,MIRROR-ROOM-2) L1 L2 N)
972         <COND (<AND <NOT ,MIRROR-MUNG> <VERB? RUB>>
973                <COND (<AND ,PRSI <NOT <EQUAL? ,PRSI ,HANDS>>>
974                       <TELL
975 "You feel a faint tingling transmitted through the " D ,PRSI "." CR>
976                       <RTRUE>)>
977                <COND (<EQUAL? ,HERE .RM2>
978                       <SET RM2 ,MIRROR-ROOM-1>)>
979                <SET L1 <FIRST? ,HERE>>
980                <SET L2 <FIRST? .RM2>>
981                <REPEAT ()
982                        <COND (<NOT .L1> <RETURN>)>
983                        <SET N <NEXT? .L1>>
984                        <MOVE .L1 .RM2>
985                        <SET L1 .N>>
986                <REPEAT ()
987                        <COND (<NOT .L2> <RETURN>)>
988                        <SET N <NEXT? .L2>>
989                        <MOVE .L2 ,HERE>
990                        <SET L2 .N>>
991                <GOTO .RM2 <>>
992                <TELL
993 "There is a rumble from deep within the earth and the room shakes." CR>)
994               (<VERB? LOOK-INSIDE EXAMINE>
995                <COND (,MIRROR-MUNG
996                       <TELL "The mirror is broken into many pieces.">)
997                      (T
998                       <TELL "There is an ugly person staring back at you.">)>
999                <CRLF>)
1000               (<VERB? TAKE>
1001                <TELL
1002 "The mirror is many times your size. Give up." CR>)
1003               (<VERB? MUNG THROW ATTACK>
1004                <COND (,MIRROR-MUNG
1005                       <TELL
1006 "Haven't you done enough damage already?" CR>)
1007                      (T
1008                       <SETG MIRROR-MUNG T>
1009                       <SETG LUCKY <>>
1010                       <TELL
1011 "You have broken the mirror. I hope you have a seven years' supply of
1012 good luck handy." CR>)>)>>
1013
1014 \\f
1015
1016 "SUBTITLE THE DOME"
1017
1018 <ROUTINE TORCH-ROOM-FCN (RARG)
1019          <COND (<EQUAL? .RARG ,M-LOOK>
1020                 <TELL
1021 "This is a large room with a prominent doorway leading to a down
1022 staircase. Above you is a large dome. Up around the edge of the
1023 dome (20 feet up) is a wooden railing. In the center of the room
1024 sits a white marble pedestal." CR>
1025                 <COND (,DOME-FLAG
1026                        <TELL
1027 "A piece of rope descends from the railing above, ending some
1028 five feet above your head." CR>)>)>>
1029
1030 <ROUTINE DOME-ROOM-FCN (RARG)
1031          <COND (<EQUAL? .RARG ,M-LOOK>
1032                 <TELL
1033 "You are at the periphery of a large dome, which forms the ceiling
1034 of another room below. Protecting you from a precipitous drop is a
1035 wooden railing which circles the dome." CR>
1036                 <COND (,DOME-FLAG
1037                        <TELL
1038 "Hanging down from the railing is a rope which ends about ten feet
1039 from the floor below." CR>)>)
1040                (<EQUAL? .RARG ,M-ENTER>
1041                 <COND (,DEAD
1042                        <TELL
1043 "As you enter the dome you feel a strong pull as if from a wind
1044 drawing you over the railing and down." CR>
1045                        <MOVE ,WINNER ,TORCH-ROOM>
1046                        <SETG HERE ,TORCH-ROOM>
1047                        <RTRUE>)
1048                       (<VERB? LEAP>
1049                        <JIGS-UP
1050 "I'm afraid that the leap you attempted has done you in.">)>)>>
1051
1052 ;<GLOBAL EGYPT-FLAG <>> ;"no longer used?"
1053
1054 \\f
1055
1056 "SUBTITLE LAND OF THE DEAD"
1057
1058 <ROUTINE LLD-ROOM (RARG)
1059          <COND (<EQUAL? .RARG ,M-LOOK>
1060                 <TELL
1061 "You are outside a large gateway, on which is inscribed||
1062   Abandon every hope
1063 all ye who enter here!||
1064 The gate is open; through it you can see a desolation, with a pile of
1065 mangled bodies in one corner. Thousands of voices, lamenting some
1066 hideous fate, can be heard." CR>
1067                 <COND (<AND <NOT ,LLD-FLAG> <NOT ,DEAD>>
1068                        <TELL
1069 "The way through the gate is barred by evil spirits, who jeer at your
1070 attempts to pass." CR>)>)
1071                (<EQUAL? .RARG ,M-BEG>
1072                 <COND (<VERB? EXORCISE>
1073                        <COND (<NOT ,LLD-FLAG>
1074                               <COND (<AND <IN? ,BELL ,WINNER>
1075                                           <IN? ,BOOK ,WINNER>
1076                                           <IN? ,CANDLES ,WINNER>>
1077                                      <TELL
1078 "You must perform the ceremony." CR>)
1079                                     (T
1080                                      <TELL
1081 "You aren't equipped for an exorcism." CR>)>)>)
1082                       (<AND <NOT ,LLD-FLAG>
1083                             <VERB? RING>
1084                             <EQUAL? ,PRSO ,BELL>>
1085                        <SETG XB T>
1086                        <REMOVE-CAREFULLY ,BELL>
1087                        <THIS-IS-IT ,HOT-BELL>
1088                        <MOVE ,HOT-BELL ,HERE>
1089                        <TELL
1090 "The bell suddenly becomes red hot and falls to the ground. The
1091 wraiths, as if paralyzed, stop their jeering and slowly turn to face
1092 you. On their ashen faces, the expression of a long-forgotten terror
1093 takes shape." CR>
1094                        <COND (<IN? ,CANDLES ,WINNER>
1095                               <TELL
1096 "In your confusion, the candles drop to the ground (and they are out)." CR>
1097                               <MOVE ,CANDLES ,HERE>
1098                               <FCLEAR ,CANDLES ,ONBIT>
1099                               <DISABLE <INT I-CANDLES>>)>
1100                        <ENABLE <QUEUE I-XB 6>>
1101                        <ENABLE <QUEUE I-XBH 20>>)
1102                       (<AND ,XC
1103                             <VERB? READ>
1104                             <EQUAL? ,PRSO ,BOOK>
1105                             <NOT ,LLD-FLAG>>
1106                        <TELL
1107 "Each word of the prayer reverberates through the hall in a deafening
1108 confusion. As the last word fades, a voice, loud and commanding,
1109 speaks: \"Begone, fiends!\" A heart-stopping scream fills the cavern,
1110 and the spirits, sensing a greater power, flee through the walls." CR>
1111                        <REMOVE-CAREFULLY ,GHOSTS>
1112                        <SETG LLD-FLAG T>
1113                        <DISABLE <INT I-XC>>)>)
1114                (<EQUAL? .RARG ,M-END>
1115                 <COND (<AND ,XB
1116                             <IN? ,CANDLES ,WINNER>
1117                             <FSET? ,CANDLES ,ONBIT>
1118                             <NOT ,XC>>
1119                        <SETG XC T>
1120                        <TELL
1121 "The flames flicker wildly and appear to dance. The earth beneath
1122 your feet trembles, and your legs nearly buckle beneath you.
1123 The spirits cower at your unearthly power." CR>
1124                        <DISABLE <INT I-XB>>
1125                        <ENABLE <QUEUE I-XC 3>>)>)>>
1126
1127 <GLOBAL XB <>>
1128
1129 <GLOBAL XC <>>
1130
1131 <ROUTINE I-XB ()
1132          <OR ,XC
1133              <AND <EQUAL? ,HERE ,ENTRANCE-TO-HADES>
1134                   <TELL
1135 "The tension of this ceremony is broken, and the wraiths, amused but
1136 shaken at your clumsy attempt, resume their hideous jeering." CR>>>
1137          <SETG XB <>>>
1138
1139 <ROUTINE I-XC ()
1140          <SETG XC <>>
1141          <I-XB>>
1142
1143 <ROUTINE I-XBH ()
1144          <REMOVE-CAREFULLY ,HOT-BELL>
1145          <MOVE ,BELL ,ENTRANCE-TO-HADES>
1146          <COND (<EQUAL? ,HERE ,ENTRANCE-TO-HADES>
1147                 <TELL "The bell appears to have cooled down." CR>)>>
1148
1149 \\f
1150
1151 "SUBTITLE FLOOD CONTROL DAM #3"
1152
1153 <GLOBAL GATE-FLAG <>>
1154 <GLOBAL GATES-OPEN <>>
1155
1156 <ROUTINE DAM-ROOM-FCN (RARG)
1157          <COND (<EQUAL? .RARG ,M-LOOK>
1158                 <TELL
1159 "You are standing on the top of the Flood Control Dam #3, which was
1160 quite a tourist attraction in times far distant. There are paths to
1161 the north, south, and west, and a scramble down." CR>
1162                 <COND (<AND ,LOW-TIDE ,GATES-OPEN>
1163                        <TELL
1164 "The water level behind the dam is low: The sluice gates have been
1165 opened. Water rushes through the dam and downstream." CR>)
1166                       (,GATES-OPEN
1167                        <TELL
1168 "The sluice gates are open, and water rushes through the dam. The
1169 water level behind the dam is still high." CR>)
1170                       (,LOW-TIDE
1171                        <TELL
1172 "The sluice gates are closed. The water level in the reservoir is
1173 quite low, but the level is rising quickly." CR>)
1174                       (T
1175                        <TELL
1176 "The sluice gates on the dam are closed. Behind the dam, there can be
1177 seen a wide reservoir. Water is pouring over the top of the now
1178 abandoned dam." CR>)>
1179                 <TELL
1180 "There is a control panel here, on which a large metal bolt is mounted.
1181 Directly above the bolt is a small green plastic bubble">
1182                 <COND (,GATE-FLAG
1183                        <TELL " which is
1184 glowing serenely">)>
1185                 <TELL "." CR>)>>
1186
1187 <ROUTINE BOLT-F ()
1188         <COND (<VERB? TURN>
1189                <COND (<EQUAL? ,PRSI ,WRENCH>
1190                       <COND (,GATE-FLAG
1191                              <FCLEAR ,RESERVOIR-SOUTH ,TOUCHBIT>
1192                              <COND (,GATES-OPEN
1193                                     <SETG GATES-OPEN <>>
1194                                     <FCLEAR ,LOUD-ROOM ,TOUCHBIT>
1195                                     <TELL
1196 "The sluice gates close and water starts to collect behind the dam." CR>
1197                                     <ENABLE <QUEUE I-RFILL 8>>
1198                                     <QUEUE I-REMPTY 0>
1199                                     T)
1200                                    (T
1201                                     <SETG GATES-OPEN T>
1202                                     <TELL
1203 "The sluice gates open and water pours through the dam." CR>
1204                                     <ENABLE <QUEUE I-REMPTY 8>>
1205                                     <QUEUE I-RFILL 0>
1206                                     T)>)
1207                             (T <TELL
1208 "The bolt won't turn with your best effort." CR>)>)
1209                      (ELSE
1210                       <TELL
1211 "The bolt won't turn using the " D ,PRSI "." CR>)>)
1212               (<VERB? TAKE>
1213                <INTEGRAL-PART>)
1214               (<VERB? OIL>
1215                <TELL
1216 "Hmm. It appears the tube contained glue, not oil. Turning the bolt
1217 won't get any easier...." CR>)>>
1218
1219 <ROUTINE BUBBLE-F ()
1220          <COND (<VERB? TAKE>
1221                 <INTEGRAL-PART>)>>
1222
1223 <ROUTINE INTEGRAL-PART ()
1224          <TELL "It is an integral part of the control panel." CR>>
1225
1226 <ROUTINE I-RFILL ()
1227          <FSET ,RESERVOIR ,NONLANDBIT>
1228          <FCLEAR ,RESERVOIR ,RLANDBIT>
1229          <FCLEAR ,DEEP-CANYON ,TOUCHBIT>
1230          <FCLEAR ,LOUD-ROOM ,TOUCHBIT>
1231          <AND <IN? ,TRUNK ,RESERVOIR>
1232               <FSET ,TRUNK ,INVISIBLE>>
1233          <SETG LOW-TIDE <>>
1234          <COND (<EQUAL? ,HERE ,RESERVOIR>
1235                 <COND (<FSET? <LOC ,WINNER> ,VEHBIT>
1236                        <TELL
1237 "The boat lifts gently out of the mud and is now floating on
1238 the reservoir." CR>)
1239                       (T
1240                        <JIGS-UP
1241 "You are lifted up by the rising river! You try to swim, but the
1242 currents are too strong. You come closer, closer to the awesome
1243 structure of Flood Control Dam #3. The dam beckons to you.
1244 The roar of the water nearly deafens you, but you remain conscious
1245 as you tumble over the dam toward your certain doom among the rocks
1246 at its base.">)>)
1247                (<EQUAL? ,HERE ,DEEP-CANYON>
1248                 <TELL
1249 "A sound, like that of flowing water, starts to come from below." CR>)
1250                (<EQUAL? ,HERE ,LOUD-ROOM>
1251                 <TELL
1252 "All of a sudden, an alarmingly loud roaring sound fills the room.
1253 Filled with fear, you scramble away." CR>
1254                 <GOTO <PICK-ONE ,LOUD-RUNS>>)
1255                (<EQUAL? ,HERE ,RESERVOIR-NORTH ,RESERVOIR-SOUTH>
1256                 <TELL
1257 "You notice that the water level has risen to the point that it
1258 is impossible to cross." CR>)>
1259          T>
1260
1261 <GLOBAL LOUD-RUNS <LTABLE 0 DAMP-CAVE ROUND-ROOM DEEP-CANYON>>
1262
1263 <ROUTINE I-REMPTY ()
1264          <FSET ,RESERVOIR ,RLANDBIT>
1265          <FCLEAR ,RESERVOIR ,NONLANDBIT>
1266          <FCLEAR ,DEEP-CANYON ,TOUCHBIT>
1267          <FCLEAR ,LOUD-ROOM ,TOUCHBIT>
1268          <FCLEAR ,TRUNK ,INVISIBLE>
1269          <SETG LOW-TIDE T>
1270          <COND (<AND <EQUAL? ,HERE ,RESERVOIR>
1271                      <FSET? <LOC ,WINNER> ,VEHBIT>>
1272                 <TELL
1273 "The water level has dropped to the point at which the boat can no
1274 longer stay afloat. It sinks into the mud." CR>)
1275                (<EQUAL? ,HERE ,DEEP-CANYON>
1276                 <TELL
1277 "The roar of rushing water is quieter now." CR>)
1278                (<EQUAL? ,HERE ,RESERVOIR-NORTH ,RESERVOIR-SOUTH>
1279                 <TELL
1280 "The water level is now quite low here and you could easily cross over
1281 to the other side." CR>)>
1282          T>
1283
1284 <GLOBAL DROWNINGS
1285       <TABLE (PURE) "up to your ankles."
1286         "up to your shin."
1287         "up to your knees."
1288         "up to your hips."
1289         "up to your waist."
1290         "up to your chest."
1291         "up to your neck."
1292         "over your head."
1293         "high in your lungs.">>
1294
1295 <GLOBAL WATER-LEVEL 0>
1296 <GDECL (WATER-LEVEL) FIX>
1297
1298 <ROUTINE BUTTON-F ()
1299          <COND (<VERB? READ>
1300                 <TELL "They're greek to you." CR>)
1301                (<VERB? PUSH>
1302                 <COND (<EQUAL? ,PRSO ,BLUE-BUTTON>
1303                        <COND (<0? ,WATER-LEVEL>
1304                               <FCLEAR ,LEAK ,INVISIBLE>
1305                               <TELL
1306 "There is a rumbling sound and a stream of water appears to burst
1307 from the east wall of the room (apparently, a leak has occurred in a
1308 pipe)." CR>
1309                               <SETG WATER-LEVEL 1>
1310                               <ENABLE <QUEUE I-MAINT-ROOM -1>>
1311                               T)
1312                              (T
1313                               <TELL
1314                                 "The blue button appears to be jammed." CR>)>)
1315                       (<EQUAL? ,PRSO ,RED-BUTTON>
1316                        <TELL "The lights within the room ">
1317                        <COND (<FSET? ,HERE ,ONBIT>
1318                               <FCLEAR ,HERE ,ONBIT>
1319                               <TELL "shut off." CR>)
1320                              (T
1321                               <FSET ,HERE ,ONBIT>
1322                               <TELL "come on." CR>)>)
1323                       (<EQUAL? ,PRSO ,BROWN-BUTTON>
1324                        <FCLEAR ,DAM-ROOM ,TOUCHBIT>
1325                        <SETG GATE-FLAG <>>
1326                        <TELL "Click." CR>)
1327                       (<EQUAL? ,PRSO ,YELLOW-BUTTON>
1328                        <FCLEAR ,DAM-ROOM ,TOUCHBIT>
1329                        <SETG GATE-FLAG T>
1330                        <TELL "Click." CR>)>)>>
1331
1332 <ROUTINE TOOL-CHEST-FCN ()
1333          <COND (<VERB? EXAMINE>
1334                 <TELL "The chests are all empty." CR>)
1335                (<VERB? TAKE OPEN PUT>
1336                 <REMOVE-CAREFULLY ,TOOL-CHEST>
1337 <TELL
1338 "The chests are so rusty and corroded that they crumble when you
1339 touch them." CR>)
1340                (<VERB? OPEN>
1341                 <TELL "The chests are already open." CR>)>>
1342
1343 <ROUTINE I-MAINT-ROOM ("AUX" HERE?)
1344          <SET HERE? <EQUAL? ,HERE ,MAINTENANCE-ROOM>>
1345          <COND (.HERE? <TELL "The water level here is now "> <TELL <GET
1346                 ,DROWNINGS </ ,WATER-LEVEL 2>>> <CRLF>)>
1347          <SETG WATER-LEVEL <+ 1 ,WATER-LEVEL>>
1348          <COND (<NOT <L? ,WATER-LEVEL 14>>
1349                 <MUNG-ROOM ,MAINTENANCE-ROOM
1350 "The room is full of water and cannot be entered.">
1351                 <QUEUE I-MAINT-ROOM 0>
1352                 <COND (.HERE?
1353                      <JIGS-UP
1354 "I'm afraid you have done drowned yourself.">)>)
1355                (<AND <IN? ,WINNER ,INFLATED-BOAT>
1356                      <EQUAL? ,HERE ,MAINTENANCE-ROOM ,DAM-ROOM ,DAM-LOBBY>>
1357                 <JIGS-UP
1358 "The rising water carries the boat over the dam, down the river, and over
1359 the falls. Tsk, tsk.">)>
1360          <RTRUE>>
1361
1362 <ROUTINE LEAK-FUNCTION ()
1363         <COND (<G? ,WATER-LEVEL 0>
1364                <COND (<AND <VERB? PUT PUT-ON>
1365                            <EQUAL? ,PRSO ,PUTTY>>
1366                       <FIX-MAINT-LEAK>)
1367                      (<VERB? PLUG>
1368                       <COND (<EQUAL? ,PRSI ,PUTTY>
1369                              <FIX-MAINT-LEAK>)
1370                             (T <WITH-TELL ,PRSI>)>)>)>>
1371
1372 <ROUTINE FIX-MAINT-LEAK ()
1373          <SETG WATER-LEVEL -1>
1374          <QUEUE I-MAINT-ROOM 0>
1375          <TELL
1376 "By some miracle of Zorkian technology, you have managed to stop the
1377 leak in the dam." CR>>
1378
1379 <ROUTINE PUTTY-FCN ()
1380          <COND (<OR <AND <VERB? OIL>
1381                          <EQUAL? ,PRSI ,PUTTY>>
1382                     <AND <VERB? PUT>
1383                          <EQUAL? ,PRSO ,PUTTY>>>
1384                 <TELL "The all-purpose gunk isn't a lubricant." CR>)>>
1385
1386 <ROUTINE TUBE-FUNCTION ()
1387          <COND (<AND <VERB? PUT>
1388                      <EQUAL? ,PRSI ,TUBE>>
1389                 <TELL "The tube refuses to accept anything." CR>)
1390                (<VERB? SQUEEZE>
1391                 <COND (<AND <FSET? ,PRSO ,OPENBIT>
1392                             <IN? ,PUTTY ,PRSO>>
1393                        <MOVE ,PUTTY ,WINNER>
1394                        <TELL "The viscous material oozes into your hand." CR>)
1395                       (<FSET? ,PRSO ,OPENBIT>
1396                        <TELL "The tube is apparently empty." CR>)
1397                       (T
1398                        <TELL "The tube is closed." CR>)>)>>
1399
1400 <ROUTINE DAM-FUNCTION ()
1401          <COND (<VERB? OPEN CLOSE>
1402                 <TELL "Sounds reasonable, but this isn't how." CR>)
1403                (<VERB? PLUG>
1404                 <COND (<EQUAL? ,PRSI ,HANDS>
1405                        <TELL
1406 "Are you the little Dutch boy, then? Sorry, this is a big dam." CR>)
1407                       (T
1408                        <TELL
1409 "With a " D ,PRSI "? Do you know how big this dam is? You could only
1410 stop a tiny leak with that." CR>)>)>>
1411
1412 <ROUTINE WITH-TELL (OBJ)
1413          <TELL "With a " D .OBJ "?" CR>>
1414
1415 <ROUTINE RESERVOIR-SOUTH-FCN (RARG)
1416         <COND (<EQUAL? .RARG ,M-LOOK>
1417                <COND (<AND ,LOW-TIDE ,GATES-OPEN>
1418                       <TELL
1419 "You are in a long room, to the north of which was formerly a lake.
1420 However, with the water level lowered, there is merely a wide stream
1421 running through the center of the room.">)
1422                      (,GATES-OPEN
1423                       <TELL
1424 "You are in a long room. To the north is a large lake, too deep
1425 to cross. You notice, however, that the water level appears to be
1426 dropping at a rapid rate. Before long, it might be possible to cross
1427 to the other side from here.">)
1428                      (,LOW-TIDE
1429                       <TELL
1430 "You are in a long room, to the north of which is a wide area which
1431 was formerly a reservoir, but now is merely a stream. You notice,
1432 however, that the level of the stream is rising quickly and that
1433 before long it will be impossible to cross here.">)
1434                      (T
1435                       <TELL
1436 "You are in a long room on the south shore of a large lake, far
1437 too deep and wide for crossing.">)>
1438                <CRLF>
1439                <TELL
1440 "There is a path along the stream to the east or west, a steep pathway
1441 climbing southwest along the edge of a chasm, and a path leading into a
1442 canyon to the southeast." CR>)>>
1443
1444 <ROUTINE RESERVOIR-FCN (RARG)
1445         <COND (<AND <EQUAL? .RARG ,M-END>
1446                     <NOT <FSET? <LOC ,WINNER> ,VEHBIT>>
1447                     <NOT ,GATES-OPEN>
1448                     ,LOW-TIDE>
1449                <TELL
1450 "You notice that the water level here is rising rapidly. The currents
1451 are also becoming stronger. Staying here seems quite perilous!" CR>)
1452               (<EQUAL? .RARG ,M-LOOK>
1453                <COND (,LOW-TIDE
1454                       <TELL
1455 "You are on what used to be a large lake, but which is now a large
1456 mud pile. There are \"shores\" to the north and south.">)
1457                      (T
1458                       <TELL
1459 "You are on the lake. Beaches can be seen north and south.
1460 Upstream a small stream enters the lake through a narrow cleft
1461 in the rocks. The dam can be seen downstream.">)>
1462                <CRLF>)>>
1463
1464 <ROUTINE RESERVOIR-NORTH-FCN (RARG)
1465         <COND (<EQUAL? .RARG ,M-LOOK>
1466                <COND (<AND ,LOW-TIDE ,GATES-OPEN>
1467                       <TELL
1468 "You are in a large cavernous room, the south of which was formerly
1469 a lake. However, with the water level lowered, there is merely
1470 a wide stream running through there.">)
1471                      (,GATES-OPEN
1472                       <TELL
1473 "You are in a large cavernous area. To the south is a wide lake,
1474 whose water level appears to be falling rapidly.">)
1475                      (,LOW-TIDE
1476                       <TELL
1477 "You are in a cavernous area, to the south of which is a very wide
1478 stream. The level of the stream is rising rapidly, and it appears
1479 that before long it will be impossible to cross to the other side.">)
1480                      (T
1481                       <TELL
1482 "You are in a large cavernous room, north of a large lake.">)>
1483                <CRLF>
1484                <TELL
1485 "There is a slimy stairway leaving the room to the north." CR>)>>
1486
1487 \\f
1488
1489 "SUBTITLE WATER, WATER EVERYWHERE..."
1490
1491 <ROUTINE BOTTLE-FUNCTION ("AUX" (E? <>))
1492   <COND (<AND <VERB? THROW> <==? ,PRSO ,BOTTLE>>
1493          <REMOVE-CAREFULLY ,PRSO>
1494          <SET E? T>
1495          <TELL "The bottle hits the far wall and shatters." CR>)
1496         (<VERB? MUNG>
1497          <SET E? T>
1498          <REMOVE-CAREFULLY ,PRSO>
1499          <TELL "A brilliant maneuver destroys the bottle." CR>)
1500         (<VERB? SHAKE>
1501          <COND (<AND <FSET? ,PRSO ,OPENBIT> <IN? ,WATER ,PRSO>>
1502                 <SET E? T>)>)>
1503   <COND (<AND .E? <IN? ,WATER ,PRSO>>
1504          <TELL "The water spills to the floor and evaporates." CR>
1505          <REMOVE-CAREFULLY ,WATER>
1506          T)
1507         (.E? <RTRUE>)>>
1508
1509 \\f
1510
1511 "SUBTITLE CYCLOPS"
1512
1513 <GLOBAL CYCLOWRATH 0>
1514
1515 <ROUTINE CYCLOPS-FCN ("AUX" COUNT)
1516         <SET COUNT ,CYCLOWRATH>
1517         <COND (<EQUAL? ,WINNER ,CYCLOPS>
1518                <COND (,CYCLOPS-FLAG
1519                       <TELL "No use talking to him. He's fast asleep." CR>)
1520                      (<VERB? ODYSSEUS>
1521                       <SETG WINNER ,ADVENTURER>
1522                       <PERFORM ,V?ODYSSEUS>
1523                       <RTRUE>)
1524                      (ELSE
1525                       <TELL
1526 "The cyclops prefers eating to making conversation." CR>)>)
1527               (,CYCLOPS-FLAG
1528                <COND (<VERB? EXAMINE>
1529                       <TELL
1530 "The cyclops is sleeping like a baby, albeit a very ugly one." CR>)
1531                      (<VERB? ALARM KICK ATTACK BURN MUNG>
1532                       <TELL
1533 "The cyclops yawns and stares at the thing that woke him up." CR>
1534                       <SETG CYCLOPS-FLAG <>>
1535                       <FSET ,CYCLOPS ,FIGHTBIT>
1536                       <COND (<L? .COUNT 0>
1537                              <SETG CYCLOWRATH <- .COUNT>>)
1538                             (T
1539                              <SETG CYCLOWRATH .COUNT>)>)>)
1540               (<VERB? EXAMINE>
1541                <TELL
1542 "A hungry cyclops is standing at the foot of the stairs." CR>)
1543               (<AND <VERB? GIVE> <EQUAL? ,PRSI ,CYCLOPS>>
1544                <COND (<EQUAL? ,PRSO ,LUNCH>
1545                       <COND (<NOT <L? .COUNT 0>>
1546                              <REMOVE-CAREFULLY ,LUNCH>
1547                              <TELL
1548 "The cyclops says \"Mmm Mmm. I love hot peppers! But oh, could I use
1549 a drink. Perhaps I could drink the blood of that thing.\"  From the
1550 gleam in his eye, it could be surmised that you are \"that thing\"." CR>
1551                              <SETG CYCLOWRATH <MIN -1 <- .COUNT>>>)>
1552                       <ENABLE <QUEUE I-CYCLOPS -1>>)
1553                      (<OR <EQUAL? ,PRSO ,WATER>
1554                           <AND <EQUAL? ,PRSO ,BOTTLE>
1555                                <IN? ,WATER ,BOTTLE>>>
1556                       <COND (<L? .COUNT 0>
1557                              <REMOVE-CAREFULLY ,WATER>
1558                              <MOVE ,BOTTLE ,HERE>
1559                              <FSET ,BOTTLE ,OPENBIT>
1560                              <FCLEAR ,CYCLOPS ,FIGHTBIT>
1561                              <TELL
1562 "The cyclops takes the bottle, checks that it's open, and drinks the water.
1563 A moment later, he lets out a yawn that nearly blows you over, and then
1564 falls fast asleep (what did you put in that drink, anyway?)." CR>
1565                              <SETG CYCLOPS-FLAG T>)
1566                             (T
1567                              <TELL
1568 "The cyclops apparently is not thirsty and refuses your generous offer." CR>)>)
1569                      (<EQUAL? ,PRSO ,GARLIC>
1570                       <TELL
1571 "The cyclops may be hungry, but there is a limit." CR>)
1572                      (T
1573                       <TELL
1574 "The cyclops is not so stupid as to eat THAT!" CR>)>)
1575               (<VERB? THROW ATTACK MUNG>
1576                <ENABLE <QUEUE I-CYCLOPS -1>>
1577                <COND (<VERB? MUNG>
1578                       <TELL
1579 "\"Do you think I'm as stupid as my father was?\", he says, dodging." CR>)
1580                      (T
1581                       <TELL
1582 "The cyclops shrugs but otherwise ignores your pitiful attempt." CR>
1583                       <COND (<VERB? THROW>
1584                              <MOVE ,PRSO ,HERE>)>
1585                       <RTRUE>)>)
1586               (<VERB? TAKE>
1587                <TELL
1588 "The cyclops doesn't take kindly to being grabbed." CR>)
1589               (<VERB? TIE>
1590                <TELL
1591 "You cannot tie the cyclops, though he is fit to be tied." CR>)
1592               (<VERB? LISTEN>
1593                <TELL
1594 "You can hear his stomach rumbling." CR>)>>
1595
1596 <ROUTINE I-CYCLOPS ()
1597          <COND (<OR ,CYCLOPS-FLAG ,DEAD> <RTRUE>)
1598                (<NOT <EQUAL? ,HERE ,CYCLOPS-ROOM>>
1599                 <DISABLE <INT I-CYCLOPS>>)
1600                (T
1601                 <COND (<G? <ABS ,CYCLOWRATH> 5>
1602                        <DISABLE <INT I-CYCLOPS>>
1603                        <JIGS-UP
1604 "The cyclops, tired of all of your games and trickery, grabs you firmly.
1605 As he licks his chops, he says \"Mmm. Just like Mom used to make 'em.\"
1606 It's nice to be appreciated.">)
1607                       (T
1608                        <COND (<L? ,CYCLOWRATH 0>
1609                               <SETG CYCLOWRATH <- ,CYCLOWRATH 1>>)
1610                              (T
1611                               <SETG CYCLOWRATH <+ ,CYCLOWRATH 1>>)>
1612                        <COND (<NOT ,CYCLOPS-FLAG>
1613                               <TELL <NTH ,CYCLOMAD <- <ABS ,CYCLOWRATH> 1>>
1614                                     CR>)>)>)>>
1615
1616 <ROUTINE CYCLOPS-ROOM-FCN (RARG)
1617         <COND (<EQUAL? .RARG ,M-LOOK>
1618                <TELL
1619 "This room has an exit on the northwest, and a staircase leading up." CR>
1620                <COND (<AND ,CYCLOPS-FLAG <NOT ,MAGIC-FLAG>>
1621                       <TELL
1622 "The cyclops is sleeping blissfully at the foot of the stairs." CR>)
1623                      (,MAGIC-FLAG
1624                       <TELL
1625 "The east wall, previously solid, now has a cyclops-sized opening in it." CR>)
1626                      (<0? ,CYCLOWRATH>
1627                       <TELL
1628 "A cyclops, who looks prepared to eat horses (much less mere
1629 adventurers), blocks the staircase. From his state of health, and
1630 the bloodstains on the walls, you gather that he is not very
1631 friendly, though he likes people." CR>)
1632                      (<G? ,CYCLOWRATH 0>
1633                       <TELL
1634 "The cyclops is standing in the corner, eyeing you closely. I don't
1635 think he likes you very much. He looks extremely hungry, even for a
1636 cyclops." CR>)
1637                      (<L? ,CYCLOWRATH 0>
1638                       <TELL
1639 "The cyclops, having eaten the hot peppers, appears to be gasping.
1640 His enflamed tongue protrudes from his man-sized mouth." CR>)>)
1641               (<EQUAL? .RARG ,M-ENTER>
1642                <OR <0? ,CYCLOWRATH> <ENABLE <INT I-CYCLOPS>>>)>>
1643
1644 <GLOBAL CYCLOMAD
1645         <TABLE (PURE)
1646           "The cyclops seems somewhat agitated."
1647           "The cyclops appears to be getting more agitated."
1648           "The cyclops is moving about the room, looking for something."
1649           "The cyclops was looking for salt and pepper. No doubt they are
1650 condiments for his upcoming snack."
1651           "The cyclops is moving toward you in an unfriendly manner."
1652           "You have two choices: 1. Leave  2. Become dinner.">>
1653
1654 \\f
1655
1656 "SUBTITLE LOUD LOUD LOUD"
1657
1658 <GLOBAL LOUD-FLAG <>>
1659
1660 <ROUTINE LOUD-ROOM-FCN (RARG "AUX" WRD)
1661          <COND (<EQUAL? .RARG ,M-LOOK>
1662                 <TELL
1663 "This is a large room with a ceiling which cannot be detected from
1664 the ground. There is a narrow passage from east to west and a stone
1665 stairway leading upward.">
1666                 <COND (<OR ,LOUD-FLAG
1667                            <AND <NOT ,GATES-OPEN> ,LOW-TIDE>>
1668                        <TELL " The room is eerie in its quietness.">)
1669                       (T
1670                        <TELL " The room is deafeningly loud with an
1671 undetermined rushing sound. The sound seems to reverberate from all
1672 of the walls, making it difficult even to think.">)>
1673                 <CRLF>)
1674                (<AND <EQUAL? .RARG ,M-END> ,GATES-OPEN <NOT ,LOW-TIDE>>
1675                 <TELL
1676 "It is unbearably loud here, with an ear-splitting roar seeming to
1677 come from all around you. There is a pounding in your head which won't
1678 stop. With a tremendous effort, you scramble out of the room." CR CR>
1679                 <GOTO <PICK-ONE ,LOUD-RUNS>>
1680                 <RFALSE>)               
1681                (<EQUAL? .RARG ,M-ENTER>
1682                 <COND (<OR ,LOUD-FLAG
1683                            <AND <NOT ,GATES-OPEN> ,LOW-TIDE>>
1684                        <RFALSE>)
1685                       (<AND ,GATES-OPEN <NOT ,LOW-TIDE>>
1686                        <RFALSE>)
1687                       (T
1688                        <V-FIRST-LOOK>
1689                        <COND (,P-CONT
1690                               <TELL
1691 "The rest of your commands have been lost in the noise." CR>
1692                               <SETG P-CONT <>>)>
1693                        <REPEAT ()
1694                                <COND (<NOT ,SUPER-BRIEF> <CRLF>)>
1695                                <TELL ">">
1696                                <READ ,P-INBUF ,P-LEXV>
1697                                <COND (<0? <GETB ,P-LEXV ,P-LEXWORDS>>
1698                                       <TELL "I beg your pardon?" CR>
1699                                       <AGAIN>)>
1700                                <SET WRD <GET ,P-LEXV 1>>
1701                                <COND (<EQUAL? .WRD ,W?GO ,W?WALK ,W?RUN>
1702                                       <SET WRD <GET ,P-LEXV 3>>)
1703                                      (<EQUAL? .WRD ,W?SAY>
1704                                       <SET WRD <GET ,P-LEXV 5>>)>
1705                                <COND (<EQUAL? .WRD ,W?SAVE>
1706                                       <V-SAVE>)
1707                                      (<EQUAL? .WRD ,W?RESTORE>
1708                                       <V-RESTORE>)
1709                                      (<EQUAL? .WRD ,W?Q ,W?QUIT>
1710                                       <V-QUIT>)
1711                                      (<EQUAL? .WRD ,W?W ,W?WEST>
1712                                       <RETURN <GOTO ,ROUND-ROOM>>)
1713                                      (<EQUAL? .WRD ,W?E ,W?EAST>
1714                                       <RETURN <GOTO ,DAMP-CAVE>>)
1715                                      (<EQUAL? .WRD ,W?U ,W?UP>
1716                                       <RETURN <GOTO ,DEEP-CANYON>>)
1717                                      (<EQUAL? .WRD ,W?BUG>
1718                                       <TELL "That's only your opinion." CR>)
1719                                      (<EQUAL? .WRD ,W?ECHO>
1720                                       <SETG LOUD-FLAG T>
1721                                       <FCLEAR ,BAR ,SACREDBIT>
1722                                       <TELL
1723 "The acoustics of the room change subtly." CR>
1724                                       <COND (<NOT ,SUPER-BRIEF> <CRLF>)>
1725                                       <RETURN>)
1726                                      ;(,DEAD <CRLF>)
1727                                      (T
1728                                       <V-ECHO>)>>)>)>>
1729
1730 <ROUTINE DEEP-CANYON-F (RARG)
1731          <COND (<EQUAL? .RARG ,M-LOOK>
1732                 <TELL
1733 "You are on the south edge of a deep canyon. Passages lead off to the
1734 east, northwest and southwest. A stairway leads down.">
1735                 <COND (<AND ,GATES-OPEN <NOT ,LOW-TIDE>>
1736                        <TELL
1737 " You can hear a loud roaring sound, like that of rushing water, from
1738 below.">)
1739                       (<AND <NOT ,GATES-OPEN> ,LOW-TIDE>
1740                        <CRLF>
1741                        <RTRUE>)
1742                       (T
1743                        <TELL
1744 " You can hear the sound of flowing water from below.">)>
1745                 <CRLF>)>>
1746
1747
1748 <GLOBAL EGG-SOLVE <>>
1749
1750 \\f
1751
1752 "SUBTITLE A SEEDY LOOKING GENTLEMAN..."
1753
1754 <GLOBAL THIEF-HERE <>>
1755
1756 ;"I-THIEF moved to DEMONS"
1757
1758 \\f
1759
1760 "SUBTITLE THINGS THIEF MIGHT DO"
1761
1762 "INTERACTION WITH ADVENTURER -- RETURNS T IF THIEF FINISHED."
1763
1764 <ROUTINE THIEF-VS-ADVENTURER (HERE? "AUX" ROBBED? (WINNER-ROBBED? <>))
1765   <COND (<AND <NOT ,DEAD> <EQUAL? ,HERE ,TREASURE-ROOM>>)
1766         (<NOT ,THIEF-HERE>
1767          <COND (<AND <NOT ,DEAD> <NOT .HERE?> <PROB 30>>
1768                 <COND (<IN? ,STILETTO ,THIEF>
1769                        <FCLEAR ,THIEF ,INVISIBLE>
1770                        <TELL
1771 "Someone carrying a large bag is casually leaning against one of the
1772 walls here. He does not speak, but it is clear from his aspect that
1773 the bag will be taken only over his dead body." CR>
1774                        <SETG THIEF-HERE T>
1775                        <RTRUE>)
1776                       ;(<IN? ,STILETTO ,WINNER>
1777                        <MOVE ,STILETTO ,THIEF>
1778                        <FSET ,STILETTO ,NDESCBIT>
1779                        <FCLEAR ,THIEF ,INVISIBLE>
1780                        <TELL
1781 "You feel a light finger-touch, and turning, notice a grinning figure
1782 holding a large bag in one hand and a stiletto in the other.">
1783                        <SETG THIEF-HERE T>
1784                        <RTRUE>)>)
1785                (<AND .HERE?
1786                      <FSET? ,THIEF ,FIGHTBIT>
1787                      <NOT <WINNING? ,THIEF>>>
1788                 <TELL
1789 "Your opponent, determining discretion to be the better part of
1790 valor, decides to terminate this little contretemps. With a rueful
1791 nod of his head, he steps backward into the gloom and disappears." CR>
1792                 <FSET ,THIEF ,INVISIBLE>
1793                 <FCLEAR ,THIEF ,FIGHTBIT>
1794                 <RECOVER-STILETTO>
1795                 <RTRUE>)
1796                (<AND .HERE? <FSET? ,THIEF ,FIGHTBIT> <PROB 90>>
1797                 <RFALSE>)
1798                (<AND .HERE? <PROB 30>>
1799                 <TELL
1800 "The holder of the large bag just left, looking disgusted.
1801 Fortunately, he took nothing." CR>
1802                 <FSET ,THIEF ,INVISIBLE>
1803                 <RECOVER-STILETTO>
1804                 <RTRUE>)
1805                (<PROB 70> <RFALSE>)
1806                (<NOT ,DEAD>
1807                 <COND (<ROB ,HERE ,THIEF 100>
1808                        <SET ROBBED? ,HERE>)
1809                       (<ROB ,WINNER ,THIEF>
1810                        <SET ROBBED? ,PLAYER>)>
1811                 <SETG THIEF-HERE T>
1812                 <COND (<AND .ROBBED? <NOT .HERE?>>
1813                        <TELL
1814 "A seedy-looking individual with a large bag just wandered through
1815 the room. On the way through, he quietly abstracted some valuables from ">
1816                        <COND (<EQUAL? .ROBBED? ,HERE>
1817                               <TELL "the room">)
1818                              (ELSE
1819                               <TELL "your possession">)>
1820                        <TELL ", mumbling something about
1821 \"Doing unto others before...\"" CR>
1822                        <STOLE-LIGHT?>)
1823                       (.HERE?
1824                        <RECOVER-STILETTO>
1825                        <COND (.ROBBED?
1826                               <TELL
1827 "The thief just left, still carrying his large bag. You may
1828 not have noticed that he ">
1829                               <COND (<EQUAL? .ROBBED? ,PLAYER>
1830                                      <TELL
1831 "robbed you blind first.">)
1832                                     (T
1833                                      <TELL
1834 "appropriated the valuables in the room.">)>
1835                               <CRLF>
1836                               <STOLE-LIGHT?>)
1837                              (T
1838                               <TELL
1839 "The thief, finding nothing of value, left disgusted." CR>)>
1840                        <FSET ,THIEF ,INVISIBLE>
1841                        <SET HERE? <>>
1842                        <RTRUE>)
1843                       (T
1844                        <TELL
1845 "A \"lean and hungry\" gentleman just wandered through, carrying a
1846 large bag. Finding nothing of value, he left disgruntled." CR>
1847                        <RTRUE>)>)>)
1848         (T
1849          <COND (.HERE?                  ;"Here, already announced."
1850                 <COND (<PROB 30>
1851                        <COND (<ROB ,HERE ,THIEF 100>
1852                               <SET ROBBED? ,HERE>)
1853                              (<ROB ,WINNER ,THIEF>
1854                               <SET ROBBED? ,PLAYER>)>
1855                        <COND (.ROBBED?
1856                               <TELL
1857 "The thief just left, still carrying his large bag. You may
1858 not have noticed that he ">
1859                               <COND (<EQUAL? .ROBBED? ,PLAYER>
1860                                      <TELL
1861 "robbed you blind first.">)
1862                                     (T
1863                                      <TELL
1864 "appropriated the valuables in the room.">)>
1865                               <CRLF>
1866                               <STOLE-LIGHT?>)
1867                              (T
1868                               <TELL
1869 "The thief, finding nothing of value, left disgusted." CR>)>
1870                        <FSET ,THIEF ,INVISIBLE>
1871                        <SET HERE? <>>
1872                        <RECOVER-STILETTO>)>)>)>
1873        <RFALSE>>
1874
1875 <ROUTINE STOLE-LIGHT? ("AUX" OLD-LIT)
1876          <SET OLD-LIT ,LIT>
1877          <SETG LIT <LIT? ,HERE>>
1878          <COND (<AND <NOT ,LIT> .OLD-LIT>
1879                 <TELL "The thief seems to have left you in the dark." CR>)>
1880          <RTRUE>>
1881
1882 "SNARF STILETTO IF DROPPED IT"
1883
1884 ;"RECOVER-STILETTO moved to DEMONS"
1885
1886 "PUT HIS BOOTY IN TREASURE ROOM"
1887
1888 <ROUTINE HACK-TREASURES ("AUX" X)
1889          <RECOVER-STILETTO>
1890          <FSET ,THIEF ,INVISIBLE>
1891          <SET X <FIRST? ,TREASURE-ROOM>>
1892          <REPEAT ()
1893                  <COND (<NOT .X> <RETURN>)
1894                        (T <FCLEAR .X ,INVISIBLE>)>
1895                  <SET X <NEXT? .X>>>>
1896
1897 <ROUTINE DEPOSIT-BOOTY (RM "AUX" X N (FLG <>))
1898          <SET X <FIRST? ,THIEF>>
1899          <REPEAT ()
1900                  <COND (<NOT .X> <RETURN .FLG>)>
1901                  <SET N <NEXT? .X>>
1902                  <COND (<EQUAL? .X ,STILETTO ,LARGE-BAG>)
1903                        (<G? <GETP .X ,P?TVALUE> 0>
1904                         <MOVE .X .RM>
1905                         <SET FLG T>
1906                         <COND (<EQUAL? .X ,EGG>
1907                                <SETG EGG-SOLVE T>
1908                                <FSET ,EGG ,OPENBIT>)>)>
1909                  <SET X .N>>>
1910
1911 "TAKE ALL OF THE VALUABLES SOMEWHERE AND PUT THEM SOMEWHERE ELSE"
1912
1913 "MOVED TO DEMONS"
1914
1915 "ROB MAZE"
1916
1917 <ROUTINE ROB-MAZE (RM "AUX" X N)
1918          <SET X <FIRST? .RM>>
1919          <REPEAT ()
1920                  <COND (<NOT .X> <RFALSE>)>
1921                  <SET N <NEXT? .X>>
1922                  <COND (<AND <FSET? .X ,TAKEBIT>
1923                              <NOT <FSET? .X ,INVISIBLE>>
1924                              <PROB 40>>
1925                         <TELL
1926 "You hear, off in the distance, someone saying \"My, I wonder what
1927 this fine " D .X " is doing here.\"" CR>
1928                         <COND (<PROB 60 80>
1929                                <MOVE .X ,THIEF>
1930                                <FSET .X ,TOUCHBIT>
1931                                <FSET .X ,INVISIBLE>)>
1932                         <RETURN>)>
1933                  <SET X .N>>>
1934
1935 "STEAL SOME JUNK - moved to DEMONS"
1936
1937 "DROP SOME JUNK - moved to DEMONS"
1938
1939
1940
1941 \\f
1942
1943 "ROBBER-FUNCTION -- more prosaic thiefly occupations"
1944
1945 <GLOBAL THIEF-ENGROSSED <>>
1946
1947 <ROUTINE ROBBER-FUNCTION ("OPTIONAL" (MODE <>) "AUX" (FLG <>) X N)
1948          <COND (<VERB? TELL>
1949                 <TELL "The thief is a strong, silent type." CR>
1950                 <SETG P-CONT <>>)
1951                (<NOT .MODE>
1952                 <COND (<AND <VERB? HELLO>
1953                             <EQUAL? <GETP ,THIEF ,P?LDESC> ,ROBBER-U-DESC>>
1954                        <TELL
1955 "The thief, being temporarily incapacitated, is unable to acknowledge
1956 your greeting with his usual graciousness." CR>)
1957                       (<AND <EQUAL? ,PRSO ,KNIFE>
1958                             <VERB? THROW>
1959                             <NOT <FSET? ,THIEF ,FIGHTBIT>>>
1960                        <MOVE ,PRSO ,HERE>
1961                        <COND (<PROB 10 0>
1962                               <TELL
1963 "You evidently frightened the robber, though you didn't hit him. He
1964 flees">
1965                               <REMOVE ,LARGE-BAG>
1966                               <SET X <>>
1967                               <COND (<IN? ,STILETTO ,THIEF>
1968                                      <REMOVE ,STILETTO>
1969                                      <SET X T>)>
1970                               <COND (<FIRST? ,THIEF>
1971                                      <MOVE-ALL ,THIEF ,HERE>
1972                                      <TELL
1973 ", but the contents of his bag fall on the floor.">)
1974                                     (T
1975                                      <TELL ".">)>
1976                               <MOVE ,LARGE-BAG ,THIEF>
1977                               <COND (.X <MOVE ,STILETTO ,THIEF>)>
1978                               <CRLF>
1979                               <FSET ,THIEF ,INVISIBLE>)
1980                              (T
1981                               <TELL
1982 "You missed. The thief makes no attempt to take the knife, though it
1983 would be a fine addition to the collection in his bag. He does seem
1984 angered by your attempt." CR>
1985                               <FSET ,THIEF ,FIGHTBIT>)>)
1986                       (<AND <VERB? THROW GIVE>
1987                             ,PRSO
1988                             <NOT <EQUAL? ,PRSO ,THIEF>>
1989                             <EQUAL? ,PRSI ,THIEF>>
1990                        <COND (<L? <GETP ,THIEF ,P?STRENGTH> 0>
1991                               <PUTP ,THIEF
1992                                     ,P?STRENGTH
1993                                     <- <GETP ,THIEF ,P?STRENGTH>>>
1994                               <ENABLE <INT I-THIEF>>
1995                               <RECOVER-STILETTO>
1996                               <PUTP ,THIEF ,P?LDESC ,ROBBER-C-DESC>
1997                               <TELL
1998 "Your proposed victim suddenly recovers consciousness." CR>)>
1999                        <MOVE ,PRSO ,THIEF>
2000                        <COND ;(<EQUAL? ,PRSO ,STILETTO>
2001                               <TELL
2002 "The thief takes his stiletto and salutes you with a small nod of
2003 his head." CR>)
2004                              (<G? <GETP ,PRSO ,P?TVALUE> 0>
2005                               <SETG THIEF-ENGROSSED T>
2006                               <TELL
2007 "The thief is taken aback by your unexpected generosity, but accepts
2008 the " D ,PRSO " and stops to admire its beauty." CR>)
2009                              (T
2010                               <TELL
2011 "The thief places the " D ,PRSO " in his bag and thanks
2012 you politely." CR>)>)
2013                       (<VERB? TAKE>
2014                        <TELL
2015 "Once you got him, what would you do with him?" CR>)
2016                       (<VERB? EXAMINE LOOK-INSIDE>
2017                        <TELL
2018 "The thief is a slippery character with beady eyes that flit back
2019 and forth. He carries, along with an unmistakable arrogance, a large bag
2020 over his shoulder and a vicious stiletto, whose blade is aimed
2021 menacingly in your direction. I'd watch out if I were you." CR>)
2022                       (<VERB? LISTEN>
2023                        <TELL
2024 "The thief says nothing, as you have not been formally introduced." CR>)>)
2025                (<EQUAL? .MODE ,F-BUSY?>
2026                 <COND (<IN? ,STILETTO ,THIEF> <>)
2027                       (<IN? ,STILETTO <LOC ,THIEF>>
2028                        <MOVE ,STILETTO ,THIEF>
2029                        <FSET ,STILETTO ,NDESCBIT>
2030                        <COND (<IN? ,THIEF ,HERE>
2031                               <TELL
2032 "The robber, somewhat surprised at this turn of events, nimbly
2033 retrieves his stiletto." CR>)>
2034                        T)>)
2035                (<EQUAL? .MODE ,F-DEAD>
2036                 <MOVE ,STILETTO ,HERE>
2037                 <FCLEAR ,STILETTO ,NDESCBIT>
2038                 <SET X <DEPOSIT-BOOTY ,HERE>>
2039                 <COND (<EQUAL? ,HERE ,TREASURE-ROOM>
2040                        <SET X <FIRST? ,HERE>>
2041                        <REPEAT ()
2042                                <COND
2043                                 (<NOT .X>
2044                                  <TELL "The chalice is now safe to take." CR>
2045                                  <RETURN>)
2046                                 (<NOT <EQUAL? .X ,CHALICE ,THIEF ,ADVENTURER>>
2047                                  <FCLEAR .X ,INVISIBLE>
2048                                  <COND (<NOT .FLG>
2049                                         <SET FLG T>
2050                                         <TELL
2051 "As the thief dies, the power of his magic decreases, and his
2052 treasures reappear:" CR>)>
2053                                  <TELL "  A " D .X>
2054                                  <COND (<AND <FIRST? .X>
2055                                              <SEE-INSIDE? .X>>
2056                                         <TELL ", with ">
2057                                         <PRINT-CONTENTS .X>)>
2058                                  <CRLF>)>
2059                                <SET X <NEXT? .X>>>)
2060                       (.X
2061                        <TELL "His booty remains." CR>)>
2062                 <DISABLE <INT I-THIEF>>)
2063                (<EQUAL? .MODE ,F-FIRST?>
2064                 <COND (<AND ,THIEF-HERE
2065                             <NOT <FSET? ,THIEF ,INVISIBLE>>
2066                             <PROB 20>>
2067                        <FSET ,THIEF ,FIGHTBIT>
2068                        <SETG P-CONT <>>
2069                        T)>)
2070                (<EQUAL? .MODE ,F-UNCONSCIOUS>
2071                 <DISABLE <INT I-THIEF>>
2072                 <FCLEAR ,THIEF ,FIGHTBIT>
2073                 <MOVE ,STILETTO ,HERE>
2074                 <FCLEAR ,STILETTO ,NDESCBIT>
2075                 <PUTP ,THIEF ,P?LDESC ,ROBBER-U-DESC>)
2076                (<EQUAL? .MODE ,F-CONSCIOUS>
2077                 <COND (<EQUAL? <LOC ,THIEF> ,HERE>
2078                        <FSET ,THIEF ,FIGHTBIT>
2079                        <TELL
2080 "The robber revives, briefly feigning continued unconsciousness, and,
2081 when he sees his moment, scrambles away from you." CR>)>
2082                 <ENABLE <INT I-THIEF>>
2083                 <PUTP ,THIEF ,P?LDESC ,ROBBER-C-DESC>
2084                 <RECOVER-STILETTO>)>>
2085
2086 <GLOBAL ROBBER-C-DESC
2087 "There is a suspicious-looking individual, holding a bag, leaning
2088 against one wall. He is armed with a vicious-looking stiletto.">
2089
2090 <GLOBAL ROBBER-U-DESC
2091 "There is a suspicious-looking individual lying unconscious on the
2092 ground.">
2093
2094 <ROUTINE LARGE-BAG-F ()
2095          <COND (<VERB? TAKE>
2096                 <COND (<EQUAL? <GETP ,THIEF ,P?LDESC> ,ROBBER-U-DESC>
2097                        <TELL
2098 "Sadly for you, the robber collapsed on top of the bag. Trying to take
2099 it would wake him." CR>)
2100                       (T
2101                        <TELL
2102 "The bag will be taken over his dead body." CR>)>)
2103                (<AND <VERB? PUT>
2104                      <EQUAL? ,PRSI ,LARGE-BAG>>
2105                 <TELL "It would be a good trick." CR>)
2106                (<VERB? OPEN CLOSE>
2107                 <TELL
2108 "Getting close enough would be a good trick." CR>)
2109                (<VERB? EXAMINE LOOK-INSIDE>
2110                 <TELL
2111 "The bag is underneath the thief, so one can't say what, if anything, is
2112 inside." CR>)>>
2113
2114 <ROUTINE MOVE-ALL (FROM TO "AUX" X N)
2115          <COND (<SET X <FIRST? .FROM>>
2116                 <REPEAT ()
2117                         <COND (<NOT .X> <RETURN>)>
2118                         <SET N <NEXT? .X>>
2119                         <FCLEAR .X ,INVISIBLE>
2120                         <MOVE .X .TO>
2121                         <SET X .N>>)>>
2122
2123 <ROUTINE CHALICE-FCN ()
2124          <COND (<VERB? TAKE>
2125                 <COND (<AND <IN? ,PRSO ,TREASURE-ROOM>
2126                             <IN? ,THIEF ,TREASURE-ROOM>
2127                             <FSET? ,THIEF ,FIGHTBIT>
2128                             <NOT <FSET? ,THIEF ,INVISIBLE>>
2129                             <NOT <EQUAL? <GETP ,THIEF ,P?LDESC>
2130                                          ,ROBBER-U-DESC>>>
2131                        <TELL
2132 "You'd be stabbed in the back first." CR>)>)
2133                (<AND <VERB? PUT> <EQUAL? ,PRSI ,CHALICE>>
2134                 <TELL
2135 "You can't. It's not a very good chalice, is it?" CR>)
2136                (T <DUMB-CONTAINER>)>>
2137
2138 <ROUTINE TREASURE-ROOM-FCN (RARG "AUX" TL)
2139          <COND (<AND <EQUAL? .RARG ,M-ENTER>
2140                      <1? <GET <INT I-THIEF> ,C-ENABLED?>>
2141                      <NOT ,DEAD>>
2142                 <COND (<NOT <IN? ,THIEF ,HERE>>
2143                        <TELL
2144 "You hear a scream of anguish as you violate the robber's hideaway.
2145 Using passages unknown to you, he rushes to its defense." CR>
2146                        <MOVE ,THIEF ,HERE>)>
2147                 <FSET ,THIEF ,FIGHTBIT>
2148                 <FCLEAR ,THIEF ,INVISIBLE>
2149                 <THIEF-IN-TREASURE>)>>
2150
2151 <ROUTINE THIEF-IN-TREASURE ("AUX" F N)
2152          <SET F <FIRST? ,HERE>>
2153          <COND (<AND .F <NEXT? .F>>
2154                 <TELL
2155 "The thief gestures mysteriously, and the treasures in the room
2156 suddenly vanish." CR CR>)>
2157          <REPEAT ()
2158                  <COND (<NOT .F> <RETURN>)
2159                        (<NOT <EQUAL? .F ,CHALICE ,THIEF>>
2160                         <FSET .F ,INVISIBLE>)>
2161                  <SET F <NEXT? .F>>>>
2162
2163 <ROUTINE FRONT-DOOR-FCN ()
2164          <COND (<VERB? OPEN>
2165                 <TELL "The door cannot be opened." CR>)
2166                (<VERB? BURN>
2167                 <TELL
2168                  "You cannot burn this door." CR>)
2169                (<VERB? MUNG>
2170                 <TELL "You can't seem to damage the door." CR>)
2171                (<VERB? LOOK-BEHIND>
2172                 <TELL "It won't open." CR>)>>
2173
2174 \\f
2175
2176 "SUBTITLE RANDOM FUNCTIONS"
2177
2178 <ROUTINE BODY-FUNCTION ()
2179          <COND (<VERB? TAKE>
2180                 <TELL "A force keeps you from taking the bodies." CR>)
2181                (<VERB? MUNG BURN>
2182                 <JIGS-UP
2183 "The voice of the guardian of the dungeon booms out from the darkness,
2184 \"Your disrespect costs you your life!\" and places your head on a sharp
2185 pole.">)>>
2186
2187 <ROUTINE BLACK-BOOK ()
2188          <COND (<VERB? OPEN>
2189                 <TELL "The book is already open to page 569." CR>)
2190                (<VERB? CLOSE>
2191                 <TELL "As hard as you try, the book cannot be closed." CR>)
2192                (<OR <VERB? TURN>
2193                     <AND <VERB? READ-PAGE>
2194                          <EQUAL? ,PRSI ,INTNUM>
2195                          <NOT <EQUAL? ,P-NUMBER 569>>>>
2196                 <TELL
2197 "Beside page 569, there is only one other page with any legible printing on
2198 it. Most of it is unreadable, but the subject seems to be the banishment of
2199 evil. Apparently, certain noises, lights, and prayers are efficacious in this
2200 regard." CR>)
2201                (<VERB? BURN>
2202                 <REMOVE-CAREFULLY ,PRSO>
2203                 <JIGS-UP
2204 "A booming voice says \"Wrong, cretin!\" and you notice that you have
2205 turned into a pile of dust. How, I can't imagine.">)>>
2206
2207 <ROUTINE PAINTING-FCN ()
2208          <COND (<VERB? MUNG>
2209                 <PUTP ,PRSO ,P?TVALUE 0>
2210                 <PUTP ,PRSO ,P?LDESC
2211 "There is a worthless piece of canvas here.">
2212                 <TELL
2213 "Congratulations! Unlike the other vandals, who merely stole the
2214 artist's masterpieces, you have destroyed one." CR>)>>
2215
2216 \\f
2217
2218 "SUBTITLE LET THERE BE LIGHT SOURCES"
2219
2220 <GLOBAL LAMP-TABLE
2221         <TABLE (PURE)
2222                100
2223                "The lamp appears a bit dimmer."
2224                70
2225                "The lamp is definitely dimmer now."
2226                15   
2227                "The lamp is nearly out."
2228                0>>
2229
2230 <ROUTINE LANTERN ()
2231          <COND (<VERB? THROW>
2232                 <TELL
2233 "The lamp has smashed into the floor, and the light has gone out." CR>
2234                 <DISABLE <INT I-LANTERN>>
2235                 <REMOVE-CAREFULLY ,LAMP>
2236                 <MOVE ,BROKEN-LAMP ,HERE>)
2237                (<VERB? LAMP-ON>
2238                 <COND (<FSET? ,LAMP ,RMUNGBIT>
2239                        <TELL "A burned-out lamp won't light." CR>)
2240                       (T
2241                        <ENABLE <INT I-LANTERN>>
2242                        <>)>)
2243                (<VERB? LAMP-OFF>
2244                 <COND (<FSET? ,LAMP ,RMUNGBIT>
2245                        <TELL "The lamp has already burned out." CR>)
2246                       (T
2247                        <DISABLE <INT I-LANTERN>>
2248                        <>)>)
2249                (<VERB? EXAMINE>
2250                 <TELL "The lamp ">
2251                 <COND (<FSET? ,LAMP ,RMUNGBIT>
2252                        <TELL "has burned out.">)
2253                       (<FSET? ,LAMP ,ONBIT>
2254                        <TELL "is on.">)
2255                       (T
2256                        <TELL "is turned off.">)>
2257                 <CRLF>)>>
2258
2259 <ROUTINE MAILBOX-F ()
2260          <COND (<AND <VERB? TAKE> <EQUAL? ,PRSO ,MAILBOX>>
2261                 <TELL "It is securely anchored." CR>)>>
2262
2263 <GLOBAL MATCH-COUNT 6>
2264
2265 <ROUTINE MATCH-FUNCTION ("AUX" CNT)
2266          <COND (<AND <VERB? LAMP-ON BURN> <EQUAL? ,PRSO ,MATCH>>
2267                 <COND (<G? ,MATCH-COUNT 0>
2268                        <SETG MATCH-COUNT <- ,MATCH-COUNT 1>>)>
2269                 <COND (<NOT <G? ,MATCH-COUNT 0>>
2270                        <TELL
2271                         "I'm afraid that you have run out of matches." CR>)
2272                       (<EQUAL? ,HERE ,LOWER-SHAFT ,TIMBER-ROOM>
2273                        <TELL
2274 "This room is drafty, and the match goes out instantly." CR>)
2275                       (T
2276                        <FSET ,MATCH ,FLAMEBIT>
2277                        <FSET ,MATCH ,ONBIT>
2278                        <ENABLE <QUEUE I-MATCH 2>>
2279                        <TELL "One of the matches starts to burn." CR>
2280                        <COND (<NOT ,LIT>
2281                               <SETG LIT T>
2282                               <V-LOOK>)>
2283                        <RTRUE>)>)
2284                (<AND <VERB? LAMP-OFF> <FSET? ,MATCH ,FLAMEBIT>>
2285                 <TELL "The match is out." CR>
2286                 <FCLEAR ,MATCH ,FLAMEBIT>
2287                 <FCLEAR ,MATCH ,ONBIT>
2288                 <SETG LIT <LIT? ,HERE>>
2289                 <COND (<NOT ,LIT> <TELL "It's pitch black in here!" CR>)>
2290                 <QUEUE I-MATCH 0>
2291                 <RTRUE>)
2292                (<VERB? COUNT OPEN>
2293                 <TELL "You have ">
2294                 <SET CNT <- ,MATCH-COUNT 1>>
2295                 <COND (<NOT <G? .CNT 0>> <TELL "no">)
2296                       (T <TELL N .CNT>)>
2297                 <TELL " match">
2298                 <COND (<NOT <1? .CNT>> <TELL "es.">) (T <TELL ".">)>
2299                 <CRLF>)
2300                (<VERB? EXAMINE>
2301                 <COND (<FSET? ,MATCH ,ONBIT>
2302                        <TELL "The match is burning.">)
2303                       (T
2304                        <TELL
2305 "The matchbook isn't very interesting, except for what's written on it.">)>
2306                 <CRLF>)>>
2307
2308 <ROUTINE I-MATCH ()
2309          <TELL "The match has gone out." CR>
2310          <FCLEAR ,MATCH ,FLAMEBIT>
2311          <FCLEAR ,MATCH ,ONBIT>
2312          <SETG LIT <LIT? ,HERE>>
2313          <RTRUE>>
2314
2315 <ROUTINE I-LANTERN ("AUX" TICK (TBL <VALUE LAMP-TABLE>))
2316          <ENABLE <QUEUE I-LANTERN <SET TICK <GET .TBL 0>>>>
2317          <LIGHT-INT ,LAMP .TBL .TICK>
2318          <COND (<NOT <0? .TICK>>
2319                 <SETG LAMP-TABLE <REST .TBL 4>>)>>
2320
2321 <ROUTINE I-CANDLES ("AUX" TICK (TBL <VALUE CANDLE-TABLE>))
2322          <FSET ,CANDLES ,TOUCHBIT>
2323          <ENABLE <QUEUE I-CANDLES <SET TICK <GET .TBL 0>>>>
2324          <LIGHT-INT ,CANDLES .TBL .TICK>
2325          <COND (<NOT <0? .TICK>>
2326                 <SETG CANDLE-TABLE <REST .TBL 4>>)>>
2327
2328 <ROUTINE LIGHT-INT (OBJ TBL TICK)
2329          <COND (<0? .TICK>
2330                 <FCLEAR .OBJ ,ONBIT>
2331                 <FSET .OBJ ,RMUNGBIT>)>
2332          <COND (<OR <HELD? .OBJ> <IN? .OBJ ,HERE>>
2333                 <COND (<0? .TICK>
2334                        <TELL
2335 "You'd better have more light than from the " D .OBJ "." CR>)
2336                       (T
2337                        <TELL <GET .TBL 1> CR>)>)>>
2338
2339 <ROUTINE MIN (N1 N2)
2340          <COND (<L? .N1 .N2> .N1)
2341                (T .N2)>>
2342
2343 <ROUTINE CANDLES-FCN ()
2344          <COND (<NOT <FSET? ,CANDLES ,TOUCHBIT>>
2345                 <ENABLE <INT I-CANDLES>>)>
2346          <COND (<EQUAL? ,CANDLES ,PRSI> <RFALSE>)
2347                (T
2348                 <COND (<VERB? LAMP-ON BURN>
2349                        <COND (<FSET? ,CANDLES ,RMUNGBIT>
2350                               <TELL
2351 "Alas, there's not much left of the candles. Certainly not enough to
2352 burn." CR>)
2353                              (<NOT ,PRSI>
2354                               <COND (<FSET? ,MATCH ,FLAMEBIT>
2355                                      <TELL "(with the match)" CR>
2356                                      <PERFORM ,V?LAMP-ON ,CANDLES ,MATCH>
2357                                      <RTRUE>)
2358                                     (T
2359                                      <TELL
2360 "You should say what to light them with." CR>
2361                                      <RFATAL>)>)
2362                              (<AND <EQUAL? ,PRSI ,MATCH>
2363                                    <FSET? ,MATCH ,ONBIT>>
2364                               <TELL "The candles are ">
2365                               <COND (<FSET? ,CANDLES ,ONBIT>
2366                                      <TELL "already lit." CR>)
2367                                     (T
2368                                      <FSET ,CANDLES ,ONBIT>
2369                                      <TELL "lit." CR>
2370                                      <ENABLE <INT I-CANDLES>>)>)
2371                              (<EQUAL? ,PRSI ,TORCH>
2372                               <COND (<FSET? ,CANDLES ,ONBIT>
2373                                      <TELL
2374 "You realize, just in time, that the candles are already lighted." CR>)
2375                                     (T
2376                                      <TELL
2377 "The heat from the torch is so intense that the candles are vaporized." CR>
2378                                      <REMOVE-CAREFULLY ,CANDLES>)>)
2379                              (T
2380                               <TELL
2381 "You have to light them with something that's burning, you know." CR>)>)
2382                       (<VERB? COUNT>
2383                        <TELL
2384 "Let's see, how many objects in a pair? Don't tell me, I'll get it." CR>)
2385                       (<VERB? LAMP-OFF>
2386                        <DISABLE <INT I-CANDLES>>
2387                        <COND (<FSET? ,CANDLES ,ONBIT>
2388                               <TELL "The flame is extinguished.">
2389                               <FCLEAR ,CANDLES ,ONBIT>
2390                               <FSET ,CANDLES ,TOUCHBIT>
2391                               <SETG LIT <LIT? ,HERE>>
2392                               <COND (<NOT ,LIT>
2393                                      <TELL " It's really dark in here....">)>
2394                               <CRLF>
2395                               <RTRUE>)
2396                              (T <TELL "The candles are not lighted." CR>)>)
2397                       (<AND <VERB? PUT> <FSET? ,PRSI ,BURNBIT>>
2398                        <TELL "That wouldn't be smart." CR>)
2399                       (<VERB? EXAMINE>
2400                        <TELL "The candles are ">
2401                        <COND (<FSET? ,CANDLES ,ONBIT>
2402                               <TELL "burning.">)
2403                              (T <TELL "out.">)>
2404                        <CRLF>)>)>>
2405
2406 <GLOBAL CANDLE-TABLE
2407         <TABLE (PURE)
2408                20
2409                "The candles grow shorter."
2410                10
2411                "The candles are becoming quite short."
2412                5
2413                "The candles won't last long now."
2414                0>>
2415
2416 <ROUTINE CAVE2-ROOM (RARG)
2417   <COND (<EQUAL? .RARG ,M-END>
2418          <COND (<AND <IN? ,CANDLES ,WINNER>
2419                      <PROB 50 80>
2420                      <FSET? ,CANDLES ,ONBIT>>
2421                 <DISABLE <INT I-CANDLES>>
2422                 <FCLEAR ,CANDLES ,ONBIT>
2423                 <TELL
2424 "A gust of wind blows out your candles!" CR>
2425                 <COND (<NOT <SETG LIT <LIT? ,HERE>>>
2426                        <TELL "It is now completely dark." CR>)>)>)>>
2427
2428 \\f
2429
2430 "SUBTITLE ASSORTED WEAPONS"
2431
2432 <ROUTINE SWORD-FCN ("AUX" G)
2433          <COND (<AND <VERB? TAKE> <EQUAL? ,WINNER ,ADVENTURER>>
2434                 <ENABLE <QUEUE I-SWORD -1>>
2435                 <>)
2436                (<VERB? EXAMINE>
2437                 <COND (<EQUAL? <SET G <GETP ,SWORD ,P?TVALUE>> 1>
2438                        <TELL
2439 "Your sword is glowing with a faint blue glow." CR>)
2440                       (<EQUAL? .G 2>
2441                        <TELL
2442 "Your sword is glowing very brightly." CR>)>)>>
2443
2444 "SUBTITLE COAL MINE"
2445
2446 <ROUTINE BOOM-ROOM (RARG "AUX" (DUMMY? <>) FLAME)
2447          <COND (<EQUAL? .RARG ,M-END>
2448                 <COND (<AND <EQUAL? .RARG ,M-END>
2449                             <VERB? LAMP-ON BURN>
2450                             <EQUAL? ,PRSO ,CANDLES ,TORCH ,MATCH>>
2451                        <SET DUMMY? T>)>
2452                 <COND (<OR <AND <HELD? ,CANDLES>
2453                                 <FSET? ,CANDLES ,ONBIT>>
2454                            <AND <HELD? ,TORCH>
2455                                 <FSET? ,TORCH ,ONBIT>>
2456                            <AND <HELD? ,MATCH>
2457                                 <FSET? ,MATCH ,ONBIT>>>
2458                        <COND (.DUMMY?
2459                               <TELL
2460 "How sad for an aspiring adventurer to light a " D ,PRSO " in a room which
2461 reeks of gas. Fortunately, there is justice in the world." CR>)
2462                              (T
2463                               <TELL
2464 "Oh dear. It appears that the smell coming from this room was coal gas.
2465 I would have thought twice about carrying flaming objects in here." CR>)>
2466                        <JIGS-UP "|
2467       ** BOOOOOOOOOOOM **">)>)>> 
2468
2469 <ROUTINE BAT-D ("OPTIONAL" FOO)
2470          <COND (<EQUAL? <LOC ,GARLIC> ,WINNER ,HERE>
2471                 <TELL
2472 "In the corner of the room on the ceiling is a large vampire bat who
2473 is obviously deranged and holding his nose." CR>)
2474                (T
2475                 <TELL
2476 "A large vampire bat, hanging from the ceiling, swoops down at you!" CR>)>>
2477
2478 <ROUTINE BATS-ROOM (RARG)
2479          <COND (<EQUAL? .RARG ,M-LOOK>
2480                 <TELL
2481 "You are in a small room which has doors only to the east and south." CR>)
2482                (<AND <EQUAL? .RARG ,M-ENTER> <NOT ,DEAD>>
2483                 <COND (<NOT <EQUAL? <LOC ,GARLIC> ,WINNER ,HERE>>
2484                        <V-LOOK>
2485                        <CRLF>
2486                        <FLY-ME>)>)>>
2487
2488 <ROUTINE MACHINE-ROOM-FCN (RARG)
2489          <COND (<EQUAL? .RARG ,M-LOOK>
2490                 <TELL
2491 "This is a large, cold room whose sole exit is to the north. In one
2492 corner there is a machine which is reminiscent of a clothes
2493 dryer. On its face is a switch which is labelled \"START\".
2494 The switch does not appear to be manipulable by any human hand (unless the
2495 fingers are about 1/16 by 1/4 inch). On the front of the machine is a large
2496 lid, which is ">
2497                 <COND (<FSET? ,MACHINE ,OPENBIT>
2498                        <TELL "open.">)
2499                       (T <TELL "closed.">)>
2500                 <CRLF>)>>
2501
2502 <ROUTINE MACHINE-F ()
2503          <COND (<AND <VERB? TAKE> <EQUAL? ,PRSO ,MACHINE>>
2504                 <TELL "It is far too large to carry." CR>)
2505                (<VERB? OPEN>
2506                 <COND (<FSET? ,MACHINE ,OPENBIT>
2507                        <TELL <PICK-ONE ,DUMMY> CR>)
2508                       (<FIRST? ,MACHINE>
2509                        <TELL "The lid opens, revealing ">
2510                        <PRINT-CONTENTS ,MACHINE>
2511                        <TELL "." CR>
2512                        <FSET ,MACHINE ,OPENBIT>)
2513                       (T
2514                        <TELL "The lid opens." CR>
2515                        <FSET ,MACHINE ,OPENBIT>)>)
2516                (<VERB? CLOSE>
2517                 <COND (<FSET? ,MACHINE ,OPENBIT>
2518                        <TELL "The lid closes." CR>
2519                        <FCLEAR ,MACHINE ,OPENBIT>
2520                        T)
2521                       (T
2522                        <TELL <PICK-ONE ,DUMMY> CR>)>)
2523                (<VERB? LAMP-ON>
2524                 <COND (<NOT ,PRSI>
2525                        <TELL
2526 "It's not clear how to turn it on with your bare hands." CR>)
2527                       (T
2528                        <PERFORM ,V?TURN ,MACHINE-SWITCH ,PRSI>
2529                        <RTRUE>)>)>>
2530
2531 <ROUTINE MSWITCH-FUNCTION ("AUX" O)
2532          <COND (<VERB? TURN>
2533                 <COND (<EQUAL? ,PRSI ,SCREWDRIVER>
2534                        <COND (<FSET? ,MACHINE ,OPENBIT>
2535                               <TELL
2536 "The machine doesn't seem to want to do anything." CR>)
2537                              (T <TELL
2538 "The machine comes to life (figuratively) with a dazzling display of
2539 colored lights and bizarre noises. After a few moments, the
2540 excitement abates." CR>
2541                               <COND (<IN? ,COAL ,MACHINE>
2542                                      <REMOVE-CAREFULLY ,COAL>
2543                                      <MOVE ,DIAMOND ,MACHINE>)
2544                                     (T
2545                                      <REPEAT ()
2546                                              <COND (<SET O <FIRST? ,MACHINE>>
2547                                                     <REMOVE-CAREFULLY .O>)
2548                                                    (T <RETURN>)>>
2549                                      <MOVE ,GUNK ,MACHINE>)>)>)
2550                       (T
2551                        <TELL "It seems that a " D ,PRSI " won't do." CR>)>)>>
2552
2553 <ROUTINE GUNK-FUNCTION ()
2554          <REMOVE-CAREFULLY ,GUNK>
2555          <TELL
2556 "The slag was rather insubstantial, and crumbles into dust at your touch." CR>>
2557
2558 <ROUTINE NO-OBJS (RARG "AUX" F)
2559          <COND (<EQUAL? .RARG ,M-BEG>
2560                 <SET F <FIRST? ,WINNER>>
2561                 <SETG EMPTY-HANDED T>
2562                 <REPEAT ()
2563                         <COND (<NOT .F> <RETURN>)
2564                               (<G? <WEIGHT .F> 4>
2565                                <SETG EMPTY-HANDED <>>
2566                                <RETURN>)>
2567                         <SET F <NEXT? .F>>>
2568                 <COND (<AND <EQUAL? ,HERE ,LOWER-SHAFT> ,LIT>
2569                        <SCORE-UPD ,LIGHT-SHAFT>
2570                        <SETG LIGHT-SHAFT 0>)>
2571                 <RFALSE>)>>
2572
2573 <ROUTINE SOUTH-TEMPLE-FCN (RARG)
2574          <COND (<EQUAL? .RARG ,M-BEG>
2575                 <SETG COFFIN-CURE <NOT <IN? ,COFFIN ,WINNER>>>
2576                 <RFALSE>)>>
2577
2578 <GLOBAL LIGHT-SHAFT 13>
2579 <GDECL (LIGHT-SHAFT) FIX>
2580
2581 \\f
2582
2583 "SUBTITLE OLD MAN RIVER, THAT OLD MAN RIVER..."
2584
2585 <ROUTINE WHITE-CLIFFS-FUNCTION (RARG)
2586          <COND (<EQUAL? .RARG ,M-END>
2587                 <COND (<IN? ,INFLATED-BOAT ,WINNER>
2588                        <SETG DEFLATE <>>)
2589                       (T
2590                        <SETG DEFLATE T>)>)>>
2591
2592 <ROUTINE SCEPTRE-FUNCTION ()
2593          <COND (<VERB? WAVE RAISE>
2594                 <COND (<OR <EQUAL? ,HERE ,ARAGAIN-FALLS>
2595                            <EQUAL? ,HERE ,END-OF-RAINBOW>>
2596                        <COND (<NOT ,RAINBOW-FLAG>
2597                               <FCLEAR ,POT-OF-GOLD ,INVISIBLE>
2598                               <TELL
2599 "Suddenly, the rainbow appears to become solid and, I venture,
2600 walkable (I think the giveaway was the stairs and bannister)." CR>
2601                               <COND (<AND <EQUAL? ,HERE ,END-OF-RAINBOW>
2602                                           <IN? ,POT-OF-GOLD ,END-OF-RAINBOW>>
2603                                      <TELL
2604 "A shimmering pot of gold appears at the end of the rainbow." CR>)>
2605                               <SETG RAINBOW-FLAG T>)
2606                              (T
2607                               <ROB ,ON-RAINBOW ,WALL>
2608                               <TELL
2609 "The rainbow seems to have become somewhat run-of-the-mill." CR>
2610                               <SETG RAINBOW-FLAG <>>
2611                               <RTRUE>)>)
2612                       (<EQUAL? ,HERE ,ON-RAINBOW>
2613                        <SETG RAINBOW-FLAG <>>
2614                        <JIGS-UP
2615 "The structural integrity of the rainbow is severely compromised,
2616 leaving you hanging in midair, supported only by water vapor. Bye.">)
2617                       (T
2618                        <TELL
2619 "A dazzling display of color briefly emanates from the sceptre." CR>)>)>>
2620
2621 <ROUTINE FALLS-ROOM (RARG)
2622     <COND (<EQUAL? .RARG ,M-LOOK>
2623            <TELL
2624 "You are at the top of Aragain Falls, an enormous waterfall with a
2625 drop of about 450 feet. The only path here is on the north end." CR>
2626            <COND (,RAINBOW-FLAG
2627                   <TELL
2628 "A solid rainbow spans the falls.">)
2629                  (T
2630                   <TELL
2631 "A beautiful rainbow can be seen over the falls and to the west.">)>
2632            <CRLF>)>>
2633
2634 <ROUTINE RAINBOW-FCN ()
2635          <COND (<VERB? CROSS THROUGH>
2636                 <COND (<EQUAL? ,HERE ,CANYON-VIEW>
2637                        <TELL "From here?!?" CR>
2638                        <RTRUE>)>
2639                 <COND (,RAINBOW-FLAG
2640                        <COND (<EQUAL? ,HERE ,ARAGAIN-FALLS>
2641                               <GOTO ,END-OF-RAINBOW>)
2642                              (<EQUAL? ,HERE ,END-OF-RAINBOW>
2643                               <GOTO ,ARAGAIN-FALLS>)
2644                              (T
2645                               <TELL "You'll have to say which way..." CR>)>)
2646                       (T
2647                        <TELL "Can you walk on water vapor?"
2648                              CR>)>)
2649                (<VERB? LOOK-UNDER>
2650                 <TELL "The Frigid River flows under the rainbow." CR>)>>
2651
2652 <ROUTINE DBOAT-FUNCTION ("AUX")
2653          <COND (<AND <VERB? PUT PUT-ON>
2654                      <EQUAL? ,PRSO ,PUTTY>>
2655                 <FIX-BOAT>)
2656                (<VERB? INFLATE FILL>
2657                 <TELL
2658 "No chance. Some moron punctured it." CR>)
2659                (<VERB? PLUG>
2660                 <COND (<EQUAL? ,PRSI ,PUTTY>
2661                        <FIX-BOAT>)
2662                       (T <WITH-TELL ,PRSI>)>)>>
2663
2664 <ROUTINE FIX-BOAT ()
2665          <TELL "Well done. The boat is repaired." CR>
2666          <MOVE ,INFLATABLE-BOAT <LOC ,PUNCTURED-BOAT>>
2667          <REMOVE-CAREFULLY ,PUNCTURED-BOAT>>
2668
2669 <ROUTINE RIVER-FUNCTION ()
2670          <COND (<VERB? PUT>
2671                 <COND (<EQUAL? ,PRSI ,RIVER>
2672                        <COND (<EQUAL? ,PRSO ,ME>
2673                               <JIGS-UP
2674 "You splash around for a while, fighting the current, then you drown.">)
2675                              (<EQUAL? ,PRSO ,INFLATED-BOAT>
2676                               <TELL
2677 "You should get in the boat then launch it." CR>)
2678                              (<FSET? ,PRSO ,BURNBIT>
2679                               <REMOVE-CAREFULLY ,PRSO>
2680                               <TELL
2681 "The " D ,PRSO " floats for a moment, then sinks." CR>)
2682                              (T
2683                               <REMOVE-CAREFULLY ,PRSO>
2684                               <TELL
2685 "The " D ,PRSO " splashes into the water and is gone forever." CR>)>)>)
2686                (<VERB? LEAP THROUGH>
2687                 <TELL
2688 "A look before leaping reveals that the river is wide and dangerous,
2689 with swift currents and large, half-hidden rocks. You decide to forgo your
2690 swim." CR>)>>
2691
2692 <GLOBAL RIVER-SPEEDS
2693         <LTABLE (PURE) RIVER-1 4 RIVER-2 4 RIVER-3 3 RIVER-4 2 RIVER-5 1>>
2694
2695 <GLOBAL RIVER-NEXT
2696         <LTABLE (PURE) RIVER-1 RIVER-2 RIVER-3 RIVER-4 RIVER-5>>
2697
2698 <GLOBAL RIVER-LAUNCH
2699         <LTABLE (PURE) DAM-BASE RIVER-1
2700                 WHITE-CLIFFS-NORTH RIVER-3
2701                 WHITE-CLIFFS-SOUTH RIVER-4
2702                 SHORE RIVER-5
2703                 SANDY-BEACH RIVER-4
2704                 RESERVOIR-SOUTH RESERVOIR
2705                 RESERVOIR-NORTH RESERVOIR
2706                 STREAM-VIEW IN-STREAM>>
2707
2708 <ROUTINE I-RIVER ("AUX" RM)
2709          <COND (<AND <NOT <EQUAL? ,HERE ,RIVER-1 ,RIVER-2 ,RIVER-3>>
2710                      <NOT <EQUAL? ,HERE ,RIVER-4 ,RIVER-5>>>
2711                 <DISABLE <INT I-RIVER>>)
2712                (<SET RM <LKP ,HERE ,RIVER-NEXT>>
2713                 <TELL "The flow of the river carries you downstream." CR CR>
2714                 <GOTO .RM>
2715                 <ENABLE <QUEUE I-RIVER <LKP ,HERE ,RIVER-SPEEDS>>>)
2716                (T
2717                 <JIGS-UP
2718 "Unfortunately, the magic boat doesn't provide protection from
2719 the rocks and boulders one meets at the bottom of waterfalls.
2720 Including this one.">)>>
2721
2722 <ROUTINE RBOAT-FUNCTION ("OPTIONAL" (RARG <>) "AUX" TMP)
2723     <COND (<EQUAL? .RARG ,M-ENTER ,M-END ,M-LOOK> <>)   
2724           (<EQUAL? .RARG ,M-BEG>
2725            <COND (<VERB? WALK>
2726                   <COND (<EQUAL? ,PRSO ,P?LAND ,P?EAST ,P?WEST>
2727                          <RFALSE>)
2728                         (<AND <EQUAL? ,HERE ,RESERVOIR>
2729                               <EQUAL? ,PRSO ,P?NORTH ,P?SOUTH>>
2730                          <RFALSE>)
2731                         (<AND <EQUAL? ,HERE ,IN-STREAM>
2732                               <EQUAL? ,PRSO ,P?SOUTH>>
2733                          <RFALSE>)
2734                         (T
2735                          <TELL
2736 "Read the label for the boat's instructions." CR>
2737                          <RTRUE>)>)
2738                  (<VERB? LAUNCH>
2739                   <COND (<OR <EQUAL? ,HERE ,RIVER-1 ,RIVER-2 ,RIVER-3>
2740                              <EQUAL? ,HERE ,RIVER-4 ,RESERVOIR ,IN-STREAM>>
2741                          <TELL
2742 "You are on the ">
2743                          <COND (<EQUAL? ,HERE ,RESERVOIR>
2744                                 <TELL "reservoir">)
2745                                (<EQUAL? ,HERE ,IN-STREAM>
2746                                 <TELL "stream">)
2747                                (T <TELL "river">)>
2748                          <TELL ", or have you forgotten?" CR>)
2749                         (<EQUAL? <SET TMP <GO-NEXT ,RIVER-LAUNCH>> 1>
2750                          <ENABLE <QUEUE I-RIVER <LKP ,HERE ,RIVER-SPEEDS>>>
2751                          <RTRUE>)
2752                         (<NOT <EQUAL? .TMP 2>>
2753                          <TELL "You can't launch it here." CR>
2754                          <RTRUE>)
2755                         (T <RTRUE>)>)
2756                  (<OR <AND <VERB? DROP>
2757                            <FSET? ,PRSO ,WEAPONBIT>>
2758                       <AND <VERB? PUT>
2759                            <FSET? ,PRSO ,WEAPONBIT>
2760                            <EQUAL? ,PRSI ,INFLATED-BOAT>>
2761                       <AND <VERB? ATTACK MUNG>
2762                            <FSET? ,PRSI ,WEAPONBIT>>>
2763                   <REMOVE-CAREFULLY ,INFLATED-BOAT>
2764                   <MOVE ,PUNCTURED-BOAT ,HERE>
2765                   <ROB ,INFLATED-BOAT ,HERE>
2766                   <MOVE ,WINNER ,HERE>
2767                   <TELL
2768 "It seems that the ">
2769                   <COND (<VERB? DROP PUT> <TELL D ,PRSO>)
2770                         (T <TELL D ,PRSI>)>
2771                   <TELL " didn't agree with the boat, as evidenced
2772 by the loud hissing noise issuing therefrom. With a pathetic sputter, the
2773 boat deflates, leaving you without." CR>
2774                   <COND (<FSET? ,HERE ,NONLANDBIT>
2775                          <CRLF>
2776                          <COND (<==? ,HERE ,RESERVOIR ,IN-STREAM>
2777                                 <JIGS-UP
2778 "Another pathetic sputter, this time from you, heralds your drowning.">)
2779                                (T
2780                                 <JIGS-UP
2781 "In other words, fighting the fierce currents of the Frigid River. You
2782 manage to hold your own for a bit, but then you are carried over a
2783 waterfall and into some nasty rocks. Ouch!">)>)>
2784                   <RTRUE>)
2785                  (<VERB? LAUNCH>
2786                    <TELL "You're not in the boat!" CR>)>)
2787           (<VERB? BOARD>
2788            <COND (<OR <IN? ,SCEPTRE ,WINNER>
2789                       <IN? ,KNIFE ,WINNER>
2790                       <IN? ,SWORD ,WINNER>
2791                       <IN? ,RUSTY-KNIFE ,WINNER>
2792                       <IN? ,AXE ,WINNER>
2793                       <IN? ,STILETTO ,WINNER>>
2794                   <TELL
2795 "Oops! Something sharp seems to have slipped and punctured the boat.
2796 The boat deflates to the sounds of hissing, sputtering, and cursing." CR>
2797                   <REMOVE-CAREFULLY ,INFLATED-BOAT>
2798                   <MOVE ,PUNCTURED-BOAT ,HERE>
2799                   <THIS-IS-IT ,PUNCTURED-BOAT>
2800                   T)>)
2801           (<VERB? INFLATE FILL>
2802            <TELL "Inflating it further would probably burst it." CR>)
2803           (<VERB? DEFLATE>
2804            <COND (<EQUAL? <LOC ,WINNER> ,INFLATED-BOAT>
2805                   <TELL
2806 "You can't deflate the boat while you're in it." CR>)
2807                  (<NOT <IN? ,INFLATED-BOAT ,HERE>>
2808                   <TELL
2809 "The boat must be on the ground to be deflated." CR>)
2810                  (T <TELL
2811 "The boat deflates." CR>
2812                   <SETG DEFLATE T>
2813                   <REMOVE-CAREFULLY ,INFLATED-BOAT>
2814                   <MOVE ,INFLATABLE-BOAT ,HERE>
2815                   <THIS-IS-IT ,INFLATABLE-BOAT>)>)>>
2816
2817 <ROUTINE BREATHE ()
2818          <PERFORM ,V?INFLATE ,PRSO ,LUNGS>>
2819
2820 <ROUTINE IBOAT-FUNCTION ()
2821          <COND (<VERB? INFLATE FILL>
2822                 <COND (<NOT <IN? ,INFLATABLE-BOAT ,HERE>>
2823                        <TELL
2824 "The boat must be on the ground to be inflated." CR>)
2825                       (<EQUAL? ,PRSI ,PUMP>
2826                        <TELL
2827 "The boat inflates and appears seaworthy." CR>
2828                        <COND (<NOT <FSET? ,BOAT-LABEL ,TOUCHBIT>>
2829                               <TELL
2830 "A tan label is lying inside the boat." CR>)>
2831                        <SETG DEFLATE <>>
2832                        <REMOVE-CAREFULLY ,INFLATABLE-BOAT>
2833                        <MOVE ,INFLATED-BOAT ,HERE>
2834                        <THIS-IS-IT ,INFLATED-BOAT>)
2835                       (<EQUAL? ,PRSI ,LUNGS>
2836                        <TELL
2837 "You don't have enough lung power to inflate it." CR>)
2838                       (T
2839                        <TELL
2840 "With a " D ,PRSI "? Surely you jest!" CR>)>)>>
2841
2842 <GLOBAL BUOY-FLAG T>
2843
2844 <ROUTINE RIVR4-ROOM (RARG)
2845          <COND (<EQUAL? .RARG ,M-END>
2846                 <COND (<AND <IN? ,BUOY ,WINNER> ,BUOY-FLAG>
2847                        <TELL
2848 "You notice something funny about the feel of the buoy." CR>
2849                        <SETG BUOY-FLAG <>>)>)>>
2850
2851 <GLOBAL BEACH-DIG -1>
2852
2853 <GDECL (BEACH-DIG) FIX>
2854
2855 <ROUTINE SAND-FUNCTION ()
2856          <COND (<AND <VERB? DIG> <==? ,PRSI ,SHOVEL>>
2857                 <SETG BEACH-DIG <+ 1 ,BEACH-DIG>>
2858                 <COND (<G? ,BEACH-DIG 3>
2859                        <SETG BEACH-DIG -1>
2860                        <AND <IN? ,SCARAB ,HERE> <FSET ,SCARAB ,INVISIBLE>>
2861                        <JIGS-UP "The hole collapses, smothering you.">)
2862                       (<EQUAL? ,BEACH-DIG 3>
2863                        <COND (<FSET? ,SCARAB ,INVISIBLE>
2864                               <TELL
2865 "You can see a scarab here in the sand." CR>
2866                               <THIS-IS-IT ,SCARAB>
2867                               <FCLEAR ,SCARAB ,INVISIBLE>)>)
2868                       (T
2869                        <TELL <GET ,BDIGS ,BEACH-DIG> CR>)>)>>
2870
2871 <GLOBAL BDIGS
2872         <TABLE (PURE) "You seem to be digging a hole here."
2873                "The hole is getting deeper, but that's about it."
2874                "You are surrounded by a wall of sand on all sides.">>
2875
2876 \\f
2877
2878 "SUBTITLE TOITY POIPLE BOIDS A CHOIPIN' AN' A BOIPIN' ... "
2879
2880 <ROUTINE TREE-ROOM (RARG "AUX" F)
2881          <COND (<EQUAL? .RARG ,M-LOOK>
2882                 <TELL
2883 "You are about 10 feet above the ground nestled among some large
2884 branches. The nearest branch above you is above your reach." CR>
2885                 <COND (<AND <SET F <FIRST? ,PATH>>
2886                             <NEXT? .F>>
2887                        <TELL "On the ground below you can see:  ">
2888                        <PRINT-CONTENTS ,PATH>
2889                        <TELL "." CR>)>)
2890                (<EQUAL? .RARG ,M-BEG>
2891                 <COND (<AND <VERB? CLIMB-DOWN> <EQUAL? ,PRSO ,TREE ,ROOMS>>
2892                        <DO-WALK ,P?DOWN>)
2893                       (<AND <VERB? CLIMB-UP CLIMB-FOO>
2894                             <EQUAL? ,PRSO ,TREE>>
2895                        <DO-WALK ,P?UP>)
2896                       (<VERB? DROP>
2897                        <COND (<NOT <IDROP>> <RTRUE>)
2898                              (<AND <EQUAL? ,PRSO ,NEST> <IN? ,EGG ,NEST>>
2899                               <TELL
2900 "The nest falls to the ground, and the egg spills out of it, seriously
2901 damaged." CR>
2902                               <REMOVE-CAREFULLY ,EGG>
2903                               <MOVE ,BROKEN-EGG ,PATH>)
2904                              (<EQUAL? ,PRSO ,EGG>
2905                               <TELL
2906 "The egg falls to the ground and springs open, seriously damaged.">
2907                               <MOVE ,EGG ,PATH>
2908                               <BAD-EGG>
2909                               <CRLF>)
2910                              (<NOT <EQUAL? ,PRSO ,WINNER ,TREE>>
2911                               <MOVE ,PRSO ,PATH>
2912                               <TELL
2913 "The " D ,PRSO " falls to the ground." CR>)
2914                              (<VERB? LEAP>
2915                               <JIGS-UP
2916                                 "That was just a bit too far down.">)>)>)
2917                (<EQUAL? .RARG ,M-ENTER> <ENABLE <QUEUE I-FOREST-ROOM -1>>)>>
2918
2919 <ROUTINE EGG-OBJECT ()
2920          <COND (<AND <VERB? OPEN MUNG> <EQUAL? ,PRSO ,EGG>>
2921                 <COND (<FSET? ,PRSO ,OPENBIT>
2922                        <TELL "The egg is already open." CR>)
2923                       (<NOT ,PRSI>
2924                        <TELL "You have neither the tools nor the expertise."
2925                              CR>)
2926                       (<EQUAL? ,PRSI ,HANDS>
2927                        <TELL "I doubt you could do that without damaging it."
2928                              CR>)
2929                       (<OR <FSET? ,PRSI ,WEAPONBIT>
2930                            <FSET? ,PRSI ,TOOLBIT>
2931                            <VERB? MUNG>>
2932                        <TELL
2933 "The egg is now open, but the clumsiness of your attempt has seriously
2934 compromised its esthetic appeal.">
2935                        <BAD-EGG>
2936                        <CRLF>)
2937                       (<FSET? ,PRSO ,FIGHTBIT>
2938                        <TELL "Not to say that using the "
2939                              D ,PRSI
2940                              " isn't original too..." CR>)
2941                       (T
2942                        <TELL "The concept of using a "
2943                              D ,PRSI
2944                              " is certainly original." CR>
2945                        <FSET ,PRSO ,FIGHTBIT>)>)
2946                (<VERB? CLIMB-ON HATCH>
2947                 <TELL
2948 "There is a noticeable crunch from beneath you, and inspection reveals
2949 that the egg is lying open, badly damaged.">
2950                 <BAD-EGG>
2951                 <CRLF>)
2952                (<VERB? OPEN MUNG THROW>
2953                 <COND (<VERB? THROW> <MOVE ,PRSO ,HERE>)>
2954                 <TELL
2955 "Your rather indelicate handling of the egg has caused it some damage,
2956 although you have succeeded in opening it.">
2957                 <BAD-EGG>
2958                 <CRLF>)>>
2959
2960 <ROUTINE BAD-EGG ("AUX" L)
2961          <COND (<IN? ,CANARY ,EGG>
2962                 <TELL " " <GETP ,BROKEN-CANARY ,P?FDESC>>)
2963                (T <REMOVE-CAREFULLY ,BROKEN-CANARY>)>
2964          <MOVE ,BROKEN-EGG <LOC ,EGG>>
2965          <REMOVE-CAREFULLY ,EGG>
2966          <RTRUE>>
2967
2968 <GLOBAL SING-SONG <>>
2969
2970 <ROUTINE CANARY-OBJECT ()
2971          <COND (<VERB? WIND>
2972                 <COND (<EQUAL? ,PRSO ,CANARY>
2973                        <COND (<AND <NOT ,SING-SONG> <FOREST-ROOM?>>
2974                               <TELL
2975 "The canary chirps, slightly off-key, an aria from a forgotten opera.
2976 From out of the greenery flies a lovely songbird. It perches on a
2977 limb just over your head and opens its beak to sing. As it does so
2978 a beautiful brass bauble drops from its mouth, bounces off the top of
2979 your head, and lands glimmering in the grass. As the canary winds
2980 down, the songbird flies away." CR>
2981                              <SETG SING-SONG T>
2982                              <MOVE ,BAUBLE
2983                                    <COND (<EQUAL? ,HERE ,UP-A-TREE> ,PATH)
2984                                          (T ,HERE)>>)
2985                             (T
2986                              <TELL
2987 "The canary chirps blithely, if somewhat tinnily, for a short time." CR>)>)
2988                      (T
2989                       <TELL
2990 "There is an unpleasant grinding noise from inside the canary." CR>)>)>>
2991
2992 <ROUTINE FOREST-ROOM? ()
2993          <OR <EQUAL? ,HERE ,FOREST-1 ,FOREST-2 ,FOREST-3>
2994              <EQUAL? ,HERE ,PATH ,UP-A-TREE>>>
2995
2996 <ROUTINE I-FOREST-ROOM ()
2997          <COND (<NOT <FOREST-ROOM?>>
2998                 <DISABLE <INT I-FOREST-ROOM>>
2999                 <RFALSE>)
3000                (<PROB 15>
3001                 <TELL
3002 "You hear in the distance the chirping of a song bird." CR>)>>
3003
3004 <ROUTINE FOREST-ROOM (RARG)
3005          <COND (<EQUAL? .RARG ,M-ENTER> <ENABLE <QUEUE I-FOREST-ROOM -1>>)
3006                (<EQUAL? .RARG ,M-BEG>
3007                 <COND (<AND <VERB? CLIMB-FOO CLIMB-UP>
3008                             <EQUAL? ,PRSO ,TREE>>
3009                        <DO-WALK ,P?UP>)>)>>
3010
3011 <ROUTINE WCLIF-OBJECT ()
3012          <COND (<VERB? CLIMB-UP CLIMB-DOWN CLIMB-FOO>
3013                 <TELL "The cliff is too steep for climbing." CR>)>>
3014
3015 <ROUTINE CLIFF-OBJECT ()
3016          <COND (<OR <VERB? LEAP>
3017                     <AND <VERB? PUT> <EQUAL? ,PRSO ,ME>>>
3018                 <TELL
3019                  "That would be very unwise. Perhaps even fatal." CR>)
3020                (<EQUAL? ,PRSI ,CLIMBABLE-CLIFF>
3021                 <COND (<VERB? PUT THROW-OFF>
3022                        <TELL
3023 "The " D ,PRSO " tumbles into the river and is seen no more." CR>
3024                        <REMOVE-CAREFULLY ,PRSO>)>)>>
3025
3026 \\f
3027
3028 "SUBTITLE CHUTES AND LADDERS"
3029
3030 <ROUTINE ROPE-FUNCTION ("AUX" RLOC)
3031          <COND (<NOT <EQUAL? ,HERE ,DOME-ROOM>>
3032                 <SETG DOME-FLAG <>>
3033                 <COND (<VERB? TIE>
3034                        <TELL "You can't tie the rope to that." CR>)>)
3035                (<VERB? TIE>
3036                 <COND (<EQUAL? ,PRSI ,RAILING>
3037                        <COND (,DOME-FLAG
3038                               <TELL
3039                                "The rope is already tied to it." CR>)
3040                              (T
3041                               <TELL
3042 "The rope drops over the side and comes within ten feet of the floor." CR>
3043                               <SETG DOME-FLAG T>
3044                               <FSET ,ROPE ,NDESCBIT>
3045                               <SET RLOC <LOC ,ROPE>>
3046                               <COND (<OR <NOT .RLOC>
3047                                          <NOT <IN? .RLOC ,ROOMS>>>
3048                                      <MOVE ,ROPE ,HERE>)>
3049                               T)>)>)
3050                (<AND <VERB? CLIMB-DOWN> <EQUAL? ,PRSO ,ROPE ,ROOMS> ,DOME-FLAG>
3051                 <DO-WALK ,P?DOWN>)
3052                (<AND <VERB? TIE-UP>
3053                      <EQUAL? ,ROPE ,PRSI>>
3054                 <COND (<FSET? ,PRSO ,ACTORBIT>
3055                        <COND (<L? <GETP ,PRSO ,P?STRENGTH> 0>
3056                               <TELL
3057 "Your attempt to tie up the " D ,PRSO " awakens him.">
3058                               <AWAKEN ,PRSO>)
3059                              (T
3060                               <TELL
3061 "The " D ,PRSO " struggles and you cannot tie him up." CR>)>)
3062                       (T
3063                        <TELL "Why would you tie up a " D ,PRSO "?" CR>)>)
3064                (<VERB? UNTIE>
3065                 <COND (,DOME-FLAG
3066                        <SETG DOME-FLAG <>>
3067                        <FCLEAR ,ROPE ,NDESCBIT>
3068                        <TELL "The rope is now untied." CR>)
3069                       (T
3070                        <TELL "It is not tied to anything." CR>)>)
3071                (<AND <VERB? DROP>
3072                      <EQUAL? ,HERE ,DOME-ROOM>
3073                      <NOT ,DOME-FLAG>>
3074                 <MOVE ,ROPE ,TORCH-ROOM>
3075                 <TELL "The rope drops gently to the floor below." CR>)
3076                (<VERB? TAKE>
3077                 <COND (,DOME-FLAG
3078                        <TELL "The rope is tied to the railing." CR>)>)>>
3079
3080 <ROUTINE UNTIE-FROM ()
3081     <COND (<AND <EQUAL? ,PRSO ,ROPE>
3082                 <AND ,DOME-FLAG <EQUAL? ,PRSI ,RAILING>>>
3083            <PERFORM ,V?UNTIE ,PRSO>)
3084           (T <TELL "It's not attached to that!" CR>)>>
3085
3086 <ROUTINE SLIDE-FUNCTION ()
3087          <COND (<OR <VERB? THROUGH CLIMB-UP CLIMB-DOWN CLIMB-FOO>
3088                     <AND <VERB? PUT> <EQUAL? ,PRSO ,ME>>>
3089                 <COND (<EQUAL? ,HERE ,CELLAR>
3090                        <DO-WALK ,P?WEST>
3091                        <RTRUE>)
3092                       (T
3093                        <TELL "You tumble down the slide...." CR>
3094                        <GOTO ,CELLAR>)>)
3095                (<VERB? PUT>
3096                 <SLIDER ,PRSO>)>>
3097
3098 <ROUTINE SLIDER (OBJ)
3099          <COND (<FSET? .OBJ ,TAKEBIT>
3100                 <TELL "The " D .OBJ " falls into the slide and is gone." CR>
3101                 <COND (<EQUAL? .OBJ ,WATER> <REMOVE-CAREFULLY .OBJ>)
3102                       (T
3103                        <MOVE .OBJ ,CELLAR>)>)
3104                (T <TELL <PICK-ONE ,YUKS> CR>)>>
3105
3106 <ROUTINE SANDWICH-BAG-FCN ()
3107          <COND (<AND <VERB? SMELL>
3108                      <IN? ,LUNCH ,PRSO>>
3109                 <TELL "It smells of hot peppers." CR>)>>
3110
3111 "MORE RANDOMNESS"
3112
3113 <ROUTINE DEAD-FUNCTION ("OPTIONAL" (FOO <>) "AUX" M)
3114          <COND (<VERB? WALK>
3115                 <COND (<AND <EQUAL? ,HERE ,TIMBER-ROOM>
3116                             <EQUAL? ,PRSO ,P?WEST>>
3117                        <TELL "You cannot enter in your condition." CR>)>)
3118                (<VERB? BRIEF VERBOSE SUPER-BRIEF
3119                        VERSION ;AGAIN SAVE RESTORE QUIT RESTART>
3120                 <>)
3121                (<VERB? ATTACK MUNG ALARM SWING>
3122                 <TELL "All such attacks are vain in your condition." CR>)
3123                (<VERB? OPEN CLOSE EAT DRINK
3124                        INFLATE DEFLATE TURN BURN
3125                        TIE UNTIE RUB>
3126                 <TELL
3127 "Even such an action is beyond your capabilities." CR>)
3128                (<VERB? WAIT>
3129                 <TELL "Might as well. You've got an eternity." CR>)
3130                (<VERB? LAMP-ON>
3131                 <TELL "You need no light to guide you." CR>)
3132                (<VERB? SCORE>
3133                 <TELL "You're dead! How can you think of your score?" CR>)
3134                (<VERB? TAKE RUB>
3135                 <TELL "Your hand passes through its object." CR>)
3136                (<VERB? DROP THROW INVENTORY>
3137                 <TELL "You have no possessions." CR>)
3138                (<VERB? DIAGNOSE>
3139                 <TELL "You are dead." CR>)
3140                (<VERB? LOOK>
3141                 <TELL "The room looks strange and unearthly">
3142                 <COND (<NOT <FIRST? ,HERE>>
3143                        <TELL ".">)
3144                       (T
3145                        <TELL " and objects appear indistinct.">)>
3146                 <CRLF>
3147                 <COND (<NOT <FSET? ,HERE ,ONBIT>>
3148                        <TELL
3149 "Although there is no light, the room seems dimly illuminated." CR>)>
3150                 <CRLF>
3151                 <>)
3152                (<VERB? PRAY>
3153                 <COND (<EQUAL? ,HERE ,SOUTH-TEMPLE>
3154                        <FCLEAR ,LAMP ,INVISIBLE>
3155                        <PUTP ,WINNER ,P?ACTION 0>
3156                        ;<SETG GWIM-DISABLE <>>
3157                        <SETG ALWAYS-LIT <>>
3158                        <SETG DEAD <>>
3159                        <COND (<IN? ,TROLL ,TROLL-ROOM>
3160                               <SETG TROLL-FLAG <>>)>
3161                        <TELL
3162 "From the distance the sound of a lone trumpet is heard. The room
3163 becomes very bright and you feel disembodied. In a moment, the
3164 brightness fades and you find yourself rising as if from a long
3165 sleep, deep in the woods. In the distance you can faintly hear a
3166 songbird and the sounds of the forest." CR CR>
3167                        <GOTO ,FOREST-1>)
3168                       (T
3169                        <TELL "Your prayers are not heard." CR>)>)
3170                (T
3171                 <TELL "You can't even do that." CR>
3172                 <SETG P-CONT <>>
3173                 <RFATAL>)>>
3174
3175 ;"Pseudo-object routines"
3176
3177 <ROUTINE LAKE-PSEUDO ()
3178          <COND (,LOW-TIDE
3179                 <TELL "There's not much lake left...." CR>)
3180                (<VERB? CROSS>
3181                 <TELL "It's too wide to cross." CR>)
3182                (<VERB? THROUGH>
3183                 <TELL "You can't swim in this lake." CR>)>>
3184
3185 <ROUTINE STREAM-PSEUDO ()
3186          <COND (<VERB? SWIM THROUGH>
3187                 <TELL "You can't swim in the stream." CR>)
3188                (<VERB? CROSS>
3189                 <TELL "The other side is a sheer rock cliff." CR>)>>
3190
3191 <ROUTINE CHASM-PSEUDO ()
3192          <COND (<OR <VERB? LEAP>
3193                     <AND <VERB? PUT> <EQUAL? ,PRSO ,ME>>>
3194                 <TELL
3195 "You look before leaping, and realize that you would never survive." CR>)
3196                (<VERB? CROSS>
3197                 <TELL "It's too far to jump, and there's no bridge." CR>)
3198                (<AND <VERB? PUT THROW-OFF> <EQUAL? ,PRSI ,PSEUDO-OBJECT>>
3199                 <TELL
3200 "The " D ,PRSO " drops out of sight into the chasm." CR>
3201                 <REMOVE-CAREFULLY ,PRSO>)>>
3202
3203 <ROUTINE DOME-PSEUDO ()
3204          <COND (<VERB? KISS>
3205                 <TELL "No." CR>)>>
3206
3207 <ROUTINE GATE-PSEUDO ()
3208          <COND (<VERB? THROUGH>
3209                 <DO-WALK ,P?IN>
3210                 <RTRUE>)
3211                (T
3212                 <TELL
3213 "The gate is protected by an invisible force. It makes your
3214 teeth ache to touch it." CR>)>>
3215
3216 <ROUTINE DOOR-PSEUDO () ;"in Studio"
3217          <COND (<VERB? OPEN CLOSE>
3218                 <TELL "The door won't budge." CR>)
3219                (<VERB? THROUGH>
3220                 <DO-WALK ,P?SOUTH>)>>
3221
3222 <ROUTINE PAINT-PSEUDO ()
3223          <COND (<VERB? MUNG>
3224                 <TELL "Some paint chips away, revealing more paint." CR>)>>
3225
3226 <ROUTINE GAS-PSEUDO ()
3227          <COND (<VERB? BREATHE> ;"REALLY BLOW"
3228                 <TELL "There is too much gas to blow away." CR>)
3229                (<VERB? SMELL>
3230                 <TELL "It smells like coal gas in here." CR>)>>
3231
3232 "SUBTITLE MELEE"
3233
3234 "melee actions (object functions for villains called with these"
3235
3236 <CONSTANT F-BUSY? 1>            ;"busy recovering weapon?"
3237 <CONSTANT F-DEAD 2>             ;"mistah kurtz, he dead."
3238 <CONSTANT F-UNCONSCIOUS 3>      ;"into dreamland"
3239 <CONSTANT F-CONSCIOUS 4>        ;"rise and shine"
3240 <CONSTANT F-FIRST? 5>           ;"strike first?"
3241
3242 \\f
3243
3244 "blow results"
3245
3246 <CONSTANT MISSED 1>             ;"attacker misses"
3247 <CONSTANT UNCONSCIOUS 2>        ;"defender unconscious"
3248 <CONSTANT KILLED 3>             ;"defender dead"
3249 <CONSTANT LIGHT-WOUND 4>        ;"defender lightly wounded"
3250 <CONSTANT SERIOUS-WOUND 5>      ;"defender seriously wounded"
3251 <CONSTANT STAGGER 6>            ;"defender staggered (miss turn)"
3252 <CONSTANT LOSE-WEAPON 7>        ;"defender loses weapon"
3253 <CONSTANT HESITATE 8>           ;"hesitates (miss on free swing)"
3254 <CONSTANT SITTING-DUCK 9>       ;"sitting duck (crunch!)"
3255
3256 "tables of melee results"
3257
3258 <GLOBAL DEF1
3259         <TABLE (PURE)
3260          MISSED MISSED MISSED MISSED
3261          STAGGER STAGGER
3262          UNCONSCIOUS UNCONSCIOUS
3263          KILLED KILLED KILLED KILLED KILLED>>
3264
3265 <GLOBAL DEF2A
3266         <TABLE (PURE)
3267          MISSED MISSED MISSED MISSED MISSED
3268          STAGGER STAGGER
3269          LIGHT-WOUND LIGHT-WOUND
3270          UNCONSCIOUS>>
3271
3272 <GLOBAL DEF2B
3273         <TABLE (PURE)
3274          MISSED MISSED MISSED
3275          STAGGER STAGGER
3276          LIGHT-WOUND LIGHT-WOUND LIGHT-WOUND
3277          UNCONSCIOUS
3278          KILLED KILLED KILLED>>
3279
3280 <GLOBAL DEF3A
3281         <TABLE (PURE)
3282          MISSED MISSED MISSED MISSED MISSED
3283          STAGGER STAGGER
3284          LIGHT-WOUND LIGHT-WOUND
3285          SERIOUS-WOUND SERIOUS-WOUND>>
3286
3287 <GLOBAL DEF3B
3288         <TABLE (PURE)
3289          MISSED MISSED MISSED
3290          STAGGER STAGGER
3291          LIGHT-WOUND LIGHT-WOUND LIGHT-WOUND
3292          SERIOUS-WOUND SERIOUS-WOUND SERIOUS-WOUND>>
3293
3294 <GLOBAL DEF3C
3295         <TABLE (PURE)
3296          MISSED
3297          STAGGER STAGGER
3298          LIGHT-WOUND LIGHT-WOUND LIGHT-WOUND LIGHT-WOUND
3299          SERIOUS-WOUND SERIOUS-WOUND SERIOUS-WOUND>>
3300
3301 <GLOBAL DEF1-RES
3302         <TABLE DEF1
3303                0 ;<REST ,DEF1 2>
3304                0 ;<REST ,DEF1 4>>>
3305
3306 <GLOBAL DEF2-RES
3307         <TABLE DEF2A
3308                DEF2B
3309                0; <REST ,DEF2B 2>
3310                0; <REST ,DEF2B 4>>>
3311
3312 <GLOBAL DEF3-RES
3313         <TABLE DEF3A
3314                0 ;<REST ,DEF3A 2>
3315                DEF3B
3316                0 ;<REST ,DEF3B 2>
3317                DEF3C>>
3318
3319 \\f
3320
3321 "useful constants"
3322
3323 <CONSTANT STRENGTH-MAX 7>
3324 <CONSTANT STRENGTH-MIN 2>
3325 <CONSTANT CURE-WAIT 30>
3326
3327 \\f
3328
3329 "I-FIGHT moved to DEMONS"
3330
3331 <ROUTINE DO-FIGHT (LEN "AUX" CNT RES O OO (OUT <>))
3332         <REPEAT ()
3333               <SET CNT 0>
3334               <REPEAT ()
3335                       <SET CNT <+ .CNT 1>>
3336                       <COND (<EQUAL? .CNT .LEN>
3337                              <SET RES T>
3338                              <RETURN T>)>
3339                       <SET OO <GET ,VILLAINS .CNT>>
3340                       <SET O <GET .OO ,V-VILLAIN>>
3341                       <COND (<NOT <FSET? .O ,FIGHTBIT>>)
3342                             (<APPLY <GETP .O ,P?ACTION>
3343                                     ,F-BUSY?>)
3344                             (<NOT <SET RES
3345                                        <VILLAIN-BLOW
3346                                         .OO
3347                                         .OUT>>>
3348                              <SET RES <>>
3349                              <RETURN>)
3350                             (<EQUAL? .RES ,UNCONSCIOUS>
3351                              <SET OUT <+ 1 <RANDOM 3>>>)>>
3352               <COND (.RES
3353                      <COND (<NOT .OUT> <RETURN>)
3354                            (T
3355                             <SET OUT <- .OUT 1>>
3356                             <COND (<0? .OUT> <RETURN>)>)>)
3357                     (T <RETURN>)>>>
3358
3359 \\f
3360
3361 "takes a remark, defender, and good-guy's weapon"
3362
3363 <ROUTINE REMARK (REMARK D W "AUX" (LEN <GET .REMARK 0>) (CNT 0) STR)
3364          <REPEAT ()
3365                  <COND (<G? <SET CNT <+ .CNT 1>> .LEN> <RETURN>)>
3366                  <SET STR <GET .REMARK .CNT>>
3367                  <COND (<EQUAL? .STR ,F-WEP> <PRINTD .W>)
3368                        (<EQUAL? .STR ,F-DEF> <PRINTD .D>)
3369                        (T <PRINT .STR>)>>
3370          <CRLF>>
3371
3372 "Strength of the player is a basic value (S) adjusted by his P?STRENGTH
3373 property, which is normally 0"
3374
3375 <ROUTINE FIGHT-STRENGTH ("OPTIONAL" (ADJUST? T) "AUX" S)
3376          <SET S
3377               <+ ,STRENGTH-MIN
3378                  </ ,SCORE
3379                     </ ,SCORE-MAX
3380                        <- ,STRENGTH-MAX ,STRENGTH-MIN>>>>>
3381          <COND (.ADJUST? <+ .S <GETP ,WINNER ,P?STRENGTH>>)(T .S)>>
3382
3383 <ROUTINE VILLAIN-STRENGTH (OO
3384                            "AUX" (VILLAIN <GET .OO ,V-VILLAIN>)
3385                            OD TMP)
3386          <SET OD <GETP .VILLAIN ,P?STRENGTH>>
3387          <COND (<NOT <L? .OD 0>>
3388                 <COND (<AND <EQUAL? .VILLAIN ,THIEF> ,THIEF-ENGROSSED>
3389                        <COND (<G? .OD 2> <SET OD 2>)>
3390                        <SETG THIEF-ENGROSSED <>>)>
3391                 <COND (<AND ,PRSI
3392                             <FSET? ,PRSI ,WEAPONBIT>
3393                             <EQUAL? <GET .OO ,V-BEST> ,PRSI>>
3394                        <SET TMP <- .OD <GET .OO ,V-BEST-ADV>>>
3395                        <COND (<L? .TMP 1> <SET TMP 1>)>
3396                        <SET OD .TMP>)>)>
3397          .OD>
3398
3399 "find a weapon (if any) in possession of argument"
3400
3401 <ROUTINE FIND-WEAPON (O "AUX" W)
3402          <SET W <FIRST? .O>>
3403          <COND (<NOT .W>
3404                 <RFALSE>)>
3405          <REPEAT ()
3406                  <COND (<OR <EQUAL? .W ,STILETTO ,AXE ,SWORD>
3407                             <EQUAL? .W ,KNIFE ,RUSTY-KNIFE>>
3408                         <RETURN .W>)
3409                        (<NOT <SET W <NEXT? .W>>> <RFALSE>)>>>
3410
3411 \\f
3412
3413 <ROUTINE VILLAIN-BLOW (OO OUT?
3414                        "AUX" (VILLAIN <GET .OO ,V-VILLAIN>)
3415                        (REMARKS <GET .OO ,V-MSGS>)
3416                        DWEAPON ATT DEF OA OD TBL RES NWEAPON)
3417          <FCLEAR ,WINNER ,STAGGERED>
3418          <COND (<FSET? .VILLAIN ,STAGGERED>
3419                 <TELL "The " D .VILLAIN
3420                       " slowly regains his feet." CR>
3421                 <FCLEAR .VILLAIN ,STAGGERED>
3422                 <RTRUE>)>
3423          <SET OA <SET ATT <VILLAIN-STRENGTH .OO>>>
3424          <COND (<NOT <G? <SET DEF <FIGHT-STRENGTH>> 0>> <RTRUE>)>
3425          <SET OD <FIGHT-STRENGTH <>>>
3426          <SET DWEAPON <FIND-WEAPON ,WINNER>>
3427          <COND (<L? .DEF 0> <SET RES ,KILLED>)
3428                (T
3429                 <COND (<1? .DEF>
3430                        <COND (<G? .ATT 2> <SET ATT 3>)>
3431                        <SET TBL <GET ,DEF1-RES <- .ATT 1>>>)
3432                       (<EQUAL? .DEF 2>
3433                        <COND (<G? .ATT 3> <SET ATT 4>)>
3434                        <SET TBL <GET ,DEF2-RES <- .ATT 1>>>)
3435                       (<G? .DEF 2>
3436                        <SET ATT <- .ATT .DEF>>
3437                        <COND (<L? .ATT -1> <SET ATT -2>)
3438                              (<G? .ATT 1> <SET ATT 2>)>
3439                        <SET TBL <GET ,DEF3-RES <+ .ATT 2>>>)>
3440                 <SET RES <GET .TBL <- <RANDOM 9> 1>>>
3441                 <COND (.OUT?
3442                        <COND (<EQUAL? .RES ,STAGGER> <SET RES ,HESITATE>)
3443                              (T <SET RES ,SITTING-DUCK>)>)>
3444                 <COND (<AND <EQUAL? .RES ,STAGGER>
3445                             .DWEAPON
3446                             <PROB 25 <COND (.HERO? 10)(T 50)>>>
3447                        <SET RES ,LOSE-WEAPON>)>
3448                 <REMARK
3449                   <RANDOM-ELEMENT <GET .REMARKS <- .RES 1>>>
3450                   ,WINNER
3451                   .DWEAPON>)>
3452          <COND (<OR <EQUAL? .RES ,MISSED> <EQUAL? .RES ,HESITATE>>)
3453                (<EQUAL? .RES ,UNCONSCIOUS>)
3454                (<OR <EQUAL? .RES ,KILLED>
3455                     <EQUAL? .RES ,SITTING-DUCK>>
3456                 <SET DEF 0>)
3457                (<EQUAL? .RES ,LIGHT-WOUND>
3458                 <SET DEF <- .DEF 1>>
3459                 <COND (<L? .DEF 0> <SET DEF 0>)>
3460                 <COND (<G? ,LOAD-ALLOWED 50>
3461                        <SETG LOAD-ALLOWED <- ,LOAD-ALLOWED 10>>)>)
3462                (<EQUAL? .RES ,SERIOUS-WOUND>
3463                 <SET DEF <- .DEF 2>>
3464                 <COND (<L? .DEF 0> <SET DEF 0>)>
3465                 <COND (<G? ,LOAD-ALLOWED 50>
3466                        <SETG LOAD-ALLOWED <- ,LOAD-ALLOWED 20>>)>)
3467                (<EQUAL? .RES ,STAGGER> <FSET ,WINNER ,STAGGERED>)
3468                (T
3469                 ;<AND <EQUAL? .RES ,LOSE-WEAPON> .DWEAPON>
3470                 <MOVE .DWEAPON ,HERE>
3471                 <COND (<SET NWEAPON <FIND-WEAPON ,WINNER>>
3472                        <TELL
3473 "Fortunately, you still have a " D .NWEAPON "." CR>)>)>
3474          <WINNER-RESULT .DEF .RES .OD>>
3475
3476 <ROUTINE HERO-BLOW ("AUX" OO VILLAIN (OUT? <>) DWEAPON ATT DEF (CNT 0)
3477                     OA OD TBL RES NWEAPON (LEN <GET ,VILLAINS 0>))
3478          <REPEAT ()
3479                  <SET CNT <+ .CNT 1>>
3480                  <COND (<EQUAL? .CNT .LEN> <RETURN>)>
3481                  <SET OO <GET ,VILLAINS .CNT>>
3482                  <COND (<EQUAL? <GET .OO ,V-VILLAIN> ,PRSO>
3483                         <RETURN>)>>
3484          <FSET ,PRSO ,FIGHTBIT>
3485          <COND (<FSET? ,WINNER ,STAGGERED>
3486                 <TELL
3487 "You are still recovering from that last blow, so your attack is
3488 ineffective." CR>
3489                 <FCLEAR ,WINNER ,STAGGERED>
3490                 <RTRUE>)>
3491          <SET ATT <FIGHT-STRENGTH>>
3492          <COND (<L? .ATT 1> <SET ATT 1>)>
3493          <SET OA .ATT>
3494          <SET VILLAIN <GET .OO ,V-VILLAIN>>
3495          <COND (<0? <SET OD <SET DEF <VILLAIN-STRENGTH .OO>>>>
3496                 <COND (<EQUAL? ,PRSO ,WINNER>
3497                        <RETURN <JIGS-UP
3498 "Well, you really did it that time. Is suicide painless?">>)>
3499                 <TELL "Attacking the " D .VILLAIN " is pointless." CR>
3500                 <RTRUE>)>
3501          <SET DWEAPON <FIND-WEAPON .VILLAIN>>
3502          <COND (<OR <NOT .DWEAPON> <L? .DEF 0>>
3503                 <TELL "The ">
3504                 <COND (<L? .DEF 0> <TELL "unconscious">)
3505                       (T <TELL "unarmed">)>
3506                 <TELL " " D .VILLAIN
3507                       " cannot defend himself: He dies." CR>
3508                 <SET RES ,KILLED>)
3509                (T
3510                 <COND (<1? .DEF>
3511                        <COND (<G? .ATT 2> <SET ATT 3>)>
3512                        <SET TBL <GET ,DEF1-RES <- .ATT 1>>>)
3513                       (<EQUAL? .DEF 2>
3514                        <COND (<G? .ATT 3> <SET ATT 4>)>
3515                        <SET TBL <GET ,DEF2-RES <- .ATT 1>>>)
3516                       (<G? .DEF 2>
3517                        <SET ATT <- .ATT .DEF>>
3518                        <COND (<L? .ATT -1> <SET ATT -2>)
3519                              (<G? .ATT 1> <SET ATT 2>)>
3520                        <SET TBL <GET ,DEF3-RES <+ .ATT 2>>>)>
3521                 <SET RES <GET .TBL <- <RANDOM 9> 1>>>
3522                 <COND (.OUT?
3523                        <COND (<EQUAL? .RES ,STAGGER> <SET RES ,HESITATE>)
3524                              (T <SET RES ,SITTING-DUCK>)>)>
3525                 <COND (<AND <EQUAL? .RES ,STAGGER> .DWEAPON <PROB 25>>
3526                        <SET RES ,LOSE-WEAPON>)>
3527                 <REMARK
3528                   <RANDOM-ELEMENT <GET ,HERO-MELEE <- .RES 1>>>
3529                   ,PRSO
3530                   ,PRSI>)>
3531          <COND (<OR <EQUAL? .RES ,MISSED> <EQUAL? .RES ,HESITATE>>)
3532                (<EQUAL? .RES ,UNCONSCIOUS> <SET DEF <- .DEF>>)
3533                (<OR <EQUAL? .RES ,KILLED> <EQUAL? .RES ,SITTING-DUCK>>
3534                 <SET DEF 0>)
3535                (<EQUAL? .RES ,LIGHT-WOUND>
3536                 <SET DEF <- .DEF 1>>
3537                 <COND (<L? .DEF 0> <SET DEF 0>)>)
3538                (<EQUAL? .RES ,SERIOUS-WOUND>
3539                 <SET DEF <- .DEF 2>>
3540                 <COND (<L? .DEF 0> <SET DEF 0>)>)
3541                (<EQUAL? .RES ,STAGGER> <FSET ,PRSO ,STAGGERED>)
3542                (T
3543                 ;<AND <EQUAL? .RES ,LOSE-WEAPON> .DWEAPON>
3544                 <FCLEAR .DWEAPON ,NDESCBIT>
3545                 <FSET .DWEAPON ,WEAPONBIT>
3546                 <MOVE .DWEAPON ,HERE>
3547                 <THIS-IS-IT .DWEAPON>)>
3548          <VILLAIN-RESULT ,PRSO .DEF .RES>>
3549
3550 \\f
3551
3552 <ROUTINE WINNER-RESULT (DEF RES OD)
3553          <PUTP ,WINNER
3554                ,P?STRENGTH
3555                <COND (<0? .DEF> -10000)(T <- .DEF .OD>)>>
3556          <COND (<L? <- .DEF .OD> 0>
3557                 <ENABLE <QUEUE I-CURE ,CURE-WAIT>>)>
3558          <COND (<NOT <G? <FIGHT-STRENGTH> 0>>
3559                 <PUTP ,WINNER ,P?STRENGTH <+ 1 <- <FIGHT-STRENGTH <>>>>>
3560                 <JIGS-UP
3561 "It appears that that last blow was too much for you. I'm afraid you
3562 are dead.">
3563                 <>)
3564                (T .RES)>>
3565
3566 <ROUTINE VILLAIN-RESULT (VILLAIN DEF RES)
3567          <PUTP .VILLAIN ,P?STRENGTH .DEF>
3568          <COND (<0? .DEF>
3569                 <FCLEAR .VILLAIN ,FIGHTBIT>
3570                 <TELL
3571 "Almost as soon as the " D .VILLAIN " breathes his last breath, a cloud
3572 of sinister black fog envelops him, and when the fog lifts, the
3573 carcass has disappeared." CR>
3574                 <REMOVE-CAREFULLY .VILLAIN>
3575                 <APPLY <GETP .VILLAIN ,P?ACTION> ,F-DEAD>
3576                 .RES)
3577                (<EQUAL? .RES ,UNCONSCIOUS>
3578                 <APPLY <GETP .VILLAIN ,P?ACTION> ,F-UNCONSCIOUS>
3579                 .RES)
3580                (T .RES)&g