aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhistoricalsource <historicalsoftware@textfiles.com>2019-04-13 21:51:00 -0400
committerhistoricalsource <historicalsoftware@textfiles.com>2019-04-13 21:51:00 -0400
commitd26f1573576909c6da9a02adc0c9d428c99c873f (patch)
treec963e2772e45353a36d9f0d1e445873595a093eb
downloadzork2-d26f1573576909c6da9a02adc0c9d428c99c873f.tar.gz
zork2-d26f1573576909c6da9a02adc0c9d428c99c873f.tar.bz2
zork2-d26f1573576909c6da9a02adc0c9d428c99c873f.zip
Revision 48 (Original Source)
-rw-r--r--2actions.zil3970
-rw-r--r--2dungeon.zil2721
-rw-r--r--README.md1
-rw-r--r--crufty.zil11
-rw-r--r--gclock.zil66
-rw-r--r--gglobals.zil316
-rw-r--r--gmacros.zil158
-rw-r--r--gmain.zil298
-rw-r--r--gparser.zil1194
-rw-r--r--gsyntax.zil551
-rw-r--r--gverbs.zil2137
-rw-r--r--zork2.zil56
-rw-r--r--zork2.zipbin0 -> 89912 bytes
13 files changed, 11479 insertions, 0 deletions
diff --git a/2actions.zil b/2actions.zil
new file mode 100644
index 0000000..9e93a8e
--- /dev/null
+++ b/2actions.zil
@@ -0,0 +1,3970 @@
+"ACTIONS2 for
+ Zork II: The Wizard of Frobozz
+ (c) Copyright 1981, 1983 Infocom, Inc. All Rights Reserved."
+
+<ROUTINE SWORD-FCN ()
+ <COND (<AND <VERB? TAKE>
+ <EQUAL? ,WINNER ,ADVENTURER>>
+ <ENABLE <QUEUE I-SWORD -1>>
+ <RFALSE>)>>
+
+"SWORD demon"
+
+<GLOBAL SWORD-GLOW 0>
+
+<ROUTINE I-SWORD ("AUX" (DEM <INT I-SWORD>) (NG 0) G P TX L)
+ <SET G ,SWORD-GLOW>
+ <COND (<IN? ,SWORD ,ADVENTURER>
+ <COND (<INFESTED? ,HERE> <SET NG 2>)
+ (T
+ <SET P 0>
+ <REPEAT ()
+ <COND (<0? <SET P <NEXTP ,HERE .P>>>
+ <RETURN>)
+ (<NOT <L? .P ,LOW-DIRECTION>>
+ <SET TX <GETPT ,HERE .P>>
+ <SET L <PTSIZE .TX>>
+ <COND (<EQUAL? .L ,UEXIT ,CEXIT ,DEXIT>
+ <COND (<INFESTED? <GETB .TX 0>>
+ <SET NG 1>
+ <RETURN>)>)>)>>)>
+ <COND (<EQUAL? .NG .G> <RFALSE>)
+ (<EQUAL? .NG 2>
+ <TELL "Your sword has begun to glow very brightly." CR>)
+ (<1? .NG>
+ <TELL "Your sword is glowing with a faint blue glow."
+ CR>)
+ (<0? .NG>
+ <TELL "Your sword is no longer glowing." CR>)>
+ <SETG SWORD-GLOW .NG>
+ <RTRUE>)
+ (T
+ <PUT .DEM ,C-ENABLED? 0>
+ <RFALSE>)>>
+
+<ROUTINE INFESTED? (R "AUX" (F <FIRST? .R>))
+ <REPEAT ()
+ <COND (<NOT .F> <RFALSE>)
+ (<AND <FSET? .F ,ACTORBIT>
+ <NOT <FSET? .F ,INVISIBLE>>
+ <NOT <EQUAL? .F ,ROBOT>>>
+ <RETURN .F>)
+ (<NOT <SET F <NEXT? .F>>> <RFALSE>)>>>
+
+<ROUTINE CAROUSEL-ROOM-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"You are in a large circular room whose high ceiling is lost in gloom. Eight
+identical passages leave the room." CR>
+ <COND (<NOT ,CAROUSEL-FLIP-FLAG>
+ <TELL
+"A loud whirring sound comes from all around, and you feel
+sort of disoriented in here." CR>)>
+ <RTRUE>)
+ (<AND <NOT ,CAROUSEL-FLIP-FLAG>
+ <EQUAL? .RARG ,M-BEG>
+ <VERB? WALK>>
+ <COND (<EQUAL? ,PRSO ,P?UP ,P?DOWN>
+ <RFALSE>)>
+ <COND (<EQUAL? ,PRSO ,P?OUT>
+ <TELL
+"Feeling dizzy, you pick a direction at random." CR CR>
+ <SETG PRSO ,P?EAST>)
+ (T
+ <TELL
+"You're not sure which direction is which. This
+room is very disorienting." CR CR>)>
+ <COND (<OR <EQUAL? ,PRSO ,P?WEST> <PROB 80>>
+ <SETG PRSO <GET ,EIGHT-DIRECTIONS <- <RANDOM 7> 1>>>)>
+ <V-WALK>
+ <RTRUE>)>>
+
+<ROUTINE VIOLIN-FCN ()
+ <COND (<AND <VERB? PLAY>
+ <EQUAL? ,PRSO ,VIOLIN>>
+ <TELL
+"An amazingly offensive noise issues from the violin." CR>)>>
+
+<GLOBAL EIGHT-DIRECTIONS
+ <TABLE P?NORTH P?EAST P?SOUTH P?NE P?SE P?SW P?NW>>
+
+<GLOBAL MUNGED-ROOM <>>
+
+<ROUTINE OPEN-CLOSE (OBJ STROPN STRCLS)
+ #DECL ((OBJ) OBJECT (STROPN STRCLS) STRING)
+ <COND (<VERB? OPEN>
+ <COND (<FSET? .OBJ ,OPENBIT>
+ <TELL <RANDOM-ELEMENT ,DUMMY>>)
+ (T
+ <TELL .STROPN>
+ <FSET .OBJ ,OPENBIT>)>
+ <CRLF>)
+ (<VERB? CLOSE>
+ <COND (<FSET? .OBJ ,OPENBIT>
+ <TELL .STRCLS>
+ <FCLEAR .OBJ ,OPENBIT>
+ T)
+ (T <TELL <RANDOM-ELEMENT ,DUMMY> CR>)>
+ <CRLF>)>>
+
+;"SUBTITLE THE VOLCANO"
+
+<GLOBAL BTIE-FLAG <>>
+<GLOBAL BINF-FLAG <>>
+<GLOBAL BLAB-FLAG <>>
+<GLOBAL SAFE-FLAG <>>
+
+<ROUTINE BALLOON-FCN ("OPTIONAL" (RARG <>) "AUX" M R RC)
+ #DECL ((RARG) <OR FIX FALSE> (M) <OR FALSE TABLE> (R) OBJECT)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <COND (,BINF-FLAG
+ <TELL "The cloth bag is inflated and ">
+ <COND (<FSET? ,RECEPTACLE ,OPENBIT>
+ <TELL
+"there is a " D ,BINF-FLAG " burning in the receptacle.">)
+ (T
+ <TELL
+"some smoke is leaking out of the closed receptacle.">)>)
+ (T
+ <TELL "The cloth bag is draped over the side
+of the basket. Directly in the middle of the basket is a metal receptacle
+which is ">
+ <COND (<FSET? ,RECEPTACLE ,OPENBIT>
+ <TELL "open">
+ <SET RC <FIRST? ,RECEPTACLE>>
+ <COND (.RC
+ <TELL ". A "
+ D .RC
+ " is "
+ <COND (<EQUAL? ,BINF-FLAG .RC>
+ "burning")
+ (T
+ "nestled")>
+ " inside">)>)
+ (T <TELL "closed">)>
+ <TELL ".">)>
+ <COND (,BTIE-FLAG
+ <TELL
+" The balloon is tied to a hook by the braided wire." CR>)
+ (T
+ <TELL
+" A braided wire is dangling over the side of the basket." CR>)>
+ <RTRUE>)
+ (<EQUAL? .RARG ,M-OBJDESC>
+ <TELL
+"There is a large and extremely heavy wicker basket here. An
+enormous cloth bag ">
+ <COND (,BINF-FLAG
+ <TELL
+"attached to the basket is inflated. A metal receptacle is fastened to
+the center of the basket. ">
+ <COND (<FSET? ,RECEPTACLE ,OPENBIT>
+ <TELL "In it is a burning " D ,BINF-FLAG>)
+ (T
+ <TELL
+"Some smoke leaks out around its closed lid">)>)
+ (T
+ <TELL
+"is draped over the side and is firmly attached to the basket. A metal
+receptacle is fastened to the center of the basket">)>
+ <COND (,BTIE-FLAG
+ <TELL
+". A piece of wire tied to a hook holds the balloon in place." CR>)
+ (T
+ <TELL
+". Dangling from the basket is a piece of braided wire." CR>)>)
+ (<EQUAL? .RARG ,M-BEG>
+ <COND (<VERB? WALK>
+ <COND (<SET M <GETPT ,HERE ,PRSO>>
+ <COND (,BTIE-FLAG
+ <TELL "You are tied to the ledge." CR>
+ <RTRUE>)
+ (T
+ <AND <EQUAL? <PTSIZE .M> 1>
+ <NOT <FSET? <SET R <GETB .M 0>>
+ ,RMUNGBIT>>
+ <SETG BLOC .R>>
+ <ENABLE <QUEUE I-BALLOON 3>>
+ <RFALSE>)>)
+ (T
+ <TELL
+"You can't control the balloon this way." CR>
+ <RTRUE>)>)
+ (<AND <VERB? OPEN>
+ ,BINF-FLAG
+ <EQUAL? ,PRSO ,RECEPTACLE>
+ <FIRST? ,RECEPTACLE>>
+ <TELL "Opening it reveals a burning "
+ D ,BINF-FLAG "." CR>
+ <FSET ,RECEPTACLE ,OPENBIT>
+ <RTRUE>)
+ (<AND <VERB? TAKE>
+ <EQUAL? ,BINF-FLAG ,PRSO>>
+ <TELL "You don't really want to hold a burning "
+ D ,PRSO "." CR>
+ <RTRUE>)
+ (<AND <VERB? PUT>
+ <EQUAL? ,PRSI ,RECEPTACLE>
+ <FIRST? ,RECEPTACLE>>
+ <TELL "The receptacle is already occupied." CR>
+ <RTRUE>)
+ (<AND <VERB? PUT>
+ <EQUAL? ,PRSI ,RECEPTACLE>>
+ <FSET ,PRSO ,NDESCBIT>
+ <RFALSE>)
+ (<VERB? INFLATE>
+ <TELL
+"It takes more than words to inflate a balloon." CR>)>)>>
+
+<ROUTINE I-BALLOON ()
+ <COND (<AND <FSET? ,RECEPTACLE ,OPENBIT> ,BINF-FLAG>
+ <RISE-AND-SHINE>)
+ (<EQUAL? ,HERE ,LEDGE-1 ,LEDGE-2>
+ <RISE-AND-SHINE>)
+ (T
+ <DECLINE-AND-FALL>)>>
+
+<ROUTINE BALLOON-BURN ()
+ <TELL "The " D ,PRSO " burns inside the receptacle." CR>
+ <ENABLE <QUEUE I-BURNUP <* <GETP ,PRSO ,P?SIZE> 20>>>
+ <FSET ,PRSO ,FLAMEBIT>
+ <FSET ,PRSO ,ONBIT>
+ <FCLEAR ,PRSO ,TAKEBIT>
+ <FCLEAR ,PRSO ,READBIT>
+ <COND (,BINF-FLAG <RTRUE>)
+ (T
+ <TELL
+ "The cloth bag inflates as it fills with hot air." CR>
+ <COND (<NOT ,BLAB-FLAG>
+ <TELL
+"A small label drops from the bag into the basket." CR>
+ <MOVE ,BALLOON-LABEL ,BALLOON>)>
+ <SETG BLAB-FLAG T>
+ <SETG BINF-FLAG ,PRSO>
+ <ENABLE <QUEUE I-BALLOON 3>>)>>
+
+<ROUTINE PUT-BALLOON (THERE STR)
+ #DECL ((THERE) OBJECT (STR) STRING)
+ <COND (<EQUAL? ,HERE ,LEDGE-1 ,LEDGE-2 ,VOLCANO-BOTTOM>
+ <TELL "You watch as the balloon slowly " .STR CR>)>
+ <MOVE ,BALLOON .THERE>
+ <SETG BLOC .THERE>>
+
+<GLOBAL BALLOON-UPS
+ <LTABLE VAIR-1 VAIR-2 VAIR-3 VAIR-4>>
+
+<GLOBAL BALLOON-FLOATS
+ <LTABLE LEDGE-1 VAIR-2 LEDGE-2 VAIR-4>>
+
+<GLOBAL BALLOON-DOWNS
+ <LTABLE VAIR-4 VAIR-3 VAIR-2 VAIR-1>>
+
+<ROUTINE RISE-AND-SHINE ("AUX" (IN <IN? ,WINNER ,BALLOON>) R)
+ #DECL ((IN) <OR ATOM FALSE> (R) <OR FALSE OBJECT>)
+ <ENABLE <QUEUE I-BALLOON 3>>
+ <COND (<EQUAL? ,BLOC ,VAIR-4>
+ <DISABLE <INT I-BURNUP>>
+ <DISABLE <INT I-BALLOON>>
+ <REMOVE ,BALLOON>
+ <COND (.IN
+ <JIGS-UP
+"The balloon floats majestically out of the volcano, revealing a
+breathtaking view of a wooded river valley surrounded by impassable
+mountains. In a clearing stands a white house. You drift into high winds,
+which carry you towards the snow-capped peaks. Oh, no! You crash into the
+jagged cliffs of the Flathead Mountains!">)
+ (<EQUAL? ,HERE ,LEDGE-1 ,LEDGE-2 ,VOLCANO-BOTTOM>
+ <TELL
+"You watch the balloon drift out over the rim and away on the wind." CR>)>
+ <SETG BLOC ,VOLCANO-BOTTOM>)
+ (<SET R <LKP ,BLOC ,BALLOON-UPS>>
+ <COND (.IN
+ <TELL "The balloon ascends." CR CR>
+ <SETG BLOC .R>
+ <GOTO .R>)
+ (T
+ <PUT-BALLOON .R "ascends.">)>)
+ (<SET R <LKP ,BLOC ,BALLOON-FLOATS>>
+ <COND (.IN
+ <TELL "The balloon leaves the ledge." CR CR>
+ <SETG BLOC .R>
+ <GOTO .R>)
+ (T
+ <ENABLE <QUEUE I-GNOME 10>>
+ <PUT-BALLOON .R
+"floats away. It seems to be ascending, due to its light load.">
+ <FSET ,RECEPTACLE ,OPENBIT>)>)
+ (.IN
+ <SETG BLOC ,VAIR-1>
+ <TELL "The balloon rises slowly from the ground." CR CR>
+ <GOTO ,VAIR-1>)
+ (T
+ <PUT-BALLOON ,VAIR-1 "lifts off.">)>>
+
+<ROUTINE DECLINE-AND-FALL ("AUX" (IN <IN? ,WINNER ,BALLOON>) R)
+ #DECL ((IN) <OR ATOM FALSE> (R) <OR FALSE OBJECT>)
+ <ENABLE <QUEUE I-BALLOON 3>>
+ <COND (<EQUAL? ,BLOC ,VAIR-1>
+ <COND (.IN
+ <SETG BLOC ,VOLCANO-BOTTOM>
+ <COND (,BINF-FLAG
+ <TELL "The balloon has landed." CR CR>
+ <GOTO ,VOLCANO-BOTTOM>
+ ;<QUEUE I-BALLOON 0>)
+ (T
+ <REMOVE ,BALLOON>
+ <MOVE ,DEAD-BALLOON ,BLOC>
+ <MOVE ,WINNER ,HERE>
+ <DISABLE <INT I-BALLOON>>
+ <TELL
+ "You have landed, but the balloon did not survive."
+ CR CR>
+ <GOTO ,VOLCANO-BOTTOM>)>)
+ (T <PUT-BALLOON ,VOLCANO-BOTTOM "lands.">)>)
+ (<SET R <LKP ,BLOC ,BALLOON-DOWNS>>
+ <COND (.IN
+ <TELL "The balloon descends." CR CR>
+ <SETG BLOC .R>
+ <GOTO .R>)
+ (T <PUT-BALLOON .R "descends.">)>)>>
+
+<ROUTINE BCONTENTS ()
+ <COND (<VERB? TAKE>
+ <TELL
+"The " D ,PRSO " is an integral part of the basket and cannot
+be removed.">
+ <COND (<EQUAL? ,PRSO ,BRAIDED-WIRE>
+ <TELL " The wire might possibly be tied, though.">)>
+ <CRLF>)
+ (<AND <EQUAL? ,PRSO ,CLOTH-BAG>
+ <VERB? LOOK-INSIDE OPEN>>
+ <COND (<VERB? OPEN>
+ <TELL
+"The bag is enormous. The concept of opening it here is ludicrous." CR>)
+ (T
+ <TELL
+"It doesn't appear that there's anything inside." CR>)>)
+ (<AND <VERB? EXAMINE> <EQUAL? ,PRSO ,RECEPTACLE>>
+ <TELL "The receptacle is ">
+ <COND (<FSET? ,PRSO ,OPENBIT> <TELL "open." CR>)
+ (T <TELL "closed." CR>)>)
+ (<VERB? FIND EXAMINE>
+ <TELL
+"The " D ,PRSO " is part of the basket. It may be manipulated
+within the basket but cannot be removed." CR>)>>
+
+<ROUTINE WIRE-FCN ()
+ <COND (<VERB? TAKE FIND EXAMINE>
+ <BCONTENTS>)
+ (<VERB? TIE>
+ <COND (<AND <EQUAL? ,PRSO ,BRAIDED-WIRE>
+ <EQUAL? ,PRSI ,HOOK-1 ,HOOK-2>>
+ <SETG BTIE-FLAG ,PRSI>
+ <FSET ,PRSI ,NDESCBIT>
+ <DISABLE <INT I-BALLOON>>
+ <TELL "The balloon is fastened to the hook." CR>)>)
+ (<AND <VERB? UNTIE>
+ <EQUAL? ,PRSO ,BRAIDED-WIRE>>
+ <COND (,BTIE-FLAG
+ <ENABLE <QUEUE I-BALLOON 3>>
+ <FCLEAR ,BTIE-FLAG ,NDESCBIT>
+ <SETG BTIE-FLAG <>>
+ <TELL "The wire falls off of the hook." CR>)
+ (T <TELL "The wire is not tied to anything." CR>)>)>>
+
+<ROUTINE I-BURNUP ("AUX" (OBJ <FIRST? ,RECEPTACLE>))
+ #DECL ((OBJ) OBJECT)
+ <COND (<EQUAL? ,HERE ,BLOC>
+ <TELL
+"The " D .OBJ " has now burned out, and the cloth bag starts to deflate." CR>)>
+ <REMOVE .OBJ>
+ <SETG BINF-FLAG <>>
+ T>
+
+<ROUTINE SAFE-ROOM-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"You are in a dusty old room which is featureless, except
+for an exit on the north side." CR>
+ <COND (<NOT ,SAFE-FLAG>
+ <TELL
+"Imbedded in the far wall is a rusty box. It appears to be somewhat
+damaged, since an oblong hole has been chipped out of the front of it." CR>)
+ (T
+ <TELL
+"On the far wall is a rusty box, whose door has been blown off." CR>)>)>>
+
+<ROUTINE SAFE-FCN ()
+ <COND (<VERB? TAKE>
+ <TELL "The box is imbedded in the wall." CR>)
+ (<VERB? OPEN>
+ <COND (,SAFE-FLAG <TELL "The box has no door!" CR>)
+ (T <TELL "The box is rusted and will not open." CR>)>)
+ (<VERB? CLOSE>
+ <COND (,SAFE-FLAG <TELL "The box has no door!" CR>)
+ (T <TELL "The box isn't open!" CR>)>)>>
+
+<ROUTINE BRICK-FCN ()
+ <COND (<VERB? BURN>
+ <REMOVE ,BRICK>
+ <JIGS-UP ,OTHER-PROPERTIES>)>>
+
+<GLOBAL OTHER-PROPERTIES
+"Now you've done it. It seems that the brick has other properties
+than weight, namely the ability to blow you to smithereens.">
+
+<ROUTINE FUSE-FCN ()
+ <COND (<OR <VERB? BURN>
+ <AND <VERB? LAMP-ON>
+ <IN? ,MATCH ,WINNER>
+ <FSET? ,MATCH ,ONBIT>>>
+ <TELL "The string starts to burn." CR>
+ <ENABLE <QUEUE I-FUSE 2>>)>>
+
+<ROUTINE I-FUSE ("AUX" (BRICK-ROOM <LOC ,BRICK>) F)
+ <COND (<IN? ,FUSE ,BRICK>
+ <REPEAT ()
+ <COND (<NOT .BRICK-ROOM> <RFALSE>)
+ (<IN? .BRICK-ROOM ,ROOMS>
+ <RETURN>)
+ (T
+ <SET BRICK-ROOM <LOC .BRICK-ROOM>>)>>
+ <MOVE ,EXPLOSION .BRICK-ROOM>
+ <FCLEAR .BRICK-ROOM ,TOUCHBIT>
+ <COND (<EQUAL? .BRICK-ROOM ,HERE>
+ <MUNG-ROOM .BRICK-ROOM
+ "The way is blocked by debris from an explosion.">
+ <JIGS-UP ,OTHER-PROPERTIES>)
+ (<EQUAL? .BRICK-ROOM ,SAFE-ROOM>
+ <ENABLE <QUEUE I-SAFE 5>>
+ <SETG MUNGED-ROOM ,SAFE-ROOM>
+ <TELL "There is an explosion nearby." CR>
+ <COND (<IN? ,BRICK ,SLOT>
+ <FSET ,SLOT ,INVISIBLE>
+ <FSET ,SAFE ,OPENBIT>
+ <FCLEAR ,SAFE-ROOM ,TOUCHBIT>
+ <SETG SAFE-FLAG T>)>)
+ (T
+ <TELL "There is an explosion nearby." CR>
+ <ENABLE <QUEUE I-SAFE 5>>
+ <SETG MUNGED-ROOM .BRICK-ROOM>
+ <COND (<SET F <FIRST? .BRICK-ROOM>>
+ <REPEAT ()
+ <COND (<FSET? .F ,TAKEBIT>
+ <FSET .F ,INVISIBLE>)>
+ <COND (<NOT <SET F <NEXT? .F>>>
+ <RETURN>)>>)>)>
+ <REMOVE ,BRICK>)
+ (<EQUAL? <LOC ,FUSE> ,WINNER ,HERE>
+ <TELL "The string rapidly burns into nothingness." CR>)>
+ <REMOVE ,FUSE>>
+
+<ROUTINE I-SAFE ()
+ <COND (<EQUAL? ,HERE ,MUNGED-ROOM>
+ <JIGS-UP
+"The room trembles and 5000 tons of rock fall on you, turning you
+into a pancake.">)
+ (<NOT ,DEAD>
+ <TELL
+"You may recall that recent explosion. Probably as a result of it, you
+hear an ominous rumbling, as if a nearby room had collapsed." CR>
+ <COND (<EQUAL? ,MUNGED-ROOM ,SAFE-ROOM>
+ <ENABLE <QUEUE I-LEDGE 8>>)>)>
+ <MUNG-ROOM ,MUNGED-ROOM
+ "The way is blocked by debris from an explosion.">>
+
+<ROUTINE I-LEDGE ("AUX" (RM ,LEDGE-2))
+ <COND (<EQUAL? ,HERE ,LEDGE-2>
+ <COND (<IN? ,WINNER ,BALLOON>
+ <COND (,BTIE-FLAG
+ <SETG BLOC ,VOLCANO-BOTTOM>
+ <REMOVE ,BALLOON>
+ <MOVE ,DEAD-BALLOON ,VOLCANO-BOTTOM>
+ <SETG BTIE-FLAG <>>
+ <SETG BINF-FLAG <>>
+ <DISABLE <INT I-BALLOON>>
+ <DISABLE <INT I-BURNUP>>
+ <JIGS-UP
+"The ledge collapses, probably as a result of the explosion, and plummets
+to the ground far below. Sadly, you were still attached to the ledge.">)
+ (T
+ <TELL
+"The ledge collapses, leaving you with no place to land." CR>)>)
+ (T
+ <JIGS-UP
+"The force of the recent explosion has caused the ledge to collapse.">)>)
+ (<NOT ,DEAD>
+ <TELL "The ledge collapses. (That was a narrow escape!)" CR>)>
+ <MUNG-ROOM .RM "The ledge has collapsed and cannot be landed on.">>
+
+<ROUTINE LEDGE-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"You are on a wide ledge high in the volcano. The rim of the volcano is
+about 200 feet above and there is a precipitous drop to the bottom.">
+ <COND (<FSET? ,SAFE-ROOM ,RMUNGBIT>
+ <TELL " The way to the south is blocked by rubble." CR>)
+ (T <TELL " There is a small door to the south." CR>)>)>>
+
+<ROUTINE BLAST ()
+ <COND (<EQUAL? ,HERE ,SAFE-ROOM>)
+ (T
+ <TELL "You must explain how to do that." CR>)>>
+
+<ROUTINE I-GNOME ()
+ <COND (<EQUAL? ,HERE ,LEDGE-1 ,LEDGE-2>
+ <TELL
+"A volcano gnome seems to walk straight out of the wall and ">
+ <COND (<IN? ,WAND ,WINNER>
+ <TELL
+"noticing the wand, straight back in." CR>)
+ (T
+ <TELL
+"says
+\"I have a busy appointment schedule and little time to waste on
+trespassers, but for a small fee I'll show you the way out.\" You
+notice the gnome nervously glancing at his watch." CR>
+ <MOVE ,GNOME ,HERE>)>)
+ (T
+ <ENABLE <QUEUE I-GNOME 1>>
+ <RFALSE>)>>
+
+<GLOBAL GNOME-FLAG <>>
+
+<ROUTINE GNOME-FCN ()
+ <COND (<AND <VERB? GIVE THROW> <EQUAL? ,PRSI ,GNOME>>
+ <COND (<GETPT ,PRSO ,P?VALUE>
+ <TELL
+"\"Thank you very much for the " D ,PRSO ". I don't believe
+I've ever seen one as beautiful. Follow me,\" he says, and a door
+appears on the west end of the ledge. Through the door, you can see
+a narrow chimney sloping steeply downward. The gnome moves quickly,
+and disappears from sight." CR>
+ <REMOVE ,PRSO>
+ <REMOVE ,GNOME>
+ <SETG GNOME-DOOR-FLAG T>)
+ (<BOMB? ,PRSO>
+ <MOVE ,BRICK ,HERE>
+ <REMOVE ,GNOME>
+ <DISABLE <INT I-GNOME>>
+ <DISABLE <INT I-NERVOUS>>
+ <TELL
+"\"That certainly wasn't what I had in mind,\" he says, and disappears." CR>)
+ (T
+ <REMOVE-CAREFULLY ,PRSO>
+ <TELL
+"\"That wasn't quite what I had in mind,\" he says, crunching the
+" D ,PRSO " in his rock-hard hands." CR>)>)
+ (T
+ <TELL
+"The gnome appears increasingly nervous." CR>
+ <COND (<NOT ,GNOME-FLAG>
+ <ENABLE <QUEUE I-NERVOUS 5>>)>
+ <SETG GNOME-FLAG T>)>>
+
+<ROUTINE I-NERVOUS ()
+ <COND (<IN? ,GNOME ,HERE>
+ <TELL
+"The gnome glances at his watch. \"Oops. I'm late for an
+appointment!\" He disappears, leaving you alone on the ledge." CR>)>
+ <REMOVE ,GNOME>>
+
+<ROUTINE PURPLE-BOOK-FCN ()
+ <COND (<AND <VERB? READ>
+ <IN? ,STAMP ,PURPLE-BOOK>
+ <NOT <FSET? ,PURPLE-BOOK ,OPENBIT>>>
+ <TELL <GETP ,PURPLE-BOOK ,P?TEXT> CR>
+ <PERFORM ,V?OPEN ,PURPLE-BOOK>
+ <RTRUE>)
+ (T <RANDOM-BOOK>)>>
+
+<ROUTINE RANDOM-BOOK ()
+ <COND (<VERB? TAKE MOVE PUT>
+ <FSET ,WHITE-BOOK ,TOUCHBIT>
+ <FSET ,PURPLE-BOOK ,TOUCHBIT>
+ <FSET ,GREEN-BOOK ,TOUCHBIT>
+ <FSET ,BLUE-BOOK ,TOUCHBIT>
+ <RFALSE>)>>
+
+; "SUBTITLE TOMB OF THE FLATHEADS"
+
+<ROUTINE HEAD-FCN ()
+ <COND (<VERB? HELLO>
+ <TELL "The Flatheads are dead; therefore they do not respond." CR>)
+ (<VERB? KICK ATTACK RUB OPEN TAKE BURN>
+ <JIGS-UP
+"Although the Flatheads are dead, they foresaw that some cretin
+might tamper with their remains. Therefore, they took steps to
+punish such actions.">)>>
+
+<ROUTINE CRYPT-ANTEROOM-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"The anteroom is large and empty. Marble bas reliefs depict the stirring
+times and afterlife of the Flatheads (the latter a bit optimistically).
+The exit is to the west. A huge marble door stands to the south. ">
+ <TELL "The door is ">
+ <COND (<FSET? ,CRYPT-DOOR ,OPENBIT>
+ <TELL "open.">)
+ (T <TELL "closed.">)>
+ <TELL
+" Above the door is the cryptic inscription: \"Feel Free\"." CR>)>>
+
+<ROUTINE CRYPT-ROOM-FCN (RARG "AUX" CLIT?)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <FCLEAR ,HERE ,ONBIT>
+ <COND (<LIT? ,HERE>
+ <TELL
+"The room contains the earthly remains of the mighty Flatheads, twelve
+somewhat flat heads mounted securely on poles. While the room might be
+expected to contain funerary urns or other evidence of the ritual
+practices of the ancient Zorkers, it is empty of all such objects. There
+is writing carved on the crypt. The only apparent exit is to the north
+through the door to the anteroom. The door is ">
+ <COND (<FSET? ,CRYPT-DOOR ,OPENBIT>
+ <TELL "open.">)
+ (T <TELL "closed.">)>
+ <CRLF>
+ <COND (<NOT <FSET? ,DIM-DOOR ,INVISIBLE>>
+ <TELL
+"Looking closely at the south wall, you can see the dim outline of
+a secret door labelled with the letter \"F\"." CR>)>)
+ (T
+ <DIM-DOOR-APPEARS>)>
+ <FSET ,HERE ,ONBIT>
+ <RTRUE>)
+ (<EQUAL? .RARG ,M-END>
+ <SET CLIT? ,CRYPT-LIT?>
+ <FCLEAR ,CRYPT-ROOM ,ONBIT>
+ <SETG CRYPT-LIT? <LIT? ,CRYPT-ROOM>>
+ <COND (<AND .CLIT?
+ <NOT ,CRYPT-LIT?>>
+ <DIM-DOOR-APPEARS>)>
+ <FSET ,CRYPT-ROOM ,ONBIT>)>>
+
+<GLOBAL CRYPT-LIT? T>
+
+<ROUTINE DIM-DOOR-APPEARS ()
+ <TELL
+"It is dark, but on the south wall is a faint outline of a rectangle, as
+though light were shining around a doorway. You can also make out a faintly
+glowing letter in the center of this area. It might be an \"F\"." CR>
+ <FCLEAR ,DIM-DOOR ,INVISIBLE>>
+
+<ROUTINE CRYPT-OBJECT ()
+ <COND (<VERB? OPEN> <TELL "The crypt is sealed for all time." CR>)
+ (<VERB? RUB> <TELL "The marble is cool." CR>)>>
+
+<ROUTINE CRYPT-DOOR-FCN ()
+ <COND (<VERB? OPEN CLOSE>
+ <OPEN-CLOSE ,PRSO
+ "The crypt door squeaks open."
+ "The crypt door squeaks closed.">)>>
+
+<ROUTINE TOMB-PSEUDO ()
+ <COND (<VERB? THROUGH>
+ <DO-WALK ,P?EAST>
+ T)>>
+
+<GLOBAL DIM-DOOR-FLAG <>>
+
+<ROUTINE DIM-DOOR-FCN ()
+ <COND (<VERB? KNOCK> <TELL "A hollow echo responds." CR>)
+ (<VERB? OPEN CLOSE>
+ <COND (<VERB? OPEN> <SETG DIM-DOOR-FLAG T>)
+ (T <SETG DIM-DOOR-FLAG <>>)>
+ <OPEN-CLOSE ,PRSO
+ "The secret door opens noiselessly."
+ "The secret door closes noiselessly.">)>>
+
+<ROUTINE REPELLENT-FCN ()
+ <COND (<VERB? SHAKE>
+ <COND (,SPRAY-USED? <TELL "The can seems empty." CR>)
+ (T <TELL "There is a sloshing sound from inside." CR>)>)
+ (<AND <VERB? SPRAY PUT> <EQUAL? ,PRSO ,REPELLENT>>
+ <COND (,SPRAY-USED?
+ <TELL
+"The repellent is all gone." CR>)
+ (<NOT ,PRSI>
+ <SETG SPRAY-USED? T>
+ <TELL
+"The spray stinks amazingly for a few moments, then drifts away." CR>)
+ (T
+ <COND (<EQUAL? ,PRSI ,ME>
+ <ENABLE <QUEUE I-SPRAY 8>>
+ <SETG SPRAYED? T>)>
+ <SETG SPRAY-USED? T>
+ <TELL
+"The spray smells like a mixture of old socks and burning rubber. If
+I were a grue I'd sure stay clear!" CR>)>)>>
+
+<GLOBAL SPRAY-USED? <>>
+
+<ROUTINE I-SPRAY ()
+ <SETG SPRAYED? <>>
+ <TELL "That horrible smell is much less pungent now." CR>>
+
+<ROUTINE ZORK3-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"Beyond the door is a roughly hewn staircase leading down into darkness.
+The landing on which you stand is covered with carefully drawn magical runes
+like those sketched upon the workbench of the Wizard of Frobozz.
+These have been overlaid with sweeping green lines of enormous power, which
+undulate back and forth across the landing. ">
+ <COND (<IN? ,WAND ,WINNER>
+ <TELL
+"The wand begins to vibrate in harmony with the motion of the lines.
+You feel yourself compelled downward, and you yield, stepping onto the
+staircase. As you pass the green lines, they flare and disappear with a
+burst of light, and you tumble down the staircase!|
+|
+At the bottom, a vast red-lit hall stretches off into the distance.
+Sinister statues guard the entrance to a dimly visible room far ahead.
+With courage and cunning you have conquered the Wizard of Frobozz and
+become the master of his domain, but the final challenge awaits!|
+|
+(The ultimate adventure concludes in \"Zork III: The Dungeon Master\".)|
+|
+" CR>
+ <SETG WON-FLAG T>
+ <FINISH>)
+ (T
+ <JIGS-UP
+"The green curves begin to vibrate toward you, as if searching for something.
+One by one your possessions glow bright green. Finally, you are attacked by
+these magical wardens, and destroyed!">)>)>>
+
+\
+
+;"SUBTITLE A DROP IN THE BUCKET"
+
+<GLOBAL BUCKET-TOP-FLAG <>>
+
+<GLOBAL EVAPORATED <>>
+
+<ROUTINE I-BUCKET ()
+ <COND (<IN? ,WATER ,BUCKET>
+ <SETG EVAPORATED T>
+ <REMOVE ,WATER>)>
+ <RFALSE>>
+
+<ROUTINE WATER-FCN ("AUX" AV W PI?)
+ #DECL ((AV) <OR OBJECT FALSE> (W) OBJECT (PI?) <OR ATOM FALSE>)
+ <COND (<VERB? SGIVE> <RFALSE>)
+ (<VERB? THROUGH>
+ <PERFORM ,V?SWIM ,PRSO>
+ <RTRUE>)
+ (<VERB? FILL> ;"fill bottle with water =>"
+ <SET W ,PRSI> ;"put water in bottle"
+ <SETG PRSA ,V?PUT>
+ <SETG PRSI ,PRSO>
+ <SETG PRSO .W>
+ <SET PI? <>>)
+ (<EQUAL? ,PRSO ,GLOBAL-WATER ,WATER>
+ <SET W ,PRSO>
+ <SET PI? <>>)
+ (,PRSI
+ <SET W ,PRSI>
+ <SET PI? T>)>
+ <COND (<EQUAL? .W ,GLOBAL-WATER>
+ <SET W ,WATER>
+ <COND (<VERB? TAKE PUT> <REMOVE .W>)>)>
+ <COND (.PI? <SETG PRSI .W>)
+ (T <SETG PRSO .W>)>
+ <SET AV <LOC ,WINNER>>
+ <COND (<NOT <FSET? .AV ,VEHBIT>> <SET AV <>>)>
+ <COND (<AND <VERB? TAKE PUT> <NOT .PI?>>
+ <COND (<AND .AV <EQUAL? .AV ,PRSI>>
+ <PUDDLE .AV>)
+ (<AND .AV <NOT ,PRSI> <NOT <IN? .W .AV>>>
+ <PUDDLE .AV>)
+ (<AND ,PRSI <NOT <EQUAL? ,PRSI ,TEAPOT>>>
+ <TELL "The water leaks out of the " D ,PRSI
+ " and evaporates immediately." CR>
+ <REMOVE .W>)
+ (<IN? ,TEAPOT ,WINNER>
+ <COND (<NOT <FIRST? ,TEAPOT>>
+ <COND (<EQUAL? ,HERE ,POOL-ROOM>
+ <MOVE ,SALTY-WATER ,TEAPOT>)
+ (T
+ <MOVE ,WATER ,TEAPOT>)>
+ <TELL "The teapot is now full of water." CR>)
+ (T
+ <TELL "The teapot isn't currently empty." CR>
+ <RTRUE>)>)
+ (<AND <IN? ,PRSO ,TEAPOT>
+ <VERB? TAKE>
+ <NOT ,PRSI>>
+ <SETG PRSO ,TEAPOT>
+ <ITAKE>
+ <SETG PRSO .W>)
+ (T
+ <TELL "The water slips through your fingers." CR>)>)
+ (.PI? <TELL "Nice try." CR>)
+ (<VERB? DROP GIVE>
+ <COND (<AND <EQUAL? ,PRSO ,WATER>
+ <NOT <HELD? ,WATER>>>
+ <TELL "You don't have any water." CR>
+ <RTRUE>)>
+ <REMOVE ,WATER>
+ <COND (.AV
+ <PUDDLE .AV>)
+ (T
+ <TELL
+"The water spills to the floor and evaporates." CR>
+ <REMOVE ,WATER>)>)
+ (<VERB? THROW>
+ <TELL
+"The water splashes on the walls and evaporates." CR>
+ <REMOVE ,WATER>)>>
+
+<ROUTINE PUDDLE (AV)
+ <TELL "There is now a puddle in the bottom of the " D .AV "." CR>
+ <MOVE ,PRSO .AV>>
+
+<ROUTINE BUCKET-FCN ("OPTIONAL" (RARG ,M-BEG))
+ <COND (<EQUAL? .RARG ,M-BEG>
+ <COND (<AND <VERB? BURN>
+ <EQUAL? ,PRSO ,BUCKET>>
+ <TELL
+ "The bucket is fireproof, and won't burn." CR>)
+ (<AND <VERB? DROP PUT>
+ <EQUAL? ,PRSO ,WATER>
+ <EQUAL? ,PRSI ,BUCKET>
+ <IN? ,BUCKET ,WELL-BOTTOM>
+ <NOT <IN? ,WINNER ,BUCKET>>>
+ <TELL "The bucket swiftly rises up, and is gone." CR>
+ <MOVE ,BUCKET ,WELL-TOP>
+ <MOVE ,WATER ,BUCKET>
+ <SETG BUCKET-TOP-FLAG T>
+ <ENABLE <QUEUE I-BUCKET 100>>
+ <RTRUE>)
+ (<VERB? KICK>
+ <JIGS-UP "If you insist.">)>)
+ (<EQUAL? .RARG ,M-END>
+ <COND (<AND <IN? ,WATER ,BUCKET>
+ <NOT ,BUCKET-TOP-FLAG>>
+ <TELL "The bucket rises and comes to a stop." CR CR>
+ <SETG BUCKET-TOP-FLAG T>
+ <SETG EVAPORATED <>>
+ <PASS-THE-BUCKET ,WELL-TOP>
+ <ENABLE <QUEUE I-BUCKET 100>>
+ <RTRUE>)
+ (<AND ,BUCKET-TOP-FLAG
+ <NOT <IN? ,WATER ,BUCKET>>>
+ <COND (,EVAPORATED
+ <TELL
+"The last of the water evaporates, and the bucket descends." CR CR>)
+ (T
+ <TELL
+"The bucket descends and comes to a stop." CR CR>)>
+ <SETG BUCKET-TOP-FLAG <>>
+ <PASS-THE-BUCKET ,WELL-BOTTOM>)>)
+ (<VERB? CLIMB-ON>
+ <PERFORM ,V?BOARD ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE PASS-THE-BUCKET (R)
+ #DECL ((R) OBJECT)
+ <MOVE ,BUCKET .R>
+ <COND (<IN? ,WINNER ,BUCKET>
+ <GOTO .R>)>>
+
+\
+
+;"SUBTITLE CHOMPERS IN WONDERLAND"
+
+<ROUTINE POSTS-ROOM-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-BEG>
+ <COND (<AND <VERB? TAKE> <FSET? ,PRSO ,NONLANDBIT>>
+ <TELL
+"The " D ,PRSO " is now much larger than you are. You have no hope of
+taking it." CR>)>)>>
+
+<ROUTINE EATME-FCN ("AUX" F N)
+ <COND (<AND <VERB? EAT>
+ <EQUAL? ,PRSO ,EAT-ME-CAKE>
+ <EQUAL? ,HERE ,TEA-ROOM>>
+ <TELL
+"Suddenly, the room appears to have become very large (although
+everything you are carrying seems to be its normal size)." CR CR>
+ <REMOVE ,EAT-ME-CAKE>
+ <FSET ,ROBOT ,INVISIBLE>
+ <FSET ,ALICE-TABLE ,INVISIBLE>
+ <SET F <FIRST? ,HERE>>
+ <REPEAT ()
+ <COND (<NOT .F> <RETURN>)
+ (T
+ <SET N <NEXT? .F>>
+ <COND (<AND <NOT <EQUAL? .F ,ADVENTURER>>
+ <FSET? .F ,TAKEBIT>>
+ <FSET .F ,NONLANDBIT>
+ <FSET .F ,TRYTAKEBIT>
+ <MOVE .F ,POSTS-ROOM>)>)>
+ <SET F .N>>
+ <GOTO ,POSTS-ROOM>)
+ (T <CAKE-CRUMBLE>)>>
+
+<ROUTINE CAKE-CRUMBLE ("AUX" CAKE)
+ <COND (<FSET? ,PRSO ,FOODBIT> <SET CAKE ,PRSO>)
+ (T <SET CAKE ,PRSI>)>
+ <COND (<OR <EQUAL? ,HERE ,TEA-ROOM ,POSTS-ROOM ,POOL-ROOM>
+ <EQUAL? ,HERE ,MACHINE-ROOM ,MAGNET-ROOM ,CAGE-ROOM>
+ <EQUAL? ,HERE ,WELL-TOP ,IN-CAGE>>
+ <RFALSE>)
+ (T
+ <REMOVE .CAKE>
+ <TELL
+"The " D .CAKE " has crumbled to dust." CR>)>>
+
+<ROUTINE CAKE-FCN ("AUX" F N)
+ <COND (<VERB? READ>
+ <COND (<FSET? ,PRSO ,NONLANDBIT>
+ <TELL
+"The cake is much too tall now for you to read the lettering." CR>)
+ (,PRSI
+ <COND (<EQUAL? ,PRSI ,PALANTIR-1 ,PALANTIR-2 ,PALANTIR-3>
+ <PERFORM ,V?LOOK-INSIDE ,PRSI>)
+ (<EQUAL? ,PRSI ,FLASK>
+ <TELL "The letters, now visible, say \"">
+ <COND (<EQUAL? ,PRSO ,RED-ICING>
+ <TELL "Evaporate">)
+ (<EQUAL? ,PRSO ,ORANGE-ICING>
+ <TELL "Explode">)
+ (T <TELL "Enlarge">)>
+ <TELL "\"." CR>)
+ (T <TELL "You can't see through that!" CR>)>)
+ (T
+ <TELL
+"The first letter is a capital E. The rest is too small to read." CR>)>)
+ (<AND <VERB? EAT>
+ <EQUAL? ,HERE ,TEA-ROOM ,POSTS-ROOM ,POOL-ROOM>>
+ <COND (<EQUAL? ,PRSO ,ORANGE-ICING>
+ <REMOVE ,PRSO>
+ <ICEBOOM>)
+ (<EQUAL? ,PRSO ,RED-ICING>
+ <REMOVE ,PRSO>
+ <JIGS-UP
+"That was delicious, but your dying memory is of feeling horribly dehydrated
+and thirsty.">)
+ (<EQUAL? ,PRSO ,BLUE-ICING>
+ <REMOVE ,PRSO>
+ <TELL "The room around you seems to be getting smaller."
+ CR CR>
+ <COND (<EQUAL? ,HERE ,POSTS-ROOM>
+ <FCLEAR ,ROBOT ,INVISIBLE>
+ <FCLEAR ,ALICE-TABLE ,INVISIBLE>
+ <FSET ,POSTS ,INVISIBLE>
+ <SET F <FIRST? ,HERE>>
+ <REPEAT ()
+ <COND (<NOT .F> <RETURN>)
+ (T
+ <SET N <NEXT? .F>>
+ <COND (<AND <NOT <EQUAL? .F ,ADVENTURER>>
+ <FSET? .F ,TAKEBIT>>
+ <FCLEAR .F ,NONLANDBIT>
+ <FCLEAR .F ,TRYTAKEBIT>
+ <MOVE .F ,TEA-ROOM>)>)>
+ <SET F .N>>
+ <GOTO ,TEA-ROOM>)
+ (T <JIGS-UP
+"The room seems to have become too small to hold you. The walls are not as
+compressible as your body, which is demolished." >)>)>)
+ (<AND <VERB? THROW PUT>
+ <EQUAL? ,PRSO ,ORANGE-ICING>
+ <EQUAL? ,HERE ,TEA-ROOM ,POSTS-ROOM ,POOL-ROOM>>
+ <REMOVE ,PRSO>
+ <ICEBOOM>)
+ (<AND <VERB? THROW PUT>
+ <EQUAL? ,PRSO ,RED-ICING ,BLUE-ICING ,ORANGE-ICING>
+ <EQUAL? ,PRSI ,POOL>>
+ <COND (<EQUAL? ,PRSO ,BLUE-ICING ,ORANGE-ICING>
+ <TELL "The cake sinks majestically into the pool." CR>
+ <REMOVE ,PRSO>
+ <RTRUE>)>
+ <MOVE ,PRSO ,HERE>
+ <REMOVE ,PRSI>
+ <TELL
+"Most of the pool evaporates, revealing a (slightly damp but
+still valuable) package of rare candies. The red cake must be
+pretty strong stuff, since it remains intact!" CR>
+ <FCLEAR ,CANDY ,INVISIBLE>)
+ (T <CAKE-CRUMBLE>)>>
+
+<ROUTINE CANDY-FCN ()
+ <COND (<VERB? EXAMINE READ>
+ <FIXED-FONT-ON>
+ <TELL
+" Frobozz Magic Candy Company|
+ >>Special Assortment<<|
+ Candied Grasshoppers|
+ Chocolated Ants|
+ Worms Glacee|
+(By Appointment to His Majesty, Dimwit I)|
+">
+ <FIXED-FONT-OFF>
+ <RTRUE>)
+ (<VERB? EAT OPEN>
+ <TELL
+"Such rich food would probably not be good for you." CR>)>>
+
+<ROUTINE TOP-ETCHINGS-F ()
+ <COND (<VERB? EXAMINE READ>
+ <FIXED-FONT-ON>
+ <TELL
+" o b o|
+ r z|
+f M A G I C z|
+c W E L L y|
+ o n|
+ m p a|
+">
+ <FIXED-FONT-OFF>
+ <RTRUE>)>>
+
+<ROUTINE BOTTOM-ETCHINGS-F ()
+ <COND (<VERB? EXAMINE READ>
+ <FIXED-FONT-ON>
+ <TELL
+" o b o|
+|
+ A G I|
+ E L|
+|
+ m p a|
+">
+ <FIXED-FONT-OFF>
+ <RTRUE>)>>
+
+<ROUTINE CUBE-F ()
+ <COND (<VERB? EXAMINE READ>
+ <FIXED-FONT-ON>
+ <TELL
+" Bank of Zork|
+ VAULT|
+ *722 GUE*|
+ Frobozz Magic Vault Company|
+">
+ <FIXED-FONT-OFF>
+ <RTRUE>)>>
+
+<ROUTINE FIXED-FONT-ON () <PUT 0 8 <BOR <GET 0 8> 2>>>
+
+<ROUTINE FIXED-FONT-OFF() <PUT 0 8 <BAND <GET 0 8> -3>>>
+
+<ROUTINE POOL-FCN ()
+ <COND (<VERB? DRINK>
+ <TELL
+"The water is extremely salty." CR>)
+ (<VERB? LOOK-UNDER>
+ <TELL
+"You'd probably have to enter the pool to see what's below the surface." CR>)
+ (<VERB? THROUGH>
+ <JIGS-UP
+"You enter the pool, thrash around for a good while, and then drown.
+Sad, but true.">)>>
+
+<ROUTINE FLASK-FCN ()
+ <COND (<VERB? LOOK-INSIDE>
+ <TELL
+"You notice that objects behind the flask appear to be magnified.
+You might try looking at something through the flask." CR>)
+ (<AND <VERB? READ> <EQUAL? ,PRSI ,FLASK>>
+ <TELL
+"The flask distorts and magnifies the " D ,PRSO ", showing details
+not noticed earlier." CR>
+ <RFALSE>)
+ (<VERB? OPEN>
+ <MUNG-ROOM ,HERE "Noxious vapors prevent your entry.">
+ <JIGS-UP ,FATAL-VAPORS>)
+ (<VERB? MUNG THROW>
+ <TELL "The flask breaks into pieces." CR>
+ <REMOVE ,PRSO>
+ <JIGS-UP ,FATAL-VAPORS>)>>
+
+<GLOBAL FATAL-VAPORS
+"As you pass out, you realize that the vapors from the
+flask's contents are fatal.">
+
+<ROUTINE PLEAK ()
+ <COND (<VERB? TAKE>
+ <TELL <PICK-ONE ,YUKS> CR>)
+ (<VERB? PLUG>
+ <TELL "The leak is too high above you to reach." CR>)>>
+
+<ROUTINE ICEBOOM ()
+ <MUNG-ROOM ,HERE
+"The entrance is blocked by sticky orange rubble. Probably some careless
+adventurer was playing with blasting cakes.">
+ <JIGS-UP
+"You have been blasted to smithereens (wherever they are).">>
+
+<ROUTINE MAGNET-ROOM-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"You are in a circular room with a low ceiling. There are exits to
+the east and southeast." CR>)
+ (<AND <EQUAL? .RARG ,M-ENTER>
+ ,CAROUSEL-FLIP-FLAG>
+ <COND (,CAROUSEL-ZOOM-FLAG
+ <JIGS-UP <COND (<EQUAL? ,ADVENTURER ,WINNER>
+"According to Prof. TAA of GUE Tech, the rapidly changing magnetic
+fields in the room are intense enough to electrocute you.
+I really don't know, but in any event, something just killed you." )
+ (T
+"According to Prof. TAA of GUE Tech, the magnetic fields in the room are
+intense enough to fry the delicate innards of the robot. I really don't
+know, but in any event, smoke pours from its ears and it has stopped moving.")>>)
+ (<EQUAL? ,WINNER ,ADVENTURER>
+ <TELL
+"As you enter, your compass starts spinning wildly." CR>
+ <COND (<NOT ,COMPASS-KLUDGE>
+ <TELL
+"What compass, you ask? The one which allows you to specify compass directions
+for movement.">
+ <SETG COMPASS-KLUDGE T>)>
+ <CRLF>)>)>>
+
+<GLOBAL COMPASS-KLUDGE <>>
+
+<ROUTINE MAGNET-ROOM-EXIT ()
+ <COND (<AND ,CAROUSEL-FLIP-FLAG <EQUAL? ,WINNER ,ADVENTURER>>
+ <TELL "You cannot get your bearings..." CR CR>
+ <COND (<PROB 50>
+ ,MACHINE-ROOM)
+ (T
+ ,TEA-ROOM)>)
+ (<EQUAL? ,PRSO ,P?EAST>
+ ,MACHINE-ROOM)
+ (<OR <EQUAL? ,PRSO ,P?SE>
+ <EQUAL? ,PRSO ,P?OUT>>
+ ,TEA-ROOM)
+ (T
+ <TELL "You can't go that way." CR>
+ <RFALSE>)>>
+
+<GLOBAL CAROUSEL-ZOOM-FLAG <>>
+
+<GLOBAL CAROUSEL-FLIP-FLAG <>>
+
+<ROUTINE BUTTONS ()
+ <COND (<VERB? PUSH>
+ <COND (<EQUAL? ,WINNER ,ADVENTURER>
+ <JIGS-UP
+"There is a giant spark and you are fried to a crisp.">)
+ (<EQUAL? ,PRSO ,SQUARE-BUTTON>
+ <COND (,CAROUSEL-ZOOM-FLAG
+ <TELL "Nothing seems to happen." CR>)
+ (<SETG CAROUSEL-ZOOM-FLAG T>
+ <TELL "The whirring increases in intensity." CR>)>)
+ (<EQUAL? ,PRSO ,ROUND-BUTTON>
+ <COND (,CAROUSEL-ZOOM-FLAG
+ <SETG CAROUSEL-ZOOM-FLAG <>>
+ <TELL "The whirring decreases in intensity." CR>)
+ (T
+ <TELL "Nothing seems to happen." CR>)>)
+ (<EQUAL? ,PRSO ,TRIANGULAR-BUTTON>
+ <SETG CAROUSEL-FLIP-FLAG <NOT ,CAROUSEL-FLIP-FLAG>>
+ <COND (<IN? ,IRON-BOX ,CAROUSEL-ROOM>
+ <TELL
+"A dull thump is heard in the distance." CR>
+ <COND (<FSET? ,IRON-BOX ,INVISIBLE>
+ <FCLEAR ,IRON-BOX ,INVISIBLE>)
+ (T
+ <FSET ,IRON-BOX ,INVISIBLE>)>
+ <COND (<NOT <FSET? ,IRON-BOX ,INVISIBLE>>
+ <FCLEAR ,CAROUSEL-ROOM ,TOUCHBIT>)>
+ T)
+ (T <TELL "Click." CR>)>)>)>>
+
+<GLOBAL CAGE-SOLVE-FLAG <>>
+
+<ROUTINE SPHERE-FCN ("AUX" FL)
+ #DECL ((FL) <OR ATOM FALSE>)
+ <COND (<AND <NOT ,CAGE-SOLVE-FLAG> <VERB? TAKE MOVE PUT>>
+ <SET FL T>)
+ (T <SET FL <>>)>
+ <COND (<AND .FL <EQUAL? ,ADVENTURER ,WINNER>>
+ <TELL
+"As you reach for the sphere, a solid steel cage falls from the ceiling
+to entrap you. To make matters worse, poisonous gas starts coming
+into the room." CR CR>
+ <COND (<IN? ,ROBOT ,HERE>
+ <MOVE ,ROBOT ,IN-CAGE>
+ <FSET ,ROBOT ,NDESCBIT>)>
+ <GOTO ,IN-CAGE>
+ <MOVE ,CAGE ,HERE>
+ <FSET ,CAGE ,NDESCBIT>
+ <FCLEAR ,CAGE ,INVISIBLE>
+ <ENABLE <QUEUE I-SPHERE 6>>
+ T)
+ (.FL
+ <FSET ,PALANTIR-1 ,INVISIBLE>
+ <REMOVE ,ROBOT>
+ <FSET ,PRSO ,INVISIBLE>
+ <MOVE ,CAGE ,CAGE-ROOM>
+ <FCLEAR ,CAGE ,INVISIBLE>
+ <JIGS-UP
+"As the robot reaches for the sphere, a solid steel cage falls from the
+ceiling, trapping him. You can faintly hear his last words: \"Whirr,
+buzz, click!\" A cloud of smoke rising from beneath the cage confirms
+your fears about the fate of your brave mechanical friend.">
+ T)
+ (<VERB? LOOK-INSIDE EXAMINE>
+ <PALANTIR>)>>
+
+<ROUTINE I-SPHERE ()
+ <COND (<EQUAL? ,HERE ,CAGE-ROOM ,IN-CAGE>
+ <FSET ,PALANTIR-1 ,INVISIBLE>
+ <MUNG-ROOM ,CAGE-ROOM
+"You are stopped by a cloud of poisonous gas.">
+ <JIGS-UP
+"Time passes...and you die from some obscure poisoning.">)>>
+
+<ROUTINE IN-CAGE-FCN (RARG)
+ <COND (,CAGE-SOLVE-FLAG <SETG HERE ,CAGE-ROOM>)>>
+
+<ROUTINE ROBOT-FCN ("OPTIONAL" (RARG ,M-OBJECT))
+ <COND (<EQUAL? ,WINNER ,ROBOT>
+ <COND (<VERB? SGIVE> <RFALSE>)
+ (<VERB? FOLLOW>
+ <TELL
+"\"My memory circuits are not that advanced. I can move as directed,
+though.\"" CR>)
+ (<AND <VERB? RAISE TAKE MOVE> <EQUAL? ,PRSO ,CAGE>>
+ <TELL
+"The cage shakes and is hurled across the room. It's hard to
+say, but the robot appears to be smiling." CR CR>
+ <DISABLE <INT I-SPHERE>>
+ <SETG WINNER ,ADVENTURER>
+ <GOTO ,CAGE-ROOM>
+ <MOVE ,MANGLED-CAGE ,CAGE-ROOM>
+ <FCLEAR ,ROBOT ,NDESCBIT>
+ <FSET ,PALANTIR-1 ,TAKEBIT>
+ <MOVE ,ROBOT ,CAGE-ROOM>
+ <SETG CAGE-SOLVE-FLAG T>)
+ (<VERB? EAT DRINK>
+ <COND (<IN? ,ADVENTURER ,HERE>
+ <TELL
+"\"I am sorry but that is difficult for a being with no mouth.\"" CR>)>
+ <RTRUE>)
+ (<AND <PROB 2>
+ <IN? ,ADVENTURER ,HERE>>
+ <TELL
+"\"Buzz! Buzz! Buzz! My circuits are getting rusty. Try again.\"" CR>)
+ (<VERB? READ EXAMINE>
+ <COND (<IN? ,ADVENTURER ,HERE>
+ <TELL
+"\"My vision is not sufficiently acute to do that.\"" CR>)>
+ <RTRUE>)
+ (<VERB? DROP PUT THROW>
+ <COND (<NOT <IN? ,ADVENTURER ,HERE>>
+ <RFALSE>)
+ (<IN? ,PRSO ,ROBOT>
+ <TELL "\"Whirr, buzz, click!\"" CR>
+ <RFALSE>)
+ (T
+ <TELL
+"\"Click! I don't have that. Buzz! Whirr!\"" CR>)>)
+ (<VERB? WALK TAKE PUSH TURN>
+ <COND (<NOT <IN? ,ADVENTURER ,HERE>>
+ <RFALSE>)
+ (<PROB 80>
+ <TELL "\"Whirr, buzz, click!\"" CR>)
+ (T
+ <TELL "\"Buzz, click, whirr!\"" CR>)>
+ <RFALSE>)
+ (T
+ <COND (<IN? ,ADVENTURER ,HERE>
+ <TELL
+"\"My programming is insufficient to allow me to perform that task.\"" CR>)>
+ <RTRUE>)>)
+ (<VERB? OPEN LOOK-INSIDE CLOSE>
+ <TELL "There's no access panel or door on the robot." CR>)
+ (<AND <VERB? GIVE>
+ <EQUAL? ,PRSI ,ROBOT>>
+ <MOVE ,PRSO ,ROBOT>
+ <TELL "The robot gladly takes the "
+ D ,PRSO
+ " and nods his head-like appendage in thanks." CR>)
+ (<VERB? THROW MUNG>
+ <TELL
+"The robot falls to the ground and (being of shoddy construction)
+disintegrates before your eyes." CR>
+ <REMOVE <COND (<VERB? THROW> ,PRSI) (,PRSO)>>)>>
+
+\
+
+;"SUBTITLE BANK OF ZORK"
+
+<GLOBAL BANK-SOLVE-FLAG <>>
+
+<ROUTINE BILLS-OBJECT ()
+ <SETG BANK-SOLVE-FLAG T>
+ <COND (<VERB? BURN>
+ <TELL "Nothing like having money to burn!" CR>
+ <RFALSE>)
+ (<VERB? EAT>
+ <TELL "Talk about eating rich foods!" CR>)>>
+
+<ROUTINE BKLEAVEE ("OPTIONAL" (RM ,TELLER-EAST))
+ #DECL ((RM) OBJECT)
+ <COND (<OR <HELD? ,BILLS> <HELD? ,PORTRAIT>>
+ <TELL
+"An alarm rings briefly, and an invisible force bars your way." CR>
+ <RFALSE>)
+ (T .RM)>>
+
+<ROUTINE BKLEAVEW ()
+ <BKLEAVEE ,TELLER-WEST>>
+
+<GLOBAL SCOL-ROOMS <LTABLE
+ P?EAST
+ VIEWING-EAST
+ P?WEST
+ VIEWING-WEST
+ P?NORTH
+ SMALL-ROOM
+ P?SOUTH
+ VAULT>>
+
+<GLOBAL SCOL-WALLS <TABLE
+ VIEWING-WEST
+ SEWL
+ VIEWING-WEST
+ VIEWING-EAST
+ SWWL
+ VIEWING-EAST
+ SMALL-ROOM
+ SSWL
+ VAULT
+ VAULT
+ SNWL
+ SMALL-ROOM>>
+
+<GLOBAL SCOL-ROOM VIEWING-WEST>
+
+<ROUTINE DEPOSITORY-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-ENTER>
+ <SETG SCOL-ROOM <LKP ,PRSO ,SCOL-ROOMS>>)>>
+
+<ROUTINE TELLER-ROOM (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"You are in a small room, which was used by a bank officer who retrieved
+safety deposit boxes for the customer. On the north side of the room is a
+sign which reads \"Viewing Room\". On the ">
+ <COND (<EQUAL? ,HERE ,TELLER-WEST> <TELL "west">)
+ (T <TELL "east">)>
+ <TELL " side of the room, above an open door, is a sign reading||
+
+ BANK PERSONNEL ONLY|
+" CR>)>>
+
+<ROUTINE SCOL-OBJECT ("OPTIONAL" (OBJ <>))
+ <COND (<VERB? PUSH MOVE TAKE RUB>
+ <TELL "As you try, your hand seems to go through it." CR>)
+ (<AND <VERB? ATTACK> ,PRSI>
+ <TELL "The " D ,PRSI " goes through it." CR>)
+ (<AND <VERB? THROW OVERBOARD> <EQUAL? ,PRSI ,CURTAIN .OBJ>>
+ <COND (<IN? ,PRSO ,WINNER>
+ <V-THROUGH ,PRSO>)
+ (T <TELL "You don't have that!" CR>)>)>>
+
+<ROUTINE GET-WALL (RM "AUX" W)
+ #DECL ((RM) OBJECT)
+ <SET W ,SCOL-WALLS>
+ <REPEAT ()
+ <COND (<EQUAL? <GET .W 0> .RM>
+ <RETURN .W>)
+ (T <SET W <REST .W 6>>)>>>
+
+<ROUTINE SCOLWALL ()
+ <COND (<AND <VERB? THROW OVERBOARD PUT>
+ <EQUAL? ,HERE ,SCOL-ACTIVE>
+ <EQUAL? ,PRSI <GET <GET-WALL ,HERE> 1>>>
+ <SCOL-OBJECT ,PRSI>)>>
+
+<ROUTINE SCOL-GO (OBJ)
+ #DECL ((OBJ) OBJECT)
+ <SETG SCOL-ACTIVE ,SCOL-ROOM>
+ <COND (.OBJ <SCOL-OBJ .OBJ 0 ,SCOL-ROOM>)
+ (T
+ <SCOL-THROUGH 12 ,SCOL-ROOM>)>>
+
+<ROUTINE SCOL-OBJ (OBJ CINT RM)
+ #DECL ((OBJ) OBJECT (CINT) FIX (RM) OBJECT)
+ <ENABLE <QUEUE I-CURTAIN .CINT>>
+ <MOVE .OBJ .RM>
+ <COND (<EQUAL? .RM ,DEPOSITORY>
+ <TELL "The " D .OBJ " passes through the wall and vanishes." CR>)
+ (T
+ <TELL "The curtain dims slightly as the "
+ D .OBJ " passes through." CR>
+ <SETG SCOL-ROOM <>>
+ T)>>
+
+<ROUTINE SCOL-THROUGH (CINT RM)
+ #DECL ((CINT) FIX (RM) OBJECT)
+ <ENABLE <QUEUE I-CURTAIN .CINT>>
+ <TELL "You feel somewhat disoriented as you pass through..." CR CR>
+ <GOTO .RM>>
+
+<GLOBAL SCOL-ACTIVE <>>
+
+<ROUTINE I-CURTAIN ()
+ <SETG SCOL-ACTIVE <>>
+ <COND (<EQUAL? ,HERE ,VAULT>
+ <JIGS-UP
+"A metallic voice says \"Hello, Intruder! Your unauthorized presence
+in the vault of the Bank of Zork has set off all sorts of nasty surprises,
+most of which are fatal. This message brought to you by the Frobozz Magic
+Vault Company.\"">)
+ (<EQUAL? ,HERE ,VIEWING-EAST ,VIEWING-WEST ,SMALL-ROOM>
+ <TELL "You hear a faint voice say \"Curtain Door Closed.\"" CR>
+ <COND (<EQUAL? ,HERE ,SMALL-ROOM>
+ <COND (,ZGNOME-FLAG <RTRUE>)
+ (T
+ <ENABLE <QUEUE I-ZGNOME 3>>
+ <SETG ZGNOME-FLAG T>)>)>)>>
+
+<GLOBAL ZGNOME-FLAG <>>
+
+<ROUTINE I-ZGNOME ()
+ <COND (<EQUAL? ,HERE ,SMALL-ROOM>
+ <ENABLE <QUEUE I-ZGNOME-OUT 12>>
+ <TELL
+"An epicene gnome of Zurich wearing a three-piece suit and carrying a
+safety deposit box materializes in the room.">
+ <COND (<IN? ,WAND ,WINNER>
+ <TELL
+" He notices the wand and dematerializes speedily." CR>)
+ (T
+ <TELL " \"You seem to have
+forgotten to deposit your valuables,\" he says, tapping the lid of the
+box impatiently. \"We don't usually allow customers to use the boxes
+here, but we can make this ONE exception, I suppose...\" He looks
+askance at you over his wire-rimmed bifocals." CR>
+ <MOVE ,GNOME-OF-ZURICH ,HERE>)>)>>
+
+<ROUTINE ZGNOME-FCN ()
+ <COND (<AND <VERB? GIVE THROW> <EQUAL? ,PRSI ,GNOME-OF-ZURICH>>
+ <COND (<GETPT ,PRSO ,P?VALUE>
+ <TELL
+"The gnome carefully places the " D ,PRSO " in the
+deposit box. \"Let me show you the way out,\" he says, making it clear
+he will be pleased to see the last of you. Then, you are momentarily
+disoriented, and when you recover you are back at the Bank Entrance." CR>
+ <REMOVE ,GNOME-OF-ZURICH>
+ <REMOVE ,PRSO>
+ <DISABLE <INT I-ZGNOME-OUT>>
+ <GOTO ,BANK-ENTRANCE>
+ <RTRUE>)
+ (<BOMB? ,PRSO>
+ <REMOVE ,GNOME-OF-ZURICH>
+ <MOVE ,PRSO ,HERE>
+ <DISABLE <INT I-ZGNOME>>
+ <DISABLE <INT I-ZGNOME-OUT>>
+ <TELL
+"\"You are so very gracious. I really cannot accept.\" he says. He
+disappears, a wry smile on his lips." CR>)
+ (T
+ <TELL
+"\"I wouldn't put THAT in a safety deposit box,\" remarks the gnome with
+disdain, tossing it over his shoulder, where it disappears with an
+understated \"pop\"." CR>
+ <REMOVE-CAREFULLY ,PRSO>
+ <RTRUE>)>)
+ (<VERB? ATTACK>
+ <TELL
+"The gnome says \"Well, I never...\" and disappears with a snap of his
+fingers, leaving you alone." CR>
+ <REMOVE ,GNOME-OF-ZURICH>
+ <DISABLE <INT I-ZGNOME-OUT>>)
+ (T
+ <TELL
+"The gnome appears increasingly impatient." CR>)>>
+
+<ROUTINE I-ZGNOME-OUT ()
+ <REMOVE ,GNOME-OF-ZURICH>
+ <COND (<EQUAL? ,HERE ,SMALL-ROOM>
+ <TELL
+"The gnome looks impatient: \"I may have another customer waiting;
+you'll just have to fend for yourself, I'm afraid.\" He disappears,
+leaving you alone." CR>)>>
+
+<ROUTINE BOMB? (O)
+ <COND (<AND <EQUAL? .O ,BRICK>
+ <IN? ,FUSE ,BRICK>
+ <NOT <0? <GET <INT I-FUSE> ,C-ENABLED?>>>>
+ <RTRUE>)
+ (T <RFALSE>)>>
+
+\
+
+"PALANTIRS, ETC."
+
+<ROUTINE GO&LOOK (RM "AUX" OHERE OLIT (OSEEN <>))
+ #DECL ((RM) OBJECT)
+ <SET OHERE ,HERE>
+ <COND (<FSET? .OHERE ,TOUCHBIT>
+ <SET OSEEN T>)>
+ <SET OLIT ,LIT>
+ <SETG HERE .RM>
+ <SETG LIT <LIT? .RM>>
+ <PERFORM ,V?LOOK>
+ <COND (<NOT .OSEEN> <FCLEAR .OHERE ,TOUCHBIT>)>
+ <SETG HERE .OHERE>
+ <SETG LIT .OLIT>
+ T>
+
+<ROUTINE TINY-ROOM-FCN (RARG)
+ #DECL ((RARG) <OR FIX FALSE>)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"This is a tiny room carved out of the wall of the ravine. There is
+an exit down a precarious climb. ">
+ <P-DOOR "north" ,LID-1 ,KEYHOLE-1>
+ <RTRUE>)
+ (<NOT <VERB? LOOK>> <PCHECK> <RFALSE>)>>
+
+<ROUTINE DREARY-ROOM-FCN (RARG)
+ #DECL ((RARG) <OR FIX FALSE>)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"This is a small and rather dreary room, eerily illuminated by a red glow
+emanating from a crack in one wall. The light falls upon a dusty wooden table
+in the center of the room. ">
+ <P-DOOR "south" ,LID-2 ,KEYHOLE-2>
+ <RTRUE>)>
+ (T <PCHECK> <RFALSE>)>
+
+<ROUTINE PCHECK ("AUX" (LID <PLID>))
+ #DECL ((LID) OBJECT)
+ <SETG PLOOK-FLAG <>>
+ <COND (<OR <IN? ,KEY ,KEYHOLE-1>
+ <IN? ,KEY ,KEYHOLE-2>>
+ <FSET ,KEY ,NDESCBIT>)
+ (T
+ <FCLEAR ,KEY ,NDESCBIT>)>
+ <COND (<HELD? ,PLACE-MAT>
+ <SETG MUD-FLAG <>>)> ;"HUH?"
+ <COND (,MUD-FLAG
+ <MOVE ,PLACE-MAT ,HERE>
+ <FSET ,PLACE-MAT ,NDESCBIT>)
+ (T
+ <FCLEAR ,PLACE-MAT ,NDESCBIT>)>>
+
+<ROUTINE P-DOOR (STR LID KEYHOLE "AUX" F)
+ #DECL ((STR) STRING (LID KEYHOLE) OBJECT)
+ <COND (,PLOOK-FLAG <SETG PLOOK-FLAG <>> <RFALSE>)>
+ <TELL "On the "
+ .STR
+ " side of the room is a massive wooden door, which has a
+small window barred with iron. A formidable bolt lock is set within the
+door frame. A keyhole ">
+ <COND (<NOT <FSET? .LID ,OPENBIT>>
+ <TELL "covered by a thin metal lid ">)>
+ <TELL "lies within the lock.">
+ <COND (<SET F <FIRST? .KEYHOLE>>
+ <TELL " A " D .F
+ " is in place within the keyhole.">)>
+ <COND (,MUD-FLAG
+ <TELL " The edge of a place mat is visible under the door.">
+ <COND (,MATOBJ
+ <TELL " Lying on the place mat is a " D ,MATOBJ ".">)>)>
+ <CRLF>>
+
+<ROUTINE PLID ("OPTIONAL" (OBJ1 ,LID-1) (OBJ2 ,LID-2))
+ #DECL ((OBJ1 OBJ2) OBJECT)
+ <COND (<IN? .OBJ1 ,HERE>
+ .OBJ1)
+ (T .OBJ2)>>
+
+<ROUTINE PKH (KEYHOLE "OPTIONAL" (THIS <>))
+ #DECL ((KEYHOLE) OBJECT (THIS) <OR ATOM FALSE>)
+ <COND (<AND <EQUAL? .KEYHOLE ,KEYHOLE-1> <NOT .THIS>>
+ ,KEYHOLE-2)
+ (<AND <NOT <EQUAL? .KEYHOLE ,KEYHOLE-1>> .THIS>
+ ,KEYHOLE-2)
+ (T ,KEYHOLE-1)>>
+
+<ROUTINE PKH-FCN ("AUX" OBJ KH)
+ #DECL ((OBJ) OBJECT)
+ <COND (<VERB? LOOK-INSIDE>
+ <COND (<AND <FSET? ,LID-1 ,OPENBIT>
+ <FSET? ,LID-2 ,OPENBIT>
+ <NOT <FIRST? ,KEYHOLE-1>>
+ <NOT <FIRST? ,KEYHOLE-2>>
+ <LIT? <COND (<EQUAL? ,HERE ,DREARY-ROOM>
+ ,TINY-ROOM)
+ (T ,DREARY-ROOM)>>>
+ <TELL
+"You can see a lighted room at the other end." CR>)
+ (T
+ <TELL
+"No light can be seen through the keyhole." CR>)>)
+ (<VERB? PUT>
+ <COND (<FSET? <PLID> ,OPENBIT>
+ <COND (<FIRST? <PKH ,PRSI T>>
+ <TELL "The keyhole is blocked." CR>)
+ (<EQUAL? ,PRSO ,LETTER-OPENER ,KEY>
+ <COND (<FIRST? <SET KH <PKH ,PRSI>>>
+ <TELL
+"There is a faint noise from behind the door and a small cloud of
+dust rises from beneath it." CR>
+ <SET OBJ <FIRST? .KH>>
+ <REMOVE .OBJ>
+ <COND (,MUD-FLAG
+ <SETG MATOBJ .OBJ>)>
+ <RFALSE>)>)
+ (T <TELL "The " D ,PRSO " doesn't fit." CR>)>)
+ (T <TELL "The lid is in the way." CR>)>)>>
+
+<ROUTINE PLID-FCN ()
+ <COND (<VERB? OPEN RAISE MOVE>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <TELL <RANDOM-ELEMENT ,DUMMY> CR>)
+ (T <TELL "The lid is now open." CR>)>
+ <FSET ,PRSO ,OPENBIT>)
+ (<VERB? CLOSE LOWER>
+ <COND (<FIRST? <COND (<EQUAL? ,HERE ,DREARY-ROOM>
+ ,KEYHOLE-2)
+ (T ,KEYHOLE-1)>>
+ <TELL "The keyhole is occupied." CR>)
+ (T
+ <TELL "The lid covers the keyhole." CR>
+ <FCLEAR ,PRSO ,OPENBIT>)>)
+ (<VERB? LOOK-BEHIND>
+ <TELL "There's a keyhole behind the lid." CR>)>>
+
+<GLOBAL MUD-FLAG <>>
+
+<GLOBAL MATOBJ <>>
+
+<GLOBAL PUNLOCK-FLAG <>>
+
+<GLOBAL PLOOK-FLAG <>>
+
+<ROUTINE ROOM? (OBJ "AUX" NOBJ)
+ <REPEAT ()
+ <SET NOBJ <LOC .OBJ>>
+ <COND (<NOT .NOBJ> <RFALSE>)
+ (<EQUAL? .NOBJ ,WINNER> <RFALSE>)
+ (<EQUAL? .NOBJ ,ROOMS> <RETURN .OBJ>)>
+ <SET OBJ .NOBJ>>>
+
+<ROUTINE PALANTIR ()
+ <COND (<VERB? LOOK-INSIDE>
+ <PALANTIR-LOOK <COND (<EQUAL? ,PRSO ,PALANTIR-1>
+ ,PALANTIR-2)
+ (<EQUAL? ,PRSO ,PALANTIR-2>
+ ,PALANTIR-3)
+ (<EQUAL? ,PRSO ,PALANTIR-3>
+ ,PALANTIR-1)
+ (T ,PALANTIR-4)>>)
+ (<VERB? EXAMINE>
+ <TELL
+"There is something misty in the sphere. Perhaps if you were to look
+into it..." CR>)
+ (<AND <VERB? TAKE> <==? ,PRSO ,PALANTIR-3>>
+ <PUTP ,PRSO ,P?LDESC <>>
+ <RFALSE>)>>
+
+<ROUTINE DEAD-PALANTIR (RARG "AUX" P)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"You are inside a huge crystalline sphere filled with thin "
+ <COND (<EQUAL? ,HERE ,DEAD-PALANTIR-1>
+ <SET P ,PALANTIR-1>
+ "red")
+ (<EQUAL? ,HERE ,DEAD-PALANTIR-2>
+ <SET P ,PALANTIR-2>
+ "blue")
+ (T <SET P ,PALANTIR-3> "white")>
+" mist. The mist becomes "
+ <COND (<EQUAL? ,HERE ,DEAD-PALANTIR-1> "blue")
+ (<EQUAL? ,HERE ,DEAD-PALANTIR-2> "white")
+ (T "black")>
+" to the west." CR>
+ <TELL "You strain to look out through the mist... " CR>
+ <COND (<FSET? .P ,TOUCHBIT>
+ <PALANTIR-LOOK .P T>)
+ (<EQUAL? .P ,PALANTIR-1>
+ <TELL
+"You see a small room with a sign on the wall, but it is too blurry to
+read." CR>)
+ (<EQUAL? .P ,PALANTIR-2>
+ <TELL
+"You look out into a large, dreary room with a great door and a huge table.
+There is an odd glow to the mist." CR>)
+ (<EQUAL? .P ,PALANTIR-3>
+ <TELL
+"A strange blurry room is barely visible.">
+ <COND (<AND <IN? ,SERPENT ,AQUARIUM> <PROB 25>>
+ <TELL
+" An odd sinuous shadow crosses the mist as you look.">)>
+ <CRLF>)>
+ <RTRUE>)
+ (<AND <EQUAL? .RARG ,M-ENTER> <EQUAL? ,HERE ,DEAD-PALANTIR-4>>
+ <TELL
+"You follow a corridor of black mist into a black walled spherical
+room.">
+ <COND (<IN? ,GENIE ,PENTAGRAM-ROOM>
+ <TELL
+" The room is empty. A huge face looks down on you from outside and
+laughs sardonically. It doesn't look like you're getting out of this
+predicament!" CR>
+ <FINISH>)>
+ <TELL
+" As you enter, a huge and horrible face materializes out of the
+mist.|
+|
+\"What brings you here to trouble my imprisonment, wanderer?\"
+it asks. Hearing no immediate answer, it studies you for a moment." CR>
+
+ <COND (<NOT <L? ,DEATHS 3>>
+ <TELL
+"\"Not you again! This is getting tedious. You'll obviously never
+be much help to me. Better luck next time, oh wondrous
+adventurer.\" The face disappears and everything goes black." CR>
+ <FINISH>)
+ (T
+ <TELL
+"\"Perhaps you may be of some use to me in gaining my freedom from
+this place. Return to your foolish quest! I shall not destroy you
+this time. Mayhap you will repay this favor in kind someday.\" The
+face vanishes and the mist begins to swirl. When it clears you are
+returned to the world of life." CR>
+ <SETG DEAD <>>
+ <GOTO ,INSIDE-BARROW>
+ ;<GOTO ,INSIDE-BARROW <>>
+ ;<TELL CR "Inside the Barrow" CR>
+ <RTRUE>)>)>>
+
+<ROUTINE GLOBAL-PALANTIRS ()
+ <COND (<VERB? LOOK-INSIDE EXAMINE>
+ <DEAD-PALANTIR ,M-LOOK>)
+ (<VERB? MUNG> <TELL "The sphere is unbreakable." CR>)>>
+
+<ROUTINE PALANTIR-LOOK (OBJ "OPTIONAL" (INSIDE? <>) "AUX" RM OHERE)
+ <COND (<EQUAL? .OBJ ,PALANTIR-4>
+ <TELL
+"As you peer into the sphere, a strange vision takes shape...a huge and
+fearful face with yellow eyes. The face peers out at you expectantly." CR>
+ <RTRUE>)>
+ <SET RM <ROOM? .OBJ>>
+ <COND (<OR <NOT .RM> <NOT <LIT? .RM>>>
+ <TELL "You see only darkness." CR>)
+ (<OR <IN? .OBJ .RM> <SEE-INSIDE? <LOC .OBJ>>>
+ <SET OHERE ,HERE>
+ <COND (.INSIDE?
+ <TELL
+"As you peer through the mist, a strangely colored vision of a
+huge room takes shape..." CR CR>)
+ (T
+ <TELL
+"As you peer into the sphere, a strange vision takes shape of
+a distant room, which can be described clearly...." CR CR>)>
+ <FSET .OBJ ,INVISIBLE>
+ <GO&LOOK .RM>
+ <COND (<EQUAL? .OHERE .RM>
+ <TELL
+"An astonished adventurer is staring into a crystal sphere." CR>)>
+ <FCLEAR .OBJ ,INVISIBLE>
+ <COND (<NOT .INSIDE?>
+ <TELL
+"The vision fades, revealing only an ordinary crystal sphere." CR>)>)
+ (T
+ <TELL "You see only darkness." CR>)>
+ T>
+
+<ROUTINE PWINDOW-FCN ()
+ <COND (<VERB? LOOK-INSIDE>
+ <SETG PLOOK-FLAG T>
+ <COND (<FSET? ,PDOOR ,OPENBIT>
+ <TELL "The door is open, dummy." CR>)
+ (<EQUAL? ,HERE ,DREARY-ROOM>
+ <GO&LOOK ,TINY-ROOM>)
+ (T <GO&LOOK ,DREARY-ROOM>)>)
+ (<VERB? THROUGH>
+ <TELL "Perhaps if you were diced...." CR>)>>
+
+<ROUTINE PDOOR-FCN ("AUX" K)
+ <COND (<AND <VERB? LOOK-UNDER> ,MUD-FLAG>
+ <TELL "The place mat is under the door." CR>)
+ (<VERB? UNLOCK>
+ <COND (<EQUAL? ,PRSI ,KEY>
+ <COND (<AND <SET K <FIRST? <PLID ,KEYHOLE-1 ,KEYHOLE-2>>>
+ <NOT <EQUAL? .K ,KEY>>>
+ <TELL "The keyhole is blocked." CR>)
+ (T
+ <TELL "The door is now unlocked." CR>
+ <SETG PUNLOCK-FLAG T>)>)
+ (<EQUAL? ,PRSI ,GOLD-KEY>
+ <TELL "It doesn't fit the lock." CR>)
+ (T <TELL "It can't be unlocked with that." CR>)>)
+ (<VERB? LOCK>
+ <COND (<EQUAL? ,PRSI ,KEY>
+ <TELL "The door is locked." CR>
+ <SETG PUNLOCK-FLAG <>>
+ T)
+ (<EQUAL? ,PRSI ,GOLD-KEY>
+ <TELL "It doesn't fit the lock." CR>)
+ (T <TELL "It can't be locked with that." CR>)>)
+ (<VERB? PUT-UNDER>
+ <COND (<EQUAL? ,PRSO ,ROBOT-LABEL>
+ <TELL
+"The paper is very small and vanishes under the door." CR>
+ <MOVE ,PRSO <COND (<EQUAL? ,HERE ,TINY-ROOM> ,DREARY-ROOM)
+ (T ,TINY-ROOM)>>)
+ (<EQUAL? ,PRSO ,NEWSPAPER>
+ <TELL
+"The newspaper crumples up and won't go under the door." CR>)>)
+ (<VERB? OPEN CLOSE>
+ <COND (,PUNLOCK-FLAG
+ <OPEN-CLOSE ,PRSO
+ "The door is now open."
+ "The door is now closed.">)
+ (T <TELL "The door is locked." CR>)>)>>
+
+<ROUTINE PKEY-FCN ()
+ <COND (<VERB? TURN>
+ <COND (,PUNLOCK-FLAG
+ <PERFORM ,V?LOCK ,PDOOR ,PRSO>)
+ (T
+ <PERFORM ,V?UNLOCK ,PDOOR ,PRSO>)>)>>
+
+<ROUTINE PLACE-MAT-FCN ()
+ <COND (<VERB? PUT-UNDER>
+ <COND (<EQUAL? ,PRSI ,PDOOR>
+ <TELL "The place mat fits easily under the door." CR>
+ <MOVE ,PRSO ,HERE>
+ <SETG MUD-FLAG T>)
+ (<EQUAL? ,PRSI ,WIZ-DOOR ,RIDDLE-DOOR ,CRYPT-DOOR>
+ <TELL "There's not enough room under this door." CR>)>)
+ (<AND <VERB? TAKE MOVE> ,MATOBJ>
+ <MOVE ,MATOBJ ,HERE>
+ <TELL "As the place mat is moved, a "
+ D
+ ,MATOBJ
+ " falls from it and onto the floor." CR>
+ <SETG MATOBJ <>>
+ <SETG MUD-FLAG <>>
+ <RTRUE>)>>
+
+<ROUTINE WISH-FCN ()
+ <COND (<VERB? MAKE>
+ <COND (<AND <EQUAL? ,HERE ,WELL-BOTTOM>
+ <IN? ,COIN ,HERE>>
+ <TELL
+"A whispering voice replies: \"Water makes the bucket go.\"
+Unfortunately, wishing makes the coin go...." CR>
+ <REMOVE ,COIN>)
+ (T
+ <TELL "No one is listening." CR>)>)>>
+
+<ROUTINE WELL-FCN ()
+ <COND (<AND <FSET? ,PRSO ,TAKEBIT> <VERB? THROW PUT DROP>>
+ <TELL "The " D ,PRSO
+ " is now sitting at the bottom of the well." CR>
+ <MOVE ,PRSO ,WELL-BOTTOM>)
+ (<VERB? CLIMB-UP CLIMB-DOWN CLIMB-FOO>
+ <TELL "You can't climb the well." CR>)>>
+
+<GLOBAL MATCH-COUNT 6>
+
+<ROUTINE MATCH-FCN ( "AUX" CNT)
+ <COND (<AND <VERB? LAMP-ON BURN> <EQUAL? ,PRSO ,MATCH>>
+ <COND (<G? ,MATCH-COUNT 0>
+ <SETG MATCH-COUNT <- ,MATCH-COUNT 1>>)>
+ <COND (<NOT <G? ,MATCH-COUNT 0>>
+ <TELL
+ "I'm afraid you have run out of matches." CR>)
+ (T
+ <FSET ,MATCH ,FLAMEBIT>
+ <FSET ,MATCH ,ONBIT>
+ <ENABLE <QUEUE I-MATCH 2>>
+ <TELL "One of the matches starts to burn." CR>)>)
+ (<AND <VERB? LAMP-OFF> <FSET? ,MATCH ,FLAMEBIT>>
+ <TELL "The match is out." CR>
+ <FCLEAR ,MATCH ,FLAMEBIT>
+ <FCLEAR ,MATCH ,ONBIT>
+ <QUEUE I-MATCH 0>
+ T)
+ (<VERB? COUNT>
+ <TELL "You have ">
+ <SET CNT <- ,MATCH-COUNT 1>>
+ <TELL N .CNT " match">
+ <COND (<NOT <1? .CNT>> <TELL "es.">) (T <TELL ".">)>
+ <CRLF>)
+ (<VERB? EXAMINE>
+ <COND (<FSET? ,MATCH ,ONBIT>
+ <TELL "A match is burning.">)
+ (T
+ <TELL "No match is burning.">)>
+ <CRLF>)>>
+
+<ROUTINE I-MATCH ()
+ <TELL "The match has gone out." CR>
+ <FCLEAR ,MATCH ,FLAMEBIT>
+ <FCLEAR ,MATCH ,ONBIT>>
+
+
+<GLOBAL LAMP-TABLE
+ <TABLE 300
+ "The lamp appears a bit dimmer."
+ 100
+ "The lamp is definitely dimmer now."
+ 50
+ "The lamp is nearly out."
+ 0>>
+
+<ROUTINE LANTERN ()
+ <COND (<AND <VERB? THROW> <==? ,PRSO ,LAMP>>
+ <TELL
+"The lamp has smashed into the floor, and the light has gone out." CR>
+ <DISABLE <INT I-LANTERN>>
+ <REMOVE ,LAMP>
+ <MOVE ,BROKEN-LAMP ,HERE>)
+ (<VERB? LAMP-ON>
+ <COND (<FSET? ,LAMP ,RMUNGBIT>
+ <TELL "A burned-out lamp won't light." CR>)
+ (T
+ <ENABLE <INT I-LANTERN>>
+ <>)>)
+ (<VERB? LAMP-OFF>
+ <COND (<FSET? ,LAMP ,RMUNGBIT>
+ <TELL "The lamp has already burned out." CR>)
+ (T
+ <DISABLE <INT I-LANTERN>>
+ <>)>)
+ (<VERB? EXAMINE>
+ <COND (<FSET? ,LAMP ,RMUNGBIT>
+ <TELL "The lamp has burned out.">)
+ (<FSET? ,LAMP ,ONBIT>
+ <TELL "The lamp is on.">)
+ (T
+ <TELL "The lamp is turned off.">)>
+ <CRLF>)>>
+
+<ROUTINE LIGHT-INT (OBJ INTNAM TBLNAM "AUX" (TBL <VALUE .TBLNAM>) TICK)
+ #DECL ((OBJ) OBJECT (TBLNAM INTNAM) ATOM (TBL) <PRIMTYPE VECTOR>
+ (TICK) FIX)
+ <ENABLE <QUEUE .INTNAM <SET TICK <GET .TBL 0>>>>
+ <COND (<0? .TICK>
+ <FSET .OBJ ,RMUNGBIT>
+ <FCLEAR .OBJ ,ONBIT>)>
+ <COND (<OR <HELD? .OBJ> <IN? .OBJ ,HERE>>
+ <COND (<0? .TICK>
+ <TELL
+"I hope you have more light than from the " D .OBJ "." CR>)
+ (T
+ <TELL <GET .TBL 1> CR>)>)>
+ <COND (<NOT <0? .TICK>>
+ <SETG .TBLNAM <REST .TBL 4>>)>
+ <RTRUE>>
+
+;"Riddles"
+
+<ROUTINE RIDDLE-ROOM-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"This is a room which is bare on all sides. There is an exit down in
+the northwest corner of the room. To the east is a great ">
+ <COND (<FSET? ,RIDDLE-DOOR ,OPENBIT>
+ <TELL "open">)
+ (T
+ <TELL "closed">)>
+ <TELL " door made of
+stone. Above the stone, the following words are written: \"No man shall
+pass this door without solving this riddle:|
+|
+ What is tall as a house,|
+ round as a cup,|
+ and all the king's horses|
+ can't draw it up?\"|
+">)
+ (<EQUAL? .RARG ,M-BEG>
+ <COND (<VERB? ANSWER SAY>
+ <COND (<FSET? ,RIDDLE-DOOR ,OPENBIT>
+ <RFALSE>)
+ (<OR <EQUAL? <GET ,P-LEXV ,P-CONT> ,W?WELL>
+ <EQUAL? <GET ,P-LEXV <+ ,P-CONT 2>> ,W?WELL>>
+ <TELL
+"There is a deafening clap of thunder and the stone door
+quietly swings open to reveal a passageway beyond." CR>
+ <SCORE-UPD 5>
+ <FSET ,RIDDLE-DOOR ,OPENBIT>)
+ (T
+ <TELL
+"A hollow laugh seems to come from the stone door." CR>)>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>)>)>>
+
+<ROUTINE RIDDLE-DOOR-FCN ()
+ <COND (<VERB? OPEN>
+ <COND (<FSET? ,RIDDLE-DOOR ,OPENBIT>
+ <TELL "It is open!" CR>)
+ (T
+ <TELL
+"The door can only be opened by answering the riddle." CR>)>)
+ (<VERB? CLOSE>
+ <COND (<FSET? ,RIDDLE-DOOR ,OPENBIT>
+ <TELL "Not a chance. The door weighs many tons." CR>)
+ (T
+ <TELL "It is closed!" CR>)>)>>
+
+<GLOBAL DUMMY
+ <LTABLE "Look around."
+ "You think it isn't?"
+ "I think you've already done that.">>
+
+<ROUTINE RIDDLE-PSEUDO ()
+ <COND (<VERB? EXAMINE>
+ <TELL "Use the \"Look\" command." CR>)>>
+
+<ROUTINE MAGIC-ACTOR ("AUX" V)
+ <COND (,SPELL?
+ <COND (<EQUAL? ,SPELL? ,S-FALL>
+ <COND (<OR <VERB? CLIMB-UP CLIMB-DOWN CROSS>
+ <AND <VERB? WALK>
+ <GETPT ,HERE ,P?DOWN>>>
+ <SET V <GETPT ,HERE ,P?GLOBAL>>
+ <COND (<ZMEMQB ,BRIDGE .V <PTSIZE .V>>
+ <JIGS-UP
+"You find yourself drawn toward the edge of the bridge. You peer over
+the side. Oops, that was clumsy of you! You tripped on something and
+fell in. Too bad.">)
+ (<PROB 25>
+ <JIGS-UP
+"For some odd reason you have tripped on your own feet, or perhaps an
+invisible cord stretched across the path. The resulting fall seems to
+have done you in.">)
+ (T
+ <TELL
+"You just tripped on an invisible cord, or perhaps your own feet. But
+this must be your lucky day, as you managed to regain your balance
+before what could have been a fatal fall." CR>)>)
+ (<VERB? BOARD>
+ <TELL
+"You get in the " D ,PRSO " but you fall out again, almost as though
+an invisible hand had tipped it over." CR>)>)
+ (<EQUAL? ,SPELL? ,S-FLOAT>
+ <COND (<VERB? DIAGNOSE WAIT> <RFALSE>)
+ (<VERB? WALK>
+<TELL "I suppose you plan to do that by flapping your arms?" CR>)
+ (<VERB? DROP>
+ <MOVE ,PRSO ,HERE>
+ <TELL
+"The " D ,PRSO " drops to the ground." CR>)
+ (<AND <VERB? TAKE> <IN? ,PRSO ,HERE>>
+ <TELL
+"You can't reach that! It's on the ground." CR>)>)
+ (<EQUAL? ,SPELL? ,S-FREEZE>
+ <COND (<VERB? DIAGNOSE WAIT> <RFALSE>)
+ (T
+ <TELL
+"You are frozen solid. You might as well wait it out, because you
+can't do anything else in this state." CR>)>)
+ (<AND <EQUAL? ,SPELL? ,S-FENCE>
+ <VERB? WALK>>
+ <TELL
+"An invisible fence of magical force bars your way." CR>
+ <RTRUE>)
+ (<AND <EQUAL? ,SPELL? ,S-FIERCE>
+ <SET V <INFESTED? ,HERE>>>
+ <COND (<VERB? ATTACK MUNG> <RFALSE>)
+ (T
+ <FORCE-FIGHT .V>
+ <RTRUE>)>)
+ (<AND <EQUAL? ,SPELL? ,S-FERMENT>
+ <VERB? WALK>
+ <IN? ,WINNER ,HERE>>
+ <TELL
+"Oops, you seem a little unsteady... I'm not sure you got where
+you intended going." CR CR>
+ <RANDOM-WALK>)
+ (<AND <EQUAL? ,SPELL? ,S-FEAR>
+ <SET V <INFESTED? ,HERE>>>
+ <TELL
+"All at once, you are overcome by fear! There's is a " D .V " in here!
+Maybe it's after you! ">
+ <COND (<FSET? <LOC ,WINNER> ,VEHBIT>
+ <TELL
+"You huddle in the corner, terrified." CR>)
+ (T
+ <TELL
+"You run from the room screaming in terror!" CR CR>
+ <RANDOM-WALK>)>)>)>>
+
+<ROUTINE RANDOM-WALK ("AUX" P TX L S (D <>))
+ <SET P 0>
+ <REPEAT ()
+ <COND (<L? <SET P <NEXTP ,HERE .P>> ,LOW-DIRECTION>
+ <COND (.D
+ <SET S ,SPELL?>
+ <SETG SPELL? <>>
+ <SETG WINNER ,ADVENTURER>
+ <MOVE ,WINNER ,HERE>
+ <DO-WALK .D>
+ <SETG SPELL? .S>)>
+ <RETURN>)
+ (T
+ <SET TX <GETPT ,HERE .P>>
+ <SET L <PTSIZE .TX>>
+ <COND (<OR <EQUAL? .L ,UEXIT>
+ <AND <EQUAL? .L ,CEXIT>
+ <VALUE <GETB .TX ,CEXITFLAG>>>
+ <AND <EQUAL? .L ,DEXIT>
+ <FSET? <GETB .TX ,DEXITOBJ> ,OPENBIT>>>
+ <COND (<NOT .D> <SET D .P>)
+ (<PROB 50> <SET D .P>)>)>)>>>
+
+<ROUTINE FORCE-FIGHT (V "AUX" W)
+ <COND (<NOT <SET W <FIND-IN ,ADVENTURER ,WEAPONBIT>>>
+ <SET W ,HANDS>)>
+ <TELL
+"You are maddened by an overwhelming ferocity, and attack the "
+D .V " instead." CR>
+ <PERFORM ,V?ATTACK .V .W>>
+
+\
+
+"SUBTITLE DIAMOND MAZE"
+
+<GLOBAL DIAMOND-SOLVE <>> ;"T if solved"
+
+<GLOBAL DIAMOND-COUNT 0> ;"count of current progress"
+<GLOBAL DIAMOND-MOVES 0> ;"count of moves since progressed"
+<GLOBAL DIAMOND-BASE 0> ;"count of maximum progress ever"
+
+<GLOBAL DWDESCS
+ <TABLE "dark"
+ "flickering dimly"
+ "dimly glowing"
+ "glowing"
+ "glowing brightly">>
+
+<ROUTINE DWINDOW-DESC ()
+ <TELL
+"On the floor is a very small diamond shaped window which is ">
+ <COND (,DIAMOND-SOLVE <TELL "glowing serenely">)
+ (T <TELL <GET ,DWDESCS ,DIAMOND-COUNT>>)>
+ <TELL "." CR>>
+
+<ROUTINE DWINDOW-FCN ()
+ <COND (<VERB? TAKE>
+ <TELL
+"The window is an integral part of the floor." CR>)
+ (<VERB? MUNG>
+ <TELL
+"The window is diamond-hard and cannot be broken." CR>)
+ (<VERB? EXAMINE LOOK-INSIDE>
+ <DWINDOW-DESC>)>>
+
+<ROUTINE DIAMOND-MOTION (RARG "AUX" DC DIR RM)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"This is a room with oddly angled walls and passages in all directions.
+The walls are made of some glassy substance." CR>
+ <COND (<EQUAL? ,HERE ,DIAMOND-5>
+ <TELL
+"A marble stairway leads upward.">
+ <COND (,DIAMOND-SOLVE
+ <TELL
+" The floor has swung down at the end of the stairway to reveal a secret
+passage leading down into unrelieved darkness.">)>
+ <CRLF>)
+ (T <DWINDOW-DESC>)>
+ <RTRUE>)
+ (<EQUAL? .RARG ,M-FLASH> <DWINDOW-DESC> <RTRUE>)
+ (<AND <EQUAL? .RARG ,M-BEG>
+ <VERB? WALK>
+ <NOT ,DIAMOND-SOLVE>>
+ <COND (<OR <EQUAL? ,HERE ,DIAMOND-2 ,DIAMOND-4>
+ <EQUAL? ,HERE ,DIAMOND-6 ,DIAMOND-8>>
+ <SET DIR <GET ,DIDIRS <- ,DIAMOND-COUNT 1>>>
+ <COND (<EQUAL? ,PRSO .DIR>
+ <SETG DIAMOND-COUNT <+ ,DIAMOND-COUNT 1>>
+ <COND (<G? ,DIAMOND-COUNT ,DIAMOND-BASE>
+ <SETG DIAMOND-BASE ,DIAMOND-COUNT>
+ <SETG DIAMOND-MOVES 0>)>
+ <COND (<EQUAL? ,DIAMOND-COUNT 5>
+ <TELL
+"You hear a strange rusty squeal echoing in the distance." CR>
+ <FCLEAR ,DIAMOND-5 ,TOUCHBIT>
+ <SCORE-UPD 5>
+ <SETG DIAMOND-SOLVE T>)>
+ <COND (<EQUAL? ,HERE ,DIAMOND-2>
+ <SET DIR ,DIAMOND-4>)
+ (<EQUAL? ,HERE ,DIAMOND-4>
+ <SET DIR ,DIAMOND-8>)
+ (<EQUAL? ,HERE ,DIAMOND-8>
+ <SET DIR ,DIAMOND-6>)
+ (<EQUAL? ,HERE ,DIAMOND-6>
+ <SET DIR ,DIAMOND-2>)>
+ <GOTO .DIR>)
+ (T
+ <DIAMOND-LOSS>)>
+ <RTRUE>)
+ (<AND <EQUAL? ,HERE ,DIAMOND-5>
+ <EQUAL? ,PRSO ,P?UP>>
+ <RFALSE>)
+ (T
+ <SETG DIAMOND-COUNT 0>
+ <COND (<PROB 33>
+ <TELL
+"There is no way to go in that direction." CR>
+ <RTRUE>)
+ (<PROB 25>
+ <DIAMOND-LOSS>
+ <RTRUE>)
+ (T
+ <SETG DIAMOND-COUNT 1>
+ <COND (<G? ,DIAMOND-COUNT ,DIAMOND-BASE>
+ <SETG DIAMOND-BASE ,DIAMOND-COUNT>
+ <SETG DIAMOND-MOVES 0>)>
+ <SET RM <GET ,DIAMOND-ROOMS
+ <- <RANDOM 4> 1>>>
+ <COND (<FSET? ,BAT ,INVISIBLE>
+ <FCLEAR ,BAT ,INVISIBLE>
+ <MOVE ,BAT .RM>)>
+ <GOTO .RM>
+ <RTRUE>)>)>)>>
+
+<ROUTINE DIAMOND-LOSS ()
+ <SETG DIAMOND-MOVES <+ ,DIAMOND-MOVES 1>>
+ <COND (<EQUAL? ,DIAMOND-MOVES 20>
+ <TELL
+"As you thrash about in the maze, the mirthful voice of the Wizard
+taunts you: \"Fool! You'll never get past ">
+ <TELL <GET ,BASES ,DIAMOND-BASE>>
+ <TELL " base at this rate!\"" CR>)>
+ <GOTO <GET ,DIAMOND-ROOMS <+ 3 <RANDOM 5>>>>>
+
+<GLOBAL BASES <TABLE "first" "first" "first" "second" "third" "home">>
+
+<GLOBAL DIAMOND-ROOMS
+ <TABLE DIAMOND-2 DIAMOND-4 DIAMOND-6 DIAMOND-8
+ DIAMOND-1 DIAMOND-3 DIAMOND-5 DIAMOND-7 DIAMOND-9>>
+
+<GLOBAL DIDIRS <TABLE P?SE P?NE P?NW P?SW>>
+
+\
+
+"SUBTITLE CERBERUS"
+
+<GLOBAL CERBERUS-LEASHED <>>
+
+<ROUTINE CERBERUS-FCN ()
+ <COND (<AND <VERB? WAVE RUB RAISE> <EQUAL? ,PRSO ,WAND>>
+ <TELL "The dog looks puzzled." CR>
+ <RFALSE>)
+ (<AND ,WAND-ON <VERB? SAY INCANT>> <RFALSE>)
+ (<HELLO? ,CERBERUS>
+ <COND (,CERBERUS-LEASHED <TELL "\"Arf! Arf! Arf!\"" CR>)
+ (T <TELL "\"Grrrr!\"" CR>)>)
+ (<VERB? ATTACK MUNG STAB>
+ <COND (,CERBERUS-LEASHED
+ <REMOVE ,CERBERUS>
+ <TELL
+"With a quiet bark of disappointment, the creature expires.
+Its six eyes look at you reproachfully. As it dies, it collapses
+into a small pile of dust which blows away into nothing." CR>)
+ (<PROB 50>
+ <JIGS-UP
+"The dog-thing snaps at you viciously, and succeeds. Your head, it seems,
+is only a small mouthful for the poor animal, who is just as hungry
+afterward.">)
+ (T
+ <TELL
+"The maddened dog-thing snaps viciously at you." CR>)>)
+ (<AND <VERB? PUT PUT-ON> <EQUAL? ,PRSO ,COLLAR>>
+ <MOVE ,COLLAR ,CERBERUS>
+ <FSET ,COLLAR ,NDESCBIT>
+ <FSET ,COLLAR ,TRYTAKEBIT>
+ <PUTP ,CERBERUS ,P?LDESC
+"An insipidly grinning three-headed dog is wagging its tail here.
+It is wearing a huge dog collar.">
+ <SETG CERBERUS-LEASHED T>
+ <TELL
+"The creature whines happily, then the center head
+licks your face (which is roughly like experiencing a sandpaper
+washcloth). The other two heads look about, as though the
+monster felt a sudden need to find a pair of slippers somewhere.
+Its huge tail wags enthusiastically, knocking small rocks
+around and almost blowing you over from the breeze it creates." CR>)
+ (<VERB? ENCHANT>
+ <COND (<EQUAL? ,SPELL-USED ,W?FLOAT>
+ <SETG SPELL-HANDLED? T>
+ <TELL
+"The huge dog rises about an inch off the ground, for a moment." CR>)
+ (<EQUAL? ,SPELL-USED ,W?FIERCE>
+ <SETG SPELL-HANDLED? T>
+ <JIGS-UP
+"Cerberus tears you limb from limb! What ferocity!">)
+ (<EQUAL? ,SPELL-USED ,W?FEEBLE>
+ <TELL
+"What an effect! He now has the strength of just one elephant, rather
+than ten!" CR>)>)
+ (<NOT ,CERBERUS-LEASHED>
+ <TELL "The three-headed dog snaps at you viciously!" CR>)
+ (<AND ,CERBERUS-LEASHED <VERB? RUB>>
+ <TELL
+"The dog is now insanely happy, slobbering all over the place and
+whining with uncontained doggish joy." CR>)>>
+
+<ROUTINE COLLAR-FCN ()
+ <COND (<AND <VERB? TAKE> ,CERBERUS-LEASHED>
+ <JIGS-UP
+"That wasn't such a good idea. The creature was enjoying being your pet.
+As you unfasten the collar, the disappointed monster hound begins to growl,
+and then its three fang-crammed mouths rend you into little doggy biscuits.">)
+ (<AND <VERB? ENCHANT> <EQUAL? ,SPELL-USED ,W?FLOAT>>
+ <PERFORM ,V?ENCHANT ,CERBERUS>
+ <RTRUE>)>>
+
+\
+
+"SUBTITLE DRAGON AND GLACIER"
+
+<GLOBAL ICE-MELTED <>>
+
+<ROUTINE GLACIER-FCN ()
+ <COND (<VERB? MELT>
+ <TELL
+"This is a big glacier; you'll need a lot of heat." CR>)>>
+
+<ROUTINE GLACIER-ROOM-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"This is a large hall of ancient lava, since worn smooth by the movement
+of a glacier. A large passage exits to the east and an upward lava tube
+is at the top of a jumble of fallen rocks." CR>
+ <COND (,ICE-MELTED
+ <TELL
+"A damp and scorched passage leads west. It is still partly full of
+steam." CR>)>
+ <RTRUE>)>>
+
+<ROUTINE DRAGON-FCN ()
+ <ENABLE <QUEUE I-DRAGON -1>>
+ <COND (<HELLO? ,DRAGON>
+ <TELL
+"The dragon looks amused. He speaks in a voice so deep you feel it
+rather than hear it, but the tongue is unknown to you. You find
+yourself almost hypnotized." CR>
+ <SETG DRAGON-ANGER <+ ,DRAGON-ANGER 2>>)
+ (<VERB? EXAMINE>
+ <TELL
+"He turns and looks back at you, his cat's eyes yellow in the gloom.
+You start to feel weak, and quickly turn away." CR>
+ <SETG DRAGON-ANGER <+ ,DRAGON-ANGER 1>>)
+ (<VERB? ATTACK MUNG KICK LAMP-ON>
+ <COND (<OR <VERB? LAMP-ON>
+ <AND <VERB? ATTACK> <NOT ,PRSI>>>
+ <TELL
+"With your bare hands? I doubt the dragon even noticed." CR>)
+ (T
+ <TELL <RANDOM-ELEMENT ,DRAGON-ATTACKS> CR>)>
+ <SETG DRAGON-ANGER <+ ,DRAGON-ANGER 4>>)
+ (<AND <VERB? GIVE> <EQUAL? ,PRSI ,DRAGON>>
+ <SETG DRAGON-ANGER <+ ,DRAGON-ANGER 1>>
+ <COND (<GETPT ,PRSO ,P?VALUE>
+ <MOVE ,PRSO ,CHEST>
+ <TELL
+"The dragon is pleased by your gift, excuses himself for a moment,
+and returns without it." CR>)
+ (<BOMB? ,PRSO>
+ <SETG DRAGON-ANGER <+ ,DRAGON-ANGER 2>>
+ <REMOVE ,BRICK>
+ <TELL
+"The dragon snakes his long red tongue around the bomb and politely
+swallows it. A few moments later he belches and smoke curls out of
+his nostrils." CR>)
+ (T
+ <TELL "The dragon refuses your gift." CR>)>)
+ (<AND <VERB? WALK>
+ <EQUAL? ,HERE ,DRAGON-ROOM>
+ <EQUAL? ,PRSO ,P?NORTH>>
+ <SETG DRAGON-ANGER <+ ,DRAGON-ANGER 3>>
+ <TELL
+"The dragon puts out a claw, grins (all of his sword-sharp teeth
+glinting in the light), and blocks your way." CR>)>>
+
+<GLOBAL DRAGON-ANGER 0>
+
+<GLOBAL DRAGON-ATTACKS
+ <LTABLE
+"Dragon hide is tough as steel, but you have succeeded in annoying him
+a bit. He looks at you as if deciding whether or not to eat you."
+"That captured his interest. He stares at you balefully."
+"The dragon is surprised and interested (for the moment)."
+"You've made him rather angry. You had better be very careful now."
+"That did no damage, but he turns his smoky yellow eyes in your direction
+and sighs.">>
+
+<ROUTINE HELLO? (WHO)
+ <COND (<OR <EQUAL? ,WINNER .WHO>
+ <VERB? TELL ANSWER REPLY SAY HELLO INCANT>>
+ <COND (<VERB? TELL ANSWER SAY INCANT REPLY>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>)>
+ <RTRUE>)>>
+
+<ROUTINE FIND-TARGET (TARGET "AUX" P TX L ROOM)
+ <COND (<IN? .TARGET ,HERE> ,HERE)
+ (T
+ <SET P 0>
+ <REPEAT ()
+ <COND (<0? <SET P <NEXTP ,HERE .P>>>
+ <RETURN <>>)
+ (<NOT <L? .P ,LOW-DIRECTION>>
+ <SET TX <GETPT ,HERE .P>>
+ <SET L <PTSIZE .TX>>
+ <COND (<EQUAL? .L ,UEXIT ,CEXIT ,DEXIT>
+ <SET ROOM <GETB .TX 0>>
+ <COND (<IN? .TARGET .ROOM>
+ <RETURN .ROOM>)>)>)>>)>>
+
+<GLOBAL OLD-HERE DRAGON-ROOM>
+
+<ROUTINE I-DRAGON ("AUX" ROOM)
+ <COND (<G? ,DRAGON-ANGER 6>
+ <TELL
+"The dragon tires of this game. With an almost bored yawn, he opens his
+mouth and ">
+ <COND (<EQUAL? ,SPELL? ,S-FIREPROOF>
+ <TELL
+"blasts you with a great gout of fire, but it washes over you
+harmlessly." CR>)
+ (T
+ <DRAGON-LEAVES>
+ <JIGS-UP
+"incinerates you in a blast of white-hot dragon fire.">)>)
+ (<AND <IN? ,WINNER ,DRAGON-ROOM>
+ <NOT <IN? ,DRAGON ,DRAGON-ROOM>>>
+ <MOVE ,DRAGON ,DRAGON-ROOM>
+ <TELL
+"The dragon doubles back and charges into the room, maddened by your
+attempt to sneak past him. His eyes glow with a white heat of anger." CR>
+ <COND (<EQUAL? ,SPELL? ,S-FIREPROOF>
+ <JIGS-UP
+"A huge ball of flame envelops you, but you don't even feel the heat.
+The dragon is puzzled, but not too puzzled to crush you in his jaws.">)
+ (T
+ <JIGS-UP
+"Worse for you, his mouth opens and a great gout of flame puffs out
+and consumes you on the spot.">)>)
+ (<NOT <G? ,DRAGON-ANGER 0>>
+ <COND (<AND <PROB 50>
+ <IN? ,DRAGON ,HERE>>
+ <TELL "The dragon looks bored." CR>)
+ (T
+ <DRAGON-LEAVES>
+ <COND (<EQUAL? ,HERE ,GLACIER-ROOM>
+ <TELL
+"The dragon is no longer around. He must have become bored with you." CR>)
+ (<EQUAL? ,HERE ,OLD-HERE>
+ <TELL
+"The dragon seems to have lost interest in you.">
+ <COND (<EQUAL? ,OLD-HERE ,DRAGON-ROOM> <CRLF>)
+ (T <TELL " He wanders off." CR>)>)>)>)
+ (T
+ <SET ROOM <FIND-TARGET ,WINNER>>
+ <COND (<NOT .ROOM>
+ <COND (<PROB 25> <DRAGON-LEAVES>)>)
+ (<OR <EQUAL? .ROOM ,CAROUSEL-ROOM ,TINY-ROOM>
+ <EQUAL? .ROOM ,RAVINE-LEDGE ,FRESCO-ROOM>>
+ <COND (<PROB 25> <DRAGON-LEAVES>)>
+ <TELL "The dragon will follow no further." CR>)
+ (<EQUAL? .ROOM ,GLACIER-ROOM>
+ <TELL CR
+"As the dragon enters, he sees his reflection on the icy surface of the
+glacier at its western end. He becomes enraged: There is another dragon here,
+behind that glass, he thinks! Dragons are smart, but sometimes naive, and
+this one has never seen ice before. He rears up to his full height to
+challenge this intruder into his territory. He roars a challenge! The
+intruder responds! The dragon takes a deep breath, and out of his mouth
+pours a massive gout of flame. It washes over the ice, which melts rapidly,
+sending out torrents of water and a huge cloud of steam! You manage to clamber
+up to a small shelf, but the dragon is terrified! A huge splash goes down his
+throat! There is a muffled explosion and the dragon, a puzzled expression on
+his face, dies. He is carried away by the water.|
+|
+When the flood recedes you climb gingerly down. While no trace of
+the dragon can be found, the melting of the ice has revealed a passage
+leading west." CR>
+ <REMOVE ,DRAGON>
+ <REMOVE ,ICE>
+ <MOVE ,DEAD-DRAGON ,DEEP-FORD>
+ <DISABLE <INT I-DRAGON>>
+ <SCORE-UPD 5>
+ <SETG ICE-MELTED T>)
+ (T
+ <COND (<NOT <EQUAL? .ROOM ,OLD-HERE>>
+ <MOVE ,DRAGON .ROOM>
+ <TELL
+"The dragon follows you, out of mingled curiosity and anger." CR>)
+ (T
+ <TELL
+"The dragon continues to watch you carefully." CR>)>
+ <COND (<NOT <G? ,DRAGON-ANGER 0>>
+ <SETG DRAGON-ANGER 0>
+ <DISABLE <INT I-DRAGON>>)>)>)>
+ <SETG OLD-HERE <LOC ,DRAGON>>
+ <SETG DRAGON-ANGER <- ,DRAGON-ANGER 2>>
+ <COND (<L? ,DRAGON-ANGER 0> <SETG DRAGON-ANGER 0>)>
+ T>
+
+<ROUTINE DRAGON-LEAVES ()
+ <MOVE ,DRAGON ,DRAGON-ROOM>
+ <SETG DRAGON-ANGER 0>
+ <DISABLE <INT I-DRAGON>>>
+
+<ROUTINE I-GARDEN ()
+ <COND (<OR <EQUAL? ,HERE ,GARDEN-NORTH ,GAZEBO-ROOM>
+ <EQUAL? ,HERE ,TOPIARY-ROOM ,FORMAL-GARDEN>>
+ <COND (<AND <IN? ,UNICORN ,GARDEN-NORTH>
+ <PROB 33>>
+ <REMOVE ,UNICORN>
+ <COND (<NOT <EQUAL? ,HERE ,TOPIARY-ROOM>>
+ <TELL "The unicorn bounds lightly away." CR>)>)
+ (<AND <IN? ,PRINCESS ,DRAGON-LAIR>
+ <NOT <IN? ,UNICORN ,GARDEN-NORTH>>
+ <PROB 25>
+ <NOT <EQUAL? ,HERE ,TOPIARY-ROOM>>>
+ <COND (,UNICORN-FRIGHTENED
+ <SETG UNICORN-FRIGHTENED <>>
+ <RFALSE>)>
+ <MOVE ,UNICORN ,GARDEN-NORTH>
+ <COND (<EQUAL? ,HERE ,GARDEN-NORTH>
+ <TELL <RANDOM-ELEMENT ,UNICORN-MSGS> CR>)
+ (T <TELL
+"A unicorn is peacefully cropping grass at the north end of the garden.
+There is something hanging around its neck." CR>)>)
+ (<EQUAL? ,HERE ,TOPIARY-ROOM>
+ <COND (<AND <NOT ,TOPIARY-MOVED> <PROB 12>>
+ <SETG TOPIARY-MOVED T>
+ <TELL
+"You look around, and strangely, the topiary animals seem to have
+changed position slightly." CR>)
+ (<AND ,TOPIARY-MOVED
+ <NOT ,TOPIARY-NEAR>
+ <PROB 8>>
+ <SETG TOPIARY-NEAR T>
+ <TELL
+"The topiary animals seem to close in on you. You turn and they are
+very close. They seem to be leering at you." CR>)
+ (<AND ,TOPIARY-NEAR <PROB 4>>
+ <SETG TOPIARY-MOVED <>>
+ <SETG TOPIARY-NEAR <>>
+ <JIGS-UP
+"The topiary animals attack! You are crushed by their branches and
+clawed by their thorns.">)>)>)
+ (T
+ <REMOVE ,UNICORN>
+ <DISABLE <INT I-GARDEN>>
+ <RFALSE>)>>
+
+<GLOBAL TOPIARY-MOVED <>>
+<GLOBAL TOPIARY-NEAR <>>
+
+<GLOBAL UNICORN-MSGS
+ <LTABLE
+ "There is a large, white animal partly hidden behind some trees."
+ "You catch a glimpse of something white between two hedges."
+ "A unicorn is cropping grass on the other side of the room.
+A gold key hangs from a ribbon around its neck."
+ "There is a beautiful unicorn eating roses here. Around his
+neck is a red satin ribbon on which is strung a tiny key.">>
+
+<ROUTINE GARDEN-ROOM-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-ENTER>
+ <ENABLE <QUEUE I-GARDEN -1>>)>>
+
+<ROUTINE GLOBAL-UNICORN-FCN ()
+ <COND (<IN? ,UNICORN ,GARDEN-NORTH>
+ <TELL
+"The unicorn is way up at the north end of the garden." CR>)
+ (<VERB? FIND FOLLOW>
+ <COND (<FSET? ,UNICORN ,TOUCHBIT>
+ <TELL "I don't know where it is now." CR>)
+ (T <TELL
+"The unicorn is a mythical beast." CR>)>)
+ (T
+ <TELL
+"Unicorn? What unicorn?" CR>)>>
+
+<ROUTINE UNICORN-FCN ()
+ <COND (<HELLO? ,UNICORN>
+ <TELL
+"The unicorn listens distractedly, then goes back to cropping grass." CR>)
+ (<VERB? FOLLOW>
+ <TELL
+"The unicorn shies away as you approach." CR>)
+ (<AND <VERB? EXAMINE> <EQUAL? ,PRSO ,UNICORN>>
+ <TELL
+"The unicorn shies away as you approach for a closer look, but you do
+notice a tiny gold key hanging from a red satin ribbon looped around
+the animal's neck." CR>)
+ (<VERB? EXAMINE>
+ <TELL "The unicorn shies away as you approach." CR>)
+ (<VERB? TAKE PUT RUB MUNG ATTACK>
+ <REMOVE ,UNICORN>
+ <SETG UNICORN-FRIGHTENED T>
+ <TELL
+"The unicorn, unsurprised by this evidence that you are indeed the
+uncouth sort of vagabond it suspected you were, melts into the hedges
+and is gone." CR>)>>
+
+<GLOBAL UNICORN-FRIGHTENED <>>
+
+<ROUTINE GAZEBO-FCN ()
+ <COND (<AND <EQUAL? ,HERE ,GARDEN-NORTH> <VERB? THROUGH>>
+ <DO-WALK ,P?IN> <RTRUE>)
+ (<AND <EQUAL? ,HERE ,GAZEBO-ROOM>
+ <VERB? THROUGH>>
+ <TELL "You're already in it." CR>)
+ (<AND <EQUAL? ,HERE ,GAZEBO-ROOM> <VERB? LEAVE EXIT>>
+ <DO-WALK ,P?OUT> <RTRUE>)>>
+
+<ROUTINE CHEST-FCN ()
+ <COND (<VERB? OPEN>
+ <COND (<PROB 25>
+ <V-OPEN>
+ <COND (<AND <IN? ,PRINCESS ,HERE>
+ <NOT ,PRINCESS-AWAKE>>
+ <TELL
+"The opening of the squeaky lid startles the young woman." CR>)>)
+ (T
+ <TELL
+"The hinges are very rusty, but they seem to be starting to give.
+You can probably open it if you try again. There is something
+bumping around inside.">
+ <COND (<AND <IN? ,PRINCESS ,HERE>
+ <NOT ,PRINCESS-AWAKE>>
+ <TELL
+" All this rummaging around has startled
+the young woman.">)>
+ <CRLF>)>
+ <PUTP ,CHEST ,P?ACTION 0>
+ <COND (<AND <IN? ,PRINCESS ,HERE>
+ <NOT ,PRINCESS-AWAKE>>
+ <PERFORM ,V?ALARM ,PRINCESS>)>
+ T)>>
+
+<GLOBAL PRINCESS-AWAKE <>>
+
+<ROUTINE PRINCESS-FCN ("AUX" (DEM <INT I-PRINCESS>))
+ <COND (<VERB? FOLLOW>
+ <COND (<IN? ,PRINCESS ,HERE>
+ <TELL
+"You can't follow her until she leaves..." CR>)
+ (,PRFOLLOW
+ <DO-WALK ,PRFOLLOW>)
+ (T
+ <TELL "I seem to have lost track of her." CR>)>
+ <RTRUE>)
+ (<NOT <IN? ,PRINCESS ,HERE>>
+ <TELL "There is no princess here." CR>)
+ (<VERB? ATTACK MUNG RAPE>
+ <REMOVE ,PRINCESS>
+ <JIGS-UP
+"The princess screams as you approach. \"Won't someone deliver
+me from this awful fate?\" she cries. Just in time, the Wizard of Frobozz
+appears, seeming to unroll himself out of nothing like a window shade.
+\"Fry!\" he intones, and a massive bolt of lightning reduces you to a pile
+of smoking ashes. (Serves you right, too, if you ask me.)">)
+ (<OR <HELLO? ,PRINCESS> <VERB? ALARM KISS EXAMINE RUB>>
+ <COND (<AND <IN? ,PRINCESS ,DRAGON-LAIR>
+ <EQUAL? <GET .DEM ,C-ENABLED?> 0>>
+ <PUTP ,PRINCESS ,P?LDESC
+"There is a dishevelled and slightly unkempt princess here.">
+ <ENABLE <QUEUE I-PRINCESS 2>>
+ <SETG PRINCESS-AWAKE T>
+ <TELL
+"The princess (for she is obviously one) shakes herself awake, then
+notices you for the first time. She smiles. \"Thank you for rescuing
+me from that horrid worm,\" she says. \"I must depart. My parents will
+be worried about me.\" With that, she arises, looking purposefully out
+of the lair." CR>)
+ (T
+ <TELL
+"The princess ignores you. She looks about the room, but her eyes
+fix on the ">
+ <COND (<EQUAL? ,HERE ,GAZEBO-ROOM>
+ <TELL "garden outside">)
+ (<EQUAL? ,HERE ,GARDEN-NORTH>
+ <TELL "gazebo">)
+ (<EQUAL? ,HERE ,RAVINE-LEDGE>
+ <TELL "ledge">)
+ (T
+ <TELL <GET ,PRDIRS <* ,PRCOUNT 4>>>)>
+ <TELL "." CR>)>)
+ (<NOT ,PRINCESS-AWAKE>
+ <TELL "She's in a trance!" CR>)>>
+
+<GLOBAL PRCOUNT 0>
+
+<GLOBAL PRFOLLOW <>>
+
+<GLOBAL PRDIRS
+ <TABLE "south" DRAGON-ROOM "north" P?SOUTH
+ "east" LEDGE-TUNNEL "west" P?EAST
+ "east" RAVINE-LEDGE "west" P?EAST
+ "down" DEEP-FORD "up" P?DOWN
+ "south" MARBLE-HALL "north" P?SOUTH
+ "east" STREAM-PATH "west" P?EAST
+ "east" FORMAL-GARDEN "west" P?EAST
+ "north" GARDEN-NORTH "south" P?NORTH
+ "in" GAZEBO-ROOM "out" P?IN>>
+
+<ROUTINE I-PRINCESS ("AUX" (DEM <INT I-PRINCESS>) (OLDP <LOC ,PRINCESS>)
+ (PC <* ,PRCOUNT 4>))
+ <MOVE ,PRINCESS <GET ,PRDIRS <+ .PC 1>>>
+ <SETG PRFOLLOW <>>
+ <COND (<AND <IN? ,PRINCESS ,STREAM-PATH>
+ <IN? ,WINNER ,MARBLE-HALL>>
+ <TELL
+"The princess presses a loose piece of marble in the wall and a large
+section of the wall slides away, revealing a passage to the east. She
+enters it." CR>
+ <COND (<IN? ,WINNER .OLDP>
+ <SETG PRFOLLOW <GET ,PRDIRS <+ .PC 3>>>)>
+ <SETG SECRET-DOOR T>)
+ (<AND <IN? ,PRINCESS ,STREAM-PATH>
+ <IN? ,WINNER ,STREAM-PATH>>
+ <SETG SECRET-DOOR T>
+ <TELL
+"The princess appears from behind some rocks, as though she had walked
+through a wall." CR>)
+ (<IN? ,WINNER .OLDP>
+ <SETG PRFOLLOW <GET ,PRDIRS <+ .PC 3>>>
+ <COND (<EQUAL? .OLDP ,GARDEN-NORTH>
+ <TELL "The princess enters the gazebo">
+ <COND (<FSET? ,GAZEBO-ROOM ,RMUNGBIT>
+ <TELL ", although you would never get past
+the debris. She must be magically protected.">)>
+ <TELL "." CR>)
+ (<EQUAL? .OLDP ,RAVINE-LEDGE>
+ <TELL
+"The princess climbs daintily down the rock face." CR>)
+ (T
+ <TELL "The princess walks ">
+ <TELL <GET ,PRDIRS .PC>>
+ <TELL ". She glances back at you as she goes." CR>)>)
+ (<IN? ,PRINCESS ,HERE>
+ <COND (<EQUAL? ,HERE ,GAZEBO-ROOM>
+ <TELL "The princess joins you in the gazebo." CR>)
+ (<EQUAL? ,HERE ,DEEP-FORD>
+ <TELL "The princess climbs down the rock wall onto the beach." CR>)
+ (T
+ <TELL "The princess enters from the ">
+ <TELL <GET ,PRDIRS <+ 2 .PC>>>
+ <TELL ". She seems surprised to see you." CR>)>)>
+ <COND (<IN? ,PRINCESS ,GAZEBO-ROOM>
+ <DISABLE .DEM>
+ <ENABLE <QUEUE I-UNICORN 6>>)
+ (T
+ <SETG PRCOUNT <+ ,PRCOUNT 1>>
+ <ENABLE <QUEUE I-PRINCESS
+ <COND (<PROB 75> 1)(T 2)>>>)>
+ <RTRUE>>
+
+<ROUTINE I-UNICORN ()
+ <COND (<EQUAL? ,HERE ,GAZEBO-ROOM ,GARDEN-NORTH>
+ <MOVE ,ROSE ,WINNER>
+ <FCLEAR ,GOLD-KEY ,NDESCBIT>
+ <MOVE ,GOLD-KEY ,WINNER>
+ <SCORE-OBJ ,GOLD-KEY>
+ <PUTP ,GOLD-KEY ,P?ACTION 0>
+ <TELL
+"Shyly, a unicorn peeks out of the hedges. It notices the princess and
+seems captivated. It approaches her and bows its head as though curtseying
+to her. Around its neck is a red satin ribbon on which is strung a delicate
+gold key. The princess takes the ribbon and uses it to tie up her hair. She
+looks at you and then, smiling, hands you the key and a fresh rose which she
+plucks from the arbor. \"You may have use of such a thing,\" she says. \"It
+is the least I can do for one who rescued me from a fate I dare not
+contemplate.\" With that, she mounts the unicorn (side-saddle, of course)
+and rides off into the gloom." CR>
+ <REMOVE ,PRINCESS>)
+ (T
+ <REMOVE ,PRINCESS>
+ <MOVE ,ROSE ,GAZEBO-ROOM>
+ <RFALSE>)>>
+
+\
+
+"SUBTITLE WIZARD WORKSHOP AND ENVIRONS"
+
+<ROUTINE MENHIR-ROOM-FCN (RARG)
+ <COND (<AND <EQUAL? .RARG ,M-FLASH> ,MENHIR-POSITION>
+ <DESCRIBE-MENHIR>)
+ (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"This is a large room which was evidently used once as a quarry. Many
+large limestone chunks lie helter-skelter around the room. Some are
+rough-hewn and unworked, others smooth and well-finished. One side of
+the room appears to have been used to quarry building blocks, the other
+to produce menhirs (standing stones). Obvious passages lead north and
+south." CR>
+ <COND (<IN? ,MENHIR ,LOCAL-GLOBALS>
+ <DESCRIBE-MENHIR>)>
+ T)>>
+
+<ROUTINE DESCRIBE-MENHIR ()
+ <COND (<EQUAL? ,HERE ,MENHIR-ROOM>
+ <COND (<EQUAL? ,MENHIR-POSITION <>>
+ <TELL
+"One particularly large menhir, at least twenty feet tall and eight feet
+thick, is leaning against the wall blocking a dark opening leading
+southwest. On this side of the menhir is carved an ornate letter \"F\"." CR>)
+ (<EQUAL? ,MENHIR-POSITION 1>
+ <TELL
+"There is a huge menhir lying on the floor near a southwest passage." CR>)
+ (<EQUAL? ,MENHIR-POSITION 2>
+ <TELL
+"A dark opening leads southwest." CR>)
+ (<EQUAL? ,MENHIR-POSITION 3>
+ <TELL "There is a huge menhir here." CR>)
+ (T
+ <TELL
+"There is a huge menhir floating like a feather in mid-air here. A
+passage to the southwest opens beneath it." CR>)>
+ <COND (<EQUAL? ,HERE ,MUNGED-ROOM>
+ <TELL
+"The explosion appears to have had no effect on the menhir." CR>)>
+ <RTRUE>)
+ (T <TELL "A dark opening leads southwest." CR>)>>
+
+<GLOBAL MENHIR-POSITION <>>
+
+<ROUTINE MENHIR-FCN ()
+ <COND (<VERB? LOOK-UNDER LOOK-BEHIND>
+ <COND (,MENHIR-POSITION
+ <TELL
+"Behind the menhir is some air and then a wall." CR>)
+ (T
+ <TELL
+"The gap between the menhir and the wall is very narrow, but it is clear
+that there is a sizeable room in there. Your light only reveals a part of
+the far wall." CR>)>)
+ (<VERB? TAKE MOVE TURN>
+ <TELL
+"The menhir weighs many tons and is eight feet wide. You can't even get
+a grip on it, much less move it." CR>)
+ (<VERB? READ> <TELL "\"F\"" CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"It is nicely finished, and the letter \"F\" on it is particularly well
+carved." CR>)
+ (<AND <VERB? ENCHANT> <EQUAL? ,SPELL-USED ,W?FLOAT>>
+ <TELL
+"The menhir floats majestically into the air, rising about ten feet.
+The passage beneath it beckons invitingly." CR>
+ <SETG MENHIR-POSITION 3>)
+ (<AND <VERB? DISENCHANT>
+ <EQUAL? ,SPELL-USED ,W?FLOAT>>
+ <SETG MENHIR-POSITION <>>
+ <COND (<EQUAL? ,HERE ,MENHIR-ROOM ,KENNEL>
+ <TELL
+"The menhir sinks to the ground." CR>)>)>>
+
+<GLOBAL GUARDIAN-FED <>>
+
+<ROUTINE DOOR-KEEPER-FCN ()
+ <COND (<AND <VERB? ALARM> ,GUARDIAN-FED>
+ <TELL "Try as you may, you can't wake it." CR>)
+ (<AND <VERB? GIVE> <EQUAL? ,PRSI ,DOOR-KEEPER>>
+ <COND (,GUARDIAN-FED
+ <TELL
+"He is asleep, at least for the moment." CR>)
+ (<EQUAL? ,PRSO ,CANDY>
+ <SETG GUARDIAN-FED T>
+ <REMOVE ,CANDY>
+ <TELL
+"The guardian greedily wolfs down the candy, including the package. (It
+seemed to enjoy the grasshoppers particularly.) It then becomes
+quiet and its eyes close. (Lizards are known to sleep a long time while
+digesting their meals.)" CR>)
+ (<EQUAL? ,PRSO ,FLASK>
+ <TELL
+"The lizard sniffs it experimentally, then looks at you angrily, hissing
+and snapping." CR>)
+ (<BOMB? ,PRSO>
+ <REMOVE ,PRSO>
+ <TELL
+"The guardian greedily wolfs it down. After a while, you hear a
+very small pop and the guardian's eyes bulge out. It hisses nastily
+at you." CR>)
+ (<EQUAL? ,PRSO ,PALANTIR-1 ,PALANTIR-2 ,PALANTIR-3>
+ <TELL
+"The guardian greedily gobbles the sphere, but finds it unchewable. He
+then tries repeatedly to swallow it whole, with disappointing results.
+Finally, he spits it on the ground." CR>
+ <MOVE ,PRSO ,HERE>)
+ (T
+ <REMOVE ,PRSO>
+ <TELL
+"The lizard wolfs down the " D ,PRSO ", crunching greedily." CR>)>)
+ (<VERB? ATTACK MUNG>
+ <TELL
+"The guardian seems impervious to your attack. In fact, your blows
+don't even seem to be landing." CR>)>>
+
+<GLOBAL WIZ-DOOR-FLAG <>>
+
+<ROUTINE WIZ-DOOR-FCN ()
+ <COND (<NOT ,GUARDIAN-FED>
+ <COND (<VERB? OPEN>
+ <TELL
+"The lizard comes to life and snaps at you as you reach for the
+handle." CR>)
+ (<VERB? UNLOCK>
+ <TELL
+"The lizard door keeper comes awake and bites at your hand. You
+jerk away just in time.">
+ <COND (<AND <EQUAL? ,PRSI ,GOLD-KEY> <PROB 5>>
+ <REMOVE ,GOLD-KEY>
+ <TELL " The guardian does get the
+key, though. It grins maniacally." CR>)
+ (<PROB 20>
+ <MOVE ,GOLD-KEY ,HERE>
+ <TELL " You drop the key, though." CR>)
+ (T <CRLF>)>)>)
+ (<VERB? UNLOCK>
+ <COND (,WIZ-DOOR-FLAG
+ <TELL "It is already!" CR>)
+ (<EQUAL? ,PRSI ,GOLD-KEY>
+ <SETG WIZ-DOOR-FLAG T>
+ <TELL
+"The key turns and the bolt clicks. The door is unlocked." CR>)
+ (T
+ <SETG WIZ-DOOR-FLAG <>>
+ <TELL "That won't unlock it." CR>)>)
+ (<VERB? LOCK>
+ <COND (<NOT ,WIZ-DOOR-FLAG>
+ <TELL "It is locked already." CR>)
+ (<EQUAL? ,PRSI ,GOLD-KEY>
+ <TELL "The door is now locked." CR>
+ <SETG WIZ-DOOR-FLAG <>>
+ <RTRUE>)
+ (T <TELL "That won't lock it." CR>)>)
+ (<VERB? OPEN CLOSE>
+ <COND (,WIZ-DOOR-FLAG
+ <OPEN-CLOSE ,PRSO
+ "The door creaks open."
+ "The door reluctantly closes.">)
+ (<VERB? OPEN>
+ <TELL "The door is locked!" CR>)>)>>
+
+<ROUTINE GUARDIAN-ROOM-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"This room is cobwebby and musty, but tracks in the dust show that it has
+seen visitors recently. At the south end of the room is a stained and
+battered (but very strong-looking) door. To the north, a corridor exits." CR>
+ <COND (<FSET? ,WIZ-DOOR ,OPENBIT>
+ <TELL "The door is open." CR>)>
+ <COND (<NOT ,GUARDIAN-FED>
+ <TELL
+"Imbedded in the door is a nasty-looking lizard head, with sharp
+teeth and beady eyes. ">
+ <COND (<IN? ,CANDY ,WINNER>
+ <TELL "The lizard is sniffing at you." CR>)
+ (T
+ <TELL
+"The eyes move to watch you approach." CR>)>)
+ (T
+ <TELL
+"A sleepy-looking lizard head is mounted on the door." CR>)>)>>
+
+<ROUTINE WORKSHOP-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"You are standing in the entry hall of the Wizard's Workshop. Dark
+corridors lead west and south from here. The corridor to the west
+smells slightly of incense or candle smoke.">
+ <COND (<FSET? ,WIZ-DOOR ,OPENBIT>
+ <TELL " The workshop door is open.">)>
+ <CRLF>
+ <RTRUE>)>>
+
+<ROUTINE ARCANA-PSEUDO ()
+ <COND (<VERB? TAKE>
+ <TELL
+"The stuff on the bench appears to be so much junk, and you decide that
+it would only get in your way if you took it." CR>)>>
+
+<ROUTINE TROPHY-PSEUDO ()
+ <COND (<VERB? READ> <RFALSE>)
+ (<VERB? TAKE RUB>
+ <TELL
+"As your fingers near it, you get a nasty shock (but fortunately not a fatal
+one)." CR>)>>
+
+<ROUTINE STAND-FCN ()
+ <COND (<VERB? TAKE>
+ <TELL "The " D ,PRSO " is firmly attached to the bench." CR>)
+ (<AND <VERB? PUT PUT-ON>
+ <EQUAL? ,PRSO ,PALANTIR-1 ,PALANTIR-2 ,PALANTIR-3>
+ <EQUAL? ,PRSI ,STAND-1 ,STAND-2 ,STAND-3>>
+ <V-PUT>
+ <COND (<AND <IN? ,PALANTIR-1 ,STAND-1>
+ <IN? ,PALANTIR-2 ,STAND-2>
+ <IN? ,PALANTIR-3 ,STAND-3>>
+ <REMOVE ,PALANTIR-1>
+ <REMOVE ,PALANTIR-2>
+ <REMOVE ,PALANTIR-3>
+ <MOVE ,STAND-4 ,WORKBENCH>
+ <TELL
+"As you place the " D ,PRSO " in the " D ,PRSI ", a low humming noise
+begins, and you can feel the hairs on the back of your neck begin to
+stand up. The three spheres begin to vibrate, faster and faster, as
+the noise becomes higher and higher pitched. Three puffs of smoke, one
+red, one blue, one white, rise up from empty stands. The spheres are gone!
+But in the center of the triangle formed by the stands is now a black stand
+of obsidian in which rests a strange black sphere." CR>)>
+ T)>>
+
+<ROUTINE IN-AQUARIUM-FCN (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"There is a sandy floor here, and your vision seems murky and blurred.
+The wall you are looking at is nicely dressed stone." CR>
+ <COND (<IN? ,SERPENT ,AQUARIUM>
+ <COND (<PROB 25>
+ <TELL
+"While you watch a shadow seems to pass overhead." CR>)
+ (<PROB 5>
+ <TELL
+"The head of some horrible serpent pokes into view, its beady green eyes
+almost seeming to see you." CR>)>)>
+ <RTRUE>)
+ (<EQUAL? .RARG ,M-ENTER>
+ <COND (<IN? ,SERPENT ,AQUARIUM>
+ <JIGS-UP
+"You drop into the aquarium with a splash (which attracts the serpent).
+He greedily eats you. He's just a baby, after all, and needs all the
+food he can get.">)
+ (T <JIGS-UP
+"Oh dear, you have cut yourself severely on the broken glass. I'm afraid
+you've bled to death.">)>)>>
+
+<ROUTINE AQUARIUM-FCN ("AUX" OBJ)
+ <COND (<VERB? BOARD THROUGH> <DO-WALK ,P?IN> <RTRUE>)
+ (<AND <VERB? LOOK-INSIDE>
+ <IN? ,SERPENT ,AQUARIUM>>
+ <TELL
+"In the aquarium is a baby sea-serpent who eyes you suspiciously. His
+scaly body writhes about in the huge tank." CR>)
+ (<OR <AND <VERB? MUNG ATTACK> <EQUAL? ,PRSO ,AQUARIUM>>
+ <AND <VERB? THROW> <EQUAL? ,PRSI ,AQUARIUM>>>
+ <COND (<EQUAL? ,PRSO ,AQUARIUM>
+ <COND (<NOT ,PRSI> <RFALSE>)
+ (T <SET OBJ ,PRSI>)>)
+ (T <SET OBJ ,PRSO>)>
+ <MOVE .OBJ ,HERE>
+ <COND (<IN? ,DEAD-SERPENT ,HERE>
+ <TELL
+"The aquarium is already broken!" CR>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,FLASK>
+ <JIGS-UP
+"The flask shatters, and poison gas fills the room!">
+ <RTRUE>)
+ (<BOMB? .OBJ>
+ <DISABLE <INT I-FUSE>>)
+ (<OR <FSET? .OBJ ,WEAPONBIT>
+ <G? <GETP .OBJ ,P?SIZE> 10>>
+ <REMOVE ,SERPENT>
+ <MOVE ,PALANTIR-3 ,AQUARIUM>
+ <FCLEAR ,PALANTIR-3 ,NDESCBIT>
+ <PUTP ,AQUARIUM ,P?LDESC
+"A shattered aquarium fills the northern half of the room.">
+ <MOVE ,DEAD-SERPENT ,HERE>
+ <TELL
+"The " D .OBJ " shatters the glass wall of the aquarium, spilling out
+an impressive amount of salt water and wet sand. It also spills out an
+extremely annoyed sea serpent who bites angrily at the " D .OBJ ", and
+then at you. He is having difficulty breathing, and he seems to hold you
+responsible for his current problem.">
+ <COND (<VERB? MUNG>
+ <TELL
+" He manages to rend you limb from limb before he drowns in the
+air." CR>
+ <JIGS-UP "I guess you were too careless.">)
+ (T
+ <TELL
+" He tries to slither across the stone floor towards you. Fortunately,
+he expires mere inches away from biting off your foot. A clear crystal
+sphere sits amid the sand and broken glass on the bottom of the
+aquarium." CR>)>)
+ (T
+ <TELL
+"The " D .OBJ " bounces harmlessly off the glass." CR>)>)>>
+
+<ROUTINE SERPENT-FCN ()
+ <COND (<VERB? ATTACK MUNG>
+ <TELL
+"He swims towards you with a powerful stroke of his flippers, dagger-like
+teeth dripping. Fortunately, he doesn't want to crash into the aquarium
+wall, and contents himself with splashing you with water." CR>)
+ (<AND <VERB? PUT>
+ <EQUAL? ,PRSO ,SERPENT>>
+ <TELL "Impossible for many reasons." CR>)
+ (<VERB? TAKE GIVE>
+ <JIGS-UP
+"He takes you instead. *Uurrp!*">)>>
+
+<ROUTINE DEAD-SERPENT-FCN ()
+ <COND (<VERB? TAKE>
+ <TELL
+"This may only be a baby sea serpent, but it's as big as a small whale." CR>)>>
+
+<ROUTINE GENIE-FCN ("OPTIONAL" (RARG ,M-OBJECT) "AUX" V HOARD)
+ <COND (<VERB? HELLO>
+ <TELL
+"The genie grins demonically, but says nothing." CR>)
+ (<EQUAL? ,WINNER ,GENIE>
+ <COND (<NOT ,GENIE-READY?>
+ <TELL
+"\"My fee is not paid! I perform no tasks for free! We demons have a
+strong union these days.\"" CR>
+ <RFATAL>)
+ (<VERB? SGIVE> <RFALSE>)
+ (<OR <G? <GET ,P-PRSO 0> 1>
+ <G? <GET ,P-PRSI 0> 1>>
+ <TELL
+"\"I will do one thing only, oh gracious master!\"" CR>
+ <RFATAL>)
+ (<AND <VERB? MOVE> <EQUAL? ,PRSO ,GLOBAL-MENHIR>>
+ <SETG MENHIR-POSITION 1>
+ <TELL
+"The demon is gone for a moment. \"A trifle... My little finger alone
+was enough.\"" CR>
+ <GENIE-LEAVES>)
+ (<VERB? TAKE>
+ <COND (<EQUAL? ,PRSO ,GLOBAL-MENHIR>
+ <REMOVE ,MENHIR>
+ <SETG MENHIR-POSITION 2>
+ <TELL
+"The demon flashes away for a second. \"I have little use for such a
+thing, but perhaps as a doorstop...\"" CR>
+ <GENIE-LEAVES>)
+ (<EQUAL? ,PRSO ,WAND>
+ <TELL
+"\"This I do gladly, oh fool!\" cackles the demon gleefully. He stretches
+out an enormous hand towards the wand and taking it like a toothpick (this
+is a large demon), points it at himself. \"Free!\" he commands, and the
+demon and his wand vanish forever." CR>
+ <GENIE-LEAVES <>>
+ <REMOVE ,WAND>)
+ (<FSET? ,PRSO ,TAKEBIT>
+ <GENIE-LEAVES <>>
+ <REMOVE ,PRSO>
+ <TELL
+"The demon snaps his fingers, the " D ,PRSO " spins wildly in the air in
+front of him, then he and it depart." CR>)
+ (T
+ <TELL
+"\"I fear that I cannot take such a thing.\"" CR>)>)
+ (<AND <VERB? GIVE> <EQUAL? ,PRSI ,ME>>
+ <COND (<EQUAL? ,PRSO ,WAND>
+ <TELL
+"\"I hear and obey!\" says the demon. He stretches out an enormous hand
+towards the wand. The Wizard is unsure what to do, pointing it threateningly
+at the demon, then at you. \"Fudge!\" he cries, but aside from a strong
+odor of chocolate in the air, there is no effect. The demon plucks the
+wand out of his hand (it's about toothpick-size to him) and gingerly lays
+it before you. He fades into the smoke, which disperses.
+The wizard runs from the room in terror." CR>
+ <REMOVE ,WIZARD>
+ <GENIE-LEAVES <>>
+ <FCLEAR ,WAND ,NDESCBIT>
+ <MOVE ,WAND ,HERE>)
+ (<EQUAL? ,PRSO ,GLOBAL-MENHIR>
+ <MOVE ,MENHIR ,PENTAGRAM-ROOM>
+ <FCLEAR ,MENHIR ,NDESCBIT>
+ <FCLEAR ,MENHIR ,TAKEBIT>
+ <SETG MENHIR-POSITION 3>
+ <TELL
+"He waves his hands, and the menhir drops softly at your feet." CR>
+ <GENIE-LEAVES>)
+ (<FSET? ,PRSO ,TAKEBIT>
+ <MOVE ,PRSO ,PENTAGRAM-ROOM>
+ <TELL
+"The " D ,PRSO " appears before you and settles to the ground." CR>
+ <GENIE-LEAVES>)
+ (T
+ <TELL
+"\"Were it possible, this would be my fondest wish, but alas...\"" CR>)>)
+ (<VERB? ATTACK>
+ <COND (<EQUAL? ,PRSO ,GLOBAL-CERBERUS>
+ <TELL
+"\"This may prove taxing, but we'll see. Perhaps I'll tame him for a
+pup instead.\" The demon disappears for an instant, then reappears. He
+looks rather gnawed and scratched. He winces. \"Too much for me. Puppy
+dog, indeed. You're welcome to him. Never did like dogs anyway... Any
+other orders, oh beneficent one?\"" CR>)
+ (<EQUAL? ,PRSO ,WIZARD>
+ <TELL
+"The demon grins hideously. \"This has been my desire e'er since this
+charlatan bent me to his service. I perform this deed with pleasure!\"
+The demon forms himself back into a cloud of greasy smoke. The cloud
+envelops the Wizard, who waves his wand fruitlessly, mumbling various
+phrases which begin with \"F\". A horrible scream is heard, and the smoke
+begins to clear. Nothing remains of the Wizard but his wand." CR>
+ <REMOVE ,WIZARD>
+ <FCLEAR ,WAND ,NDESCBIT>
+ <MOVE ,WAND ,HERE>
+ <GENIE-LEAVES>)
+ (<EQUAL? ,PRSO ,ME>
+ <GENIE-LEAVES <>>
+ <SETG WINNER ,ADVENTURER>
+ <JIGS-UP
+"\"Foolish mortal, if you insist...\" The demon crushes you with one
+blow of his enormous hand.">)
+ (T
+ <TELL
+"\"I know no way to kill a " D ,PRSO ".\"" CR>)>)
+ (<VERB? FIND EXAMINE>
+ <TELL
+"\"I am not permitted to ">
+ <COND (<VERB? FIND>
+ <TELL "answer questions">)
+ (T <TELL "perform such menial tasks">)>
+ <TELL ". The terms of my contract
+are explicit on this matter, learned one. Surely you would not wish to
+violate my contract?\" He licks his lips with a forked tongue like a
+snake's. \"The penalty clauses are ... hmm ... devilish.\"" CR>)
+ (T
+ <TELL
+"\"Apologies, oh master, but even for such a one as I this is not possible.\"
+He seems somewhat chagrined to have to admit this." CR>
+ <RTRUE>)>)
+ (<VERB? EXORCISE ATTACK MUNG>
+ <TELL
+"The demon laughs uproariously." CR>)
+ (<AND <VERB? GIVE> <EQUAL? ,PRSI ,GENIE>>
+ <COND (<AND <EQUAL? ,PRSO ,IRON-BOX> <IN? ,VIOLIN ,PRSO>>
+ <TELL
+"The genie frowns briefly, then opens the box. He smiles horribly." CR>
+ <SETG PRSO ,VIOLIN>)>
+ <COND (<GETPT ,PRSO ,P?VALUE>
+ <REMOVE-CAREFULLY ,PRSO>
+ <SETG GENIE-HOARD <+ ,GENIE-HOARD 1>>
+ <SCORE-UPD 2>
+ <SET HOARD <+ ,GENIE-HOARD <CASE-WORTH>>>
+ <COND (<NOT <L? .HOARD ,TREASURES-MAX>>
+ <SETG GENIE-READY? T>
+ <PUTP ,WIZARD ,P?LDESC
+"A dejected and fearful Wizard watches from the corner.">
+ <TELL
+"\"This will do for my fee. 'Tis a paltry hoard, but as you have done
+me a small service by loosing me from this wizard, it will suffice.\"" CR>)
+ (T
+ <TELL
+"\"" <GET ,GENIE-THANKS .HOARD> "\"" CR>
+ <COND (<EQUAL? .HOARD 8>
+ <TELL
+"The Wizard looks at you as if you are a madman. He tears his beard and
+stares at you fearfully." CR>)>
+ <RTRUE>)>)
+ (<BOMB? ,PRSO>
+ <GENIE-LEAVES <>>
+ <TELL
+"\"I fear that this violates my contract, oh foolish one. Thus, I am
+free to depart.\"" CR>)
+ (T
+ <REMOVE-CAREFULLY ,PRSO>
+ <TELL
+"The demon gladly takes the " D ,PRSO " and smiles balefully,
+revealing enormous fangs." CR>)>)>>
+
+<ROUTINE GENIE-LEAVES ("OPTIONAL" (NOISY? T))
+ <FSET ,GENIE ,INVISIBLE>
+ <COND (.NOISY?
+ <TELL "The genie departs, his agreement fulfilled." CR>)>
+ <SETG P-CONT <>>
+ <RFATAL>>
+
+<GLOBAL GENIE-READY? <>>
+<GLOBAL GENIE-HOARD 0>
+<CONSTANT TREASURES-MAX 10> ;"all treasures but palantirs(4),
+ candy, collar, wand."
+
+<GLOBAL GENIE-THANKS <LTABLE
+"Most fine, master! But 'tis not enough. I will do a great service,
+and are not great services bought at great price?"
+"Very nice, but not enough!"
+"Ah, truly magnificent! Keep them coming."
+"Almost halfway there, oh worthy one!"
+"Oh, such beauty! Your generosity almost overwhelms me!"
+"Truly I shall do thee a wonderful service when thou hast finished!"
+"Truly you are most generous! But still, this is yet not enough."
+"A fine gift, mighty one, you have almost reached my fee."
+"Wondrous fine, master! But one treasure is yet to be given!">>
+
+<ROUTINE CASE-WORTH ("AUX" F (W 0))
+ <SET F <FIRST? ,WIZARD-CASE>>
+ <REPEAT ()
+ <COND (<NOT .F> <RETURN .W>)>
+ <COND (<GETPT .F ,P?VALUE>
+ <SET W <+ .W 1>>)>
+ <SET F <NEXT? .F>>>>
+
+<ROUTINE PENTAGRAM-FCN ("OPTIONAL" (RARG ,M-BEG))
+ <COND (<EQUAL? .RARG ,M-BEG>
+ <COND (<VERB? THROUGH BOARD>
+ <TELL
+"You try to enter the pentagram, but are forced back by an invisible
+power." CR>)
+ (<AND <VERB? PUT PUT-ON> <EQUAL? ,PRSO ,PALANTIR-4>>
+ <REMOVE ,PALANTIR-4>
+ <MOVE ,GENIE ,PENTAGRAM-ROOM>
+ <TELL
+"A cold wind blows outward from the sphere. The candles flicker, and a
+low moan, almost inaudible, is heard. It rises in volume and pitch
+until it becomes a high-pitched keening. A dim shape becomes visible in
+the air above the sphere. The shape resolves into a large and somewhat
+formidable looking demon. He looks around, tests the walls of the
+pentagram experimentally, then sees you! \"Hmm, a new master...\" he
+says under his breath. \"Greetings, oh master! Wouldst desire a
+service, as our contract stateth? For some pittance of wealth, some
+trifle, I will gratify thy desires to the utmost limit of my powers, and
+they are not inconsiderable.\" He makes a pass with his massive arms and
+the walls begin to shake a little. Another pass and the shaking stops.
+\"A nice effect... I find it makes for a better relationship to give
+such a demonstration early on.\" He grins vilely." CR>)>)>>
+
+<ROUTINE WIZARD-FCN ("OPTIONAL" (RARG ,M-OBJECT) "AUX" OLIT)
+ <COND (<EQUAL? ,WINNER ,WIZARD>
+ <COND (<VERB? GIVE> <TELL
+"The Wizard replies \"Foolishment!\"" CR>)
+ (T
+ <TELL
+"The Wizard considers your statement carefully. His expression indicates
+he regards it as fanciful." CR>)>)
+ (<AND <VERB? GIVE> <EQUAL? ,PRSI ,WIZARD>>
+ <SET OLIT ,LIT>
+ <REMOVE-CAREFULLY ,PRSO>
+ <COND (<BOMB? ,PRSO>
+ <COND (<IN? ,GENIE ,PENTAGRAM-ROOM>
+ <MOVE ,PRSO ,HERE>
+ <TELL
+"The wizard accepts this final folly resignedly." CR>)
+ (T
+ <REMOVE ,WIZARD>
+ <TELL
+"\"Hmm...\" The Wizard mutters something, then waves his wand over the
+bomb. It transforms into a bouquet of flowers. Both Wizard and
+flowers disappear." CR>)>)
+ (<AND .OLIT <NOT ,LIT>>
+ <TELL
+"\"Thank you.\" As the Wizard places the " D ,PRSO " under his robe, the
+room becomes dark." CR>)
+ (T
+ <TELL "\"Thank you.\"" CR>)>)
+ (<HELLO? ,WIZARD>
+ <TELL
+"The Wizard seems surprised, much as you might be if a dog talked." CR>)
+ (<VERB? ATTACK MUNG>
+ <REMOVE ,WIZARD>
+ <COND (<IN? ,WAND ,WIZARD>
+ <TELL
+"The Wizard retreats, waving his wand and chanting. He says \"Fear!\"
+">)
+ (T
+ <TELL
+"The Wizard tries to cast the \"Fear!\" spell, but without his wand!
+">)>
+ <COND (<NOT <FSET? ,GENIE ,INVISIBLE>>
+ <TELL
+"Nothing happens! With a terrified glance at the demon, the wizard
+runs past you and out of the room." CR>)
+ (T
+ <TELL
+"You are suddenly terrified. The Wizard seems huge and terrible,
+looming over you. You flee, terrified. He chuckles, snaps his fingers, and
+disappears." CR CR>
+ <SETG SPELL? ,S-FEAR>
+ <PUTP ,ADVENTURER ,P?ACTION MAGIC-ACTOR>
+ <ENABLE <QUEUE I-WIZARD 10>>
+ <RANDOM-WALK>)>)>>
+
+<ROUTINE I-WIZARD ("AUX" CAST-PROB (PCNT 0) F (WLOC <LOC ,WINNER>))
+ <ENABLE <QUEUE I-WIZARD 4>>
+ <COND (,DEAD <RFALSE>)
+ (,SPELL?
+ <COND (<EQUAL? ,SPELL? ,S-FLOAT>
+ <COND (<EQUAL? ,HERE ,WELL-TOP>
+ <JIGS-UP
+"You plunge to the bottom of the shaft as the spell wears off.">
+ <RTRUE>)
+ (<AND <FSET? ,HERE ,NONLANDBIT>
+ <NOT <EQUAL? ,HERE ,WELL-BOTTOM
+ ,VOLCANO-BOTTOM>>>
+ <JIGS-UP
+"As the spell wears off, you find yourself making a half-gainer
+towards the bottom of the volcano.">
+ <RTRUE>)>)
+ (<EQUAL? ,SPELL? ,S-FEEBLE>
+ <SETG LOAD-ALLOWED ,LOAD-MAX>)
+ (<EQUAL? ,SPELL? ,S-FIERCE>
+ <SETG SWORD-GLOW 0>)
+ (<EQUAL? ,SPELL? ,S-FUMBLE>
+ <SETG FUMBLE-NUMBER 7>
+ <SETG FUMBLE-PROB 8>)>
+ <COND (<GET ,SPELL-STOPS ,SPELL?>
+ <TELL <GET ,SPELL-STOPS ,SPELL?> CR>)>
+ <PUTP ,ADVENTURER ,P?ACTION 0>
+ <SETG SPELL? <>>
+ <RTRUE>)>
+ <COND (<IN? ,GENIE ,PENTAGRAM-ROOM>
+ <DISABLE <INT I-WIZARD>>
+ <COND (<NOT <IN? ,WIZARD ,PENTAGRAM-ROOM>>
+ <MOVE ,WIZARD ,PENTAGRAM-ROOM>
+ <COND (<IN? ,WINNER ,PENTAGRAM-ROOM>
+ <TELL
+
+"Suddenly the Wizard materializes in the room. He is astonished by what
+he sees: his servant in deep conversation with a common adventurer! He
+draws forth his wand, waves it frantically, and incants \"Frobizz!
+Frobozzle! Frobnoid!\" The demon laughs heartily. \"You no longer
+control the Black Crystal, hedge-wizard! Your wand is powerless! Your
+doom is sealed!\" The demon turns to you, expectantly." CR>)>)>
+ <RTRUE>)>
+ <COND (<AND <NOT ,LIT>
+ <FSET? ,LAMP ,RMUNGBIT>
+ <G? ,SCORE 200>>
+ <SETG ALWAYS-LIT T>
+ <SETG LIT T>
+ <TELL
+"In the darkness you hear the voice of the Wizard. \"Dear me, you seem
+to have gotten into quite a pickle.\" He chuckles. \"Fluoresce!\" he
+incants. It is no longer dark." CR>
+ <RTRUE>)>
+ <COND (<AND <LOC ,WIZARD> <PROB 80>>
+ <COND (<IN? ,WIZARD ,HERE>
+ <TELL "The Wizard vanishes." CR>)>
+ <REMOVE ,WIZARD>
+ <RTRUE>)>
+ <COND (<PROB 10>
+ <COND (<EQUAL? ,HERE ,POSTS-ROOM ,POOL-ROOM>
+ <TELL
+"A huge and terrible wizard appears before you, as large as the largest
+tree! He looks down on you as you would look upon a gnat!" CR>)
+ (<FSET? ,HERE ,NONLANDBIT>
+ <TELL
+"The Wizard appears, floating nonchalantly in the air beside you. He
+grins sideways at you." CR>)
+ (T
+ <TELL
+"A strange little man in a long cloak appears suddenly in the room.
+He is wearing a high pointed hat embroidered with astrological signs.
+He has a long, stringy, and unkempt beard." CR>)>
+ <COND (<IN? ,PALANTIR-4 ,ADVENTURER>
+ <TELL
+"The Wizard notices that you carry the Black Crystal, and with an
+unseemly haste, he disappears." CR>
+ <REMOVE ,WIZARD>
+ <RTRUE>)
+ (<PROB 20>
+ <TELL
+"He mutters something (muffled by his beard) and disappears as suddenly
+as he came." CR>
+ <REMOVE ,WIZARD>
+ <RTRUE>)>
+ <COND (<IN? ,PALANTIR-1 ,ADVENTURER>
+ <SET PCNT <+ .PCNT 1>>)>
+ <COND (<IN? ,PALANTIR-2 ,ADVENTURER>
+ <SET PCNT <+ .PCNT 1>>)>
+ <COND (<IN? ,PALANTIR-3 ,ADVENTURER>
+ <SET PCNT <+ .PCNT 1>>)>
+ <SET CAST-PROB <- 80 <* .PCNT 20>>>
+ <TELL
+"The Wizard draws forth his wand and waves it in your direction. It
+begins to glow with a faint blue glow." CR>
+ <COND (<PROB .CAST-PROB>
+ <MOVE ,WIZARD ,HERE>
+ <SETG SPELL? <RANDOM ,SPELLS>>
+ <PUTP ,ADVENTURER ,P?ACTION MAGIC-ACTOR>
+ <ENABLE <QUEUE I-WIZARD
+ <+ 5
+ <RANDOM <- 30 <* 5 .PCNT>>>>>>
+ <COND (<PROB 75>
+ <TELL
+"The Wizard, in a deep and resonant voice, speaks the word \""
+<GET ,SPELL-NAMES ,SPELL?> "!\" He cackles gleefully." CR>)
+ (T
+ <TELL
+"The Wizard, almost inaudibly, whispers a word beginning with \"F,\"
+and then disappears, chuckling nastily." CR>)>
+ <REMOVE ,WIZARD>
+ <COND (<GET ,SPELL-HINTS ,SPELL?>
+ <TELL <GET ,SPELL-HINTS ,SPELL?> CR>)>
+ <COND (<EQUAL? ,SPELL? ,S-FALL>
+ <COND (<FSET? .WLOC ,VEHBIT>
+ <TELL
+"You suddenly fall headlong out of the " D .WLOC " as though
+someone had flipped it over." CR>
+ <COND (<EQUAL? ,HERE ,WELL-TOP>
+ <JIGS-UP
+"You plummet to the bottom of the shaft.">)
+ (<AND <FSET? ,HERE ,NONLANDBIT>
+ <NOT <EQUAL? ,HERE
+ ,VOLCANO-BOTTOM
+ ,WELL-BOTTOM>>>
+ <JIGS-UP
+"You make a rather messy swan dive to the bottom of the volcano.">)
+ (ELSE <MOVE ,WINNER ,HERE>)>)>)
+ (<EQUAL? ,SPELL? ,S-FLOAT>
+ <COND (<FSET? .WLOC ,VEHBIT>
+ <TELL
+" You rise majestically out of the " D .WLOC ", coming to a stop about five
+feet above it and to one side." CR>
+ <MOVE ,WINNER ,HERE>)
+ (T
+ <TELL
+"Slowly, you and all your belongings rise into the air, stopping after
+about five feet." CR>)>)
+ (<EQUAL? ,SPELL? ,S-FEEBLE>
+ <SETG LOAD-ALLOWED 50>
+ <COND (<SET F <FIRST? ,WINNER>>
+ <TELL
+"In fact, you feel so weak that you drop the " D .F "." CR>
+ <MOVE .F .WLOC>)>)
+ (<EQUAL? ,SPELL? ,S-FEAR>
+ <COND (<FSET? .WLOC ,VEHBIT>
+ <TELL
+"You cower in the corner of the " D .WLOC ", hoping the wizard
+won't see you." CR>)
+ (T
+ <CRLF>
+ <RANDOM-WALK>)>)
+ (<EQUAL? ,SPELL? ,S-FUMBLE>
+ <SETG FUMBLE-NUMBER 3>
+ <SETG FUMBLE-PROB 25>
+ <COND (<SET F <FIRST? ,ADVENTURER>>
+ <TELL
+"Ooops! You dropped the " D .F "." CR>
+ <MOVE .F .WLOC>)>)
+ (<EQUAL? ,SPELL? ,S-FILCH>
+ <COND (<ROB ,WINNER ,WIZARD-CASE>
+ <TELL
+"Something you are carrying has disappeared!" CR>)>)
+ (<EQUAL? ,SPELL? ,S-FIERCE>
+ <TELL
+"The Wizard mumbles something under his breath, and just before you
+reach him, he vanishes." CR>)>
+ <RTRUE>)
+ (<PROB 50>
+ <REMOVE ,WIZARD>
+ <TELL
+"There is a loud crackling noise. Blue smoke rises from out of the
+Wizard's sleeve. He sighs and disappears." CR>)
+ (<PROB 50>
+ <REMOVE ,WIZARD>
+ <TELL
+"The Wizard incants \"" <RANDOM-ELEMENT ,SPELL-NAMES> "!\" but nothing
+happens. He shakes the wand. Nothing happens. With a slightly
+embarrassed glance in your direction, he vanishes." CR>)
+ (T
+ <MOVE ,WIZARD ,HERE>
+ <TELL
+"The Wizard seems about to say something, but thinks better of it,
+and peers at you from under his bushy eyebrows." CR>)>)>>
+
+<GLOBAL SPELL? <>>
+
+<CONSTANT SPELLS 12>
+<CONSTANT S-FEEBLE 1>
+<CONSTANT S-FUMBLE 2>
+<CONSTANT S-FEAR 3>
+<CONSTANT S-FILCH 4>
+<CONSTANT S-FREEZE 5>
+<CONSTANT S-FALL 6>
+<CONSTANT S-FERMENT 7>
+<CONSTANT S-FIERCE 8>
+<CONSTANT S-FLOAT 9>
+<CONSTANT S-FIREPROOF 10>
+<CONSTANT S-FENCE 11>
+<CONSTANT S-FANTASIZE 12>
+
+<GLOBAL SPELL-NAMES
+ <LTABLE "Feeble" "Fumble" "Fear" "Filch" "Freeze"
+ "Fall" "Ferment" "Fierce" "Float" "Fireproof"
+ "Fence" "Fantasize">>
+
+<GLOBAL SPELL-HINTS
+ <LTABLE
+"All at once you feel very tired."
+<>
+"You look at the Wizard in terror. You scramble away,
+trying to get as far as possible from him."
+<>
+"Your limbs suddenly feel like they have turned to stone. You can't
+move a muscle."
+<>
+"You begin to feel lightheaded."
+"You rush at the Wizard, intending to tear him limb from limb."
+<>
+<>
+<>
+<>>>
+
+<GLOBAL SPELL-STOPS
+ <LTABLE
+"You feel more energetic now."
+<>
+"You suddenly decide that the Wizard isn't that terrifying..."
+<>
+"Your little finger begins to twitch, and then your whole body is free
+again."
+<>
+"Your head is clearer now."
+"You feel cooler and less angry now."
+"You sink quietly down again."
+<>
+<>
+<>>>
+
+<ROUTINE ROB (WHO WHERE "AUX" N X (ROBBED? <>))
+ <SET X <FIRST? .WHO>>
+ <REPEAT ()
+ <COND (<NOT .X> <RETURN .ROBBED?>)>
+ <SET N <NEXT? .X>>
+ <COND (<RIPOFF .N .WHERE> <SET ROBBED? T>)>
+ <SET X .N>>>
+
+<ROUTINE RIPOFF (X WHERE)
+ <COND (<AND <NOT <FSET? .X ,INVISIBLE>>
+ <GETPT .X ,P?VALUE>
+ <NOT <EQUAL? .X ,PALANTIR-1>>
+ <NOT <EQUAL? .X ,PALANTIR-2>>
+ <NOT <EQUAL? .X ,PALANTIR-3>>
+ <NOT <EQUAL? .X ,GOLD-KEY>>
+ <NOT <EQUAL? .X ,CANDY>>>
+ <MOVE .X .WHERE>
+ <FSET .X ,TOUCHBIT>
+ <RTRUE>)>>
+
+<ROUTINE WIZARD-CASE-FCN ()
+ <COND (<EQUAL? ,WINNER ,GENIE>
+ <COND (<VERB? MUNG OPEN>
+ <REMOVE ,WIZARD-CASE>
+ <MOVE ,BROKEN-CASE ,TROPHY-ROOM>
+ <TELL
+"The demon smashes the case into smithereens. Everything in it smashes
+as well." CR>)>)
+ (<AND <VERB? ENCHANT> <EQUAL? ,SPELL-USED ,W?FILCH>>
+ <ROB ,WIZARD-CASE ,HERE>
+ <SETG SPELL-HANDLED? T>
+ <TELL
+"The contents of the case are arrayed at your feet." CR>)
+ (<VERB? OPEN MUNG CLOSE TAKE>
+ <TELL
+"The case is protected by a fearful spell. You cannot touch it in any
+way." CR>)>>
+
+<GLOBAL SPELL-HANDLED? <>> ;"T if handled before I-SPELL runs"
+<GLOBAL WAND-ON <>>
+<GLOBAL SPELL-USED <>>
+<GLOBAL SPELL-VICTIM <>>
+
+<ROUTINE WAND-FCN ()
+ <COND (<AND <VERB? TAKE PUT GIVE> <IN? ,WAND ,WIZARD>>
+ <COND (<EQUAL? ,WINNER ,ADVENTURER>
+ <TELL "The Wizard snatches it away." CR>)
+ (<EQUAL? ,WINNER ,ROBOT>
+ <JIGS-UP
+"The Wizard snatches the wand away, muttering the word \"Float\" at the
+robot. Unfortunately he has no floating-point processor and dies in a
+vain attempt to divide 4.85 by 3.62.">)>)
+ (<AND <VERB? WAVE>
+ <EQUAL? ,PRSI ,GRUE>>
+ <TELL
+"There is no grue in sight, but a hissing sound issues forth from the
+darkness." CR>)
+ (<VERB? WAVE RUB RAISE>
+ <COND (<AND <EQUAL? ,PRSO ,WAND>
+ <NOT <IN? ,WAND ,WINNER>>>
+ <TELL "You don't have the wand!" CR>
+ <RTRUE>)
+ (<OR ,WAND-ON ,SPELL-USED ,SPELL-VICTIM>
+ <COND (<PROB 5>
+ <JIGS-UP
+"The wand was still recharging from its last use. It discharges magic all
+over everything. You turn into a toad, the room fills with a fetid smell,
+and all sorts of other grubby things happen. Then the wand explodes!">)
+ (T
+ <TELL
+"A lot you know about magic! A magic wand takes a while to recharge
+after use! You might cause it to short-circuit!" CR>)>
+ <RTRUE>)
+ (<VERB? WAVE>
+ <COND (<AND <EQUAL? ,PRSO ,WAND> ,PRSI>
+ <SETG WAND-ON ,PRSI>
+ <SETG WAND-ON-LOC ,HERE>)
+ (T <TELL "At what?" CR> <RTRUE>)>)
+ (<VERB? RUB>
+ <COND (<AND <EQUAL? ,PRSI ,WAND> ,PRSO>
+ <SETG WAND-ON ,PRSO>)
+ (T <TELL "Touch what?" CR> <RTRUE>)>)
+ (<VERB? RAISE>
+ <TELL "The wand grows warm and seems to vibrate." CR>
+ <RTRUE>)>
+ <COND (,WAND-ON
+ <SETG SPELL-USED <>>
+ <SETG SPELL-VICTIM <>>
+ <COND (<EQUAL? ,WAND-ON ,ME ,WAND>
+ <SETG WAND-ON <>>
+ <TELL
+"Fortunately a safety interlock prevents the fatal feedback loop that
+this would cause." CR>)
+ (T
+ <TELL
+"The wand grows warm, the " D ,WAND-ON " seems to glow dimly with
+magical essences, and you feel suffused with power." CR>)>
+ <ENABLE <QUEUE I-WAND 2>>)>
+ T)>>
+
+<GLOBAL WAND-ON-LOC <>>
+
+<ROUTINE I-WAND ()
+ <COND (<AND ,WAND-ON
+ <OR <EQUAL? ,WAND-ON-LOC ,HERE>
+ <IN? ,WAND-ON ,WINNER>>>
+ <TELL
+"The " D ,WAND-ON " stops glowing and the power within you weakens." CR>
+ <SETG WAND-ON <>>
+ <RTRUE>)
+ (T
+ <SETG WAND-ON <>>
+ <RFALSE>)>>
+
+<ROUTINE WIZARD-QUARTERS-FCN (RARG "AUX" PICK L)
+ <COND (<EQUAL? .RARG ,M-LOOK ,M-FLASH>
+ <TELL
+"This is where the Wizard of Frobozz lives. The room is ">
+ <SET L <GET ,WIZQDESCS 0>>
+ <SET PICK <RANDOM .L>>
+ <COND (<EQUAL? .PICK ,WIZQLAST>
+ <COND (<EQUAL? .PICK .L>
+ <SET PICK <- .PICK 1>>)
+ (T
+ <SET PICK <+ .PICK 1>>)>)>
+ <SETG WIZQLAST .PICK>
+ <TELL <GET ,WIZQDESCS .PICK> CR>)>>
+
+<GLOBAL WIZQLAST 0>
+
+<GLOBAL WIZQDESCS
+ <LTABLE
+"sparsely furnished and almost monkish in its austerity."
+"an opulently furnished seraglio out of an Arabian folktale."
+"decorated in the Louis XIV style."
+"overhung with palm-trees and lianas. The only furniture is a hammock."
+"constructed of delicate and wispy cloud-stuffs."
+"furnished in plastic and metal and looks like the control deck of a
+spaceship."
+"a suburban bedroom out of the 1950's, complete with bunk beds."
+"a dank and dimly lighted cave, its floor piled with furs and old bones.">>
+
+<ROUTINE BRIDGE-FCN ()
+ <COND (<VERB? CROSS>
+ <DO-WALK ,P?CROSS>)
+ (<VERB? LEAP>
+ <JIGS-UP
+"You execute a perfect swan-dive into the depths below.">)>>
+
+;"misc. routines"
+
+<ROUTINE STREAM-FCN ()
+ <COND (<VERB? SWIM THROUGH>
+ <TELL "You can't swim in the stream." CR>)
+ (<VERB? CROSS>
+ <TELL "You'll have to find a ford or a bridge." CR>)>>
+
+<ROUTINE CHASM-FCN ()
+ <COND (<OR <VERB? LEAP>
+ <AND <VERB? PUT> <EQUAL? ,PRSO ,ME>>>
+ <TELL
+"For a change, you look before leaping. You realize you would
+never survive." CR>)
+ (<VERB? CROSS>
+ <TELL "You'll have to find a bridge." CR>)
+ (<AND <VERB? PUT> <EQUAL? ,PRSI ,PSEUDO-OBJECT>>
+ <TELL
+"The " D ,PRSO " drops out of sight into the chasm." CR>
+ <REMOVE ,PRSO>)>>
+
+<ROUTINE TUNNEL-OBJECT ()
+ <COND (<AND <VERB? THROUGH> <GETPT ,HERE ,P?IN>>
+ <DO-WALK ,P?IN> <RTRUE>)
+ (T <PATH-OBJECT>)>>
+
+<ROUTINE STALA-PSEUDO ()
+ <COND (<VERB? TAKE MUNG>
+ <TELL
+"The only ones you can reach are too large to successfully break off." CR>)>>
+
+<ROUTINE MOSS-FCN ()
+ <COND (<VERB? TAKE RUB>
+ <TELL
+"Some of the moss rubs off on you, but it stops glowing very quickly
+once plucked from its environment." CR>)>>
+
+<ROUTINE ROSE-BUSH-FCN ()
+ <COND (<VERB? TAKE>
+ <TELL
+"You prick your finger trying to take a rose, and jump back annoyed.
+The rose almost seemed to move its thorns into your path." CR>)>>
+
+<ROUTINE I-SPELL ()
+ <COND (<AND <NOT ,SPELL-HANDLED?> ,SPELL-VICTIM>
+ <PERFORM ,V?DISENCHANT ,SPELL-VICTIM>)>
+ <SETG SPELL-HANDLED? <>>
+ <SETG WAND-ON <>>
+ <SETG SPELL-USED <>>
+ <SETG SPELL-VICTIM <>>>
+
+<GLOBAL FANTASIES
+ <LTABLE "pile of jewels" "gold ingot" "basilisk"
+ "bulging chest" "yellow sphere" "grue"
+ "convention of wizards" "copy of ZORK I">>
+
+^/L
+
+;"special-cased routines"
+
+<ROUTINE V-DIAGNOSE ()
+ <COND (,DEAD <TELL "You are dead.">)
+ (<EQUAL? ,SPELL? ,S-FERMENT>
+ <TELL "You are drunk.">)
+ (<EQUAL? ,SPELL? ,S-FEEBLE>
+ <TELL "You seem unusually weak right now.">)
+ (<EQUAL? ,SPELL? ,S-FLOAT>
+ <TELL "You seem somewhat light.">)
+ (<EQUAL? ,SPELL? ,S-FREEZE>
+ <TELL "You are frozen stiff.">)
+ (ELSE <TELL "You are in perfect health.">)>
+ <CRLF>
+ <COND (<NOT <0? ,DEATHS>>
+ <TELL "You have been killed ">
+ <COND (<1? ,DEATHS> <TELL "once.">)
+ (<EQUAL? ,DEATHS 2> <TELL "twice.">)
+ (T <TELL "an awful lot.">)>
+ <CRLF>)>>
+
+<ROUTINE V-SCORE ("OPTIONAL" (ASK? T))
+ #DECL ((ASK?) <OR ATOM FALSE>)
+ <TELL "Your score ">
+ <COND (.ASK? <TELL "would be ">) (ELSE <TELL "is ">)>
+ <TELL N ,SCORE>
+ <TELL " (total of 400 points), in ">
+ <TELL N ,MOVES>
+ <COND (<1? ,MOVES> <TELL " move.">) (ELSE <TELL " moves.">)>
+ <CRLF>
+ <TELL "This score gives you the rank of ">
+ <COND (<EQUAL? ,SCORE 400> <TELL "Master Adventurer">
+ <COND (<NOT ,WON-FLAG>
+ <TELL ", but somehow you don't feel done">)>)
+ (<G? ,SCORE 360> <TELL "Wizard">)
+ (<G? ,SCORE 320> <TELL "Master">)
+ (<G? ,SCORE 240> <TELL "Adventurer">)
+ (<G? ,SCORE 160> <TELL "Junior Adventurer">)
+ (<G? ,SCORE 80> <TELL "Novice Adventurer">)
+ (<G? ,SCORE 40> <TELL "Amateur Adventurer">)
+ (T <TELL "Beginner">)>
+ <TELL "." CR>
+ ,SCORE>
+
+<ROUTINE JIGS-UP (DESC "OPTIONAL" (PLAYER? <>))
+ #DECL ((DESC) STRING (PLAYER?) <OR ATOM FALSE>)
+ <TELL .DESC CR>
+ <COND (<NOT <EQUAL? ,ADVENTURER ,WINNER>>
+ <TELL "
+| **** The " D ,WINNER " has died ****
+|
+|">
+ <REMOVE ,WINNER>
+ <SETG WINNER ,ADVENTURER>
+ <SETG HERE <LOC ,WINNER>>
+ <RFATAL>)>
+ <PROG ()
+ <SCORE-UPD -10>
+ <TELL "
+| **** You have died ****
+|
+|">
+ <SETG DEAD T>
+ <SETG SPELL? <>>
+ <PUTP ,ADVENTURER ,P?ACTION 0>
+ <SETG DEATHS <+ ,DEATHS 1>>
+ <MOVE ,WINNER ,HERE>
+ <TELL
+"Now, let's take a look here...
+Well, you probably deserve another chance. I can't quite fix you
+up completely, but you can't have everything." CR CR>
+ <FCLEAR ,DEAD-PALANTIR-1 ,TOUCHBIT>
+ <FCLEAR ,DEAD-PALANTIR-2 ,TOUCHBIT>
+ <FCLEAR ,DEAD-PALANTIR-3 ,TOUCHBIT>
+ <RANDOMIZE-OBJECTS>
+ <GOTO ,DEAD-PALANTIR-1>
+ <SETG P-CONT <>>
+ <KILL-INTERRUPTS>
+ <RFATAL>>>
+
+<ROUTINE RANDOMIZE-OBJECTS ("AUX" (R <>) F N L)
+ <COND (<IN? ,LAMP ,WINNER>
+ <MOVE ,LAMP ,INSIDE-BARROW>)>
+ <PUTP ,SWORD ,P?VALUE 0>
+ <SET N <FIRST? ,WINNER>>
+ <REPEAT ()
+ <SET F .N>
+ <COND (<NOT .F> <RETURN>)>
+ <SET N <NEXT? .F>>
+ <COND (<AND <EQUAL? .F ,BILLS ,PORTRAIT>
+ <OR <EQUAL? ,HERE ,VAULT ,DEPOSITORY ,OFFICE>
+ <EQUAL? ,HERE ,SMALL-ROOM>>>
+ <MOVE .F ,HERE>)
+ (<OR <EQUAL? .F ,GOLD-KEY>
+ <EQUAL? .F ,CANDY>
+ <EQUAL? .F ,PALANTIR-1>
+ <EQUAL? .F ,PALANTIR-2>
+ <EQUAL? .F ,PALANTIR-3>>
+ <MOVE .F ,CAROUSEL-ROOM>)
+ (<FSET? .F ,STAGGERED>
+ <MOVE .F ,WIZARD-CASE>)
+ (ELSE
+ <MOVE .F ,GAZEBO-ROOM>)>>>
+
+<ROUTINE KILL-INTERRUPTS ()
+ <DISABLE <INT I-GNOME>>
+ <DISABLE <INT I-LEDGE>>
+ <DISABLE <INT I-NERVOUS>>
+ <DISABLE <INT I-ZGNOME-OUT>>
+ <DISABLE <INT I-ZGNOME>>
+ <DRAGON-LEAVES>
+ <DISABLE <INT I-MATCH>>
+ <RTRUE>>
+
+<ROUTINE FIND-WEAPON (O "AUX" W)
+ <SET W <FIRST? .O>>
+ <COND (<NOT .W>
+ <RFALSE>)>
+ <REPEAT ()
+ <COND (<EQUAL? .W ,SWORD>
+ <RETURN .W>)
+ (<NOT <SET W <NEXT? .W>>> <RFALSE>)>>>
+
+<ROUTINE BUCKET-CONT ()
+ <COND (<AND <VERB? TAKE> <NOT <IN? ,WINNER ,BUCKET>>>
+ <TELL "You'll need to get in the bucket to reach it." CR>)>> \ No newline at end of file
diff --git a/2dungeon.zil b/2dungeon.zil
new file mode 100644
index 0000000..5eda480
--- /dev/null
+++ b/2dungeon.zil
@@ -0,0 +1,2721 @@
+"2DUNGEON for
+ Zork II: The Wizard of Frobozz
+ (c) Copyright 1981, 1983 Infocom, Inc. All Rights Reserved."
+
+<DIRECTIONS NORTH EAST WEST SOUTH NE NW SE SW UP DOWN IN OUT LAND CROSS>
+
+<ROUTINE GO ()
+;"put interrupts on clock chain"
+ <ENABLE <QUEUE I-WIZARD 4>>
+ <QUEUE I-LANTERN 200>
+;"clean up junk compiler can't do"
+ <PUTP ,BALLOON ,P?VTYPE ,NONLANDBIT>
+ <PUTP ,BUCKET ,P?VTYPE ,NONLANDBIT>
+ <PUTP ,SEWL ,P?SIZE ,P?EAST>
+ <PUTP ,SWWL ,P?SIZE ,P?WEST>
+ <PUTP ,SSWL ,P?SIZE ,P?SOUTH>
+ <PUTP ,SNWL ,P?SIZE ,P?NORTH>
+;"set up and go"
+ <SETG LIT T>
+ <SETG WINNER ,ADVENTURER>
+ <SETG PLAYER ,ADVENTURER>
+ <SETG HERE ,INSIDE-BARROW>
+ <SETG P-IT-LOC ,HERE>
+ <SETG P-IT-OBJECT <>>
+ <COND (<NOT <FSET? ,HERE ,TOUCHBIT>>
+ <V-VERSION>
+ <CRLF>)>
+ <MOVE ,WINNER ,HERE>
+ <V-LOOK>
+ <MAIN-LOOP>
+ <AGAIN>>
+
+"SUBTITLE CONDITIONAL EXITS"
+
+<GLOBAL SECRET-DOOR <>>
+<GLOBAL GNOME-DOOR-FLAG <>>
+
+"SUBTITLE GLOBAL OBJECTS"
+
+<OBJECT STREAM
+ (IN LOCAL-GLOBALS)
+ (SYNONYM STREAM)
+ (ADJECTIVE FLOWING SMALL)
+ (DESC "stream")
+ (ACTION STREAM-FCN)
+ (FLAGS NDESCBIT)>
+
+<OBJECT CHASM
+ (IN LOCAL-GLOBALS)
+ (SYNONYM CHASM RAVINE)
+ (ADJECTIVE DEEP)
+ (DESC "chasm")
+ (ACTION CHASM-FCN)
+ (FLAGS NDESCBIT)>
+
+<OBJECT MOSS
+ (IN LOCAL-GLOBALS)
+ (SYNONYM MOSS MOSSES)
+ (ADJECTIVE GLOWING PHOSPHORESCENT)
+ (DESC "mosses")
+ (ACTION MOSS-FCN)
+ (FLAGS NDESCBIT TRYTAKEBIT)>
+
+<OBJECT ROSE-BUSH
+ (IN LOCAL-GLOBALS)
+ (SYNONYM ROSES BUSH ARBOR)
+ (ADJECTIVE ROSE)
+ (DESC "roses")
+ (ACTION ROSE-BUSH-FCN)
+ (FLAGS NDESCBIT TRYTAKEBIT)>
+
+<OBJECT BRIDGE
+ (IN LOCAL-GLOBALS)
+ (SYNONYM BRIDGE)
+ (ADJECTIVE STONE WOODEN RICKETY)
+ (DESC "bridge")
+ (ACTION BRIDGE-FCN)
+ (FLAGS NDESCBIT)>
+
+<OBJECT TUNNEL
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM PASSAGE TUNNEL CRAWLWAY)
+ (ADJECTIVE DARK SMOKY)
+ (DESC "tunnel")
+ (FLAGS NDESCBIT)
+ (ACTION TUNNEL-OBJECT)>
+
+<OBJECT EAST-WALL
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM WALL)
+ (ADJECTIVE EAST EASTERN)
+ (DESC "east wall")
+ (FLAGS NDESCBIT)>
+
+<OBJECT SOUTH-WALL
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM WALL)
+ (ADJECTIVE SOUTH SOUTHE) ;"only 6 chars count and southeast exists"
+ (DESC "south wall")
+ (FLAGS NDESCBIT)>
+
+<OBJECT WEST-WALL
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM WALL)
+ (ADJECTIVE WEST WESTERN)
+ (DESC "west wall")
+ (FLAGS NDESCBIT)>
+
+<OBJECT NORTH-WALL
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM WALL)
+ (ADJECTIVE NORTH NORTHE) ;"only six chars used..."
+ (DESC "north wall")
+ (FLAGS NDESCBIT)>
+
+<OBJECT GLOBAL-WATER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM WATER QUANTITY)
+ (DESC "water")
+ (FLAGS DRINKBIT)
+ (ACTION WATER-FCN)>
+
+<OBJECT WISH
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM WISH BLESS)
+ (DESC "wish")
+ (FLAGS NDESCBIT)
+ (ACTION WISH-FCN)>
+
+<OBJECT WELL
+ (IN LOCAL-GLOBALS)
+ (SYNONYM WELL)
+ (ADJECTIVE MAGIC)
+ (DESC "well")
+ (FLAGS NDESCBIT)
+ (ACTION WELL-FCN)>
+
+<OBJECT SEWL
+ (IN LOCAL-GLOBALS)
+ (SYNONYM WALL)
+ (ADJECTIVE EAST EASTERN)
+ (DESC "east wall")
+ (FLAGS NDESCBIT)
+ (SIZE 0) ;",P?EAST"
+ (ACTION SCOLWALL)>
+
+<OBJECT SWWL
+ (IN LOCAL-GLOBALS)
+ (SYNONYM WALL)
+ (ADJECTIVE WEST WESTERN)
+ (DESC "west wall")
+ (FLAGS NDESCBIT)
+ (SIZE 0) ;"P?WEST"
+ (ACTION SCOLWALL)>
+
+<OBJECT SSWL
+ (IN LOCAL-GLOBALS)
+ (SYNONYM WALL)
+ (ADJECTIVE SOUTH SOUTHE)
+ (DESC "south wall")
+ (FLAGS NDESCBIT)
+ (SIZE 0) ;"P?SOUTH"
+ (ACTION SCOLWALL)>
+
+<OBJECT SNWL
+ (IN LOCAL-GLOBALS)
+ (SYNONYM WALL)
+ (ADJECTIVE NORTH NORTHE)
+ (DESC "north wall")
+ (FLAGS NDESCBIT)
+ (SIZE 0) ;"P?NORTH"
+ (ACTION SCOLWALL)>
+
+\
+
+"SUBTITLE ROOMS"
+
+<ROOM INSIDE-BARROW
+ (IN ROOMS)
+ (LDESC
+"You are inside an ancient barrow hidden deep within a dark forest.
+The barrow opens into a narrow tunnel at its southern end. You can
+see a faint glow at the far end.")
+ (DESC "Inside the Barrow")
+ (FLAGS RLANDBIT ONBIT)
+ (SOUTH TO NARROW-TUNNEL)
+ (OUT
+"You may not recall, but when you entered, the door of the barrow
+shut behind you. There is no way out.")>
+
+<ROOM NARROW-TUNNEL
+ (IN ROOMS)
+ (LDESC
+"You are standing at the southern end of a narrow tunnel where it opens
+into a wide cavern. The cavern is dimly illuminated by phosphorescent
+mosses clinging to its high ceiling. A deep ravine winds through the
+cavern, with a small stream at the bottom. The walls of the ravine are
+steep and crumbly. A foot bridge crosses the ravine to the south.")
+ (DESC "Narrow Tunnel")
+ (FLAGS RLANDBIT ONBIT)
+ (NORTH TO INSIDE-BARROW)
+ (SOUTH TO FOOT-BRIDGE)
+ (CROSS TO FOOT-BRIDGE)
+ (DOWN "As you start down, you slip on the crumbling
+rocks and pull back, narrowly averting a fatal fall.")
+ (GLOBAL BRIDGE CHASM STREAM MOSS)>
+
+<ROOM FOOT-BRIDGE
+ (IN ROOMS)
+ (LDESC
+"You are standing on a crude but sturdy wooden foot bridge crossing a
+deep ravine. The path runs north and south from here.")
+ (DESC "Foot Bridge")
+ (FLAGS RLANDBIT ONBIT)
+ (NORTH TO NARROW-TUNNEL)
+ (SOUTH TO GREAT-CAVERN)
+ (DOWN "The drop would be fatal.")
+ (CROSS "You'll have to specify a direction.")
+ (GLOBAL BRIDGE CHASM)>
+
+<ROOM GREAT-CAVERN
+ (IN ROOMS)
+ (LDESC
+"This is the center of the great cavern, carved out of the limestone.
+Stalactites and stalagmites of many sizes are everywhere. The room glows
+with dim light provided by phosphorescent moss, and weird shadows move all
+around you. A narrow path winds southwest among the stalagmites, and another
+leads northeast.")
+ (DESC "Great Cavern")
+ (FLAGS RLANDBIT ONBIT)
+ (NE TO FOOT-BRIDGE)
+ (SW TO SHALLOW-FORD)
+ (GLOBAL MOSS)
+ (PSEUDO "STALAGMITE" STALA-PSEUDO "STALACTITE" STALA-PSEUDO)>
+
+<ROOM SHALLOW-FORD
+ (IN ROOMS)
+ (LDESC
+"You are at the southern edge of a great cavern. To the south across a
+shallow ford is a dark tunnel which looks like it was once
+enlarged and smoothed. To the north a narrow path winds among
+stalagmites. Dim light illuminates the cavern.")
+ (DESC "Shallow Ford")
+ (FLAGS RLANDBIT ONBIT)
+ (NORTH TO GREAT-CAVERN)
+ (SOUTH TO DARK-TUNNEL)
+ (CROSS TO DARK-TUNNEL)
+ (GLOBAL GLOBAL-WATER)>
+
+<ROOM DARK-TUNNEL
+ (IN ROOMS)
+ (LDESC
+"This is a dark tunnel with dim light to the northeast. The
+tunnel is smooth but dusty and filled with twigs and leaves, debris
+which becomes deeper as the tunnel branches into a wide corridor leading
+southwest and a narrower one leading southeast.")
+ (DESC "Dark Tunnel")
+ (FLAGS RLANDBIT)
+ (NE TO SHALLOW-FORD)
+ (SE TO GARDEN-NORTH)
+ (SW TO STREAM-PATH)>
+
+"SUBTITLE GARDEN AREA"
+
+<OBJECT GLOBAL-UNICORN
+ (IN LOCAL-GLOBALS)
+ (SYNONYM UNICORN)
+ (DESC "unicorn")
+ (ADJECTIVE BEAUTIFUL WHITE)
+ (FLAGS ACTORBIT)
+ (ACTION GLOBAL-UNICORN-FCN)>
+
+<OBJECT UNICORN
+ (SYNONYM UNICORN ANIMAL)
+ (ADJECTIVE BEAUTIFUL WHITE)
+ (DESC "unicorn")
+ (LDESC "There is a beautiful unicorn here cropping grass.")
+ (FLAGS ACTORBIT TRYTAKEBIT OPENBIT CONTBIT)
+ (ACTION UNICORN-FCN)>
+
+<ROOM GARDEN-NORTH
+ (IN ROOMS)
+ (LDESC
+"This is the northern end of a formal garden. Hedges hide
+the cavern walls, and if you don't look up, the illusion is of a cloudy
+day outside. The light comes from a large growth of glowing mosses on the
+roof of the cave. A break in the hedge is almost overgrown to the north.
+A carefully manicured path leads south. In the center of a rosebed is a
+small open structure, painted white. It appears to be a gazebo.")
+ (DESC "North End of Garden")
+ (FLAGS RLANDBIT ONBIT)
+ (IN TO GAZEBO-ROOM)
+ (NORTH TO DARK-TUNNEL)
+ (SOUTH TO FORMAL-GARDEN)
+ (ACTION GARDEN-ROOM-FCN)
+ (GLOBAL GLOBAL-UNICORN GAZEBO MOSS ROSE-BUSH)>
+
+<ROOM GAZEBO-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is a gazebo in the midst of a formal garden. It is cool and
+restful here. A tea table adorns the center of the gazebo.")
+ (DESC "Gazebo")
+ (FLAGS RLANDBIT ONBIT)
+ (OUT TO GARDEN-NORTH)
+ (GLOBAL GLOBAL-UNICORN GAZEBO)>
+
+<ROOM FORMAL-GARDEN
+ (IN ROOMS)
+ (LDESC
+"This is the middle part of a formal garden. Hedges hide the cavern
+walls and a dim illumination comes from mosses far above.
+The path is of small crushed white stones. It winds among bushes and
+flower beds from south to north. To the north a small structure
+can be seen. To the south are peculiarly shaped bushes.
+There is a small gap in the hedges to the west.")
+ (DESC "Formal Garden")
+ (FLAGS RLANDBIT ONBIT)
+ (WEST TO STREAM-PATH)
+ (NORTH TO GARDEN-NORTH)
+ (SOUTH TO TOPIARY-ROOM)
+ (ACTION GARDEN-ROOM-FCN)
+ (GLOBAL GLOBAL-UNICORN MOSS)>
+
+<ROOM TOPIARY-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is the southern end of a formal garden. Hedges hide the cavern
+walls and mosses provide dim illumination. Fantastically shaped hedges
+and bushes are arrayed with geometric precision. They have not recently
+been clipped, but you can discern creatures in the shapes of the bushes:
+There is a dragon, a unicorn, a great serpent, a huge misshapen dog, and
+several human figures. On the west side of the garden the path
+leads through a rose arbor into a tunnel.")
+ (DESC "Topiary")
+ (FLAGS RLANDBIT ONBIT)
+ (WEST TO CAROUSEL-ROOM)
+ (NORTH TO FORMAL-GARDEN)
+ (ACTION GARDEN-ROOM-FCN)
+ (GLOBAL GLOBAL-UNICORN MOSS ROSE-BUSH)>
+
+<OBJECT HEDGES
+ (IN TOPIARY-ROOM)
+ (DESC "hedge")
+ (SYNONYM HEDGE HEDGES)
+ (FLAGS NDESCBIT)
+ (ACTION HEDGES-F)>
+
+<ROUTINE HEDGES-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The hedges are shaped like various animals: dogs, serpents, dragons, and
+the like, and they are vaguely troubling to look at." CR>)>>
+
+<ROOM STREAM-PATH
+ (IN ROOMS)
+ (LDESC
+"The path follows the south edge of a deep ravine and heads northeast.
+A tunnel heads southwest, narrowing to a rather tight crawl. A
+faint whirring sound can be heard in that direction. On the east is a
+ruined archway choked with vegetation.")
+ (DESC "Path Near Stream")
+ (FLAGS RLANDBIT)
+ (EAST TO FORMAL-GARDEN)
+ (NE TO DARK-TUNNEL)
+ (SW TO CAROUSEL-ROOM)
+ (WEST TO MARBLE-HALL IF SECRET-DOOR)
+ (DOWN "The ravine is extremely deep. You would never make it.")
+ (GLOBAL BRIDGE CHASM STREAM)>
+
+<ROOM MARBLE-HALL
+ (IN ROOMS)
+ (LDESC
+"This is an arched hall of fine marble. The hall stops abruptly
+to the north at a ford across a stream, where the marble is cracked and
+broken. Perhaps a flood or collapse of the cave was responsible. To
+the south the hall opens into a large room. There is rather annoying
+whirring sound coming from that room.")
+ (DESC "Marble Hall")
+ (FLAGS RLANDBIT)
+ (EAST TO STREAM-PATH IF SECRET-DOOR ELSE "That's a wall there.")
+ (NORTH TO DEEP-FORD)
+ (SOUTH TO CAROUSEL-ROOM)
+ (GLOBAL STREAM)>
+
+<ROOM DEEP-FORD
+ (IN ROOMS)
+ (LDESC
+"You are fording the stream at a deep but not impossible spot. The
+water is very cold. The walls of the ravine rise to east and west.
+There is a small ledge along the north wall of the ravine. To the south
+is the entrance to a well-constructed but somewhat ruined hall.")
+ (DESC "Deep Ford")
+ (FLAGS RLANDBIT)
+ (NORTH TO RAVINE-LEDGE)
+ (UP TO RAVINE-LEDGE)
+ (SOUTH TO MARBLE-HALL)
+ (EAST
+"The stream deepens rapidly, and you wisely return before drowning.")
+ (WEST
+"You notice that the ledge above would be a drier route west.")
+ (GLOBAL GLOBAL-WATER CHASM STREAM)>
+
+<ROOM RAVINE-LEDGE
+ (IN ROOMS)
+ (LDESC
+"You are on a narrow ledge near the bottom of a deep ravine. The ledge
+continues to the west. A precarious climb up to another tiny ledge is
+possible. A short scramble down the rock face leads
+to a stream.")
+ (DESC "Ledge in Ravine")
+ (FLAGS RLANDBIT)
+ (UP TO TINY-ROOM)
+ (SOUTH TO DEEP-FORD)
+ (WEST TO LEDGE-TUNNEL)
+ (DOWN TO DEEP-FORD)
+ (GLOBAL CHASM)>
+
+<ROOM LEDGE-TUNNEL
+ (IN ROOMS)
+ (LDESC
+"A ledge from the east ends here, and a tunnel leads north into the wall.
+There is a rather odd smokey odor in the warm air of the tunnel.")
+ (DESC "End of Ledge")
+ (FLAGS RLANDBIT)
+ (EAST TO RAVINE-LEDGE)
+ (IN TO DRAGON-ROOM)
+ (NORTH TO DRAGON-ROOM)
+ (DOWN "There are a lot of sharp rocks down there.")>
+
+<ROOM DRAGON-ROOM
+ (IN ROOMS)
+ (LDESC
+"The room is a large cavern full of broken stone. The walls are
+scorched and there are deep scratches on the floor. A sooty dry smell
+is very strong here. A paved path winds from a large passage to the
+west, through the room, and across a huge stone bridge
+to the south. To the east a small crack is visible. A dark and
+smokey tunnel leads north.")
+ (DESC "Dragon Room")
+ (FLAGS RLANDBIT)
+ (EAST TO LEDGE-TUNNEL)
+ (NORTH TO DRAGON-LAIR
+ IF ICE-MELTED ELSE "The dragon hisses at you and blocks your way.")
+ (IN TO DRAGON-LAIR
+ IF ICE-MELTED ELSE "The dragon hisses at you and blocks your way.")
+ (WEST TO FRESCO-ROOM)
+ (SOUTH TO STONE-BRIDGE)
+ (CROSS TO STONE-BRIDGE)
+ (GLOBAL BRIDGE)>
+
+<ROOM DRAGON-LAIR
+ (IN ROOMS)
+ (LDESC
+"You are in the dragon's lair, where the rock walls are scarred by flame.
+A blackened doorway leads to the south.")
+ (DESC "Dragon's Lair")
+ (FLAGS RLANDBIT)
+ (SOUTH TO DRAGON-ROOM)
+ (OUT TO DRAGON-ROOM)>
+
+<OBJECT CHEST
+ (IN DRAGON-LAIR)
+ (SYNONYM CHEST TRUNK)
+ (ADJECTIVE WOODEN OLD ROTTEN)
+ (DESC "rotten wooden chest")
+ (FDESC
+"A rotten old wooden chest is in one corner among the debris.")
+ (FLAGS CONTBIT TAKEBIT)
+ (ACTION CHEST-FCN)
+ (CAPACITY 40)
+ (SIZE 40)>
+
+<OBJECT STATUETTE
+ (IN CHEST)
+ (SYNONYM TREASURE STATUETTE DRAGON)
+ (ADJECTIVE GOLD)
+ (DESC "golden dragon statuette")
+ (FDESC
+"Nestled in the chest is a wrought gold statuette of a dragon.")
+ (FLAGS STAGGERED TAKEBIT)
+ (VALUE 20)>
+
+<OBJECT DRAGON
+ (IN DRAGON-ROOM)
+ (SYNONYM DRAGON SMAUG WORM)
+ (ADJECTIVE RED HUGE)
+ (DESC "huge red dragon")
+ (LDESC
+"A huge red dragon is lying on the rocks here, watching.")
+ (FDESC
+"A huge red dragon is lying here, blocking the entrance to a tunnel
+leading north. Smoke curls from his nostrils and out between his
+teeth.")
+ (FLAGS ACTORBIT)
+ (ACTION DRAGON-FCN)>
+
+<OBJECT DEAD-DRAGON
+ (SYNONYM DRAGON SMAUG WORM)
+ (ADJECTIVE RED HUGE DEAD)
+ (DESC "huge dead dragon")
+ (LDESC
+"A huge dead dragon is lying half blocking the stream.")
+ (SIZE 400)>
+
+<OBJECT GLOBAL-PRINCESS
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM PRINCESS WOMAN LADY)
+ (ADJECTIVE BEAUTIFUL YOUNG)
+ (DESC "beautiful princess")
+ (FLAGS ACTORBIT)
+ (ACTION PRINCESS-FCN)>
+
+<OBJECT PRINCESS
+ (IN DRAGON-LAIR)
+ (SYNONYM PRINCESS WOMAN LADY)
+ (ADJECTIVE BEAUTIFUL YOUNG)
+ (DESC "beautiful princess")
+ (LDESC
+"A beautiful young woman, wearing a dirty and bedraggled gown, sits
+on a rock in the corner. Her hair is unkempt and she is oblivious to
+your presence, almost in a trance.")
+ (FLAGS ACTORBIT)
+ (ACTION PRINCESS-FCN)>
+
+<ROOM FRESCO-ROOM
+ (IN ROOMS)
+ (LDESC
+"A path leads east-west through a room decorated with beautiful frescoes
+of someone battling dragons and rescuing fair maidens. It is hard
+to tell who is doing this as those parts of the
+frescoes have been blackened and cracked by intense heat.")
+ (DESC "Fresco Room")
+ (FLAGS RLANDBIT)
+ (EAST TO DRAGON-ROOM)
+ (WEST TO BANK-ENTRANCE)>
+
+<ROOM STONE-BRIDGE
+ (IN ROOMS)
+ (LDESC
+"This is the middle of a ruined but still impressive stone bridge
+spanning a deep chasm. Water flows far beneath. A paved path leads
+north into a large open space. To the south, the path leads into a misty
+tunnel.")
+ (DESC "Stone Bridge")
+ (FLAGS RLANDBIT)
+ (NORTH TO DRAGON-ROOM)
+ (SOUTH TO COOL-ROOM)
+ (DOWN "It's a long way down.")
+ (CROSS "You'll have to specify a direction.")
+ (GLOBAL BRIDGE CHASM)>
+
+<ROOM COOL-ROOM
+ (IN ROOMS)
+ (LDESC
+"The room is cool and damp. The air is misty. A twisty path from the
+southeast splits here toward a wide northerly stone bridge, and a narrow
+westerly tunnel. It is from the latter
+that the mist and chill seem to originate.")
+ (DESC "Cool Room")
+ (FLAGS RLANDBIT)
+ (SE TO CAROUSEL-ROOM)
+ (NORTH TO STONE-BRIDGE)
+ (WEST TO GLACIER-ROOM)
+ (CROSS TO STONE-BRIDGE)
+ (GLOBAL BRIDGE)>
+
+<ROOM GLACIER-ROOM
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Ice Room")
+ (FLAGS RLANDBIT)
+ (EAST TO COOL-ROOM)
+ (WEST TO LAVA-ROOM
+ IF ICE-MELTED ELSE "You don't even have an ice-pick.")
+ (UP TO LAVA-TUBE)
+ (ACTION GLACIER-ROOM-FCN)>
+
+<ROOM LAVA-TUBE
+ (IN ROOMS)
+ (LDESC
+"You are in a tight chimney of solidified lava. It extends up at
+least another hundred feet and down to a large room far below. A large
+crack opens to the south, probably the result of a shift
+in the rock strata.")
+ (DESC "Lava Tube")
+ (FLAGS RLANDBIT)
+ (DOWN TO GLACIER-ROOM)
+ (UP TO VOLCANO-VIEW)
+ (SOUTH TO COBWEBBY-CORRIDOR)
+ (PSEUDO "CRACK" LT-CRACK-PSEUDO)>
+
+<ROUTINE LT-CRACK-PSEUDO ()
+ <COND (<VERB? BOARD THROUGH>
+ <DO-WALK ,P?SOUTH>
+ <RTRUE>)
+ (T <CC-CRACK-PSEUDO>)>>
+
+<ROOM COBWEBBY-CORRIDOR
+ (IN ROOMS)
+ (LDESC
+"A winding corridor is filled with cobwebs. Some
+are broken and the dust on the floor is disturbed. The trend of the
+twists and turns is northeast to southwest. On the north side of one
+twist, high up, is a narrow crack.")
+ (DESC "Cobwebby Corridor")
+ (FLAGS RLANDBIT)
+ (IN TO LAVA-TUBE)
+ (UP TO LAVA-TUBE)
+ (NORTH TO LAVA-TUBE)
+ (NE TO CAROUSEL-ROOM)
+ (SW TO GUARDIAN-ROOM)
+ (DOWN TO GUARDIAN-ROOM)
+ (PSEUDO "CRACK" CC-CRACK-PSEUDO)>
+
+<ROUTINE CC-CRACK-PSEUDO ()
+ <COND (<VERB? THROUGH BOARD>
+ <DO-WALK ,P?NORTH>
+ <RTRUE>)
+ (T
+ <TELL
+"The crack is fairly wide. You should be able to get into it." CR>)>>
+
+<OBJECT WIZ-DOOR
+ (IN LOCAL-GLOBALS)
+ (SYNONYM DOOR)
+ (ADJECTIVE COBWEBBED WOODEN OAK)
+ (DESC "door partly covered in cobwebs")
+ (FLAGS DOORBIT CONTBIT)
+ (ACTION WIZ-DOOR-FCN)>
+
+<ROOM ROOM-8
+ (IN ROOMS)
+ (LDESC
+"This is a small chamber carved out of the rock at the end of a short crawl.
+On the wall is crudely chiseled the number \"8\".")
+ (DESC "Room 8")
+ (FLAGS RLANDBIT)
+ (EAST TO CAROUSEL-ROOM)>
+
+<ROOM MENHIR-ROOM
+ (IN ROOMS)
+ (DESC "Menhir Room")
+ (LDESC " ")
+ (FLAGS RLANDBIT)
+ (NORTH TO CAROUSEL-ROOM)
+ (SW TO KENNEL
+ IF MENHIR-POSITION
+ ELSE "You are trying to walk through an enormous rock.")
+ (SOUTH TO STAIRWAY-TOP)
+ (ACTION MENHIR-ROOM-FCN)
+ (GLOBAL MENHIR)>
+
+<OBJECT GLOBAL-MENHIR
+ (IN LOCAL-GLOBALS)
+ (SYNONYM MENHIR ROCK STONE)
+ (ADJECTIVE HUGE HEAVY ENORMOUS)
+ (FLAGS NDESCBIT READBIT)
+ (DESC "enormous menhir")>
+
+<OBJECT MENHIR
+ (IN LOCAL-GLOBALS)
+ (SYNONYM MENHIR ROCK STONE)
+ (ADJECTIVE HUGE HEAVY ENORMOUS)
+ (FLAGS NDESCBIT READBIT TURNBIT)
+ (DESC "enormous menhir")
+ (ACTION MENHIR-FCN)>
+
+<ROOM KENNEL
+ (IN ROOMS)
+ (LDESC
+"This room looks like it was once a kennel for a very large dog (some of
+the bones would fit a dinosaur). It apparently hasn't been used for a
+long time, as the dust is fairly thick all over. The only
+exit is northeast.")
+ (DESC "Kennel")
+ (FLAGS RLANDBIT)
+ (NE TO MENHIR-ROOM
+ IF MENHIR-POSITION
+ ELSE "You are trying to walk through an enormous rock.")
+ (OUT TO MENHIR-ROOM
+ IF MENHIR-POSITION
+ ELSE "You are trying to walk through an enormous rock.")
+ (GLOBAL MENHIR)>
+
+<OBJECT COLLAR
+ (IN KENNEL)
+ (SYNONYM COLLAR TREASURE)
+ (ADJECTIVE HUGE GIANT DOG)
+ (FDESC
+"A gigantic dog collar, large enough for three rhinoceros-sized dogs, is
+lying amidst the debris.")
+ (DESC "gigantic dog collar")
+ (FLAGS STAGGERED TAKEBIT)
+ (ACTION COLLAR-FCN)
+ (VALUE 15)>
+
+\
+
+"SUBTITLE DIAMOND MAZE"
+
+<OBJECT BAT
+ (SYNONYM CLUB BAT)
+ (ADJECTIVE WOODEN BASEBALL)
+ (FDESC
+"A long wooden club lies on the ground near the diamond-shaped window.
+The club is curiously burned at the thick end.")
+ (DESC "wooden club")
+ (FLAGS INVISIBLE TAKEBIT WEAPONBIT READBIT BURNBIT)
+ (TEXT
+"The words \"Babe Flathead\" are burned into the wood.")>
+
+<ROOM STAIRWAY-TOP
+ (IN ROOMS)
+ (LDESC
+"A marble stairway leads down into the gloom and a passage leads north.")
+ (DESC "Stairway")
+ (FLAGS RLANDBIT)
+ (DOWN TO DIAMOND-5)
+ (NORTH TO MENHIR-ROOM)
+ (GLOBAL STAIRS)>
+
+<ROOM DIAMOND-1
+ (IN ROOMS)
+ (DESC
+"Oddly-angled Room")
+ (LDESC
+"A small room with oddly angled walls and passages in all directions.")
+ (FLAGS RLANDBIT)
+ (SE TO DIAMOND-5)
+ (ACTION DIAMOND-MOTION)
+ (GLOBAL DWINDOW)>
+
+<ROOM DIAMOND-2
+ (IN ROOMS)
+ (DESC
+"Oddly-angled Room")
+ (LDESC
+"A small room with oddly angled walls and passages in all directions.")
+ (FLAGS RLANDBIT)
+ (SOUTH TO DIAMOND-5)
+ (SE TO DIAMOND-6)
+ (SW TO DIAMOND-4)
+ (ACTION DIAMOND-MOTION)
+ (GLOBAL DWINDOW)>
+
+<ROOM DIAMOND-3
+ (IN ROOMS)
+ (DESC
+"Oddly-angled Room")
+ (LDESC
+"A small room with oddly angled walls and passages in all directions.")
+ (FLAGS RLANDBIT)
+ (SW TO DIAMOND-5)
+ (ACTION DIAMOND-MOTION)
+ (GLOBAL DWINDOW)>
+
+<ROOM DIAMOND-4
+ (IN ROOMS)
+ (DESC
+"Oddly-angled Room")
+ (LDESC
+"A small room with oddly angled walls and passages in all directions.")
+ (FLAGS RLANDBIT)
+ (NE TO DIAMOND-2)
+ (SE TO DIAMOND-8)
+ (EAST TO DIAMOND-5)
+ (ACTION DIAMOND-MOTION)
+ (GLOBAL DWINDOW)>
+
+<ROOM DIAMOND-5
+ (IN ROOMS)
+ (DESC
+"Oddly-angled Room")
+ (LDESC
+"A small room with oddly angled walls and passages in all directions.")
+ (FLAGS RLANDBIT)
+ (NW TO DIAMOND-1)
+ (NORTH TO DIAMOND-2)
+ (NE TO DIAMOND-3)
+ (WEST TO DIAMOND-4)
+ (EAST TO DIAMOND-6)
+ (SW TO DIAMOND-7)
+ (SOUTH TO DIAMOND-8)
+ (SE TO DIAMOND-9)
+ (DOWN TO CERBERUS-ROOM)
+ (UP TO STAIRWAY-TOP)
+ (ACTION DIAMOND-MOTION)
+ (GLOBAL STAIRS DWINDOW)>
+
+<ROOM DIAMOND-6
+ (IN ROOMS)
+ (DESC
+"Oddly-angled Room")
+ (LDESC
+"A small room with oddly angled walls and passages in all directions.")
+ (FLAGS RLANDBIT)
+ (WEST TO DIAMOND-5)
+ (NW TO DIAMOND-2)
+ (SW TO DIAMOND-8)
+ (ACTION DIAMOND-MOTION)
+ (GLOBAL DWINDOW)>
+
+<ROOM DIAMOND-7
+ (IN ROOMS)
+ (DESC
+"Oddly-angled Room")
+ (LDESC
+"A small room with oddly angled walls and passages in all directions.")
+ (FLAGS RLANDBIT)
+ (NE TO DIAMOND-5)
+ (ACTION DIAMOND-MOTION)
+ (GLOBAL DWINDOW)>
+
+<ROOM DIAMOND-8
+ (IN ROOMS)
+ (DESC
+"Oddly-angled Room")
+ (LDESC
+"A small room with oddly angled walls and passages in all directions.")
+ (FLAGS RLANDBIT)
+ (NORTH TO DIAMOND-5)
+ (NW TO DIAMOND-4)
+ (NE TO DIAMOND-6)
+ (ACTION DIAMOND-MOTION)
+ (GLOBAL DWINDOW)>
+
+<ROOM DIAMOND-9
+ (IN ROOMS)
+ (DESC
+"Oddly-angled Room")
+ (LDESC
+"A small room with oddly angled walls and passages in all directions.")
+ (FLAGS RLANDBIT)
+ (NW TO DIAMOND-5)
+ (ACTION DIAMOND-MOTION)
+ (GLOBAL DWINDOW)>
+
+<OBJECT DWINDOW
+ (IN LOCAL-GLOBALS)
+ (SYNONYM WINDOW)
+ (ADJECTIVE GLOWING DIAMOND)
+ (DESC "diamond shaped window")
+ (ACTION DWINDOW-FCN)
+ (FLAGS NDESCBIT TRYTAKEBIT)>
+
+<ROOM CERBERUS-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is the entrance to a huge crypt or tomb. A marble stairway leads
+up from a gateway arch.")
+ (DESC "Cerberus Room")
+ (FLAGS RLANDBIT)
+ (EAST TO CRYPT-ANTEROOM
+ IF CERBERUS-LEASHED ELSE "The huge dog snaps nastily at you.")
+ (IN TO CRYPT-ANTEROOM
+ IF CERBERUS-LEASHED ELSE "The huge dog snaps nastily at you.")
+ (UP TO DIAMOND-5)
+ (VALUE 10)
+ (GLOBAL STAIRS)
+ (PSEUDO "TOMB" TOMB-PSEUDO "CRYPT" TOMB-PSEUDO)>
+
+<OBJECT GLOBAL-CERBERUS
+ (IN LOCAL-GLOBALS)
+ (SYNONYM CERBERUS DOG HOUND MONSTER)
+ (ADJECTIVE HUGE GIANT THREE HEADED)
+ (DESC "three-headed dog")>
+
+<OBJECT CERBERUS
+ (IN CERBERUS-ROOM)
+ (SYNONYM CERBERUS DOG HOUND MONSTER)
+ (ADJECTIVE HUGE GIANT THREE HEADED)
+ (DESC "three-headed dog")
+ (LDESC
+"There is a vicious-looking dog guarding the entrance. It is more or
+less your usual dog, except that it has three heads and is the size of
+an elephant.")
+ (FLAGS ACTORBIT OPENBIT CONTBIT)
+ (ACTION CERBERUS-FCN)>
+
+<ROOM CRYPT-ANTEROOM
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Crypt Anteroom")
+ (FLAGS RLANDBIT)
+ (IN TO CRYPT-ROOM IF CRYPT-DOOR IS OPEN)
+ (SOUTH TO CRYPT-ROOM IF CRYPT-DOOR IS OPEN)
+ (WEST TO CERBERUS-ROOM)
+ (ACTION CRYPT-ANTEROOM-FCN)
+ (GLOBAL CRYPT-DOOR)
+ (VALUE 3)>
+
+<ROOM CRYPT-ROOM
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Crypt")
+ (FLAGS RLANDBIT)
+ (NORTH TO CRYPT-ANTEROOM IF CRYPT-DOOR IS OPEN)
+ (SOUTH TO ZORK3 IF DIM-DOOR-FLAG)
+ (GLOBAL CRYPT-DOOR DIM-DOOR)
+ (ACTION CRYPT-ROOM-FCN)
+ (VALUE 2)>
+
+<OBJECT HEADS
+ (IN CRYPT-ROOM)
+ (SYNONYM HEADS HEAD POLE POLES)
+ (DESC "set of poled heads")
+ (FLAGS NDESCBIT TRYTAKEBIT)
+ (ACTION HEAD-FCN)>
+
+<OBJECT CRYPT
+ (IN CRYPT-ROOM)
+ (SYNONYM TOMB CRYPT GRAVE)
+ (ADJECTIVE MARBLE)
+ (DESC "marble crypt")
+ (FLAGS NDESCBIT READBIT)
+ (ACTION CRYPT-OBJECT)
+ (TEXT
+"\"Here lie the Flatheads, whose heads were placed on poles by the
+Keeper of the Dungeon for amazing untastefulness.\"")>
+
+<OBJECT CRYPT-DOOR
+ (IN LOCAL-GLOBALS)
+ (SYNONYM DOOR)
+ (ADJECTIVE CRYPT NORTH)
+ (DESC "crypt door")
+ (FLAGS DOORBIT CONTBIT)
+ (ACTION CRYPT-DOOR-FCN)>
+
+<OBJECT DIM-DOOR
+ (IN LOCAL-GLOBALS)
+ (SYNONYM DOOR LETTER)
+ (ADJECTIVE F DIMLY SOUTH SECRET)
+ (DESC "secret door")
+ (FLAGS DOORBIT CONTBIT INVISIBLE)
+ (ACTION DIM-DOOR-FCN)>
+
+<ROOM ZORK3
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Landing")
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION ZORK3-FCN)>
+
+\
+
+"SUBTITLE WIZARD'S WORKSHOP"
+
+<ROOM GUARDIAN-ROOM
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Guarded Room")
+ (FLAGS RLANDBIT)
+ (NORTH TO COBWEBBY-CORRIDOR)
+ (SOUTH TO WIZARDS-WORKSHOP
+ IF WIZ-DOOR IS OPEN)
+ (IN TO WIZARDS-WORKSHOP
+ IF WIZ-DOOR IS OPEN)
+ (ACTION GUARDIAN-ROOM-FCN)
+ (GLOBAL WIZ-DOOR)>
+
+<OBJECT DOOR-KEEPER
+ (IN GUARDIAN-ROOM)
+ (SYNONYM KEEPER GUARDIAN LIZARD HEAD)
+ (ADJECTIVE NASTY)
+ (DESC "lizard")
+ (FLAGS NDESCBIT)
+ (ACTION DOOR-KEEPER-FCN)>
+
+<ROOM WIZARDS-WORKSHOP
+ (IN ROOMS)
+ (LDESC
+"This is the workshop of the Wizard of Frobozz.")
+ (DESC "Wizard's Workshop")
+ (FLAGS RLANDBIT)
+ (NORTH TO GUARDIAN-ROOM IF WIZ-DOOR IS OPEN)
+ (OUT TO GUARDIAN-ROOM IF WIZ-DOOR IS OPEN)
+ (WEST TO WORKBENCH-ROOM)
+ (SOUTH TO TROPHY-ROOM)
+ (ACTION WORKSHOP-FCN)
+ (VALUE 10)
+ (GLOBAL WIZ-DOOR)>
+
+<ROOM WORKBENCH-ROOM
+ (IN ROOMS)
+ (LDESC
+"This room is the Wizard's workroom. A hall continues east and west,
+and a larger room lies to the south. There are many shelves and racks
+on the walls, but the Wizard's workbench dominates the room. It is made
+of dark, heavy wood bound with iron. The workbench is stained from many
+years of use, and is deeply gouged as though some huge clawed animal was
+imprisoned on it. There are burn marks and even notes written in a crabbed
+hand. Many arcane items are scattered about the bench; alembics, mortar
+and pestle, small knives of various sizes, odd scraps of vellum, wax
+candles, and much more. In the center of a relatively clear area of the
+bench are affixed three stands - ruby, sapphire, and diamond - which form
+a triangle.")
+ (DESC "Wizard's Workroom")
+ (FLAGS RLANDBIT ONBIT)
+ (EAST TO WIZARDS-WORKSHOP)
+ (SOUTH TO PENTAGRAM-ROOM)
+ (WEST TO AQUARIUM-ROOM)
+ (PSEUDO "MORTAR" ARCANA-PSEUDO "PESTLE" ARCANA-PSEUDO)>
+
+<OBJECT ARCANA
+ (IN WORKBENCH-ROOM)
+ (SYNONYM ALEMBIC VELLUM CANDLES KNIVES)
+ (ADJECTIVE WAX SMALL)
+ (DESC "arcane item")
+ (FLAGS NDESCBIT TRYTAKEBIT)
+ (ACTION ARCANA-PSEUDO)>
+
+<OBJECT WORKBENCH
+ (IN WORKBENCH-ROOM)
+ (SYNONYM WORKBENCH BENCH TABLE)
+ (ADJECTIVE WORK HEAVY WOODEN WIZARD)
+ (DESC "Wizard's workbench")
+ (CAPACITY 200)
+ (FLAGS NDESCBIT SURFACEBIT CONTBIT OPENBIT)>
+
+<OBJECT STAND-1
+ (IN WORKBENCH)
+ (SYNONYM STAND STANDS)
+ (ADJECTIVE CRYSTAL RUBY)
+ (DESC "ruby stand")
+ (FLAGS NDESCBIT SURFACEBIT CONTBIT OPENBIT)
+ (CAPACITY 10)
+ (ACTION STAND-FCN)>
+
+<OBJECT STAND-2
+ (IN WORKBENCH)
+ (SYNONYM STAND STANDS)
+ (ADJECTIVE CRYSTAL SAPPHIRE)
+ (DESC "sapphire stand")
+ (FLAGS NDESCBIT SURFACEBIT OPENBIT CONTBIT)
+ (CAPACITY 10)
+ (ACTION STAND-FCN)>
+
+<OBJECT STAND-3
+ (IN WORKBENCH)
+ (SYNONYM STAND STANDS)
+ (ADJECTIVE DIAMOND CRYSTAL)
+ (DESC "diamond stand")
+ (FLAGS NDESCBIT SURFACEBIT OPENBIT CONTBIT)
+ (CAPACITY 10)
+ (ACTION STAND-FCN)>
+
+<OBJECT STAND-4
+ (SYNONYM STAND STANDS)
+ (ADJECTIVE OBSIDIAN BLACK CRYSTAL STRANGE)
+ (DESC "black obsidian stand")
+ (FLAGS SURFACEBIT CONTBIT OPENBIT)
+ (SIZE 5)
+ (CAPACITY 10)
+ (ACTION STAND-FCN)>
+
+<OBJECT PALANTIR-4
+ (IN STAND-4)
+ (SYNONYM SPHERE BALL PALANTIR)
+ (ADJECTIVE CRYSTAL STRANGE BLACK)
+ (DESC "black crystal sphere")
+ (FLAGS STAGGERED TAKEBIT TRANSBIT)
+ (ACTION PALANTIR)
+ (LDESC "There is a strange black sphere here.")
+ (VALUE 30)
+ (SIZE 10)>
+
+<ROOM TROPHY-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is the Wizard's trophy room, filled with memorabilia of various
+sorts. On one wall is the Wizard's D. T. (Doctor of Thaumaturgy) degree
+from GUE Tech. Several old magic wands are mounted on a wand rack. A
+collection of dull and nicked swords testify to the fate of many
+foolhardy adventurers. Small bottles contain discarded homunculi (a few
+preserved in alcohol). There is a stuffed owl on a perch.")
+ (DESC "Trophy Room")
+ (FLAGS RLANDBIT)
+ (NORTH TO WIZARDS-WORKSHOP)
+ (PSEUDO
+ "OWL" TROPHY-PSEUDO
+ "HOMUNCULI" TROPHY-PSEUDO)>
+
+<OBJECT DEGREE
+ (IN TROPHY-ROOM)
+ (SYNONYM DEGREE DIPLOMA)
+ (DESC "degree")
+ (FLAGS NDESCBIT TRYTAKEBIT READBIT)
+ (ACTION TROPHY-PSEUDO)
+ (TEXT
+"The text is in some obscure tongue. All that can be made out is
+a reference to \"sending in a matchbook cover.\"")>
+
+<OBJECT WANDS
+ (IN TROPHY-ROOM)
+ (SYNONYM WANDS WAND RACK SET)
+ (ADJECTIVE WORN USED)
+ (DESC "set of used wands")
+ (FLAGS NDESCBIT TRYTAKEBIT)
+ (ACTION TROPHY-PSEUDO)>
+
+<OBJECT TROPHY-SWORD
+ (IN TROPHY-ROOM)
+ (SYNONYM SWORD SWORDS)
+ (ADJECTIVE DULL NICKED)
+ (DESC "nicked swords")
+ (FLAGS NDESCBIT TRYTAKEBIT)
+ (ACTION TROPHY-PSEUDO)>
+
+<OBJECT TROPHY-BOTTLES
+ (IN TROPHY-ROOM)
+ (SYNONYM BOTTLE)
+ (ADJECTIVE SMALL)
+ (DESC "small bottles")
+ (FLAGS NDESCBIT TRYTAKEBIT)
+ (ACTION TROPHY-PSEUDO)>
+
+<OBJECT WARNING-LABEL
+ (IN TROPHY-ROOM)
+ (SYNONYM LABEL)
+ (ADJECTIVE WARNING)
+ (DESC "warning label")
+ (LDESC "A hand-lettered label is affixed to the wall.")
+ (FLAGS READBIT)
+ (TEXT
+"Warning!|
+|
+The exhibits in this room are the property of the mighty Wizard of
+Frobozz (me), and are the fruits of diligent labor and study over
+many years. He who touches anything will regret it.|
+|
+(signed)|
+Frobozz|")>
+
+<OBJECT GLOBAL-WIZARD-CASE
+ (IN LOCAL-GLOBALS)
+ (SYNONYM CASE CABINET)
+ (ADJECTIVE TROPHY WIZARD)
+ (DESC "Wizard's trophy cabinet")
+ (ACTION WIZARD-CASE-FCN)>
+
+<OBJECT WIZARD-CASE
+ (IN TROPHY-ROOM)
+ (SYNONYM CASE CABINET)
+ (ADJECTIVE TROPHY WIZARD)
+ (DESC "Wizard's trophy cabinet")
+ (FLAGS CONTBIT TRANSBIT)
+ (LDESC "Imbedded in the wall is an ornate trophy cabinet.")
+ (ACTION WIZARD-CASE-FCN)
+ (CAPACITY 1000)>
+
+<OBJECT BROKEN-CASE
+ (SYNONYM CASE CABINET)
+ (ADJECTIVE BROKEN TROPHY WIZARD)
+ (DESC "smashed trophy cabinet")
+ (FLAGS CONTBIT OPENBIT)
+ (LDESC "Shards of a smashed trophy case litter the room.")>
+
+<ROOM PENTAGRAM-ROOM
+ (IN ROOMS)
+ (LDESC
+"In this room, inscribed on the floor, is a great pentagram drawn with
+black chalk. In its center is a black circle.")
+ (DESC "Pentagram Room")
+ (FLAGS RLANDBIT ONBIT)
+ (NORTH TO WORKBENCH-ROOM)
+ (GLOBAL GLOBAL-MENHIR GLOBAL-CERBERUS GLOBAL-WIZARD-CASE)>
+
+<OBJECT PENTAGRAM
+ (IN PENTAGRAM-ROOM)
+ (SYNONYM PENTAGRAM STAR CIRCLE)
+ (ADJECTIVE GREAT CHALK BLACK)
+ (DESC "pentagram")
+ (FLAGS NDESCBIT SURFACEBIT CONTBIT OPENBIT)
+ (CAPACITY 200)
+ (ACTION PENTAGRAM-FCN)>
+
+<ROOM AQUARIUM-ROOM
+ (IN ROOMS)
+ (LDESC
+"Here a dark hallway turns a corner. To the south is a dark room, to
+the east is fitful light.")
+ (DESC "Aquarium Room")
+ (FLAGS RLANDBIT ONBIT)
+ (EAST TO WORKBENCH-ROOM)
+ (IN TO IN-AQUARIUM)
+ (SOUTH TO WIZARDS-QUARTERS)>
+
+<OBJECT AQUARIUM
+ (IN AQUARIUM-ROOM)
+ (SYNONYM AQUARIUM GLASS)
+ (ADJECTIVE HUGE)
+ (DESC "aquarium")
+ (LDESC "Filling the northern half of the room is a huge aquarium.")
+ (FLAGS OPENBIT CONTBIT)
+ (CAPACITY 200)
+ (ACTION AQUARIUM-FCN)>
+
+<OBJECT PALANTIR-3
+ (IN IN-AQUARIUM)
+ (SYNONYM PALANTIR SPHERE)
+ (ADJECTIVE CRYSTAL WHITE CLEAR)
+ (DESC "clear crystal sphere")
+ (LDESC "There is a clear crystal sphere lying in the sand.")
+ (FLAGS STAGGERED TAKEBIT NDESCBIT TRANSBIT)
+ (ACTION PALANTIR)
+ (VALUE 20)>
+
+<OBJECT SERPENT
+ (IN AQUARIUM)
+ (SYNONYM SERPENT SNAKE)
+ (ADJECTIVE BABY SEA)
+ (DESC "baby sea serpent")
+ (LDESC "There is a baby sea serpent swimming in the aquarium.")
+ (FLAGS ACTORBIT)
+ (ACTION SERPENT-FCN)>
+
+<OBJECT DEAD-SERPENT
+ (SYNONYM SERPENT SNAKE)
+ (ADJECTIVE DEAD BABY SEA)
+ (DESC "dead sea serpent")
+ (LDESC "There is a dead sea serpent in a heap here.")
+ (FLAGS TAKEBIT)
+ (ACTION DEAD-SERPENT-FCN)
+ (SIZE 400)>
+
+<ROOM IN-AQUARIUM
+ (IN ROOMS)
+ (LDESC
+"The floor here seems to be made of sand, but it is hard to see anything
+else.")
+ (DESC "Murky Room")
+ (FLAGS RLANDBIT ONBIT)
+ (OUT TO AQUARIUM-ROOM)
+ (ACTION IN-AQUARIUM-FCN)>
+
+<ROOM WIZARDS-QUARTERS
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Wizard's Quarters")
+ (FLAGS RLANDBIT)
+ (NORTH TO AQUARIUM-ROOM)
+ (ACTION WIZARD-QUARTERS-FCN)>
+
+<ROOM CAROUSEL-ROOM
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Carousel Room")
+ (FLAGS RLANDBIT)
+ (NORTH TO MARBLE-HALL)
+ (NE TO STREAM-PATH)
+ (EAST TO TOPIARY-ROOM)
+ (SE TO RIDDLE-ROOM)
+ (SOUTH TO MENHIR-ROOM)
+ (SW TO COBWEBBY-CORRIDOR)
+ (WEST TO ROOM-8)
+ (NW TO COOL-ROOM)
+ (ACTION CAROUSEL-ROOM-FCN)>
+
+; "SUBTITLE ROOMS FROM OLD ZORK"
+
+<ROOM RIDDLE-ROOM
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Riddle Room")
+ (DOWN TO CAROUSEL-ROOM)
+ (NW TO CAROUSEL-ROOM)
+ (EAST TO PEARL-ROOM IF RIDDLE-DOOR IS OPEN)
+ (FLAGS RLANDBIT)
+ (ACTION RIDDLE-ROOM-FCN)
+ (PSEUDO "RIDDLE" RIDDLE-PSEUDO)>
+
+<OBJECT RIDDLE-DOOR
+ (IN RIDDLE-ROOM)
+ (DESC "stone door")
+ (SYNONYM DOOR)
+ (ADJECTIVE GREAT STONE)
+ (FLAGS DOORBIT CONTBIT NDESCBIT)
+ (ACTION RIDDLE-DOOR-FCN)>
+
+<ROOM PEARL-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is a former broom closet. The exits are to the east and west.")
+ (DESC "Pearl Room")
+ (EAST TO WELL-BOTTOM)
+ (WEST TO RIDDLE-ROOM)
+ (FLAGS RLANDBIT)>
+
+\
+
+;"SUBTITLE VOLCANO AREA"
+
+<ROOM VOLCANO-BOTTOM
+ (IN ROOMS)
+ (LDESC
+"You are at the bottom of a large dormant volcano. High above you
+light enters from the cone of the volcano. The only exit is to the north.")
+ (DESC "Volcano Bottom")
+ (NORTH TO LAVA-ROOM)
+ (FLAGS RLANDBIT NONLANDBIT)>
+
+<ROOM VAIR-1
+ (IN ROOMS)
+ (LDESC
+"You are about one hundred feet above the bottom of the volcano. The
+top of the volcano is clearly visible here.")
+ (DESC "Volcano Core")
+ (FLAGS NONLANDBIT NWALLBIT )>
+
+<ROOM VAIR-2
+ (IN ROOMS)
+ (LDESC
+"You are about two hundred feet above the volcano floor. Looming
+above is the rim of the volcano. There is a small ledge on the west
+side.")
+ (DESC "Volcano Near Small Ledge")
+ (WEST TO LEDGE-1)
+ (LAND TO LEDGE-1)
+ (FLAGS NONLANDBIT NWALLBIT )>
+
+<ROOM VAIR-3
+ (IN ROOMS)
+ (LDESC
+"You are high above the floor of the volcano. The rim of the volcano
+looks very narrow and you are very near it. To the
+east is what appears to be a viewing ledge, too thin to land on.")
+ (DESC "Volcano by Viewing Ledge")
+ (FLAGS NONLANDBIT NWALLBIT )>
+
+<ROOM VAIR-4
+ (IN ROOMS)
+ (LDESC
+"You are near the rim of the volcano. Above you it is open to the sky.
+To the west, there is a place to land on a wide ledge.")
+ (DESC "Volcano Near Wide Ledge")
+ (LAND TO LEDGE-2)
+ (WEST TO LEDGE-2)
+ (FLAGS NONLANDBIT NWALLBIT )>
+
+<ROOM LEDGE-1
+ (IN ROOMS)
+ (LDESC
+"You are on a narrow ledge within an old dormant volcano. This ledge is
+about halfway between the floor below and the rim above. There is an exit
+to the south.")
+ (DESC "Narrow Ledge")
+ (DOWN "I wouldn't jump from here.")
+ (WEST TO VOLCANO-BOTTOM IF GNOME-DOOR-FLAG)
+ (SOUTH TO LIBRARY)
+ (FLAGS RLANDBIT NONLANDBIT)>
+
+<ROOM LIBRARY
+ (IN ROOMS)
+ (LDESC
+"This must have been a large library, probably for the royal family. All
+of the shelves have been gnawed to pieces by unfriendly gnomes. To the
+north is an exit.")
+ (DESC "Library")
+ (NORTH TO LEDGE-1)
+ (OUT TO LEDGE-1)
+ (FLAGS RLANDBIT)>
+
+<ROOM VOLCANO-VIEW
+ (IN ROOMS)
+ (LDESC
+"You are on a ledge in the middle of a large volcano. Below you
+the volcano bottom can be seen and above is the rim of the volcano.
+A couple of ledges can be seen on the other side of the volcano;
+it appears that this ledge is intermediate in elevation between
+those on the other side. The exit from this room is to the east.")
+ (DESC "Volcano View")
+ (DOWN "I wouldn't try that.")
+ (CROSS "It is impossible to cross this distance.")
+ (EAST TO LAVA-TUBE)
+ (FLAGS RLANDBIT)>
+
+<ROOM LEDGE-2
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Wide Ledge")
+ (DOWN "It's a long way down.")
+ (WEST TO VOLCANO-BOTTOM IF GNOME-DOOR-FLAG)
+ (SOUTH TO SAFE-ROOM)
+ (ACTION LEDGE-FCN)
+ (FLAGS RLANDBIT NONLANDBIT)>
+
+<ROOM SAFE-ROOM
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Dusty Room")
+ (NORTH TO LEDGE-2)
+ (ACTION SAFE-ROOM-FCN)
+ (FLAGS RLANDBIT ONBIT)>
+
+<ROOM LAVA-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is a small room, whose walls are formed by an old lava flow.
+There are exits here to the east and the south.")
+ (DESC "Lava Room")
+ (SOUTH TO VOLCANO-BOTTOM)
+ (EAST TO GLACIER-ROOM)
+ (FLAGS RLANDBIT)>
+
+<GLOBAL BLOC VOLCANO-BOTTOM>
+
+\
+
+"SUBTITLE ALICE IN WONDERLAND"
+
+<ROOM MAGNET-ROOM
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Low Room")
+ (NORTH PER MAGNET-ROOM-EXIT)
+ (SOUTH PER MAGNET-ROOM-EXIT)
+ (WEST PER MAGNET-ROOM-EXIT)
+ (NE PER MAGNET-ROOM-EXIT)
+ (NW PER MAGNET-ROOM-EXIT)
+ (SW PER MAGNET-ROOM-EXIT)
+ (SE PER MAGNET-ROOM-EXIT)
+ (EAST PER MAGNET-ROOM-EXIT)
+ (OUT PER MAGNET-ROOM-EXIT)
+ (ACTION MAGNET-ROOM-FCN)
+ (FLAGS RLANDBIT ONBIT)>
+
+<ROOM MACHINE-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is a large room full of assorted heavy machinery, whirring noisily.
+The room smells of burned resistors. Along one wall are three buttons
+which are, respectively, round, triangular, and square. Naturally,
+above these buttons are instructions written in EBCDIC. A large sign
+in English above all the buttons says|
+ \"DANGER -- HIGH VOLTAGE\"|
+There are exits to the west and the south.")
+ (DESC "Machine Room")
+ (WEST TO MAGNET-ROOM)
+ (SOUTH TO CAGE-ROOM)
+ (FLAGS RLANDBIT ONBIT)>
+
+<ROOM CAGE-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is a dingy closet adjacent to a larger room to the north.
+Chiselled into a wall are these words:|
+|
+ Protected by|
+ FROBOZZ|
+ Magic Alarm Company|
+ (Hello, footpad!)||
+There doesn't seem to be any footpad here, however.")
+ (DESC "Dingy Closet")
+ (OUT TO MACHINE-ROOM)
+ (NORTH TO MACHINE-ROOM)
+ (FLAGS ONBIT RLANDBIT)>
+
+<ROOM IN-CAGE
+ (IN ROOMS)
+ (LDESC "You are trapped inside a solid steel cage.")
+ (DESC "Cage")
+ (ACTION IN-CAGE-FCN)
+ (FLAGS RLANDBIT NWALLBIT ONBIT)>
+
+<ROOM WELL-TOP
+ (IN ROOMS)
+ (LDESC
+"You are at the top of the well. Well done. There are etchings on
+the side of the well. There is a small crack across the floor at the
+entrance to a room on the east, but it can be crossed easily.")
+ (DESC "Top of Well")
+ (EAST TO TEA-ROOM)
+ (DOWN "It's a long way down!")
+ (FLAGS RLANDBIT NONLANDBIT)
+ (VALUE 10)
+ (GLOBAL WELL)
+ (PSEUDO "CRACK" CRACK-PSEUDO)>
+
+<ROUTINE CRACK-PSEUDO ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"It is a small crack (as advertised) with no redeeming value." CR>)>>
+
+<ROOM WELL-BOTTOM
+ (IN ROOMS)
+ (LDESC
+"This is a damp circular room, whose walls are made of brick and
+mortar. The roof of this room is not visible, but there appear to be
+some etchings on the walls. There is a passageway to the west.")
+ (DESC "Circular Room")
+ (WEST TO PEARL-ROOM)
+ (UP "The walls cannot be climbed.")
+ (FLAGS RLANDBIT NONLANDBIT)
+ (GLOBAL WELL)>
+
+<ROOM TEA-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is a small room containing a large oblong table, no doubt set
+for afternoon tea. It is clear from the
+objects on the table that the users were indeed mad. In the eastern
+corner of the room is a small hole (no more than four inches high).
+There are passageways leading away to the west and the northwest.")
+ (DESC "Tea Room")
+ (EAST "Only a mouse could get in there.")
+ (WEST TO WELL-TOP)
+ (NW TO MAGNET-ROOM)
+ (FLAGS RLANDBIT ONBIT)
+ (PSEUDO "HOLE" ALICE-HOLE)>
+
+<ROUTINE ALICE-HOLE ()
+ <COND (<VERB? EXAMINE>
+ <TELL "The hole is very small. You could never enter it." CR>)
+ (<VERB? LOOK-INSIDE>
+ <TELL "You can't see what's beyond the hole from here." CR>)
+ (<AND <VERB? PUT> <EQUAL? ,PRSI ,PSEUDO-OBJECT>>
+ <TELL "It doesn't fit through the hole." CR>)>>
+
+<ROOM POSTS-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is an enormous room, in the center of which are four wooden
+posts delineating a rectangular area, above which is what appears to
+be a wooden roof. In fact, all objects in this room appear to be
+abnormally large. To the east is a passageway. There are large gaping
+chasms to the west and northwest.")
+ (DESC "Posts Room")
+ (NW "A great chasm blocks your way.")
+ (EAST TO POOL-ROOM)
+ (WEST "A great chasm blocks your way.")
+ (DOWN "A great chasm blocks your way.")
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION POSTS-ROOM-FCN)
+ (GLOBAL CHASM)>
+
+<ROOM POOL-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is a large room, one half of which is depressed. Salty water flows
+from a large leak in the ceiling. The only exit is to the west.")
+ (DESC "Pool Room")
+ (OUT TO POSTS-ROOM)
+ (WEST TO POSTS-ROOM)
+ (FLAGS RLANDBIT)>
+
+\
+
+; "SUBTITLE BANK OF ZORK"
+
+<ROOM BANK-ENTRANCE
+ (IN ROOMS)
+ (LDESC
+"This is the entrance hall of the Bank of Zork, the largest
+banking institution of the Great Underground Empire. A partial
+account of its history is in \"The Lives of the Twelve Flatheads,\" in
+the chapter on J. Pierpont Flathead. A more detailed history (albeit
+less objective) may be found in Flathead's outrageous autobiography
+\"I'm Rich and You Aren't - So There!\".
+Most of the furniture has been ravaged by passing scavengers. All
+that remains are two signs at the northwest and northeast corners of
+the room, which say|
+|
+ <-- VIEWING ROOMS -->|
+|
+The way out (ornate but tasteful) is to the east.
+")
+ (DESC "Bank Entrance")
+ (NW TO TELLER-WEST)
+ (NE TO TELLER-EAST)
+ (EAST TO FRESCO-ROOM)
+ (FLAGS RLANDBIT)>
+
+<ROOM TELLER-WEST
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "West Teller's Room")
+ (NORTH TO VIEWING-WEST)
+ (SOUTH TO BANK-ENTRANCE)
+ (WEST TO DEPOSITORY)
+ (ACTION TELLER-ROOM)
+ (FLAGS RLANDBIT)>
+
+<ROOM TELLER-EAST
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "East Teller's Room")
+ (NORTH TO VIEWING-EAST)
+ (SOUTH TO BANK-ENTRANCE)
+ (EAST TO DEPOSITORY)
+ (ACTION TELLER-ROOM)
+ (FLAGS RLANDBIT)>
+
+<ROOM VIEWING-WEST
+ (IN ROOMS)
+ (LDESC
+"This room was used by holders of safety deposit boxes to view
+their contents. On the north side of the room is a sign which says|
+|
+\"Remain here while the teller retrieves your safety deposit box.
+When you are finished, leave the box, and exit to the south.
+Safety deposit boxes cannot be removed from this room!|
+|
+Thank You for Banking at the Zork!\"
+")
+ (DESC "West Viewing Room")
+ (SOUTH TO BANK-ENTRANCE)
+ (FLAGS RLANDBIT)
+ (GLOBAL SEWL SWWL SNWL SSWL)>
+
+<ROOM VIEWING-EAST
+ (IN ROOMS)
+ (LDESC
+"This room was used by holders of safety deposit boxes to view
+their contents. On the north side of the room is a sign which says|
+|
+\"Remain here while the teller retrieves your safety deposit box.
+When you are finished, leave the box, and exit to the south.
+Safety deposit boxes cannot be removed from this room!|
+|
+Thank You for Banking at the Zork!\"
+")
+ (DESC "East Viewing Room")
+ (SOUTH TO BANK-ENTRANCE)
+ (FLAGS RLANDBIT)
+ (GLOBAL SEWL SWWL SNWL SSWL)>
+
+<ROOM SMALL-ROOM
+ (IN ROOMS)
+ (LDESC
+"This is a small, bare room with no distinguishing features. There
+are no exits from this room.")
+ (DESC "Small Room")
+ (FLAGS RLANDBIT )
+ (GLOBAL SEWL SWWL SNWL SSWL)>
+
+<ROOM VAULT
+ (IN ROOMS)
+ (LDESC
+"This is the Vault of the Bank of Zork, in which there are no doors.")
+ (DESC "Vault")
+ (FLAGS RLANDBIT)
+ (GLOBAL SEWL SWWL SNWL SSWL)>
+
+<ROOM DEPOSITORY
+ (IN ROOMS)
+ (LDESC
+"This is a large rectangular room. The east and west walls were used
+for storing safety deposit boxes, but all have been carefully removed
+by evil persons. To the east, west, and south of the room are large
+doorways. The northern \"wall\" of the room is a shimmering curtain of
+light. In the center of the room is a large stone cube, about 10 feet
+on a side. Engraved on the side of the cube is some lettering.")
+ (DESC "Safety Depository")
+ (NORTH "There is a curtain of light there.")
+ (WEST PER BKLEAVEW)
+ (EAST PER BKLEAVEE)
+ (SOUTH TO OFFICE)
+ (ACTION DEPOSITORY-FCN)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL SNWL)>
+
+<ROOM OFFICE
+ (IN ROOMS)
+ (LDESC
+"This room was the office of the Chairman of the Bank of Zork.
+Like the other rooms here, it has been extensively vandalized.
+The lone exit is to the north.")
+ (DESC "Chairman's Office")
+ (NORTH TO DEPOSITORY)
+ (FLAGS RLANDBIT)>
+
+<OBJECT MATCH
+ (IN GAZEBO-TABLE)
+ (SYNONYM MATCH MATCHES MATCHBOOK)
+ (ADJECTIVE ZORK)
+ (DESC "matchbook")
+ (FLAGS READBIT TAKEBIT)
+ (ACTION MATCH-FCN)
+ (LDESC
+"There is a matchbook saying \"Visit ZORK I\" here.")
+ (TEXT
+"\">> Visit Exotic ZORK I <<|
+|
+Consult the Frobozz Magic Travel Agency, or visit your local
+computer store for more details.\"")
+ (SIZE 2)>
+
+
+\
+
+"SUBTITLE PALANTIR ROOMS"
+
+<ROOM DREARY-ROOM
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Dreary Room")
+ (SOUTH TO TINY-ROOM IF PDOOR IS OPEN)
+ (OUT TO TINY-ROOM IF PDOOR IS OPEN)
+ (ACTION DREARY-ROOM-FCN)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PDOOR PWINDOW)>
+
+<ROOM TINY-ROOM
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Tiny Room")
+ (NORTH TO DREARY-ROOM IF PDOOR IS OPEN)
+ (IN TO DREARY-ROOM IF PDOOR IS OPEN)
+ (DOWN TO RAVINE-LEDGE)
+ (FLAGS RLANDBIT)
+ (ACTION TINY-ROOM-FCN)
+ (GLOBAL PDOOR PWINDOW CHASM)>
+
+\
+
+; "SUBTITLE OBJECTS"
+
+<OBJECT GNOME
+ (SYNONYM GNOME)
+ (ADJECTIVE VOLCANO)
+ (DESC "Volcano Gnome")
+ (FLAGS ACTORBIT)
+ (ACTION GNOME-FCN)
+ (LDESC "There is a nervous Volcano Gnome here.")>
+
+<OBJECT BALLOON
+ (IN VOLCANO-BOTTOM)
+ (SYNONYM BALLOON BASKET)
+ (ADJECTIVE WICKER)
+ (DESC "basket")
+ (FLAGS VEHBIT OPENBIT)
+ (ACTION BALLOON-FCN)
+ (DESCFCN BALLOON-FCN)
+ (CAPACITY 100)
+ (SIZE 70)
+ (VTYPE 0)>
+
+<OBJECT BALLOON-LABEL
+ (SYNONYM LABEL)
+ (ADJECTIVE BLUE)
+ (DESC "blue label")
+ (FLAGS READBIT TAKEBIT BURNBIT)
+ (LDESC "There is a blue label here.")
+ (SIZE 1)
+ (TEXT
+"
+!! FROBOZZ MAGIC BALLOON COMPANY !!|
+|
+Hello, Aviator!|
+|
+To land your balloon, say LAND|
+Otherwise, you're on your own!|
+|
+No warranty expressed or implied.
+|")>
+
+<OBJECT SAFE
+ (IN SAFE-ROOM)
+ (SYNONYM SAFE BOX)
+ (ADJECTIVE STEEL)
+ (DESC "box")
+ (FLAGS CONTBIT NDESCBIT)
+ (ACTION SAFE-FCN)
+ (CAPACITY 15)>
+
+<OBJECT BRAIDED-WIRE
+ (FLAGS NDESCBIT)
+ (IN BALLOON)
+ (SYNONYM ROPE WIRE)
+ (ADJECTIVE BRAIDED)
+ (DESC "braided wire")
+ (ACTION WIRE-FCN)>
+
+<OBJECT BRICK
+ (IN MARBLE-HALL)
+ (SYNONYM BRICK)
+ (ADJECTIVE SQUARE CLAY)
+ (DESC "brick")
+ (FLAGS TAKEBIT BURNBIT OPENBIT SEARCHBIT)
+ (ACTION BRICK-FCN)
+ (LDESC "There is a square brick here which feels like clay.")
+ (CAPACITY 2)
+ (SIZE 9)>
+
+<OBJECT EXPLOSION
+ (SYNONYM KREBF)
+ (DESC "debris from an explosion")
+ (LDESC
+"The room is cluttered with debris from an explosion. The walls seem ready
+to collapse.")
+ (FLAGS )>
+
+<OBJECT DEAD-BALLOON
+ (SYNONYM BALLOON BASKET)
+ (ADJECTIVE BROKEN)
+ (DESC "broken balloon")
+ (LDESC "There is a balloon here, broken into pieces.")
+ (SIZE 40)>
+
+<OBJECT ROUND-BUTTON
+ (IN MACHINE-ROOM)
+ (SYNONYM BUTTON)
+ (ADJECTIVE ROUND)
+ (DESC "round button")
+ (FLAGS NDESCBIT)
+ (ACTION BUTTONS)>
+
+<OBJECT SQUARE-BUTTON
+ (IN MACHINE-ROOM)
+ (SYNONYM BUTTON)
+ (ADJECTIVE SQUARE)
+ (DESC "square button")
+ (FLAGS NDESCBIT)
+ (ACTION BUTTONS)>
+
+<OBJECT TRIANGULAR-BUTTON
+ (IN MACHINE-ROOM)
+ (SYNONYM BUTTON)
+ (ADJECTIVE TRIANGULAR)
+ (DESC "triangular button")
+ (FLAGS NDESCBIT)
+ (ACTION BUTTONS)>
+
+<OBJECT CARD
+ (IN SAFE)
+ (SYNONYM CARD NOTE)
+ (DESC "card")
+ (FLAGS READBIT TAKEBIT BURNBIT)
+ (LDESC "There is a card with writing on it here.")
+ (SIZE 1)
+ (TEXT
+"
+Warning:|
+ This room was constructed over very weak rock strata. Detonation
+of explosives in this room is strictly prohibited!|
+ Frobozz Magic Cave Company|
+ per M. Agrippa, foreman|
+") >
+
+<OBJECT CLOTH-BAG
+ (IN BALLOON)
+ (SYNONYM BAG)
+ (ADJECTIVE CLOTH)
+ (FLAGS NDESCBIT)
+ (DESC "cloth bag")
+ (ACTION BCONTENTS)>
+
+<OBJECT CROWN
+ (IN SAFE)
+ (SYNONYM CROWN TREASURE)
+ (ADJECTIVE GAUDY)
+ (DESC "gaudy crown")
+ (FLAGS STAGGERED TAKEBIT WEARBIT)
+ (FDESC "The excessively gaudy crown of Lord Dimwit Flathead is here.")
+ (LDESC "Lord Dimwit's crown is here.")
+ (SIZE 10)
+ (VALUE 20)>
+
+<OBJECT PALANTIR-1 ;"was SPHER"
+ (IN CAGE-ROOM)
+ (SYNONYM SPHERE BALL PALANTIR)
+ (ADJECTIVE CRYSTAL RED)
+ (DESC "red crystal sphere")
+ (FLAGS STAGGERED TAKEBIT TRANSBIT TRYTAKEBIT)
+ (ACTION SPHERE-FCN)
+ (LDESC "There is a beautiful red crystal sphere here.")
+ (SIZE 10)
+ (VALUE 20)>
+
+<OBJECT VIOLIN
+ (IN IRON-BOX)
+ (SYNONYM STRADIVARIUS VIOLIN TREASURE)
+ (ADJECTIVE FANCY)
+ (DESC "fancy violin")
+ (FLAGS STAGGERED TAKEBIT)
+ (LDESC "There is a Stradivarius here.")
+ (SIZE 10)
+ (VALUE 20)
+ (ACTION VIOLIN-FCN)>
+
+<OBJECT ICE
+ (IN GLACIER-ROOM)
+ (SYNONYM ICE MASS GLACIER)
+ (ADJECTIVE COLD ICY)
+ (DESC "glacier")
+ (ACTION GLACIER-FCN)
+ (LDESC "A mass of ice fills the western half of the room.")>
+
+<OBJECT FLASK
+ (IN POOL-ROOM)
+ (SYNONYM FLASK)
+ (ADJECTIVE GLASS)
+ (DESC "stoppered glass flask filled with liquid")
+ (FLAGS TAKEBIT TRANSBIT READBIT)
+ (ACTION FLASK-FCN)
+ (LDESC
+"A stoppered glass flask with a skull-and-crossbones marking is here.
+The flask is filled with some clear liquid.")
+ (CAPACITY 5)
+ (TEXT "There is a skull-and-crossbones engraved on the glass.")
+ (SIZE 10)>
+
+<OBJECT ROBOT-LABEL
+ (IN MAGNET-ROOM)
+ (SYNONYM PAPER PIECE INSTRUCTIONS)
+ (ADJECTIVE GREEN)
+ (DESC "green piece of paper")
+ (FLAGS READBIT TAKEBIT BURNBIT)
+ (LDESC "There is a green piece of paper here.")
+ (SIZE 3)
+ (TEXT
+"!! FROBOZZ MAGIC ROBOT COMPANY !!||
+
+Hello, Master!|
+|
+ I am a late-model robot, trained at GUE Tech to perform various
+simple household functions.|
+|
+ To activate me, say the following:|
+|
+ >ROBOT, <things to do>|
+|
+At your service!
+") >
+
+<OBJECT SLOT
+ (IN SAFE-ROOM)
+ (SYNONYM SLOT HOLE)
+ (DESC "hole")
+ (FLAGS OPENBIT NDESCBIT)
+ (CAPACITY 10)
+ (ACTION SLOT-F)>
+
+<ROUTINE SLOT-F ()
+ <COND (<AND <VERB? LOOK-INSIDE> <NOT <FIRST? ,SLOT>>>
+ <TELL "There's nothing in the hole." CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"The oblong hole has been chipped out of the box, probably by someone
+wanting whatever is inside the box. The attempt was a pathetic failure,
+however." CR>)>>
+
+<OBJECT HOOK-2
+ (IN LEDGE-2)
+ (SYNONYM HOOK)
+ (ADJECTIVE SMALL)
+ (DESC "hook")
+ (LDESC "There is a small hook attached to the rock here.")>
+
+<OBJECT HOOK-1
+ (IN LEDGE-1)
+ (SYNONYM HOOK)
+ (ADJECTIVE SMALL)
+ (DESC "hook")
+ (LDESC "There is a small hook attached to the rock here.")>
+
+<OBJECT LAMP
+ (IN INSIDE-BARROW)
+ (SYNONYM LAMP LANTERN LIGHT)
+ (ADJECTIVE BRASS)
+ (DESC "lamp")
+ (FLAGS TAKEBIT LIGHTBIT)
+ (FDESC "A strangely familiar brass lantern is lying on the ground.")
+ (ACTION LANTERN)
+ (SIZE 15)>
+
+<OBJECT BROKEN-LAMP ;"was BLAMP"
+ (SYNONYM LAMP LANTERN LIGHT)
+ (ADJECTIVE BROKEN BRASS)
+ (DESC "broken brass lantern")
+ (FLAGS TAKEBIT)
+ (SIZE 15)>
+
+<OBJECT ALICE-TABLE
+ (IN TEA-ROOM)
+ (SYNONYM TABLE)
+ (ADJECTIVE LARGE OBLONG)
+ (FLAGS CONTBIT SURFACEBIT OPENBIT)
+ (DESC "large oblong table")
+ (CAPACITY 50)>
+
+<OBJECT MANGLED-CAGE
+ (SYNONYM CAGE)
+ (ADJECTIVE MANGLED STEEL)
+ (DESC "mangled cage")
+ (FLAGS TAKEBIT)
+ (LDESC "There is a mangled steel cage here.")
+ (SIZE 60)>
+
+<OBJECT PEARL
+ (IN PEARL-ROOM)
+ (SYNONYM NECKLACE PEARLS TREASURE)
+ (ADJECTIVE PEARL)
+ (DESC "pearl necklace")
+ (FLAGS STAGGERED TAKEBIT)
+ (LDESC "There is a pearl necklace here with hundreds of large pearls.")
+ (SIZE 10)
+ (VALUE 15)>
+
+<OBJECT EAT-ME-CAKE
+ (IN ALICE-TABLE)
+ (SYNONYM CAKE ICING CAKES LETTER)
+ (ADJECTIVE GREEN FROSTED)
+ (DESC "cake frosted with green letters")
+ (FLAGS READBIT TAKEBIT FOODBIT)
+ (ACTION EATME-FCN)
+ (TEXT "The icing spells out \"Eat Me.\"")
+ (SIZE 4)>
+
+<OBJECT BLUE-ICING
+ (IN ALICE-TABLE)
+ (SYNONYM CAKE ICING CAKES LETTER)
+ (ADJECTIVE BLUE FROSTED)
+ (DESC "cake frosted with blue letters")
+ (FLAGS READBIT TAKEBIT FOODBIT)
+ (ACTION CAKE-FCN)
+ (SIZE 4)>
+
+<OBJECT ORANGE-ICING
+ (IN ALICE-TABLE)
+ (SYNONYM CAKE CAKES ICING LETTER)
+ (ADJECTIVE ORANGE FROSTED)
+ (DESC "cake frosted with orange letters")
+ (FLAGS READBIT TAKEBIT FOODBIT)
+ (ACTION CAKE-FCN)
+ (SIZE 4)>
+
+<OBJECT RED-ICING
+ (IN ALICE-TABLE)
+ (SYNONYM CAKE CAKES ICING LETTER)
+ (ADJECTIVE RED FROSTED)
+ (DESC "cake frosted with red letters")
+ (FLAGS READBIT TAKEBIT FOODBIT)
+ (ACTION CAKE-FCN)
+ (SIZE 4)>
+
+<OBJECT LEAK
+ (IN POOL-ROOM)
+ (SYNONYM LEAK)
+ (ADJECTIVE LARGE)
+ (DESC "leak")
+ (FLAGS NDESCBIT)
+ (ACTION PLEAK)>
+
+<OBJECT POOL
+ (IN POOL-ROOM)
+ (SYNONYM POOL TEARS)
+ (ADJECTIVE LARGE)
+ (DESC "pool of tears")
+ (LDESC
+"The leak has submerged the depressed area in a pool of tears. There is
+a hazy something at the deepest part of the pool.")
+ (ACTION POOL-FCN)>
+
+<OBJECT COIN
+ (IN LEDGE-1)
+ (SYNONYM COIN ZORKMID GOLD TREASURE)
+ (ADJECTIVE GOLD PRICELESS)
+ (DESC "priceless zorkmid")
+ (FLAGS STAGGERED READBIT TAKEBIT)
+ (FDESC
+"On the floor is a priceless gold zorkmid (a valuable collector's item).")
+ (LDESC "There is an engraved zorkmid here.")
+ (SIZE 10)
+ (VALUE 20)
+ (TEXT
+"This is a beautiful octagonal coin bearing the legends \"Ten Thousand
+Zorkmids\" and \"In Frobs We Trust\".")>
+
+;" -------------------------|
+ / Gold Zorkmid \\|
+ / T e n T h o u s a n d \\|
+ / Z O R K M I D S \\|
+ / \\|
+ / !!!!!!!!!!!!!!!!!! \\|
+ / !!!!! !!!!! \\|
+! !!! ^^ ^^ !!! !|
+! !!! OO OO !!! !|
+! In Frobs !!! << !!! We Trust !|
+! !! (______) !! !|
+! ! ! !|
+! !__________! !|
+ \\ /|
+ \\ -- Lord Dimwit Flathead -- /|
+ \\ -- Beloved of Zorkers -- /|
+ \\ /|
+ \\ * 722 G.U.E. * /|
+ \\ /|
+ --------------------------|
+"
+
+<OBJECT STAMP
+ (IN PURPLE-BOOK)
+ (SYNONYM STAMP TREASURE)
+ (ADJECTIVE FLATHEAD)
+ (DESC "Flathead stamp")
+ (FLAGS STAGGERED READBIT TAKEBIT BURNBIT)
+ (LDESC "There is a Flathead stamp here.")
+ (SIZE 1)
+ (VALUE 10)
+ (TEXT "This three zorkmid stamp bears a portrait of Lord
+Dimwit Flathead, \"Our Excessive Leader\".")>
+
+;"|
+---v----v----v----v----v---|
+! !!!!!!!!!! LORD !|
+> !!!!! ! DIMWIT <|
+! !!!! ---! FLATHEAD !|
+! !!!C CC \\ !|
+> !! _\\ <|
+! !!! (____! !|
+! !! ! Our !|
+> !______! Excessive <|
+! / \\ Leader !|
+! !|
+> G.U.E. Three <|
+! POSTAGE Zorkmids !|
+---^----^----^----^----^---|
+"
+
+<OBJECT GREEN-BOOK
+ (IN LIBRARY)
+ (SYNONYM BOOK COVER BOOKS)
+ (ADJECTIVE HANDSOME GREEN LEATHER)
+ (DESC "green book")
+ (FLAGS READBIT TAKEBIT CONTBIT BURNBIT)
+ (FDESC
+"A handsome book, bound in green leather, sits in the center of the room.")
+ (CAPACITY 2)
+ (SIZE 10)
+ (TEXT "This book is written in a tongue with which I am unfamiliar.")
+ (ACTION RANDOM-BOOK)>
+
+<OBJECT BLUE-BOOK
+ (IN LIBRARY)
+ (SYNONYM BOOK COVER BOOKS)
+ (ADJECTIVE BLUE)
+ (DESC "blue book")
+ (FLAGS READBIT TAKEBIT CONTBIT BURNBIT)
+ (FDESC "Worn and battered in one corner of the room is a blue book.")
+ (CAPACITY 2)
+ (SIZE 10)
+ (TEXT "This book is written in a tongue with which I am unfamiliar.")
+ (ACTION RANDOM-BOOK)>
+
+<OBJECT WHITE-BOOK
+ (IN LIBRARY)
+ (SYNONYM BOOK COVER BOOKS)
+ (ADJECTIVE WHITE GLOSSY)
+ (DESC "white book")
+ (FLAGS READBIT TAKEBIT CONTBIT BURNBIT)
+ (FDESC
+"Right beside the purple book sits a white one.")
+ (CAPACITY 2)
+ (SIZE 5)
+ (TEXT
+"It is written in an unfamiliar tongue and details the use of various
+magical objects, chiefly the so-called \"magic wand\". Apparently these
+devices work by pointing them at the object to be ensorcelled, and then
+chanting the appropriate magic words. (It's truly amazing how credulous
+these ancients were, isn't it?)")
+ (ACTION RANDOM-BOOK)>
+
+<OBJECT PURPLE-BOOK
+ (IN LIBRARY)
+ (SYNONYM BOOK BOOKS)
+ (ADJECTIVE PURPLE)
+ (DESC "purple book")
+ (FLAGS READBIT TAKEBIT CONTBIT BURNBIT)
+ (LDESC
+"Lying in the dust, and covered with mold, is a purple book.")
+ (CAPACITY 2)
+ (SIZE 10)
+ (ACTION PURPLE-BOOK-FCN)
+ (TEXT
+"This book is written in a tongue with which I am unfamiliar. Assuming that
+one can indeed tell a book by its cover, it is likely filled with purple prose,
+the like of which is rarely seen outside the Great Underground Empire.")>
+
+<OBJECT RECEPTACLE
+ (IN BALLOON)
+ (SYNONYM RECEPTACLE)
+ (ADJECTIVE METAL)
+ (DESC "receptacle")
+ (FLAGS CONTBIT SEARCHBIT NDESCBIT)
+ (ACTION BCONTENTS)
+ (CAPACITY 6)>
+
+<OBJECT ROBOT
+ (IN MAGNET-ROOM)
+ (SYNONYM ROBOT R2D2 C3PO ROBBY)
+ (DESC "robot")
+ (FLAGS ACTORBIT CONTBIT OPENBIT)
+ (ACTION ROBOT-FCN)
+ (LDESC "There is a robot here.")>
+
+<OBJECT RUBY
+ (IN LAVA-ROOM)
+ (SYNONYM RUBY TREASURE)
+ (ADJECTIVE MOBY)
+ (DESC "ruby")
+ (FLAGS STAGGERED TAKEBIT)
+ (FDESC "On the floor lies a moby ruby.")
+ (LDESC "There is a moby ruby lying here.")
+ (VALUE 15)>
+
+<OBJECT IRON-BOX
+ (IN CAROUSEL-ROOM)
+ (SYNONYM BOX)
+ (ADJECTIVE STEEL DENTED)
+ (DESC "steel box")
+ (FLAGS CONTBIT TAKEBIT INVISIBLE)
+ (LDESC "There is a dented steel box here.")
+ (CAPACITY 20)
+ (SIZE 40)>
+
+<OBJECT CAGE
+ (IN CAGE-ROOM)
+ (FLAGS INVISIBLE)
+ (SYNONYM CAGE)
+ (ADJECTIVE STEEL SOLID)
+ (DESC "solid steel cage")
+ (LDESC "There is a solid steel cage in the middle of the room.")>
+
+<OBJECT CANDY
+ (IN POOL-ROOM)
+ (SYNONYM PACKAGE CANDY TREASURE GRASSHOPPERS)
+ (ADJECTIVE CANDIED RARE)
+ (DESC "package of candy")
+ (FLAGS STAGGERED FOODBIT TAKEBIT INVISIBLE READBIT)
+ (LDESC "There is a package of candied goodies here.")
+ (ACTION CANDY-FCN)
+ (SIZE 8)
+ (VALUE 15)>
+
+<OBJECT TOP-ETCHINGS
+ (IN WELL-TOP)
+ (SYNONYM ETCHINGS WALL)
+ (DESC "wall with etchings")
+ (FLAGS READBIT NDESCBIT)
+ (ACTION TOP-ETCHINGS-F)>
+
+<OBJECT BOTTOM-ETCHINGS
+ (IN WELL-BOTTOM)
+ (SYNONYM ETCHINGS WALL)
+ (DESC "wall with etchings")
+ (FLAGS READBIT NDESCBIT)
+ (ACTION BOTTOM-ETCHINGS-F)>
+
+<OBJECT FUSE
+ (IN COBWEBBY-CORRIDOR)
+ (SYNONYM FUSE STRING COIL)
+ (ADJECTIVE BLACK THIN)
+ (DESC "black string")
+ (FLAGS TAKEBIT BURNBIT)
+ (ACTION FUSE-FCN)
+ (LDESC "There is a coil of black, braided string here.")
+ (SIZE 1)>
+
+<OBJECT BUCKET
+ (IN WELL-BOTTOM)
+ (SYNONYM BUCKET)
+ (ADJECTIVE WOODEN)
+ (DESC "wooden bucket")
+ (FLAGS VEHBIT OPENBIT CONTBIT)
+ (ACTION BUCKET-FCN)
+ (CONTFCN BUCKET-CONT)
+ (LDESC
+"There is a wooden bucket here, 3 feet in diameter and 3 feet high.")
+ (CAPACITY 100)
+ (SIZE 100)
+ (VTYPE 0)>
+
+<OBJECT POSTS
+ (IN POSTS-ROOM)
+ (SYNONYM POSTS POST)
+ (ADJECTIVE WOODEN)
+ (FLAGS NDESCBIT)
+ (DESC "group of wooden posts")>
+
+"SUBTITLE BANK OBJECTS"
+
+<OBJECT BILLS
+ (IN VAULT)
+ (SYNONYM BILLS STACK MONEY TREASURE)
+ (ADJECTIVE NEAT MANY ZORKMID)
+ (DESC "stack of zorkmid bills")
+ (FLAGS STAGGERED READBIT TAKEBIT BURNBIT)
+ (ACTION BILLS-OBJECT)
+ (LDESC
+ "200 neatly stacked zorkmid bills are here.")
+ (FDESC
+ "On the floor sit 200 neatly stacked zorkmid bills.")
+ (SIZE 10)
+ (VALUE 25)
+ (TEXT "Each bill is worth 100 zorkmids, and bears the legend
+\"In Frobs We Trust\".")>
+
+;"
+______________________________________________________________
++ 1 0 0 GREAT UNDERGROUND EMPIRE 1 0 0 +|
++ 1 0 0 0 0 1 0 0 0 0+|
++ 1 0 0 0 0 1 0 0 0 0+|
++ 1 0 0 DIMWIT 1 0 0 +|
++ ++++++++++++++++ +|
++ ++ __ __ ++ B30332744D +|
++ ++ -OO OO- ++ +|
++ IN FROBS \\++ >> ++/ WE TRUST +|
++ ++ ______ ++ +|
++ B30332744D + ------ + +|
++ \\\\________// +|
++ 1 0 0 Series FLATHEAD LD Flathead 1 0 0 +|
++ 1 0 0 0 0 719GUE Treasurer 1 0 0 0 0+|
++ 1 0 0 0 0 1 0 0 0 0+|
++ 1 0 0 One Hundred Royal Zorkmids 1 0 0 +|
++_____________________________________________________________+|
+
+"
+
+<OBJECT PORTRAIT
+ (IN OFFICE)
+ (SYNONYM PORTRAIT PAINTING ART TREASURE)
+ (ADJECTIVE FLATHEAD)
+ (DESC "portrait of J. Pierpont Flathead")
+ (FLAGS STAGGERED TAKEBIT BURNBIT)
+ (LDESC
+ "The portrait of J. Pierpont Flathead is here.")
+ (FDESC
+ "A portrait of J. Pierpont Flathead hangs on the wall.")
+ (SIZE 25)
+ (VALUE 20)>
+
+;"|
+ !!!!!!!!!!!!!!|
+ !! __ __ !!|
+ !! $$ $$ !!|
+ \\!! >> !!/|
+ !! ______ !!|
+ ! -//-- !|
+ \\\\_//_____//|
+ ___//! !|
+ \\_// ! !|
+ __________// \\\\__________|
+ / $ / *ZZ* \\ $ \\|
+|
+ J. PIERPONT FLATHEAD|
+ CHAIRMAN|
+"
+
+<OBJECT BANK-BROCHURE
+ (IN DEPOSITORY)
+ (SYNONYM BROCHURE PAPER PIECE)
+ (ADJECTIVE BANK SMALL WORN)
+ (DESC "bank brochure")
+ (FDESC "On the ground is a small, worn piece of paper.")
+ (FLAGS READBIT TAKEBIT BURNBIT)
+ (SIZE 2)
+ (TEXT
+"The paper is barely readable. You can only make out \"... valuables
+are completely safe ... advanced
+magic technology ... impossible to take valuables from the depository
+... either teller's ... Many customers faint ... teller pops in ...
+seems to walk through ... walls ...\"")>
+
+<OBJECT CUBE
+ (IN DEPOSITORY)
+ (SYNONYM VAULT CUBE LETTER)
+ (ADJECTIVE STONE LARGE)
+ (DESC "large stone cube")
+ (FLAGS READBIT NDESCBIT)
+ (ACTION CUBE-F)>
+
+<OBJECT CURTAIN
+ (IN DEPOSITORY)
+ (SYNONYM CURTAIN LIGHT)
+ (ADJECTIVE SHIMMERING)
+ (DESC "shimmering curtain of light")
+ (FLAGS NDESCBIT)
+ (ACTION SCOL-OBJECT)>
+
+<OBJECT GNOME-OF-ZURICH
+ (SYNONYM GNOME ZURICH)
+ (ADJECTIVE ZURICH)
+ (DESC "Gnome of Zurich")
+ (FLAGS ACTORBIT)
+ (ACTION ZGNOME-FCN)
+ (LDESC "There is a Gnome of Zurich here.")>
+
+;"PALANTIR SECTION"
+
+<OBJECT PDOOR
+ (IN LOCAL-GLOBALS)
+ (SYNONYM DOOR)
+ (ADJECTIVE WOODEN OAK)
+ (DESC "door made of oak")
+ (FLAGS DOORBIT CONTBIT)
+ (ACTION PDOOR-FCN)>
+
+<OBJECT PWINDOW
+ (IN LOCAL-GLOBALS)
+ (SYNONYM WINDOW)
+ (ADJECTIVE BARRED)
+ (DESC "barred window")
+ (FLAGS DOORBIT)
+ (ACTION PWINDOW-FCN)>
+
+<OBJECT LID-1
+ (IN TINY-ROOM)
+ (SYNONYM LID)
+ (ADJECTIVE METAL)
+ (DESC "metal lid")
+ (FLAGS NDESCBIT CONTBIT)
+ (ACTION PLID-FCN)>
+
+<OBJECT LID-2
+ (IN DREARY-ROOM)
+ (SYNONYM LID)
+ (ADJECTIVE METAL)
+ (DESC "metal lid")
+ (FLAGS NDESCBIT CONTBIT OPENBIT)
+ (ACTION PLID-FCN)>
+
+<OBJECT PTABLE
+ (IN DREARY-ROOM)
+ (SYNONYM TABLE)
+ (ADJECTIVE DUSTY WOODEN)
+ (DESC "table")
+ (FLAGS NDESCBIT CONTBIT SURFACEBIT OPENBIT)
+ (CAPACITY 40)>
+
+<OBJECT PCRACK
+ (IN DREARY-ROOM)
+ (SYNONYM CRACK)
+ (ADJECTIVE NARROW)
+ (DESC "narrow crack")
+ (FLAGS NDESCBIT)>
+
+<OBJECT KEYHOLE-1
+ (IN TINY-ROOM)
+ (SYNONYM KEYHOLE HOLE)
+ (DESC "keyhole")
+ (FLAGS NDESCBIT OPENBIT SEARCHBIT)
+ (ACTION PKH-FCN)
+ (CAPACITY 2)>
+
+<OBJECT KEYHOLE-2
+ (IN DREARY-ROOM)
+ (SYNONYM KEYHOLE HOLE)
+ (DESC "keyhole")
+ (FLAGS NDESCBIT OPENBIT SEARCHBIT)
+ (ACTION PKH-FCN)
+ (CAPACITY 2)>
+
+<OBJECT LETTER-OPENER
+ (IN GAZEBO-TABLE)
+ (SYNONYM OPENER)
+ (ADJECTIVE LETTER)
+ (DESC "letter opener")
+ (SIZE 2)
+ (FLAGS TAKEBIT TOOLBIT)>
+
+<OBJECT KEY
+ (IN KEYHOLE-2)
+ (SYNONYM KEY)
+ (ADJECTIVE IRON RUSTY)
+ (DESC "rusty iron key")
+ (FLAGS TAKEBIT NDESCBIT TURNBIT TOOLBIT)
+ (ACTION PKEY-FCN)
+ (SIZE 2)>
+
+<OBJECT PALANTIR-2
+ (IN DREARY-ROOM)
+ (SYNONYM PALANTIR SPHERE)
+ (ADJECTIVE CRYSTAL BLUE)
+ (DESC "blue crystal sphere")
+ (FLAGS STAGGERED TAKEBIT TRANSBIT)
+ (ACTION PALANTIR)
+ (VALUE 20)
+ (FDESC "In the center of the table sits a blue crystal sphere.")>
+
+<OBJECT GAZEBO
+ (IN LOCAL-GLOBALS)
+ (SYNONYM GAZEBO STRUCTURE)
+ (ADJECTIVE WOODEN)
+ (DESC "gazebo")
+ (FLAGS NDESCBIT)
+ (ACTION GAZEBO-FCN)>
+
+<OBJECT GAZEBO-TABLE
+ (IN GAZEBO-ROOM)
+ (SYNONYM TABLE)
+ (ADJECTIVE TEA)
+ (DESC "table")
+ (FLAGS NDESCBIT SURFACEBIT CONTBIT OPENBIT)
+ (CAPACITY 100)>
+
+<OBJECT NEWSPAPER
+ (IN GAZEBO-TABLE)
+ (SYNONYM PAPER NEWSPAPER)
+ (ADJECTIVE NEWS NEWSPAPER)
+ (DESC "newspaper")
+ (FLAGS TAKEBIT BURNBIT READBIT)
+ (TEXT
+"** U.S. News and Dungeon Report **|
+|
+FAMED ADVENTURER TO EXPLORE GREAT UNDERGROUND EMPIRE|
+|
+Our correspondents report that a world-famous and battle-hardened
+adventurer has been seen in the vicinity of the Great Underground
+Empire. Local grues have been reported sharpening their (slavering)
+fangs....|
+|
+\"Zork II: The Wizard of Frobozz\" was written by Dave Lebling and Marc
+Blank, and is (c) Copyright 1981, 1982, 1983 by Infocom, Inc.|
+|")>
+
+<OBJECT PLACE-MAT
+ (IN GAZEBO-TABLE)
+ (SYNONYM MAT PLACEM)
+ (ADJECTIVE PLACE)
+ (DESC "place mat")
+ (FLAGS TAKEBIT SURFACEBIT CONTBIT OPENBIT)
+ (ACTION PLACE-MAT-FCN)
+ (SIZE 12)
+ (CAPACITY 20)>
+
+<OBJECT TEAPOT
+ (IN GAZEBO-TABLE)
+ (SYNONYM TEAPOT POT)
+ (ADJECTIVE CHINA TEA)
+ (DESC "china teapot")
+ (FLAGS TAKEBIT TRANSBIT CONTBIT OPENBIT)
+ (CAPACITY 4)
+ (ACTION TEAPOT-F)>
+
+<ROUTINE TEAPOT-F ()
+ <COND (<VERB? CLOSE>
+ <TELL "The teapot has no lid." CR>)>>
+
+<OBJECT WATER
+ (SYNONYM WATER QUANTITY LIQUID H2O)
+ (DESC "quantity of water")
+ (FLAGS TAKEBIT DRINKBIT)
+ (ACTION WATER-FCN)
+ (LDESC "There is some water here.")
+ (SIZE 4)>
+
+<OBJECT SALTY-WATER
+ (SYNONYM WATER QUANTITY LIQUID H2O)
+ (DESC "quantity of salty water")
+ (FLAGS TAKEBIT DRINKBIT)
+ (ACTION WATER-FCN)
+ (LDESC "There is some water here.")
+ (SIZE 4)>
+
+<OBJECT GOLD-KEY
+ (IN UNICORN)
+ (SYNONYM KEY TREASURE)
+ (ADJECTIVE DELICATE GOLD)
+ (DESC "delicate gold key")
+ (FLAGS STAGGERED NDESCBIT TAKEBIT TRYTAKEBIT)
+ (ACTION UNICORN-FCN)
+ (VALUE 15)
+ (SIZE 3)>
+
+<OBJECT RIBBON
+ (IN UNICORN)
+ (SYNONYM RIBBON)
+ (ADJECTIVE VELVET SATIN)
+ (DESC "ribbon")
+ (ACTION UNICORN-FCN)
+ (FLAGS NDESCBIT)>
+
+<OBJECT ROSE
+ (SYNONYM ROSE)
+ (ADJECTIVE BEAUTIFUL RED PERFECT)
+ (DESC "perfect rose")
+ (FLAGS TAKEBIT)
+ (SIZE 1)
+ (ACTION ROSE-F)>
+
+<ROUTINE ROSE-F ()
+ <COND (<VERB? SMELL>
+ <TELL
+"Unlike your efforts here, it comes out smelling like a rose."CR>)
+ (<VERB? EXAMINE>
+ <TELL "A rose is a rose is a rose...." CR>)>>
+
+<OBJECT GENIE
+ (SYNONYM DEVIL DEMON GENIE DJINN)
+ (DESC "demon")
+ (FLAGS ACTORBIT)
+ (ACTION GENIE-FCN)
+ (LDESC "There is a demon floating in mid-air here.")>
+
+<OBJECT WIZARD
+ (SYNONYM WIZARD MAGICIAN SORCEROR MAN)
+ (ADJECTIVE STRANGE LITTLE FROBOZZ OLD)
+ (DESC "Wizard of Frobozz")
+ (LDESC
+"The Wizard of Frobozz is here, eyeing you warily.")
+ (FLAGS ACTORBIT CONTBIT OPENBIT)
+ (ACTION WIZARD-FCN)>
+
+<OBJECT WAND
+ (IN WIZARD)
+ (SYNONYM WAND)
+ (ADJECTIVE MAGIC)
+ (DESC "Wizard's magic wand")
+ (FLAGS STAGGERED NDESCBIT TAKEBIT TRYTAKEBIT)
+ (ACTION WAND-FCN)
+ (VALUE 30)>
+
+<OBJECT SWORD
+ (IN INSIDE-BARROW)
+ (SYNONYM SWORD ORCRIST GLAMDRING BLADE)
+ (ADJECTIVE ELVISH OLD ANTIQUE)
+ (DESC "sword")
+ (FLAGS TAKEBIT WEAPONBIT TRYTAKEBIT)
+ (ACTION SWORD-FCN)
+ (LDESC "An Elvish sword of great antiquity is here.")
+ (FDESC "A sword of Elvish workmanship is on the ground.")
+ (SIZE 30)
+ (VALUE 0)>
+
+<OBJECT REPELLENT
+ (IN ROOM-8)
+ (SYNONYM REPELLENT CAN)
+ (ADJECTIVE GRUE MAGIC)
+ (DESC "Frobozz Magic Grue Repellent")
+ (FLAGS TAKEBIT READBIT)
+ (ACTION REPELLENT-FCN)
+ (FDESC
+"A spray can is in the corner. In large type is the legend \"Frobozz Magic
+Grue Repellent\".")
+ (TEXT
+"!!! FROBOZZ MAGIC GRUE REPELLENT !!!|
+|
+Instructions for use: Apply liberally to creature to be protected.
+Duration of effect is unpredictable. Use only in place of death!|
+|
+(No warranty expressed or implied)")>
+
+<ROOM DEAD-PALANTIR-1
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Room of Red Mist")
+ (WEST TO DEAD-PALANTIR-2)
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION DEAD-PALANTIR)
+ (GLOBAL GLOBAL-PALANTIR)>
+
+<ROOM DEAD-PALANTIR-2
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Room of Blue Mist")
+ (WEST TO DEAD-PALANTIR-3)
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION DEAD-PALANTIR)
+ (GLOBAL GLOBAL-PALANTIR)>
+
+<ROOM DEAD-PALANTIR-3
+ (IN ROOMS)
+ (LDESC " ")
+ (DESC "Room of White Mist")
+ (WEST TO DEAD-PALANTIR-4)
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION DEAD-PALANTIR)
+ (GLOBAL GLOBAL-PALANTIR)>
+
+<ROOM DEAD-PALANTIR-4
+ (LDESC " ")
+ (IN ROOMS)
+ (DESC "Room of Black Mist")
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION DEAD-PALANTIR)>
+
+<OBJECT GLOBAL-PALANTIR
+ (IN LOCAL-GLOBALS)
+ (SYNONYM SPHERE)
+ (ADJECTIVE RED BLUE WHITE CRYSTAL)
+ (DESC "sphere")
+ (FLAGS NDESCBIT)
+ (ACTION GLOBAL-PALANTIRS)>
+
+<OBJECT FOOTPAD
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM FOOTPAD)
+ (DESC "footpad")
+ (ACTION FOOTPAD-F)>
+
+<ROUTINE FOOTPAD-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL "A footpad is a thief." CR>)>>
+
+<OBJECT COMPASS
+ (IN GLOBAL-OBJECTS)
+ (DESC "compass")
+ (SYNONYM COMPASS)
+ (ACTION COMPASS-F)>
+
+<ROUTINE COMPASS-F ()
+ <COND (<VERB? FIND>
+ <TELL
+"It's on your person. And lucky for you, or you would become hopelessly
+lost." CR>)
+ (<VERB? DROP THROW OVERBOARD>
+ <TELL
+"You can't get rid of it. It is an extension of yourself." CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"It's one of those gizmos with a needle and a card with the eight major
+compass directions. Simple, but effective." CR>)
+ (<VERB? READ>
+ <TELL
+"It doesn't make very interesting reading - just the compass directions." CR>)
+ (T
+ <TELL
+"You can't do that. And don't bother to ask why." CR>)>>
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..bd61035
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# zork2
diff --git a/crufty.zil b/crufty.zil
new file mode 100644
index 0000000..f2cda23
--- /dev/null
+++ b/crufty.zil
@@ -0,0 +1,11 @@
+"CRUFTY2 for
+ Zork: The Wizard of Frobozz
+ The Great Underground Empire (Part 2)
+ (c) Copyright 1981 Infocom, Inc. All Rights Reserved.
+"
+
+<ROUTINE I-LANTERN ()
+ <LIGHT-INT ,LAMP I-LANTERN LAMP-TABLE>>
+
+
+
diff --git a/gclock.zil b/gclock.zil
new file mode 100644
index 0000000..6fdf9f2
--- /dev/null
+++ b/gclock.zil
@@ -0,0 +1,66 @@
+"GCLOCK for
+ The Zork Trilogy
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved"
+
+<CONSTANT C-TABLELEN 180>
+
+<GLOBAL C-TABLE <ITABLE NONE 180>>
+
+<GLOBAL C-DEMONS 180>
+
+<GLOBAL C-INTS 180>
+
+<CONSTANT C-INTLEN 6>
+
+<CONSTANT C-ENABLED? 0>
+
+<CONSTANT C-TICK 1>
+
+<CONSTANT C-RTN 2>
+
+<ROUTINE DEMON (RTN TICK "AUX" CINT)
+ #DECL ((RTN) ATOM (TICK) FIX (CINT) <PRIMTYPE VECTOR>)
+ <PUT <SET CINT <INT .RTN T>> ,C-TICK .TICK>
+ .CINT>
+
+<ROUTINE QUEUE (RTN TICK "AUX" CINT)
+ #DECL ((RTN) ATOM (TICK) FIX (CINT) <PRIMTYPE VECTOR>)
+ <PUT <SET CINT <INT .RTN>> ,C-TICK .TICK>
+ .CINT>
+
+<ROUTINE INT (RTN "OPTIONAL" (DEMON <>) E C INT)
+ #DECL ((RTN) ATOM (DEMON) <OR ATOM FALSE> (E C INT) <PRIMTYPE
+ VECTOR>)
+ <SET E <REST ,C-TABLE ,C-TABLELEN>>
+ <SET C <REST ,C-TABLE ,C-INTS>>
+ <REPEAT ()
+ <COND (<==? .C .E>
+ <SETG C-INTS <- ,C-INTS ,C-INTLEN>>
+ <AND .DEMON <SETG C-DEMONS <- ,C-DEMONS ,C-INTLEN>>>
+ <SET INT <REST ,C-TABLE ,C-INTS>>
+ <PUT .INT ,C-RTN .RTN>
+ <RETURN .INT>)
+ (<EQUAL? <GET .C ,C-RTN> .RTN> <RETURN .C>)>
+ <SET C <REST .C ,C-INTLEN>>>>
+
+<GLOBAL CLOCK-WAIT <>>
+
+<ROUTINE CLOCKER ("AUX" C E TICK (FLG <>))
+ #DECL ((C E) <PRIMTYPE VECTOR> (TICK) FIX (FLG) <OR FALSE ATOM>)
+ <COND (,CLOCK-WAIT <SETG CLOCK-WAIT <>> <RFALSE>)>
+ <SET C <REST ,C-TABLE <COND (,P-WON ,C-INTS) (T ,C-DEMONS)>>>
+ <SET E <REST ,C-TABLE ,C-TABLELEN>>
+ <REPEAT ()
+ <COND (<==? .C .E>
+ <COND (<G? <SETG MOVES <+ ,MOVES 1>> 999>
+ <SETG MOVES 0>)>
+ <RETURN .FLG>)
+ (<NOT <0? <GET .C ,C-ENABLED?>>>
+ <SET TICK <GET .C ,C-TICK>>
+ <COND (<0? .TICK>)
+ (T
+ <PUT .C ,C-TICK <- .TICK 1>>
+ <COND (<AND <NOT <G? .TICK 1>>
+ <APPLY <GET .C ,C-RTN>>>
+ <SET FLG T>)>)>)>
+ <SET C <REST .C ,C-INTLEN>>>>
diff --git a/gglobals.zil b/gglobals.zil
new file mode 100644
index 0000000..43d9490
--- /dev/null
+++ b/gglobals.zil
@@ -0,0 +1,316 @@
+ "Generic GLOBALS file for
+ The ZORK Trilogy
+ started on 7/28/83 by MARC"
+
+"SUBTITLE GLOBAL OBJECTS"
+
+<OBJECT GLOBAL-OBJECTS
+ (FLAGS RMUNGBIT INVISIBLE TOUCHBIT SURFACEBIT TRYTAKEBIT
+ OPENBIT SEARCHBIT TRANSBIT ONBIT RLANDBIT FIGHTBIT
+ STAGGERED WEARBIT)>
+
+<OBJECT LOCAL-GLOBALS
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM ZZMGCK)
+ (DESCFCN PATH-OBJECT)
+ (GLOBAL GLOBAL-OBJECTS)
+ (ADVFCN 0)
+ (FDESC "F")
+ (LDESC "F")
+ (PSEUDO "FOOBAR" V-WALK)
+ (CONTFCN 0)
+ (VTYPE 1)
+ (SIZE 0)
+ (CAPACITY 0)>
+
+;"Yes, this synonym for LOCAL-GLOBALS needs to exist... sigh"
+
+<OBJECT ROOMS
+ (IN TO ROOMS)>
+
+<OBJECT INTNUM
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM INTNUM)
+ (FLAGS TOOLBIT)
+ (DESC "number")>
+
+<OBJECT PSEUDO-OBJECT
+ (IN LOCAL-GLOBALS)
+ (DESC "pseudo")
+ (ACTION CRETIN-FCN)>
+
+<OBJECT IT
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM IT THEM HER HIM)
+ (DESC "random object")
+ (FLAGS NDESCBIT TOUCHBIT)>
+
+<OBJECT NOT-HERE-OBJECT
+ (DESC "such thing" ;"[not here]")
+ (ACTION NOT-HERE-OBJECT-F)>
+
+<ROUTINE NOT-HERE-OBJECT-F ("AUX" TBL (PRSO? T) OBJ)
+ ;"This COND is game independent (except the TELL)"
+ <COND (<AND <EQUAL? ,PRSO ,NOT-HERE-OBJECT>
+ <EQUAL? ,PRSI ,NOT-HERE-OBJECT>>
+ <TELL "Those things aren't here!" CR>
+ <RTRUE>)
+ (<EQUAL? ,PRSO ,NOT-HERE-OBJECT>
+ <SET TBL ,P-PRSO>)
+ (T
+ <SET TBL ,P-PRSI>
+ <SET PRSO? <>>)>
+ ;"Here is the default 'cant see any' printer"
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <TELL "You can't see any">
+ <NOT-HERE-PRINT .PRSO?>
+ <TELL " here!" CR>)
+ (T
+ <TELL "The " D ,WINNER " seems confused. \"I don't see any">
+ <NOT-HERE-PRINT .PRSO?>
+ <TELL " here!\"" CR>)>
+ <RTRUE>>
+
+<ROUTINE FIND-NOT-HERE (TBL PRSO? "AUX" M-F OBJ)
+ ;"Here is where special-case code goes. <MOBY-FIND .TBL> returns
+ number of matches. If 1, then P-MOBY-FOUND is it. One may treat
+ the 0 and >1 cases alike or different. It doesn't matter. Always
+ return RFALSE (not handled) if you have resolved the problem."
+ <SET M-F <MOBY-FIND .TBL>>
+ <COND (,DEBUG
+ <TELL "[Moby-found " N .M-F " objects" "]" CR>)>
+ <COND (<AND <G? .M-F 1>
+ <SET OBJ <GETP <1 .TBL> ,P?GLOBAL>>>
+ <SET M-F 1>
+ <SETG P-MOBY-FOUND .OBJ>)>
+ <COND (<==? 1 .M-F>
+ <COND (,DEBUG <TELL "[Namely: " D ,P-MOBY-FOUND "]" CR>)>
+ <COND (.PRSO? <SETG PRSO ,P-MOBY-FOUND>)
+ (T <SETG PRSI ,P-MOBY-FOUND>)>
+ <RFALSE>)
+ (<NOT .PRSO?>
+ <TELL "You wouldn't find any">
+ <NOT-HERE-PRINT .PRSO?>
+ <TELL " there." CR>
+ <RTRUE>)
+ (T ,NOT-HERE-OBJECT)>>
+
+<ROUTINE GLOBAL-NOT-HERE-PRINT (OBJ)
+ ;<COND (,P-MULT <SETG P-NOT-HERE <+ ,P-NOT-HERE 1>>)>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <TELL "You can't see any">
+ <COND (<EQUAL? .OBJ ,PRSO> <PRSO-PRINT>)
+ (T <PRSI-PRINT>)>
+ <TELL " here." CR>>
+
+<ROUTINE NOT-HERE-PRINT (PRSO?)
+ <COND (,P-OFLAG
+ <COND (,P-XADJ <TELL " "> <PRINTB ,P-XADJN>)>
+ <COND (,P-XNAM <TELL " "> <PRINTB ,P-XNAM>)>)
+ (.PRSO?
+ <BUFFER-PRINT <GET ,P-ITBL ,P-NC1> <GET ,P-ITBL ,P-NC1L> <>>)
+ (T
+ <BUFFER-PRINT <GET ,P-ITBL ,P-NC2> <GET ,P-ITBL ,P-NC2L> <>>)>>
+
+<ROUTINE NULL-F ("OPTIONAL" A1 A2)
+ <RFALSE>>
+
+/^L
+
+"Objects shared by all three Zorks go here"
+
+<GLOBAL LOAD-MAX 100>
+
+<GLOBAL LOAD-ALLOWED 100>
+
+<OBJECT BLESSINGS
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM BLESSINGS GRACES)
+ (DESC "blessings")
+ (FLAGS NDESCBIT)>
+
+<OBJECT STAIRS
+ (IN LOCAL-GLOBALS)
+ (SYNONYM STAIRS STEPS STAIRCASE STAIRWAY)
+ (ADJECTIVE STONE DARK MARBLE FORBIDDING STEEP)
+ (DESC "stairs")
+ (FLAGS NDESCBIT CLIMBBIT)
+ (ACTION STAIRS-F)>
+
+<ROUTINE STAIRS-F ()
+ <COND (<VERB? THROUGH>
+ <TELL
+"You should say whether you want to go up or down." CR>)>>
+
+<OBJECT SAILOR
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM SAILOR)
+ (DESC "sailor")
+ (FLAGS NDESCBIT)
+ (ACTION SAILOR-FCN)>
+
+<ROUTINE SAILOR-FCN ()
+ <COND (<VERB? HELLO>
+ <SETG HS <+ ,HS 1>>
+ %<COND (<==? ,ZORK-NUMBER 3>
+ '<COND (<NOT <FSET? ,VIKING-SHIP ,INVISIBLE>>
+ <TELL
+"The seaman looks up and maneuvers the boat toward shore. He cries out \"I
+have waited three ages for someone to say those words and save me from
+sailing this endless ocean. Please accept this gift. You may find it
+useful!\" He throws something which falls near you in the sand, then sails
+off toward the west, singing a lively, but somewhat uncouth, sailor song." CR>
+ <FSET ,VIKING-SHIP ,INVISIBLE>
+ <MOVE ,VIAL ,HERE>)
+ (<==? ,HERE ,FLATHEAD-OCEAN>
+ <COND (,SHIP-GONE
+ <TELL "Nothing happens anymore." CR>)
+ (T
+ <TELL "Nothing happens yet." CR>)>)>)
+ (T
+ '<NULL-F>)>
+ <COND (<0? <MOD ,HS 20>>
+ <TELL "You seem to be repeating yourself." CR>)
+ (<0? <MOD ,HS 10>>
+ <TELL
+"I think that phrase is getting a bit worn out." CR>)
+ (T
+ <TELL "Nothing happens here." CR>)>)>>
+
+<OBJECT GROUND
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM GROUND SAND DIRT FLOOR)
+ (DESC "ground")
+ (ACTION GROUND-FUNCTION)>
+
+<ROUTINE GROUND-FUNCTION ()
+ <COND (<AND <VERB? PUT PUT-ON>
+ <EQUAL? ,PRSI ,GROUND>>
+ <PERFORM ,V?DROP ,PRSO>
+ <RTRUE>)
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '(<EQUAL? ,HERE ,SANDY-CAVE>
+ <SAND-FUNCTION>))
+ (T
+ '(<NULL-F>
+ <RFALSE>))>
+ (<VERB? DIG>
+ <TELL "The ground is too hard for digging here." CR>)>>
+
+<OBJECT GRUE
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM GRUE)
+ (ADJECTIVE LURKING SINISTER HUNGRY SILENT)
+ (DESC "lurking grue")
+ (ACTION GRUE-FUNCTION)>
+
+<ROUTINE GRUE-FUNCTION ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The grue is a sinister, lurking presence in the dark places of the
+earth. Its favorite diet is adventurers, but its insatiable
+appetite is tempered by its fear of light. No grue has ever been
+seen by the light of day, and few have survived its fearsome jaws
+to tell the tale." CR>)
+ (<VERB? FIND>
+ <TELL
+"There is no grue here, but I'm sure there is at least one lurking
+in the darkness nearby. I wouldn't let my light go out if I were
+you!" CR>)
+ (<VERB? LISTEN>
+ <TELL
+"It makes no sound but is always lurking in the darkness nearby." CR>)>>
+
+<OBJECT LUNGS
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM LUNGS AIR MOUTH BREATH)
+ (DESC "blast of air")
+ (FLAGS NDESCBIT)>
+
+<OBJECT ME
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM ME MYSELF SELF CRETIN)
+ (DESC "you")
+ (FLAGS ACTORBIT)
+ (ACTION CRETIN-FCN)>
+
+<ROUTINE CRETIN-FCN ()
+ <COND (<VERB? TELL>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <TELL
+"Talking to yourself is said to be a sign of impending mental collapse." CR>)
+ (<AND <VERB? GIVE>
+ <EQUAL? ,PRSI ,ME>>
+ <PERFORM ,V?TAKE ,PRSO>
+ <RTRUE>)
+ (<VERB? MAKE>
+ <TELL "Only you can do that." CR>)
+ (<VERB? DISEMBARK>
+ <TELL "You'll have to do that on your own." CR>)
+ (<VERB? EAT>
+ <TELL "Auto-cannibalism is not the answer." CR>)
+ (<VERB? ATTACK MUNG>
+ <COND (<AND ,PRSI <FSET? ,PRSI ,WEAPONBIT>>
+ <JIGS-UP "If you insist.... Poof, you're dead!">)
+ (T
+ <TELL "Suicide is not the answer." CR>)>)
+ (<VERB? TAKE>
+ <TELL "How romantic!" CR>)
+ (<VERB? EXAMINE>
+ <COND %<COND (<==? ,ZORK-NUMBER 1>
+ '(<EQUAL? ,HERE <LOC ,MIRROR-1> <LOC ,MIRROR-2>>
+ <TELL
+"Your image in the mirror looks tired." CR>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ (T
+ <TELL
+"That's difficult unless your eyes are prehensile." CR>)>)>>
+
+<OBJECT ADVENTURER
+ (SYNONYM ADVENTURER)
+ (DESC "cretin")
+ (FLAGS NDESCBIT INVISIBLE SACREDBIT ACTORBIT)
+ (STRENGTH 0)
+ (ACTION 0)>
+
+<OBJECT PATHOBJ
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM PASSAGE CRAWLWAY TRAIL PATH)
+ (ADJECTIVE FOREST NARROW LONG WINDING)
+ (DESC "way")
+ (FLAGS NDESCBIT)
+ (ACTION PATH-OBJECT)>
+
+<ROUTINE PATH-OBJECT ()
+ <COND (<VERB? TAKE FOLLOW>
+ <TELL "You must specify a direction to go." CR>)
+ (<VERB? FIND>
+ <TELL "I can't help you there...." CR>)
+ (<VERB? DIG>
+ <TELL "Not a chance." CR>)>>
+
+<OBJECT ZORKMID
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM ZORKMID)
+ (DESC "zorkmid")
+ (ACTION ZORKMID-FUNCTION)>
+
+<ROUTINE ZORKMID-FUNCTION ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The zorkmid is the unit of currency of the Great Underground Empire." CR>)
+ (<VERB? FIND>
+ <TELL
+"The best way to find zorkmids is to go out and look for them." CR>)>>
+
+<OBJECT HANDS
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM PAIR HANDS HAND)
+ (ADJECTIVE BARE)
+ (DESC "pair of hands")
+ (FLAGS NDESCBIT TOOLBIT)> \ No newline at end of file
diff --git a/gmacros.zil b/gmacros.zil
new file mode 100644
index 0000000..ee734df
--- /dev/null
+++ b/gmacros.zil
@@ -0,0 +1,158 @@
+"GMACROS for
+ The Zork Trilogy
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved"
+
+<SETG C-ENABLED? 0>
+<SETG C-ENABLED 1>
+<SETG C-DISABLED 0>
+
+<DEFMAC TELL ("ARGS" A)
+ <FORM PROG ()
+ !<MAPF ,LIST
+ <FUNCTION ("AUX" E P O)
+ <COND (<EMPTY? .A> <MAPSTOP>)
+ (<SET E <NTH .A 1>>
+ <SET A <REST .A>>)>
+ <COND (<TYPE? .E ATOM>
+ <COND (<OR <=? <SET P <SPNAME .E>>
+ "CRLF">
+ <=? .P "CR">>
+ <MAPRET '<CRLF>>)
+ (<EMPTY? .A>
+ <ERROR INDICATOR-AT-END? .E>)
+ (ELSE
+ <SET O <NTH .A 1>>
+ <SET A <REST .A>>
+ <COND (<OR <=? <SET P <SPNAME .E>>
+ "DESC">
+ <=? .P "D">
+ <=? .P "OBJ">
+ <=? .P "O">>
+ <MAPRET <FORM PRINTD .O>>)
+ (<OR <=? .P "A">
+ <=? .P "AN">>
+ <MAPRET <FORM PRINTA .O>>)
+ (<OR <=? .P "NUM">
+ <=? .P "N">>
+ <MAPRET <FORM PRINTN .O>>)
+ (<OR <=? .P "CHAR">
+ <=? .P "CHR">
+ <=? .P "C">>
+ <MAPRET <FORM PRINTC .O>>)
+ (ELSE
+ <MAPRET
+ <FORM PRINT
+ <FORM GETP .O .E>>>)>)>)
+ (<TYPE? .E STRING ZSTRING>
+ <MAPRET <FORM PRINTI .E>>)
+ (<TYPE? .E FORM>
+ <MAPRET <FORM PRINT .E>>)
+ (ELSE <ERROR UNKNOWN-TYPE .E>)>>>>>
+
+<ROUTINE PRINTA (O)
+ <TELL "a " D .O>>
+
+<DEFMAC VERB? ("ARGS" ATMS)
+ <MULTIFROB PRSA .ATMS>>
+
+<DEFMAC PRSO? ("ARGS" ATMS)
+ <MULTIFROB PRSO .ATMS>>
+
+<DEFMAC PRSI? ("ARGS" ATMS)
+ <MULTIFROB PRSI .ATMS>>
+
+<DEFMAC ROOM? ("ARGS" ATMS)
+ <MULTIFROB HERE .ATMS>>
+
+<DEFINE MULTIFROB (X ATMS "AUX" (OO (OR)) (O .OO) (L ()) ATM)
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS>
+ <RETURN!- <COND (<LENGTH? .OO 1> <ERROR .X>)
+ (<LENGTH? .OO 2> <NTH .OO 2>)
+ (ELSE <CHTYPE .OO FORM>)>>)>
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS> <RETURN!->)>
+ <SET ATM <NTH .ATMS 1>>
+ <SET L
+ (<COND (<TYPE? .ATM ATOM>
+ <FORM GVAL
+ <COND (<==? .X PRSA>
+ <PARSE
+ <STRING "V?"
+ <SPNAME .ATM>>>)
+ (ELSE .ATM)>>)
+ (ELSE .ATM)>
+ !.L)>
+ <SET ATMS <REST .ATMS>>
+ <COND (<==? <LENGTH .L> 3> <RETURN!->)>>
+ <SET O <REST <PUTREST .O (<FORM EQUAL? <FORM GVAL .X> !.L>)>>>
+ <SET L ()>>>
+
+<DEFMAC BSET ('OBJ "ARGS" BITS)
+ <MULTIBITS FSET .OBJ .BITS>>
+
+<DEFMAC BCLEAR ('OBJ "ARGS" BITS)
+ <MULTIBITS FCLEAR .OBJ .BITS>>
+
+<DEFMAC BSET? ('OBJ "ARGS" BITS)
+ <MULTIBITS FSET? .OBJ .BITS>>
+
+<DEFINE MULTIBITS (X OBJ ATMS "AUX" (O ()) ATM)
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS>
+ <RETURN!- <COND (<LENGTH? .O 1> <NTH .O 1>)
+ (<==? .X FSET?> <FORM OR !.O>)
+ (ELSE <FORM PROG () !.O>)>>)>
+ <SET ATM <NTH .ATMS 1>>
+ <SET ATMS <REST .ATMS>>
+ <SET O
+ (<FORM .X
+ .OBJ
+ <COND (<TYPE? .ATM FORM> .ATM)
+ (ELSE <FORM GVAL .ATM>)>>
+ !.O)>>>
+
+<DEFMAC RFATAL ()
+ '<PROG () <PUSH 2> <RSTACK>>>
+
+<DEFMAC PROB ('BASE? "OPTIONAL" 'LOSER?)
+ <COND (<ASSIGNED? LOSER?> <FORM ZPROB .BASE?>)
+ (ELSE <FORM G? .BASE? '<RANDOM 100>>)>>
+
+<ROUTINE ZPROB
+ (BASE)
+ <COND (,LUCKY <G? .BASE <RANDOM 100>>)
+ (ELSE <G? .BASE <RANDOM 300>>)>>
+
+<ROUTINE RANDOM-ELEMENT (FROB)
+ <GET .FROB <RANDOM <GET .FROB 0>>>>
+
+<ROUTINE PICK-ONE (FROB
+ "AUX" (L <GET .FROB 0>) (CNT <GET .FROB 1>) RND MSG RFROB)
+ <SET L <- .L 1>>
+ <SET FROB <REST .FROB 2>>
+ <SET RFROB <REST .FROB <* .CNT 2>>>
+ <SET RND <RANDOM <- .L .CNT>>>
+ <SET MSG <GET .RFROB .RND>>
+ <PUT .RFROB .RND <GET .RFROB 1>>
+ <PUT .RFROB 1 .MSG>
+ <SET CNT <+ .CNT 1>>
+ <COND (<==? .CNT .L> <SET CNT 0>)>
+ <PUT .FROB 0 .CNT>
+ .MSG>
+
+<DEFMAC ENABLE ('INT) <FORM PUT .INT ,C-ENABLED? 1>>
+
+<DEFMAC DISABLE ('INT) <FORM PUT .INT ,C-ENABLED? 0>>
+
+<DEFMAC FLAMING? ('OBJ)
+ <FORM AND <FORM FSET? .OBJ ',FLAMEBIT>
+ <FORM FSET? .OBJ ',ONBIT>>>
+
+<DEFMAC OPENABLE? ('OBJ)
+ <FORM OR <FORM FSET? .OBJ ',DOORBIT>
+ <FORM FSET? .OBJ ',CONTBIT>>>
+
+<DEFMAC ABS ('NUM)
+ <FORM COND (<FORM L? .NUM 0> <FORM - 0 .NUM>)
+ (T .NUM)>> \ No newline at end of file
diff --git a/gmain.zil b/gmain.zil
new file mode 100644
index 0000000..9cd6685
--- /dev/null
+++ b/gmain.zil
@@ -0,0 +1,298 @@
+ "Generic MAIN file for
+ The ZORK Trilogy
+ started on 7/28/83 by MARC"
+
+<GLOBAL PLAYER <>>
+
+<GLOBAL P-WON <>>
+
+<CONSTANT M-FATAL 2>
+
+<CONSTANT M-HANDLED 1>
+
+<CONSTANT M-NOT-HANDLED <>>
+
+<CONSTANT M-OBJECT <>>
+
+<CONSTANT M-BEG 1>
+
+<CONSTANT M-END 6>
+
+<CONSTANT M-ENTER 2>
+
+<CONSTANT M-LOOK 3>
+
+<CONSTANT M-FLASH 4>
+
+<CONSTANT M-OBJDESC 5>
+
+<GLOBAL DEBUG <>>
+
+;"GO now lives in SPECIAL.ZIL"
+
+
+<ROUTINE MAIN-LOOP ("AUX" ICNT OCNT NUM CNT OBJ TBL V PTBL OBJ1 TMP)
+ <REPEAT ()
+ <SET CNT 0>
+ <SET OBJ <>>
+ <SET PTBL T>
+ <COND (<SETG P-WON <PARSER>>
+ <SET ICNT <GET ,P-PRSI ,P-MATCHLEN>>
+ <SET NUM
+ <COND (<0? <SET OCNT <GET ,P-PRSO ,P-MATCHLEN>>> .OCNT)
+ (<G? .OCNT 1>
+ <SET TBL ,P-PRSO>
+ <COND (<0? .ICNT> <SET OBJ <>>)
+ (T <SET OBJ <GET ,P-PRSI 1>>)>
+ .OCNT)
+ (<G? .ICNT 1>
+ <SET PTBL <>>
+ <SET TBL ,P-PRSI>
+ <SET OBJ <GET ,P-PRSO 1>>
+ .ICNT)
+ (T 1)>>
+ <COND (<AND <NOT .OBJ> <1? .ICNT>> <SET OBJ <GET ,P-PRSI 1>>)>
+ <COND (<==? ,PRSA ,V?WALK> <SET V <PERFORM ,PRSA ,PRSO>>)
+ (<0? .NUM>
+ <COND (<0? <BAND <GETB ,P-SYNTAX ,P-SBITS> ,P-SONUMS>>
+ <SET V <PERFORM ,PRSA>>
+ <SETG PRSO <>>)
+ (<NOT ,LIT>
+ <TELL "It's too dark to see." CR>)
+ (T
+ <TELL "It's not clear what you're referring to." CR>
+ <SET V <>>)>)
+ (T
+ <SETG P-NOT-HERE 0>
+ <SETG P-MULT <>>
+ <COND (<G? .NUM 1> <SETG P-MULT T>)>
+ <SET TMP <>>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> .NUM>
+ <COND (<G? ,P-NOT-HERE 0>
+ <TELL "The ">
+ <COND (<NOT <EQUAL? ,P-NOT-HERE .NUM>>
+ <TELL "other ">)>
+ <TELL "object">
+ <COND (<NOT <EQUAL? ,P-NOT-HERE 1>>
+ <TELL "s">)>
+ <TELL " that you mentioned ">
+ <COND (<NOT <EQUAL? ,P-NOT-HERE 1>>
+ <TELL "are">)
+ (T <TELL "is">)>
+ <TELL "n't here." CR>)
+ (<NOT .TMP>
+ <TELL
+"There's nothing here to take." CR>)>
+ <RETURN>)
+ (T
+ <COND (.PTBL <SET OBJ1 <GET ,P-PRSO .CNT>>)
+ (T <SET OBJ1 <GET ,P-PRSI .CNT>>)>
+ <SETG PRSO <COND (.PTBL .OBJ1) (T .OBJ)>>
+ <SETG PRSI <COND (.PTBL .OBJ) (T .OBJ1)>>
+ <COND (<OR <G? .NUM 1>
+ <EQUAL? <GET <GET ,P-ITBL ,P-NC1>
+ 0>
+ ,W?ALL>>
+ <SET V <LOC ,WINNER>>
+ <COND (<EQUAL? .OBJ1
+ ,NOT-HERE-OBJECT>
+ <SETG P-NOT-HERE
+ <+ ,P-NOT-HERE 1>>
+ <AGAIN>)
+ (<AND <VERB? TAKE>
+ ,PRSI
+ <EQUAL? <GET <GET ,P-ITBL
+ ,P-NC1>
+ 0>
+ ,W?ALL>
+ <NOT <IN? ,PRSO ,PRSI>>>
+ <AGAIN>)
+ (<AND <EQUAL? ,P-GETFLAGS
+ ,P-ALL>
+ <VERB? TAKE>
+ <OR <AND <NOT <EQUAL?
+ <LOC .OBJ1>
+ ,WINNER
+ .V>>
+ <NOT <FSET?
+ <LOC .OBJ1>
+ ,SURFACEBIT>>>
+ <NOT <OR <FSET? .OBJ1
+ ,TAKEBIT>
+ <FSET? .OBJ1
+ ,TRYTAKEBIT>>>>>
+ <AGAIN>)
+ (T
+ <COND (<EQUAL? .OBJ1 ,IT>
+ <PRINTD ,P-IT-OBJECT>)
+ (T <PRINTD .OBJ1>)>
+ <TELL ": ">)>)>
+ <SET TMP T>
+ <SET V <PERFORM ,PRSA ,PRSO ,PRSI>>
+ <COND (<==? .V ,M-FATAL> <RETURN>)>)>>)>
+ <COND (<NOT <==? .V ,M-FATAL>>
+ ;<COND (<==? <LOC ,WINNER> ,PRSO>
+ <SETG PRSO <>>)>
+ <SET V <APPLY <GETP <LOC ,WINNER> ,P?ACTION> ,M-END>>)>
+ <COND (<VERB? AGAIN WALK SAVE RESTORE SCORE VERSION ;WAIT> T)
+ (T
+ <SETG L-PRSA ,PRSA>
+ <SETG L-PRSO ,PRSO>
+ <SETG L-PRSI ,PRSI>)>
+ <COND (<==? .V ,M-FATAL> <SETG P-CONT <>>)>)
+ (T
+ <SETG P-CONT <>>)>
+ <COND (,P-WON
+ <COND (<VERB? TELL BRIEF SUPER-BRIEF VERBOSE SAVE VERSION
+ QUIT RESTART SCORE SCRIPT UNSCRIPT RESTORE> T)
+ (T <SET V <CLOCKER>>)>)>>>
+
+<GLOBAL L-PRSA <>>
+
+<GLOBAL L-PRSO <>>
+
+<GLOBAL L-PRSI <>>
+
+<GLOBAL P-MULT <>>
+
+<GLOBAL P-NOT-HERE 0>
+
+
+
+%<COND (<GASSIGNED? PREDGEN>
+
+'<ROUTINE PERFORM (A "OPTIONAL" (O <>) (I <>) "AUX" V OA OO OI)
+ <COND (,DEBUG
+ <TELL "[Perform: ">
+ %<COND (<GASSIGNED? PREDGEN> '<TELL N .A>)
+ (T '<PRINC <NTH ,ACTIONS <+ <* .A 2> 1>>>)>
+ <COND (<AND .O <NOT <==? .A ,V?WALK>>>
+ <TELL "/" D .O>)>
+ <COND (.I <TELL "/" D .I>)>
+ <TELL "]" CR>)>
+ <SET OA ,PRSA>
+ <SET OO ,PRSO>
+ <SET OI ,PRSI>
+ <COND (<AND <EQUAL? ,IT .I .O>
+ <NOT <EQUAL? ,P-IT-LOC ,HERE>>>
+ <TELL "I don't see what you are referring to." CR>
+ <RFATAL>)>
+ <COND (<==? .O ,IT> <SET O ,P-IT-OBJECT>)>
+ <COND (<==? .I ,IT> <SET I ,P-IT-OBJECT>)>
+ <SETG PRSA .A>
+ <SETG PRSO .O>
+ <COND (<AND ,PRSO <NOT <EQUAL? ,PRSI ,IT>> <NOT <VERB? WALK>>>
+ <SETG P-IT-OBJECT ,PRSO>
+ <SETG P-IT-LOC ,HERE>)>
+ <SETG PRSI .I>
+ <COND (<AND <EQUAL? ,NOT-HERE-OBJECT ,PRSO ,PRSI>
+ <SET V <NOT-HERE-OBJECT-F>>> .V)
+ (T
+ <SET O ,PRSO>
+ <SET I ,PRSI>
+ <COND
+ (<SET V <APPLY <GETP ,WINNER ,P?ACTION>>> .V)
+ (<SET V <APPLY <GETP <LOC ,WINNER> ,P?ACTION> ,M-BEG>> .V)
+ (<SET V <APPLY <GET ,PREACTIONS .A>>> .V)
+ (<AND .I <SET V <APPLY <GETP .I ,P?ACTION>>>> .V)
+ (<AND .O
+ <NOT <==? .A ,V?WALK>>
+ <LOC .O>
+ <SET V <APPLY <GETP <LOC .O> ,P?CONTFCN>>>>
+ .V)
+ (<AND .O
+ <NOT <==? .A ,V?WALK>>
+ <SET V <APPLY <GETP .O ,P?ACTION>>>>
+ .V)
+ (<SET V <APPLY <GET ,ACTIONS .A>>> .V)>)>
+ <SETG PRSA .OA>
+ <SETG PRSO .OO>
+ <SETG PRSI .OI>
+ .V>)
+ (T
+
+'<PROG ()
+
+<SETG DEBUG <>>
+
+<ROUTINE PERFORM (A "OPTIONAL" (O <>) (I <>) "AUX" V OA OO OI)
+ #DECL ((A) FIX (O) <OR FALSE OBJECT FIX> (I) <OR FALSE OBJECT> (V) ANY)
+ <COND (,DEBUG
+ <TELL "** PERFORM: PRSA = ">
+ <PRINC <NTH ,ACTIONS <+ <* .A 2> 1>>>
+ <COND (<AND .O <NOT <==? .A ,V?WALK>>>
+ <TELL " | PRSO = " D .O>)>
+ <COND (.I <TELL " | PRSI = " D .I>)>)>
+ <SET OA ,PRSA>
+ <SET OO ,PRSO>
+ <SET OI ,PRSI>
+ <COND (<AND <EQUAL? ,IT .I .O>
+ <NOT <EQUAL? ,P-IT-LOC ,HERE>>>
+ <TELL "I don't see what you are referring to." CR>
+ <RFATAL>)>
+ <COND (<==? .O ,IT> <SET O ,P-IT-OBJECT>)>
+ <COND (<==? .I ,IT> <SET I ,P-IT-OBJECT>)>
+ <SETG PRSA .A>
+ <SETG PRSO .O>
+ <COND (<AND ,PRSO <NOT <VERB? WALK>>>
+ <SETG P-IT-OBJECT ,PRSO>
+ <SETG P-IT-LOC ,HERE>)>
+ <SETG PRSI .I>
+ <COND (<AND <EQUAL? ,NOT-HERE-OBJECT ,PRSO ,PRSI>
+ <SET V <D-APPLY "Not Here" ,NOT-HERE-OBJECT-F>>> .V)
+ (T
+ <SET O ,PRSO>
+ <SET I ,PRSI>
+ <COND (<SET V <DD-APPLY "Actor" ,WINNER
+ <GETP ,WINNER ,P?ACTION>>> .V)
+ (<SET V <D-APPLY "Room (M-BEG)"
+ <GETP <LOC ,WINNER> ,P?ACTION>
+ ,M-BEG>> .V)
+ (<SET V <D-APPLY "Preaction"
+ <GET ,PREACTIONS .A>>> .V)
+ (<AND .I <SET V <D-APPLY "PRSI"
+ <GETP .I ,P?ACTION>>>> .V)
+ (<AND .O
+ <NOT <==? .A ,V?WALK>>
+ <LOC .O>
+ <GETP <LOC .O> ,P?CONTFCN>
+ <SET V <DD-APPLY "Container" <LOC .O>
+ <GETP <LOC .O> ,P?CONTFCN>>>>
+ .V)
+ (<AND .O
+ <NOT <==? .A ,V?WALK>>
+ <SET V <D-APPLY "PRSO"
+ <GETP .O ,P?ACTION>>>>
+ .V)
+ (<SET V <D-APPLY <>
+ <GET ,ACTIONS .A>>> .V)>)>
+ <SETG PRSA .OA>
+ <SETG PRSO .OO>
+ <SETG PRSI .OI>
+ .V>
+
+<DEFINE D-APPLY (STR FCN "OPTIONAL" FOO "AUX" RES)
+ <COND (<NOT .FCN> <>)
+ (T
+ <COND (,DEBUG
+ <COND (<NOT .STR>
+ <TELL CR " Default ->" CR>)
+ (T <TELL CR " " .STR " -> ">)>)>
+ <SET RES
+ <COND (<ASSIGNED? FOO>
+ <APPLY .FCN .FOO>)
+ (T <APPLY .FCN>)>>
+ <COND (<AND ,DEBUG .STR>
+ <COND (<==? .RES 2>
+ <TELL "Fatal" CR>)
+ (<NOT .RES>
+ <TELL "Not handled">)
+ (T <TELL "Handled" CR>)>)>
+ .RES)>>
+
+<ROUTINE DD-APPLY (STR OBJ FCN "OPTIONAL" (FOO <>))
+ <COND (,DEBUG <TELL "[" D .OBJ "=]">)>
+ <D-APPLY .STR .FCN .FOO>>
+>)>
+
diff --git a/gparser.zil b/gparser.zil
new file mode 100644
index 0000000..31a6bf1
--- /dev/null
+++ b/gparser.zil
@@ -0,0 +1,1194 @@
+ "Generic PARSER file for
+ The ZORK Trilogy
+ started on 7/28/83 by MARC"
+
+"WHICH and TRAP retrofixes installed"
+
+"Parser global variable convention: All parser globals will
+ begin with 'P-'. Local variables are not restricted in any
+ way.
+"
+
+<SETG SIBREAKS ".,\"">
+
+<GLOBAL GWIM-DISABLE <>>
+
+<GLOBAL PRSA <>>
+
+<GLOBAL PRSI <>>
+
+<GLOBAL PRSO <>>
+
+<GLOBAL P-TABLE 0>
+
+<GLOBAL P-ONEOBJ 0>
+
+<GLOBAL P-SYNTAX 0>
+
+<GLOBAL P-CCSRC 0>
+
+<GLOBAL P-LEN 0>
+
+<GLOBAL P-DIR 0>
+
+<GLOBAL HERE 0>
+
+<GLOBAL WINNER 0>
+
+<GLOBAL P-LEXV <ITABLE BYTE 120>>
+;"INBUF - Input buffer for READ"
+
+<GLOBAL P-INBUF <ITABLE BYTE 100>>
+;"Parse-cont variable"
+
+<GLOBAL P-CONT <>>
+
+<GLOBAL P-IT-OBJECT <>>
+<GLOBAL P-IT-LOC <>>
+
+;"Orphan flag"
+
+<GLOBAL P-OFLAG <>>
+
+<GLOBAL P-MERGED <>>
+
+<GLOBAL P-ACLAUSE <>>
+
+<GLOBAL P-ANAM <>>
+
+<GLOBAL P-AADJ <>>
+;"Parser variables and temporaries"
+
+<CONSTANT P-PHRLEN 3>
+
+<CONSTANT P-ORPHLEN 7>
+
+<CONSTANT P-RTLEN 3>
+;"Byte offset to # of entries in LEXV"
+
+<CONSTANT P-LEXWORDS 1>
+;"Word offset to start of LEXV entries"
+
+<CONSTANT P-LEXSTART 1>
+;"Number of words per LEXV entry"
+
+<CONSTANT P-LEXELEN 2>
+
+<CONSTANT P-WORDLEN 4>
+;"Offset to parts of speech byte"
+
+<CONSTANT P-PSOFF 4>
+;"Offset to first part of speech"
+
+<CONSTANT P-P1OFF 5>
+;"First part of speech bit mask in PSOFF byte"
+
+<CONSTANT P-P1BITS 3>
+
+<CONSTANT P-ITBLLEN 9>
+
+<GLOBAL P-ITBL <TABLE 0 0 0 0 0 0 0 0 0 0>>
+
+<GLOBAL P-OTBL <TABLE 0 0 0 0 0 0 0 0 0 0>>
+
+<GLOBAL P-VTBL <TABLE 0 0 0 0>>
+
+<GLOBAL P-NCN 0>
+
+<CONSTANT P-VERB 0>
+
+<CONSTANT P-VERBN 1>
+
+<CONSTANT P-PREP1 2>
+
+<CONSTANT P-PREP1N 3>
+
+<CONSTANT P-PREP2 4>
+
+<CONSTANT P-PREP2N 5>
+
+<CONSTANT P-NC1 6>
+
+<CONSTANT P-NC1L 7>
+
+<CONSTANT P-NC2 8>
+
+<CONSTANT P-NC2L 9>
+
+<GLOBAL QUOTE-FLAG <>>
+
+" Grovel down the input finding the verb, prepositions, and noun clauses.
+ If the input is <direction> or <walk> <direction>, fall out immediately
+ setting PRSA to ,V?WALK and PRSO to <direction>. Otherwise, perform
+ all required orphaning, syntax checking, and noun clause lookup."
+
+<ROUTINE PARSER ("AUX" (PTR ,P-LEXSTART) WRD (VAL 0) (VERB <>)
+ LEN (DIR <>) (NW 0) (LW 0) NUM SCNT (CNT -1))
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN> <RETURN>)
+ (T <PUT ,P-ITBL .CNT 0>)>>
+ <SETG P-ADVERB <>>
+ <SETG P-MERGED <>>
+ <PUT ,P-PRSO ,P-MATCHLEN 0>
+ <PUT ,P-PRSI ,P-MATCHLEN 0>
+ <PUT ,P-BUTS ,P-MATCHLEN 0>
+ <COND (<AND <NOT ,QUOTE-FLAG> <N==? ,WINNER ,PLAYER>>
+ <SETG WINNER ,PLAYER>
+ <COND (<NOT <FSET? <LOC ,WINNER> ,VEHBIT>>
+ <SETG HERE <LOC ,WINNER>>)>
+ <SETG LIT <LIT? ,HERE>>)>
+ <COND (,P-CONT
+ <SET PTR ,P-CONT>
+ <COND (<AND <NOT ,SUPER-BRIEF>
+ <==? ,PLAYER ,WINNER>
+ <NOT <VERB? SAY>>>
+ <CRLF>)>
+ <SETG P-CONT <>>)
+ (T
+ <SETG WINNER ,PLAYER>
+ <SETG QUOTE-FLAG <>>
+ <COND (<NOT <FSET? <LOC ,WINNER> ,VEHBIT>>
+ <SETG HERE <LOC ,WINNER>>)>
+ <SETG LIT <LIT? ,HERE>>
+ <COND (<NOT ,SUPER-BRIEF> <CRLF>)>
+ <TELL ">">
+ <READ ,P-INBUF ,P-LEXV>)>
+ <SETG P-LEN <GETB ,P-LEXV ,P-LEXWORDS>>
+ <COND (<0? ,P-LEN> <TELL "I beg your pardon?" CR> <RFALSE>)>
+ <SET LEN ,P-LEN>
+ <SETG P-DIR <>>
+ <SETG P-NCN 0>
+ <SETG P-GETFLAGS 0>
+ <REPEAT ()
+ <COND (<L? <SETG P-LEN <- ,P-LEN 1>> 0>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)
+ (<OR <SET WRD <GET ,P-LEXV .PTR>>
+ <SET WRD <NUMBER? .PTR>>>
+ <COND (<AND <==? .WRD ,W?TO>
+ <EQUAL? .VERB ,ACT?TELL ;,ACT?ASK>>
+ <SET WRD ,W?QUOTE>)
+ (<AND <==? .WRD ,W?THEN>
+ <NOT .VERB>
+ <NOT ,QUOTE-FLAG> ;"Last NOT added 7/3">
+ <PUT ,P-ITBL ,P-VERB ,ACT?TELL>
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <SET WRD ,W?QUOTE>)>
+ <COND (<OR <EQUAL? .WRD ,W?THEN ,W?PERIOD>
+ <EQUAL? .WRD ,W?QUOTE>>
+ <COND (<EQUAL? .WRD ,W?QUOTE>
+ <COND (,QUOTE-FLAG
+ <SETG QUOTE-FLAG <>>)
+ (T <SETG QUOTE-FLAG T>)>)>
+ <OR <0? ,P-LEN>
+ <SETG P-CONT <+ .PTR ,P-LEXELEN>>>
+ <PUTB ,P-LEXV ,P-LEXWORDS ,P-LEN>
+ <RETURN>)
+ (<AND <SET VAL
+ <WT? .WRD
+ ,PS?DIRECTION
+ ,P1?DIRECTION>>
+ <EQUAL? .VERB <> ,ACT?WALK>
+ <OR <==? .LEN 1>
+ <AND <==? .LEN 2>
+ <EQUAL? .VERB ,ACT?WALK>>
+ <AND <EQUAL? <SET NW
+ <GET ,P-LEXV
+ <+ .PTR ,P-LEXELEN>>>
+ ,W?THEN
+ ,W?PERIOD
+ ,W?QUOTE>
+ <NOT <L? .LEN 2>>>
+ <AND ,QUOTE-FLAG
+ <==? .LEN 2>
+ <EQUAL? .NW ,W?QUOTE>>
+ <AND <G? .LEN 2>
+ <EQUAL? .NW ,W?COMMA ,W?AND>>>>
+ <SET DIR .VAL>
+ <COND (<EQUAL? .NW ,W?COMMA ,W?AND>
+ <PUT ,P-LEXV
+ <+ .PTR ,P-LEXELEN>
+ ,W?THEN>)>
+ <COND (<NOT <G? .LEN 2>>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)>)
+ (<AND <SET VAL <WT? .WRD ,PS?VERB ,P1?VERB>>
+ <NOT .VERB>>
+ <SET VERB .VAL>
+ <PUT ,P-ITBL ,P-VERB .VAL>
+ <PUT ,P-ITBL ,P-VERBN ,P-VTBL>
+ <PUT ,P-VTBL 0 .WRD>
+ <PUTB ,P-VTBL 2 <GETB ,P-LEXV
+ <SET NUM
+ <+ <* .PTR 2> 2>>>>
+ <PUTB ,P-VTBL 3 <GETB ,P-LEXV <+ .NUM 1>>>)
+ (<OR <SET VAL <WT? .WRD ,PS?PREPOSITION 0>>
+ <AND <OR <EQUAL? .WRD ,W?ALL ,W?ONE ;,W?A>
+ <WT? .WRD ,PS?ADJECTIVE>
+ <WT? .WRD ,PS?OBJECT>>
+ <SET VAL 0>>>
+ <COND (<AND <G? ,P-LEN 0>
+ <==? <GET ,P-LEXV
+ <+ .PTR ,P-LEXELEN>>
+ ,W?OF>
+ <0? .VAL>
+ <NOT
+ <EQUAL? .WRD ,W?ALL ,W?ONE ,W?A>>>)
+ (<AND <NOT <0? .VAL>>
+ <OR <0? ,P-LEN>
+ <EQUAL? <GET ,P-LEXV <+ .PTR 2>>
+ ,W?THEN ,W?PERIOD>>>
+ <COND (<L? ,P-NCN 2>
+ <PUT ,P-ITBL ,P-PREP1 .VAL>
+ <PUT ,P-ITBL ,P-PREP1N .WRD>)>)
+ (<==? ,P-NCN 2>
+ <TELL
+"There were too many nouns in that sentence." CR>
+ <RFALSE>)
+ (T
+ <SETG P-NCN <+ ,P-NCN 1>>
+ <OR <SET PTR <CLAUSE .PTR .VAL .WRD>>
+ <RFALSE>>
+ <COND (<L? .PTR 0>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)>)>)
+ (<WT? .WRD ,PS?BUZZ-WORD>)
+ (<AND <EQUAL? .VERB ,ACT?TELL>
+ <WT? .WRD ,PS?VERB ,P1?VERB>>
+ <TELL
+"Please consult your manual for the correct way to talk to other people
+or creatures." CR>
+ <RFALSE>)
+ (T
+ <CANT-USE .PTR>
+ <RFALSE>)>)
+ (T
+ <UNKNOWN-WORD .PTR>
+ <RFALSE>)>
+ <SET LW .WRD>
+ <SET PTR <+ .PTR ,P-LEXELEN>>>
+ <COND (.DIR
+ <SETG PRSA ,V?WALK>
+ <SETG PRSO .DIR>
+ <SETG P-WALK-DIR .DIR>
+ <RETURN T>)>
+ <SETG P-WALK-DIR <>>
+ <COND (,P-OFLAG <ORPHAN-MERGE>)>
+ <COND (<AND <SYNTAX-CHECK> <SNARF-OBJECTS> <MANY-CHECK> <TAKE-CHECK>>
+ T)>>
+
+
+<GLOBAL P-WALK-DIR <>>
+
+;"Check whether word pointed at by PTR is the correct part of speech.
+ The second argument is the part of speech (,PS?<part of speech>). The
+ 3rd argument (,P1?<part of speech>), if given, causes the value
+ for that part of speech to be returned."
+
+<ROUTINE WT? (PTR BIT "OPTIONAL" (B1 5) "AUX" (OFFS ,P-P1OFF) TYP)
+ <COND (<BTST <SET TYP <GETB .PTR ,P-PSOFF>> .BIT>
+ <COND (<G? .B1 4> <RTRUE>)
+ (T
+ <SET TYP <BAND .TYP ,P-P1BITS>>
+ <COND (<NOT <==? .TYP .B1>> <SET OFFS <+ .OFFS 1>>)>
+ <GETB .PTR .OFFS>)>)>>
+
+;" Scan through a noun clause, leave a pointer to its starting location"
+
+<ROUTINE CLAUSE (PTR VAL WRD "AUX" OFF NUM (ANDFLG <>) (FIRST?? T) NW (LW 0))
+ <SET OFF <* <- ,P-NCN 1> 2>>
+ <COND (<NOT <==? .VAL 0>>
+ <PUT ,P-ITBL <SET NUM <+ ,P-PREP1 .OFF>> .VAL>
+ <PUT ,P-ITBL <+ .NUM 1> .WRD>
+ <SET PTR <+ .PTR ,P-LEXELEN>>)
+ (T <SETG P-LEN <+ ,P-LEN 1>>)>
+ <COND (<0? ,P-LEN> <SETG P-NCN <- ,P-NCN 1>> <RETURN -1>)>
+ <PUT ,P-ITBL <SET NUM <+ ,P-NC1 .OFF>> <REST ,P-LEXV <* .PTR 2>>>
+ <COND (<EQUAL? <GET ,P-LEXV .PTR> ,W?THE ,W?A ,W?AN>
+ <PUT ,P-ITBL .NUM <REST <GET ,P-ITBL .NUM> 4>>)>
+ <REPEAT ()
+ <COND (<L? <SETG P-LEN <- ,P-LEN 1>> 0>
+ <PUT ,P-ITBL <+ .NUM 1> <REST ,P-LEXV <* .PTR 2>>>
+ <RETURN -1>)>
+ <COND (<OR <SET WRD <GET ,P-LEXV .PTR>>
+ <SET WRD <NUMBER? .PTR>>>
+ <COND (<0? ,P-LEN> <SET NW 0>)
+ (T <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>)>
+ <COND (<EQUAL? .WRD ,W?AND ,W?COMMA> <SET ANDFLG T>)
+ (<EQUAL? .WRD ,W?ALL ,W?ONE>
+ <COND (<==? .NW ,W?OF>
+ <SETG P-LEN <- ,P-LEN 1>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>)>)
+ (<OR <EQUAL? .WRD ,W?THEN ,W?PERIOD>
+ <AND <WT? .WRD ,PS?PREPOSITION>
+ <GET ,P-ITBL ,P-VERB>
+ ;"ADDED 4/27 FOR TURTLE,UP"
+ <NOT .FIRST??>>>
+ <SETG P-LEN <+ ,P-LEN 1>>
+ <PUT ,P-ITBL
+ <+ .NUM 1>
+ <REST ,P-LEXV <* .PTR 2>>>
+ <RETURN <- .PTR ,P-LEXELEN>>)
+ (<WT? .WRD ,PS?OBJECT>
+ <COND (<AND <G? ,P-LEN 0>
+ <EQUAL? .NW ,W?OF>
+ <NOT <EQUAL? .WRD ,W?ALL ,W?ONE>>>
+ T)
+ (<AND <WT? .WRD
+ ,PS?ADJECTIVE
+ ,P1?ADJECTIVE>
+ <NOT <==? .NW 0>>
+ <WT? .NW ,PS?OBJECT>>)
+ (<AND <NOT .ANDFLG>
+ <NOT <EQUAL? .NW ,W?BUT ,W?EXCEPT>>
+ <NOT <EQUAL? .NW ,W?AND ,W?COMMA>>>
+ <PUT ,P-ITBL
+ <+ .NUM 1>
+ <REST ,P-LEXV <* <+ .PTR 2> 2>>>
+ <RETURN .PTR>)
+ (T <SET ANDFLG <>>)>)
+ (<AND <OR ,P-MERGED
+ ,P-OFLAG
+ <NOT <EQUAL? <GET ,P-ITBL ,P-VERB> 0>>>
+ <OR <WT? .WRD ,PS?ADJECTIVE>
+ <WT? .WRD ,PS?BUZZ-WORD>>>)
+ (<AND .ANDFLG
+ <OR <WT? .WRD ,PS?DIRECTION>
+ <WT? .WRD ,PS?VERB>>>
+ <SET PTR <- .PTR 4>>
+ <PUT ,P-LEXV <+ .PTR 2> ,W?THEN>
+ <SETG P-LEN <+ ,P-LEN 2>>)
+ (<WT? .WRD ,PS?PREPOSITION> T)
+ (T
+ <CANT-USE .PTR>
+ <RFALSE>)>)
+ (T <UNKNOWN-WORD .PTR> <RFALSE>)>
+ <SET LW .WRD>
+ <SET FIRST?? <>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>>>
+
+<ROUTINE NUMBER? (PTR "AUX" CNT BPTR CHR (SUM 0) (TIM <>))
+ <SET CNT <GETB <REST ,P-LEXV <* .PTR 2>> 2>>
+ <SET BPTR <GETB <REST ,P-LEXV <* .PTR 2>> 3>>
+ <REPEAT ()
+ <COND (<L? <SET CNT <- .CNT 1>> 0> <RETURN>)
+ (T
+ <SET CHR <GETB ,P-INBUF .BPTR>>
+ <COND (<==? .CHR 58>
+ <SET TIM .SUM>
+ <SET SUM 0>)
+ (<G? .SUM 10000> <RFALSE>)
+ (<AND <L? .CHR 58> <G? .CHR 47>>
+ <SET SUM <+ <* .SUM 10> <- .CHR 48>>>)
+ (T <RFALSE>)>
+ <SET BPTR <+ .BPTR 1>>)>>
+ <PUT ,P-LEXV .PTR ,W?INTNUM>
+ <COND (<G? .SUM 1000> <RFALSE>)
+ (.TIM
+ <COND (<L? .TIM 8> <SET TIM <+ .TIM 12>>)
+ (<G? .TIM 23> <RFALSE>)>
+ <SET SUM <+ .SUM <* .TIM 60>>>)>
+ <SETG P-NUMBER .SUM>
+ ,W?INTNUM>
+
+<GLOBAL P-NUMBER 0>
+<GLOBAL P-DIRECTION 0>
+
+
+;"New ORPHAN-MERGE for TRAP Retrofix 6/21/84"
+
+<ROUTINE ORPHAN-MERGE ("AUX" (CNT -1) TEMP VERB BEG END (ADJ <>) WRD)
+ <SETG P-OFLAG <>>
+ <COND (<WT? <GET <GET ,P-ITBL ,P-VERBN> 0> ,PS?ADJECTIVE ,P1?ADJECTIVE>
+ <SET ADJ T>)>
+ <COND (<AND <NOT <0? <SET VERB <GET ,P-ITBL ,P-VERB>>>>
+ <NOT .ADJ>
+ <NOT <==? .VERB <GET ,P-OTBL ,P-VERB>>>>
+ <RFALSE>)
+ (<==? ,P-NCN 2> <RFALSE>)
+ (<==? <GET ,P-OTBL ,P-NC1> 1>
+ <COND (<OR <==? <SET TEMP <GET ,P-ITBL ,P-PREP1>>
+ <GET ,P-OTBL ,P-PREP1>>
+ <0? .TEMP>>
+ <COND (.ADJ
+ <PUT ,P-OTBL ,P-NC1 <REST ,P-LEXV 2>>
+ <PUT ,P-OTBL ,P-NC1L <REST ,P-LEXV 6>>)
+ (T
+ <PUT ,P-OTBL ,P-NC1 <GET ,P-ITBL ,P-NC1>>
+ <PUT ,P-OTBL ,P-NC1L <GET ,P-ITBL ,P-NC1L>>)>)
+ (T <RFALSE>)>)
+ (<==? <GET ,P-OTBL ,P-NC2> 1>
+ <COND (<OR <==? <SET TEMP <GET ,P-ITBL ,P-PREP1>>
+ <GET ,P-OTBL ,P-PREP2>>
+ <0? .TEMP>>
+ <COND (.ADJ
+ <PUT ,P-ITBL ,P-NC1 <REST ,P-LEXV 2>>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
+ <PUT ,P-OTBL ,P-NC2 <GET ,P-ITBL ,P-NC1>>
+ <PUT ,P-OTBL ,P-NC2L <GET ,P-ITBL ,P-NC1L>>
+ <SETG P-NCN 2>)
+ (T <RFALSE>)>)
+ (<NOT <ZERO? ,P-ACLAUSE>>
+ <COND (<AND <NOT <==? ,P-NCN 1>> <NOT .ADJ>>
+ <SETG P-ACLAUSE <>>
+ <RFALSE>)
+ (T
+ <SET BEG <GET ,P-ITBL ,P-NC1>>
+ <COND (.ADJ <SET BEG <REST ,P-LEXV 2>> <SET ADJ <>>)>
+ <SET END <GET ,P-ITBL ,P-NC1L>>
+ <REPEAT ()
+ <SET WRD <GET .BEG 0>>
+ <COND (<==? .BEG .END>
+ <COND (.ADJ <ACLAUSE-WIN .ADJ> <RETURN>)
+ (T <SETG P-ACLAUSE <>> <RFALSE>)>)
+ (<AND <NOT .ADJ>
+ <OR <BTST <GETB .WRD ,P-PSOFF>
+ ,PS?ADJECTIVE>
+ <EQUAL? .WRD ,W?ALL ,W?ONE>>>
+ <SET ADJ .WRD>)
+ (<OR <BTST <GETB .WRD ,P-PSOFF> ,PS?OBJECT>
+ <==? .WRD ,W?ONE>>
+ <COND (<NOT <EQUAL? .WRD ,P-ANAM ,W?ONE>>
+ <RFALSE>)
+ (T <ACLAUSE-WIN .ADJ> <RETURN>)>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>
+ <COND (<EQUAL? .END 0>
+ <SET END .BEG>
+ <SETG P-NCN 1>
+ <PUT ,P-ITBL ,P-NC1 <BACK .BEG 4>>
+ <PUT ,P-ITBL ,P-NC1L .BEG>)>>)>)>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN>
+ <SETG P-MERGED T>
+ <RTRUE>)
+ (T <PUT ,P-ITBL .CNT <GET ,P-OTBL .CNT>>)>>
+ T>
+
+;"New ACLAUSE-WIN for TRAP retrofix 6/21/84"
+
+<ROUTINE ACLAUSE-WIN (ADJ)
+ <PUT ,P-ITBL ,P-VERB <GET ,P-OTBL ,P-VERB>>
+ <SETG P-CCSRC ,P-OTBL>
+ <CLAUSE-COPY ,P-ACLAUSE <+ ,P-ACLAUSE 1> .ADJ>
+ <AND <NOT <==? <GET ,P-OTBL ,P-NC2> 0>> <SETG P-NCN 2>>
+ <SETG P-ACLAUSE <>>
+ <RTRUE>>
+
+;"Print undefined word in input.
+ PTR points to the unknown word in P-LEXV"
+
+<ROUTINE WORD-PRINT (CNT BUF)
+ <REPEAT ()
+ <COND (<DLESS? CNT 0> <RETURN>)
+ (ELSE
+ <PRINTC <GETB ,P-INBUF .BUF>>
+ <SET BUF <+ .BUF 1>>)>>>
+
+<ROUTINE UNKNOWN-WORD (PTR "AUX" BUF)
+ <COND (<VERB? SAY>
+ <TELL "Nothing happens." CR>
+ <RFALSE>)>
+ <TELL "I don't know the word \"">
+ <WORD-PRINT <GETB <REST ,P-LEXV <SET BUF <* .PTR 2>>> 2>
+ <GETB <REST ,P-LEXV .BUF> 3>>
+ <TELL "\"." CR>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-OFLAG <>>>
+
+<ROUTINE CANT-USE (PTR "AUX" BUF)
+ <COND (<VERB? SAY>
+ <TELL "Nothing happens." CR>
+ <RFALSE>)>
+ <TELL "You used the word \"">
+ <WORD-PRINT <GETB <REST ,P-LEXV <SET BUF <* .PTR 2>>> 2>
+ <GETB <REST ,P-LEXV .BUF> 3>>
+ <TELL "\" in a way that I don't understand." CR>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-OFLAG <>>>
+
+;" Perform syntax matching operations, using P-ITBL as the source of
+ the verb and adjectives for this input. Returns false if no
+ syntax matches, and does it's own orphaning. If return is true,
+ the syntax is saved in P-SYNTAX."
+
+<GLOBAL P-SLOCBITS 0>
+
+<CONSTANT P-SYNLEN 8>
+
+<CONSTANT P-SBITS 0>
+
+<CONSTANT P-SPREP1 1>
+
+<CONSTANT P-SPREP2 2>
+
+<CONSTANT P-SFWIM1 3>
+
+<CONSTANT P-SFWIM2 4>
+
+<CONSTANT P-SLOC1 5>
+
+<CONSTANT P-SLOC2 6>
+
+<CONSTANT P-SACTION 7>
+
+<CONSTANT P-SONUMS 3>
+
+<ROUTINE SYNTAX-CHECK ("AUX" SYN LEN NUM OBJ
+ (DRIVE1 <>) (DRIVE2 <>) PREP VERB TMP)
+ <COND (<0? <SET VERB <GET ,P-ITBL ,P-VERB>>>
+ <TELL "There was no verb in that sentence!" CR>
+ <RFALSE>)>
+ <SET SYN <GET ,VERBS <- 255 .VERB>>>
+ <SET LEN <GETB .SYN 0>>
+ <SET SYN <REST .SYN>>
+ <REPEAT ()
+ <SET NUM <BAND <GETB .SYN ,P-SBITS> ,P-SONUMS>>
+ <COND (<G? ,P-NCN .NUM> T)
+ (<AND <NOT <L? .NUM 1>>
+ <0? ,P-NCN>
+ <OR <0? <SET PREP <GET ,P-ITBL ,P-PREP1>>>
+ <==? .PREP <GETB .SYN ,P-SPREP1>>>>
+ <SET DRIVE1 .SYN>)
+ (<==? <GETB .SYN ,P-SPREP1> <GET ,P-ITBL ,P-PREP1>>
+ <COND (<AND <==? .NUM 2> <==? ,P-NCN 1>>
+ <SET DRIVE2 .SYN>)
+ (<==? <GETB .SYN ,P-SPREP2>
+ <GET ,P-ITBL ,P-PREP2>>
+ <SYNTAX-FOUND .SYN>
+ <RTRUE>)>)>
+ <COND (<DLESS? LEN 1>
+ <COND (<OR .DRIVE1 .DRIVE2> <RETURN>)
+ (T
+ <TELL
+"That sentence isn't one I recognize." CR>
+ <RFALSE>)>)
+ (T <SET SYN <REST .SYN ,P-SYNLEN>>)>>
+ <COND (<AND .DRIVE1
+ <SET OBJ
+ <GWIM <GETB .DRIVE1 ,P-SFWIM1>
+ <GETB .DRIVE1 ,P-SLOC1>
+ <GETB .DRIVE1 ,P-SPREP1>>>>
+ <PUT ,P-PRSO ,P-MATCHLEN 1>
+ <PUT ,P-PRSO 1 .OBJ>
+ <SYNTAX-FOUND .DRIVE1>)
+ (<AND .DRIVE2
+ <SET OBJ
+ <GWIM <GETB .DRIVE2 ,P-SFWIM2>
+ <GETB .DRIVE2 ,P-SLOC2>
+ <GETB .DRIVE2 ,P-SPREP2>>>>
+ <PUT ,P-PRSI ,P-MATCHLEN 1>
+ <PUT ,P-PRSI 1 .OBJ>
+ <SYNTAX-FOUND .DRIVE2>)
+ (<EQUAL? .VERB ,ACT?FIND>
+ <TELL "That question can't be answered." CR>
+ <RFALSE>)
+ (<NOT <==? ,WINNER ,PLAYER>>
+ <CANT-ORPHAN>)
+ (T
+ <ORPHAN .DRIVE1 .DRIVE2>
+ <TELL "What do you want to ">
+ <SET TMP <GET ,P-OTBL ,P-VERBN>>
+ <COND (<==? .TMP 0> <TELL "tell">)
+ (<0? <GETB ,P-VTBL 2>>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>
+ <PUTB ,P-VTBL 2 0>)>
+ <COND (.DRIVE2
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L>)>
+ <SETG P-OFLAG T>
+ <PREP-PRINT <COND (.DRIVE1 <GETB .DRIVE1 ,P-SPREP1>)
+ (T <GETB .DRIVE2 ,P-SPREP2>)>>
+ <TELL "?" CR>
+ <RFALSE>)>>
+
+<ROUTINE CANT-ORPHAN ()
+ <TELL "\"I don't understand! What are you referring to?\"" CR>
+ <RFALSE>>
+
+
+<ROUTINE ORPHAN (D1 D2 "AUX" (CNT -1))
+ <PUT ,P-OCLAUSE ,P-MATCHLEN 0>
+ <SETG P-CCSRC ,P-ITBL>
+ <REPEAT ()
+ <COND (<IGRTR? CNT ,P-ITBLLEN> <RETURN>)
+ (T <PUT ,P-OTBL .CNT <GET ,P-ITBL .CNT>>)>>
+ <COND (<==? ,P-NCN 2> <CLAUSE-COPY ,P-NC2 ,P-NC2L>)>
+ <COND (<NOT <L? ,P-NCN 1>> <CLAUSE-COPY ,P-NC1 ,P-NC1L>)>
+ <COND (.D1
+ <PUT ,P-OTBL ,P-PREP1 <GETB .D1 ,P-SPREP1>>
+ <PUT ,P-OTBL ,P-NC1 1>)
+ (.D2
+ <PUT ,P-OTBL ,P-PREP2 <GETB .D2 ,P-SPREP2>>
+ <PUT ,P-OTBL ,P-NC2 1>)>>
+
+<ROUTINE CLAUSE-PRINT (BPTR EPTR "OPTIONAL" (THE? T))
+ <BUFFER-PRINT <GET ,P-ITBL .BPTR> <GET ,P-ITBL .EPTR> .THE?>>
+
+<ROUTINE BUFFER-PRINT (BEG END CP "AUX" (NOSP <>) WRD (FIRST?? T) (PN <>))
+ <REPEAT ()
+ <COND (<==? .BEG .END> <RETURN>)
+ (T
+ <COND (.NOSP <SET NOSP <>>)
+ (T <TELL " ">)>
+ <COND (<==? <SET WRD <GET .BEG 0>> ,W?PERIOD> <SET NOSP T>)
+ (T
+ <COND (<AND .FIRST?? <NOT .PN> .CP>
+ <TELL "the ">)>
+ <COND (<OR ,P-OFLAG ,P-MERGED> <PRINTB .WRD>)
+ (<AND <==? .WRD ,W?IT>
+ <==? ,P-IT-LOC ,HERE>>
+ <PRINTD ,P-IT-OBJECT>)
+ (T
+ <WORD-PRINT <GETB .BEG 2>
+ <GETB .BEG 3>>)>
+ <SET FIRST?? <>>)>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>>
+
+<ROUTINE CAPITALIZE (PTR)
+ <PRINTC <- <GETB ,P-INBUF <GETB .PTR 3>> 32>>
+ <WORD-PRINT <- <GETB .PTR 2> 1> <+ <GETB .PTR 3> 1>>>
+
+<ROUTINE PREP-PRINT (PREP "AUX" WRD)
+ <COND (<NOT <0? .PREP>>
+ <TELL " ">
+ <SET WRD <PREP-FIND .PREP>>
+ <PRINTB .WRD>)>>
+
+<ROUTINE CLAUSE-COPY (BPTR EPTR "OPTIONAL" (INSRT <>) "AUX" BEG END)
+ <SET BEG <GET ,P-CCSRC .BPTR>>
+ <SET END <GET ,P-CCSRC .EPTR>>
+ <PUT ,P-OTBL
+ .BPTR
+ <REST ,P-OCLAUSE
+ <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN> 2>>>
+ <REPEAT ()
+ <COND (<==? .BEG .END>
+ <PUT ,P-OTBL
+ .EPTR
+ <REST ,P-OCLAUSE
+ <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN>
+ 2>>>
+ <RETURN>)
+ (T
+ <COND (<AND .INSRT <==? ,P-ANAM <GET .BEG 0>>>
+ <CLAUSE-ADD .INSRT>)>
+ <CLAUSE-ADD <GET .BEG 0>>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>>
+
+
+<ROUTINE CLAUSE-ADD (WRD "AUX" PTR)
+ <SET PTR <+ <GET ,P-OCLAUSE ,P-MATCHLEN> 2>>
+ <PUT ,P-OCLAUSE <- .PTR 1> .WRD>
+ <PUT ,P-OCLAUSE .PTR 0>
+ <PUT ,P-OCLAUSE ,P-MATCHLEN .PTR>>
+
+<ROUTINE PREP-FIND (PREP "AUX" (CNT 0) SIZE)
+ <SET SIZE <* <GET ,PREPOSITIONS 0> 2>>
+ <REPEAT ()
+ <COND (<IGRTR? CNT .SIZE> <RFALSE>)
+ (<==? <GET ,PREPOSITIONS .CNT> .PREP>
+ <RETURN <GET ,PREPOSITIONS <- .CNT 1>>>)>>>
+
+<ROUTINE SYNTAX-FOUND (SYN)
+ <SETG P-SYNTAX .SYN>
+ <SETG PRSA <GETB .SYN ,P-SACTION>>>
+
+<GLOBAL P-GWIMBIT 0>
+
+<ROUTINE GWIM (GBIT LBIT PREP "AUX" OBJ)
+ <COND (<==? .GBIT ,RMUNGBIT>
+ <RETURN ,ROOMS>)>
+ <SETG P-GWIMBIT .GBIT>
+ <SETG P-SLOCBITS .LBIT>
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <COND (<GET-OBJECT ,P-MERGE <>>
+ <SETG P-GWIMBIT 0>
+ <COND (<==? <GET ,P-MERGE ,P-MATCHLEN> 1>
+ <COND (<EQUAL? <SET OBJ <GET ,P-MERGE 1>> ,ME>
+ <RFALSE>)>
+ <TELL "(">
+ <COND (<NOT <0? .PREP>>
+ <PRINTB <SET PREP <PREP-FIND .PREP>>>
+ <COND (<==? .PREP ,W?OUT>
+ <TELL " of">)>
+ <COND (<==? .OBJ ,HANDS>
+ <TELL " your hands)" CR>)
+ (T
+ <TELL " the ">)>)>
+ <COND (<NOT <==? .OBJ ,HANDS>>
+ <TELL D .OBJ ")" CR>)>
+ .OBJ)>)
+ (T <SETG P-GWIMBIT 0> <RFALSE>)>>
+
+<ROUTINE SNARF-OBJECTS ("AUX" PTR)
+ <COND (<NOT <==? <SET PTR <GET ,P-ITBL ,P-NC1>> 0>>
+ <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC1>>
+ <OR <SNARFEM .PTR <GET ,P-ITBL ,P-NC1L> ,P-PRSO> <RFALSE>>
+ <OR <0? <GET ,P-BUTS ,P-MATCHLEN>>
+ <SETG P-PRSO <BUT-MERGE ,P-PRSO>>>)>
+ <COND (<NOT <==? <SET PTR <GET ,P-ITBL ,P-NC2>> 0>>
+ <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC2>>
+ <OR <SNARFEM .PTR <GET ,P-ITBL ,P-NC2L> ,P-PRSI> <RFALSE>>
+ <COND (<NOT <0? <GET ,P-BUTS ,P-MATCHLEN>>>
+ <COND (<==? <GET ,P-PRSI ,P-MATCHLEN> 1>
+ <SETG P-PRSO <BUT-MERGE ,P-PRSO>>)
+ (T <SETG P-PRSI <BUT-MERGE ,P-PRSI>>)>)>)>
+ <RTRUE>>
+
+<ROUTINE BUT-MERGE (TBL "AUX" LEN BUTLEN (CNT 1) (MATCHES 0) OBJ NTBL)
+ <SET LEN <GET .TBL ,P-MATCHLEN>>
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <REPEAT ()
+ <COND (<DLESS? LEN 0> <RETURN>)
+ (<ZMEMQ <SET OBJ <GET .TBL .CNT>> ,P-BUTS>)
+ (T
+ <PUT ,P-MERGE <+ .MATCHES 1> .OBJ>
+ <SET MATCHES <+ .MATCHES 1>>)>
+ <SET CNT <+ .CNT 1>>>
+ <PUT ,P-MERGE ,P-MATCHLEN .MATCHES>
+ <SET NTBL ,P-MERGE>
+ <SETG P-MERGE .TBL>
+ .NTBL>
+
+<GLOBAL P-NAM <>>
+
+<GLOBAL P-ADJ <>>
+
+<GLOBAL P-ADVERB <>>
+
+<GLOBAL P-ADJN <>>
+
+<GLOBAL P-PRSO <ITABLE NONE 50>>
+
+<GLOBAL P-PRSI <ITABLE NONE 50>>
+
+<GLOBAL P-BUTS <ITABLE NONE 50>>
+
+<GLOBAL P-MERGE <ITABLE NONE 50>>
+
+<GLOBAL P-OCLAUSE <ITABLE NONE 100>>
+
+<GLOBAL P-MATCHLEN 0>
+
+<GLOBAL P-GETFLAGS 0>
+
+<CONSTANT P-ALL 1>
+
+<CONSTANT P-ONE 2>
+
+<CONSTANT P-INHIBIT 4>
+
+<GLOBAL P-CSPTR <>>
+<GLOBAL P-CEPTR <>>
+<GLOBAL P-AND <>>
+
+<ROUTINE SNARFEM (PTR EPTR TBL "AUX" (BUT <>) LEN WV WRD NW)
+ <SETG P-AND <>>
+ <SETG P-GETFLAGS 0>
+ <SETG P-CSPTR .PTR>
+ <SETG P-CEPTR .EPTR>
+ <PUT ,P-BUTS ,P-MATCHLEN 0>
+ <PUT .TBL ,P-MATCHLEN 0>
+ <SET WRD <GET .PTR 0>>
+ <REPEAT ()
+ <COND (<==? .PTR .EPTR> <RETURN <GET-OBJECT <OR .BUT .TBL>>>)
+ (T
+ <SET NW <GET .PTR ,P-LEXELEN>>
+ <COND (<==? .WRD ,W?ALL>
+ <SETG P-GETFLAGS ,P-ALL>
+ <COND (<==? .NW ,W?OF>
+ <SET PTR <REST .PTR ,P-WORDLEN>>)>)
+ (<EQUAL? .WRD ,W?BUT ,W?EXCEPT>
+ <OR <GET-OBJECT <OR .BUT .TBL>> <RFALSE>>
+ <SET BUT ,P-BUTS>
+ <PUT .BUT ,P-MATCHLEN 0>)
+ (<EQUAL? .WRD ,W?A ,W?ONE>
+ <COND (<NOT ,P-ADJ>
+ <SETG P-GETFLAGS ,P-ONE>
+ <COND (<==? .NW ,W?OF>
+ <SET PTR <REST .PTR ,P-WORDLEN>>)>)
+ (T
+ <SETG P-NAM ,P-ONEOBJ>
+ <OR <GET-OBJECT <OR .BUT .TBL>> <RFALSE>>
+ <AND <0? .NW> <RTRUE>>)>)
+ (<AND <EQUAL? .WRD ,W?AND ,W?COMMA>
+ <NOT <EQUAL? .NW ,W?AND ,W?COMMA>>>
+ <SETG P-AND T>
+ <OR <GET-OBJECT <OR .BUT .TBL>> <RFALSE>>
+ T)
+ (<WT? .WRD ,PS?BUZZ-WORD>)
+ (<EQUAL? .WRD ,W?AND ,W?COMMA>)
+ (<==? .WRD ,W?OF>
+ <COND (<0? ,P-GETFLAGS>
+ <SETG P-GETFLAGS ,P-INHIBIT>)>)
+ (<AND <SET WV <WT? .WRD ,PS?ADJECTIVE ,P1?ADJECTIVE>>
+ <NOT ,P-ADJ>>
+ <SETG P-ADJ .WV>
+ <SETG P-ADJN .WRD>)
+ (<WT? .WRD ,PS?OBJECT ,P1?OBJECT>
+ <SETG P-NAM .WRD>
+ <SETG P-ONEOBJ .WRD>)>)>
+ <COND (<NOT <==? .PTR .EPTR>>
+ <SET PTR <REST .PTR ,P-WORDLEN>>
+ <SET WRD .NW>)>>>
+
+<CONSTANT SH 128>
+
+<CONSTANT SC 64>
+
+<CONSTANT SIR 32>
+
+<CONSTANT SOG 16>
+
+<CONSTANT STAKE 8>
+
+<CONSTANT SMANY 4>
+
+<CONSTANT SHAVE 2>
+
+<ROUTINE GET-OBJECT (TBL
+ "OPTIONAL" (VRB T)
+ "AUX" BITS LEN XBITS TLEN (GCHECK <>) (OLEN 0) OBJ)
+ <SET XBITS ,P-SLOCBITS>
+ <SET TLEN <GET .TBL ,P-MATCHLEN>>
+ <COND (<BTST ,P-GETFLAGS ,P-INHIBIT> <RTRUE>)>
+ <COND (<AND <NOT ,P-NAM> ,P-ADJ <WT? ,P-ADJN ,PS?OBJECT ,P1?OBJECT>>
+ <SETG P-NAM ,P-ADJN>
+ <SETG P-ADJ <>>)>
+ <COND (<AND <NOT ,P-NAM>
+ <NOT ,P-ADJ>
+ <NOT <==? ,P-GETFLAGS ,P-ALL>>
+ <0? ,P-GWIMBIT>>
+ <COND (.VRB
+ <TELL
+"There seems to be a noun missing in that sentence!" CR>)>
+ <RFALSE>)>
+ <COND (<OR <NOT <==? ,P-GETFLAGS ,P-ALL>> <0? ,P-SLOCBITS>>
+ <SETG P-SLOCBITS -1>)>
+ <SETG P-TABLE .TBL>
+ <PROG ()
+ <COND (.GCHECK <GLOBAL-CHECK .TBL>)
+ (T
+ <COND (,LIT
+ <FCLEAR ,PLAYER ,TRANSBIT>
+ <DO-SL ,HERE ,SOG ,SIR>
+ <FSET ,PLAYER ,TRANSBIT>)>
+ <DO-SL ,PLAYER ,SH ,SC>)>
+ <SET LEN <- <GET .TBL ,P-MATCHLEN> .TLEN>>
+ <COND (<BTST ,P-GETFLAGS ,P-ALL>)
+ (<AND <BTST ,P-GETFLAGS ,P-ONE>
+ <NOT <0? .LEN>>>
+ <COND (<NOT <==? .LEN 1>>
+ <PUT .TBL 1 <GET .TBL <RANDOM .LEN>>>
+ <TELL "(How about the ">
+ <PRINTD <GET .TBL 1>>
+ <TELL "?)" CR>)>
+ <PUT .TBL ,P-MATCHLEN 1>)
+ (<OR <G? .LEN 1>
+ <AND <0? .LEN> <NOT <==? ,P-SLOCBITS -1>>>>
+ <COND (<==? ,P-SLOCBITS -1>
+ <SETG P-SLOCBITS .XBITS>
+ <SET OLEN .LEN>
+ <PUT .TBL
+ ,P-MATCHLEN
+ <- <GET .TBL ,P-MATCHLEN> .LEN>>
+ <AGAIN>)
+ (T
+ <COND (<0? .LEN> <SET LEN .OLEN>)>
+ <COND (<NOT <==? ,WINNER ,PLAYER>>
+ <CANT-ORPHAN>
+ <RFALSE>)
+ (<AND .VRB ,P-NAM>
+ <WHICH-PRINT .TLEN .LEN .TBL>
+ <SETG P-ACLAUSE
+ <COND (<==? .TBL ,P-PRSO> ,P-NC1)
+ (T ,P-NC2)>>
+ <SETG P-AADJ ,P-ADJ>
+ <SETG P-ANAM ,P-NAM>
+ <ORPHAN <> <>>
+ <SETG P-OFLAG T>)
+ (.VRB
+ <TELL
+"There seems to be a noun missing in that sentence!" CR>)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RFALSE>)>)
+ (<AND <0? .LEN> .GCHECK>
+ <COND (.VRB
+ <COND (,LIT
+ ;"Changed 6/10/83 - MARC"
+ <OBJ-FOUND ,NOT-HERE-OBJECT .TBL>
+ <SETG P-XNAM ,P-NAM>
+ <SETG P-XADJ ,P-ADJ>
+ <SETG P-XADJN ,P-ADJN>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>
+ <RTRUE>)
+ (T <TELL "It's too dark to see!" CR>)>)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RFALSE>)
+ (<0? .LEN> <SET GCHECK T> <AGAIN>)>
+ <SETG P-SLOCBITS .XBITS>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RTRUE>>>
+
+<ROUTINE MOBY-FIND (TBL "AUX" FOO LEN)
+ <SETG P-SLOCBITS -1>
+ <SETG P-NAM ,P-XNAM>
+ <SETG P-ADJ ,P-XADJ>
+ <PUT .TBL ,P-MATCHLEN 0>
+ <SET FOO <FIRST? ,ROOMS>>
+ <REPEAT ()
+ <COND (<NOT .FOO> <RETURN>)
+ (T
+ <SEARCH-LIST .FOO .TBL ,P-SRCALL>
+ <SET FOO <NEXT? .FOO>>)>>
+ <COND (<EQUAL? <SET LEN <GET .TBL ,P-MATCHLEN>> 0>
+ <DO-SL ,LOCAL-GLOBALS 1 1>)>
+ <COND (<EQUAL? <SET LEN <GET .TBL ,P-MATCHLEN>> 0>
+ <DO-SL ,ROOMS 1 1>)>
+ <COND (<EQUAL? <SET LEN <GET .TBL ,P-MATCHLEN>> 1>
+ <SETG P-MOBY-FOUND <GET .TBL 1>>)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ .LEN>
+
+<GLOBAL P-MOBY-FOUND <>>
+<GLOBAL P-XNAM <>>
+<GLOBAL P-XADJ <>>
+<GLOBAL P-XADJN <>>
+
+<ROUTINE WHICH-PRINT (TLEN LEN TBL "AUX" OBJ RLEN)
+ <SET RLEN .LEN>
+ <TELL "Which">
+ <COND (<OR ,P-OFLAG ,P-MERGED ,P-AND> <TELL " "> <PRINTB ,P-NAM>)
+ (<==? .TBL ,P-PRSO>
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L <>>)
+ (T <CLAUSE-PRINT ,P-NC2 ,P-NC2L <>>)>
+ <TELL " do you mean, ">
+ <REPEAT ()
+ <SET TLEN <+ .TLEN 1>>
+ <SET OBJ <GET .TBL .TLEN>>
+ <TELL "the " D .OBJ>
+ <COND (<==? .LEN 2>
+ <COND (<NOT <==? .RLEN 2>> <TELL ",">)>
+ <TELL " or ">)
+ (<G? .LEN 2> <TELL ", ">)>
+ <COND (<L? <SET LEN <- .LEN 1>> 1>
+ <TELL "?" CR>
+ <RETURN>)>>>
+
+
+<ROUTINE GLOBAL-CHECK (TBL "AUX" LEN RMG RMGL (CNT 0) OBJ OBITS FOO)
+ <SET LEN <GET .TBL ,P-MATCHLEN>>
+ <SET OBITS ,P-SLOCBITS>
+ <COND (<SET RMG <GETPT ,HERE ,P?GLOBAL>>
+ <SET RMGL <- <PTSIZE .RMG> 1>>
+ <REPEAT ()
+ <COND (<THIS-IT? <SET OBJ <GETB .RMG .CNT>> .TBL>
+ <OBJ-FOUND .OBJ .TBL>)>
+ <COND (<IGRTR? CNT .RMGL> <RETURN>)>>)>
+ <COND (<SET RMG <GETPT ,HERE ,P?PSEUDO>>
+ <SET RMGL <- </ <PTSIZE .RMG> 4> 1>>
+ <SET CNT 0>
+ <REPEAT ()
+ <COND (<==? ,P-NAM <GET .RMG <* .CNT 2>>>
+ <PUTP ,PSEUDO-OBJECT
+ ,P?ACTION
+ <GET .RMG <+ <* .CNT 2> 1>>>
+ <SET FOO
+ <BACK <GETPT ,PSEUDO-OBJECT ,P?ACTION> 5>>
+ <PUT .FOO 0 <GET ,P-NAM 0>>
+ <PUT .FOO 1 <GET ,P-NAM 1>>
+ <OBJ-FOUND ,PSEUDO-OBJECT .TBL>
+ <RETURN>)
+ (<IGRTR? CNT .RMGL> <RETURN>)>>)>
+ <COND (<==? <GET .TBL ,P-MATCHLEN> .LEN>
+ <SETG P-SLOCBITS -1>
+ <SETG P-TABLE .TBL>
+ <DO-SL ,GLOBAL-OBJECTS 1 1>
+ <SETG P-SLOCBITS .OBITS>
+ <COND (<AND <0? <GET .TBL ,P-MATCHLEN>>
+ <EQUAL? ,PRSA ,V?LOOK-INSIDE ,V?SEARCH ,V?EXAMINE>>
+ <DO-SL ,ROOMS 1 1>)>)>>
+
+<ROUTINE DO-SL (OBJ BIT1 BIT2 "AUX" BTS)
+ <COND (<BTST ,P-SLOCBITS <+ .BIT1 .BIT2>>
+ <SEARCH-LIST .OBJ ,P-TABLE ,P-SRCALL>)
+ (T
+ <COND (<BTST ,P-SLOCBITS .BIT1>
+ <SEARCH-LIST .OBJ ,P-TABLE ,P-SRCTOP>)
+ (<BTST ,P-SLOCBITS .BIT2>
+ <SEARCH-LIST .OBJ ,P-TABLE ,P-SRCBOT>)
+ (T <RTRUE>)>)>>
+
+<CONSTANT P-SRCBOT 2>
+
+<CONSTANT P-SRCTOP 0>
+
+<CONSTANT P-SRCALL 1>
+
+<ROUTINE SEARCH-LIST (OBJ TBL LVL "AUX" FLS NOBJ)
+ <COND (<SET OBJ <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<AND <NOT <==? .LVL ,P-SRCBOT>>
+ <GETPT .OBJ ,P?SYNONYM>
+ <THIS-IT? .OBJ .TBL>>
+ <OBJ-FOUND .OBJ .TBL>)>
+ <COND (<AND <OR <NOT <==? .LVL ,P-SRCTOP>>
+ <FSET? .OBJ ,SEARCHBIT>
+ <FSET? .OBJ ,SURFACEBIT>>
+ <SET NOBJ <FIRST? .OBJ>>
+ <OR <FSET? .OBJ ,OPENBIT>
+ <FSET? .OBJ ,TRANSBIT>>>
+ <SET FLS
+ <SEARCH-LIST .OBJ
+ .TBL
+ <COND (<FSET? .OBJ ,SURFACEBIT>
+ ,P-SRCALL)
+ (<FSET? .OBJ ,SEARCHBIT>
+ ,P-SRCALL)
+ (T ,P-SRCTOP)>>>)>
+ <COND (<SET OBJ <NEXT? .OBJ>>) (T <RETURN>)>>)>>
+
+<ROUTINE OBJ-FOUND (OBJ TBL "AUX" PTR)
+ <SET PTR <GET .TBL ,P-MATCHLEN>>
+ <PUT .TBL <+ .PTR 1> .OBJ>
+ <PUT .TBL ,P-MATCHLEN <+ .PTR 1>>>
+
+<ROUTINE TAKE-CHECK ()
+ <AND <ITAKE-CHECK ,P-PRSO <GETB ,P-SYNTAX ,P-SLOC1>>
+ <ITAKE-CHECK ,P-PRSI <GETB ,P-SYNTAX ,P-SLOC2>>>>
+
+<ROUTINE ITAKE-CHECK (TBL IBITS "AUX" PTR OBJ TAKEN)
+ #DECL ((TBL) TABLE (IBITS PTR) FIX (OBJ) OBJECT
+ (TAKEN) <OR FALSE FIX ATOM>)
+ <COND (<AND <SET PTR <GET .TBL ,P-MATCHLEN>>
+ <OR <BTST .IBITS ,SHAVE>
+ <BTST .IBITS ,STAKE>>>
+ <REPEAT ()
+ <COND (<L? <SET PTR <- .PTR 1>> 0> <RETURN>)
+ (T
+ <SET OBJ <GET .TBL <+ .PTR 1>>>
+ <COND (<==? .OBJ ,IT> <SET OBJ ,P-IT-OBJECT>)>
+ <COND (<AND <NOT <HELD? .OBJ>>
+ <NOT <==? .OBJ ,HANDS>>>
+ <SETG PRSO .OBJ>
+ <COND (<FSET? .OBJ ,TRYTAKEBIT>
+ <SET TAKEN T>)
+ (<NOT <==? ,WINNER ,ADVENTURER>>
+ <SET TAKEN <>>)
+ (<AND <BTST .IBITS ,STAKE>
+ <==? <ITAKE <>> T>>
+ <SET TAKEN <>>)
+ (T <SET TAKEN T>)>
+ <COND (<AND .TAKEN
+ <BTST .IBITS ,SHAVE>
+ <EQUAL? ,WINNER
+ ,ADVENTURER>>
+ <COND (<EQUAL? .OBJ
+ ,NOT-HERE-OBJECT>
+ <TELL
+"You don't have that!" CR>
+ <RFALSE>)>
+ <TELL "You don't have the ">
+ <PRINTD .OBJ>
+ <TELL "." CR>
+ <RFALSE>)
+ (<AND <NOT .TAKEN>
+ <==? ,WINNER ,ADVENTURER>>
+ <TELL "(Taken)" CR>)>)>)>>)
+ (T)>>
+
+<ROUTINE MANY-CHECK ("AUX" (LOSS <>) TMP)
+ <COND (<AND <G? <GET ,P-PRSO ,P-MATCHLEN> 1>
+ <NOT <BTST <GETB ,P-SYNTAX ,P-SLOC1> ,SMANY>>>
+ <SET LOSS 1>)
+ (<AND <G? <GET ,P-PRSI ,P-MATCHLEN> 1>
+ <NOT <BTST <GETB ,P-SYNTAX ,P-SLOC2> ,SMANY>>>
+ <SET LOSS 2>)>
+ <COND (.LOSS
+ <TELL "You can't use multiple ">
+ <COND (<==? .LOSS 2> <TELL "in">)>
+ <TELL "direct objects with \"">
+ <SET TMP <GET ,P-ITBL ,P-VERBN>>
+ <COND (<0? .TMP> <TELL "tell">)
+ (<OR ,P-OFLAG ,P-MERGED>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>)>
+ <TELL "\"." CR>
+ <RFALSE>)
+ (T)>>
+
+<ROUTINE ZMEMQ (ITM TBL "OPTIONAL" (SIZE -1) "AUX" (CNT 1))
+ <COND (<NOT .TBL> <RFALSE>)>
+ <COND (<NOT <L? .SIZE 0>> <SET CNT 0>)
+ (ELSE <SET SIZE <GET .TBL 0>>)>
+ <REPEAT ()
+ <COND (<==? .ITM <GET .TBL .CNT>> <RTRUE>)
+ (<IGRTR? CNT .SIZE> <RFALSE>)>>>
+
+<ROUTINE ZMEMQB (ITM TBL SIZE "AUX" (CNT 0))
+ <REPEAT ()
+ <COND (<==? .ITM <GETB .TBL .CNT>> <RTRUE>)
+ (<IGRTR? CNT .SIZE> <RFALSE>)>>>
+
+<GLOBAL ALWAYS-LIT <>>
+
+<ROUTINE LIT? (RM "OPTIONAL" (RMBIT T) "AUX" OHERE (LIT <>))
+ <COND (<AND ,ALWAYS-LIT <EQUAL? ,WINNER ,PLAYER>>
+ <RTRUE>)>
+ <SETG P-GWIMBIT ,ONBIT>
+ <SET OHERE ,HERE>
+ <SETG HERE .RM>
+ <COND (<AND .RMBIT
+ <FSET? .RM ,ONBIT>>
+ <SET LIT T>)
+ (T
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <SETG P-TABLE ,P-MERGE>
+ <SETG P-SLOCBITS -1>
+ <COND (<==? .OHERE .RM>
+ <DO-SL ,WINNER 1 1>
+ <COND (<AND <NOT <EQUAL? ,WINNER ,PLAYER>>
+ <IN? ,PLAYER .RM>>
+ <DO-SL ,PLAYER 1 1>)>)>
+ <DO-SL .RM 1 1>
+ <COND (<G? <GET ,P-TABLE ,P-MATCHLEN> 0> <SET LIT T>)>)>
+ <SETG HERE .OHERE>
+ <SETG P-GWIMBIT 0>
+ .LIT>
+
+<ROUTINE PRSO-PRINT ("AUX" PTR)
+ <COND (<OR ,P-MERGED
+ <==? <GET <SET PTR <GET ,P-ITBL ,P-NC1>> 0> ,W?IT>>
+ <TELL " " D ,PRSO>)
+ (T <BUFFER-PRINT .PTR <GET ,P-ITBL ,P-NC1L> <>>)>>
+
+<ROUTINE PRSI-PRINT ("AUX" PTR)
+ <COND (<OR ,P-MERGED
+ <==? <GET <SET PTR <GET ,P-ITBL ,P-NC2>> 0> ,W?IT>>
+ <TELL " " D ,PRSO>)
+ (T <BUFFER-PRINT .PTR <GET ,P-ITBL ,P-NC2L> <>>)>>
+
+;"former CRUFTY routine, re-written by SWG"
+
+<ROUTINE THIS-IT? (OBJ TBL "AUX" SYNS)
+ <COND (<FSET? .OBJ ,INVISIBLE> <RFALSE>)
+ (<AND ,P-NAM
+ <NOT <ZMEMQ ,P-NAM
+ <SET SYNS <GETPT .OBJ ,P?SYNONYM>>
+ <- </ <PTSIZE .SYNS> 2> 1>>>>
+ <RFALSE>)
+ (<AND ,P-ADJ
+ <OR <NOT <SET SYNS <GETPT .OBJ ,P?ADJECTIVE>>>
+ <NOT <ZMEMQB ,P-ADJ .SYNS <- <PTSIZE .SYNS> 1>>>>>
+ <RFALSE>)
+ (<AND <NOT <0? ,P-GWIMBIT>> <NOT <FSET? .OBJ ,P-GWIMBIT>>>
+ <RFALSE>)>
+ <RTRUE>> \ No newline at end of file
diff --git a/gsyntax.zil b/gsyntax.zil
new file mode 100644
index 0000000..a7cb5eb
--- /dev/null
+++ b/gsyntax.zil
@@ -0,0 +1,551 @@
+ "Generic SYNTAX file for
+ The ZORK Trilogy
+ started on 7/21/83 by SEM"
+
+^L
+
+"Buzzwords, Prepositions and Directions"
+
+<BUZZ A AN THE IS AND OF THEN ALL ONE BUT EXCEPT \. \, \" YES NO Y HERE
+ FEEBLE FUMBLE FEAR FILCH FREEZE FALL FRY FLUORESCE
+ FERMENT FIERCE FLOAT FIREPROOF FENCE FUDGE FANTASIZE
+ FROTZ OZMOO>
+
+<SYNONYM WITH USING THROUGH THRU>
+<SYNONYM IN INSIDE INTO>
+<SYNONYM ON ONTO>
+<SYNONYM UNDER UNDERNEATH BENEATH BELOW>
+
+<SYNONYM NORTH N>
+<SYNONYM SOUTH S>
+<SYNONYM EAST E>
+<SYNONYM WEST W>
+<SYNONYM DOWN D>
+<SYNONYM UP U>
+<SYNONYM NW NORTHWEST>
+<SYNONYM NE NORTHE>
+<SYNONYM SW SOUTHWEST>
+<SYNONYM SE SOUTHE>
+
+^L
+
+"Game Commands"
+
+<SYNTAX VERBOSE = V-VERBOSE>
+
+<SYNTAX BRIEF = V-BRIEF>
+
+<SYNTAX SUPER = V-SUPER-BRIEF>
+<SYNONYM SUPER SUPERBRIEF>
+
+<SYNTAX DIAGNOSE = V-DIAGNOSE>
+
+<SYNTAX INVENTORY = V-INVENTORY>
+<SYNONYM INVENTORY I>
+
+<SYNTAX QUIT = V-QUIT>
+<SYNONYM QUIT Q>
+
+<SYNTAX RESTART = V-RESTART>
+
+<SYNTAX RESTORE = V-RESTORE>
+
+<SYNTAX SAVE = V-SAVE>
+
+<SYNTAX SCORE = V-SCORE>
+
+<SYNTAX SCRIPT = V-SCRIPT>
+
+<SYNTAX UNSCRIPT = V-UNSCRIPT>
+
+<SYNTAX VERSION = V-VERSION>
+
+<SYNTAX $VERIFY = V-VERIFY>
+
+<SYNTAX DEBUG = V-DEBUG>
+
+^L
+
+"Real Verbs"
+
+<SYNTAX ACTIVATE OBJECT (FIND LIGHTBIT)
+ (HELD CARRIED ON-GROUND IN-ROOM) = V-LAMP-ON>
+
+<SYNTAX AGAIN = V-AGAIN>
+<SYNONYM AGAIN G>
+
+<SYNTAX ANSWER = V-ANSWER>
+<SYNTAX ANSWER OBJECT = V-REPLY>
+<SYNONYM ANSWER REPLY>
+
+<SYNTAX APPLY OBJECT TO OBJECT = V-PUT PRE-PUT>
+
+<SYNTAX ATTACK OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-ATTACK>
+<SYNTAX ATTACK OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE) = V-ATTACK>
+<SYNONYM ATTACK FIGHT HURT INJURE HIT>
+
+<SYNTAX BACK = V-BACK>
+
+<SYNTAX BLAST = V-BLAST>
+
+<SYNTAX BLOW OUT OBJECT = V-LAMP-OFF>
+<SYNTAX BLOW UP OBJECT WITH
+ OBJECT (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED) = V-INFLATE>
+<SYNTAX BLOW UP OBJECT = V-BLAST>
+<SYNTAX BLOW IN OBJECT = V-BREATHE>
+
+<SYNTAX BOARD OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-BOARD PRE-BOARD>
+
+<SYNTAX BRUSH OBJECT (HELD CARRIED ON-GROUND IN-ROOM) = V-BRUSH>
+<SYNTAX BRUSH OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT = V-BRUSH>
+<SYNONYM BRUSH CLEAN>
+
+<SYNTAX BUG = V-BUG>
+
+<SYNTAX BURN OBJECT (FIND BURNBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND FLAMEBIT) (HELD CARRIED ON-GROUND IN-ROOM HAVE)
+ = V-BURN PRE-BURN>
+<SYNTAX BURN DOWN OBJECT (FIND BURNBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND FLAMEBIT) (HELD CARRIED ON-GROUND IN-ROOM HAVE)
+ = V-BURN PRE-BURN>
+<SYNONYM BURN INCINERATE IGNITE>
+
+<SYNTAX CHOMP = V-CHOMP>
+<SYNONYM CHOMP LOSE BARF>
+
+<SYNTAX CLIMB UP OBJECT (FIND RMUNGBIT) = V-CLIMB-UP>
+<SYNTAX CLIMB UP OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-UP>
+<SYNTAX CLIMB DOWN (FIND RMUNGBIT) = V-CLIMB-DOWN>
+<SYNTAX CLIMB DOWN OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-DOWN>
+<SYNTAX CLIMB OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-FOO>
+<SYNTAX CLIMB IN OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-BOARD PRE-BOARD>
+<SYNTAX CLIMB ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
+<SYNTAX CLIMB WITH OBJECT = V-THROUGH>
+<SYNONYM CLIMB SIT>
+
+<SYNTAX CLOSE OBJECT (FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM) = V-CLOSE>
+
+<SYNTAX COMMAND OBJECT (FIND ACTORBIT) = V-COMMAND>
+
+<SYNTAX COUNT OBJECT = V-COUNT>
+
+<SYNTAX CROSS OBJECT = V-CROSS>
+<SYNONYM CROSS FORD>
+
+<SYNTAX CUT OBJECT WITH OBJECT (FIND WEAPONBIT) (CARRIED HELD) = V-CUT>
+<SYNONYM CUT SLICE PIERCE>
+
+<SYNTAX CURSE = V-CURSES>
+<SYNTAX CURSE OBJECT (FIND ACTORBIT) = V-CURSES>
+<SYNONYM CURSE SHIT FUCK DAMN>
+
+<SYNTAX DEFLATE OBJECT = V-DEFLATE>
+
+<SYNTAX DESTROY OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ WITH OBJECT (HELD CARRIED TAKE) = V-MUNG PRE-MUNG>
+<SYNTAX DESTROY DOWN OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ WITH OBJECT (HELD CARRIED TAKE) = V-MUNG PRE-MUNG>
+<SYNTAX DESTROY IN OBJECT (ON-GROUND IN-ROOM HELD CARRIED) = V-OPEN>
+<SYNONYM DESTROY DAMAGE BREAK BLOCK SMASH>
+
+<SYNTAX DIG IN OBJECT = V-DIG>
+<SYNTAX DIG OBJECT (ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND TOOLBIT) (HELD CARRIED HAVE) = V-DIG>
+<SYNTAX DIG IN OBJECT (ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND TOOLBIT) (HELD CARRIED HAVE) = V-DIG>
+
+<SYNTAX DISEMBARK OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM)
+ = V-DISEMBARK>
+
+<SYNTAX DISENCHANT OBJECT = V-DISENCHANT>
+
+<SYNTAX DRINK OBJECT (FIND DRINKBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-DRINK>
+<SYNTAX DRINK FROM OBJECT (HELD CARRIED) = V-DRINK-FROM>
+<SYNONYM DRINK IMBIBE SWALLOW>
+
+<SYNTAX DROP OBJECT (HELD MANY HAVE) = V-DROP PRE-DROP>
+<SYNTAX DROP OBJECT (HELD MANY HAVE) DOWN OBJECT = V-PUT PRE-PUT>
+<SYNTAX DROP OBJECT (HELD MANY HAVE) IN OBJECT = V-PUT PRE-PUT>
+<SYNTAX DROP OBJECT (HELD MANY HAVE) ON OBJECT = V-PUT-ON PRE-PUT>
+<SYNONYM DROP RELEASE>
+
+<SYNTAX EAT OBJECT (FIND FOODBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ = V-EAT>
+<SYNONYM EAT CONSUME TASTE BITE>
+
+<SYNTAX ECHO = V-ECHO>
+
+<SYNTAX ENCHANT OBJECT (ON-GROUND IN-ROOM) = V-ENCHANT>
+
+<SYNTAX ENTER = V-ENTER>
+<SYNTAX ENTER OBJECT = V-THROUGH>
+<SYNTAX EXIT = V-EXIT>
+<SYNTAX EXIT OBJECT = V-EXIT>
+
+<SYNTAX EXAMINE OBJECT (HELD CARRIED ON-GROUND IN-ROOM MANY) = V-EXAMINE>
+<SYNTAX EXAMINE IN OBJECT (HELD CARRIED IN-ROOM ON-GROUND MANY)
+ = V-LOOK-INSIDE>
+<SYNTAX EXAMINE ON OBJECT (HELD CARRIED IN-ROOM ON-GROUND MANY)
+ = V-LOOK-INSIDE>
+<SYNONYM EXAMINE DESCRIBE WHAT WHATS>
+
+<SYNTAX EXORCISE OBJECT = V-EXORCISE>
+<SYNTAX EXORCISE OUT OBJECT (FIND ACTORBIT) = V-EXORCISE>
+<SYNTAX EXORCISE AWAY OBJECT (FIND ACTORBIT) = V-EXORCISE>
+<SYNONYM EXORCISE BANISH CAST DRIVE BEGONE>
+
+<SYNTAX EXTINGUISH OBJECT (FIND ONBIT)
+ (HELD CARRIED ON-GROUND IN-ROOM TAKE HAVE) = V-LAMP-OFF>
+<SYNONYM EXTINGUISH DOUSE>
+
+<SYNTAX FILL OBJECT (FIND CONTBIT) (TAKE HAVE HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT = V-FILL PRE-FILL>
+<SYNTAX FILL OBJECT (FIND CONTBIT)
+ (TAKE HAVE HELD CARRIED ON-GROUND IN-ROOM) = V-FILL PRE-FILL>
+
+<SYNTAX FIND OBJECT = V-FIND>
+<SYNONYM FIND WHERE SEEK SEE>
+
+<SYNTAX FOLLOW = V-FOLLOW>
+<SYNTAX FOLLOW OBJECT = V-FOLLOW>
+<SYNONYM FOLLOW PURSUE CHASE COME>
+
+<SYNTAX FROBOZZ = V-FROBOZZ>
+
+<SYNTAX GIVE OBJECT (MANY HELD HAVE)
+ TO OBJECT (FIND ACTORBIT) (ON-GROUND) = V-GIVE PRE-GIVE>
+<SYNTAX GIVE OBJECT (FIND ACTORBIT) (ON-GROUND)
+ OBJECT (MANY HELD HAVE) = V-SGIVE PRE-SGIVE>
+<SYNTAX HAND OBJECT (MANY HELD HAVE)
+ TO OBJECT (FIND ACTORBIT) (ON-GROUND) = V-GIVE PRE-GIVE>
+<SYNTAX HAND OBJECT (FIND ACTORBIT) (ON-GROUND)
+ OBJECT (MANY HELD HAVE) = V-SGIVE PRE-SGIVE>
+<SYNONYM GIVE DONATE OFFER FEED>
+
+<SYNTAX HATCH OBJECT = V-HATCH>
+
+<SYNTAX HELLO = V-HELLO>
+<SYNTAX HELLO OBJECT = V-HELLO>
+<SYNONYM HELLO HI>
+
+<SYNTAX INCANT = V-INCANT>
+<SYNONYM INCANT CHANT>
+
+<SYNTAX INFLAT OBJECT WITH
+ OBJECT (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED) = V-INFLATE>
+
+<SYNTAX IS OBJECT IN OBJECT = V-IS-IN>
+<SYNTAX IS OBJECT ON OBJECT = V-IS-IN>
+
+<SYNTAX JUMP = V-LEAP>
+<SYNTAX JUMP OVER OBJECT = V-LEAP>
+<SYNTAX JUMP ACROSS OBJECT = V-LEAP>
+<SYNTAX JUMP IN OBJECT = V-LEAP>
+<SYNTAX JUMP FROM OBJECT = V-LEAP>
+<SYNTAX JUMP OFF OBJECT = V-LEAP>
+<SYNONYM JUMP LEAP DIVE>
+
+<SYNTAX KICK OBJECT = V-KICK>
+<SYNONYM KICK TAUNT>
+
+<SYNTAX KILL OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-ATTACK>
+<SYNTAX KILL OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE) = V-ATTACK>
+<SYNONYM KILL MURDER SLAY DISPATCH>
+
+<SYNTAX STAB OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-STAB>
+<SYNTAX STAB OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE) = V-ATTACK>
+
+<SYNTAX KISS OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-KISS>
+
+<SYNTAX KNOCK AT OBJECT = V-KNOCK>
+<SYNTAX KNOCK ON OBJECT = V-KNOCK>
+<SYNTAX KNOCK DOWN OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-ATTACK>
+<SYNONYM KNOCK RAP>
+
+<SYNTAX LAUNCH OBJECT (FIND VEHBIT) = V-LAUNCH>
+
+<SYNTAX LEAN ON OBJECT (HELD HAVE) = V-LEAN-ON>
+
+<SYNTAX LEAVE = V-LEAVE>
+<SYNTAX LEAVE OBJECT = V-DROP PRE-DROP>
+
+<SYNTAX LIGHT OBJECT (FIND LIGHTBIT)
+ (HELD CARRIED ON-GROUND IN-ROOM TAKE HAVE) = V-LAMP-ON>
+<SYNTAX LIGHT OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND FLAMEBIT) (HELD CARRIED TAKE HAVE) = V-BURN PRE-BURN>
+
+<SYNTAX LISTEN TO OBJECT = V-LISTEN>
+<SYNTAX LISTEN FOR OBJECT = V-LISTEN>
+
+<SYNTAX LOCK OBJECT (ON-GROUND IN-ROOM) WITH
+ OBJECT (FIND TOOLBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE) = V-LOCK>
+
+<SYNTAX LOOK = V-LOOK>
+<SYNTAX LOOK AROUND OBJECT (FIND RMUNGBIT) = V-LOOK>
+<SYNTAX LOOK UP OBJECT (FIND RMUNGBIT) = V-LOOK>
+<SYNTAX LOOK DOWN OBJECT (FIND RMUNGBIT) = V-LOOK>
+<SYNTAX LOOK AT OBJECT (HELD CARRIED ON-GROUND IN-ROOM MANY) = V-EXAMINE>
+<SYNTAX LOOK ON OBJECT = V-LOOK-ON>
+<SYNTAX LOOK WITH OBJECT (HELD CARRIED ON-GROUND IN-ROOM MANY) = V-LOOK-INSIDE>
+<SYNTAX LOOK UNDER OBJECT = V-LOOK-UNDER>
+<SYNTAX LOOK BEHIND OBJECT = V-LOOK-BEHIND>
+<SYNTAX LOOK IN OBJECT (HELD CARRIED ON-GROUND IN-ROOM MANY) = V-LOOK-INSIDE>
+<SYNTAX LOOK AT OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT = V-READ PRE-READ>
+<SYNTAX LOOK FOR OBJECT = V-FIND>
+<SYNONYM LOOK L STARE GAZE>
+
+<SYNTAX LOWER OBJECT = V-LOWER>
+
+<SYNTAX LUBRICATE OBJECT WITH OBJECT (HELD CARRIED) = V-OIL>
+<SYNONYM LUBRICATE OIL GREASE>
+
+<SYNTAX MAKE OBJECT = V-MAKE>
+
+<SYNTAX MELT OBJECT
+ WITH OBJECT (FIND FLAMEBIT) (HELD CARRIED ON-GROUND IN-ROOM) = V-MELT>
+<SYNONYM MELT LIQUIFY>
+
+<SYNTAX MOVE OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+<SYNTAX MOVE OBJECT (HELD MANY HAVE) IN OBJECT = V-PUT PRE-PUT>
+<SYNTAX MOVE OBJECT WITH OBJECT (FIND TOOLBIT) = V-TURN PRE-TURN>
+<SYNTAX ROLL UP OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+
+<SYNTAX MUMBLE = V-MUMBLE>
+<SYNONYM MUMBLE SIGH>
+
+<SYNTAX ODYSSEUS = V-ODYSSEUS>
+<SYNONYM ODYSSEUS ULYSSES>
+
+<SYNTAX OPEN OBJECT (FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM) = V-OPEN>
+<SYNTAX OPEN UP OBJECT (FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-OPEN>
+<SYNTAX OPEN OBJECT (FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM) WITH
+ OBJECT (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED HAVE) = V-OPEN>
+
+<SYNTAX PICK OBJECT = V-PICK>
+<SYNTAX PICK OBJECT WITH OBJECT = V-PICK>
+<SYNTAX PICK UP OBJECT (FIND TAKEBIT) (ON-GROUND MANY) = V-TAKE PRE-TAKE>
+
+<SYNTAX PLAY OBJECT = V-PLAY>
+
+<SYNTAX PLUG OBJECT WITH OBJECT = V-PLUG>
+<SYNONYM PLUG GLUE PATCH REPAIR FIX>
+
+<SYNTAX PLUGH = V-ADVENT>
+<SYNONYM PLUGH XYZZY>
+
+<SYNTAX POKE OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE) = V-MUNG PRE-MUNG>
+<SYNTAX PUNCTURE OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE) = V-MUNG PRE-MUNG>
+
+<SYNTAX POUR OBJECT (HELD CARRIED) = V-DROP PRE-DROP>
+<SYNTAX POUR OBJECT (HELD CARRIED) IN OBJECT = V-DROP PRE-DROP>
+<SYNTAX POUR OBJECT (HELD CARRIED) ON OBJECT = V-POUR-ON>
+<SYNTAX POUR OBJECT (HELD CARRIED) FROM OBJECT = V-DROP PRE-DROP>
+<SYNONYM POUR SPILL>
+
+<SYNTAX PRAY = V-PRAY>
+
+<SYNTAX PULL OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+<SYNTAX PULL ON OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+<SYNTAX PULL UP OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+<SYNONYM PULL TUG YANK>
+
+<SYNTAX PUMP UP OBJECT = V-PUMP>
+<SYNTAX PUMP UP OBJECT WITH OBJECT = V-PUMP>
+
+<SYNTAX PUSH OBJECT (IN-ROOM ON-GROUND) OBJECT = V-PUSH-TO>
+<SYNTAX PUSH OBJECT (IN-ROOM ON-GROUND) TO OBJECT = V-PUSH-TO>
+<SYNTAX PUSH OBJECT (IN-ROOM ON-GROUND MANY) = V-PUSH>
+<SYNTAX PUSH ON OBJECT (IN-ROOM ON-GROUND MANY) = V-PUSH>
+<SYNTAX PUSH OBJECT WITH OBJECT (FIND TOOLBIT) = V-TURN PRE-TURN>
+<SYNTAX PUSH OBJECT UNDER OBJECT = V-PUT-UNDER>
+<SYNONYM PUSH PRESS>
+
+<SYNTAX PUT OBJECT (HELD MANY HAVE) IN OBJECT = V-PUT PRE-PUT>
+<SYNTAX PUT OBJECT (HELD MANY HAVE) ON OBJECT = V-PUT-ON PRE-PUT>
+<SYNTAX PUT DOWN OBJECT (HELD MANY) = V-DROP PRE-DROP>
+<SYNTAX PUT OBJECT (HELD HAVE) UNDER OBJECT = V-PUT-UNDER>
+<SYNTAX PUT OUT OBJECT (FIND ONBIT)
+ (HELD CARRIED ON-GROUND IN-ROOM TAKE HAVE) = V-LAMP-OFF>
+<SYNTAX PUT ON OBJECT (IN-ROOM ON-GROUND CARRIED MANY) = V-WEAR>
+<SYNTAX PUT OBJECT (HELD MANY HAVE) BEHIND OBJECT = V-PUT-BEHIND>
+<SYNONYM PUT STUFF INSERT PLACE HIDE>
+
+<SYNTAX RAISE OBJECT = V-RAISE>
+<SYNTAX RAISE UP OBJECT = V-RAISE>
+<SYNONYM RAISE LIFT>
+
+<SYNTAX RAPE OBJECT (FIND ACTORBIT) = V-RAPE>
+<SYNONYM RAPE MOLEST>
+
+<SYNTAX READ OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ = V-READ PRE-READ>
+<SYNTAX READ FROM OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ = V-READ PRE-READ>
+<SYNTAX READ OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ WITH OBJECT = V-READ PRE-READ>
+<SYNTAX READ OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ OBJECT = V-READ-PAGE>
+<SYNONYM READ SKIM>
+
+<SYNTAX REPENT = V-REPENT>
+
+<SYNTAX RING OBJECT (TAKE) = V-RING>
+<SYNTAX RING OBJECT (TAKE) WITH OBJECT = V-RING>
+<SYNONYM RING PEAL>
+
+<SYNTAX RUB OBJECT = V-RUB>
+<SYNTAX RUB OBJECT WITH OBJECT = V-RUB>
+<SYNONYM RUB TOUCH FEEL PAT PET>
+
+<SYNTAX TALK TO OBJECT (FIND ACTORBIT) (IN-ROOM) = V-TELL>
+<SYNTAX SAY = V-SAY>
+
+<SYNTAX SEARCH OBJECT = V-SEARCH>
+<SYNTAX SEARCH IN OBJECT = V-SEARCH>
+<SYNTAX SEARCH FOR OBJECT = V-FIND>
+
+<SYNTAX SEND FOR OBJECT = V-SEND>
+
+<SYNTAX SHAKE OBJECT = V-SHAKE>
+
+<SYNTAX SKIP = V-SKIP>
+<SYNONYM SKIP HOP>
+
+;<SYNTAX SLIDE OBJECT = V-PUSH>
+<SYNTAX SLIDE OBJECT UNDER OBJECT = V-PUT-UNDER>
+<SYNTAX SLIDE OBJECT (IN-ROOM ON-GROUND) OBJECT = V-PUSH-TO>
+<SYNTAX SLIDE OBJECT (IN-ROOM ON-GROUND) TO OBJECT = V-PUSH-TO>
+
+<SYNTAX SMELL OBJECT = V-SMELL>
+<SYNONYM SMELL SNIFF>
+
+<SYNTAX SPIN OBJECT = V-SPIN>
+
+<SYNTAX SPRAY OBJECT ON OBJECT = V-SPRAY>
+<SYNTAX SPRAY OBJECT WITH OBJECT = V-SSPRAY>
+
+<SYNTAX SQUEEZE OBJECT = V-SQUEEZE>
+<SYNTAX SQUEEZE OBJECT ON OBJECT = V-PUT PRE-PUT>
+
+<SYNTAX STAND = V-STAND>
+<SYNTAX STAND UP OBJECT (FIND RMUNGBIT) = V-STAND>
+
+<SYNTAX STAY = V-STAY>
+
+<SYNTAX STRIKE OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) WITH OBJECT
+ (FIND WEAPONBIT) (HELD CARRIED ON-GROUND IN-ROOM HAVE) = V-ATTACK>
+<SYNTAX STRIKE OBJECT (ON-GROUND IN-ROOM HELD CARRIED) = V-STRIKE>
+
+<SYNTAX SWIM = V-SWIM>
+<SYNTAX SWIM IN OBJECT = V-SWIM>
+<SYNONYM SWIM BATHE WADE>
+
+<SYNTAX SWING OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE) = V-SWING>
+<SYNTAX SWING OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE)
+ AT OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-SWING>
+<SYNONYM SWING THRUST>
+
+<SYNTAX TAKE OBJECT (FIND TAKEBIT) (ON-GROUND IN-ROOM MANY) = V-TAKE PRE-TAKE>
+<SYNTAX TAKE IN OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-BOARD PRE-BOARD>
+<SYNTAX TAKE OUT OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-DISEMBARK>
+<SYNTAX TAKE ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
+<SYNTAX TAKE UP OBJECT (FIND RMUNGBIT) = V-STAND>
+<SYNTAX TAKE OBJECT (FIND TAKEBIT) (CARRIED IN-ROOM MANY)
+ OUT OBJECT = V-TAKE PRE-TAKE>
+<SYNTAX TAKE OBJECT (FIND TAKEBIT) (CARRIED IN-ROOM MANY)
+ OFF OBJECT = V-TAKE PRE-TAKE>
+<SYNTAX TAKE OBJECT (FIND TAKEBIT) (IN-ROOM CARRIED MANY)
+ FROM OBJECT = V-TAKE PRE-TAKE>
+<SYNONYM TAKE GET HOLD CARRY REMOVE GRAB CATCH>
+
+<SYNTAX TELL OBJECT (FIND ACTORBIT) (IN-ROOM) = V-TELL>
+<SYNTAX TELL OBJECT (FIND ACTORBIT) (IN-ROOM) ABOUT OBJECT = V-TELL>
+<SYNONYM TELL ASK>
+
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE)
+ AT OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-THROW>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE)
+ WITH OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-THROW>
+<SYNTAX THROW OBJECT OBJECT = V-OVERBOARD>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) IN OBJECT = V-PUT PRE-PUT>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) ON OBJECT = V-PUT-ON PRE-PUT>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) OFF OBJECT = V-THROW-OFF>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) OVER OBJECT = V-THROW-OFF>
+<SYNONYM THROW HURL CHUCK TOSS>
+
+<SYNTAX TIE OBJECT TO OBJECT = V-TIE>
+<SYNTAX TIE UP OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) WITH OBJECT
+ (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED HAVE) = V-TIE-UP>
+<SYNONYM TIE FASTEN SECURE ATTACH>
+
+<SYNTAX TREASURE = V-TREASURE>
+<SYNONYM TREASURE TEMPLE>
+
+<SYNTAX TURN OBJECT (FIND TURNBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED HAVE)
+ = V-TURN PRE-TURN>
+<SYNTAX TURN ON OBJECT (FIND LIGHTBIT)
+ (HELD CARRIED ON-GROUND IN-ROOM) = V-LAMP-ON>
+<SYNTAX TURN ON OBJECT WITH OBJECT (HAVE) = V-LAMP-ON>
+<SYNTAX TURN OFF OBJECT (FIND ONBIT)
+ (HELD CARRIED ON-GROUND IN-ROOM TAKE HAVE) = V-LAMP-OFF>
+<SYNTAX TURN OBJECT (FIND TURNBIT) TO OBJECT = V-TURN PRE-TURN>
+<SYNTAX TURN OBJECT (FIND TURNBIT) FOR OBJECT = V-TURN PRE-TURN>
+;<SYNTAX TURN OBJECT (FIND TURNBIT) = V-TURN PRE-TURN>
+<SYNONYM TURN SET FLIP SHUT>
+
+<SYNTAX UNLOCK OBJECT (ON-GROUND IN-ROOM) WITH OBJECT
+ (FIND TOOLBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE) = V-UNLOCK>
+
+<SYNTAX UNTIE OBJECT (ON-GROUND IN-ROOM HELD CARRIED) = V-UNTIE>
+<SYNTAX UNTIE OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ FROM OBJECT = V-UNTIE>
+<SYNONYM UNTIE FREE RELEASE UNFASTEN UNATTACH UNHOOK>
+
+<SYNTAX WAIT = V-WAIT>
+<SYNONYM WAIT Z>
+
+<SYNTAX WAKE OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-ALARM>
+<SYNTAX WAKE UP OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-ALARM>
+<SYNONYM WAKE AWAKE SURPRISE STARTLE>
+
+<SYNTAX WALK OBJECT = V-WALK>
+<SYNTAX WALK AWAY OBJECT = V-WALK>
+<SYNTAX WALK IN OBJECT = V-THROUGH>
+<SYNTAX WALK WITH OBJECT = V-THROUGH>
+<SYNTAX WALK ON OBJECT = V-THROUGH>
+<SYNTAX WALK OVER OBJECT = V-LEAP>
+<SYNTAX WALK TO OBJECT = V-WALK-TO>
+<SYNTAX WALK AROUND OBJECT = V-WALK-AROUND>
+<SYNTAX WALK UP OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-UP>
+<SYNTAX WALK DOWN OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-DOWN>
+<SYNONYM WALK GO RUN PROCEED STEP>
+
+<SYNTAX WAVE OBJECT (HELD CARRIED TAKE HAVE) = V-WAVE>
+<SYNTAX WAVE OBJECT (HELD CARRIED TAKE HAVE) AT OBJECT = V-WAVE>
+<SYNTAX WAVE AT OBJECT = V-WAVE>
+<SYNONYM WAVE BRANDISH POINT AIM>
+
+<SYNTAX WEAR OBJECT = V-WEAR>
+
+<SYNTAX WIN = V-WIN>
+<SYNONYM WIN WINNAGE>
+
+<SYNTAX WIND OBJECT = V-WIND>
+<SYNTAX WIND UP OBJECT = V-WIND>
+
+<SYNTAX WISH = V-WISH>
+
+<SYNTAX YELL = V-YELL>
+<SYNONYM YELL SCREAM SHOUT>
+
+<SYNTAX ZORK = V-ZORK> \ No newline at end of file
diff --git a/gverbs.zil b/gverbs.zil
new file mode 100644
index 0000000..62b1cbd
--- /dev/null
+++ b/gverbs.zil
@@ -0,0 +1,2137 @@
+ "Generic VERBS file for
+ The ZORK Trilogy
+ started on 7/25/83 by SEM"
+
+^L
+
+"Verb Functions for Game Commands"
+
+<GLOBAL VERBOSE <>>
+<GLOBAL SUPER-BRIEF <>>
+<GDECL (VERBOSE SUPER-BRIEF) <OR ATOM FALSE>>
+
+<ROUTINE V-VERBOSE ()
+ <SETG VERBOSE T>
+ <SETG SUPER-BRIEF <>>
+ <TELL "Maximum verbosity." CR>>
+
+<ROUTINE V-BRIEF ()
+ <SETG VERBOSE <>>
+ <SETG SUPER-BRIEF <>>
+ <TELL "Brief descriptions." CR>>
+
+<ROUTINE V-SUPER-BRIEF ()
+ <SETG SUPER-BRIEF T>
+ <TELL "Super-brief descriptions." CR>>
+
+;"V-DIAGNOSE is in ACTIONS.ZIL"
+
+<ROUTINE V-INVENTORY ()
+ <COND (<FIRST? ,WINNER> <PRINT-CONT ,WINNER>)
+ (T <TELL "You are empty-handed." CR>)>>
+
+<ROUTINE V-QUIT ("OPTIONAL" (ASK? T) "AUX" SCOR)
+ <V-SCORE>
+ <COND (<OR <AND .ASK?
+ <TELL
+"Do you wish to leave the game? (Y is affirmative): ">
+ <YES?>>
+ <NOT .ASK?>>
+ <QUIT>)
+ (ELSE <TELL "Ok." CR>)>>
+
+<ROUTINE V-RESTART ()
+ <V-SCORE T>
+ <TELL "Do you wish to restart? (Y is affirmative): ">
+ <COND (<YES?>
+ <TELL "Restarting." CR>
+ <RESTART>
+ <TELL "Failed." CR>)>>
+
+<ROUTINE V-RESTORE ()
+ <COND (<RESTORE>
+ <TELL "Ok." CR>
+ <V-FIRST-LOOK>)
+ (T
+ <TELL "Failed." CR>)>>
+
+<ROUTINE V-SAVE ()
+ <COND (<SAVE>
+ <TELL "Ok." CR>)
+ (T
+ <TELL "Failed." CR>)>>
+
+;"V-SCORE is in ACTIONS.ZIL"
+
+<ROUTINE V-SCRIPT ()
+ <PUT 0 8 <BOR <GET 0 8> 1>>
+ <TELL "Here begins a transcript of interaction with" CR>
+ <V-VERSION>
+ <RTRUE>>
+
+<ROUTINE V-UNSCRIPT ()
+ <TELL "Here ends a transcript of interaction with" CR>
+ <V-VERSION>
+ <PUT 0 8 <BAND <GET 0 8> -2>>
+ <RTRUE>>
+
+<ROUTINE V-VERSION ("AUX" (CNT 17))
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '<TELL "ZORK I: The Great Underground Empire|
+Copyright (c) 1981, 1982, 1983 Infocom, Inc. ">)
+ (<==? ,ZORK-NUMBER 2>
+ '<TELL "ZORK II: The Wizard of Frobozz|
+Copyright (c) 1981, 1982, 1983 Infocom, Inc. ">)
+ (T
+ '<TELL "ZORK III: The Dungeon Master|
+Copyright (c) 1982, 1983 Infocom, Inc. ">)>
+ <TELL "All rights reserved." CR>
+ <COND (<NOT <==? <BAND <GETB 0 1> 8> 0>>
+ <TELL "Licensed to Tandy Corporation." CR>)>
+ <TELL "ZORK is a registered trademark of Infocom, Inc.|
+Version ">
+ <PRINTN <BAND <GET 0 1> *3777*>>
+ <TELL " / Serial number ">
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> 23>
+ <RETURN>)
+ (T
+ <PRINTC <GETB 0 .CNT>>)>>
+ <CRLF>>
+
+<ROUTINE V-VERIFY ()
+ <TELL "Verifying disk..." CR>
+ <COND (<VERIFY>
+ <TELL "The disk is correct." CR>)
+ (T
+ <TELL CR "** Disk Failure **" CR>)>>
+
+<ROUTINE V-DEBUG ()
+ <TELL "Turning debugging feature ">
+ <COND (,DEBUG
+ <SETG DEBUG <>>
+ <TELL "off">)
+ (T
+ <SETG DEBUG T>
+ <TELL "on">)>
+ <TELL "." CR>>
+
+^L
+
+"Real Verb Functions"
+
+<ROUTINE V-ADVENT ()
+ <TELL "A hollow voice says \"Fool.\"" CR>>
+
+<ROUTINE V-AGAIN ("AUX" (OBJ <>))
+ <COND (<EQUAL? ,L-PRSA ,V?WALK>
+ <PERFORM ,L-PRSA ,L-PRSO>)
+ (T
+ <COND (,L-PRSO
+ <COND (<OR <NOT <LOC ,L-PRSO>>
+ <FSET? ,L-PRSO ,INVISIBLE>>
+ <SET OBJ ,L-PRSO>)>)>
+ <COND (,L-PRSI
+ <COND (<OR <NOT <LOC ,L-PRSI>>
+ <FSET? ,L-PRSI ,INVISIBLE>>
+ <SET OBJ ,L-PRSI>)>)>
+ <COND (<AND .OBJ
+ <NOT <EQUAL? .OBJ ,PSEUDO-OBJECT ,ROOMS>>>
+ <TELL "You can't see the " D .OBJ " anymore." CR>
+ <RFATAL>)
+ (T
+ <PERFORM ,L-PRSA ,L-PRSO ,L-PRSI>)>)>>
+
+<ROUTINE V-ALARM ()
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <COND %<COND (<==? ,ZORK-NUMBER 1>
+ '(<L? <GETP ,PRSO ,P?STRENGTH> 0>
+ <TELL "The " D ,PRSO " is rudely awakened." CR>
+ <AWAKEN ,PRSO>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ (T
+ <TELL
+"He's wide awake, or haven't you noticed..." CR>)>)
+ (T
+ <TELL "The " D ,PRSO " isn't sleeping." CR>)>>
+
+<ROUTINE V-ANSWER ()
+ <TELL "Nobody seems to be awaiting your answer." CR>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>>
+
+<ROUTINE V-ATTACK ()
+ <COND (<NOT <FSET? ,PRSO ,ACTORBIT>>
+ <TELL
+"I've known strange people, but fighting a " D ,PRSO "?" CR>)
+ (<OR <NOT ,PRSI>
+ <EQUAL? ,PRSI ,HANDS>>
+ <TELL
+"Trying to attack a " D ,PRSO " with your bare hands is suicidal." CR>)
+ (<NOT <IN? ,PRSI ,WINNER>>
+ <TELL "You aren't even holding the " D ,PRSI "." CR>)
+ (<NOT <FSET? ,PRSI ,WEAPONBIT>>
+ <TELL
+"Trying to attack the " D ,PRSO " with a " D ,PRSI " is suicidal." CR>)
+ (T
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '<HERO-BLOW>)
+ (T
+ '<TELL "You can't." CR>)>)>>
+
+<ROUTINE V-BACK ()
+ <TELL "Sorry, my memory is poor. Please give a direction." CR>>
+
+<ROUTINE V-BLAST ()
+ <TELL "You can't blast anything by using words." CR>>
+
+<ROUTINE PRE-BOARD ("AUX" AV)
+ <SET AV <LOC ,WINNER>>
+ <COND %<COND (<==? ,ZORK-NUMBER 3>
+ '(<EQUAL? ,PRSO ,WATER-CHANNEL>
+ <RFALSE>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ (<FSET? ,PRSO ,VEHBIT>
+ <COND (<NOT <IN? ,PRSO ,HERE>>
+ <TELL
+"The " D ,PRSO " must be on the ground to be boarded." CR>)
+ (<FSET? .AV ,VEHBIT>
+ <TELL "You are already in the " D .AV "!" CR>)
+ (T
+ <RFALSE>)>)
+ (T
+ <TELL
+"You have a theory on how to board a " D ,PRSO ", perhaps?" CR>)>
+ <RFATAL>>
+
+<ROUTINE V-BOARD ("AUX" AV)
+ <TELL "You are now in the " D ,PRSO "." CR>
+ <MOVE ,WINNER ,PRSO>
+ <APPLY <GETP ,PRSO ,P?ACTION> ,M-ENTER>
+ <RTRUE>>
+
+<ROUTINE V-BREATHE ()
+ <PERFORM ,V?INFLATE ,PRSO ,LUNGS>>
+
+<ROUTINE V-BRUSH ()
+ <TELL "If you wish, but heaven only knows why." CR>>
+
+<ROUTINE V-BUG ()
+ <TELL
+"Bug? Not in a flawless program like this! (Cough, cough)." CR>>
+
+<ROUTINE PRE-BURN ()
+ <COND (<NOT ,PRSI>
+ <TELL "You should say what you want to burn it with." CR>)
+ (<FLAMING? ,PRSI>
+ <RFALSE>)
+ (T
+ <TELL "With a " D ,PRSI "??!?" CR>)>>
+
+<ROUTINE V-BURN ()
+ <COND %<COND (<==? ,ZORK-NUMBER 2>
+ '(<EQUAL? <LOC ,PRSO> ,RECEPTACLE>
+ <BALLOON-BURN>
+ <RTRUE>))
+ (T
+ '(<NULL-F> <RFALSE>))>
+ (<FSET? ,PRSO ,BURNBIT>
+ <COND (<IN? ,PRSO ,WINNER>
+ <REMOVE-CAREFULLY ,PRSO>
+ <TELL "The " D ,PRSO>
+ <JIGS-UP
+" catches fire. Unfortunately, you were holding it at the time.">)
+ (T
+ <REMOVE-CAREFULLY ,PRSO>
+ <TELL
+"The " D ,PRSO " catches fire and is consumed." CR>)>)
+ (T
+ <TELL "You can't burn a " D ,PRSO "." CR>)>>
+
+<ROUTINE V-CHOMP ()
+ <TELL "Preposterous!" CR>>
+
+<ROUTINE V-CLIMB-DOWN () <V-CLIMB-UP ,P?DOWN ,PRSO>>
+
+<ROUTINE V-CLIMB-FOO ()
+ <V-CLIMB-UP ,P?UP ,PRSO>>
+
+<ROUTINE V-CLIMB-ON ()
+ <COND %<COND (<==? ,ZORK-NUMBER 1>
+ '(<FSET? ,PRSO ,VEHBIT>
+ <V-CLIMB-UP ,P?UP ,PRSO>))
+ (T
+ '(<FSET? ,PRSO ,VEHBIT>
+ <PERFORM ,V?BOARD ,PRSO>
+ <RTRUE>))>
+ (T
+ <TELL "You can't climb onto the " D ,PRSO "." CR>)>>
+
+<ROUTINE V-CLIMB-UP ("OPTIONAL" (DIR ,P?UP) (OBJ <>) "AUX" X TX)
+ <COND (<AND <NOT .OBJ> ,PRSO>
+ <SET OBJ ,PRSO>)>
+ <COND (<SET TX <GETPT ,HERE .DIR>>
+ <COND (.OBJ
+ <SET X <PTSIZE .TX>>
+ <COND (<OR <EQUAL? .X ,NEXIT>
+ <AND <EQUAL? .X ,CEXIT ,DEXIT ,UEXIT>
+ <NOT <GLOBAL-IN? ,PRSO <GETB .TX 0>>>>>
+ <TELL "The " D .OBJ " do">
+ <COND (<NOT <EQUAL? .OBJ ,STAIRS>>
+ <TELL "es">)>
+ <TELL "n't lead ">
+ <COND (<==? .DIR ,P?UP>
+ <TELL "up">)
+ (T <TELL "down">)>
+ <TELL "ward." CR>
+ <RTRUE>)>)>
+ <DO-WALK .DIR>
+ <RTRUE>)
+ (<NOT .OBJ>
+ <TELL "You can't go that way." CR>)
+ (<AND .OBJ
+ <ZMEMQ ,W?WALL
+ <SET X <GETPT ,PRSO ,P?SYNONYM>> <PTSIZE .X>>>
+ <TELL "Climbing the walls is to no avail." CR>)
+ (T
+ <TELL "You can't do that!" CR>)>>
+
+<ROUTINE V-CLOSE ()
+ <COND (<AND <NOT <FSET? ,PRSO ,CONTBIT>>
+ <NOT <FSET? ,PRSO ,DOORBIT>>>
+ <TELL "You must tell me how to do that to a " D ,PRSO "." CR>)
+ (<AND <NOT <FSET? ,PRSO ,SURFACEBIT>>
+ <NOT <EQUAL? <GETP ,PRSO ,P?CAPACITY> 0>>>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <FCLEAR ,PRSO ,OPENBIT>
+ <TELL "Closed." CR>
+ <COND (<AND ,LIT <NOT <SETG LIT <LIT? ,HERE>>>>
+ <TELL "It is now pitch black." CR>)>
+ <RTRUE>)
+ (T
+ <TELL "It is already closed." CR>)>)
+ (<FSET? ,PRSO ,DOORBIT>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <FCLEAR ,PRSO ,OPENBIT>
+ <TELL "The " D ,PRSO " is now closed." CR>)
+ (T
+ <TELL "It is already closed." CR>)>)
+ (T
+ <TELL "You cannot close that." CR>)>>
+
+<ROUTINE V-COMMAND ()
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <TELL "The " D ,PRSO " pays no attention." CR>)
+ (T
+ <TELL "You cannot talk to that!" CR>)>>
+
+<ROUTINE V-COUNT ()
+ <COND (<EQUAL? ,PRSO ,BLESSINGS>
+ <TELL "Well, for one, you are playing Zork..." CR>)
+ (T
+ <TELL "You have lost your mind." CR>)>>
+
+<ROUTINE V-CROSS ()
+ <TELL "You can't cross that!" CR>>
+
+<ROUTINE V-CURSES ()
+ <COND (,PRSO
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <TELL "Insults of this nature won't help you." CR>)
+ (T
+ <TELL "What a loony!" CR>)>)
+ (T
+ <TELL
+"Such language in a high-class establishment like this!" CR>)>>
+
+<ROUTINE V-CUT ()
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <PERFORM ,V?ATTACK ,PRSO ,PRSI>)
+ (<AND <FSET? ,PRSO ,BURNBIT>
+ <FSET? ,PRSI ,WEAPONBIT>>
+ <REMOVE-CAREFULLY ,PRSO>
+ <TELL "Your skillful " D ,PRSI "smanship slices the " D ,PRSO
+" into innumerable slivers which blow away." CR>)
+ (<NOT <FSET? ,PRSI ,WEAPONBIT>>
+ <TELL
+"The \"cutting edge\" of a " D ,PRSI " is hardly adequate." CR>)
+ (T
+ <TELL "Strange concept, cutting the " D ,PRSO "...." CR>)>>
+
+<ROUTINE V-DEFLATE ()
+ <TELL "Come on, now!" CR>>
+
+<ROUTINE V-DIG ()
+ <COND (<NOT ,PRSI>
+ <SETG PRSI ,HANDS>)>
+ <COND (<FSET? ,PRSI ,TOOLBIT>
+ <TELL "Digging with the " D ,PRSI " is slow and tedious." CR>)
+ (T
+ <TELL "Digging with a " D ,PRSI " is silly." CR>)>>
+
+<ROUTINE V-DISEMBARK ()
+ <COND (<NOT <EQUAL? <LOC ,WINNER> ,PRSO>>
+ <TELL "You're not in that!" CR>
+ <RFATAL>)
+ (<FSET? ,HERE ,RLANDBIT>
+ <TELL "You are on your own feet again." CR>
+ <MOVE ,WINNER ,HERE>)
+ (T
+ <TELL
+"You realize that getting out here would be fatal." CR>
+ <RFATAL>)>>
+
+<ROUTINE V-DISENCHANT ()
+ %<COND (<==? ,ZORK-NUMBER 2>
+ '<COND (<NOT <IN? ,PRSO ,HERE>>
+ <RTRUE>)
+ (<OR <EQUAL? ,SPELL-USED ,W?FEEBLE ,W?FUMBLE ,W?FEAR>
+ <EQUAL? ,SPELL-USED ,W?FREEZE ,W?FALL ,W?FERMENT>
+ <EQUAL? ,SPELL-USED ,W?FIERCE ,W?FENCE ,W?FANTASIZE>>
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <COND (<EQUAL? ,SPELL-USED ,W?FEEBLE>
+ <TELL
+"The " D ,PRSO " seems stronger now." CR>)
+ (<EQUAL? ,SPELL-USED ,W?FUMBLE>
+ <TELL
+"The " D ,PRSO " no longer appears clumsy." CR>)
+ (<EQUAL? ,SPELL-USED ,W?FEAR>
+ <TELL
+"The " D ,PRSO " no longer appears afraid." CR>)
+ (<EQUAL? ,SPELL-USED ,W?FREEZE>
+ <TELL
+"The " D ,PRSO " moves again." CR>)
+ (<EQUAL? ,SPELL-USED ,W?FERMENT>
+ <TELL
+"The " D ,PRSO " stops swaying." CR>)
+ (<EQUAL? ,SPELL-USED ,W?FIERCE>
+ <TELL
+"The " D ,PRSO " appears more peaceful." CR>)>)>)
+ (<EQUAL? ,SPELL-USED ,W?FLOAT>
+ <TELL
+"The " D ,PRSO " sinks to the ground." CR>)
+ (<EQUAL? ,SPELL-USED ,W?FUDGE>
+ <TELL "The sweet smell has dispersed." CR>)>)
+ (T
+ '<TELL "Nothing happens." CR>)>>
+
+<ROUTINE V-DRINK ()
+ <V-EAT>>
+
+<ROUTINE V-DRINK-FROM ()
+ <TELL "How peculiar!" CR>>
+
+<ROUTINE PRE-DROP ()
+ <COND (<EQUAL? ,PRSO <LOC ,WINNER>>
+ <PERFORM ,V?DISEMBARK ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-DROP ()
+ <COND (<IDROP>
+ <TELL "Dropped." CR>)>>
+
+<ROUTINE V-EAT ("AUX" (EAT? <>) (DRINK? <>) (NOBJ <>))
+ <COND (<AND <SET EAT? <FSET? ,PRSO ,FOODBIT>> <IN? ,PRSO ,WINNER>>
+ <COND (<VERB? DRINK>
+ <TELL "How can you drink that?">)
+ (T
+ <TELL "Thank you very much. It really hit the spot.">
+ <REMOVE-CAREFULLY ,PRSO>)>
+ <CRLF>)
+ (<FSET? ,PRSO ,DRINKBIT>
+ <SET DRINK? T>
+ <SET NOBJ <LOC ,PRSO>>
+ <COND (<OR <IN? ,PRSO ,GLOBAL-OBJECTS>
+ <IN? ,PRSO ,LOCAL-GLOBALS>
+ <GLOBAL-IN? ,GLOBAL-WATER ,HERE>
+ <EQUAL? ,PRSO ,PSEUDO-OBJECT>>
+ <HIT-SPOT>)
+ (<NOT .NOBJ>
+ <TELL
+"There isn't any water here." CR>)
+ (<NOT <IN? .NOBJ ,WINNER>>
+ <TELL
+"You have to be holding the " D .NOBJ " first." CR>)
+ (<NOT <FSET? .NOBJ ,OPENBIT>>
+ <TELL
+"You'll have to open the " D .NOBJ " first." CR>)
+ (T
+ <HIT-SPOT>)>)
+ (<NOT <OR .EAT? .DRINK?>>
+ <TELL
+"I don't think that the " D ,PRSO " would agree with you." CR>)>>
+
+<ROUTINE HIT-SPOT ()
+ <TELL
+"Thank you very much. I was rather thirsty (from all this talking,
+probably)." CR>
+ <COND (<AND <EQUAL? ,PRSO ,WATER>
+ <NOT <GLOBAL-IN? ,GLOBAL-WATER ,HERE>>>
+ <REMOVE-CAREFULLY ,PRSO>)>>
+
+<ROUTINE V-ECHO ("AUX" LST MAX (ECH 0) CNT)
+ #DECL ((LST) <PRIMTYPE VECTOR> (MAX CNT ECH) FIX)
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '<COND (<G? <GETB ,P-LEXV ,P-LEXWORDS> 0>
+ <SET LST <REST
+ ,P-LEXV
+ <* <GETB ,P-LEXV ,P-LEXWORDS> ,P-WORDLEN>>>
+ <SET MAX <- <+ <GETB .LST 0> <GETB .LST 1>> 1>>
+ <REPEAT ()
+ <COND (<G? <SET ECH <+ .ECH 1>> 2>
+ <TELL "..." CR>
+ <RETURN>)
+ (T
+ <SET CNT <- <GETB .LST 1> 1>>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> .MAX>
+ <RETURN>)
+ (T
+ <PRINTC <GETB ,P-INBUF .CNT>>)>>
+ <TELL " ">)>>)
+ (T <TELL "echo echo ..." CR>)>)
+ (T
+ '<TELL "echo echo ..." CR>)>>
+
+<ROUTINE V-ENCHANT ()
+%<COND (<==? ,ZORK-NUMBER 2>
+ '<COND (,WAND-ON <SETG SPELL-VICTIM ,WAND-ON>)>)
+ (T
+ '<NULL-F>)>
+%<COND (<==? ,ZORK-NUMBER 2>
+ '<COND (,SPELL-VICTIM
+ <COND (<NOT ,SPELL-USED>
+ <TELL "You must be more specific." CR>
+ <RTRUE>)>
+ <COND (<OR <EQUAL? ,SPELL-USED ,W?FEEBLE ,W?FUMBLE ,W?FEAR>
+ <EQUAL? ,SPELL-USED ,W?FREEZE ,W?FALL ,W?FERMENT>
+ <EQUAL? ,SPELL-USED ,W?FIERCE ,W?FENCE ,W?FANTASIZE>>
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <TELL
+"The wand stops glowing, but there is no other obvious effect." CR>)
+ (T
+ <TELL
+"That might have done something, but it's hard to tell with a " D ,PRSO "." CR>)>)
+ ;(<EQUAL? ,SPELL-USED ,W?FIREPROOF>
+ <RTRUE>)
+ (<EQUAL? ,SPELL-USED ,W?FUDGE>
+ <TELL
+"A strong odor of chocolate permeates the room." CR>)
+ (<EQUAL? ,SPELL-USED ,W?FLUORESCE>
+ <FSET ,PRSO ,LIGHTBIT>
+ <FSET ,PRSO ,ONBIT>
+ <SETG LIT T>
+ <TELL
+"The " D ,PRSO " begins to glow." CR>)
+ (<EQUAL? ,SPELL-USED ,W?FILCH>
+ <SETG SPELL-HANDLED? T>
+ <COND (<FSET? ,PRSO ,TAKEBIT>
+ <MOVE ,PRSO ,WINNER>
+ <SCORE-OBJ ,PRSO>
+ <TELL "Filched!" CR>)
+ (ELSE
+ <TELL "You can't filch the " D ,PRSO "!" CR>)>)
+ (<AND <EQUAL? ,SPELL-USED ,W?FLOAT>
+ <FSET? ,PRSO ,TAKEBIT>>
+ <COND (<AND <EQUAL? ,SPELL-VICTIM ,COLLAR>
+ <IN? ,COLLAR ,CERBERUS>>
+ <SETG SPELL-VICTIM ,CERBERUS>)>
+ <TELL
+"The " D ,PRSO " floats serenely in mid-air." CR>)
+ (<AND <EQUAL? ,SPELL-USED ,W?FRY>
+ <FSET? ,PRSO ,TAKEBIT>>
+ <SETG SPELL-HANDLED? T>
+ <REMOVE-CAREFULLY ,PRSO>
+ <TELL "The " D ,PRSO " goes up in a puff of smoke." CR>)
+ (ELSE
+ <SETG SPELL-VICTIM <>>
+ <TELL
+"The wand stops glowing, but there is no other apparent effect." CR>)>)
+ (ELSE
+ <SETG SPELL-VICTIM <>>
+ <TELL "Nothing happens." CR>)>)
+ (T
+ '<V-DISENCHANT>)>>
+
+<ROUTINE REMOVE-CAREFULLY (OBJ "AUX" OLIT)
+ <COND (<EQUAL? .OBJ ,P-IT-OBJECT>
+ <SETG P-IT-OBJECT <>>
+ <SETG P-IT-LOC <>>)>
+ <SET OLIT ,LIT>
+ <REMOVE .OBJ>
+ <SETG LIT <LIT? ,HERE>>
+ <COND (<AND .OLIT <NOT <EQUAL? .OLIT ,LIT>>>
+ <TELL "You are left in the dark..." CR>)>
+ T>
+
+<ROUTINE V-ENTER ()
+ <DO-WALK ,P?IN>>
+
+<ROUTINE V-EXAMINE ()
+ <COND (<GETP ,PRSO ,P?TEXT>
+ <TELL <GETP ,PRSO ,P?TEXT> CR>)
+ (<OR <FSET? ,PRSO ,CONTBIT>
+ <FSET? ,PRSO ,DOORBIT>>
+ <V-LOOK-INSIDE>)
+ (T
+ <TELL "There's nothing special about the " D ,PRSO "." CR>)>>
+
+<ROUTINE V-EXIT ()
+ <COND (<IN? ,WINNER ,PRSO>
+ <PERFORM ,V?DISEMBARK ,PRSO>
+ <RTRUE>)
+ (T <DO-WALK ,P?OUT>)>>
+
+<ROUTINE V-EXORCISE ()
+ <TELL "What a bizarre concept!" CR>>
+
+<ROUTINE PRE-FILL ("AUX" TX)
+ <COND (<NOT ,PRSI>
+ <SET TX <GETPT ,HERE ,P?GLOBAL>>
+ <COND (<AND .TX <ZMEMQB ,GLOBAL-WATER .TX <- <PTSIZE .TX> 1>>>
+ <PERFORM ,V?FILL ,PRSO ,GLOBAL-WATER>
+ <RTRUE>)
+ (<IN? ,WATER <LOC ,WINNER>>
+ <PERFORM ,V?FILL ,PRSO ,WATER>
+ <RTRUE>)
+ (T
+ <TELL "There is nothing to fill it with." CR>
+ <RTRUE>)>)>
+ <COND (<EQUAL? ,PRSI ,WATER>
+ <RFALSE>)
+ (<NOT <EQUAL? ,PRSI ,GLOBAL-WATER>>
+ <PERFORM ,V?PUT ,PRSI ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-FILL ()
+ <COND (<NOT ,PRSI>
+ <COND (<GLOBAL-IN? ,GLOBAL-WATER ,HERE>
+ <PERFORM ,V?FILL ,PRSO ,GLOBAL-WATER>
+ <RTRUE>)
+ (<IN? ,WATER <LOC ,WINNER>>
+ <PERFORM ,V?FILL ,PRSO ,WATER>
+ <RTRUE>)
+ (T
+ <TELL "There's nothing to fill it with." CR>)>)
+ (T
+ <TELL "You may know how to do that, but I don't." CR>)>>
+
+<ROUTINE V-FIND ("AUX" (L <LOC ,PRSO>))
+ <COND (<EQUAL? ,PRSO ,HANDS ,LUNGS>
+ <TELL
+"Within six feet of your head, assuming you haven't left that
+somewhere." CR>)
+ (<EQUAL? ,PRSO ,ME>
+ <TELL "You're around here somewhere..." CR>)
+ (<EQUAL? .L ,GLOBAL-OBJECTS>
+ <TELL "You find it." CR>)
+ (<IN? ,PRSO ,WINNER>
+ <TELL "You have it." CR>)
+ (<OR <IN? ,PRSO ,HERE>
+ <GLOBAL-IN? ,PRSO ,HERE>
+ <EQUAL? ,PRSO ,PSEUDO-OBJECT>>
+ <TELL "It's right here." CR>)
+ (<FSET? .L ,ACTORBIT>
+ <TELL "The " D .L " has it." CR>)
+ (<FSET? .L ,SURFACEBIT>
+ <TELL "It's on the " D .L "." CR>)
+ (<FSET? .L ,CONTBIT>
+ <TELL "It's in the " D .L "." CR>)
+ (T
+ <TELL "Beats me." CR>)>>
+
+<ROUTINE V-FOLLOW ()
+ <TELL "You're nuts!" CR>>
+
+<ROUTINE V-FROBOZZ ()
+ <TELL
+"The FROBOZZ Corporation created, owns, and operates this dungeon." CR>>
+
+<ROUTINE PRE-GIVE ()
+ <COND (<NOT <HELD? ,PRSO>>
+ <TELL
+"That's easy for you to say since you don't even have the " D ,PRSO "." CR>)>>
+
+<ROUTINE V-GIVE ()
+ <COND (<NOT <FSET? ,PRSI ,ACTORBIT>>
+ <TELL "You can't give a " D ,PRSO " to a " D ,PRSI "!" CR>)
+ (T
+ <TELL "The " D ,PRSI " refuses it politely." CR>)>>
+
+<ROUTINE V-HATCH ()
+ <TELL "Bizarre!" CR>>
+
+<GLOBAL HS 0> ;"counts occurences of HELLO, SAILOR"
+
+<ROUTINE V-HELLO ()
+ <COND (,PRSO
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <TELL
+"The " D ,PRSO " bows his head to you in greeting." CR>)
+ (T
+ <TELL
+"It's a well known fact that only schizophrenics say \"Hello\" to a "
+D ,PRSO "." CR>)>)
+ (T
+ <TELL <PICK-ONE ,HELLOS> CR>)>>
+
+<ROUTINE V-INCANT ()
+%<COND (<==? ,ZORK-NUMBER 2>
+ '<COND (,SPELL-USED
+ <TELL "Nothing happens." CR>)
+ (,WAND-ON
+ <SETG SPELL-VICTIM ,WAND-ON>
+ <SETG SPELL-USED <GET ,P-LEXV ,P-CONT>>
+ <TELL "The wand glows very brightly for a moment." CR>
+ <ENABLE <QUEUE I-SPELL <+ 10 <RANDOM 10>>>>
+ <SETG WAND-ON <>>
+ <PERFORM ,V?ENCHANT ,SPELL-VICTIM>)
+ (T
+ <TELL
+"The incantation echoes back faintly, but nothing else happens." CR>)>)
+ (T
+ '<TELL
+"The incantation echoes back faintly, but nothing else happens." CR>)>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <RTRUE>>
+
+<ROUTINE V-INFLATE ()
+ <TELL "How can you inflate that?" CR>>
+
+<ROUTINE V-IS-IN ()
+ <COND (<IN? ,PRSO ,PRSI>
+ <TELL "Yes, it is ">
+ <COND (<FSET? ,PRSI ,SURFACEBIT>
+ <TELL "on">)
+ (T
+ <TELL "in">)>
+ <TELL " the " D ,PRSI "." CR>)
+ (T
+ <TELL "No, it isn't." CR>)>>
+
+<ROUTINE V-KICK () <HACK-HACK "Kicking the ">>
+
+<ROUTINE V-KISS ()
+ <TELL "I'd sooner kiss a pig." CR>>
+
+<ROUTINE V-KNOCK ()
+ <COND (<FSET? ,PRSO ,DOORBIT>
+ <TELL "Nobody's home." CR>)
+ (T
+ <TELL "Why knock on a " D ,PRSO "?" CR>)>>
+
+<ROUTINE V-LAMP-OFF ()
+ <COND (<FSET? ,PRSO ,LIGHTBIT>
+ <COND (<NOT <FSET? ,PRSO ,ONBIT>>
+ <TELL "It is already off." CR>)
+ (T
+ <FCLEAR ,PRSO ,ONBIT>
+ <COND (,LIT
+ <SETG LIT <LIT? ,HERE>>)>
+ <TELL "The " D ,PRSO " is now off." CR>
+ <COND (<NOT ,LIT>
+ <TELL "It is now pitch black." CR>)>)>)
+ (T
+ <TELL "You can't turn that off." CR>)>
+ <RTRUE>>
+
+<ROUTINE V-LAMP-ON ()
+ <COND (<FSET? ,PRSO ,LIGHTBIT>
+ <COND (<FSET? ,PRSO ,ONBIT>
+ <TELL "It is already on." CR>)
+ (T
+ <FSET ,PRSO ,ONBIT>
+ <TELL "The " D ,PRSO " is now on." CR>
+ <COND (<NOT ,LIT>
+ <SETG LIT <LIT? ,HERE>>
+ <CRLF>
+ <V-LOOK>)>)>)
+ (<FSET? ,PRSO ,BURNBIT>
+ <TELL
+"If you wish to burn the " D ,PRSO ", you should say so." CR>)
+ (T
+ <TELL "You can't turn that on." CR>)>
+ <RTRUE>>
+
+<ROUTINE V-LAUNCH ()
+ <COND (<FSET? ,PRSO ,VEHBIT>
+ <TELL "You can't launch that by saying \"launch\"!" CR>)
+ (T
+ <TELL "That's pretty weird." CR>)>>
+
+<ROUTINE V-LEAN-ON ()
+ <TELL "Getting tired?" CR>>
+
+<ROUTINE V-LEAP ("AUX" TX S)
+ <COND (,PRSO
+ <COND (<IN? ,PRSO ,HERE>
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <TELL
+"The " D ,PRSO " is too big to jump over." CR>)
+ (T
+ <V-SKIP>)>)
+ (T
+ <TELL "That would be a good trick." CR>)>)
+ (<SET TX <GETPT ,HERE ,P?DOWN>>
+ <SET S <PTSIZE .TX>>
+ <COND (<OR <EQUAL? .S 2> ;NEXIT
+ <AND <EQUAL? .S 4> ;CEXIT
+ <NOT <VALUE <GETB .TX 1>>>>>
+ <TELL
+"This was not a very safe place to try jumping." CR>
+ <JIGS-UP <PICK-ONE ,JUMPLOSS>>)
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '(<EQUAL? ,HERE ,UP-A-TREE>
+ <TELL
+"In a feat of unaccustomed daring, you manage to land on your feet without
+killing yourself." CR CR>
+ <DO-WALK ,P?DOWN>
+ <RTRUE>))
+ (T '(<NULL-F> T))>
+ (T
+ <V-SKIP>)>)
+ (T
+ <V-SKIP>)>>
+
+<GLOBAL JUMPLOSS
+ <LTABLE 0
+ "You should have looked before you leaped."
+ "In the movies, your life would be passing before your eyes."
+ "Geronimo...">>
+
+<ROUTINE V-LEAVE () <DO-WALK ,P?OUT>>
+
+<ROUTINE V-LISTEN ()
+ <TELL "The " D ,PRSO " makes no sound." CR>>
+
+<ROUTINE V-LOCK ()
+ <TELL "It doesn't seem to work." CR>>
+
+<ROUTINE V-LOOK ()
+ <COND (<DESCRIBE-ROOM T>
+ <DESCRIBE-OBJECTS T>)>>
+
+<ROUTINE V-LOOK-BEHIND ()
+ <TELL "There is nothing behind the " D ,PRSO "." CR>>
+
+<ROUTINE V-LOOK-INSIDE ()
+ <COND (<FSET? ,PRSO ,DOORBIT>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <TELL
+"The " D ,PRSO " is open, but I can't tell what's beyond it.">)
+ (T
+ <TELL "The " D ,PRSO " is closed.">)>
+ <CRLF>)
+ (<FSET? ,PRSO ,CONTBIT>
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <TELL "There is nothing special to be seen." CR>)
+ (<SEE-INSIDE? ,PRSO>
+ <COND (<AND <FIRST? ,PRSO>
+ <PRINT-CONT ,PRSO>>
+ <RTRUE>)
+ (T
+ <TELL "The " D ,PRSO " is empty." CR>)>)
+ (T
+ <TELL "The " D ,PRSO " is closed." CR>)>)
+ (T
+ <TELL "You can't look inside a " D ,PRSO "." CR>)>>
+
+<ROUTINE V-LOOK-ON ()
+ <COND (<FSET? ,PRSO ,SURFACEBIT>
+ <PERFORM ,V?LOOK-INSIDE ,PRSO>
+ <RTRUE>)
+ (T
+ <TELL "Look on a " D ,PRSO "???" CR>)>>
+
+<ROUTINE V-LOOK-UNDER ()
+ <TELL "There is nothing but dust there." CR>>
+
+<ROUTINE V-LOWER () <HACK-HACK "Playing in this way with the ">>
+
+<ROUTINE V-MAKE ()
+ <TELL "You can't do that." CR>>
+
+<ROUTINE V-MELT ()
+ <TELL "It's not clear that a " D ,PRSO " can be melted." CR>>
+
+<ROUTINE PRE-MOVE ()
+ <COND (<HELD? ,PRSO>
+ <TELL "You aren't an accomplished enough juggler." CR>)>>
+
+<ROUTINE V-MOVE ()
+ <COND (<FSET? ,PRSO ,TAKEBIT>
+ <TELL "Moving the " D ,PRSO " reveals nothing." CR>)
+ (T
+ <TELL "You can't move the " D ,PRSO "." CR>)>>
+
+<ROUTINE V-MUMBLE ()
+ <TELL "You'll have to speak up if you expect me to hear you!" CR>>
+
+<ROUTINE PRE-MUNG ()
+ <COND %<COND (<==? ,ZORK-NUMBER 3>
+ '(<EQUAL? ,PRSO ,BEAM>
+ <RFALSE>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ (<OR <NOT ,PRSI>
+ <NOT <FSET? ,PRSI ,WEAPONBIT>>>
+ <TELL "Trying to destroy the " D ,PRSO " with ">
+ <COND (<NOT ,PRSI>
+ <TELL "your bare hands">)
+ (T
+ <TELL "a " D ,PRSI>)>
+ <TELL " is futile." CR>)>>
+
+<ROUTINE V-MUNG ()
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <PERFORM ,V?ATTACK ,PRSO>
+ <RTRUE>)
+ (T
+ <TELL "Nice try." CR>)>>
+
+<ROUTINE V-ODYSSEUS ()
+ <COND %<COND (<==? ,ZORK-NUMBER 1>
+ '(<AND <EQUAL? ,HERE ,CYCLOPS-ROOM>
+ <IN? ,CYCLOPS ,HERE>
+ <NOT ,CYCLOPS-FLAG>>
+ <DISABLE <INT I-CYCLOPS>>
+ <SETG CYCLOPS-FLAG T>
+ <TELL
+"The cyclops, hearing the name of his father's deadly nemesis, flees the room
+by knocking down the wall on the east of the room." CR>
+ <SETG MAGIC-FLAG T>
+ <FCLEAR ,CYCLOPS ,FIGHTBIT>
+ <REMOVE-CAREFULLY ,CYCLOPS>))
+ (T
+ '(<NULL-F> T))>
+ (T
+ <TELL "Wasn't he a sailor?" CR>)>>
+
+<ROUTINE V-OIL ()
+ <TELL "You probably put spinach in your gas tank, too." CR>>
+
+<ROUTINE V-OPEN ("AUX" F STR)
+ <COND (<AND <FSET? ,PRSO ,CONTBIT>
+ <NOT <EQUAL? <GETP ,PRSO ,P?CAPACITY> 0>>>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <TELL "It is already open." CR>)
+ (T
+ <FSET ,PRSO ,OPENBIT>
+ <FSET ,PRSO ,TOUCHBIT>
+ <COND (<OR <NOT <FIRST? ,PRSO>> <FSET? ,PRSO ,TRANSBIT>>
+ <TELL "Opened." CR>)
+ (<AND <SET F <FIRST? ,PRSO>>
+ <NOT <NEXT? .F>>
+ <NOT <FSET? .F ,TOUCHBIT>>
+ <SET STR <GETP .F ,P?FDESC>>>
+ <TELL "The " D ,PRSO " opens." CR>
+ <TELL .STR CR>)
+ (T
+ <TELL "Opening the " D ,PRSO " reveals ">
+ <PRINT-CONTENTS ,PRSO>
+ <TELL "." CR>)>)>)
+ (<FSET? ,PRSO ,DOORBIT>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <TELL "It is already open." CR>)
+ (T
+ <TELL "The " D ,PRSO " opens." CR>
+ <FSET ,PRSO ,OPENBIT>)>)
+ (T
+ <TELL
+"You must tell me how to do that to a " D ,PRSO "." CR>)>>
+
+<ROUTINE V-OVERBOARD ("AUX" LOCN)
+ <COND %<COND (<==? ,ZORK-NUMBER 1>
+ '(<EQUAL? ,PRSI ,TEETH>
+ <COND (<FSET? <SET LOCN <LOC ,WINNER>> ,VEHBIT>
+ <MOVE ,PRSO <LOC .LOCN>>
+ <TELL "Ahoy -- " D ,PRSO " overboard!" CR>)
+ (T
+ <TELL "You're not in anything!" CR>)>))
+ (T '(<NULL-F> T))>
+ (T
+ <PERFORM ,V?THROW ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-PICK () <TELL "You can't pick that." CR>>
+
+<ROUTINE V-PLAY ()
+ <TELL "That's silly!" CR>>
+
+<ROUTINE V-PLUG ()
+ <TELL "This has no effect." CR>>
+
+<ROUTINE V-POUR-ON ()
+ <COND (<EQUAL? ,PRSO ,WATER>
+ <REMOVE-CAREFULLY ,PRSO>
+ <COND (<FLAMING? ,PRSI>
+ <TELL "The " D ,PRSI " is extinguished." CR>
+ <FCLEAR ,PRSI ,ONBIT>
+ <FCLEAR ,PRSI ,FLAMEBIT>)
+ (T
+ <TELL
+"The water spills over the " D ,PRSI ", to the floor, and evaporates." CR>)>)
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '(<EQUAL? ,PRSO ,PUTTY>
+ <PERFORM ,V?PUT ,PUTTY ,PRSI>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ (T
+ <TELL "You can't pour that." CR>)>>
+
+<ROUTINE V-PRAY ()
+ <COND %<COND (<==? ,ZORK-NUMBER 1>
+ '(<EQUAL? ,HERE ,SOUTH-TEMPLE>
+ <GOTO ,FOREST-1>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ (T
+ <TELL
+"If you pray enough, your prayers may be answered." CR>)>>
+
+<ROUTINE V-PUMP ()
+ <COND %<COND (<==? ,ZORK-NUMBER 1>
+ '(<AND ,PRSI <NOT <EQUAL? ,PRSI ,PUMP>>>
+ <TELL "Pump it up with a " D ,PRSI "?" CR>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '(<IN? ,PUMP ,WINNER>
+ <PERFORM ,V?INFLATE ,PRSO ,PUMP>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ (T
+ <TELL "It's really not clear how." CR>)>>
+
+<ROUTINE V-PUSH () <HACK-HACK "Pushing the ">>
+
+<ROUTINE V-PUSH-TO ()
+ <TELL "You can't push things to that." CR>>
+
+<ROUTINE PRE-PUT ()
+ <COND %<COND (<==? ,ZORK-NUMBER 3>
+ '(<EQUAL? ,PRSO ,SHORT-POLE>
+ <RFALSE>))
+ (T
+ '(<NULL-F>
+ <RFALSE>))>
+ (T
+ <PRE-GIVE>)>> ;"That's easy for you to say..."
+
+<ROUTINE V-PUT ()
+ <COND (<OR <FSET? ,PRSI ,OPENBIT>
+ <OPENABLE? ,PRSI>
+ <FSET? ,PRSI ,VEHBIT>>)
+ (T
+ <TELL "You can't do that." CR>
+ <RTRUE>)>
+ <COND (<NOT <FSET? ,PRSI ,OPENBIT>>
+ <TELL "The " D ,PRSI " isn't open." CR>
+ <THIS-IS-IT ,PRSI>)
+ (<EQUAL? ,PRSI ,PRSO>
+ <TELL "How can you do that?" CR>)
+ (<IN? ,PRSO ,PRSI>
+ <TELL "The " D ,PRSO " is already in the " D ,PRSI "." CR>)
+ (<G? <- <+ <WEIGHT ,PRSI> <WEIGHT ,PRSO>>
+ <GETP ,PRSI ,P?SIZE>>
+ <GETP ,PRSI ,P?CAPACITY>>
+ <TELL "There's no room." CR>)
+ (<AND <NOT <HELD? ,PRSO>>
+ <FSET? ,PRSO ,TRYTAKEBIT>>
+ <TELL "You don't have the " D ,PRSO "." CR>
+ <RTRUE>)
+ (<AND <NOT <HELD? ,PRSO>>
+ <NOT <ITAKE>>>
+ <RTRUE>)
+ (T
+ <MOVE ,PRSO ,PRSI>
+ <FSET ,PRSO ,TOUCHBIT>
+ <SCORE-OBJ ,PRSO>
+ <TELL "Done." CR>)>>
+
+<ROUTINE V-PUT-BEHIND ()
+ <TELL "That hiding place is too obvious." CR>>
+
+<ROUTINE V-PUT-ON ()
+ <COND (<EQUAL? ,PRSI ,GROUND>
+ <PERFORM ,V?DROP ,PRSO>
+ <RTRUE>)
+ (<FSET? ,PRSI ,SURFACEBIT>
+ <V-PUT>)
+ (T
+ <TELL "There's no good surface on the " D ,PRSI "." CR>)>>
+
+<ROUTINE V-PUT-UNDER ()
+ <TELL "You can't do that." CR>>
+
+<ROUTINE V-RAISE ()
+ <V-LOWER>>
+
+<ROUTINE V-RAPE ()
+ <TELL "What a (ahem!) strange idea." CR>>
+
+<ROUTINE PRE-READ ()
+ <COND (<NOT ,LIT>
+ <TELL "It is impossible to read in the dark." CR>)
+ (<AND ,PRSI <NOT <FSET? ,PRSI ,TRANSBIT>>>
+ <TELL "How does one look through a " D ,PRSI "?" CR>)>>
+
+<ROUTINE V-READ ()
+ <COND (<NOT <FSET? ,PRSO ,READBIT>>
+ <TELL "How does one read a " D ,PRSO "?" CR>)
+ (T
+ <TELL <GETP ,PRSO ,P?TEXT> CR>)>>
+
+<ROUTINE V-READ-PAGE ()
+ <PERFORM ,V?READ ,PRSO>
+ <RTRUE>>
+
+<ROUTINE V-REPENT ()
+ <TELL "It could very well be too late!" CR>>
+
+<ROUTINE V-REPLY ()
+ <TELL "It is hardly likely that the " D ,PRSO " is interested." CR>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>>
+
+<ROUTINE V-RING ()
+ <TELL "How, exactly, can you ring that?" CR>>
+
+<ROUTINE V-RUB () <HACK-HACK "Fiddling with the ">>
+
+<ROUTINE V-SAY ("AUX" V)
+ %<COND (<==? ,ZORK-NUMBER 2>
+ '<COND (<OR ,SPELL-USED ,WAND-ON>
+ <PERFORM ,V?INCANT>
+ <RTRUE>)>)
+ (<==? ,ZORK-NUMBER 3>
+ '<COND (<AND <FSET? ,FRONT-DOOR ,TOUCHBIT>
+ <EQUAL? <GET ,P-LEXV ,P-CONT> ,W?FROTZ>
+ <EQUAL? <GET ,P-LEXV <+ ,P-CONT 2>> ,W?OZMOO>>
+ <SETG P-CONT <>>
+ <COND (<EQUAL? ,HERE ,MSTAIRS>
+ <CRLF>
+ <GOTO ,FRONT-DOOR>)
+ (T
+ <TELL "Nothing happens." CR>)>
+ <RTRUE>)>)
+ (T
+ '<PROG ()
+ <COND (<NOT ,P-CONT>
+ <TELL "Say what?" CR>
+ <RTRUE>)
+ (T <SETG QUOTE-FLAG <>> <RTRUE>)>>)>
+ <COND (<SET V <FIND-IN ,HERE ,ACTORBIT>>
+ <TELL "You must address the " D .V " directly." CR>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>)
+ (<EQUAL? <GET ,P-LEXV ,P-CONT> ,W?HELLO>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>)
+ (T
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <TELL
+"Talking to yourself is a sign of impending mental collapse." CR>)>>
+
+<ROUTINE V-SEARCH ()
+ <TELL "You find nothing unusual." CR>>
+
+<ROUTINE V-SEND ()
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <TELL "Why would you send for the " D ,PRSO "?" CR>)
+ (T
+ <TELL "That doesn't make sends." CR>)>>
+
+<ROUTINE PRE-SGIVE ()
+ <PERFORM ,V?GIVE ,PRSI ,PRSO>
+ <RTRUE>>
+
+<ROUTINE V-SGIVE ()
+ <TELL "Foo!" CR>>
+
+<ROUTINE V-SHAKE ()
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <TELL "This seems to have no effect." CR>)
+ (<NOT <FSET? ,PRSO ,TAKEBIT>>
+ <TELL "You can't take it; thus, you can't shake it!" CR>)
+ (<FSET? ,PRSO ,CONTBIT>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <COND (<FIRST? ,PRSO>
+ <SHAKE-LOOP>
+ <TELL "The contents of the " D, PRSO " spills ">
+ <COND (<NOT <FSET? ,HERE ,RLANDBIT>>
+ <TELL "out and disappears">)
+ (T
+ <TELL "to the ground">)>
+ <TELL "." CR>)
+ (T
+ <TELL "Shaken." CR>)>)
+ (T
+ <COND (<FIRST? ,PRSO>
+ <TELL
+"It sounds like there is something inside the " D ,PRSO "." CR>)
+ (T
+ <TELL "The " D, PRSO " sounds empty." CR>)>)>)
+ (T
+ <TELL "Shaken." CR>)>>
+
+<ROUTINE SHAKE-LOOP ("AUX" X)
+ <REPEAT ()
+ <COND (<SET X <FIRST? ,PRSO>>
+ <FSET .X ,TOUCHBIT>
+ <MOVE .X
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '<COND (<EQUAL? ,HERE ,UP-A-TREE>
+ ,PATH)
+ (<NOT <FSET? ,HERE ,RLANDBIT>>
+ ,PSEUDO-OBJECT)
+ (T
+ ,HERE)>)
+ (<==? ,ZORK-NUMBER 2>
+ '<COND (<EQUAL? .X ,WATER>
+ ,PSEUDO-OBJECT)
+ (<NOT <FSET? ,HERE ,RLANDBIT>>
+ ,PSEUDO-OBJECT)
+ (T
+ ,HERE)>)
+ (T
+ '<COND (<EQUAL? ,HERE ,ON-LAKE>
+ ,IN-LAKE)
+ (T
+ ,HERE)>)>>)
+ (T
+ <RETURN>)>>>
+
+<ROUTINE V-SKIP ()
+ <TELL <PICK-ONE ,WHEEEEE> CR>>
+
+<GLOBAL WHEEEEE
+ <LTABLE 0 "Very good. Now you can go to the second grade."
+ "Are you enjoying yourself?"
+ "Wheeeeeeeeee!!!!!"
+ "Do you expect me to applaud?">>
+
+<ROUTINE V-SMELL ()
+ <TELL "It smells like a " D ,PRSO "." CR>>
+
+<ROUTINE V-SPIN ()
+ <TELL "You can't spin that!" CR>>
+
+<ROUTINE V-SPRAY ()
+ <V-SQUEEZE>>
+
+<ROUTINE V-SQUEEZE ()
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <TELL "The " D ,PRSO " does not understand this.">)
+ (T
+ <TELL "How singularly useless.">)>
+ <CRLF>>
+
+<ROUTINE V-SSPRAY ()
+ <PERFORM ,V?SPRAY ,PRSI ,PRSO>>
+
+<ROUTINE V-STAB ("AUX" W)
+ <COND (<SET W <FIND-WEAPON ,WINNER>>
+ <PERFORM ,V?ATTACK ,PRSO .W>
+ <RTRUE>)
+ (T
+ <TELL
+"No doubt you propose to stab the " D ,PRSO " with your pinky?" CR>)>>
+
+<ROUTINE V-STAND ()
+ <COND (<FSET? <LOC ,WINNER> ,VEHBIT>
+ <PERFORM ,V?DISEMBARK <LOC ,WINNER>>
+ <RTRUE>)
+ (T
+ <TELL "You are already standing, I think." CR>)>>
+
+<ROUTINE V-STAY ()
+ <TELL "You will be lost without me!" CR>>
+
+<ROUTINE V-STRIKE ()
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <TELL
+"Since you aren't versed in hand-to-hand combat, you'd better attack the "
+D ,PRSO " with a weapon." CR>)
+ (T
+ <PERFORM ,V?LAMP-ON ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-SWIM ()
+ <COND %<COND (<OR <==? ,ZORK-NUMBER 1>
+ <==? ,ZORK-NUMBER 2>>
+ '(<GLOBAL-IN? ,GLOBAL-WATER ,HERE>
+ <TELL "Swimming isn't usually allowed in the ">
+ <COND (,PRSO
+ <TELL D ,PRSO ".">)
+ (T
+ <TELL "dungeon.">)>
+ <CRLF>))
+ (T
+ '(<EQUAL? ,HERE ,ON-LAKE ,IN-LAKE>
+ <TELL "What do you think you're doing?" CR>))>
+ %<COND (<==? ,ZORK-NUMBER 3>
+ '(<EQUAL? ,HERE ,FLATHEAD-OCEAN>
+ <TELL
+"Between the rocks and waves, you wouldn't last a minute!" CR>))
+ (T
+ '(<NULL-F>
+ <RFALSE>))>
+ (T
+ <TELL "Go jump in a lake!" CR>)>>
+
+<ROUTINE V-SWING ()
+ <COND (<NOT ,PRSI>
+ <TELL "Whoosh!" CR>)
+ (T
+ <PERFORM ,V?ATTACK ,PRSI ,PRSO>)>>
+
+<ROUTINE PRE-TAKE ()
+ <COND (<IN? ,PRSO ,WINNER>
+ <COND (<FSET? ,PRSO ,WEARBIT>
+ <TELL "You are already wearing it." CR>)
+ (T
+ <TELL "You already have that!" CR>)>)
+ (<AND <FSET? <LOC ,PRSO> ,CONTBIT>
+ <NOT <FSET? <LOC ,PRSO> ,OPENBIT>>>
+ <TELL
+"You can't reach something that's inside a closed container." CR>
+ <RTRUE>)
+ (,PRSI
+ <COND (<EQUAL? ,PRSI ,GROUND>
+ <SETG PRSI <>>
+ <RFALSE>)
+ %<COND (<==? ,ZORK-NUMBER 2>
+ '(<EQUAL? ,PRSO ,DOOR-KEEPER>
+ <SETG PRSI <>>
+ <RFALSE>))
+ (T
+ '(<NULL-F> T))>
+ (<NOT <EQUAL? ,PRSI <LOC ,PRSO>>>
+ <TELL "The " D ,PRSO " isn't in the " D ,PRSI "." CR>)
+ (T
+ <SETG PRSI <>>
+ <RFALSE>)>)
+ (<EQUAL? ,PRSO <LOC ,WINNER>>
+ <TELL "You're inside of it!" CR>)>>
+
+<ROUTINE V-TAKE ()
+ <COND (<EQUAL? <ITAKE> T>
+ <COND (<FSET? ,PRSO ,WEARBIT>
+ <TELL "You are now wearing the " D ,PRSO "." CR>)
+ (T
+ <TELL "Taken." CR>)>)>>
+
+<ROUTINE V-TELL ()
+ <COND (<FSET? ,PRSO ,ACTORBIT>
+ <COND (,P-CONT
+ <SETG WINNER ,PRSO>
+ <SETG HERE <LOC ,WINNER>>)
+ (T
+ <TELL "The " D ,PRSO
+" pauses for a moment, perhaps thinking that you should re-read
+the manual." CR>)>)
+ (T
+ <TELL "You can't talk to the " D ,PRSO "!" CR>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <RFATAL>)>>
+
+<ROUTINE V-THROUGH ("OPTIONAL" (OBJ <>) "AUX" M)
+ #DECL ((OBJ) <OR OBJECT FALSE> (M) <PRIMTYPE VECTOR>)
+ <COND (<FSET? ,PRSO ,DOORBIT>
+ <DO-WALK <OTHER-SIDE ,PRSO>>
+ <RTRUE>)
+ (<AND <NOT .OBJ> <FSET? ,PRSO ,VEHBIT>>
+ <PERFORM ,V?BOARD ,PRSO>
+ <RTRUE>)
+ (<OR .OBJ <NOT <FSET? ,PRSO ,TAKEBIT>>>
+ <COND %<COND (<==? ,ZORK-NUMBER 2>
+ '(<AND ,SCOL-ROOM
+ <OR .OBJ <EQUAL? ,PRSO ,CURTAIN>>>
+ <SCOL-GO .OBJ>
+ <RTRUE>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ %<COND (<==? ,ZORK-NUMBER 2>
+ '(<AND <EQUAL? ,HERE ,DEPOSITORY>
+ <EQUAL? ,PRSO ,SNWL>
+ ,SCOL-ROOM>
+ <SCOL-GO .OBJ>
+ <RTRUE>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ %<COND (<==? ,ZORK-NUMBER 2>
+ '(<AND <EQUAL? ,HERE ,SCOL-ACTIVE>
+ <EQUAL? ,PRSO
+ <GET <SET M <GET-WALL ,HERE>> 1>>>
+ <SETG SCOL-ROOM <GET .M 2>>
+ <SETG PRSO <GETP ,PRSO ,P?SIZE>>
+ <COND (.OBJ <SCOL-OBJ .OBJ 0 ,DEPOSITORY>)
+ (T
+ <SCOL-THROUGH 0 ,DEPOSITORY>)>
+ <RTRUE>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ %<COND (<==? ,ZORK-NUMBER 2>
+ '(<EQUAL? ,PRSO ,CURTAIN>
+ <TELL
+"You can't go more than part way through the curtain." CR>
+ <RTRUE>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ (T
+ <TELL
+"You hit your head against the " D ,PRSO " as you attempt this feat." CR>)>)
+ (<IN? ,PRSO ,WINNER>
+ <TELL "That would involve quite a contortion!" CR>)
+ (T
+ <TELL <PICK-ONE ,YUKS> CR>)>>
+
+<ROUTINE V-THROW ()
+ <COND (<IDROP>
+ <COND (<EQUAL? ,PRSI ,ME>
+ <TELL
+"A terrific throw! The " D ,PRSO>
+ <JIGS-UP " hits you squarely in the head. Normally,
+this wouldn't do much damage, but by incredible mischance, you fall over
+backwards trying to duck, and break your neck, justice being swift and
+merciful in the Great Underground Empire.">)
+ (<AND ,PRSI <FSET? ,PRSI ,ACTORBIT>>
+ <TELL
+"The " D ,PRSI " ducks as the " D ,PRSO " flies by and crashes to the ground."
+CR>)
+ (T <TELL "Thrown." CR>)>)
+ (T <TELL "Huh?" CR>)>>
+
+<ROUTINE V-THROW-OFF ()
+ <TELL "You can't throw anything off of that!" CR>>
+
+<ROUTINE V-TIE ()
+ <COND (<EQUAL? ,PRSI ,WINNER>
+ <TELL "You can't tie anything to yourself." CR>)
+ (T
+ <TELL "You can't tie the " D ,PRSO " to that." CR>)>>
+
+<ROUTINE V-TIE-UP ()
+ <TELL "You could certainly never tie it with that!" CR>>
+
+<ROUTINE V-TREASURE ()
+ <COND %<COND (<==? ,ZORK-NUMBER 1>
+ '(<EQUAL? ,HERE ,NORTH-TEMPLE>
+ <GOTO ,TREASURE-ROOM>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '(<EQUAL? ,HERE ,TREASURE-ROOM>
+ <GOTO ,NORTH-TEMPLE>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ (T
+ <TELL "Nothing happens." CR>)>>
+
+<ROUTINE PRE-TURN ()
+ <COND (<NOT <FSET? ,PRSO ,TURNBIT>>
+ <TELL "You can't turn that!" CR>)>>
+
+<ROUTINE V-TURN ()
+ <TELL "This has no effect." CR>>
+
+<ROUTINE V-UNLOCK ()
+ <V-LOCK>>
+
+<ROUTINE V-UNTIE ()
+ <TELL "This cannot be tied, so it cannot be untied!" CR>>
+
+<ROUTINE V-WAIT ("OPTIONAL" (NUM 3))
+ <TELL "Time passes..." CR>
+ <REPEAT ()
+ <COND (<L? <SET NUM <- .NUM 1>> 0> <RETURN>)
+ (<CLOCKER> <RETURN>)>>
+ <SETG CLOCK-WAIT T>>
+
+<ROUTINE V-WALK ("AUX" PT PTS STR OBJ RM)
+ <COND (<NOT ,P-WALK-DIR>
+ <PERFORM ,V?WALK-TO ,PRSO>
+ <RTRUE>)
+ (<SET PT <GETPT ,HERE ,PRSO>>
+ <COND (<EQUAL? <SET PTS <PTSIZE .PT>> ,UEXIT>
+ <GOTO <GETB .PT ,REXIT>>)
+ (<EQUAL? .PTS ,NEXIT>
+ <TELL <GET .PT ,NEXITSTR> CR>
+ <RFATAL>)
+ (<EQUAL? .PTS ,FEXIT>
+ <COND (<SET RM <APPLY <GET .PT ,FEXITFCN>>>
+ <GOTO .RM>)
+ %<COND (<==? ,ZORK-NUMBER 3>
+ '(<AND <EQUAL? ,HERE ,CP> ,CP-MOVED>
+ <RTRUE>))
+ (T
+ '(<NULL-F> <RFALSE>))>
+ (T
+ <RFATAL>)>)
+ (<EQUAL? .PTS ,CEXIT>
+ <COND (<VALUE <GETB .PT ,CEXITFLAG>>
+ <GOTO <GETB .PT ,REXIT>>)
+ (<SET STR <GET .PT ,CEXITSTR>>
+ <TELL .STR CR>
+ <RFATAL>)
+ (T
+ <TELL "You can't go that way." CR>
+ <RFATAL>)>)
+ (<EQUAL? .PTS ,DEXIT>
+ <COND (<FSET? <SET OBJ <GETB .PT ,DEXITOBJ>> ,OPENBIT>
+ <GOTO <GETB .PT ,REXIT>>)
+ (<SET STR <GET .PT ,DEXITSTR>>
+ <TELL .STR CR>
+ <RFATAL>)
+ (T
+ <TELL "The " D .OBJ " is closed." CR>
+ <THIS-IS-IT .OBJ>
+ <RFATAL>)>)>)
+ (<AND <NOT ,LIT>
+ <PROB 80>
+ <EQUAL? ,WINNER ,ADVENTURER>
+ <NOT <FSET? ,HERE ,NONLANDBIT>>>
+ <COND (,SPRAYED?
+ <TELL
+"There are odd noises in the darkness, and there is no exit in that
+direction." CR>
+ <RFATAL>)
+ %<COND (<==? ,ZORK-NUMBER 3>
+ '(<EQUAL? ,HERE ,DARK-1 ,DARK-2>
+ <JIGS-UP
+"Oh, no! You have walked into a den of hungry grues and it's dinner time!">))
+ (T
+ '(<NULL-F>
+ <RFALSE>))>
+ (T
+ <JIGS-UP
+"Oh, no! You have walked into the slavering fangs of a lurking grue!">)>)
+ (T
+ <TELL "You can't go that way." CR>
+ <RFATAL>)>>
+
+<ROUTINE V-WALK-AROUND ()
+ <TELL "Use compass directions for movement." CR>>
+
+<ROUTINE V-WALK-TO ()
+ <COND (<OR <IN? ,PRSO ,HERE>
+ <GLOBAL-IN? ,PRSO ,HERE>>
+ <TELL "It's here!" CR>)
+ (T
+ <TELL "You should supply a direction!" CR>)>>
+
+<ROUTINE V-WAVE ()
+ <HACK-HACK "Waving the ">>
+
+<ROUTINE V-WEAR ()
+ <COND (<NOT <FSET? ,PRSO ,WEARBIT>>
+ <TELL "You can't wear the " D ,PRSO "." CR>)
+ (T
+ <PERFORM ,V?TAKE ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-WIN ()
+ <TELL "Naturally!" CR>>
+
+<ROUTINE V-WIND ()
+ <TELL "You cannot wind up a " D ,PRSO "." CR>>
+
+<ROUTINE V-WISH ()
+ %<COND (<==? ,ZORK-NUMBER 2>
+ '<PERFORM ,V?MAKE ,WISH>)
+ (T
+ '<TELL "With luck, your wish will come true." CR>)>>
+
+<ROUTINE V-YELL () <TELL "Aaaarrrrgggghhhh!" CR>>
+
+<ROUTINE V-ZORK () <TELL "At your service!" CR>>
+
+^L
+
+"Verb-Associated Routines"
+
+"Descriptions"
+
+<GLOBAL LIT <>>
+
+<GLOBAL SPRAYED? <>>
+
+<ROUTINE V-FIRST-LOOK ()
+ <COND (<DESCRIBE-ROOM>
+ <COND (<NOT ,SUPER-BRIEF>
+ <DESCRIBE-OBJECTS>)>)>>
+
+<ROUTINE DESCRIBE-ROOM ("OPTIONAL" (LOOK? <>) "AUX" V? STR AV)
+ <SET V? <OR .LOOK? ,VERBOSE>>
+ <COND (<NOT ,LIT>
+ <TELL "It is pitch black.">
+ <COND (<NOT ,SPRAYED?>
+ <TELL " You are likely to be eaten by a grue.">)>
+ <CRLF>
+ %<COND (<==? ,ZORK-NUMBER 3>
+ '<COND (<EQUAL? ,HERE ,DARK-2>
+ <TELL
+"The ground continues to slope upwards away from the lake. You can barely
+detect a dim light from the east." CR>)>)
+ (T
+ '<NULL-F>)>
+ <RETURN <>>)>
+ <COND (<NOT <FSET? ,HERE ,TOUCHBIT>>
+ <FSET ,HERE ,TOUCHBIT>
+ <SET V? T>)>
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '<COND (<FSET? ,HERE ,MAZEBIT>
+ <FCLEAR ,HERE ,TOUCHBIT>)>)
+ (T
+ '<NULL-F>)>
+ <COND (<IN? ,HERE ,ROOMS>
+ ;"Was <TELL D ,HERE CR>"
+ <TELL D ,HERE>
+ <COND (<FSET? <SET AV <LOC ,WINNER>> ,VEHBIT>
+ <TELL ", in the " D .AV>)>
+ <CRLF>)>
+ <COND (<OR .LOOK? <NOT ,SUPER-BRIEF>>
+ <SET AV <LOC ,WINNER>>
+ ;<COND (<FSET? .AV ,VEHBIT>
+ <TELL "(You are in the " D .AV ".)" CR>)>
+ <COND (<AND .V? <APPLY <GETP ,HERE ,P?ACTION> ,M-LOOK>>
+ <RTRUE>)
+ (<AND .V? <SET STR <GETP ,HERE ,P?LDESC>>>
+ <TELL .STR CR>)
+ (T
+ <APPLY <GETP ,HERE ,P?ACTION> ,M-FLASH>)>
+ <COND (<AND <NOT <EQUAL? ,HERE .AV>> <FSET? .AV ,VEHBIT>>
+ <APPLY <GETP .AV ,P?ACTION> ,M-LOOK>)>)>
+ T>
+
+<ROUTINE DESCRIBE-OBJECTS ("OPTIONAL" (V? <>))
+ <COND (,LIT
+ <COND (<FIRST? ,HERE>
+ <PRINT-CONT ,HERE <SET V? <OR .V? ,VERBOSE>> -1>)>)
+ (T
+ <TELL "Only bats can see in the dark. And you're not one." CR>)>>
+
+"DESCRIBE-OBJECT -- takes object and flag. if flag is true will print a
+long description (fdesc or ldesc), otherwise will print short."
+
+<GLOBAL DESC-OBJECT <>>
+
+<ROUTINE DESCRIBE-OBJECT (OBJ V? LEVEL "AUX" (STR <>) AV)
+ <SETG DESC-OBJECT .OBJ>
+ <COND (<AND <0? .LEVEL>
+ <APPLY <GETP .OBJ ,P?DESCFCN> ,M-OBJDESC>>
+ <RTRUE>)
+ (<AND <0? .LEVEL>
+ <OR <AND <NOT <FSET? .OBJ ,TOUCHBIT>>
+ <SET STR <GETP .OBJ ,P?FDESC>>>
+ <SET STR <GETP .OBJ ,P?LDESC>>>>
+ <TELL .STR>)
+ (<0? .LEVEL>
+ <TELL "There is a " D .OBJ " here">
+ <COND (<FSET? .OBJ ,ONBIT>
+ <TELL " (providing light)">)>
+ <TELL ".">)
+ (T
+ <TELL <GET ,INDENTS .LEVEL>>
+ <TELL "A " D .OBJ>
+ <COND (<FSET? .OBJ ,ONBIT>
+ <TELL " (providing light)">)
+ (<AND <FSET? .OBJ ,WEARBIT>
+ <IN? .OBJ ,WINNER>>
+ <TELL " (being worn)">)>)>
+ %<COND (<==? ,ZORK-NUMBER 2>
+ '<COND (<AND <EQUAL? .OBJ ,SPELL-VICTIM>
+ <EQUAL? ,SPELL-USED ,W?FLOAT>>
+ <TELL " (floating in midair)">)>)
+ (T
+ '<NULL-F>)>
+ <COND (<AND <0? .LEVEL>
+ <SET AV <LOC ,WINNER>>
+ <FSET? .AV ,VEHBIT>>
+ <TELL " (outside the " D .AV ")">)>
+ <CRLF>
+ <COND (<AND <SEE-INSIDE? .OBJ> <FIRST? .OBJ>>
+ <PRINT-CONT .OBJ .V? .LEVEL>)>>
+
+<ROUTINE PRINT-CONTENTS (OBJ "AUX" F N (1ST? T) (IT? <>) (TWO? <>))
+ <COND (<SET F <FIRST? .OBJ>>
+ <REPEAT ()
+ <SET N <NEXT? .F>>
+ <COND (.1ST? <SET 1ST? <>>)
+ (ELSE
+ <TELL ", ">
+ <COND (<NOT .N> <TELL "and ">)>)>
+ <TELL "a " D .F>
+ <COND (<AND <NOT .IT?> <NOT .TWO?>>
+ <SET IT? .F>)
+ (ELSE
+ <SET TWO? T>
+ <SET IT? <>>)>
+ <SET F .N>
+ <COND (<NOT .F>
+ <COND (<AND .IT? <NOT .TWO?>>
+ <THIS-IS-IT .IT?>)>
+ <RTRUE>)>>)>>
+
+<ROUTINE PRINT-CONT (OBJ "OPTIONAL" (V? <>) (LEVEL 0)
+ "AUX" Y 1ST? AV STR (PV? <>) (INV? <>))
+ <COND (<NOT <SET Y <FIRST? .OBJ>>> <RTRUE>)>
+ <COND (<AND <SET AV <LOC ,WINNER>> <FSET? .AV ,VEHBIT>>
+ T)
+ (ELSE <SET AV <>>)>
+ <SET 1ST? T>
+ <COND (<EQUAL? ,WINNER .OBJ <LOC .OBJ>>
+ <SET INV? T>)
+ (ELSE
+ <REPEAT ()
+ <COND (<NOT .Y> <RETURN <NOT .1ST?>>)
+ (<EQUAL? .Y .AV> <SET PV? T>)
+ (<EQUAL? .Y ,WINNER>)
+ (<AND <NOT <FSET? .Y ,INVISIBLE>>
+ <NOT <FSET? .Y ,TOUCHBIT>>
+ <SET STR <GETP .Y ,P?FDESC>>>
+ <COND (<NOT <FSET? .Y ,NDESCBIT>>
+ <TELL .STR CR>
+ ;<SET 1ST? <>>)>
+ <COND (<AND <SEE-INSIDE? .Y>
+ <NOT <GETP <LOC .Y> ,P?DESCFCN>>
+ <FIRST? .Y>>
+ <COND (<PRINT-CONT .Y .V? 0>
+ <SET 1ST? <>>)>)>)>
+ <SET Y <NEXT? .Y>>>)>
+ <SET Y <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<NOT .Y>
+ <COND (<AND .PV? .AV <FIRST? .AV>>
+ <SET LEVEL <+ .LEVEL 1>> ;"not in Zork III"
+ <PRINT-CONT .AV .V? .LEVEL>)>
+ <RETURN <NOT .1ST?>>)
+ (<EQUAL? .Y .AV ,ADVENTURER>)
+ (<AND <NOT <FSET? .Y ,INVISIBLE>>
+ <OR .INV?
+ <FSET? .Y ,TOUCHBIT>
+ <NOT <GETP .Y ,P?FDESC>>>>
+ <COND (<NOT <FSET? .Y ,NDESCBIT>>
+ <COND (.1ST?
+ <COND (<FIRSTER .OBJ .LEVEL>
+ <COND (<L? .LEVEL 0>
+ <SET LEVEL 0>)>)>
+ <SET LEVEL <+ 1 .LEVEL>>
+ <SET 1ST? <>>)>
+ <COND (<L? .LEVEL 0> <SET LEVEL 0>)>
+ <DESCRIBE-OBJECT .Y .V? .LEVEL>)
+ (<AND <FIRST? .Y> <SEE-INSIDE? .Y>>
+ <SET LEVEL <+ .LEVEL 1>> ;"not in Zork III"
+ <PRINT-CONT .Y .V? .LEVEL>)>)>
+ <SET Y <NEXT? .Y>>>>
+
+<ROUTINE FIRSTER (OBJ LEVEL)
+ <COND %<COND (<==? ,ZORK-NUMBER 1>
+ '(<EQUAL? .OBJ ,TROPHY-CASE>
+ <TELL
+"Your collection of treasures consists of:" CR>))
+ (T
+ '(<NULL-F> <RTRUE>))>
+ (<EQUAL? .OBJ ,WINNER>
+ <TELL "You are carrying:" CR>)
+ (<NOT <IN? .OBJ ,ROOMS>>
+ <COND (<G? .LEVEL 0>
+ <TELL <GET ,INDENTS .LEVEL>>)>
+ <COND (<FSET? .OBJ ,SURFACEBIT>
+ <TELL "Sitting on the " D .OBJ " is: " CR>)
+ (<FSET? .OBJ ,ACTORBIT>
+ <TELL "The " D .OBJ " is holding: " CR>)
+ (T
+ <TELL "The " D .OBJ " contains:" CR>)>)>>
+
+<ROUTINE SEE-INSIDE? (OBJ)
+ <AND <NOT <FSET? .OBJ ,INVISIBLE>>
+ <OR <FSET? .OBJ ,TRANSBIT> <FSET? .OBJ ,OPENBIT>>>>
+
+"Scoring"
+
+<GLOBAL MOVES 0>
+
+<GLOBAL SCORE 0>
+
+<GLOBAL BASE-SCORE 0>
+
+<GLOBAL WON-FLAG <>>
+
+<ROUTINE SCORE-UPD (NUM)
+ <SETG BASE-SCORE <+ ,BASE-SCORE .NUM>>
+ <SETG SCORE <+ ,SCORE .NUM>>
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '<COND (<AND <EQUAL? ,SCORE 350>
+ <NOT ,WON-FLAG>>
+ <SETG WON-FLAG T>
+ <FCLEAR ,MAP ,INVISIBLE>
+ <FCLEAR ,WEST-OF-HOUSE ,TOUCHBIT>
+ <TELL
+"An almost inaudible voice whispers in your ear, \"Look to your treasures
+for the final secret.\"" CR>)>)
+ (T
+ '<NULL-F>)>
+ T>
+
+<ROUTINE SCORE-OBJ (OBJ "AUX" TEMP)
+ <COND (<G? <SET TEMP <GETP .OBJ ,P?VALUE>> 0>
+ <SCORE-UPD .TEMP>
+ <PUTP .OBJ ,P?VALUE 0>)>>
+
+<ROUTINE FINISH ()
+ <V-SCORE>
+ <QUIT>>
+
+<ROUTINE YES? ()
+ <PRINTI ">">
+ <READ ,P-INBUF ,P-LEXV>
+ <COND (<EQUAL? <GET ,P-LEXV 1> ,W?YES ,W?Y>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"Death"
+
+<GLOBAL DEAD <>>
+
+<GLOBAL DEATHS 0>
+
+<GLOBAL LUCKY 1>
+
+;"JIGS-UP is in ACTIONS.ZIL"
+
+;"RANDOMIZE-OBJECTS is in ACTIONS.ZIL"
+
+;"KILL-INTERRUPTS is in ACTIONS.ZIL"
+
+"Object Manipulation"
+
+<GLOBAL FUMBLE-NUMBER 7>
+
+<GLOBAL FUMBLE-PROB 8>
+
+<ROUTINE ITAKE ("OPTIONAL" (VB T) "AUX" CNT OBJ)
+ #DECL ((VB) <OR ATOM FALSE> (CNT) FIX (OBJ) OBJECT)
+ <COND %<COND (<==? ,ZORK-NUMBER 1>
+ '(,DEAD
+ <COND (.VB
+ <TELL
+"Your hand passes through its object." CR>)>
+ <RFALSE>))
+ (T
+ '(<NULL-F>
+ <RFALSE>))>
+ (<NOT <FSET? ,PRSO ,TAKEBIT>>
+ <COND (.VB
+ <TELL <PICK-ONE ,YUKS> CR>)>
+ <RFALSE>)
+ %<COND (<==? ,ZORK-NUMBER 2>
+ '(<AND <EQUAL? ,PRSO ,SPELL-VICTIM>
+ <EQUAL? ,SPELL-USED ,W?FLOAT ,W?FREEZE>>
+ <COND (<EQUAL? ,SPELL-USED ,W?FLOAT>
+ <TELL
+"You can't reach that. It's floating above your head." CR>)
+ (T
+ <TELL "It seems rooted to the spot." CR>)>
+ <RFALSE>))
+ (T
+ '(<NULL-F>
+ <RFALSE>))>
+ (<AND <FSET? <LOC ,PRSO> ,CONTBIT>
+ <NOT <FSET? <LOC ,PRSO> ,OPENBIT>>>
+ ;"Kludge for parser calling itake"
+ <RFALSE>)
+ (<AND <NOT <IN? <LOC ,PRSO> ,WINNER>>
+ <G? <+ <WEIGHT ,PRSO> <WEIGHT ,WINNER>> ,LOAD-ALLOWED>>
+ <COND (.VB
+ <TELL "Your load is too heavy">
+ <COND (<L? ,LOAD-ALLOWED ,LOAD-MAX>
+ <TELL", especially in light of your condition.">)
+ (T
+ <TELL ".">)>
+ <CRLF>)>
+ <RFATAL>)
+ (<AND <VERB? TAKE>
+ <G? <SET CNT <CCOUNT ,WINNER>> ,FUMBLE-NUMBER>
+ <PROB <* .CNT ,FUMBLE-PROB>>>
+ <TELL
+"You try to pick it up, but with everything else you have, you can't manage
+to hold onto it!" CR>
+ <RFALSE>)
+ (T
+ <MOVE ,PRSO ,WINNER>
+ <FCLEAR ,PRSO ,NDESCBIT>
+ <FSET ,PRSO ,TOUCHBIT>
+ %<COND (<==? ,ZORK-NUMBER 2>
+ '<COND (<EQUAL? ,SPELL? ,S-FILCH>
+ <COND (<RIPOFF ,PRSO ,WIZARD-CASE>
+ <TELL
+"When you touch the " D ,PRSO " it immediately disappears!" CR>
+ <RFALSE>)>)>)
+ (T
+ '<NULL-F>)>
+ %<COND (<OR <==? ,ZORK-NUMBER 1>
+ <==? ,ZORK-NUMBER 2>>
+ '<SCORE-OBJ ,PRSO>)
+ (T
+ '<NULL-F>)>
+ <RTRUE>)>>
+
+<ROUTINE IDROP ()
+ <COND (<AND <NOT <IN? ,PRSO ,WINNER>>
+ <NOT <IN? <LOC ,PRSO> ,WINNER>>>
+ <TELL "You're not carrying the " D ,PRSO "." CR>
+ <RFALSE>)
+ (<AND <NOT <IN? ,PRSO ,WINNER>>
+ <NOT <FSET? <LOC ,PRSO> ,OPENBIT>>>
+ <TELL "The " D ,PRSO " is closed." CR>
+ <RFALSE>)
+ (T
+ <MOVE ,PRSO <LOC ,WINNER>>
+ <RTRUE>)>>
+
+<ROUTINE CCOUNT (OBJ "AUX" (CNT 0) X)
+ <COND (<SET X <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<NOT <FSET? .X ,WEARBIT>>
+ <SET CNT <+ .CNT 1>>)>
+ <COND (<NOT <SET X <NEXT? .X>>>
+ <RETURN>)>>)>
+ .CNT>
+
+<ROUTINE WEIGHT (OBJ "AUX" CONT (WT 0))
+ <COND (<SET CONT <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<AND <EQUAL? .OBJ ,PLAYER>
+ <FSET? .CONT ,WEARBIT>>
+ <SET WT <+ .WT 1>>)
+ (T
+ <SET WT <+ .WT <WEIGHT .CONT>>>)>
+ <COND (<NOT <SET CONT <NEXT? .CONT>>> <RETURN>)>>)>
+ <+ .WT <GETP .OBJ ,P?SIZE>>>
+
+"Miscellaneous"
+
+<CONSTANT REXIT 0>
+<CONSTANT UEXIT 1>
+<CONSTANT NEXIT 2>
+<CONSTANT FEXIT 3>
+<CONSTANT CEXIT 4>
+<CONSTANT DEXIT 5>
+
+<CONSTANT NEXITSTR 0>
+<CONSTANT FEXITFCN 0>
+<CONSTANT CEXITFLAG 1>
+<CONSTANT CEXITSTR 1>
+<CONSTANT DEXITOBJ 1>
+<CONSTANT DEXITSTR 1>
+
+<GLOBAL INDENTS
+ <TABLE ""
+ " "
+ " "
+ " "
+ " "
+ " ">>
+
+<ROUTINE HACK-HACK (STR)
+ <COND (<AND <IN? ,PRSO ,GLOBAL-OBJECTS>
+ <VERB? WAVE RAISE LOWER>>
+ <TELL "The " D ,PRSO " isn't here!" CR>)
+ (T
+ <TELL .STR D ,PRSO <PICK-ONE ,HO-HUM> CR>)>>
+
+<GLOBAL HO-HUM
+ <LTABLE
+ 0
+ " doesn't seem to work."
+ " isn't notably helpful."
+ " has no effect.">>
+
+<ROUTINE NO-GO-TELL (AV WLOC)
+ <COND (.AV
+ <TELL "You can't go there in a " D .WLOC ".">)
+ (T
+ <TELL "You can't go there without a vehicle.">)>
+ <CRLF>>
+
+<ROUTINE GOTO (RM "OPTIONAL" (V? T)
+ "AUX" (LB <FSET? .RM ,RLANDBIT>) (WLOC <LOC ,WINNER>)
+ (AV <>) OLIT OHERE)
+ <SET OLIT ,LIT>
+ <SET OHERE ,HERE>
+ <COND (<FSET? .WLOC ,VEHBIT>
+ <SET AV <GETP .WLOC ,P?VTYPE>>)>
+ <COND (<AND <NOT .LB>
+ <NOT .AV>>
+ <NO-GO-TELL .AV .WLOC>
+ <RFALSE>)
+ (<AND <NOT .LB>
+ <NOT <FSET? .RM .AV>>>
+ <NO-GO-TELL .AV .WLOC>
+ <RFALSE>)
+ (<AND <FSET? ,HERE ,RLANDBIT>
+ .LB
+ .AV
+ <NOT <EQUAL? .AV ,RLANDBIT>>
+ <NOT <FSET? .RM .AV>>>
+ <NO-GO-TELL .AV .WLOC>
+ <RFALSE>)
+ (<FSET? .RM ,RMUNGBIT>
+ <TELL <GETP .RM ,P?LDESC> CR>
+ <RFALSE>)
+ (T
+ <COND (<AND .LB <NOT <FSET? ,HERE ,RLANDBIT>> <NOT ,DEAD>>
+ %<COND (<==? ,ZORK-NUMBER 1>
+ '<TELL
+"The " D .WLOC " comes to a rest on the shore." CR CR>)
+ (T
+ '<COND (<EQUAL? .AV ,BALLOON>
+ <TELL
+"The balloon lands." CR>)
+ (<FSET? .WLOC ,VEHBIT>
+ <TELL
+"The " D .WLOC " comes to a stop." CR CR>)>)>)>
+ <COND (.AV
+ <MOVE .WLOC .RM>)
+ (T
+ <MOVE ,WINNER .RM>)>
+ <SETG HERE .RM>
+ <SETG LIT <LIT? ,HERE>>
+ <COND (<AND <NOT .OLIT>
+ <NOT ,LIT>
+ <PROB 80>>
+ <COND (,SPRAYED?
+ <TELL
+"There are sinister gurgling noises in the darkness all around you!" CR>)
+ %<COND (<==? ,ZORK-NUMBER 3>
+ '(<EQUAL? ,HERE ,DARK-1 ,DARK-2>
+ <JIGS-UP
+"Oh, no! Dozen of lurking grues attack and devour you! You must have
+stumbled into an authentic grue lair!">))
+ (T
+ '(<NULL-F>
+ <RFALSE>))>
+ (T
+ <TELL
+"Oh, no! A lurking grue slithered into the ">
+ <COND (<FSET? <LOC ,WINNER> ,VEHBIT>
+ <TELL D <LOC ,WINNER>>)
+ (T <TELL "room">)>
+ <JIGS-UP " and devoured you!">
+ <RTRUE>)>)>
+ <COND (<AND <NOT ,LIT>
+ <EQUAL? ,WINNER ,ADVENTURER>>
+ <TELL "You have moved into a dark place." CR>
+ <SETG P-CONT <>>)>
+ <APPLY <GETP ,HERE ,P?ACTION> ,M-ENTER>
+ <SCORE-OBJ .RM>
+ <COND (<NOT <EQUAL? ,HERE .RM>> <RTRUE>)
+ (<AND <NOT <EQUAL? ,ADVENTURER ,WINNER>>
+ <IN? ,ADVENTURER .OHERE>>
+ <TELL "The " D ,WINNER " leaves the room." CR>)
+ (<AND .V?
+ <EQUAL? ,WINNER ,ADVENTURER>>
+ <V-FIRST-LOOK>)>
+ <RTRUE>)>>
+
+<ROUTINE GO-NEXT (TBL "AUX" VAL)
+ <COND (<SET VAL <LKP ,HERE .TBL>>
+ <GOTO .VAL>)>>
+
+<ROUTINE LKP (ITM TBL "AUX" (CNT 0) (LEN <GET .TBL 0>))
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> .LEN>
+ <RFALSE>)
+ (<EQUAL? <GET .TBL .CNT> .ITM>
+ <COND (<EQUAL? .CNT .LEN> <RFALSE>)
+ (T
+ <RETURN <GET .TBL <+ .CNT 1>>>)>)>>>
+
+<ROUTINE DO-WALK (DIR)
+ <SETG P-WALK-DIR .DIR>
+ <PERFORM ,V?WALK .DIR>>
+
+<ROUTINE WORD-TYPE (OBJ WORD "AUX" SYNS)
+ <ZMEMQ .WORD
+ <SET SYNS <GETPT .OBJ ,P?SYNONYM>>
+ <- </ <PTSIZE .SYNS> 2> 1>>>
+
+<ROUTINE GLOBAL-IN? (OBJ1 OBJ2 "AUX" TX)
+ <COND (<SET TX <GETPT .OBJ2 ,P?GLOBAL>>
+ <ZMEMQB .OBJ1 .TX <- <PTSIZE .TX> 1>>)>>
+
+<ROUTINE FIND-IN (WHERE WHAT "AUX" W)
+ <SET W <FIRST? .WHERE>>
+ <COND (<NOT .W>
+ <RFALSE>)>
+ <REPEAT ()
+ <COND (<AND <FSET? .W .WHAT>
+ <NOT <EQUAL? .W ,ADVENTURER>>>
+ <RETURN .W>)
+ (<NOT <SET W <NEXT? .W>>>
+ <RETURN <>>)>>>
+
+
+<ROUTINE IN-HERE? (OBJ)
+ <OR <IN? .OBJ ,HERE>
+ <GLOBAL-IN? .OBJ ,HERE>>>
+
+<ROUTINE HELD? (CAN)
+ <REPEAT ()
+ <SET CAN <LOC .CAN>>
+ <COND (<NOT .CAN> <RFALSE>)
+ (<EQUAL? .CAN ,WINNER> <RTRUE>)>>>
+
+<ROUTINE OTHER-SIDE (DOBJ "AUX" (P 0) TX) ;"finds room beyond given door"
+ <REPEAT ()
+ <COND (<L? <SET P <NEXTP ,HERE .P>> ,LOW-DIRECTION>
+ <RETURN <>>)
+ (ELSE
+ <SET TX <GETPT ,HERE .P>>
+ <COND (<AND <EQUAL? <PTSIZE .TX> ,DEXIT>
+ <EQUAL? <GETB .TX ,DEXITOBJ> .DOBJ>>
+ <RETURN .P>)>)>>>
+
+<ROUTINE MUNG-ROOM (RM STR)
+ <COND (<EQUAL? .RM ,INSIDE-BARROW>
+ <RFALSE>)>
+ <FSET .RM ,RMUNGBIT>
+ <PUTP .RM ,P?LDESC .STR>>
+
+<ROUTINE THIS-IS-IT (OBJ)
+ <SETG P-IT-OBJECT .OBJ>
+ <SETG P-IT-LOC ,HERE>>
+
+<GLOBAL SWIMYUKS
+ <LTABLE 0 "You can't swim in the dungeon.">>
+
+<GLOBAL HELLOS
+ <LTABLE 0 "Hello."
+ "Good day."
+ "Nice weather we've been having lately."
+ "Goodbye.">>
+
+<GLOBAL YUKS
+ <LTABLE
+ 0
+ "A valiant attempt."
+ "You can't be serious."
+ ;"Not bloody likely."
+ "An interesting idea..."
+ "What a concept!">>
+
+<GLOBAL DUMMY
+ <LTABLE 0
+ "Look around."
+ "Too late for that."
+ "Have your eyes checked.">> \ No newline at end of file
diff --git a/zork2.zil b/zork2.zil
new file mode 100644
index 0000000..88dd9c5
--- /dev/null
+++ b/zork2.zil
@@ -0,0 +1,56 @@
+"ZORK2 for
+ Zork II: The Wizard of Frobozz
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved."
+
+<SETG ZORK-NUMBER 2>
+
+<GC 0 T 5>
+
+<BLOAT 70000 0 0 2700 0 0 0 0 0 256>
+
+<SET REDEFINE T>
+
+<GLOBAL BIGFIX 10000>
+
+<OR <GASSIGNED? ZILCH>
+ <SETG WBREAKS <STRING !\" !,WBREAKS>>>
+
+<DEFINE IFILE (STR "OPTIONAL" (FLOAD? <>) "AUX" (TIM <TIME>))
+ <INSERT-FILE .STR .FLOAD?>>
+
+<PRINC "Renovated ZORK II: The Wizard of Frobozz
+">
+
+<OR <GASSIGNED? INSERT-CRUFTY>
+ <DEFINE INSERT-CRUFTY (STR) <INSERT-FILE .STR T>>>
+
+<COND (<GASSIGNED? PREDGEN>
+ <ID 0>)>
+
+<IFILE "GMACROS" T>
+
+<IFILE "GSYNTAX" T>
+<IFILE "2DUNGEON" T>
+<IFILE "GGLOBALS" T>
+
+<PROPDEF SIZE 5>
+<PROPDEF CAPACITY 0>
+<PROPDEF VALUE 0>
+;<PROPDEF TVALUE 0>
+
+<IFILE "GCLOCK" T>
+<IFILE "GMAIN" T>
+<IFILE "GPARSER" T>
+<IFILE "GVERBS" T>
+<IFILE "2ACTIONS" T>
+
+<GC 0 T>
+
+<DEFINE CNT (STR OBL)
+ <PRINC .STR>
+ <PRIN1 <MAPF ,+ ,LENGTH .OBL>>
+ <CRLF>>
+
+<COND (<NOT <GASSIGNED? PREDGEN>>
+ <GC-MON T>)>
+
diff --git a/zork2.zip b/zork2.zip
new file mode 100644
index 0000000..635caaf
--- /dev/null
+++ b/zork2.zip
Binary files differ