aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhistoricalsource <historicalsoftware@textfiles.com>2019-04-13 20:33:25 -0400
committerhistoricalsource <historicalsoftware@textfiles.com>2019-04-13 20:33:25 -0400
commit826abeb339fc76bc228e694ac89af02fe0f412c8 (patch)
tree209daef17d4efaefea5766f1505b47c66cec796b
downloadenchanter-826abeb339fc76bc228e694ac89af02fe0f412c8.tar.gz
enchanter-826abeb339fc76bc228e694ac89af02fe0f412c8.tar.bz2
enchanter-826abeb339fc76bc228e694ac89af02fe0f412c8.zip
Revision 24 (Original Source)
-rw-r--r--README.md1
-rw-r--r--castle.zil1377
-rw-r--r--clock.zil61
-rw-r--r--crufty.zil16
-rw-r--r--egg.zil271
-rw-r--r--enchanter.zil54
-rw-r--r--enchanter.zipbin0 -> 108638 bytes
-rw-r--r--gallery.zil225
-rw-r--r--gears.zil648
-rw-r--r--globals.zil622
-rw-r--r--knot.zil186
-rw-r--r--load.zil54
-rw-r--r--macros.zil162
-rw-r--r--magic.zil1140
-rw-r--r--main.zil391
-rw-r--r--nload.zil66
-rw-r--r--nmacros.zil176
-rw-r--r--outside.zil787
-rw-r--r--parser.zil1188
-rw-r--r--purloined.zil1059
-rw-r--r--record.zil30
-rw-r--r--sleep.zil327
-rw-r--r--stair.zil581
-rw-r--r--syntax.zil738
-rw-r--r--temple.zil368
-rw-r--r--terror.zil873
-rw-r--r--verbs.zil1893
-rw-r--r--z4.zil53
28 files changed, 13347 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4986945
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# enchanter
diff --git a/castle.zil b/castle.zil
new file mode 100644
index 0000000..f5334b3
--- /dev/null
+++ b/castle.zil
@@ -0,0 +1,1377 @@
+"CASTLE for
+ ENCHANTER
+ Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+"Basic Geography"
+
+<ROOM INSIDE-GATE ;"starting location"
+ (IN ROOMS)
+ (DESC "Inside Gate")
+ (EAST TO COURTYARD-1)
+ (WEST TO WEST-CASTLE)
+ (OUT TO WEST-CASTLE) ;(IF IRON-GATE IS OPEN
+ ELSE "The iron gate is locked and chained.")
+ (SOUTH TO WEST-HALL)
+ (NORTH TO PEBBLED-PATH)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (ACTION INSIDE-GATE-F)
+ (GLOBAL IRON-GATE IRON-GATE-CHAINS HILLS ARCH COURTYARD)>
+
+<GLOBAL CASTLE-ENTER <>>
+
+<ROUTINE INSIDE-GATE-F (RARG)
+ <COND (<AND <EQUAL? .RARG ,M-ENTER>
+ <NOT ,CASTLE-ENTER>>
+ <SETG CASTLE-ENTER T>
+ <TELL
+"As you pass through the gate, you feel that your mind is being probed. After
+a moment, it is released or, perhaps, discarded as uninteresting." CR CR>)
+ (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"You are just inside what appears to be the main entrance to the castle.
+An iron gate, standing wide open, looms to the west. Through it, a narrow
+road can be seen winding through low, smoky hills. Before you, to the
+east, is a huge open courtyard. To the north and the south are archways
+leading to the interior of the castle." CR>)>>
+
+<OBJECT IRON-GATE
+ (IN LOCAL-GLOBALS)
+ (DESC "iron gate")
+ (SYNONYM GATE)
+ (ADJECTIVE MASSIVE IRON)
+ (FLAGS NDESCBIT DOORBIT VOWELBIT LOCKEDBIT)
+ (ACTION IRON-GATE-F)>
+
+<OBJECT IRON-GATE-CHAINS
+ (IN LOCAL-GLOBALS)
+ (DESC "chains")
+ (SYNONYM CHAIN CHAINS)
+ (ADJECTIVE IRON)
+ (FLAGS NDESCBIT)
+ (ACTION IRON-GATE-F)>
+
+<ROUTINE IRON-GATE-F ()
+ <COND (<VERB? OPEN UNLOCK>
+ <TELL "The gate is secure; it cannot be unlocked." CR>)
+ (<VERB? CLOSE> <TELL "It is too heavy to move." CR>)
+ (<VERB? REZROV>
+ <SETG SCORE <+ ,SCORE ,ENTRY-POINT>>
+ <SETG ENTRY-POINT 0>
+ <TELL
+"The chains of the iron gate fly into the air and vanish. The gate flies
+open and a blast of cold air fills your lungs." CR>
+ <FSET ,IRON-GATE-CHAINS ,INVISIBLE>
+ <FSET ,IRON-GATE ,OPENBIT>)>>
+
+<ROOM PEBBLED-PATH
+ (IN ROOMS)
+ (DESC "Pebbled Path")
+ (LDESC
+"You are on a long pebbled path, stretching out to the north. To the south
+the path continues through an open arch into an open area.")
+ (NORTH TO NW-TOWER)
+ (SOUTH TO INSIDE-GATE)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL ARCH)>
+
+<OBJECT ARCH
+ (IN LOCAL-GLOBALS)
+ (DESC "arch")
+ (SYNONYM ARCH ARCHWAY)
+ (FLAGS VOWELBIT)
+ (ACTION ARCH-F)>
+
+<ROUTINE ARCH-F ()
+ <COND (<VERB? THROUGH>
+ <COND (<EQUAL? ,HERE ,PEBBLED-PATH>
+ <DO-WALK ,P?SOUTH>)
+ (<EQUAL? ,HERE ,INSIDE-GATE>
+ <TELL
+"You should specify a compass direction, since there are two archways." CR>
+ <RTRUE>)
+ (T
+ <DO-WALK ,P?NORTH>)>)>>
+
+<ROOM COURTYARD-1
+ (IN ROOMS)
+ (DESC "Courtyard")
+ (LDESC
+"This is the westernmost point in a large open courtyard. The huge entrance
+gate to the castle looms ominously to the west. The courtyard widens as it
+proceeds to the east, where a large, ivy-covered temple stands. On either
+side of the temple are small towers. Far beyond the temple, high above, are
+two large towers marking the corners of the castle. A squat dark turret
+hunches between them, blackening the sky around it. A small path leads into
+the castle to the south.")
+ (WEST TO INSIDE-GATE)
+ (EAST TO COURTYARD-3)
+ (NE TO COURTYARD-2)
+ (SE TO COURTYARD-4)
+ (SOUTH TO KNOT-ROOM)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL TEMPLE-OBJ COURTYARD TURRET TOWER)>
+
+<ROOM WEST-HALL
+ (IN ROOMS)
+ (DESC "West Hall")
+ (LDESC
+"This narrow promenade stretches into darkness to the south and, through
+an archway, toward an open area to the north.")
+ (NORTH TO INSIDE-GATE)
+ (SOUTH TO SW-TOWER)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL ARCH)>
+
+<ROOM SW-TOWER
+ (IN ROOMS)
+ (DESC "Tower")
+ (LDESC
+"This dark and damp spot is at the base of the southwest tower of the castle.
+Two corridors lead off to the north and east. A winding staircase ascends into
+the tower.")
+ (NORTH TO WEST-HALL)
+ (EAST TO DIM-DESCENT)
+ (UP TO BEDROOM)
+ (FLAGS RLANDBIT)
+ (GLOBAL STAIRS TOWER)>
+
+<ROOM BEDROOM
+ (IN ROOMS)
+ (DESC "Bedroom")
+ (LDESC
+"The eyrie is a round bedroom high in the tower. Narrow windows overlook
+the outside. A stone stairway leads down.")
+ (DOWN TO SW-TOWER)
+ (TEXT
+"Through the window, you can see a long twisting road making its way
+through a land of low, smoky hills.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL STAIRS WINDOW HILLS)>
+
+<OBJECT BED
+ (IN BEDROOM)
+ (DESC "fourposter feather bed")
+ (SYNONYM BED)
+ (ADJECTIVE FEATHER FOURPOSTER)
+ (FLAGS VEHBIT CONTBIT SEARCHBIT OPENBIT SURFACEBIT)
+ (ACTION BED-F)>
+
+<ROUTINE BED-F ("OPTIONAL" (RARG <>))
+ <COND (<==? .RARG ,M-BEG>
+ <COND (<VERB? WALK>
+ <TELL
+"You'll have to get up first. The bed is so comfy you would almost rather
+not." CR>)
+ (<VERB? BOARD CLIMB-ON WEAR>
+ <TELL "You already are." CR>)
+ (<AND <VERB? TAKE MOVE PUSH RUB OPEN CLOSE>
+ <NOT <IN? ,PRSO ,WINNER>>>
+ <TELL
+"You can't do that from your resting position." CR>)>)
+ (<EQUAL? .RARG ,M-END> <RFALSE>)
+ (<NOT <EQUAL? ,BED ,PRSO ,PRSI>> <RFALSE>)
+ (<VERB? BOARD CLIMB-ON WEAR>
+ <MOVE ,WINNER ,BED>
+ <COND (<L? <- ,MOVES ,LAST-SLEEP> ,MOVES-PER-DAY>
+ <TELL
+"The bed is very comfortable and soft. In fact, you feel sort of
+sleepy just lying on it." CR>)
+ (ELSE
+ <TELL "Lying on this soft bed puts you to sleep." CR>
+ <PERFORM ,V?SLEEP>
+ <RTRUE>)>)
+ (<VERB? WALK-TO>
+ <PERFORM ,V?BOARD ,BED>
+ <RTRUE>)
+ (<AND <VERB? DISEMBARK DROP>
+ <IN? ,WINNER ,BED>>
+ <MOVE ,WINNER ,HERE>
+ <TELL
+"Ah, that was a comfortable bed! But you're now on your own feet
+again." CR>)
+ (<AND <VERB? EXAMINE> <==? ,PRSO ,BED>>
+ <TELL
+"The feather bed looks as though it would be quite comfy to sleep on." CR>)
+ (<AND <VERB? SHAKE>
+ <==? ,PRSO ,BED>
+ <FIRST? ,BEDPOST>>
+ <TELL
+"When you shake the bed, one of the bedposts rattles as though something
+were loose inside it." CR>)>>
+
+<OBJECT BEDPOST
+ (IN BED)
+ (DESC "bedpost")
+ (SYNONYM BEDPOST POST)
+ (FLAGS NDESCBIT CONTBIT SEARCHBIT)
+ (CAPACITY 5)
+ (ACTION BEDPOST-F)>
+
+<ROUTINE BEDPOST-F ()
+ <COND (<VERB? EXAMINE SEARCH>
+ <COND (<FSET? ,BEDPOST ,OPENBIT>
+ <TELL
+"The bedpost is open." CR>)
+ (<IN? ,BEDPOST-BUTTON ,BED>
+ <TELL
+"A careful examination reveals the outline of a small compartment, and
+near it an ornate carving which looks like a button. You could never
+have found it on your own." CR>)
+ (ELSE
+ <TELL
+"A careful examination reveals a thin line which might well be the
+outline of a small compartment, but the mechanism for opening it is
+not discernable." CR>)>)
+ (<VERB? OPEN>
+ <TELL
+"Maybe it can be opened, but it's unclear how." CR>)
+ (<VERB? REZROV>
+ <FSET ,BEDPOST ,OPENBIT>
+ <COND (<IN? ,CHARM-SCROLL ,BEDPOST>
+ <SETG SCORE <+ ,SCORE ,CHARM-POINT>>
+ <SETG CHARM-POINT 0>
+ <THIS-IS-IT ,CHARM-SCROLL>
+ <TELL ,POPS-OPEN CR>)
+ (ELSE
+ <TELL "The bedpost pops open." CR>)>)
+ (<AND <VERB? SHAKE> <FIRST? ,BEDPOST>>
+ <TELL
+"There is something rustling around inside the bedpost." CR>)>>
+
+<GLOBAL POPS-OPEN
+"The bedpost pops open, revealing a small compartment and, nestled
+inside, a gold leaf scroll!">
+
+<OBJECT COMPARTMENT
+ (IN BED)
+ (DESC "compartment")
+ (SYNONYM COMPARTMENT)
+ (ADJECTIVE SMALL)
+ (FLAGS NDESCBIT)
+ (ACTION COMPARTMENT-F)>
+
+<ROUTINE COMPARTMENT-F ()
+ <COND (<AND <NOT <IN? ,BEDPOST-BUTTON ,BED>>
+ <VERB? EXAMINE SEARCH>>
+ <TELL
+"A very thin line indicates that a hidden compartment might be imbedded
+in the bedpost, but it's not clear how to open it." CR>)
+ (T
+ <PERFORM ,PRSA ,BEDPOST>
+ <RTRUE>)>>
+
+<OBJECT BEDPOST-BUTTON
+ (DESC "ornate button")
+ (SYNONYM BUTTON CARVING ORNAME)
+ (ADJECTIVE ORNATE WOODEN)
+ (FLAGS NDESCBIT VOWELBIT)
+ (ACTION BEDPOST-BUTTON-F)>
+
+<ROUTINE BEDPOST-BUTTON-F ()
+ <COND (<VERB? PUSH>
+ <FSET ,BEDPOST ,OPENBIT>
+ <SETG SCORE <+ ,SCORE ,CHARM-POINT>>
+ <SETG CHARM-POINT 0>
+ <COND (<IN? ,CHARM-SCROLL ,BEDPOST>
+ <THIS-IS-IT ,CHARM-SCROLL>
+ <TELL ,POPS-OPEN CR>)>
+ <RTRUE>)>>
+
+<ROOM DIM-DESCENT
+ (IN ROOMS)
+ (DESC "South Hall")
+ (LDESC
+"The damp corridor continues east and west from here. A dark and forbidding
+stairway leads down to the south. In addition, a narrow passage leads to the
+north.")
+ (NORTH TO KNOT-ROOM)
+ (WEST TO SW-TOWER)
+ (EAST TO GALLERY)
+ (DOWN TO DUNGEON)
+ (SOUTH TO DUNGEON)
+ (FLAGS RLANDBIT)
+ (GLOBAL STAIRS)>
+
+;"<ROOM KNOT-ROOM ...> (IN KNOT.ZIL)"
+
+<ROOM DUNGEON
+ (IN ROOMS)
+ (DESC "Dungeon")
+ (LDESC
+"A dank and forgotten pit contains the dungeons. There is a cell to
+the north, and a partly blocked passage leads even deeper into the
+earth. It looks as if there was once a mortared stone wall blocking this
+passage, but it has crumbled and collapsed, reopening the tunnel.")
+ (UP TO DIM-DESCENT)
+ (DOWN TO T-A)
+ (NORTH TO NORTH-CELL IF NORTH-CELL-DOOR IS OPEN)
+ (IN TO NORTH-CELL IF NORTH-CELL-DOOR IS OPEN)
+ (FLAGS RLANDBIT)
+ (GLOBAL STAIRS STONE-WALL NORTH-CELL-DOOR)
+ (PSEUDO "CELL" CELL-F)>
+
+<ROOM NORTH-CELL
+ (IN ROOMS)
+ (DESC "Cell")
+ (SOUTH TO DUNGEON IF NORTH-CELL-DOOR IS OPEN)
+ (EAST TO SECRET-PASSAGE IF NORTH-BLOCK-FLAG)
+ (OUT TO DUNGEON IF NORTH-CELL-DOOR IS OPEN)
+ (FLAGS RLANDBIT)
+ (ACTION NORTH-CELL-F)
+ (GLOBAL NORTH-CELL-DOOR STONE-WALL NORTH-BLOCK)
+ (PSEUDO "CELL" CELL-F)>
+
+<ROUTINE CELL-F ()
+ <COND (<AND <VERB? THROUGH> <EQUAL? ,HERE ,DUNGEON>>
+ <DO-WALK ,P?NORTH>)
+ (<AND <VERB? DROP> <EQUAL? ,HERE ,NORTH-CELL>>
+ <DO-WALK ,P?SOUTH>)
+ (<AND <VERB? SEARCH> <EQUAL? ,HERE ,NORTH-CELL>>
+ <PERFORM ,V?LOOK>
+ <RTRUE>)>>
+
+<OBJECT NORTH-CELL-DOOR
+ (IN LOCAL-GLOBALS)
+ (DESC "cell door")
+ (SYNONYM DOOR)
+ (ADJECTIVE CELL)
+ (ACTION CELL-DOOR-F)
+ (FLAGS NDESCBIT DOORBIT CONTBIT)>
+
+<ROUTINE NORTH-CELL-F (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"This is a damp and unhealthy dungeon cell with writing on the walls.
+The rusty door of the cell is ">
+ <COND (<FSET? ,NORTH-CELL-DOOR ,OPENBIT>
+ <TELL "open.">)
+ (ELSE <TELL "closed.">)>
+ <COND (,NORTH-BLOCK-FLAG
+ <TELL
+" A square block sits beside a passage in the eastern wall.">)
+ (<AND <NOT ,NORTH-BLOCK-FLAG>
+ <NOT <FSET? ,NORTH-BLOCK ,NDESCBIT>>>
+ <TELL
+" A square block in the east wall seems to be loose.">)>
+ <CRLF>)>>
+
+<ROUTINE CELL-DOOR-F ()
+ <COND (<OR <AND <VERB? OPEN> <NOT <FSET? ,PRSO ,OPENBIT>>>
+ <AND <VERB? CLOSE> <FSET? ,PRSO ,OPENBIT>>>
+ <TELL "The door is very rusty and reluctantly ">
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <FCLEAR ,PRSO ,OPENBIT>
+ <TELL "close">)
+ (T
+ <FSET ,PRSO ,OPENBIT>
+ <TELL "open">)>
+ <TELL "s." CR>)>>
+
+<OBJECT STONE-WALL
+ (IN LOCAL-GLOBALS)
+ (DESC "stone wall")
+ (SYNONYM WALL WRITING GRAFFITI SCRATCHINGS)
+ (ADJECTIVE STONE)
+ (ACTION STONE-WALL-F)
+ (FLAGS NDESCBIT READBIT)>
+
+<ROUTINE STONE-WALL-F ()
+ <COND (<VERB? EXAMINE READ>
+ <TELL
+"The wall is covered with graffiti and scratchings marking time's passage." CR>
+ <COND (<==? ,HERE ,NORTH-CELL>
+ <COND (<NOT ,NORTH-BLOCK-FLAG>
+ <FCLEAR ,NORTH-BLOCK ,NDESCBIT>
+ <TELL
+"You notice that the mortar holding a square block has been chipped
+away, and the block is loose." CR>)>)>
+ <RTRUE>)>>
+
+<OBJECT NORTH-BLOCK
+ (IN LOCAL-GLOBALS)
+ (DESC "square block of stone")
+ (SYNONYM BLOCK)
+ (ADJECTIVE SQUARE STONE LOOSE)
+ (ACTION NORTH-BLOCK-F)
+ (FLAGS NDESCBIT TAKEBIT)>
+
+<GLOBAL NORTH-BLOCK-FLAG <>>
+
+<ROUTINE NORTH-BLOCK-F ()
+ <COND (<VERB? MOVE TAKE>
+ <COND (<NOT ,NORTH-BLOCK-FLAG>
+ <SETG NORTH-BLOCK-FLAG T>
+ <TELL
+"You pull the block out of the crumbling wall, revealing a dark passage
+leading east." CR>)
+ (ELSE
+ <TELL
+"It's too heavy." CR>)>)>>
+
+<ROOM SECRET-PASSAGE
+ (IN ROOMS)
+ (DESC "Secret Passage")
+ (WEST TO NORTH-CELL IF NORTH-BLOCK-FLAG)
+ (UP
+"Unfortunately, this passage was never completed, so you don't get very
+far (neither did the prisoners).")
+ (FLAGS RLANDBIT)
+ (ACTION SECRET-PASSAGE-F)
+ (GLOBAL STONE-WALL NORTH-BLOCK)>
+
+<ROUTINE SECRET-PASSAGE-F (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"This is a crudely carved secret passage. It appears
+to have been hollowed out by (perhaps) generations of prisoners.">
+ <COND (,NORTH-BLOCK-FLAG
+ <TELL
+" A passage leads west.">)
+ (ELSE
+ <TELL
+" A square block in the western wall seems to be loose.">)>
+ <TELL " A short, crudely hewn passage leads up." CR>)>>
+
+<OBJECT SILVER-SPOON
+ (IN SECRET-PASSAGE)
+ (DESC "worn silver spoon")
+ (FDESC
+"Lying near the door is a silver spoon, discarded by the prisoners as too
+soft to dig with. It is only slightly worn.")
+ (SYNONYM SPOON)
+ (ADJECTIVE WORN SILVER)
+ (FLAGS TAKEBIT TREASURE TOOLBIT)>
+
+;"<ROOM T-START ...> (IN TERROR)"
+
+;"<ROOM GALLERY ...> (IN GALLERY)"
+
+<ROOM SOUTH-GATE
+ (IN ROOMS)
+ (DESC "South Gate")
+ (EAST TO SE-TOWER)
+ (SOUTH TO MEADOW IF RUSTY-GATE IS OPEN)
+ (WEST TO GALLERY)
+ (NORTH TO EAST-HALL)
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION SOUTH-GATE-F)
+ (GLOBAL MEADOW-OBJ RUSTY-GATE BEACH-OBJ SEA)>
+
+<ROUTINE SOUTH-GATE-F (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"This interior courtyard stands at the southern entrance to the castle, where
+a small rusty gate ">
+ <COND (<FSET? ,RUSTY-GATE ,OPENBIT>
+ <TELL
+"is standing open and slowly swaying in a gentle sea
+breeze">)
+ (ELSE
+ <TELL
+"stands closed">)>
+ <TELL
+". Beyond the gate can be seen a small meadow and, beyond that, a white
+beach on a misty sea. Passages enter the castle proper to the north, east,
+and west." CR>)>>
+
+<OBJECT RUSTY-GATE
+ (IN LOCAL-GLOBALS)
+ (DESC "rusty gate")
+ (SYNONYM GATE)
+ (ADJECTIVE RUSTY SMALL)
+ (FLAGS DOORBIT CONTBIT OPENBIT NDESCBIT)>
+
+<ROOM EAST-HALL
+ (IN ROOMS)
+ (DESC "East Hall")
+ (LDESC
+"This short piece of corridor continues to the north and south.")
+ (NORTH TO BANQUET-HALL)
+ (SOUTH TO SOUTH-GATE)
+ (FLAGS RLANDBIT)>
+
+<ROOM SE-TOWER
+ (IN ROOMS)
+ (DESC "Tower")
+ (LDESC
+"This is the base of the southeast tower of the castle. From atop a winding
+staircase comes a loud crashing and screeching noise. To the west is a
+corridor and the southern gate of the castle.")
+ (WEST TO SOUTH-GATE)
+ (UP TO ENGINE-ROOM)
+ (FLAGS RLANDBIT)
+ (ACTION SE-TOWER-F)
+ (GLOBAL STAIRS VOICES)>
+
+;"<ROOM ENGINE-ROOM ...> in GEARS"
+
+<ROOM BANQUET-HALL
+ (IN ROOMS)
+ (DESC "Banquet Hall")
+ (NORTH TO JUNCTION)
+ (SOUTH TO EAST-HALL)
+ (EAST TO KITCHEN)
+ (FLAGS RLANDBIT)
+ (ACTION GUARD-WARNING-F)
+ (ADVFCN ADV-VS-GANG)
+ (GLOBAL VOICES)>
+
+<OBJECT BANQUET-ILLUSION
+ (IN BANQUET-HALL)
+ (SYNONYM DECORATIONS)
+ (ADJECTIVE FESTIVE)
+ (DESC "festive decorations")
+ (FLAGS CONTBIT TRANSBIT NDESCBIT OPENBIT)
+ (ACTION BANQUET-STUFF-F)>
+
+<ROUTINE BANQUET-STUFF-F ()
+ <COND (<AND <VERB? REZROV OPEN CLOSE LOOK-INSIDE EXAMINE>
+ <FSET? ,PRSO ,CONTBIT>>
+ <FCLEAR ,PRSO ,CONTBIT>
+ <PERFORM ,PRSA ,PRSO>
+ <FSET ,PRSO ,CONTBIT>
+ <RTRUE>)>>
+
+<OBJECT BTABLES
+ (IN BANQUET-ILLUSION)
+ (DESC "tables")
+ (SYNONYM TABLE TABLES)
+ (ADJECTIVE WOODEN WOOD)
+ (FLAGS NDESCBIT)
+ (ACTION BANQUET-ILLUSION-F)>
+
+<OBJECT BENCHES
+ (IN BANQUET-HALL)
+ (DESC "benches")
+ (SYNONYM BENCH BENCHES)
+ (ADJECTIVE WOOD WOODEN)
+ (FLAGS NDESCBIT)
+ (ACTION BANQUET-ILLUSION-F)>
+
+<OBJECT IMPLEMENTS
+ (IN BANQUET-ILLUSION)
+ (DESC "golden cutlery")
+ (SYNONYM CUTLERY CRYSTAL)
+ (ADJECTIVE GOLD GOLDEN GLITTERING)
+ (FLAGS NDESCBIT)
+ (ACTION BANQUET-ILLUSION-F)>
+
+<OBJECT FOOD
+ (IN BANQUET-ILLUSION)
+ (DESC "luscious food")
+ (SYNONYM FOOD)
+ (ADJECTIVE LUSCIOUS)
+ (FLAGS NDESCBIT)
+ (ACTION BANQUET-FOOD-F)>
+
+<OBJECT CANDLES
+ (IN BANQUET-ILLUSION)
+ (DESC "banquet candles")
+ (SYNONYM CANDLE)
+ (ADJECTIVE BANQUET)
+ (FLAGS NDESCBIT)
+ (ACTION BANQUET-ILLUSION-F)>
+
+<ROUTINE BANQUET-ILLUSION-F ()
+ <COND (<VERB? KULCAD>
+ <REMOVE ,BANQUET-ILLUSION>
+ <TELL
+"The festive banquet setting dissolves, leaving a large hall littered with
+broken benches." CR>)
+ (<AND <VERB? CLIMB-ON BOARD>
+ <EQUAL? ,PRSO ,BENCHES ,BTABLES>>
+ <TELL "It's not worth the bother." CR>)
+ (<VERB? TAKE MOVE>
+ <COND (<IN? ,BANQUET-ILLUSION ,HERE>
+ <TELL
+"They seem to be protected by some magic; you can't budge them." CR>)
+ (T
+ <TELL
+"You realize there is no point in that." CR>)>)>>
+
+<ROUTINE BANQUET-FOOD-F ()
+ <COND (<VERB? EAT TAKE>
+ <TELL
+"The food is quite delicious, but somehow unsatisfying." CR>)
+ (T <BANQUET-ILLUSION-F>)>>
+
+<ROUTINE GUARD-WARNING-F (RARG "AUX" (LP <LOC ,PLAYER>))
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <COND (<EQUAL? .LP ,BANQUET-HALL>
+ <COND (<FSET? ,BANQUET-HALL ,RMUNGBIT>
+ <REMOVE ,BANQUET-ILLUSION>
+ <TELL
+"This desolate hall is nearly empty, save for a few long benches which
+are scattered throughout the room. The walls seem to be scorched, and
+everywhere are signs of decay. A sickening odor pervades the room, and
+wisps of acrid black smoke can be seen to the north. A wide passage leads
+south, and a small one opens to the east." CR>)
+ (<IN? ,BANQUET-ILLUSION ,BANQUET-HALL>
+ <TELL
+"A banquet has been set here for hundreds. Long benches fill the room, each
+covered with finest linen and set with golden cutlery and glittering
+crystal. Luscious food weighs down each table, and candles light the room
+with a festive glow. The room can be entered by a north-south corridor and
+a small opening to the east, from which an odd, acrid smell issues." CR>)
+ (T
+ <TELL
+"This hall is completely empty, except for some long benches which are
+scattered throughout the room." CR>)>)
+ (<EQUAL? .LP ,LIBRARY>
+ <TELL <GETP .LP ,P?LDESC> CR>)
+ (ELSE <RFALSE>)>
+ <COND (<NOT <IN? ,GANG-OF-FOUR .LP>>
+ <TELL "To the ">
+ <COND (<EQUAL? .LP ,LIBRARY>
+ <TELL "south">)
+ (T <TELL "north">)>
+ <TELL
+" you can hear the sound of a group of low, guttural voices." CR>)>
+ <RTRUE>)
+ (<AND <EQUAL? .RARG ,M-BEG>
+ <EQUAL? ,WINNER ,PLAYER>
+ <VERB? WALK>
+ <NOT ,PROTECTED-FROM-EVIL>
+ <IN? ,GANG-OF-FOUR .LP>>
+ <COND (<OR <AND <EQUAL? .LP ,LIBRARY>
+ <==? ,PRSO ,P?SOUTH>>
+ <AND <EQUAL? .LP ,BANQUET-HALL>
+ <==? ,PRSO ,P?NORTH>>>
+ <TELL
+"In your confused and fearful state, you have blundered right into the
+advancing guards! They grab you, not too gently, and take you away. You end up
+at a huge temple." CR CR>
+ <QUEUE I-GUARDS-ARRIVE 0>
+ <QUEUE I-GANG 0>
+ <TAKE-TO-TOWER>
+ <RTRUE>)>)
+ (<AND <EQUAL? .RARG ,M-END>
+ <PROB 30>
+ <EQUAL? .LP ,LIBRARY ,BANQUET-HALL>
+ <NOT <IN? ,GANG-OF-FOUR .LP>>>
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <TELL
+"The low, guttural voices seem to be coming in your direction." CR>)>
+ <ENABLE <QUEUE I-GUARDS-ARRIVE 2>>
+ <RTRUE>)>>
+
+<ROUTINE I-GUARDS-ARRIVE ("AUX" (LP <LOC ,PLAYER>))
+ <COND (<EQUAL? .LP ,LIBRARY ,BANQUET-HALL>
+ <TELL
+"A group of four hunched and hairy shapes walks into your presence. ">
+ <COND (<NOT ,PROTECTED-FROM-EVIL>
+ <MOVE ,GANG-OF-FOUR .LP>
+ <TELL
+"They
+seem surprised to see you. After whispering a few guttural words to each
+other, they start to move toward you purposefully." CR>
+ <SETG GANG-FOLLOWS 0>
+ <ENABLE <QUEUE I-GANG 1>>)
+ (T
+ <TELL
+"They
+don't seem to take much notice of you, and they soon depart." CR>)>)>>
+
+<GLOBAL GANG-FOLLOWS 0>
+
+<ROUTINE I-GANG ()
+ <SETG GANG-FOLLOWS <+ ,GANG-FOLLOWS 1>>
+ <COND (<IN? ,GANG-OF-FOUR <LOC ,PLAYER>>
+ <REMOVE ,GANG-OF-FOUR>
+ <COND (,PROTECTED-FROM-EVIL
+ <TELL
+"The group of hunched and hairy shapes glances at you disinterestedly,
+wanders around the room for a while, and then departs." CR>)
+ (T
+ <TELL
+"The group of hunched and hairy shapes takes you in their arms and escorts
+you into a huge temple." CR CR>
+ <TAKE-TO-TOWER>
+ <RTRUE>)>)
+ (<FSET? <LOC ,PLAYER> ,RMUNGBIT>
+ <TELL
+"The group of shapes follows you, intent on your capture! They seem to
+come alive in the desolation which fills this room." CR>
+ <MOVE ,GANG-OF-FOUR <LOC ,PLAYER>>
+ <QUEUE I-GANG 1>
+ <RTRUE>)
+ (<L? ,GANG-FOLLOWS ,LOSSAGE>
+ <TELL
+"The group of shapes follows you into this undespoiled room, emboldened
+and eager for blood." CR>
+ <MOVE ,GANG-OF-FOUR <LOC ,PLAYER>>
+ <QUEUE I-GANG 1>
+ <RTRUE>)
+ (T
+ <TELL
+"Fortunately for you, the gang has stopped following! You relax for a
+moment and heave a sigh of relief." CR>
+ <REMOVE ,GANG-OF-FOUR>
+ <RFALSE>)>>
+
+<OBJECT GANG-OF-FOUR
+ (DESC "group of hairy shapes")
+ (LDESC "A group of hunched and hairy shapes is standing here.")
+ (SYNONYM SHAPES COUPLE GUARDS BEINGS)
+ (ADJECTIVE HAIRY HUNCHED GROUP)
+ (FLAGS VICBIT)
+ (ACTION GANG-OF-FOUR-F)>
+
+<ROUTINE GANG-OF-FOUR-F ()
+ <COND (<VERB? CLEESH>
+ <TELL
+"The group of shapes turns into a small convention of newts, who run away." CR>
+ <QUEUE I-GANG 0>
+ <REMOVE ,GANG-OF-FOUR>)
+ (<VERB? VAXUM>
+ <COND (,PROTECTED-FROM-EVIL <RFALSE>)
+ (T
+ <TELL
+"The shapes, who were on the verge of reaching you, seem to waver in their
+resolve. After a moment's pause, they leave the room together, talking
+in a less guttural tone which might correspond to cheerfulness." CR>
+ <REMOVE ,GANG-OF-FOUR>
+ <QUEUE I-GANG 0>
+ <RTRUE>)>)
+ (<VERB? GUNCHO>
+ <TELL
+"The shapes">
+ <COND (<NOT ,PROTECTED-FROM-EVIL>
+ <TELL ", on the verge of reaching you,">)>
+ <TELL " disappear, seeming to dwindle into the distance
+while remaining in the same spot. Eventually you can see them no longer." CR>
+ <REMOVE ,GANG-OF-FOUR>)
+ (<AND <VERB? ZIFMIA> ,PROTECTED-FROM-EVIL>
+ <ENABLE <QUEUE I-GANG 2>>
+ <TELL
+"The shapes, previously ignoring you, now approach with menace in their
+eyes." CR>)
+ (<VERB? FROTZ>
+ <TELL
+"The shapes glow brightly from the frotz spell. This apparently doesn't
+appeal to them, as they shriek with horror and attempt to avert their
+gaze from themselves. Within a moment, they have run screaming from the
+room." CR>
+ <REMOVE ,GANG-OF-FOUR>)
+ (<AND <VERB? NITFOL> <NOT ,PROTECTED-FROM-EVIL>>
+ <TELL
+"The shapes, whose language you understand instinctively, say something
+on the order of \"Blood for sacrifice!\", \"Master pleased!\", and other
+not-so-soothing words as they approach." CR>)>>
+
+<ROOM KITCHEN
+ (IN ROOMS)
+ (DESC "Kitchen")
+ (LDESC
+"The kitchen is dusty and disused. Old bones litter the floor, and the
+carving knives are rusty. A rat nest fills one of the ovens, and cobwebs
+are everywhere. There is some rotting food in a garbage heap in one corner.")
+ (MUNGDESC
+"The kitchen has been freshly used. The oven, though empty, is still
+warm. Bones litter the floor, and the carving knives are bloody. The
+bones give all too clear an indication of the nature of the viands
+prepared here.")
+ (WEST TO BANQUET-HALL)
+ (FLAGS RLANDBIT)>
+
+<OBJECT LITTER
+ (IN KITCHEN)
+ (DESC "various and sundry items")
+ (SYNONYM KNIVES KNIFE BONES COBWEBS)
+ (ADJECTIVE OLD CARVING RUSTY HUGE)
+ (FLAGS NDESCBIT)
+ (ACTION LITTER-F)>
+
+<ROUTINE LITTER-F ()
+ <COND (<VERB? TAKE>
+ <TELL "You have no use for those things." CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"They look as if they haven't been disturbed in a long time." CR>)>>
+
+<OBJECT RAT-NEST
+ (IN OVEN)
+ (DESC "rat nest")
+ (SYNONYM NEST)
+ (ADJECTIVE RAT)
+ (FLAGS NDESCBIT)
+ (ACTION RAT-NEST-F)>
+
+<ROUTINE RAT-NEST-F ()
+ <COND (<VERB? TAKE>
+ <TELL "What on earth for?" CR>)
+ (<VERB? RUB MUNG>
+ <TELL
+"You poke around in the nest, but there doesn't seem to be anything
+of interest in there." CR>)
+ (<VERB? LOOK-INSIDE>
+ <TELL "There's nothing in there." CR>)>>
+
+<OBJECT OVEN
+ (IN KITCHEN)
+ (DESC "oven")
+ (SYNONYM OVEN)
+ (FLAGS NDESCBIT VOWELBIT CONTBIT OPENBIT)
+ (ACTION OVEN-F)>
+
+<ROUTINE OVEN-F ()
+ <COND (<VERB? LOOK-INSIDE EXAMINE REACH-IN>
+ <TELL
+"The oven contains nothing of interest, unless of course you have a
+hankering for rat's nests." CR>)
+ (<VERB? OPEN REZROV>
+ <COND (<FSET? ,OVEN ,OPENBIT>
+ <TELL "The oven is already open." CR>)
+ (T
+ <FSET ,OVEN ,OPENBIT>
+ <TELL "Opened." CR>)>)
+ (<VERB? CLOSE>
+ <COND (<NOT <FSET? ,OVEN ,OPENBIT>>
+ <TELL "The oven is already closed." CR>)
+ (T
+ <FCLEAR ,OVEN ,OPENBIT>
+ <TELL "Closed." CR>)>)>>
+
+<OBJECT HEAP
+ (IN KITCHEN)
+ (DESC "heap of garbage")
+ (SYNONYM HEAP FOOD)
+ (ADJECTIVE GARBAGE ROTTED ROTTIN)
+ (FLAGS NDESCBIT)
+ (ACTION HEAP-F)>
+
+<ROUTINE HEAP-F ()
+ <COND (<VERB? TAKE>
+ <TELL "That would be rather undignified." CR>)
+ (<VERB? SEARCH LOOK-INSIDE DIG>
+ <TELL "There is nothing but rotted food there." CR>)>>
+
+<ROOM JUNCTION
+ (IN ROOMS)
+ (DESC "Junction")
+ (LDESC
+"The corridor widens here to form a large hall. To the north and south are
+small passages, and to the east is what appears to be an enormous spiral
+staircase. A passage to the west leads into a courtyard. The walls here are
+scarred and black, and a strange heaviness hangs in the air.")
+ (WEST TO COURTYARD-7)
+ (EAST TO LANDING)
+ (SOUTH TO BANQUET-HALL)
+ (NORTH TO LIBRARY)
+ (FLAGS RLANDBIT RMUNGBIT)
+ (ACTION JUNCTION-F)
+ (GLOBAL STAIRS)
+ (ADVFCN ADV-VS-GANG)>
+
+<ROUTINE JUNCTION-F (RARG)
+ <COND (<AND <EQUAL? .RARG ,M-BEG>
+ <EQUAL? ,WINNER ,PLAYER>
+ <NOT ,PROTECTED-FROM-EVIL>>
+ <TELL
+"A host of hunched and hairy shapes walk into the hall before you can
+do anything and, seeing you, take you in their arms and escort you to the
+west into a huge temple." CR CR>
+ <GOTO ,TEMPLE>)>>
+
+<ROUTINE ADV-VS-GANG ("AUX" (L <LOC ,ADVENTURER>))
+ <COND (<AND <IN? ,WINNER .L>
+ <IN? ,GANG-OF-FOUR .L>>
+ <MOVE ,ADVENTURER
+ <COND (<IN? ,WINNER ,LIBRARY> ,NORTH-GATE)
+ (ELSE ,EAST-HALL)>>
+ <TELL
+"The adventurer softly, silently, and stealthily disappears." CR>)
+ (<AND <IN? ,ADVENTURER ,JUNCTION>
+ <EQUAL? <LOC ,WINNER> ,LIBRARY ,BANQUET-HALL>>
+ <TELL
+"You hear yelling, oaths, and the crash of metal coming from the "
+<COND (<IN? ,WINNER ,LIBRARY> "south")(T "north")>
+".
+It sounds like a swordfight! Suddenly, everything is quiet." CR>
+ <COND (<PROB 70>
+ <MOVE ,ADVENTURER
+ <COND (<IN? ,WINNER ,LIBRARY> ,NORTH-GATE)
+ (ELSE ,EAST-HALL)>>
+ <SETG ADV-OLD-LOC ,HERE>
+ <SETG ADV-NEW-LOC <LOC ,ADVENTURER>>
+ <TELL
+"Then the adventurer, running at an impressive speed, tears by you heading "
+ <COND (<IN? ,WINNER ,LIBRARY> "north")
+ (ELSE "south")>
+ ". He seems to have been in a fight." CR>)
+ (ELSE
+ <REMOVE ,ADVENTURER>
+ <MOVE ,SKELETON ,TOWER-S>
+ <QUEUE I-ADVENTURER 0>)>)>>
+
+<OBJECT SKELETON
+ (DESC "skeleton")
+ (SYNONYM SKELETON HEAP BONES)
+ (ADJECTIVE HUMAN)
+ (LDESC
+"Lying in a heap on the ground are what appear to be human bones, picked
+entirely clean.")
+ (ACTION SKELETON-F)>
+
+<ROUTINE SKELETON-F ()
+ <COND (<VERB? TAKE>
+ <TELL
+"They're quite heavy, and you don't need them anyway." CR>)
+ (<VERB? MUNG ATTACK KILL>
+ <TELL
+"Show some respect! Especially considering that he got that way because of
+you!" CR>)>>
+
+<ROOM LIBRARY
+ (IN ROOMS)
+ (DESC "Library")
+ (LDESC
+"This is a library, or rather it was until it was ransacked and despoiled.
+Most of the contents of the room have been burned in a huge bonfire in the
+center of the room. Hundreds of charred and empty tubes are scattered
+about, as if by someone searching, so ashes are strewn about. There
+are rat tracks in the ashes.")
+ (NORTH TO NORTH-GATE)
+ (SOUTH TO JUNCTION)
+ (FLAGS RLANDBIT)
+ (ACTION GUARD-WARNING-F)
+ (ADVFCN ADV-VS-GANG)
+ (GLOBAL VOICES)
+ (PSEUDO "ASHES" ASHES-PSEUDO "TUBES" TUBES-PSEUDO)>
+
+<OBJECT VOICES
+ (IN LOCAL-GLOBALS)
+ (DESC "noise")
+ (SYNONYM VOICES NOISE NOISES DRONING)
+ (ADJECTIVE LOW GUTTURAL SCREECHING)
+ (ACTION VOICES-F)>
+
+<ROUTINE VOICES-F ()
+ <COND (<EQUAL? ,HERE ,ENGINE-ROOM ,SE-TOWER>
+ <COND (<VERB? LISTEN EXAMINE>
+ <TELL "The noise is loud and screeching." CR>)>)
+ (<EQUAL? ,HERE ,COURTYARD-3 ,ALTAR>
+ <COND (<VERB? LISTEN>
+ <TELL
+"The voices are chanting something horrifying." CR>)>)
+ (<VERB? LISTEN>
+ <TELL
+"You can't make out what they are saying, though it would be fair to say
+it's not too pleasant." CR>)
+ (<VERB? ZIFMIA>
+ <TELL
+"The voices seem to be approaching. I hope you know what you're doing." CR>
+ <ENABLE <QUEUE I-GUARDS-ARRIVE 1>>)
+ (<VERB? NITFOL>
+ <TELL
+"You can't use that spell on voices, only beings." CR>)>>
+
+<ROUTINE TUBES-PSEUDO ()
+ <COND (<VERB? LOOK-INSIDE>
+ <TELL "They are all empty." CR>)
+ (<VERB? TAKE>
+ <TELL "As you touch each one, it crumbles to ash." CR>)>>
+
+<ROUTINE ASHES-PSEUDO ()
+ <COND (<VERB? TAKE>
+ <TELL "The ash slips through your fingers." CR>)
+ (<VERB? EXAMINE>
+ <COND (<EQUAL? ,HERE ,LIBRARY>
+ <TELL
+"The ashes have rat tracks in them. Little rat thoroughfares head here
+and there, but most head in one direction." CR>)
+ (ELSE
+ <TELL
+"The ashes are black and greasy." CR>)>)
+ (<VERB? SEARCH LOOK-INSIDE>
+ <TELL
+"You find nothing of interest in the ashes">
+ <COND (<EQUAL? ,HERE ,LIBRARY>
+ <TELL ", other than rat tracks heading
+this way and that">)>
+ <TELL "." CR>)>>
+
+<OBJECT RAT-TRACKS
+ (IN LIBRARY)
+ (DESC "tracks")
+ (SYNONYM TRACK TRACKS)
+ (ADJECTIVE RAT)
+ (FLAGS NDESCBIT)
+ (ACTION RAT-TRACKS-F)>
+
+<ROUTINE RAT-TRACKS-F ()
+ <COND (<VERB? FOLLOW EXAMINE>
+ <TELL
+"There are plenty of rat tracks here, going in various directions. One
+prominent rodentine thoroughfare stands out though, going as it does into
+a small hole in the wall." CR>
+ <MOVE ,RAT-HOLE ,HERE>)>>
+
+<OBJECT RAT-HOLE
+ (DESC "rat hole")
+ (SYNONYM HOLE)
+ (ADJECTIVE RAT SMALL)
+ (LDESC
+"Inspection has revealed that the tracks lead into a small hole in the wall.")
+ (FLAGS CONTBIT OPENBIT)
+ (CAPACITY 10)
+ (ACTION RAT-HOLE-F)>
+
+<ROUTINE RAT-HOLE-F ("AUX" OBJ)
+ <SET OBJ <FIRST? ,RAT-HOLE>>
+ <COND (<VERB? EXAMINE>
+ <TELL "You can't see anything in the rat hole." CR>)
+ (<VERB? REACH-IN>
+ <TELL
+"You reach around for a moment and come up ">
+ <COND (<NOT .OBJ>
+ <TELL "empty." CR>)
+ (T
+ <TELL "with something. It's " A .OBJ "." CR>
+ <THIS-IS-IT .OBJ>
+ <FCLEAR .OBJ ,INVISIBLE>
+ <SETG SCORE <+ ,SCORE ,QUENCH-POINT>>
+ <SETG QUENCH-POINT 0>
+ <FSET ,RAT-HOLE ,NDESCBIT>
+ <MOVE .OBJ ,WINNER>)>)
+ (<VERB? LOOK-INSIDE>
+ <TELL
+"It's too dark to see anything inside the hole." CR>)
+ (<AND <VERB? PUT> <EQUAL? ,PRSI ,RAT-HOLE>>
+ <COND (<FIRST? ,RAT-HOLE>
+ <TELL
+"Something's blocking up the hole from inside." CR>)
+ (<G? <GETP ,PRSO ,P?SIZE> 5>
+ <TELL "It won't fit." CR>)
+ (T
+ <FSET ,PRSO ,INVISIBLE>
+ <MOVE ,PRSO ,PRSI>
+ <TELL "Done." CR>)>)
+ (<VERB? CLOSE>
+ <TELL "How absurd!" CR>)>>
+
+<ROOM NORTH-GATE
+ (IN ROOMS)
+ (DESC "North Gate")
+ (LDESC
+"This small open area stands at the old north gate of the castle, now badly
+rusted. Through the gate, a forest can be seen. To the west, a hall glows with
+light, and to the south, the dark castle can be reentered. A narrow passage
+to the east leads to the base of the northeast tower.")
+ (WEST TO MIRROR-HALL-4)
+ (SOUTH TO LIBRARY)
+ (EAST TO PURLOINED-ROOM)
+ (NORTH TO FOREST-1 IF NORTH-GATE-OBJ IS OPEN
+ ELSE "The gate is rusted shut.")
+ (FLAGS RLANDBIT)
+ (GLOBAL FOREST NORTH-GATE-OBJ TOWER)>
+
+<OBJECT NORTH-GATE-OBJ
+ (IN LOCAL-GLOBALS)
+ (DESC "gate")
+ (SYNONYM GATE)
+ (ADJECTIVE NORTH RUSTED OLD RUSTY)
+ (FLAGS NDESCBIT LOCKEDBIT DOORBIT CONTBIT)
+ (ACTION NORTH-GATE-OBJ-F)>
+
+<ROUTINE NORTH-GATE-OBJ-F ()
+ <COND (<AND <VERB? REZROV> <NOT <FSET? ,PRSO ,OPENBIT>>>
+ <TELL
+"The rusted north gate magically creaks open far enough for you to
+leave." CR>
+ <FSET ,PRSO ,OPENBIT>
+ <FCLEAR ,PRSO ,LOCKEDBIT>)
+ (<AND <VERB? OPEN> <FSET? ,PRSO ,LOCKEDBIT>>
+ <TELL "The gate is rusted shut." CR>)>>
+
+<ROOM FOREST-1
+ (IN ROOMS)
+ (DESC "Forest")
+ (LDESC
+"You are in a dark forest, just north of a rusted gate. Except to
+the east and south, the forest is thick all around you.")
+ ;(MUNGDESC
+"You are in a blasted and ruined forest. The trees are covered with ash,
+and their leaves are gone. Most of their limbs are cracked, and many
+litter the ground. A thin pall of smoke fills the air. There is a rusted
+gate to the south. The desolation continues in all other directions but east.")
+ (SOUTH TO NORTH-GATE)
+ (NORTH "The forest is deep and dark. I wouldn't go in there.")
+ (EAST TO FOREST-2)
+ (WEST "The forest is deep and dark. I wouldn't go in there.")
+ (NE "The forest is deep and dark. I wouldn't go in there.")
+ (NW "The forest is deep and dark. I wouldn't go in there.")
+ (SE "The forest is deep and dark. I wouldn't go in there.")
+ (SW "The forest is deep and dark. I wouldn't go in there.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL NORTH-GATE-OBJ FOREST TREES)
+ (ACTION FOREST-1-F)>
+
+<ROUTINE FOREST-1-F (RARG)
+ <COND (<AND <EQUAL? .RARG ,M-ENTER>
+ <IN? ,REPAIR-SCROLL ,HERE>
+ <NOT <FSET? ,REPAIR-SCROLL ,TOUCHBIT>>>
+ <THIS-IS-IT ,REPAIR-SCROLL>
+ <RFALSE>)>>
+
+;"One Froggy Evening..."
+
+<ROOM FOREST-2
+ (IN ROOMS)
+ (DESC "Swamp")
+ (LDESC
+"You are in a thick forest shading into a deep and miasmic swamp.
+The ground is very wet and boggy here, and footing is treacherous.
+Lily pads cover the surface of the water, and frogs abound. Things
+look drier to the west.")
+ (SOUTH "There could be quicksand there. You should stay here.")
+ (NORTH "There could be quicksand there. You should stay here.")
+ (EAST "There could be quicksand there. You should stay here.")
+ (WEST TO FOREST-1)
+ (NE "There could be quicksand there. You should stay here.")
+ (NW "There could be quicksand there. You should stay here.")
+ (SE "There could be quicksand there. You should stay here.")
+ (SW "There could be quicksand there. You should stay here.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (ACTION SWAMP-F)
+ (GLOBAL FOREST GLOBAL-WATER)
+ (PSEUDO "SWAMP" SWAMP-PSEUDO)>
+
+<ROUTINE SWAMP-F ("OPTIONAL" (RARG <>))
+ <COND (<AND <==? .RARG ,M-END>
+ <NOT <VERB? TELL>>>
+ <TELL
+"The sounds of frogs and other swamp dwellers fill the air.">
+ <COND (<==? ,TALK-TO-ANIMAL? ,FROG>
+ <COND (<NOT <FSET? ,NEWT-SCROLL ,INVISIBLE>>
+ <TELL " The frogs are discussing
+">
+ <TELL <PICK-ONE ,FROG-TALKS>>)
+ (ELSE
+ <TELL " The frogs say
+\"Look under the lily pad. Breep!\"">)>)
+ ;(ELSE
+ <TELL " The sounds they make
+are almost on the border of comprehension.">)>
+ <CRLF>
+ <RFALSE>)>>
+
+<ROUTINE SWAMP-PSEUDO ()
+ <COND (<VERB? EXAMINE>
+ <PERFORM ,V?LOOK>
+ <RTRUE>)
+ (<VERB? THROUGH>
+ <TELL
+"There is probably quicksand there. At best you would get
+horribly muddy." CR>)>>
+
+<GLOBAL FROG-TALKS <LTABLE 0
+"what they will do if they ever become princes again."
+"the finer points of insect flavoring."
+"the politics of lily pad assignment."
+"the Interlogic series of prose adventures."
+"the recent disturbing rise in the number of predators in the swamp.">>
+
+<OBJECT FROG
+ (IN FOREST-2)
+ (DESC "frog")
+ (SYNONYM FROG FROGS)
+ (FLAGS NDESCBIT VILLAIN VICBIT)
+ (ACTION FROG-F)>
+
+<ROUTINE FROG-F ()
+ <COND (<AND <EQUAL? ,WINNER ,FROG>
+ <NOT <VERB? HELLO>>>
+ <TELL "\"Breep! No, thank you. Breep!\"" CR>)
+ (<VERB? HELLO LISTEN>
+ <TELL "\"Breep! ">
+ <COND (<EQUAL? ,TALK-TO-ANIMAL? ,FROG>
+ <TELL <PICK-ONE ,FROGGERS> " ">)>
+ <TELL "Breep!\"" CR>)>>
+
+<GLOBAL FROGGERS <LTABLE 0
+"Hiya! Seen any juicy flies?"
+"Awful day, isn't it?"
+"Tell Belboz that Fr'nb-ap says hello!">>
+
+<OBJECT LILY-PAD
+ (IN FOREST-2)
+ (DESC "lily pad")
+ (SYNONYM PAD PADS LILIES)
+ (ADJECTIVE LILY)
+ (FLAGS NDESCBIT CONTBIT SURFACEBIT OPENBIT)
+ (ACTION LILY-PAD-F)>
+
+<ROUTINE LILY-PAD-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"There's not much to say about the lily pads except that they seem to make a
+cheery home for the frogs." CR>)
+ (<VERB? THROUGH CLIMB-ON>
+ <TELL
+"You sink into the goo, crushing a lily pad." CR>)
+ (<VERB? LOOK-UNDER>
+ <COND (<FSET? ,NEWT-SCROLL ,INVISIBLE>
+ <FCLEAR ,NEWT-SCROLL ,INVISIBLE>
+ <MOVE ,NEWT-SCROLL ,WINNER>
+ <TELL
+"There is a damp scroll there, which you take into your hand." CR>)
+ (T <TELL "There is nothing there but goo." CR>)>)>>
+
+;"<ROOM PURLOINED-ROOM ...> (IN PURLOINED.ZIL)"
+
+;"<ROOM MIRROR-HALL-N ...> (IN PURLOINED.ZIL)"
+
+<ROOM NW-TOWER
+ (IN ROOMS)
+ (DESC "Tower")
+ (LDESC
+"This is the base of the northwest tower of the castle. A winding staircase
+leads up into the tower itself, and passages lead from here to the east and
+south.")
+ (UP TO JEWEL-ROOM)
+ (EAST TO MIRROR-HALL-1)
+ (SOUTH TO PEBBLED-PATH)
+ (FLAGS RLANDBIT)
+ (GLOBAL STAIRS TOWER)>
+
+;"<ROOM JEWEL-ROOM ...> (IN EGG)"
+
+<ROOM COURTYARD-2
+ (IN ROOMS)
+ (DESC "Courtyard")
+ (LDESC
+"This is the northern part of the large interior courtyard of the castle.
+The vast lawns continue from here south and west. To the southeast stands
+a huge temple, on either side of which are dark towers. The courtyard
+continues east along a narrow path.")
+ (MUNGDESC
+"The northern part of the interior courtyard is grey and lifeless. The
+vast lawns are withered and covered in black ash stretching from south
+to west. The temple stands to the southeast, and the courtyard continues
+east.")
+ (SW TO COURTYARD-1)
+ (SE TO TEMPLE)
+ (WEST TO COURTYARD-1)
+ (EAST TO COURTYARD-5)
+ (SOUTH TO COURTYARD-3)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL COURTYARD LAWN TEMPLE-OBJ)>
+
+<ROOM COURTYARD-3
+ (IN ROOMS)
+ (DESC "Courtyard")
+ (LDESC
+"You are in the center of a large courtyard, which surrounds you in all
+directions. Directly in front of you, to the east, is a large temple flanked
+by two smaller towers. Behind the temple can be seen the two eastern towers
+of the castle, shrouded in fog, and the single dark turret, black as night and
+sending dark streams of smoke into a lowering sky. From the temple comes
+a howling, haunting chant.")
+ (MUNGDESC
+"You are in the center of a large courtyard, which surrounds you. Everything
+around you is ashen and grey, and the air seems miasmic and oppressive. The
+dead grass seems to grab at your feet as you stand gazing around. To
+the east is a temple flanked by two smaller towers. Behind it can be seen
+the two eastern towers of the castle, shrouded in blood-red fog. Between them
+is a dark turret, black and ominous as night. It sends dark streams of smoke
+curling around everything near it. From the temple can be heard a mournful
+chant.")
+ (NORTH TO COURTYARD-2)
+ (SOUTH TO COURTYARD-4)
+ (EAST TO TEMPLE)
+ (WEST TO COURTYARD-1)
+ (NE TO COURTYARD-5)
+ (SE TO COURTYARD-6)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL COURTYARD LAWN TEMPLE-OBJ TOWER TURRET VOICES)>
+
+<ROOM COURTYARD-4
+ (IN ROOMS)
+ (DESC "Courtyard")
+ (LDESC
+"This is the southern part of the great courtyard, which spreads out to
+the north and west. A narrow stretch of grass continues to the east. To
+the northeast stands the temple, flanked by two small towers.")
+ (MUNGDESC
+"This is the southern part of the courtyard, spreading north and west.
+The ground is ashen and grey, and the air heavy with death. The dead grass
+seems to grab at your feet. A narrow stretch of scorched earth continues to
+the east. To the northeast stands the temple, flanked by two small towers.")
+ (EAST TO COURTYARD-6)
+ (NW TO COURTYARD-1)
+ (WEST TO COURTYARD-1)
+ (NORTH TO COURTYARD-3)
+ (NE TO TEMPLE)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL COURTYARD LAWN TEMPLE-OBJ TOWER)>
+
+<ROOM COURTYARD-5
+ (IN ROOMS)
+ (DESC "Courtyard")
+ (LDESC
+"You are north of a small tower which connects with the temple to
+the south. A large courtyard can be seen to the west and a smaller one
+to the southeast.")
+ ;(MUNGDESC
+"You are north of a small tower which connects with the temple to the south.
+A large courtyard lies to the west and a smaller one to the southeast. The
+ground here is dark and hard, with wisps of acrid smoke hanging ominously
+in the still air.")
+ (SE TO COURTYARD-7)
+ (SW TO COURTYARD-3)
+ (WEST TO COURTYARD-2)
+ (SOUTH "There is no entrance to the tower here.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL COURTYARD LAWN TEMPLE-OBJ TOWER)>
+
+<ROOM COURTYARD-6
+ (IN ROOMS)
+ (DESC "Courtyard")
+ (LDESC
+"You are south of a small tower which connects with the temple to
+the north. A large courtyard can be seen to the west and a smaller one
+to the northeast.")
+ ;(MUNGDESC
+"You are south of a small tower which connects with the temple to the north.
+A large courtyard can be seen to the west and a smaller one to the northeast.
+No grass grows in this area however and the few trees are dark and lifeless.")
+ (NE TO COURTYARD-7)
+ (NW TO COURTYARD-3)
+ (WEST TO COURTYARD-4)
+ (NORTH "There is no entrance to the tower here.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL COURTYARD LAWN TOWER TEMPLE-OBJ TREES)>
+
+<ROOM COURTYARD-7
+ (IN ROOMS)
+ (DESC "Courtyard")
+ (LDESC
+"You are standing in a small courtyard between a large open hall to
+the east and a temple to the west. The temple is flanked to the north
+and south by two small towers. Paths cross the lawn to the northwest and
+southwest.")
+ (MUNGDESC
+"You are in a courtyard between an open hall to the east and a temple to
+the west. The temple is flanked, north and south, by twin towers. Paths
+cross the scarred lawn to the northwest and southwest. Nothing now grows
+here, however, and a foul stench fills the air.")
+ (EAST TO JUNCTION)
+ (WEST TO TEMPLE)
+ (SW TO COURTYARD-6)
+ (NW TO COURTYARD-5)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL COURTYARD LAWN TEMPLE-OBJ TOWER)>
+
+;"<ROOM MEADOW ...> and <ROOM BEACH ...> in GEARS"
+
+<GLOBAL MUNG-ROOM-TABLE
+ <TABLE ALTAR TEMPLE TOWER-N TOWER-S
+ COURTYARD-7 COURTYARD-3 JUNCTION COURTYARD-4
+ COURTYARD-2 LANDING COURTYARD-6 COURTYARD-5
+ LIBRARY BANQUET-HALL COURTYARD-1 KITCHEN
+ NORTH-GATE EAST-HALL FOREST-1 CLOSET
+ INSIDE-GATE WEST-HALL SOUTH-GATE MEADOW
+ SE-TOWER PEBBLED-PATH SW-TOWER BEDROOM
+ <>>> \ No newline at end of file
diff --git a/clock.zil b/clock.zil
new file mode 100644
index 0000000..6ac8e65
--- /dev/null
+++ b/clock.zil
@@ -0,0 +1,61 @@
+"CLOCK for
+ ENCHANTER
+ (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 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>
+ <SETG MOVES <+ ,MOVES 1>>
+ <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/crufty.zil b/crufty.zil
new file mode 100644
index 0000000..4a3cd00
--- /dev/null
+++ b/crufty.zil
@@ -0,0 +1,16 @@
+"(c) Copyright 1983 Infocom, Inc. All Rights Reserved."
+
+<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>>
diff --git a/egg.zil b/egg.zil
new file mode 100644
index 0000000..2347710
--- /dev/null
+++ b/egg.zil
@@ -0,0 +1,271 @@
+"EGG for
+ ENCHANTER
+ Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+;"Where, if the player messes up, he gets it all over his face."
+
+<ROOM JEWEL-ROOM
+ (IN ROOMS)
+ (DESC "Jewel Room")
+ (LDESC
+"This fabulous room commands a magnificent view of the Lonely Mountain
+which lies to the north and west. The room itself is filled with
+beautiful chests and cabinets which once contained precious jewels
+and other objets d'art. These are empty. Winding stone stairs
+lead down to the base of the tower.")
+ (DOWN TO NW-TOWER)
+ (FLAGS RLANDBIT ONBIT)
+ (TEXT "You can see the Lonely Mountain to the northwest.")
+ (GLOBAL STAIRS MOUNTAIN WINDOW)>
+
+<OBJECT JEWEL-CHESTS
+ (IN JEWEL-ROOM)
+ (DESC "collection of chests and cabinets")
+ (SYNONYM CHEST CHESTS CABINET)
+ (ADJECTIVE BEAUTIFUL)
+ (FLAGS NDESCBIT CONTBIT)
+ (ACTION JEWEL-CHESTS-F)>
+
+<ROUTINE JEWEL-CHESTS-F ()
+ <COND (<VERB? LOOK-INSIDE EXAMINE>
+ <TELL "There's nothing inside." CR>)
+ (<VERB? OPEN CLOSE>
+ <TELL "Don't bother. There's nothing inside anyway." CR>)
+ (<VERB? PUT>
+ <TELL
+"A waste of time. You'd probably forget where you put it." CR>)>>
+
+<OBJECT EGG
+ (IN JEWEL-ROOM)
+ (DESC "beautiful, ornamented egg")
+ (FDESC
+"There is an ornamented egg here, both beautiful and complex. It is
+carefully crafted and bears further examination.")
+ (SYNONYM EGG)
+ (ADJECTIVE BEAUTIFUL JEWELLED FABERGE ORNAME)
+ (FLAGS TAKEBIT CONTBIT TRANSBIT TREASURE)
+ (SIZE 8)
+ (CAPACITY 10)
+ (ACTION EGG-F)>
+
+<OBJECT EGG-KNOB-1
+ (IN EGG)
+ (DESC "lapis handle")
+ (SYNONYM HANDLE)
+ (ADJECTIVE LAPIS)
+ (FLAGS NDESCBIT)
+ (TEXT "turned")
+ (ACTION EGG-KNOB-F)>
+
+<OBJECT EGG-KNOB-2
+ (IN EGG)
+ (DESC "emerald knob")
+ (SYNONYM KNOB)
+ (ADJECTIVE EMERALD)
+ (FLAGS NDESCBIT VOWELBIT)
+ (TEXT "twisted")
+ (ACTION EGG-KNOB-F)>
+
+<OBJECT EGG-KNOB-3
+ (IN EGG)
+ (DESC "silver slide")
+ (SYNONYM SLIDE)
+ (ADJECTIVE SILVER)
+ (FLAGS NDESCBIT)
+ (TEXT "shoved")
+ (ACTION EGG-KNOB-F)>
+
+<OBJECT EGG-KNOB-4
+ (IN EGG)
+ (DESC "golden crank")
+ (SYNONYM CRANK)
+ (ADJECTIVE GOLDEN)
+ (FLAGS NDESCBIT)
+ (TEXT "wound")
+ (ACTION EGG-KNOB-F)>
+
+<OBJECT EGG-KNOB-5
+ (IN EGG)
+ (DESC "diamond-studded button")
+ (SYNONYM BUTTON)
+ (ADJECTIVE DIAMOND)
+ (FLAGS NDESCBIT)
+ (TEXT "pushed")
+ (ACTION EGG-KNOB-F)>
+
+<ROUTINE EGG-KNOB-STATE (KNOB "OPTIONAL" (VER? <>))
+ <COND (<OR .VER? <FSET? .KNOB ,OPENBIT>>
+ <TELL "The " D .KNOB>
+ <COND (<FSET? .KNOB ,OPENBIT>
+ <TELL " has been ">)
+ (.VER?
+ <TELL " has not yet been ">)>
+ <TELL <GETP .KNOB ,P?TEXT> ". ">)>>
+
+<ROUTINE EGG-F ()
+ <COND (<AND <VERB? LOOK-INSIDE> <NOT <FSET? ,EGG ,OPENBIT>>>
+ <TELL "The egg isn't open!" CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"This ornamented egg is both beautiful and complex. The egg itself is
+mother-of-pearl, but decorated with delicate gold traceries inlaid with
+jewels and other precious metals. On the surface are a lapis handle, an
+emerald knob, a silver slide, a golden crank, and a diamond-studded button
+carefully and unobtrusively imbedded in the decorations. These various
+protuberances are likely to be connected with some machinery inside." CR>
+ <EGG-KNOB-STATE ,EGG-KNOB-1>
+ <EGG-KNOB-STATE ,EGG-KNOB-2>
+ <EGG-KNOB-STATE ,EGG-KNOB-3>
+ <EGG-KNOB-STATE ,EGG-KNOB-4>
+ <EGG-KNOB-STATE ,EGG-KNOB-5>
+ <TELL "The " D ,PRSO " is ">
+ <COND (<FSET? ,PRSO ,OPENBIT> <TELL "open.">)
+ (ELSE <TELL "closed.">)>
+ <CRLF>
+ <RTRUE>)
+ (<AND <VERB? PUT> <==? ,PRSI ,EGG>>
+ <TELL
+"You can't put the " D ,PRSO " inside the egg without damaging it." CR>)
+ (<AND <VERB? REZROV> <NOT <FSET? ,EGG ,OPENBIT>>>
+ <FSET ,EGG ,OPENBIT>
+ <SETG SCORE <+ ,SCORE ,EGG-POINT>>
+ <SETG EGG-POINT 0>
+ <TELL
+"The egg seems to come to life and each piece slides effortlessly in the
+correct pattern. The egg opens">
+ <COND (<IN? ,DAMAGED-SCROLL ,EGG>
+ <FCLEAR ,DAMAGED-SCROLL ,INVISIBLE>
+ <THIS-IS-IT ,DAMAGED-SCROLL>
+ <TELL ", revealing a shredded scroll inside,
+nestled among a profusion of shredders, knives, and other sharp instruments,
+cunningly connected to the knobs, buttons, etc. on the outside">)>
+ <TELL "." CR>)
+ (<AND <VERB? LOOK-INSIDE>
+ <FSET? ,PRSO ,OPENBIT>
+ <NOT <FIRST? ,PRSO>>>
+ <TELL
+"On the inside of the egg are many complex cutting devices." CR>)
+ (<AND <VERB? OPEN> <NOT <FSET? ,EGG ,OPENBIT>>>
+ <TELL
+"That seems to be the problem." CR>)
+ (<AND <VERB? CLOSE> <FSET? ,EGG ,OPENBIT>>
+ <FCLEAR ,EGG-KNOB-1 ,OPENBIT>
+ <FCLEAR ,EGG-KNOB-2 ,OPENBIT>
+ <FCLEAR ,EGG-KNOB-3 ,OPENBIT>
+ <FCLEAR ,EGG-KNOB-4 ,OPENBIT>
+ <FCLEAR ,EGG-KNOB-5 ,OPENBIT>
+ <TELL
+"As you close the egg, all of the pieces slide back into place, locking
+it shut." CR>
+ <FCLEAR ,EGG ,OPENBIT>)
+ (<VERB? MUNG>
+ <TELL
+"The egg is smashed into little tiny pieces by the force of your blow.">
+ <COND (<IN? ,DAMAGED-SCROLL ,EGG>
+ <FCLEAR ,DAMAGED-SCROLL ,INVISIBLE>
+ <MOVE ,DAMAGED-SCROLL ,SCRAMBLED-EGG>
+ <TELL
+" Inside the now broken egg are the remains of a small spell scroll,
+damaged beyond hope of learning.">)>
+ <CRLF>
+ <MOVE ,SCRAMBLED-EGG <LOC ,EGG>>
+ <REMOVE ,EGG>)>>
+
+<ROUTINE EGG-KNOB-F ()
+ <COND (<VERB? REZROV OPEN TURN MOVE PUSH>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <TELL "It's already in the open position." CR>)
+ (ELSE
+ <FSET ,PRSO ,OPENBIT>
+ <COND (<VERB? REZROV>
+ <SETG SCORE <+ ,SCORE ,EGG-POINT>>
+ <SETG EGG-POINT 0>
+ <TELL
+"The " D ,PRSO " vibrates, moving this way and that, becoming almost
+plastic, and finally moves to the open position." CR>)
+ (<FSET? ,EGG ,OPENBIT>
+ <TELL
+"The " D ,PRSO " moves, and a cunning and diabolically engineered set
+of gears, knives, grinders, and slicers moves across the interior of the
+egg." CR>
+ <COND (<IN? ,DAMAGED-SCROLL ,EGG>
+ <TELL
+"The scroll resting there is now shredded beyond recognition." CR>)>
+ <RTRUE>)
+ (ELSE
+ <TELL
+"The " D ,PRSO " moves to the open position, after some resistance and
+a few odd noises from some machinery which resides inside the egg." CR>
+ <COND (<AND <FSET? ,EGG-KNOB-1 ,OPENBIT>
+ <FSET? ,EGG-KNOB-2 ,OPENBIT>
+ <FSET? ,EGG-KNOB-3 ,OPENBIT>
+ <FSET? ,EGG-KNOB-4 ,OPENBIT>
+ <FSET? ,EGG-KNOB-5 ,OPENBIT>>
+ <SETG SCORE <+ ,SCORE ,EGG-POINT>>
+ <SETG EGG-POINT 0>
+ <FSET ,EGG ,OPENBIT>
+ <TELL "The egg falls open">
+ <COND (<IN? ,DAMAGED-SCROLL ,EGG>
+ <FCLEAR ,DAMAGED-SCROLL ,INVISIBLE>
+ <THIS-IS-IT ,DAMAGED-SCROLL>
+ <TELL
+", revealing a shredded scroll inside">)>
+ <TELL "." CR>)>
+ <RTRUE>)>)>)
+ (<VERB? TAKE>
+ <TELL
+"The " D ,PRSO " is an integral part of the egg and thus cannot be taken." CR>)
+ (<VERB? EXAMINE>
+ <EGG-KNOB-STATE ,PRSO T>
+ <CRLF>)
+ (<VERB? CLOSE>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <TELL
+"The " D ,PRSO " closes easily, but more noises issue from the interior." CR>
+ <FCLEAR ,PRSO ,OPENBIT>)
+ (ELSE
+ <TELL "It's already closed." CR>)>)
+ (<VERB? MUNG>
+ <PERFORM ,V?MUNG ,EGG>
+ <RTRUE>)>>
+
+<OBJECT SCRAMBLED-EGG
+ (DESC "scrambled egg")
+ (SYNONYM EGG)
+ (ADJECTIVE BROKEN SCRAMBLED)
+ (FLAGS TAKEBIT CONTBIT OPENBIT)
+ (ACTION SCRAMBLED-EGG-F)
+ (CAPACITY 10)>
+
+<ROUTINE SCRAMBLED-EGG-F ("AUX" (L <LOC ,SCRAMBLED-EGG>) F)
+ <COND (<VERB? KREBF>
+ <COND (<SET F <FIRST? ,SCRAMBLED-EGG>>
+ <MOVE .F ,EGG>)>
+ <THIS-IS-IT ,EGG>
+ <REMOVE ,SCRAMBLED-EGG>
+ <MOVE ,EGG .L>
+ <TELL
+"The egg is returned to its former pristine beauty!" CR>)>>
+
+<OBJECT DAMAGED-SCROLL
+ (IN EGG)
+ (DESC "shredded scroll")
+ (SYNONYM SCROLL)
+ (ADJECTIVE SHREDDED)
+ (TEXT
+"The scroll is damaged beyond readability. You can make out the word
+\"summon,\" in the title, but that's all.")
+ (ACTION DAMAGED-SCROLL-F)
+ (FLAGS TAKEBIT READBIT INVISIBLE)>
+
+<ROUTINE DAMAGED-SCROLL-F ("AUX" (L <LOC ,DAMAGED-SCROLL>))
+ <COND (<VERB? KREBF>
+ <REMOVE ,DAMAGED-SCROLL>
+ <MOVE ,SUMMON-SCROLL .L>
+ <THIS-IS-IT ,SUMMON-SCROLL>
+ <SETG SCORE <+ ,SCORE ,REPAIR-POINT>>
+ <SETG REPAIR-POINT 0>
+ <TELL
+"The scroll reforms, its slices and cuts rejoining, until there is a
+whole scroll, somewhat faded, in its place!" CR>)>> \ No newline at end of file
diff --git a/enchanter.zil b/enchanter.zil
new file mode 100644
index 0000000..73c1b2c
--- /dev/null
+++ b/enchanter.zil
@@ -0,0 +1,54 @@
+"ENCHANTER for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+<PRINC "
+ *** ENCHANTER: Interlogic Fantasy ***
+
+">
+
+<BLOAT 90000 0 0 3300 0 0 0 0 0 256>
+
+<SNAME "ENCHANTER">
+
+<SET REDEFINE T>
+
+<CONSTANT SERIAL 0>
+
+<OR <GASSIGNED? ZILCH>
+ <SETG WBREAKS <STRING !\" !,WBREAKS>>>
+
+<OR <GASSIGNED? INSERT-CRUFTY>
+ <DEFINE INSERT-CRUFTY (STR) <INSERT-FILE .STR T>>>
+
+<COND (<GASSIGNED? PREDGEN>
+ <ID 0>)>
+
+<INSERT-FILE "SYNTAX" T>
+
+<INSERT-FILE "MACROS" T>
+<INSERT-FILE "CLOCK" T>
+<INSERT-FILE "MAIN" T>
+<INSERT-FILE "PARSER" T>
+
+<INSERT-CRUFTY "CRUFTY">
+<INSERT-FILE "VERBS" T>
+<INSERT-FILE "GLOBALS" T>
+<INSERT-FILE "TERROR" T>
+<INSERT-FILE "STAIR" T>
+<INSERT-FILE "MAGIC" T>
+<INSERT-FILE "KNOT" T>
+<INSERT-FILE "PURLOINED" T>
+<INSERT-FILE "CASTLE" T>
+<INSERT-FILE "TEMPLE" T>
+<INSERT-FILE "GALLERY" T>
+<INSERT-FILE "EGG" T>
+<INSERT-FILE "SLEEP" T>
+<INSERT-FILE "GEARS" T>
+<INSERT-FILE "OUTSIDE" T>
+
+<PROPDEF SIZE 5>
+<PROPDEF CAPACITY 0>
+
+
diff --git a/enchanter.zip b/enchanter.zip
new file mode 100644
index 0000000..abe20b2
--- /dev/null
+++ b/enchanter.zip
Binary files differ
diff --git a/gallery.zil b/gallery.zil
new file mode 100644
index 0000000..38c390b
--- /dev/null
+++ b/gallery.zil
@@ -0,0 +1,225 @@
+"GALLERY for
+ ENCHANTER
+ Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+<ROOM GALLERY
+ (IN ROOMS)
+ (DESC "Gallery")
+ (WEST TO DIM-DESCENT)
+ (EAST TO SOUTH-GATE)
+ (FLAGS RLANDBIT ONBIT)
+ (ADVFCN GALLERY-A)
+ (ACTION GALLERY-F)>
+
+<GLOBAL PORTRAIT-COMMENT <>>
+
+<ROUTINE GALLERY-A ()
+ <COND (<AND <IN? ,ADVENTURER ,HERE>
+ <NOT ,PORTRAIT-COMMENT>
+ <NOT <FSET? ,FLATHEAD-PORTRAIT ,INVISIBLE>>
+ ,ADVENTURER-CHARMED>
+ <SETG PORTRAIT-COMMENT T>
+ <TELL
+"The adventurer stops and stares at the portraits. \"I've met him!\" he
+gasps, pointing at the Wizard of Frobozz. He doesn't appear eager to
+meet him again, though. \"And there's old Flathead! What a sight!\" He
+glances at the other portraits briefly and then re-checks his map." CR>)>>
+
+<ROUTINE GALLERY-F (RARG)
+ <COND (<AND <EQUAL? .RARG ,M-ENTER>
+ <NOT <LIT? ,HERE <>>>>
+ <COND (<AND ,SUPER-BRIEF
+ <NOT <ZERO? ,GALLERY-POINT>>>
+ <DESCRIBE-PORTRAIT-GALLERY>)>
+ <FCLEAR ,HERE ,TOUCHBIT>)
+ (<EQUAL? .RARG ,M-LOOK>
+ <COND (<LIT? ,HERE <>>
+ <COND (<NOT <ZERO? ,GALLERY-POINT>>
+ <REMOVE ,LIGHTED-PORTRAIT>)>
+ <SETG VISITED-GALLERY? T>
+ <TELL
+"The east-west corridor opens into a gallery. The walls are lined with
+portraits, some of apparently great value. All of the eyes seem to follow
+you as you pass, and the entire room is subtly disturbing." CR>
+ <COND (<IN? ,PORTRAIT-NICHE ,GALLERY>
+ <TELL
+"A small niche can be seen in the wall behind the spot where a painting
+had been hanging." CR>)>)
+ (<NOT <DESCRIBE-PORTRAIT-GALLERY>>
+ <TELL "It is pitch black." CR>)>)>>
+
+<ROUTINE DESCRIBE-PORTRAIT-GALLERY ()
+ <COND (<AND <IN? ,ETERNAL-FLAME ,PORTRAIT-NICHE>
+ <FSET? ,ETERNAL-FLAME ,ONBIT>>
+ <COND (<NOT <ZERO? ,GALLERY-POINT>>
+ <MOVE ,LIGHTED-PORTRAIT ,HERE>)>
+ <COND (,VISITED-GALLERY?
+ <TELL
+"An eerie orange glow casts a pale, flickering light on the portrait
+gallery.">)
+ (T
+ <SETG VISITED-GALLERY? T>
+ <TELL
+"The east-west corridor opens into a portrait gallery. The gallery is lit
+by an eerie orange glow.">)>
+ <TELL
+" The eyes of the figures portrayed on the canvases seem to be faintly
+illuminated and follow your every movement. After a moment, the source of
+light becomes clear: a single lighted portrait flickers as if a flame were
+burning behind it." CR>)>>
+
+<GLOBAL VISITED-GALLERY? <>>
+
+<OBJECT PORTRAITS
+ (IN GALLERY)
+ (DESC "portraits of unknown persons")
+ (SYNONYM PORTRAIT PERSON CANVAS PAINTING)
+ (ADJECTIVE UNKNOWN)
+ (FLAGS NDESCBIT TRYTAKEBIT)
+ (ACTION PORTRAITS-F)>
+
+<ROUTINE PORTRAITS-F ()
+ <COND (<VERB? TAKE MOVE>
+ <TELL
+"The portraits are large and extremely heavy; they can be neither taken
+nor moved." CR>)
+ (<VERB? LOOK-BEHIND LOOK-UNDER>
+ <TELL
+"There are hundreds of canvases here; you look behind one or two at random
+but find nothing of interest." CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"The portraits represent a wide cross-section of races. Elves, gnomes, dwarves,
+wizards, warlocks, and just plain folk are all here. Some of them are known
+to you, such as Lord Dimwit Flathead of the Great Underground Empire, depicted
+here in excessive detail, and the Wizard of Frobozz, shown in a typical pose
+of anguished bewilderment." CR>
+ <FCLEAR ,FLATHEAD-PORTRAIT ,INVISIBLE>
+ <FCLEAR ,FROBOZZ-PORTRAIT ,INVISIBLE>
+ <RTRUE>)>>
+
+<OBJECT FLATHEAD-PORTRAIT
+ (IN GALLERY)
+ (SYNONYM PORTRAIT)
+ (ADJECTIVE FLATHEAD DIMWIT)
+ (DESC "Flathead portrait")
+ (FLAGS NDESCBIT INVISIBLE VILLAIN)
+ (ACTION FLATHEAD-PORTRAIT-F)>
+
+<ROUTINE FLATHEAD-PORTRAIT-F ()
+ <COND (<VERB? ZIFMIA>
+ <TELL
+"Poor Flathead, the years have not been kind to him. Just as well, probably."
+CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"This rather dull man stumbled into royalty in the Great Underground Empire,
+and much to everyone's chagrin. Named by his people Lord Dimwit Flathead the
+Excessive, he was best known for his outrageousness in style, policy, and
+engineering. His portrait captures him in the classic pose of imbecility,
+astride his gaudy throne." CR>)>>
+
+<OBJECT FROBOZZ-PORTRAIT
+ (IN GALLERY)
+ (SYNONYM PORTRAIT)
+ (ADJECTIVE WIZARD FROBOZZ)
+ (DESC "Frobozz portrait")
+ (FLAGS NDESCBIT INVISIBLE VILLAIN)
+ (ACTION FROBOZZ-PORTRAIT-F)>
+
+<ROUTINE FROBOZZ-PORTRAIT-F ()
+ <COND (<VERB? ZIFMIA>
+ <TELL
+"The Wizard doesn't seem to respond to the summons. Perhaps he is too busy
+molesting adventurers in ZORK II." CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"The Wizard of Frobozz was a former member of the Circle of Enchanters, but
+he was removed for forgetfulness bordering on senility. The lively wit of his
+youth having been replaced by a semi-sadistic mischievousness coupled with
+an inability to pronounce words beginning with other than the letter \"F\",
+he was \"retired\" to a small, unoccupied corner of the Great Underground
+Empire, hopefully out of harm's way." CR>)>>
+
+<OBJECT LIGHTED-PORTRAIT
+ (DESC "lighted portrait")
+ (SYNONYM PORTRAIT CANVAS PAINTING)
+ (ADJECTIVE LIGHTED ILLUMINATED LIT)
+ (FLAGS NDESCBIT TAKEBIT)
+ (SIZE 60)
+ (ACTION LIGHTED-PORTRAIT-F)>
+
+<ROUTINE LIGHTED-PORTRAIT-F ()
+ <COND (<AND <VERB? LOOK-BEHIND> <NOT <FSET? ,PRSO ,TOUCHBIT>>>
+ <SETG SCORE <+ ,SCORE ,GALLERY-POINT>>
+ <SETG GALLERY-POINT 0>
+ <MOVE ,PORTRAIT-NICHE ,HERE>
+ <FSET ,PRSO ,TOUCHBIT>
+ <TELL
+"Behind the portrait is a small niche. You find that the portrait is much
+lighter than the others and place it on the ground.">
+ <FCLEAR ,HERE ,ONBIT> ;"Added to make room dark hereafter."
+ <COND (<FIRST? ,PORTRAIT-NICHE>
+ <TELL " Sitting in the niche is ">
+ <PRINT-CONTENTS ,PORTRAIT-NICHE>
+ <TELL ".">)>
+ <CRLF>)
+ (<VERB? EXAMINE>
+ <COND (<NOT <FSET? ,PRSO ,TOUCHBIT>>
+ <TELL
+"The portrait, of an obscure adventurer, is not notable except for the
+fact that it is lighted from behind by a flickering orange light." CR>)
+ (T
+ <TELL
+"The portrait, of some obscure personage carrying a brass lantern and
+an elvish sword of great antiquity, is mediocre at best." CR>)>)
+ (<AND <VERB? MOVE TAKE>
+ <NOT <FSET? ,PRSO ,TOUCHBIT>>>
+ <FCLEAR ,PRSO ,NDESCBIT>
+ <FSET ,PRSO ,TOUCHBIT>
+ <SETG SCORE <+ ,SCORE ,GALLERY-POINT>>
+ <SETG GALLERY-POINT 0>
+ <MOVE ,PORTRAIT-NICHE ,HERE>
+ <TELL
+"The portrait is quite light. You remove it from the wall and place it on
+the ground, revealing a small niche in the wall">
+ <COND (<FIRST? ,PORTRAIT-NICHE>
+ <TELL ", in which sits
+">
+ <PRINT-CONTENTS ,PORTRAIT-NICHE>)>
+ <TELL "." CR>)>>
+
+<OBJECT PORTRAIT-NICHE
+ (DESC "niche")
+ (SYNONYM NICHE)
+ (ADJECTIVE SMALL)
+ (CAPACITY 30)
+ (FLAGS CONTBIT OPENBIT NDESCBIT)
+ (ACTION PORTRAIT-NICHE-F)>
+
+<ROUTINE PORTRAIT-NICHE-F ()
+ <COND (<VERB? OPEN CLOSE>
+ <TELL "You can't do that." CR>)>>
+
+<OBJECT ETERNAL-FLAME
+ (IN PORTRAIT-NICHE)
+ (DESC "black candle")
+ (SYNONYM CANDLE FLAME)
+ (ADJECTIVE BLACK)
+ (FLAGS TAKEBIT LIGHTBIT ONBIT)
+ (ACTION ETERNAL-FLAME-F)>
+
+<ROUTINE ETERNAL-FLAME-F ()
+ <COND (<VERB? GONDAR KULCAD>
+ <TELL
+"The flame flickers for a moment, then goes out." CR>
+ <FCLEAR ,ETERNAL-FLAME ,ONBIT>
+ <FCLEAR ,ETERNAL-FLAME ,LIGHTBIT>
+ <RTRUE>)
+ (<AND <VERB? LAMP-ON>
+ <NOT <FSET? ,ETERNAL-FLAME ,ONBIT>>>
+ <TELL "You can't relight the candles." CR>)
+ (<VERB? LAMP-OFF>
+ <TELL
+"The flame cannot be extinguished, no matter how hard you try." CR>)>>
diff --git a/gears.zil b/gears.zil
new file mode 100644
index 0000000..063c124
--- /dev/null
+++ b/gears.zil
@@ -0,0 +1,648 @@
+"GEARS for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+;"The mills of the gods grind slowly, but they grind exceeding fine."
+
+<ROOM ENGINE-ROOM
+ (IN ROOMS)
+ (DESC "Engine Room")
+ (DOWN TO SE-TOWER)
+ (SE PER CROSS-ENGINE-ROOM)
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION ENGINE-ROOM-F)
+ (PSEUDO "HAMMER" HAMMER-F "SPEARS" HAMMER-F)
+ (GLOBAL MACHINERY VOICES)>
+
+<OBJECT MACHINERY
+ (IN LOCAL-GLOBALS)
+ (DESC "machinery")
+ (SYNONYM MACHINE)
+ (ACTION MACHINERY-F)>
+
+<ROUTINE MACHINERY-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The machinery is extremely noisy and complicated. Other than that, you
+can't imagine of what use it is to anybody." CR>)
+ (<VERB? AVOID>
+ <HAMMER-F>
+ <RTRUE>)
+ (<VERB? EXEX>
+ <TELL
+"The machinery may or may not have been sped up, the facts being hard to
+determine." CR>)>>
+
+<ROUTINE ENGINE-ROOM-F (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"The room is filled with noise: crashing and smashing, gurgling of water,
+grinding of gears, and horrible screeching of metal. Huge devices of obscure
+purpose provide these effects. The most notable is a huge hammer that smashes
+continually against the stone floor: it makes any crossing of the room a
+dangerous enterprise. The whole construction brings to mind the words
+\"Infernal Machine.\" Far off to the southeast is another room.">
+ <COND (<IN? ,DISPEL-SCROLL ,CLOSET>
+ <TELL "
+You can barely make out something on the floor of that room. It might be a
+scroll, but from here you can't tell for sure.">)>
+ <CRLF>
+ <COND (<IN? ,TURTLE ,CLOSET>
+ <TELL
+"Across the room you can see the rainbow turtle, who frequently looks your
+way." CR>)>
+ <RTRUE>)>>
+
+<ROUTINE HAMMER-F ()
+ <COND (<VERB? AVOID WALK-AROUND>
+ <TELL
+"It's hard to see how you'll avoid a painful experience." CR>)
+ (<VERB? EXEX>
+ <SETG HAMMER-EXEX T>
+ <TELL
+"The crashing of the hammer has become more frequent." CR>)>>
+
+<ROUTINE SE-TOWER-F ("OPTIONAL" (RARG <>))
+ <COND (<AND <==? .RARG ,M-BEG>
+ <VERB? WALK>>
+ <COND (<==? ,PRSO ,P?UP>
+ <ENABLE <QUEUE I-CRASH 2>>)
+ (ELSE <DISABLE <INT I-CRASH>>)>
+ <RFALSE>)>>
+
+<ROOM CLOSET
+ (IN ROOMS)
+ (DESC "Control Room")
+ (LDESC
+"This is the control room for all the machinery nearby. The controls are all
+magical, of course. The walls are covered by blinking lights and shifting
+displays, interspersed with arcane dials and glowing buttons. It's all very
+mysterious looking. The exit, to the northwest, leads into a room with
+machinery which would surely crush you if you were to attempt to enter it.")
+ (NW PER RECROSS-ENGINE-ROOM)
+ (FLAGS RLANDBIT ONBIT)
+ (PSEUDO "HAMMER" HAMMER-F "SPEARS" HAMMER-F)
+ (GLOBAL MACHINERY VOICES)>
+
+<OBJECT LIGHTS
+ (IN CLOSET)
+ (DESC "blinking display")
+ (SYNONYM LIGHT LIGHTS DISPLAY)
+ (ADJECTIVE BLINKING SHIFTING)
+ (FLAGS NDESCBIT)
+ (ACTION LIGHTS-F)>
+
+<ROUTINE LIGHTS-F ()
+ <COND (<VERB? READ EXAMINE>
+ <TELL
+"The lights and displays hold no meaning for you. A random number generator
+may be controlling the whole thing, for all you know." CR>)>>
+
+<OBJECT SWITCHES
+ (IN CLOSET)
+ (DESC "glowing control")
+ (SYNONYM DIAL CONTROL BUTTON DIALS)
+ (ADJECTIVE ARCANE GLOWING)
+ (FLAGS NDESCBIT)
+ (ACTION LIGHTS-F)>
+
+<GLOBAL FAST? <>>
+<GLOBAL CRASH? <>>
+<GLOBAL HAMMER-EXEX <>>
+
+<ROUTINE I-CRASH ()
+ <COND (<NOT <EQUAL? <LOC ,PLAYER> ,ENGINE-ROOM ,CLOSET ,SE-TOWER>>
+ <DISABLE <INT I-CRASH>>
+ <RFALSE>)>
+ <SETG CRASH? <NOT ,CRASH?>>
+ <COND (<OR ,CRASH? ,HAMMER-EXEX>
+ <TELL
+"\"Crash!\" A huge hammer smashes against the stone floor">
+ <COND (<IN? ,PLAYER ,CLOSET>
+ <TELL " outside">)>
+ <TELL "." CR>)>
+ <ENABLE <QUEUE I-CRASH <COND (<OR ,FAST? ,HAMMER-EXEX> 1) (ELSE 2)>>>>
+
+<ROUTINE CROSS-ENGINE-ROOM ()
+ <COND (<==? ,HASTED? ,WINNER>
+ <SETG FAST? T>
+ <COND (<==? ,WINNER ,TURTLE>
+ <TELL
+"As the turtle starts across, he seems to set off something, for the
+machinery speeds up and the noise level becomes almost unbearable. Luckily,
+he makes it to the other side safely!" CR>)
+ (ELSE
+ <TELL
+"You zip across the room easily, but you must have touched something
+dangerous along the way, because the machinery speeds up, going faster
+and faster." CR>)>
+ ,CLOSET)
+ (<==? ,WINNER ,TURTLE>
+ <DISABLE <INT I-TURTLE>>
+ <TELL
+"The poor turtle starts, but he's just too slow. About halfway across the
+room he is dispatched by the enormous hammer, leaving only a rainbow colored
+smudge on the floor.">
+ <COND (<==? ,DEATH-CHEATED ,TURTLE>
+ <SETG DEATH-CHEATED <>>
+ <TELL CR CR
+"But wait! Amazingly, the smudge reforms into a turtle again! The revived
+turtle just has time to turn his head in wonderment when the hammer smashes
+down again, remaking the rainbow smudge.">)>
+ <TELL
+" Even that disappears at the next blow of the hammer." CR>
+ <JIGS-UP <> <>> ;"can't survive this one"
+ <RFALSE>)
+ (<OR ,FAST? ,CRASH?>
+ <TELL
+"You start across the room, but less than halfway across, the huge hammer
+crashes down, right on top of you!" CR>
+ <COND (<==? ,DEATH-CHEATED ,ME>
+ <TELL
+"Startlingly, you revive from this fatal blow, but even more startlingly,
+the first thing you see is the same huge hammer descending upon you!" CR>)>
+ <JIGS-UP <> <>>
+ <RFALSE>)
+ (ELSE
+ <SETG FAST? T>
+ <TELL
+"You make it across the room, but just barely; just as you duck through the
+door, a huge hammer crashes down behind, missing by an inch. Something
+you stepped on along the way clicked as well, and with a horrible screeching
+noise, the machinery speeds up, crashing faster and faster until it's
+twice as fast as before." CR CR>
+ ,CLOSET)>>
+
+<ROUTINE RECROSS-ENGINE-ROOM ()
+ <COND (<EQUAL? ,WINNER ,TURTLE>
+ <COND (<==? ,HASTED? ,TURTLE>
+ <COND (<IN? ,DISPEL-SCROLL ,CLOSET>
+ <SETG TURTLE-REPORT? T>)>
+ <TELL
+"The turtle fairly zips across the engine room, dodging the giant
+hammers and gears. Suddenly he sets off a trap, and sharp spears fly
+at him from all directions! But they bounce harmlessly off his shell! He
+avoids one last crash of a huge hammer, but even at his speed, it's a
+near thing! With one more burst of speed, he reaches "
+<COND (<IN? ,PLAYER ,ENGINE-ROOM> "you")
+ (T "the other side")> " safely!" CR>
+ ,ENGINE-ROOM)
+ (ELSE
+ <DISABLE <INT I-TURTLE>>
+ <TELL
+"The turtle starts across the room, as hammers and gears slowly turn and
+crash. Partway across the room, he sets off a trap! Spears fly at him
+from all directions! They just bounce off his shell, and he is unhurt.
+Unfortunately, at about this time, a enormous hammer smashes down. This
+does not bounce off his shell, and the poor creature expires." CR>
+ <COND (<==? ,DEATH-CHEATED ,TURTLE>
+ <TELL
+"Astoundingly, the turtle renews himself! Unfortunately, he makes it
+no further, for the hammer is still too much for even his armor." CR>)>
+ <JIGS-UP <> <>>
+ <RFALSE>)>)
+ (ELSE
+ <COND (<IN? ,DISPEL-SCROLL ,WINNER>
+ <REMOVE ,DISPEL-SPELL>
+ <REMOVE ,DISPEL-SCROLL>)>
+ <COND (<==? ,HASTED? ,WINNER>
+ <TELL
+"You rush across the engine room, your speed enabling you to avoid the
+gigantic hammers and gears; at this speed they appear to move with great
+deliberation. Unfortunately, you set off a trap, and many sharp spears
+fly at you from all directions! They seem to move pretty fast. Too fast,
+in fact. You can't dodge them, and you are severely skewered.">)
+ (ELSE
+ <TELL
+"You run across the room, trying to dodge the crashing machinery, and
+you are succeeding for a while until you set off a trap. A volley of sharp
+spears, powered by cunning machinery, comes at you from all directions.
+You are skewered! The huge hammer crashes down for the coup de grace.">)>
+ <COND (<==? ,DEATH-CHEATED ,ME>
+ <TELL CR
+"In an astounding feat of magic, you are reassembled and revived.
+In an even more astounding feat of trap design, you are dispatched again
+almost before you can take a breath." CR>)>
+ <JIGS-UP <> <>>
+ <RFALSE>)>>
+
+<ROOM MEADOW
+ (IN ROOMS)
+ (DESC "Meadow")
+ (LDESC
+"This is a meadow near the sea. There is a smell of salt in the air. Only
+heather and thistles grow here. To the north is a gate leading into the
+castle. A narrow path to the southeast leads to the shore of the Sea.")
+ (SE TO BEACH)
+ (NORTH TO SOUTH-GATE IF RUSTY-GATE IS OPEN)
+ (SOUTH "There's no path there.")
+ (EAST "There's no path there.")
+ (WEST "There's no path there.")
+ (NE "There's no path there.")
+ (NW "There's no path there.")
+ (SW "There's no path there.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL RUSTY-GATE MEADOW-OBJ BEACH-OBJ SEA)>
+
+<OBJECT HEATHER
+ (IN MEADOW)
+ (DESC "local vegetation")
+ (SYNONYM HEATHER THISTLE)
+ (FLAGS NDESCBIT)
+ (ACTION SEA-STUFF-F)>
+
+<ROOM BEACH
+ (IN ROOMS)
+ (DESC "Beach")
+ (LDESC
+"This is a rocky beach along a grey and lifeless sea. There is
+dead seaweed covering many rocks, and listless waves barely stir
+the flotsam and jetsam here. There are many shells, but all are
+broken. A narrow path to the northwest leads into a meadow.")
+ (NW TO MEADOW)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL MEADOW-OBJ BEACH-OBJ SEA GLOBAL-WATER)
+ (PSEUDO "WAVES" WAVES-F "ROCKS" SEA-STUFF-F)>
+
+<ROUTINE WAVES-F ()
+ <COND (<VERB? SWIM THROUGH>
+ <TELL "Don't press your luck. You'd probably drown." CR>)>>
+
+<OBJECT SEA-STUFF
+ (IN BEACH)
+ (DESC "flotsam")
+ (SYNONYM SEAWEED FLOTSAM SHELLS JETSAM)
+ (ADJECTIVE DEAD BROKEN)
+ (FLAGS NDESCBIT)
+ (ACTION SEA-STUFF-F)>
+
+<ROUTINE SEA-STUFF-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL "There's nothing much interesting to see." CR>)
+ (<VERB? TAKE>
+ <TELL "Why bother?" CR>)>>
+
+<OBJECT TURTLE
+ (IN BEACH)
+ (DESC "rainbow turtle")
+ (FDESC
+"Crawling slowly along the beach is an enormous turtle, his enamelled shell
+shining with all the colors of the rainbow.")
+ (LDESC
+"An enormous turtle is here, its enamelled shell shining with all the colors of
+the rainbow.")
+ (SYNONYM TURTLE SHELL)
+ (ADJECTIVE RAINBOW ENAMELLED)
+ (FLAGS VICBIT VILLAIN CONTBIT OPENBIT)
+ (CAPACITY 6)
+ (ACTION TURTLE-F)>
+
+<OBJECT GLOBAL-TURTLE
+ (IN GLOBAL-OBJECTS)
+ (DESC "rainbow turtle")
+ (SYNONYM TURTLE)
+ (ADJECTIVE RAINBOW)
+ (FLAGS VICBIT VILLAIN TAKEBIT)
+ (ACTION TURTLE-F)>
+
+<ROUTINE NO-RESPONSE ()
+ <TELL
+"You hear no response." CR>>
+
+<ROUTINE TURTLE-F ("AUX" NEAR?)
+ <SET NEAR? <IN? ,TURTLE <LOC ,PLAYER>>>
+ <COND (<EQUAL? ,WINNER ,TURTLE>
+ <COND (,TURTLE-TIRED?
+ <COND (.NEAR?
+ <TELL
+"The turtle is asleep and appears oblivious to your words." CR>)
+ (ELSE
+ <NO-RESPONSE>)>
+ <RTRUE>)>
+ <ENABLE <QUEUE I-TURTLE -1>>
+ <FSET ,TURTLE ,TOUCHBIT>
+ <COND (<NOT <EQUAL? ,TALK-TO-ANIMAL? ,TURTLE>>
+ <TELL
+"The turtle looks at you quizzically. It's clear he would like to
+understand you, but he doesn't. He responds, but it's only snaps, hisses,
+and clicks to you." CR>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>)
+ (<VERB? WALK>
+ <SETG TURTLE-FOLLOWS <>>
+ <SETG TF-COUNT <+ ,TF-COUNT 1>>
+ <COND (<AND <IN? ,TURTLE ,INSIDE-GATE>
+ <EQUAL? ,PRSO ,P?WEST>>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <TELL
+"\"Uh, no thanks. I prefer to stay near my beach. I don't see much
+yummy seaweed out that way.\"" CR>)
+ (<AND <IN? ,TURTLE ,DIM-DESCENT>
+ <EQUAL? ,PRSO ,P?DOWN ,P?SOUTH>>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <TELL
+"\"Uh, no thanks. It looks dark and scary down there, and I get a kind
+of bad feeling about it, like you get when you eat old seaweed.\"" CR>)
+ (<AND <EQUAL? ,PRSO ,P?UP>
+ <GLOBAL-IN? ,STAIRS <LOC ,TURTLE>>>
+ <COND (.NEAR?
+ <TELL
+"The turtle huffs and puffs up the stairs. \"Pretty steep stairs
+for a turtle, friend....\"" CR>)>
+ <RFALSE>)
+ (<AND <EQUAL? ,PRSO ,P?DOWN>
+ <GLOBAL-IN? ,STAIRS <LOC ,TURTLE>>>
+ <COND (.NEAR?
+ <TELL
+"\"Those stairs are pretty steep. I'll follow you down, but I'm not
+going alone!\"" CR>)>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>)
+ (<AND <G? ,TF-COUNT 4>
+ <0? <MOD ,TF-COUNT 6>>>
+ <TURTLE-TIRES>
+ <RFALSE>)>)
+ (<VERB? WHO>
+ <COND (.NEAR?
+ <TELL "\"Never heard of him.\"" CR>)
+ (ELSE <NO-RESPONSE>)>)
+ (<VERB? THANK>
+ <TURTLE-THANKS .NEAR?>)
+ (<AND <VERB? STAY>
+ <EQUAL? ,PRSO ,GLOBAL-ROOM <>>>
+ <SETG TURTLE-FOLLOWS <>>
+ <COND (.NEAR?
+ <TELL
+"The turtle hisses, \"Okay, I'll stay here for a while.\"" CR>)
+ (ELSE
+ <NO-RESPONSE>)>)
+ (<VERB? FOLLOW>
+ <COND (<EQUAL? ,PRSO ,ME <>>
+ <SETG TURTLE-FOLLOWS T>
+ <SETG TF-COUNT 0>
+ <SETG TURTLE-TIRED-TELL <>>
+ <COND (.NEAR?
+ <TELL
+"The turtle hisses, \"I will follow you.\"" CR>)
+ (ELSE <NO-RESPONSE>)>)
+ (.NEAR?
+ <TELL
+"The turtle hisses, \"I'd follow you, but not that!\"" CR>)
+ (ELSE <NO-RESPONSE>)>)
+ (<AND <VERB? TAKE BRING>
+ <NOT <IN? ,TURTLE <LOC ,PLAYER>>>>
+ <COND (<VERB? BRING>
+ <SETG PRSO ,PRSI>
+ <SETG PRSI <>>)>
+ <ITAKE <>>
+ <COND (<VERB? BRING>
+ <DO-WALK <COND (<EQUAL? ,HERE ,CLOSET> ,P?NW)
+ (T ,P?SE)>>
+ <RTRUE>)>
+ <COND (<AND <EQUAL? ,HERE ,CLOSET>
+ <IN? ,PLAYER ,ENGINE-ROOM>>
+ <TELL
+"The turtle sticks his head through the door across the mechanical
+wasteland.">
+ <COND (<IN? ,DISPEL-SCROLL ,TURTLE>
+ <TELL
+" In his mouth is a scroll of some sort.">)>
+ <CRLF>)>
+ <RTRUE>)
+ (<VERB? TAKE>
+ <COND (<NOT <FSET? ,PRSO ,SCROLLBIT>>
+ <COND (.NEAR?
+ <TELL
+"\"I don't think I can carry that too easily.\"" CR>)
+ (ELSE <NO-RESPONSE>)>)
+ (T <RFALSE>)>)
+ (<AND <VERB? OPEN> <FSET? ,PRSO ,DOORBIT>>
+ <COND (.NEAR?
+ <TELL
+"\"I can't reach the latch. I'm a turtle, not an ostrich.\"" CR>)
+ (ELSE <NO-RESPONSE>)>)
+ (<VERB? HELLO>
+ <COND (.NEAR?
+ <TELL "\"" <PICK-ONE ,TURTLE-REMARKS> "\"" CR>)
+ (ELSE <NO-RESPONSE>)>)
+ (<OR <IN? ,TURTLE <LOC ,PLAYER>>
+ <IN? ,TURTLE <LOC <LOC ,PLAYER>>>>
+ <TELL
+"\"I'm only a turtle, you know, even if I can talk!\"" CR>)
+ (ELSE
+ <NO-RESPONSE>
+ <RTRUE>)>)
+ (<AND <VERB? TELL>
+ <EQUAL? ,PRSO ,GLOBAL-TURTLE>>
+ <COND (,TURTLE-TIRED?
+ <TELL "The turtle remains asleep." CR>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RFATAL>)
+ (<OPPOSITE-SIDES?>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <TELL
+"The turtle seems to bend its head as if to listen, but with all this
+noise it's not very likely that he hears you." CR>)
+ (T
+ <SETG P-MERGED T>
+ <GLOBAL-NOT-HERE-PRINT ,GLOBAL-TURTLE>
+ <RTRUE>)>)
+ (<AND <EQUAL? ,PRSO ,GLOBAL-TURTLE>
+ <VERB? WAVE-AT YELL>
+ <OPPOSITE-SIDES?>>
+ <TELL "The turtle takes notice, ">
+ <COND (<EQUAL? ,HERE ,CLOSET>
+ <TELL
+"then glances at the rapidly pounding hammer. With a motion which
+might correspond to a shrug of the shoulder, he turns away, embarrassed." CR>
+ <RTRUE>)
+ (T
+ <TELL
+"nods his head, and starts in your direction." CR>)>
+ <SETG WINNER ,TURTLE>
+ <SETG HERE <LOC ,TURTLE>>
+ <DO-WALK <COND (<EQUAL? ,HERE ,CLOSET> ,P?NW)
+ (T ,P?SE)>>
+ <RTRUE>)
+ (<AND <EQUAL? ,PRSO ,GLOBAL-TURTLE>
+ <VERB? EXAMINE>
+ <OPPOSITE-SIDES?>>
+ <TELL "He is standing on the other side of the machinery." CR>)
+ (<EQUAL? ,PRSO ,GLOBAL-TURTLE>
+ <GLOBAL-NOT-HERE-PRINT ,GLOBAL-TURTLE>
+ <RTRUE>)
+ (<VERB? CLIMB-UP CLIMB-FOO THROUGH>
+ <TELL
+"The turtle doesn't allow you to get on his back." CR>)
+ (<VERB? RUB>
+ <TELL
+"The turtle seems to appreciate the attention." CR>)
+ (<VERB? CLEESH>
+ <TELL
+"As he is already a reptile, the spell has little effect." CR>)
+ (<VERB? OPEN CLOSE>
+ <TELL "Come now, you can't do that!" CR>)
+ (<VERB? REZROV>
+ <TELL
+"The turtle's shell pops off his back. Mortified, he retrieves it." CR>)
+ (<VERB? GUNCHO>
+ <COND (,TURTLE-TIRED?
+ <TELL
+"The sleeping turtle seems to shrink to nothing, and vanishes!" CR>)
+ (T
+ <TELL
+"The turtle barely has time to retract his head before he is consumed in
+flame!" CR>)>
+ <REMOVE ,TURTLE>)
+ (<VERB? VAXUM>
+ <COND (,TURTLE-TIRED?
+ <TELL "The snoring sounds more friendly." CR>)
+ (T
+ <TELL
+"The turtle seems to make a friendly gesture, but then again turtles are
+pretty friendly anyway." CR>)>)
+ (<VERB? MUNG>
+ <TELL
+"The turtle's shell is so thick and hard that your blow has no effect.
+The lovely colors on his back are not even marred.">
+ <COND (,TURTLE-TIRED?
+ <TELL " He doesn't even wake up." CR>)
+ (T
+ <TELL " He does withdraw into his
+shell briefly, but then emerges again." CR>)>)
+ (,TURTLE-TIRED?
+ <TELL "The turtle remains asleep." CR>
+ <SETG P-CONT <>>
+ <RFATAL>)
+ (<AND <VERB? THANK> <EQUAL? ,TALK-TO-ANIMAL? ,TURTLE>>
+ <TURTLE-THANKS T>)
+ (<AND <VERB? TAKE> <EQUAL? ,TURTLE ,PRSO>>
+ <TELL
+"The turtle is much too large to take." CR>)
+ (<VERB? GIVE>
+ <TELL
+"The turtle extends his head towards the " D ,PRSO ", but decides it's
+not very interesting, and withdraws." CR>)
+ (<VERB? HELLO>
+ <TELL "\"" <PICK-ONE ,TURTLE-REMARKS> "\"" CR>)>>
+
+<ROUTINE TURTLE-THANKS (NEAR?)
+ <COND (<==? ,TURTLE-POINT 0>
+ <MOVE ,TURTLE ,BEACH>
+ <COND (.NEAR?
+ <TELL
+"\"Glad to be of help. I think I'll get back to the beach, now.\"
+The turtle departs." CR>)
+ (ELSE
+ <TELL
+"There is no response." CR>)>)
+ (.NEAR?
+ <TELL
+"\"You're very welcome! It's nice to have someone to talk to for
+a change.\"" CR>)
+ (ELSE <NO-RESPONSE>)>
+ <RTRUE>>
+
+<ROUTINE OPPOSITE-SIDES? ()
+ <COND (<AND <EQUAL? ,HERE ,ENGINE-ROOM ,CLOSET>
+ <EQUAL? <LOC ,TURTLE> ,ENGINE-ROOM ,CLOSET>
+ <NOT <EQUAL? ,HERE <LOC ,TURTLE>>>>
+ <RTRUE>)>>
+
+<GLOBAL TURTLE-FOLLOWS <>>
+<GLOBAL TF-COUNT 0>
+
+<GLOBAL TURTLE-REMARKS
+ <LTABLE 0
+"Are you a magician? Are you going to do something about that annoying
+Warlock, then?"
+"How do you like my shell? A wizard did that to me about 75 years ago."
+"It's nice to find a human who talks turtle. Not many do, you know. Most
+people think turtles are boring, just because we talk slowly.">>
+
+<GLOBAL TURTLE-REPORT? <>>
+
+<ROUTINE I-TURTLE ("AUX" (LP <LOC ,PLAYER>))
+ <FSET ,TURTLE ,TOUCHBIT>
+ <COND (<AND ,TURTLE-FOLLOWS <NOT <IN? ,TURTLE .LP>>>
+ <SETG TF-COUNT <+ ,TF-COUNT 1>>
+ <COND (<EQUAL? .LP ,WEST-CASTLE ,DUNGEON ,BED>
+ <SETG TURTLE-FOLLOWS <>>
+ <TELL
+"The turtle won't follow any further." CR>)
+ (<OR <AND <EQUAL? .LP ,CLOSET>
+ <IN? ,TURTLE ,ENGINE-ROOM>>
+ <AND <EQUAL? .LP ,ENGINE-ROOM>
+ <IN? ,TURTLE ,CLOSET>>>
+ <SETG TURTLE-FOLLOWS <>>
+ <TELL
+"The turtle seems hesitant to follow you across the room. He looks at
+you as if he wants an explicit order." CR>)
+ (ELSE
+ <MOVE ,TURTLE .LP>
+ <COND (<EQUAL? .LP ,ENDLESS-STAIR>
+ <TELL
+"You notice that the turtle is no longer following you. In fact, he seems
+to have vanished entirely." CR>
+ <REMOVE ,TURTLE>
+ <QUEUE I-TURTLE 0>
+ <SETG TURTLE-FOLLOWS <>>
+ <RTRUE>)
+ (<EQUAL? .LP ,ENGINE-ROOM>
+ <TELL
+"\"Pretty steep stairs for a turtle, friend. But if you say so...\"" CR>)
+ (<EQUAL? ,HASTED? ,TURTLE>
+ <TELL
+"The turtle, moving with terrific speed, follows you." CR>)
+ (<G? ,TF-COUNT 4>
+ <TURTLE-TIRES>)
+ (T
+ <TELL
+"The turtle, at his own leisurely pace, follows you." CR>)>)>)
+ (<AND ,TURTLE-REPORT?
+ <IN? ,PLAYER <LOC ,TURTLE>>>
+ <SETG TURTLE-REPORT? <>>
+ <TELL
+"The returned turtle reports that the door across the way opens into a room
+with much magic in it: bright lights and other things he doesn't understand
+too well. He says there is an object of rolled paper lying on the floor as
+well." CR>)
+ (<AND <IN? ,DISPEL-SCROLL ,TURTLE>
+ <IN? ,TURTLE .LP>
+ <NOT <EQUAL? ,HERE ,CLOSET>>>
+ <MOVE ,DISPEL-SCROLL .LP>
+ <THIS-IS-IT ,DISPEL-SCROLL>
+ <SETG SCORE <+ ,SCORE ,TURTLE-POINT>>
+ <SETG TURTLE-POINT 0>
+ <TELL
+"The turtle drops a brittle scroll at your feet. \"Not bad, huh?\"" CR>)>>
+
+<GLOBAL TURTLE-TIRED? <>>
+
+<ROUTINE TURTLE-TIRES ()
+ <COND (<NOT ,TURTLE-FOLLOWS> <RFALSE>)>
+ <COND (<G? ,TF-COUNT 20>
+ <SETG TURTLE-TIRED? T>
+ <SETG TURTLE-FOLLOWS <>>
+ <DISABLE <INT I-TURTLE>>
+ <TELL
+"The turtle has closed his shell, and fallen asleep. A quiet snoring
+sound issues from somewhere within." CR>)
+ (<NOT ,TURTLE-TIRED-TELL>
+ <SETG TURTLE-TIRED-TELL T>
+ <TELL
+"\"How long do you expect me to follow you around, anyway? I'm getting
+kind of tired, too. You would if you had a shell as heavy as mine. It's
+all right for now, though.\"" CR>)
+ (T
+ <TELL
+"The turtle, at his own leisurely pace, follows you." CR>)>>
+
+<GLOBAL TURTLE-TIRED-TELL <>>
diff --git a/globals.zil b/globals.zil
new file mode 100644
index 0000000..480136d
--- /dev/null
+++ b/globals.zil
@@ -0,0 +1,622 @@
+"GLOBALS for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+<DIRECTIONS ;"Do not change the order of the first eight
+ without consulting MARC!"
+ NORTH NE EAST SE SOUTH SW WEST NW UP DOWN IN OUT>
+
+"SUBTITLE GLOBAL OBJECTS"
+
+<OBJECT GLOBAL-OBJECTS
+ (FLAGS RMUNGBIT INVISIBLE TOUCHBIT SURFACEBIT TRYTAKEBIT
+ OPENBIT SEARCHBIT TRANSBIT ;WEARBIT VOWELBIT
+ ONBIT RLANDBIT)>
+
+<OBJECT LOCAL-GLOBALS
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM ZZMGCK)
+ (DESCFCN 0)
+ (GLOBAL GLOBAL-OBJECTS)
+ (ADVFCN 0)
+ (FDESC "F")
+ (LDESC "F")
+ (PSEUDO "FOOBAR" V-WALK)
+ (CONTFCN 0)
+ (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)
+ (DESC "number")>
+
+<OBJECT PSEUDO-OBJECT
+ (DESC "pseudo")
+ (ACTION CRETIN)>
+
+<OBJECT IT ;"was IT"
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM IT THAT HER HIM)
+ (DESC "random object")
+ (FLAGS NDESCBIT TOUCHBIT)>
+
+<OBJECT GROUND ;"was GROUND"
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM FLOOR GROUND)
+ (ADJECTIVE STONE)
+ (DESC "floor")
+ (ACTION GROUND-F)>
+
+<ROUTINE GROUND-F ()
+ <COND (<VERB? CLIMB-UP CLIMB-ON CLIMB-FOO BOARD>
+ <TELL "You've got better things to do." CR>)>>
+
+<OBJECT CORRIDOR
+ (IN GLOBAL-OBJECTS)
+ (DESC "passage")
+ (SYNONYM PASSAGE CORRIDOR ENTRANCE)
+ (ACTION CORRIDOR-F)>
+
+<ROUTINE CORRIDOR-F ()
+ <COND (<VERB? THROUGH WALK-TO>
+ <USE-DIRECTIONS>)>>
+
+<OBJECT WALLS
+ (IN GLOBAL-OBJECTS)
+ (FLAGS NDESCBIT TOUCHBIT)
+ (DESC "castle wall")
+ (SYNONYM WALL WALLS CASTLE)
+ (ADJECTIVE TRANSLUCENT)
+ (ACTION WALLS-F)>
+
+<ROUTINE WALLS-F ()
+ <COND (<AND <EQUAL? ,WALLS ,PRSO>
+ <EQUAL? ,HERE ,NORTH-CELL>>
+ <PERFORM ,PRSA ,STONE-WALL>)
+ (<FSET? ,HERE ,RMUNGBIT>
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The wall is stained and noisome." CR>)
+ (<VERB? LISTEN>
+ <TELL
+"That's noisome, not noisy!" CR>)>)
+ (<VERB? LOOK-INSIDE>
+ <TELL
+"They're translucent, not transparent!" CR>)>>
+
+<OBJECT CEILING
+ (IN GLOBAL-OBJECTS)
+ (FLAGS NDESCBIT TOUCHBIT)
+ (DESC "ceiling")
+ (SYNONYM CEILIN)>
+
+<OBJECT HANDS ;"was HANDS"
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM HAND HANDS)
+ (ADJECTIVE BARE)
+ (DESC "bare hands of a novice enchanter")
+ (FLAGS NDESCBIT TOOLBIT TOUCHBIT)>
+
+<OBJECT PLAYER ;"was ADVENTURER"
+ (SYNONYM ENCHANTER)
+ (DESC "cretin")
+ (FLAGS VILLAIN NDESCBIT INVISIBLE)
+ (ACTION 0)>
+
+<OBJECT ME
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM ME MYSELF SELF FACE)
+ (DESC "you")
+ (FLAGS VILLAIN TOUCHBIT)
+ (ACTION CRETIN)>
+
+<ROUTINE CRETIN ()
+ <COND (<VERB? ESCAPE>
+ <TELL "There's no escaping yourself." CR>)
+ (<AND <VERB? PUT> <EQUAL? ,PRSO ,EGG>>
+ <TELL
+"If you don't succeed, there will be plenty of egg on your face." CR>)
+ (<VERB? BURN>
+ <TELL "Ouch!" CR>)
+ (<VERB? LISTEN>
+ <TELL "Yes?" CR>)
+ (<VERB? ALARM>
+ <TELL "You are obviously awake already." CR>)
+ (<VERB? GUNCHO>
+ <TELL
+"You vanish into oblivion where, to the relief of much of the Circle, you
+will be unable to do much harm." CR>
+ <FINISH>)
+ (<VERB? FROTZ>
+ <FSET ,PLAYER ,ONBIT>
+ <SETG ALWAYS-LIT T>
+ <TELL
+"You are bathed in a sickly yellow light, bright enough to read by." CR>)
+ (<VERB? BLORB>
+ <JIGS-UP
+"You experience the most peculiar sensation of being simultaneously shrunken
+and sucked into what might best be likened to a black hole. The effect is not
+without its exhilarating aspect; as a way of life, however, it leaves much to
+be desired." <>>
+ <RTRUE>)
+ (<VERB? KULCAD>
+ <TELL
+"You seem real enough already." CR>)
+ (<VERB? EXAMINE>
+ <TELL "You are not a pretty sight." CR>)
+ (<VERB? GIVE>
+ <TELL "I think you're a little confused." CR>)
+ (<VERB? KILL MUNG ATTACK>
+ <TELL "You don't need my help to do that!" CR>)
+ (<VERB? FIND>
+ <TELL "You're right here!" CR>)
+ (<AND <VERB? CUT> <==? ,PRSI ,MAGIC-KNIFE>>
+ <TELL
+"I should think one experience with that knife would be enough. I wouldn't
+press my luck." CR>)>>
+
+;"GLOBAL VARIABLES"
+
+<GLOBAL HERE <>>
+
+<GLOBAL LOAD-ALLOWED 100>
+
+<GLOBAL LOAD-MAX 100>
+
+<GLOBAL MOVES 0>
+
+<GLOBAL SCORE 0>
+
+<OBJECT WINDOW
+ (IN LOCAL-GLOBALS)
+ (DESC "window")
+ (SYNONYM WINDOW)
+ (ADJECTIVE BROKEN)
+ (ACTION WINDOW-F)>
+
+<ROUTINE WINDOW-F ()
+ <COND (<VERB? LOOK-INSIDE>
+ <COND (<G? ,TOD ,NIGHTFALL>
+ <TELL "It's too dark to make out much of anything." CR>)
+ (T <TELL <GETP ,HERE ,P?TEXT> CR>)>)
+ (<VERB? OPEN>
+ <TELL "You can't open it." CR>)
+ (<VERB? CLOSE>
+ <TELL "It already is." CR>)>>
+
+<OBJECT SEA
+ (IN LOCAL-GLOBALS)
+ (DESC "sea")
+ (SYNONYM OCEAN SEA)
+ (ADJECTIVE MISTY)
+ (ACTION SEA-F)>
+
+<ROUTINE SEA-F ()
+ <COND (<NOT <EQUAL? ,HERE ,BEACH>>
+ <TELL
+"The sea is off beyond the beach." CR>)
+ (<VERB? THROUGH>
+ <TELL "You would drown." CR>)
+ (<VERB? EXAMINE>
+ <TELL "The sea is very rough. I wouldn't go in." CR>)>>
+
+<OBJECT FOREST
+ (IN LOCAL-GLOBALS)
+ (DESC "forest")
+ (SYNONYM FOREST)
+ (ACTION FOREST-F)>
+
+<ROUTINE FOREST-F ()
+ <COND (<VERB? THROUGH>
+ <USE-DIRECTIONS>)>>
+
+<OBJECT TEMPLE-OBJ
+ (IN LOCAL-GLOBALS)
+ (DESC "temple")
+ (SYNONYM TEMPLE)
+ (ACTION TEMPLE-OBJ-F)>
+
+<ROUTINE TEMPLE-OBJ-F ()
+ <COND (<OR <EQUAL? ,HERE ,COURTYARD-2 ,COURTYARD-3>
+ <EQUAL? ,HERE ,COURTYARD-4 ,COURTYARD-7>>
+ <COND (<VERB? THROUGH>
+ <GOTO ,TEMPLE>
+ <RTRUE>)
+ (<VERB? LISTEN>
+ <TELL
+"You can hear a howling chant coming from inside the temple." CR>)>)>>
+
+<OBJECT COURTYARD
+ (IN LOCAL-GLOBALS)
+ (DESC "courtyard")
+ (SYNONYM COURTYARD LAWN LAWNS GRASS)
+ (ACTION COURTYARD-F)>
+
+<ROUTINE COURTYARD-F ()
+ <COND (<AND <VERB? WALK-AROUND> <NOT <EQUAL? ,HERE ,INSIDE-GATE>>>
+ <COND (<EQUAL? ,HERE ,COURTYARD-7 ,COURTYARD-6 ,COURTYARD-4>
+ <DO-WALK ,P?WEST>)
+ (T <DO-WALK ,P?EAST>)>)
+ (<AND <VERB? THROUGH>
+ <EQUAL? ,HERE ,INSIDE-GATE>>
+ <DO-WALK ,P?EAST>)>>
+
+<OBJECT TOWER
+ (IN LOCAL-GLOBALS)
+ (DESC "tower")
+ (SYNONYM TOWER)
+ (FLAGS CLIMBBIT)
+ (ACTION TOWER-F)>
+
+<ROUTINE TOWER-F ()
+ <COND (<AND <VERB? CLIMB-UP CLIMB-FOO BOARD>
+ <OR <EQUAL? ,HERE ,PURLOINED-ROOM ,SE-TOWER>
+ <EQUAL? ,HERE ,NW-TOWER ,SW-TOWER>>>
+ <DO-WALK ,P?UP>)
+ (<AND <VERB? CLIMB-DOWN CLIMB-FOO>
+ <OR <EQUAL? ,HERE ,JEWEL-ROOM ,MAP-ROOM>
+ <EQUAL? ,HERE ,ENGINE-ROOM ,BEDROOM>>>
+ <DO-WALK ,P?DOWN>)
+ (<VERB? CLIMB-UP CLIMB-FOO>
+ <TELL
+"They are a bit far away to climb from here, and anyway the walls would
+be impossible to scale." CR>)>>
+
+<OBJECT TURRET
+ (IN LOCAL-GLOBALS)
+ (DESC "turret")
+ (SYNONYM TURRET)>
+
+<OBJECT LAWN
+ (IN LOCAL-GLOBALS)
+ (DESC "lawn")
+ (SYNONYM LAWN)>
+
+<OBJECT MEADOW-OBJ
+ (IN LOCAL-GLOBALS)
+ (DESC "meadow")
+ (SYNONYM MEADOW)>
+
+<OBJECT BEACH-OBJ
+ (IN LOCAL-GLOBALS)
+ (DESC "beach")
+ (SYNONYM BEACH)
+ (ADJECTIVE WHITE ROCKY)>
+
+<OBJECT GLOBAL-WATER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM WATER BROOK ;OCEAN POND)
+ (ADJECTIVE DELICIOUS SPRING)
+ (DESC "water")
+ (ACTION WATER-FUNCTION)>
+
+<OBJECT WATER
+ (SYNONYM WATER QUANTITY)
+ (ADJECTIVE DELICIOUS SPRING)
+ (DESC "quantity of water")
+ (FLAGS TAKEBIT)
+ (ACTION WATER-FUNCTION)
+ (SIZE 4)>
+
+<OBJECT JUG
+ (IN SHACK)
+ (SYNONYM JUG)
+ (ADJECTIVE POTTERY)
+ (DESC "jug")
+ (FLAGS TAKEBIT TRANSBIT CONTBIT OPENBIT)
+ (ACTION JUG-F)
+ (FDESC
+"An empty jug lies in a corner of the room, against the overturned table.")
+ (CAPACITY 4)>
+
+<ROUTINE JUG-F ("AUX" (E? <>))
+ <COND (<VERB? OPEN CLOSE>
+ <TELL
+"The jug has no cover. It can't be opened or closed." CR>
+ <RTRUE>)
+ (<VERB? THROW MUNG>
+ <REMOVE ,PRSO>
+ <SET E? T>
+ <TELL "The jug shatters into innumerable pieces." CR>)
+ (<VERB? SHAKE>
+ <COND (<FSET? ,PRSO ,OPENBIT> <SET E? T>)>)>
+ <COND (<VERB? EXAMINE LOOK-INSIDE>
+ <TELL "The jug is ">
+ <COND (<NOT <IN? ,WATER ,PRSO>>
+ <TELL "empty." CR>)
+ (T
+ <TELL <GET ,JUG-AMTS <GETP ,WATER ,P?SIZE>> CR>)>)
+ (.E?
+ <COND (<IN? ,WATER ,PRSO>
+ <TELL
+"The water spills to the ground and evaporates." CR>
+ <REMOVE ,WATER>)>
+ <RTRUE>)>>
+
+<GLOBAL JUG-AMTS <TABLE
+"foo"
+"mostly empty."
+"half full."
+"nearly full."
+"full.">>
+
+<ROUTINE WATER-FUNCTION ("AUX" AV W PI?)
+ #DECL ((AV) <OR OBJECT FALSE> (W) OBJECT (PI?) <OR ATOM FALSE>)
+ <COND (<AND <VERB? EXAMINE> <EQUAL? ,PRSO ,GLOBAL-WATER>>
+ <COND (<EQUAL? ,HERE ,BEACH>
+ <TELL
+"The ocean streches out as far as the eye can see to the south and
+east." CR>)
+ (<EQUAL? ,HERE ,FOREST-2>
+ <TELL
+"The water is dark and murky, and lily pads cover most of the surface.
+I wouldn't drink the stuff." CR>)
+ (T
+ <TELL
+"The brook runs slowly through thick vegetation." CR>)>
+ <RTRUE>)
+ (<AND <VERB? THROUGH> <EQUAL? ,PRSO ,GLOBAL-WATER>>
+ <TELL
+"You have better things to do with your time than go swimming." CR>
+ <RTRUE>)
+ (<AND <VERB? DRINK-FROM> <EQUAL? ,PRSO ,GLOBAL-WATER>>
+ <V-DRINK-FROM>
+ <RTRUE>)
+ (<VERB? SGIVE> <RFALSE>)
+ (<VERB? THROUGH>
+ <TELL "Swimming here is fraught with peril." CR>
+ <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? <>>)
+ (ELSE
+ <SET W ,PRSI>
+ <SET PI? T>)>
+ <COND (<==? .W ,GLOBAL-WATER>
+ <COND (<VERB? DRINK> <RFALSE>)>
+ <SET W ,WATER>
+ <COND (<VERB? TAKE PUT> <REMOVE .W>)>)>
+ <COND (.PI? <SETG PRSI .W>)
+ (T <SETG PRSO .W>)>
+ <SET AV <LOC ,WINNER>>
+ <COND (<AND <VERB? TAKE PUT> <NOT .PI?>>
+ <COND (<AND ,PRSI <NOT <==? ,PRSI ,JUG>>>
+ <COND (<EQUAL? ,PRSI ,SEA ,GLOBAL-WATER>
+ <TELL
+"Ok, but there was plenty enough there already." CR>
+ <REMOVE .W>)
+ (<GETP ,PRSI ,P?CAPACITY>
+ <TELL
+"The water leaks out of the " D ,PRSI " and evaporates immediately." CR>
+ <REMOVE .W>)
+ (T
+ <TELL
+"The " D ,PRSI " isn't a very good container." CR>)>)
+ (<IN? ,JUG ,WINNER>
+ <COND (<NOT <FSET? ,JUG ,OPENBIT>>
+ <TELL "The jug is closed." CR>)
+ (<GLOBAL-IN? ,GLOBAL-WATER ,HERE>
+ <COND (<OR <NOT <IN? ,WATER ,JUG>>
+ <L? <GETP ,WATER ,P?SIZE> 4>>
+ <MOVE ,WATER ,JUG>
+ <PUTP ,WATER ,P?SIZE 4>
+ <TELL "The jug is now full of ">
+ <COND (<EQUAL? ,HERE ,BEACH>
+ <FSET ,WATER ,RMUNGBIT>
+ <TELL "sea">)
+ (<EQUAL? ,HERE ,FOREST-2>
+ <FSET ,WATER ,RMUNGBIT>
+ <TELL "foul algae-infested ">)
+ (T
+ <FCLEAR ,WATER ,RMUNGBIT>)>
+ <TELL "water." CR>)
+ (ELSE
+ <TELL "The jug is already full." CR>
+ <RTRUE>)>)
+ (T
+ <TELL "The only water here is in the jug." CR>)>)
+ (<AND <IN? ,PRSO ,JUG>
+ <VERB? TAKE>
+ <NOT ,PRSI>>
+ <SETG PRSO ,JUG>
+ <ITAKE>
+ <SETG PRSO .W>)
+ (T
+ <TELL "The water slips through your fingers." CR>)>)
+ (.PI? <TELL "Nice try." CR>)
+ (<VERB? DROP GIVE>
+ <REMOVE ,WATER>
+ <COND (<EQUAL? ,PRSI ,SEA ,GLOBAL-WATER>
+ <TELL
+"Ok, but there was plenty enough there already." CR>)
+ (T
+ <TELL
+"The water spills to the ground and evaporates." CR>)>)
+ (<VERB? POUR-ON>
+ <REMOVE ,WATER>
+ <TELL
+"The water cascades off the " D ,PRSI " and onto the ground." CR>)
+ (<VERB? THROW>
+ <TELL
+"The water splashes over everything and evaporates." CR>
+ <REMOVE ,WATER>)>>
+
+<OBJECT SKY
+ (IN GLOBAL-OBJECTS)
+ (DESC "sky")
+ (SYNONYM SKY STARS)
+ (ACTION SKY-F)>
+
+<ROUTINE SKY-F ("AUX" EL)
+ <COND (<AND <FSET? ,HERE ,ONBIT> <VERB? EXAMINE>>
+ <SET EL </ ,TOD 10>>
+ <TELL "It would be " <GET ,TIME-TABLE .EL> " now.">
+ <COND (<G? ,TOD ,NIGHTFALL>
+ <TELL " Bright stars shine down on the earth.">)>
+ <CRLF>)
+ (T <TELL "That would be difficult from here." CR>)>>
+
+<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? <>>)>
+ <COND (.PRSO?
+ <COND (<OR <VERB? ZIFMIA>
+ <AND <VERB? CAST>
+ <EQUAL? ,PRSO ,SUMMON-SPELL>>>
+ <COND (<SET OBJ <FIND-NOT-HERE .TBL .PRSO?>>
+ <COND (<NOT <==? .OBJ ,NOT-HERE-OBJECT>>
+ <RTRUE>)>)
+ (T
+ <RFALSE>)>)>)
+ ;(T
+ <COND (<VERB? PUT-VERBS-HERE>
+ <COND (<SET OBJ <FIND-NOT-HERE .TBL .PRSO?>>
+ <COND (<NOT <==? .OBJ ,NOT-HERE-OBJECT>>
+ <RTRUE>)>)
+ (T
+ <RFALSE>)>)>)>
+ ;"Here is the default 'cant see any' printer"
+ <COND (<EQUAL? ,WINNER ,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>)>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <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 <GET .TBL 1> ,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">
+ <COND (<NOT <EQUAL? .OBJ ,GLOBAL-KRILL>>
+ <TELL " 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> <>>)>>
+
+<OBJECT BELBOZ
+ (IN GLOBAL-OBJECTS)
+ (DESC "Necromancer Belboz")
+ (SYNONYM BELBOZ NECROMANCER)
+ (ACTION BELBOZ-F)
+ (FLAGS VILLAIN)>
+
+<ROUTINE BELBOZ-F ()
+ <COND (<VERB? ZIFMIA>
+ <TELL
+"A vision of the great Belboz begins to take shape before you, but ">
+ <COND (<GETP ,HERE ,P?TMAZE>
+ <TELL
+"as
+soon as he realizes where you are, he disappears, a look of fear upon
+his face." CR>)
+ (T
+ <TELL
+"with
+a curt word and a waggle of his finger, he disappears again, shaking his
+head in disappointment." CR>)>)
+ (<VERB? EXAMINE WHO>
+ <TELL
+"Belboz is, in effect, your boss, professor, patron, and ultimate superior.
+He is the head of the Circle of Enchanters." CR>)>>
+
+<OBJECT GLOBAL-ROOM
+ (IN GLOBAL-OBJECTS)
+ (DESC "room")
+ (SYNONYM ROOM PLACE AREA HERE)
+ (ACTION GLOBAL-ROOM-F)>
+
+<ROUTINE GLOBAL-ROOM-F ()
+ <COND (<VERB? LOOK EXAMINE>
+ <PERFORM ,V?LOOK>
+ <RTRUE>)
+ (<VERB? WALK-AROUND>
+ <TELL
+"Walking around the room reveals nothing else of interest. If you want to
+move elsewhere, simply indicate the direction you wish to move in." CR>)>>
+
+<OBJECT BRAMBLES
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM BRAMBLE)
+ (DESC "bramble")
+ (ACTION BRAMBLES-F)>
+
+<ROUTINE BRAMBLES-F ()
+ <COND (<NOT <OUTSIDE? ,HERE>>
+ <TELL "The only brambles here are in your head." CR>)
+ (<VERB? SEARCH LOOK-INSIDE>
+ <TELL
+"There's nothing in the brambles now. Count your blessings." CR>)>>
+
+<OBJECT GLOBAL-HOLE
+ (IN GLOBAL-OBJECTS)
+ (DESC "hole")
+ (SYNONYM HOLE)
+ (ACTION GLOBAL-HOLE-F)>
+
+<ROUTINE GLOBAL-HOLE-F ()
+ <COND (<VERB? DIG>
+ <TELL "It's not worth the bother." CR>)
+ (T <GLOBAL-NOT-HERE-PRINT ,GLOBAL-HOLE>)>> \ No newline at end of file
diff --git a/knot.zil b/knot.zil
new file mode 100644
index 0000000..0c0396b
--- /dev/null
+++ b/knot.zil
@@ -0,0 +1,186 @@
+"KNOT for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+;"Another knotty problem for our brave would-be magic user...."
+
+<ROOM KNOT-ROOM
+ (IN ROOMS)
+ (DESC "Closet")
+ (LDESC
+"This small room must have been a closet of some sort. To the north
+is a passage leading out into a courtyard. Another exit is
+to the south.")
+ (SOUTH TO DIM-DESCENT)
+ (NORTH TO COURTYARD-1)
+ (FLAGS RLANDBIT)>
+
+<ROUTINE JEWELLED-BOX-A ()
+ <COND (<AND <IN? ,HERE ,JEWELLED-BOX>
+ <G? ,BOX-POINT 0>>
+ <COND (,ROPE-MAGIC?
+ <TELL
+"The adventurer notes the box and tries to untie the rope from around it.
+His frustration is evident by the words he uses to describe the rope." CR>)
+ (T
+ <PUTP ,JEWELLED-BOX ,P?LDESC
+"A jewelled box, wrapped in a partly untied tangle of rope, is
+on the ground.">
+ <TELL
+"The adventurer walks up to the box and becomes quickly entangled in the
+partly untied rope that is knotted around it. He looks like a cat who has
+been playing with a ball of yarn." CR>)>)>
+ <RTRUE>>
+
+<OBJECT JEWELLED-BOX
+ (IN KNOT-ROOM)
+ (SYNONYM BOX)
+ (ADJECTIVE JEWELLED)
+ (DESC "jewelled box")
+ (FDESC
+"In the exact center of the room is a large, jewelled box. It is wrapped
+in tight coils of thin rope. You try to follow the strands with your
+eye, but become hopelessly lost in the jumble of thousands of loops and
+knots.")
+ (LDESC
+"A jewelled box, wrapped tightly in rope, is on the ground.")
+ (FLAGS TAKEBIT CONTBIT OPENBIT TREASURE)
+ (CAPACITY 40)
+ (SIZE 40)
+ (ADVFCN JEWELLED-BOX-A)
+ (ACTION JEWELLED-BOX-F)>
+
+<ROUTINE JEWELLED-BOX-F ()
+ <COND (<IN? ,MAGIC-ROPE ,JEWELLED-BOX>
+ <COND (<VERB? SHAKE>
+ <TELL
+"It seems that there's something inside, but it's not clear what." CR>)
+ (<VERB? UNLOCK>
+ <TELL
+"Who said anything about its being locked?" CR>)
+ (<VERB? REZROV>
+ <COND (,ROPE-MAGIC?
+ <TELL
+"The magic in the rope is strong enough to prevent the rezrov spell from
+working." CR>)
+ (T
+ <TELL
+"The rope dissolves and the jewelled box flies open!" CR>
+ <ROPE-DISSOLVES>
+ <FSET ,JEWELLED-BOX ,OPENBIT>)>)
+ (<VERB? OPEN LOOK-INSIDE>
+ <TELL
+"With all that rope around it, you haven't a prayer." CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"It is closed and wrapped in tight coils of thin rope." CR>)
+ (<VERB? CLOSE>
+ <TELL
+"It isn't open, which seems to be the problem at hand." CR>)
+ (<AND <VERB? PUT> <EQUAL? ,PRSI ,JEWELLED-BOX>>
+ <TELL
+"That won't work until the box is open." CR>)>)
+ (<AND <VERB? OPEN>
+ <IN? ,PROTECTION-SCROLL ,JEWELLED-BOX>>
+ <THIS-IS-IT ,PROTECTION-SCROLL>
+ <RFALSE>)>>
+
+<OBJECT MAGIC-ROPE
+ (IN JEWELLED-BOX)
+ (SYNONYM ROPE KNOT COIL COILS)
+ (ADJECTIVE TIGHT THIN STRAND)
+ (DESC "tangle of rope")
+ (FLAGS NDESCBIT VICBIT)
+ (ACTION MAGIC-ROPE-F)>
+
+<GLOBAL ROPE-MAGIC? T>
+
+<ROUTINE MAGIC-ROPE-F ()
+ <COND (<VERB? UNTIE>
+ <TELL
+"After a few moments of reflection, you tackle the knots, one at a time.
+Although you succeed with some regularity at untangling small areas of the
+rope, you ">
+ <COND (,ROPE-MAGIC?
+ <TELL
+"find that new knots seem to be forming as you watch, taunting you
+into deep despair.">)
+ (ELSE
+ <PUTP ,JEWELLED-BOX ,P?LDESC
+"A jewelled box, wrapped in a partly untied tangle of rope, is
+on the ground.">
+ <TELL
+"can't make any headway against the enormous tangle. It would take
+forever to finish.">)>
+ <CRLF>)
+ (<VERB? GUNCHO>
+ <REMOVE ,MAGIC-ROPE>
+ <REMOVE ,JEWELLED-BOX>
+ <TELL
+"The " D ,PRSO " disappears, but unfortunately the " D ,JEWELLED-BOX
+" disappears as well." CR>)
+ (<VERB? REZROV>
+ <JEWELLED-BOX-F>
+ <RTRUE>)
+ (<VERB? TAKE>
+ <TELL
+"The rope is so entangled around the box that the idea is ridiculous." CR>)
+ (<VERB? CUT MUNG>
+ <COND (<NOT ,PRSI>
+ <TELL "You can't hurt it with your bare hands." CR>)
+ (<EQUAL? ,PRSI ,MAGIC-KNIFE>
+ <ROPE-DISSOLVES>
+ <TELL
+"At the mere touch of the magic knife, the rope gives way. Before your
+eyes, the strands, now moving this way, now moving that way, untangle
+themselves into a single strand which falls to the floor alongside the
+box, where it dissolves into the air without a sound." CR>)
+ (<FSET? ,PRSI ,WEAPONBIT>
+ ;"only other weapon is adventurer's sword?"
+ <COND (,ROPE-MAGIC?
+ <TELL
+"The rope seems to be pretty strong stuff. You don't seem to be making
+the least progress in breaking it." CR>)
+ (ELSE
+ <TELL
+"The rope cuts cleanly, and falls to pieces on the floor. It must have
+been pretty rotten." CR>)>)
+ (T <TELL
+"You certainly won't get anywhere using the " D ,PRSI "!" CR>)>)
+ (<VERB? KULCAD>
+ <SETG ROPE-MAGIC? <>>
+ <TELL
+"Nothing obvious happens, but when you examine the rope, it lacks a
+certain something you saw in it before. It now looks sort of ordinary,
+like a clothesline." CR>)
+ (<VERB? DROP>
+ <PERFORM ,V?DROP ,JEWELLED-BOX>
+ <RTRUE>)>>
+
+<ROUTINE ROPE-DISSOLVES ()
+ <SETG ROPE-MAGIC? <>>
+ <SETG SCORE <+ ,SCORE ,BOX-POINT>>
+ <SETG BOX-POINT 0>
+ <REMOVE ,MAGIC-ROPE>
+ <MOVE ,PROTECTION-SCROLL ,JEWELLED-BOX>
+ <FCLEAR ,JEWELLED-BOX ,OPENBIT>
+ <FSET ,JEWELLED-BOX ,TOUCHBIT>
+ <PUTP ,JEWELLED-BOX ,P?LDESC
+ "A jewelled box is sitting on the ground.">>
+
+<OBJECT MAGIC-KNIFE
+ (SYNONYM KNIFE DAGGER BLADE)
+ (ADJECTIVE MAGIC SACRIFICIAL)
+ (DESC "sacrificial dagger")
+ (FLAGS TAKEBIT TOUCHBIT WEAPONBIT TREASURE)
+ (SIZE 10)
+ (ACTION MAGIC-KNIFE-F)>
+
+<ROUTINE MAGIC-KNIFE-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The dagger is inlaid with fine jewels. It would be a handsome addition
+to anyone's weapon collection." CR>)>>
+
+ \ No newline at end of file
diff --git a/load.zil b/load.zil
new file mode 100644
index 0000000..a5d9ead
--- /dev/null
+++ b/load.zil
@@ -0,0 +1,54 @@
+"ENCHANTER for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+<PRINC "
+ *** ENCHANTER: Interlogic Fantasy ***
+
+">
+
+<BLOAT 90000 0 0 3300 0 0 0 0 0 256>
+
+<SNAME "ENCHANTER">
+
+<SET REDEFINE T>
+
+<GLOBAL BIGFIX 10000>
+
+<OR <GASSIGNED? ZILCH>
+ <SETG WBREAKS <STRING !\" !,WBREAKS>>>
+
+<OR <GASSIGNED? INSERT-CRUFTY>
+ <DEFINE INSERT-CRUFTY (STR) <INSERT-FILE .STR T>>>
+
+<COND (<GASSIGNED? PREDGEN>
+ <ID 0>)>
+
+<INSERT-FILE "SYNTAX" T>
+
+<INSERT-FILE "MACROS" T>
+<INSERT-FILE "CLOCK" T>
+<INSERT-FILE "MAIN" T>
+<INSERT-FILE "PARSER" T>
+
+<INSERT-CRUFTY "CRUFTY">
+<INSERT-FILE "VERBS" T>
+<INSERT-FILE "GLOBALS" T>
+;<INSERT-FILE "TERROR" T>
+;<INSERT-FILE "STAIR" T>
+<INSERT-FILE "MAGIC" T>
+;<INSERT-FILE "KNOT" T>
+;<INSERT-FILE "PURLOINED" T>
+<INSERT-FILE "CASTLE" T>
+;<INSERT-FILE "TEMPLE" T>
+;<INSERT-FILE "GALLERY" T>
+;<INSERT-FILE "EGG" T>
+<INSERT-FILE "SLEEP" T>
+<INSERT-FILE "GEARS" T>
+<INSERT-FILE "OUTSIDE" T>
+
+<PROPDEF SIZE 5>
+<PROPDEF CAPACITY 0>
+
+
diff --git a/macros.zil b/macros.zil
new file mode 100644
index 0000000..e0456eb
--- /dev/null
+++ b/macros.zil
@@ -0,0 +1,162 @@
+"MACROS for
+ ENCHANTER
+ (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>
+ <MAPRET <FORM PRINTI .E>>)
+ (<TYPE? .E FORM LVAL GVAL>
+ <MAPRET <FORM PRINT .E>>)
+ (ELSE <ERROR UNKNOWN-TYPE .E>)>>>>>
+
+<ROUTINE PRINTA (O)
+ <TELL <COND (<FSET? .O ,VOWELBIT>
+ "an ")
+ (T "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>
+ <CHTYPE <COND (<==? .X PRSA>
+ <PARSE
+ <STRING "V?"
+ <SPNAME .ATM>>>)
+ (ELSE .ATM)>
+ GVAL>)
+ (ELSE .ATM)>
+ !.L)>
+ <SET ATMS <REST .ATMS>>
+ <COND (<==? <LENGTH .L> 3> <RETURN!->)>>
+ <SET O <REST <PUTREST .O (<FORM EQUAL? <CHTYPE .X GVAL> !.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 <CHTYPE .ATM GVAL>)>>
+ !.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/magic.zil b/magic.zil
new file mode 100644
index 0000000..8f1271e
--- /dev/null
+++ b/magic.zil
@@ -0,0 +1,1140 @@
+"MAGIC for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+"---Summary of magic spells---
+
+ --Word-- --English--
+ BLORB STRONG-BOX-SPELL
+ CLEESH NEWT-SPELL
+ EXEX HASTE-SPELL
+ FILFRE CREDITS-SPELL
+ FROTZ LIGHT-SPELL
+ GNUSTO WRITE-MAGIC-SPELL
+ GONDAR QUENCH-SPELL
+ GUNCHO BANISH-SPELL
+ IZYUK FLY-SPELL
+ KREBF REPAIR-SPELL
+ KULCAD DISPEL-SPELL
+ MELBOR PROTECTION-SPELL
+ NITFOL TALK-TO-ANIMALS-SPELL
+ OZMOO CHEAT-DEATH-SPELL
+ REZROV OPEN-SPELL
+ VAXUM CHARM-SPELL
+ ZIFMIA SUMMON-SPELL
+"
+
+<OBJECT SPELL-BOOK
+ (IN PLAYER)
+ (SYNONYM BOOK)
+ (ADJECTIVE SPELL)
+ (DESC "spell book")
+ (ACTION SPELL-BOOK-F)
+ (FLAGS TOUCHBIT TAKEBIT READBIT CONTBIT OPENBIT)>
+
+<OBJECT WRITE-MAGIC-SPELL
+ (IN SPELL-BOOK)
+ (SYNONYM SPELL)
+ (ADJECTIVE GNUSTO)
+ (DESC "gnusto spell")
+ (TEXT "write a magic spell into a spell book")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT LIGHT-SPELL
+ (IN SPELL-BOOK)
+ (SYNONYM SPELL)
+ (ADJECTIVE FROTZ)
+ (DESC "frotz spell")
+ (TEXT "cause something to give off light")
+ (COUNT 1)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT CHEAT-DEATH-SCROLL
+ (IN PORTRAIT-NICHE)
+ (SYNONYM SCROLL)
+ (ADJECTIVE BLACK)
+ (DESC "black scroll")
+ ;(FDESC
+"Nestled in the niche is a small black scroll.")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT CHEAT-DEATH-SPELL
+ (IN CHEAT-DEATH-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE OZMOO)
+ (DESC "ozmoo spell")
+ (TEXT "survive unnatural death")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT VOWELBIT)>
+
+<OBJECT SUMMON-SCROLL
+ (SYNONYM SCROLL)
+ (ADJECTIVE FADED WHOLE)
+ (DESC "faded scroll")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT SUMMON-SPELL
+ (IN SUMMON-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE ZIFMIA)
+ (DESC "zifmia spell")
+ (TEXT "magically summon a being")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT CHARM-SCROLL
+ (IN BEDPOST)
+ (SYNONYM SCROLL)
+ (ADJECTIVE GOLD LEAF)
+ (DESC "gold leaf scroll")
+ (LDESC "A scroll ornamented in gold leaf is here.")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT CHARM-SPELL
+ (IN CHARM-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE VAXUM)
+ (DESC "vaxum spell")
+ (TEXT "make a hostile creature your friend")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT OPEN-SCROLL
+ (SYNONYM SCROLL)
+ (ADJECTIVE SCRIBBLED)
+ (DESC "scribbled scroll")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT OPEN-SPELL
+ (IN OPEN-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE REZROV)
+ (DESC "rezrov spell")
+ (TEXT "open even locked or enchanted objects")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT QUENCH-SCROLL
+ (IN RAT-HOLE)
+ (SYNONYM SCROLL)
+ (ADJECTIVE FRAYED)
+ (DESC "frayed scroll")
+ (FLAGS INVISIBLE READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT QUENCH-SPELL
+ (IN QUENCH-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE GONDAR)
+ (DESC "gondar spell")
+ (TEXT "quench an open flame")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT TALK-TO-ANIMALS-SPELL
+ (IN SPELL-BOOK)
+ (SYNONYM SPELL)
+ (ADJECTIVE NITFOL)
+ (DESC "nitfol spell")
+ (TEXT "converse with the beasts in their own tongue")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT HASTE-SCROLL
+ (IN SECRET-PASSAGE)
+ (SYNONYM SCROLL)
+ (ADJECTIVE STAINED)
+ (FDESC
+"Lying on the ground, and slightly damaged, is a stained scroll.")
+ (DESC "stained scroll")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT HASTE-SPELL
+ (IN HASTE-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE EXEX)
+ (DESC "exex spell")
+ (TEXT "make things move with greater speed")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT VOWELBIT)>
+
+<OBJECT DISPEL-SCROLL
+ (IN CLOSET)
+ (SYNONYM SCROLL PAPER PARCHMENT)
+ (ADJECTIVE OLD BRITTLE ROLLED)
+ (DESC "brittle scroll")
+ (LDESC "A scroll of old, brittle parchment is here.")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT DISPEL-SPELL
+ (IN DISPEL-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE KULCAD)
+ (DESC "kulcad spell")
+ (TEXT "dispel a magic spell")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT PROTECTION-SCROLL
+ (SYNONYM SCROLL)
+ (ADJECTIVE VELLUM)
+ (DESC "vellum scroll")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT PROTECTION-SPELL
+ (IN PROTECTION-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE MELBOR)
+ (DESC "melbor spell")
+ (TEXT "protect magic users from harm by evil beings")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT STRONG-BOX-SPELL
+ (IN SPELL-BOOK)
+ (SYNONYM SPELL)
+ (ADJECTIVE BLORB)
+ (DESC "blorb spell")
+ (TEXT "safely protect a small object as though in a strong box")
+ (COUNT 1)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT BANISH-SCROLL
+ (IN T-I)
+ (SYNONYM SCROLL)
+ (ADJECTIVE POWERFUL)
+ (DESC "powerful scroll")
+ (LDESC "A scroll emanating power is here.")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT BANISH-SPELL
+ (IN BANISH-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE GUNCHO)
+ (DESC "guncho spell")
+ (TEXT "banish the victim to another plane of existence")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT REPAIR-SCROLL
+ (IN FOREST-1)
+ (SYNONYM SCROLL)
+ (ADJECTIVE CRUMPLED)
+ (DESC "slightly crumpled scroll")
+ (FDESC
+"Discarded beneath a nearby tree is a slightly crumpled scroll.")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT REPAIR-SPELL
+ (IN REPAIR-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE KREBF)
+ (DESC "krebf spell")
+ (TEXT "repair willful damage")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT NEWT-SCROLL
+ (IN LILY-PAD)
+ (SYNONYM SCROLL)
+ (ADJECTIVE DAMP SOGGY)
+ (DESC "damp scroll")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT INVISIBLE)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT NEWT-SPELL
+ (IN NEWT-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE CLEESH)
+ (DESC "cleesh spell")
+ (TEXT "change a creature into a small amphibian")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<OBJECT FLY-SCROLL
+ (SYNONYM SCROLL)
+ (ADJECTIVE ORNATE)
+ (DESC "ornate scroll")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT VOWELBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT FLY-SPELL
+ (IN FLY-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE IZYUK)
+ (DESC "izyuk spell")
+ (TEXT "fly like a bird")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT VOWELBIT)>
+
+<OBJECT CREDITS-SCROLL
+ (IN MAP-ROOM)
+ (FDESC "Lying on the floor is a purple scroll.")
+ (SYNONYM SCROLL)
+ (ADJECTIVE PURPLE)
+ (DESC "purple scroll")
+ (FLAGS READBIT SCROLLBIT BURNBIT TAKEBIT CONTBIT TRANSBIT)
+ (SIZE 3)
+ (ACTION SCROLL-F)>
+
+<OBJECT CREDITS-SPELL
+ (IN CREDITS-SCROLL)
+ (SYNONYM SPELL)
+ (ADJECTIVE FILFRE)
+ (DESC "filfre spell")
+ (TEXT "create gratuitous fireworks")
+ (COUNT 0)
+ (ACTION SPELL-F)
+ (SIZE 1)
+ (FLAGS NDESCBIT READBIT SPELLBIT)>
+
+<GLOBAL ALL-SPELLS
+ <LTABLE WRITE-MAGIC-SPELL
+ LIGHT-SPELL
+ CHEAT-DEATH-SPELL
+ SUMMON-SPELL
+ CHARM-SPELL
+ OPEN-SPELL
+ TALK-TO-ANIMALS-SPELL
+ HASTE-SPELL
+ DISPEL-SPELL
+ PROTECTION-SPELL
+ STRONG-BOX-SPELL
+ BANISH-SPELL
+ REPAIR-SPELL
+ NEWT-SPELL
+ FLY-SPELL
+ QUENCH-SPELL
+ CREDITS-SPELL>>
+
+<ROUTINE V-SPELLS ("AUX" (CNT <GET ,ALL-SPELLS 0>) S (ANY <>) (OS <>) TMP)
+ <TELL
+"The gnusto spell, the only thing you seem to have learned well after many
+years at the University, remains yours forever. Other than that, you have
+">
+ <REPEAT ()
+ <COND (<==? .CNT 0>
+ <COND (.OS
+ <SPELL-PRINT .OS .ANY T>
+ <SET ANY T>)>
+ <COND (<NOT .ANY> <TELL "no spells memorized.">)
+ (T <TELL " committed to memory.">)>
+ <CRLF>
+ <RTRUE>)>
+ <COND (<SET TMP <SPELL-TIMES <GET ,ALL-SPELLS .CNT>>>
+ <COND (.OS
+ <SPELL-PRINT .OS .ANY>
+ <SET ANY T>)>
+ <SET OS .TMP>)>
+ <SET CNT <- .CNT 1>>>>
+
+<ROUTINE SPELL-TIMES (S)
+ <COND (<G? <GETP .S ,P?COUNT> 0>
+ <COND (<IN? .S ,SPELL-BOOK> .S)
+ (<AND <==? .S ,DISPEL-SPELL>
+ <NOT <IN? ,DISPEL-SPELL ,DISPEL-SCROLL>>>
+ .S)
+ (<AND <==? .S ,BANISH-SPELL>
+ <NOT <IN? ,BANISH-SPELL ,BANISH-SCROLL>>>
+ .S)>)>>
+
+<ROUTINE SPELL-PRINT (S ANY "OPTIONAL" (PAND? <>) "AUX" CNT)
+ <COND (.ANY
+ <COND (.PAND? <TELL " and ">)
+ (ELSE <TELL ", ">)>)>
+ <TELL "the " D .S>
+ <COND (<G? <SET CNT <GETP .S ,P?COUNT>> 5>
+ <TELL " many times">)
+ (T
+ <TELL " " <GET ,COUNTERS <- .CNT 1>>>)>
+ .S>
+
+<GLOBAL COUNTERS <TABLE "once" "twice" "thrice" "four times" "five times">>
+
+\
+
+<ROUTINE SPELL-BOOK-F ("AUX" (F <FIRST? ,SPELL-BOOK>))
+ <COND (<VERB? EXAMINE>
+ <TELL
+
+"The title is \"My Spell Book\". The book looks pretty new, and it
+doesn't seem to have much written in it yet. There are some spells
+written in the book in glowing letters, with marginal notes about how to
+cast them and what their effects are." CR>)
+ (<VERB? OPEN CLOSE>
+ <TELL
+"Thanks to its magic properties, the spell book is always open to the
+right place at the right time, but it is also always closed. This
+innovation eliminates tedious page turning
+and hunting for spells in tight situations. Many wizardly lives have
+been saved by this small advance in magical technology." CR>)
+ (<VERB? READ>
+ <COND (<NOT ,LIT>
+ <TELL
+"Though it is dark, the magic writing of your spells casts enough light
+that you can read them." CR>)>
+ <TELL "|
+My Spell Book|
+|
+">
+ <REPEAT ()
+ <COND (<NOT .F> <RETURN>)>
+ <TELL "The " D .F " (" <GETP .F ,P?TEXT> ")." CR>
+ <SET F <NEXT? .F>>>)>>
+
+<ROUTINE SPELL-CHECK (TBL WRD "AUX" (OBJ <>))
+ <COND (<EQUAL? .WRD ,W?GNUSTO>
+ <SET OBJ ,WRITE-MAGIC-SPELL>)
+ (<EQUAL? .WRD ,W?FROTZ>
+ <SET OBJ ,LIGHT-SPELL>)
+ (<EQUAL? .WRD ,W?OZMOO>
+ <SET OBJ ,CHEAT-DEATH-SPELL>)
+ (<EQUAL? .WRD ,W?ZIFMIA>
+ <SET OBJ ,SUMMON-SPELL>)
+ (<EQUAL? .WRD ,W?VAXUM>
+ <SET OBJ ,CHARM-SPELL>)
+ (<EQUAL? .WRD ,W?REZROV>
+ <SET OBJ ,OPEN-SPELL>)
+ (<EQUAL? .WRD ,W?NITFOL>
+ <SET OBJ ,TALK-TO-ANIMALS-SPELL>)
+ (<EQUAL? .WRD ,W?EXEX>
+ <SET OBJ ,HASTE-SPELL>)
+ (<EQUAL? .WRD ,W?KULCAD>
+ <SET OBJ ,DISPEL-SPELL>)
+ (<EQUAL? .WRD ,W?MELBOR>
+ <SET OBJ ,PROTECTION-SPELL>)
+ (<EQUAL? .WRD ,W?BLORB>
+ <SET OBJ ,STRONG-BOX-SPELL>)
+ (<EQUAL? .WRD ,W?GUNCHO>
+ <SET OBJ ,BANISH-SPELL>)
+ (<EQUAL? .WRD ,W?KREBF>
+ <SET OBJ ,REPAIR-SPELL>)
+ (<EQUAL? .WRD ,W?CLEESH>
+ <SET OBJ ,NEWT-SPELL>)
+ (<EQUAL? .WRD ,W?IZYUK>
+ <SET OBJ ,FLY-SPELL>)
+ (<EQUAL? .WRD ,W?GONDAR>
+ <SET OBJ ,QUENCH-SPELL>)
+ (<EQUAL? .WRD ,W?FILFRE>
+ <SET OBJ ,CREDITS-SPELL>)>
+ <COND (.OBJ
+ <OBJ-FOUND .OBJ .TBL>)>
+ <RTRUE>>
+
+<ROUTINE PRE-QUICK-CAST ("AUX" MEM? SPELL SCROLL)
+ <SET SPELL
+ <COND (<VERB? GNUSTO> ,WRITE-MAGIC-SPELL)
+ (<VERB? FROTZ> ,LIGHT-SPELL)
+ (<VERB? OZMOO> ,CHEAT-DEATH-SPELL)
+ (<VERB? ZIFMIA> ,SUMMON-SPELL)
+ (<VERB? VAXUM> ,CHARM-SPELL)
+ (<VERB? REZROV> ,OPEN-SPELL)
+ (<VERB? NITFOL> ,TALK-TO-ANIMALS-SPELL)
+ (<VERB? EXEX> ,HASTE-SPELL)
+ (<VERB? KULCAD> ,DISPEL-SPELL)
+ (<VERB? MELBOR> ,PROTECTION-SPELL)
+ (<VERB? BLORB> ,STRONG-BOX-SPELL)
+ (<VERB? GUNCHO> ,BANISH-SPELL)
+ (<VERB? GONDAR> ,QUENCH-SPELL)
+ (<VERB? KREBF> ,REPAIR-SPELL)
+ (<VERB? CLEESH> ,NEWT-SPELL)
+ (<VERB? IZYUK> ,FLY-SPELL)
+ (<VERB? FILFRE> ,CREDITS-SPELL)
+ (ELSE <TELL "**OOOPS!**" CR> <RTRUE>)>>
+ <COND (<FSET? .SPELL ,RMUNGBIT>
+ <TELL
+"The spell is defaced beyond recognition." CR>
+ <RTRUE>)>
+ <SET SCROLL <LOC .SPELL>>
+ <COND (<AND .SCROLL <FSET? .SCROLL ,SCROLLBIT>>
+ <COND (<IN? .SCROLL ,WINNER>
+ <REMOVE .SCROLL>
+ <COND (<NOT <EQUAL? ,PRSO ,KRILL>>
+ <TELL
+"As you cast the spell, the " D .SCROLL " vanishes!" CR>)>
+ <PUTP .SPELL ,P?COUNT 1>)
+ (<OR <FSET? .SPELL ,TOUCHBIT>
+ <IN? .SCROLL ,HERE>>
+ <TELL
+"You don't have the " D .SPELL " memorized, nor do you have the scroll
+on which it is written." CR>
+ <RTRUE>)
+ (T
+ <TELL
+"The " D .SPELL " is not committed to memory, and you haven't seen any scroll
+on which it is written." CR>
+ <RTRUE>)>)>
+ <SET MEM? <GETP .SPELL ,P?COUNT>>
+ <COND (<EQUAL? .SPELL ,WRITE-MAGIC-SPELL>
+ <RFALSE> ;"Always memorized")
+ (<NOT <G? .MEM? 0>>
+ <TELL
+"You don't have the " D .SPELL " committed to memory!" CR>
+ <RTRUE>)
+ (ELSE
+ <PUTP .SPELL ,P?COUNT <- .MEM? 1>>
+ <SETG SPELL-ROOM <+ ,SPELL-ROOM 1>>
+ <COND (<VERB? KULCAD GUNCHO>
+ <ENABLE <QUEUE MORE-PROBE 1>>)>
+ <RFALSE>)>>
+
+<ROUTINE SCROLL-F ("AUX" SPELL)
+ <COND (<VERB? TAKE>
+ <SET SPELL <FIRST? ,PRSO>>
+ <FSET .SPELL ,TOUCHBIT>
+ <RFALSE>)
+ (<AND <VERB? CUT> <==? ,PRSI ,MAGIC-KNIFE>>
+ <REMOVE ,PRSO>
+ <TELL
+"The magic dagger reduces the scroll to shreds. The shreds shrivel up into
+tiny spitballs. The spitballs evaporate." CR>)
+ (<AND <VERB? BURN> <==? ,PRSI ,ETERNAL-FLAME>>
+ <REMOVE ,PRSO>
+ <TELL
+"The " D ,PRSO " burns cheerily. Interestingly, the flame is sort of
+purple and rather bright. Not even ashes remain." CR>)
+ (<VERB? EXAMINE READ>
+ <COND (<SET SPELL <FIRST? ,PRSO>>
+ <COND (<FSET? .SPELL ,RMUNGBIT>
+ <TELL
+"The scroll is defaced. The spell on it cannot be read." CR>
+ <RTRUE>)>
+ <TELL
+"The scroll reads \"" D .SPELL ": " <GETP .SPELL ,P?TEXT> "\".">
+ <COND (<EQUAL? .SPELL ,BANISH-SPELL ,DISPEL-SPELL>
+ <TELL
+" The spell seems very long and extremely complicated.">)>
+ <CRLF>)
+ (ELSE
+ <TELL
+"Nothing useful can be made out on the scroll." CR>)>)>>
+
+<ROUTINE SPELL-F ("AUX" MEM? (FORGET <>))
+ <COND (<VERB? READ>
+ <COND (<AND <NOT <IN? ,PRSO ,SPELL-BOOK>>
+ <NOT <IN? <LOC ,PRSO> ,WINNER>>>
+ <TELL
+"You can't do that without having the spell in your book or on
+a scroll in your hand." CR>)>)
+ (<VERB? MEMORIZE LEARN>
+ <COND (<NOT <IN? ,PRSO ,SPELL-BOOK>>
+ <COND (<IN? <LOC ,PRSO> ,WINNER>
+ <TELL
+"You haven't written that spell into your book yet. Until you do, you
+can't memorize the spell." CR>)
+ (T
+ <V-LEARN>)>)
+ (<NOT <IN? ,SPELL-BOOK ,WINNER>>
+ <TELL
+"You don't have your spell book. How do you expect to memorize a spell
+without a spell book?" CR>)
+ (<EQUAL? ,PRSO ,WRITE-MAGIC-SPELL>
+ <TELL
+"You already know that spell by heart." CR>)
+ (<NOT ,LIT>
+ <TELL
+"It will be hard to learn that spell in the dark." CR>)
+ (T
+ <SET MEM? <GETP ,PRSO ,P?COUNT>>
+ <COND (<0? ,SPELL-ROOM>
+ <COND (<EQUAL? ,SPELL-MAX 1>
+ <TELL
+"You can't concentrate well enough to learn the spell." CR>
+ <RTRUE>)
+ (<EQUAL? .MEM? ,SPELL-MAX> T)
+ (T
+ <FORGET-SPELL ,PRSO>
+ <SET MEM? <+ .MEM? 1>>
+ <PUTP ,PRSO ,P?COUNT .MEM?>
+ <SET FORGET T>)>)
+ (T
+ <SETG SPELL-ROOM <- ,SPELL-ROOM 1>>
+ <SET MEM? <+ .MEM? 1>>
+ <PUTP ,PRSO ,P?COUNT .MEM?>)>
+ <TELL
+"Using your best study habits, you learn the " D ,PRSO>
+ <COND (<G? .MEM? 1>
+ <TELL " yet another time">)>
+ <TELL "." CR>
+ <COND (.FORGET
+ <TELL
+"You have so much buzzing around in your head, though, that it's
+likely that something may have been forgotten in the shuffle." CR>)>
+ <RTRUE>)>)
+ (<VERB? TAKE DROP>
+ <TELL <PICK-ONE ,YUKS> CR>)>>
+
+<ROUTINE FORGET-SPELL (SPL "AUX" NSPL F CNT TBL (NUM 0) (SP <>))
+ <SET F <FIRST? ,SPELL-BOOK>>
+ <SET TBL ,FORGET-TBL>
+ <REPEAT ()
+ <COND (<NOT .F> <RETURN>)
+ (<G? <SET CNT <GETP .F ,P?COUNT>> 0>
+ <REPEAT ()
+ <SET SP .F>
+ <PUT .TBL 1 .F>
+ <SET NUM <+ .NUM 1>>
+ <SET TBL <REST .TBL 2>>
+ <COND (<L? <SET CNT <- .CNT 1>> 1>
+ <RETURN>)>>)>
+ <SET F <NEXT? .F>>>
+ <COND (<AND <G? .NUM 0>
+ <EQUAL? <GETP .SP ,P?COUNT> .NUM>>
+ <PUTP .SP ,P?COUNT <- .NUM 1>>
+ <RTRUE>)>
+ <PUT ,FORGET-TBL 0 .NUM>
+ <COND (<0? .NUM> <RTRUE>)>
+ <REPEAT ()
+ <COND (<NOT <EQUAL? <SET NSPL
+ <RANDOM-ELEMENT ,FORGET-TBL>>
+ .SPL>>
+ <PUTP .NSPL ,P?COUNT <- <GETP .NSPL ,P?COUNT> 1>>
+ ;<TELL "[" D .NSPL " forgotten]" CR>
+ <RTRUE>)>>>
+
+<GLOBAL FORGET-TBL <LTABLE 0 0 0 0 0 0 0 0 0 0>>
+
+<ROUTINE FORGET-ALL ("AUX" F)
+ <SETG SPELL-ROOM ,SPELL-MAX>
+ <SET F <FIRST? ,SPELL-BOOK>>
+ <REPEAT ()
+ <COND (<NOT .F> <RETURN>)
+ (ELSE
+ <PUTP .F ,P?COUNT 0>
+ <SET F <NEXT? .F>>)>>>
+
+<GLOBAL REAL-SPELL-MAX 4>
+<GLOBAL SPELL-MAX 4> ;"max spells memorizable"
+<GLOBAL SPELL-ROOM 1> ;"number can memorize now (starts at 1 because loser
+ memorized three already)"
+
+<ROUTINE V-CAST ("AUX" VRB)
+ <COND (<NOT <FSET? ,PRSO ,SPELLBIT>>
+ <TELL
+"You might as well be casting with a fly rod, as to try to cast " A ,PRSO "." CR>)
+ (ELSE
+ <SET VRB
+ <COND (<==? ,PRSO ,WRITE-MAGIC-SPELL> ,V?GNUSTO)
+ (<==? ,PRSO ,LIGHT-SPELL> ,V?FROTZ)
+ (<==? ,PRSO ,CHEAT-DEATH-SPELL> ,V?OZMOO)
+ (<==? ,PRSO ,SUMMON-SPELL> ,V?ZIFMIA)
+ (<==? ,PRSO ,CHARM-SPELL> ,V?VAXUM)
+ (<==? ,PRSO ,OPEN-SPELL> ,V?REZROV)
+ (<==? ,PRSO ,TALK-TO-ANIMALS-SPELL> ,V?NITFOL)
+ (<==? ,PRSO ,HASTE-SPELL> ,V?EXEX)
+ (<==? ,PRSO ,DISPEL-SPELL> ,V?KULCAD)
+ (<==? ,PRSO ,PROTECTION-SPELL> ,V?MELBOR)
+ (<==? ,PRSO ,STRONG-BOX-SPELL> ,V?BLORB)
+ (<==? ,PRSO ,BANISH-SPELL> ,V?GUNCHO)
+ (<==? ,PRSO ,QUENCH-SPELL> ,V?GONDAR)
+ (<==? ,PRSO ,REPAIR-SPELL> ,V?KREBF)
+ (<==? ,PRSO ,NEWT-SPELL> ,V?CLEESH)
+ (<==? ,PRSO ,FLY-SPELL> ,V?IZYUK)
+ (<==? ,PRSO ,CREDITS-SPELL> ,V?FILFRE)
+ (ELSE <TELL "**OOPS**" CR> <RTRUE>)>>
+ <COND (<AND <NOT ,PRSI>
+ <EQUAL? .VRB ,V?KREBF ,V?FILFRE>>
+ <PERFORM .VRB>)
+ (<NOT ,PRSI>
+ <TELL
+"You might as well be casting it away as not cast it on something." CR>)
+ (T <PERFORM .VRB ,PRSI>)>
+ <RTRUE>)>>
+
+<ROUTINE V-LEARN ()
+ <TELL
+"You don't have that spell, if indeed that is a spell." CR>>
+
+<ROUTINE V-MEMORIZE () <V-LEARN>>
+
+"SPELL VERBS"
+
+<ROUTINE V-GNUSTO ("AUX" SCROLL) ;"write magic"
+ <COND (<NOT <IN? ,SPELL-BOOK ,WINNER>>
+ <TELL
+"The spell quests around in your hands, looking for your spell book, and
+not finding it, fades reluctantly." CR>)
+ (<NOT <FSET? ,PRSO ,SPELLBIT>>
+ <TELL
+"You can't inscribe ">
+ <COND (<EQUAL? ,PRSO ,ME> <TELL "yourself">)
+ (T <TELL A ,PRSO>)>
+ <TELL " in your spell book!" CR>)
+ (<IN? ,PRSO ,SPELL-BOOK>
+ <TELL
+"You already have that spell inscribed in your book!" CR>)
+ (<FSET? ,PRSO ,RMUNGBIT>
+ <TELL
+"The spell is defaced beyond recognition." CR>)
+ (ELSE
+ <SET SCROLL <LOC ,PRSO>>
+ <COND (<AND <FSET? .SCROLL ,SCROLLBIT>
+ <HELD? .SCROLL>>
+ <COND (<EQUAL? ,PRSO ,DISPEL-SPELL ,BANISH-SPELL
+ ,CREDITS-SPELL>
+ <TELL
+"Your spell book begins to glow softly. In a spectacular effort of magic,
+the powers of the gnusto spell attempt to copy the " D ,PRSO " into your
+book, but the spell is too long, too complicated, and too powerful. The
+glow fades, but fortunately the "
+D .SCROLL " remains intact." CR>
+ <COND (<EQUAL? ,PRSO ,DISPEL-SPELL ,BANISH-SPELL>
+ <MORE-PROBE <>>)>
+ <RTRUE>)
+ (ELSE
+ <REMOVE .SCROLL>
+ <MOVE ,PRSO ,SPELL-BOOK>
+ <PUTP ,PRSO ,P?COUNT 0>
+ <TELL
+"Your spell book begins to glow softly. Slowly, ornately, the words of
+the " D ,PRSO " are inscribed, glowing even more brightly than
+the book itself. The book's brightness fades, but the spell remains!
+However, the scroll on which it was written vanishes as the last word
+is copied." CR>)>
+ T)
+ (T
+ <TELL
+"You must have a legible spell scroll in your hands before the gnusto spell
+will work on it." CR>)>)>>
+
+<ROUTINE MORE-PROBE ("OPTIONAL" (CAST? T))
+ <COND (<OR <EQUAL? ,HERE ,PIT ,REAL-STAIR ,ENDLESS-STAIR>
+ <EQUAL? ,HERE ,WARLOCK-TOWER>>
+ <RTRUE>)
+ (<G? <SETG PROBE <+ ,PROBE 1>> 3>
+ <TELL
+"The warlock Krill appears before you, clad in deepest black. \"You are a
+fool, wizard-worm! You and your Circle!\" He spits in your face, causing a
+wound through which a foul poison enters your body. Krill's demonic laughter
+is the last sound you hear." CR>
+ <FINISH>)
+ (T
+ <TELL CR <GET ,PROBE-TBL ,PROBE> CR>
+ <COND (<OR .CAST?
+ <AND <EQUAL? ,PROBE 2> <NOT <IN? ,KRILL ,HERE>>>>
+ <COND (<NOT ,BELBOZ-WARNING>
+ <SETG BELBOZ-WARNING T>
+ <TELL CR
+"Belboz appears before you, hard and stern. \"While you have quested for
+Krill's lair, the Circle has not been idle. We have tried to shield your
+presence from him, but ">
+ <COND (.CAST?
+ <TELL
+"your use of such a powerful spell might endanger us all!">)
+ (T
+ <TELL
+"your foolish attempt to copy such a powerful spell cannot be ignored!">)>
+ <TELL "
+As we have sensed it, so surely must Krill! Be careful, brave Enchanter!\"
+His image fades." CR>)>)>
+ <SETG LOSSAGE <+ ,LOSSAGE 1>>
+ <RTRUE>)>>
+
+<GLOBAL BELBOZ-WARNING <>>
+
+<GLOBAL LOSSAGE 0>
+
+<GLOBAL PROBE 0>
+
+<GLOBAL PROBE-TBL <LTABLE
+"A dull aching fills your head, and your mind is again probed, more deeply
+than when you entered the castle."
+"Your head is filled with a heavy sensation, as though an enormous weight
+were being borne by it. Your mind is again probed, this time very deeply,
+testing and learning. The feeling passes after a long moment."
+"A knife seems to split your head apart. A deep, black presence seems to enter
+and probe, deep and sure. After what seems like an eternity, it passes, leaving
+you with a throbbing headache.">>
+
+<ROUTINE V-FROTZ ("AUX" OLIT) ;"light"
+ <SET OLIT ,LIT>
+ <COND (<AND <NOT <IN? ,PRSO ,LOCAL-GLOBALS>>
+ <OR <FSET? ,PRSO ,TAKEBIT>
+ <FSET? ,PRSO ,VICBIT>>>
+ <FSET ,PRSO ,LIGHTBIT>
+ <FSET ,PRSO ,ONBIT>
+ <TELL
+"There is an almost blinding flash of light as the " D ,PRSO " begins to
+glow! It slowly fades to a less painful level, but the " D ,PRSO " is now
+quite usable as a light source." CR>
+ <SETG SCORE <+ ,SCORE ,LIGHT-POINT>>
+ <SETG LIGHT-POINT 0>
+ <SETG LIT <LIT? ,HERE>>
+ <COND (<AND <NOT .OLIT> ,LIT>
+ <CRLF>
+ <PERFORM ,V?LOOK>)>
+ <RTRUE>)
+ (T
+ <V-VAXUM>)>>
+
+<GLOBAL ENTRY-POINT 20>
+<GLOBAL LIGHT-POINT 20>
+<GLOBAL QUENCH-POINT 25>
+<GLOBAL EGG-POINT 5>
+<GLOBAL REPAIR-POINT 10>
+<GLOBAL GALLERY-POINT 25>
+<GLOBAL TEMPLE-POINT 35>
+<GLOBAL BOX-POINT 25>
+<GLOBAL CHARM-POINT 20>
+<GLOBAL SUMMON-POINT 10>
+<GLOBAL DOOR-POINT 35>
+<GLOBAL TERROR-POINT 50>
+<GLOBAL TURTLE-POINT 25>
+<GLOBAL EAT-POINT 10>
+<GLOBAL DRINK-POINT 15>
+<GLOBAL STAIR-POINT 10>
+<GLOBAL FLY-POINT 10>
+<GLOBAL WARLOCK-POINT 50>
+
+<GLOBAL SCORE-MAX 400>
+
+<ROUTINE V-OZMOO () ;"cheat-death"
+ <TELL "A huge puff of orange smoke envelops ">
+ <SETG DEATH-CHEATED ,PRSO>
+ <COND (<EQUAL? ,PRSO ,ME>
+ <ENABLE <QUEUE I-DEATH-CHEATED-END 8>>
+ <TELL "you, but you feel no
+different." CR>)
+ (T
+ <TELL "the " D ,PRSO ". Other than that,
+not much happens." CR>)>>
+
+<GLOBAL DEATH-CHEATED <>>
+
+<ROUTINE I-DEATH-CHEATED-END ()
+ <SETG DEATH-CHEATED <>>
+ <COND (<==? ,DEATH-CHEATED ,ME>
+ <TELL
+"You feel a bit lightheaded for a moment, but the feeling quickly
+passes." CR>)>
+ <RTRUE>>
+
+<GLOBAL IMP-SEEN <>>
+
+<ROUTINE V-ZIFMIA () ;"summon"
+ <COND (<OR <FSET? ,PRSO ,TAKEBIT>
+ <IN? ,PRSO ,LOCAL-GLOBALS>>
+ <TELL
+"The zifmia spell is for summoning beings, not things!" CR>)
+ (<AND <FSET? ,PRSO ,VICBIT> <NOT <IN? ,PRSO ,HERE>>>
+ <NO-ZIF>)
+ (T
+ <V-VAXUM>)>>
+
+<ROUTINE NO-ZIF ()
+ <TELL
+"If you will remember from Thaumaturgy 201, summoning of beings works only
+if the being can be seen, unless the being possesses great magic of his own."
+CR>>
+
+<ROUTINE V-VAXUM () ;"charm"
+ <TELL
+"Although you complete the spell, nothing seems to have happened." CR>>
+
+<ROUTINE V-GONDAR () <V-VAXUM>>
+
+<ROUTINE V-REZROV () ;"open"
+ <COND (<FSET? ,PRSO ,CONTBIT>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <TELL
+"It's open already. Why bother?" CR>)
+ (T
+ <TELL
+"The " D ,PRSO " opens. Kind of like swatting a fly with a sledge hammer,
+if you ask me." CR>)>
+ <FSET ,PRSO ,OPENBIT>)
+ (T <V-VAXUM>)>>
+
+<GLOBAL TALK-TO-ANIMAL? <>>
+
+<ROUTINE I-TALK-TO-ANIMAL ()
+ <COND (<AND <==? ,TALK-TO-ANIMAL? ,TURTLE> ,TURTLE-FOLLOWS>
+ <SETG TURTLE-FOLLOWS <>>
+ <COND (<IN? ,TURTLE ,HERE>
+ <TELL
+"The turtle no longer seems to understand you, loses interest in you,
+and stops following." CR>)>)>
+ <SETG TALK-TO-ANIMAL? <>>>
+
+<ROUTINE V-NITFOL () ;"talk to animal"
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <SETG TALK-TO-ANIMAL? ,PRSO>
+ <ENABLE <QUEUE I-TALK-TO-ANIMAL 20>>
+ <COND (<==? ,PRSO ,ME>
+ <TELL
+"You now understand everything you say to yourself, which is more than
+I can do. You didn't study too hard in Thaumaturgy 101, did you? This
+spell should be cast on the creature you wish to talk to!" CR>)
+ (ELSE
+ <COND (<EQUAL? ,PRSO ,FROG>
+ <TELL "One of the frogs">)
+ (T <TELL "The " D ,PRSO>)>
+ <TELL
+" looks at you for a moment, and you look at it. \"Hello,\" it says." CR>)>)
+ (ELSE
+ <TELL "This seems to have no effect on " A ,PRSO "." CR>)>>
+
+<GLOBAL HASTED? <>>
+
+<ROUTINE I-HASTE ()
+ <COND (<==? ,HASTED? ,ME>
+ <SETG HUNGER-COUNT <+ ,HUNGER-COUNT 2>>
+ <ENABLE <QUEUE I-HUNGER 3>>
+ <SETG THIRST-COUNT <+ ,THIRST-COUNT 2>>
+ <ENABLE <QUEUE I-THIRST 4>>
+ <ENABLE <QUEUE I-TIRED 5>>
+ <TELL
+"The effects of the exex spell have worn off. You are ravenous, parched,
+and tired." CR>)>
+ <SETG HASTED? <>>>
+
+<ROUTINE V-EXEX () ;"haste"
+ <COND (,HASTED?
+ <TELL
+"Nothing seems to happen. Perhaps the spell needs time before it can be
+cast again." CR>)
+ (<FSET? ,PRSO ,VILLAIN>
+ <SETG HASTED? ,PRSO>
+ <COND (<==? ,PRSO ,ME>
+ <SETG HASTED? ,PLAYER>
+ <COND (<EQUAL? ,HERE ,WARLOCK-TOWER>
+ <TELL
+"Krill, nobody's fool, hears you start the exex spell and hastily
+improvises one of his own which entirely counteracts it. The spell
+acts so well, in fact, that you are frozen solid." CR>)
+ (T
+ <ENABLE <QUEUE I-HASTE 45>>
+ <TELL
+"You feel energetic and zippy." CR>)>)
+ (ELSE
+ <ENABLE <QUEUE I-HASTE 15>>
+ <TELL
+"The " D ,PRSO " shimmers, then vibrates in place for a few seconds, but
+doesn't take any notice of the change." CR>)>)
+ (ELSE
+ <V-VAXUM>)>>
+
+<ROUTINE V-KULCAD () ;"dispel"
+ <TELL
+"It appears that the " D ,PRSO " was real, since nothing happens." CR>
+ <RTRUE>>
+
+<ROUTINE V-MELBOR () ;"protection"
+ <COND (<EQUAL? ,PRSO ,ME>
+ <SETG PROTECTED-FROM-EVIL T>
+ <TELL
+"A wave of warmth courses through you, leaving you with a feeling of great
+internal strength." CR>)
+ (T <V-VAXUM>)>>
+
+<GLOBAL PROTECTED-FROM-EVIL <>>
+
+<GLOBAL STRONG-BOX-FLAG <>>
+
+<ROUTINE V-BLORB ("AUX" OBJ) ;"strong-box"
+ <COND (,STRONG-BOX-FLAG
+ <V-VAXUM>
+ <RTRUE>)>
+ <COND (<OR <FSET? ,PRSO ,TAKEBIT>
+ <EQUAL? ,PRSO ,ADVENTURER>>
+ <COND (<EQUAL? ,PRSO ,ADVENTURER ,TURTLE>
+ <REMOVE ,PRSO>
+ <COND (<EQUAL? ,PRSO ,ADVENTURER>
+ <QUEUE I-ADVENTURER 0>)
+ (T
+ <QUEUE I-TURTLE 0>)>)
+ (T <MOVE ,PRSO ,STRONG-BOX>)>
+ <SETG STRONG-BOX-FLAG T>
+ <MOVE ,STRONG-BOX ,HERE>
+ <TELL
+"A glowing strong box forms out of the air, carefully enclosing
+the " D ,PRSO ", which disappears from view. The strong box rests on
+the ground." CR>)
+ (ELSE <V-VAXUM>)>>
+
+<OBJECT STRONG-BOX
+ (SYNONYM BOX SAFE)
+ (ADJECTIVE STRONG)
+ (DESC "strong box")
+ (LDESC "There is a faintly glowing strong box here.")
+ (FLAGS TAKEBIT TRYTAKEBIT CONTBIT ONBIT)
+ (ACTION STRONG-BOX-F)>
+
+<ROUTINE STRONG-BOX-F ("AUX" OBJ)
+ <COND (<VERB? TAKE>
+ <TELL
+"The strong box is apparently stuck to the ground, or welded there,
+or tied with magical ropes. It won't move." CR>)
+ (<VERB? OPEN REZROV KULCAD>
+ <SETG STRONG-BOX-FLAG <>>
+ <COND (<SET OBJ <FIRST? ,STRONG-BOX>>
+ <MOVE .OBJ ,HERE>
+ <THIS-IS-IT .OBJ>)>
+ <REMOVE ,STRONG-BOX>
+ <TELL <COND (<VERB? OPEN> "As you open")
+ (<VERB? REZROV> "The rezrov spell bursts")
+ (<VERB? KULCAD> "The kulcad spell dispels")>
+" the strong box, it vanishes, and ">
+ <COND (.OBJ <TELL "the " D .OBJ " re">)
+ (T <TELL "nothing ">)>
+ <TELL "appears in
+its place." CR>)>>
+
+<ROUTINE V-GUNCHO () ;"banish"
+ <COND (<FSET? ,PRSO ,VICBIT>
+ <REMOVE ,PRSO>
+ <TELL
+"The " D ,PRSO " disappears, fading with stately speed into a misty
+shadow, shimmering and wavering, which then is gone." CR>)
+ (ELSE <V-VAXUM>)>>
+
+<ROUTINE V-KREBF ()
+ <COND (<OR <NOT ,PRSO> <==? ,PRSO ,GLOBAL-ROOM>>
+ <COND (<FSET? ,HERE ,RMUNGBIT>
+ <FCLEAR ,HERE ,RMUNGBIT>
+ <FCLEAR ,HERE ,TOUCHBIT>
+ <TELL
+"There is a slow brightening of the illumination, and color flows back
+into your surroundings. There is a touch of spring in the air." CR>)
+ (ELSE
+ <TELL
+"Nothing happens. Perhaps there was no damage here to repair." CR>)>)
+ (ELSE
+ <COND (<AND <FSET? ,PRSO ,SCROLLBIT>
+ <FIRST? ,PRSO>>
+ <SETG PRSO <FIRST? ,PRSO>>)>
+ <COND (<NOT <FSET? ,PRSO ,RMUNGBIT>>
+ <TELL "Nothing happens." CR>)
+ (T
+ <FCLEAR ,PRSO ,RMUNGBIT>
+ <COND (<FSET? ,PRSO ,SPELLBIT>
+ <TELL
+"The " D ,PRSO " becomes readable again." CR>)
+ (T <TELL "Nothing obvious happens." CR>)>)>)>>
+
+<ROUTINE V-CLEESH ()
+ <COND (<==? ,PRSO ,ME>
+ <TELL
+"You are turned into a newt, and scurry off to find your friends in the
+swamp. You are distracted by various yummy insects along the way, but
+eventually settle into a nice gooey part of the morass and live happily
+ever after, at least until you are devoured by a heron." CR>
+ <FINISH>)
+ (<EQUAL? ,PRSO ,ADVENTURER ,ADVENTURER-LG>
+ <NO-MORE-ADVENTURER>
+ <QUEUE I-ADVENTURER 0>
+ <REMOVE ,ADVENTURER>
+ <TELL
+"The adventurer turns into a fairly large newt, which scuttles off and
+is lost to sight." CR>)
+ (<AND <FSET? ,PRSO ,VICBIT>
+ <FSET? ,PRSO ,VILLAIN>>
+ <TELL
+"The " D ,PRSO " looks sort of green and slimy for a moment, but he
+gets better." CR>)
+ (T
+ <TELL
+"Turning the " D ,PRSO " into a newt is a remarkable idea." CR>)>>
+
+<ROUTINE V-IZYUK ()
+ <COND (<OR <NOT ,PRSO> <==? ,PRSO ,ME>>
+ <SETG FLYING? T>
+ <ENABLE <QUEUE I-FLY 4>>
+ <QUEUE I-FALL-FOREVER 0>
+ <TELL
+"Your descent slows, and you are floating serenely in midair. The tower
+surrounds you, with wide-cut openings to the east and west. You could
+probably fly in either direction if you wished." CR>)
+ (ELSE
+ <TELL
+"You can't make the " D ,PRSO " fly!" CR>)>>
+
+<GLOBAL FLYING? <>>
+
+<ROUTINE I-FLY ()
+ <SETG FLYING? <>>
+ <COND (<EQUAL? <LOC ,WINNER> ,PIT ,REAL-STAIR>
+ <TELL
+"The izyuk spell has worn off! You plummet deeper and deeper into the
+pit! Oddly enough, you never seem to hit bottom. After many years, only
+tattered remnants of you remain, still falling." CR>
+ <FINISH>)
+ (ELSE
+ <TELL
+"You settle gently to the ground." CR>)>>
+
+<ROUTINE V-FILFRE ()
+ <TELL
+"In a blinding burst of pyrotechnics, the air lights up with fireworks
+and dazzling explosions of multicolored fire! In sizzling sparks and
+roiling smoke is written:|
+">
+ <FIXED-FONT-ON>
+ <TELL "|
+ Enchanter|
+ by|
+Dave Lebling|
+ and|
+ Marc Blank|
+|
+Copyright 1983, by Infocom, Inc.|
+|
+">
+ <FIXED-FONT-OFF>
+ <TELL
+"After a while, the smoke dissipates and the lights dim. You remain
+slightly dazzled for a while, but fortunately, this wears off." CR>> \ No newline at end of file
diff --git a/main.zil b/main.zil
new file mode 100644
index 0000000..a743a8e
--- /dev/null
+++ b/main.zil
@@ -0,0 +1,391 @@
+"MAIN for
+ ENCHANTER
+ Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+<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 <>>
+
+<ROUTINE GO ()
+ <PUTB ,P-LEXV 0 59>
+;"put interrupts on clock chain"
+ <ENABLE <QUEUE I-TIRED ,MOVES-PER-DAY>>
+ <ENABLE <QUEUE I-THIRST 41>>
+ <ENABLE <QUEUE I-HUNGER 67>>
+ <ENABLE <QUEUE I-TIME -1>>
+ <ENABLE <QUEUE I-SCURRY 5>>
+ <ENABLE <QUEUE I-MUNG-ROOM 50>>
+;"make sure guards arrive messages happen before adventurer ones"
+ <ENABLE <QUEUE I-GUARDS-ARRIVE 0>>
+ <ENABLE <QUEUE I-ADVENTURER 0>>
+ ;"clean up junk compiler can't do"
+
+;"set up and go"
+ <SETG LIT T>
+ <SETG WINNER ,PLAYER>
+ <SETG HERE ,WEST-FORK>
+ <SETG P-IT-LOC ,HERE>
+ <SETG P-IT-OBJECT <>>
+ <COND (<NOT <FSET? ,HERE ,TOUCHBIT>>
+ <TELL
+
+"It must be the warlock Krill. The odd disappearances, the mysterious
+dissolution of regions sacred to the Circle, the lessening of the Powers --
+these could only be his handiwork. The Circle gathers and its leader, the
+esteemed Belboz, reveals to them an ancient document which portends evil days
+much like our own.|
+|
+\"Krill's evil must be unmade,\" he begins, \"but to send a powerful Enchanter
+is ill-omened. It would be ruinous to reveal oversoon our full powers.\" A
+ripple of concern spreads over the face of each Enchanter. Belboz pauses, and
+collects his resolve. \"Have hope! This has been written by a hand far wiser
+than mine!\"|
+|
+He recites a short spell and you appear. Belboz approaches, transfixing you
+with his gaze, and hands you the document. The other Enchanters await his
+decree. \"These words, written ages ago, can have only one meaning.
+You, a novice Enchanter with but a few simple spells in your Book, must seek
+out Krill, explore the Castle he has overthrown, and learn his secrets. Only
+then may his vast evil be lessened or, with good fortune, destroyed.\"|
+|
+The Circle rises and intones a richly woven spell, whose many textures imbue
+the small, darkened chamber with warmth and hope. There is a surge of power;
+you are Sent." CR>
+ <CRLF>
+ <V-VERSION>
+ <CRLF>)>
+ <MOVE ,WINNER ,HERE>
+ <V-LOOK>
+ <MAIN-LOOP>
+ <AGAIN>>
+
+
+<ROUTINE MAIN-LOOP ("AUX" ICNT OCNT NUM CNT OBJ TBL V PTBL OBJ1 TMP)
+ #DECL ((CNT OCNT ICNT NUM) FIX (V) <OR 'T FIX FALSE> (OBJ) <OR FALSE OBJECT>
+ (OBJ1) OBJECT (TBL) TABLE (PTBL) <OR FALSE ATOM>)
+ <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 "There isn't anything to ">
+ <SET TMP <GET ,P-ITBL ,P-VERBN>>
+ <COND (<OR ,P-OFLAG ,P-MERGED>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>)>
+ <TELL "!" 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
+"I don't know what you're referring to." 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 (<VERB? MAKE-LINE ERASE-LINE> T)
+ (<OR <G? .NUM 1>
+ <EQUAL? <GET <GET ,P-ITBL ,P-NC1>
+ 0>
+ ,W?ALL>>
+ <COND (<EQUAL? .OBJ1
+ ,NOT-HERE-OBJECT>
+ <SETG P-NOT-HERE
+ <+ ,P-NOT-HERE 1>>
+ <AGAIN>)
+ (<AND <EQUAL? ,P-GETFLAGS
+ ,P-ALL>
+ <VERB? TAKE>
+ <NOT <EQUAL?
+ <LOC .OBJ1>
+ ,WINNER
+ ,HERE>>>
+ <AGAIN>)
+ (<AND <VERB? TAKE>
+ ,PRSI
+ <EQUAL? <GET <GET ,P-ITBL
+ ,P-NC1>
+ 0>
+ ,W?ALL>
+ <NOT <IN? ,PRSO ,PRSI>>>
+ <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 <>>)> ;"why is this done? -- pdl"
+ <COND (<LOC ,WINNER>
+ <SET V
+ <APPLY <GETP <LOC ,WINNER> ,P?ACTION>
+ ,M-END>>)>)>
+ <COND (<VERB? AGAIN ;WALK SAVE RESTORE SCORE VERSION> 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
+ TIME 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)
+ #DECL ((A) FIX (O) <OR FALSE OBJECT FIX> (I) <OR FALSE OBJECT> (V) ANY)
+ <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 <NOT-HERE-OBJECT-F>>>
+ <SETG P-WON <>>
+ .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>>>
+ <SETG P-WON <>>
+ .V)
+ (T
+ <SET O ,PRSO>
+ <SET I ,PRSI>
+ <COND (<SET V <D-APPLY "Actor"
+ <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>
+ <SET V <D-APPLY "Container"
+ <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)>>
+
+>)> ;"DON'T REMOVE"
+
+<GLOBAL TOD 0>
+<GLOBAL DAWN 0>
+<GLOBAL SUNRISE 10>
+<GLOBAL DUSK 81>
+<GLOBAL NIGHTFALL 97>
+
+<ROUTINE I-TIME ()
+ <COND (<AND <==? ,HASTED? ,ME>
+ <==? <MOD ,MOVES 2> 0>>
+ <RTRUE>)
+ (<G? <SETG TOD <+ ,TOD 1>> 127>
+ <SETG TOD 0>
+ <SETG NIGHTFALL <- ,NIGHTFALL 20>>
+ <SETG LOSSAGE <+ ,LOSSAGE 1>>
+ <SETG DUSK <- ,DUSK 20>>
+ <SETG MOLESTED <+ ,MOLESTED 5>>
+ <SETG MUNCHED <+ ,MUNCHED 5>>
+ <COND (<L? ,NIGHTFALL 0>
+ <TELL
+"Belboz appears before you, in a magical sending. He speaks, his voice
+soft and saddened. \"You have failed. Universal night has now fallen.
+Krill and his creatures now may freely roam the earth. The power of the
+Circle is diminished, if not broken. I go to prepare the last defense.\"
+The sending vanishes." CR>
+ <FINISH>)>)>
+ <COND (<AND <EQUAL? ,TOD ,NIGHTFALL>
+ <FSET? <LOC ,PLAYER> ,ONBIT>>
+ <TELL
+"The darkened sky is now full of bright stars. It is night." CR>
+ <COND (<L? ,NIGHTFALL 97>
+ <TELL
+"Today seemed shorter than yesterday, somehow." CR>)>
+ <RTRUE>)
+ (<AND <EQUAL? ,TOD ,SUNRISE>
+ <FSET? <LOC ,PLAYER> ,ONBIT>>
+ <TELL
+"The sun has now risen above the hills." CR>)
+ (<AND <EQUAL? ,TOD ,DUSK>
+ <FSET? <LOC ,PLAYER> ,ONBIT>>
+ <TELL
+"The sun starts to set behind the Lonely Mountain in the west." CR>
+ <COND (<L? ,NIGHTFALL 97>
+ <TELL
+"The day is coming to an end earlier than you would have expected." CR>)>
+ <RTRUE>)>>
+
diff --git a/nload.zil b/nload.zil
new file mode 100644
index 0000000..8da580b
--- /dev/null
+++ b/nload.zil
@@ -0,0 +1,66 @@
+"ENCHANTER for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+<ZSTR-OFF>
+
+<PRINC "
+ *** ENCHANTER I: The Warlock ***
+
+">
+
+<BLOAT 90000 0 0 3300 0 0 0 0 0 256>
+
+<GC 0 T 4>
+
+;<GC-MON T>
+
+<SNAME "ENCHANTER">
+
+<SET REDEFINE T>
+
+<GLOBAL BIGFIX 10000>
+
+<OR <GASSIGNED? ZILCH>
+ <SETG WBREAKS <STRING !\" !,WBREAKS>>>
+
+<OR <GASSIGNED? INSERT-CRUFTY>
+ <DEFINE INSERT-CRUFTY (STR) <INSERT-FILE <SPNAME .STR> T>>>
+
+<DEFINE IFILE (A) <INSERT-FILE <SPNAME .A> T>>
+
+<COND (<GASSIGNED? PREDGEN>
+ <ID 0>)>
+
+<ZSTR-ON>
+
+<IFILE SYNTAX>
+
+<IFILE MACROS>
+<IFILE CLOCK>
+<IFILE MAIN>
+<IFILE PARSER>
+
+<INSERT-CRUFTY CRUFTY>
+<IFILE VERBS>
+<IFILE GLOBALS>
+<IFILE TERROR>
+;<IFILE STAIR>
+<IFILE MAGIC>
+;<IFILE KNOT>
+<IFILE PURLOINED>
+<IFILE CASTLE>
+;<IFILE TEMPLE>
+;<IFILE GALLERY>
+;<IFILE EGG>
+<IFILE SLEEP>
+;<IFILE GEARS>
+<IFILE OUTSIDE>
+
+<ROUTINE I-MUNG-ROOM () <>>
+
+<PROPDEF SIZE 5>
+<PROPDEF CAPACITY 0>
+
+<GC-MON> \ No newline at end of file
diff --git a/nmacros.zil b/nmacros.zil
new file mode 100644
index 0000000..e882e7f
--- /dev/null
+++ b/nmacros.zil
@@ -0,0 +1,176 @@
+"MACROS for
+ ENCHANTER
+ (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 "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>)>>>>>
+
+<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 BLT ("ARGS" X "AUX" (TO <MEMQ TO .X>) (LL (())) (L .LL) ATM)
+ <COND (<AND .TO <1? <LENGTH <REST .TO>>>>
+ <SET DEST <NTH .TO 2>>)
+ (ELSE <SET DEST <>>)>
+ <REPEAT ()
+ <COND (<OR <EMPTY? .X> <==? <NTH .X 1> TO>>
+ <RETURN <COND (<LENGTH? .LL 1> <ERROR BLT>)
+ (<LENGTH? .LL 2> <NTH .LL 2>)
+ (ELSE
+ <FORM PROG !.LL>)>>)
+ (ELSE
+ <SET ATM <NTH .X 1>>
+ <COND (<TYPE? .ATM ATOM>
+ <SET ATM <FORM GVAL .ATM>>)>
+ <SET L
+ <REST
+ <PUTREST .L
+ (<COND (.DEST
+ <FORM MOVE .ATM .DEST>)
+ (ELSE
+ <FORM REMOVE .ATM>)>)>>>
+ <SET X <REST .X>>)>>>
+
+<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/outside.zil b/outside.zil
new file mode 100644
index 0000000..be83c58
--- /dev/null
+++ b/outside.zil
@@ -0,0 +1,787 @@
+"OUTSIDE for
+ ENCHANTER
+ Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+"Various hacks you can perform outside the castle"
+
+<ROOM WEST-CASTLE
+ (IN ROOMS)
+ (DESC "Outside Gate")
+ (EAST TO INSIDE-GATE
+ IF IRON-GATE IS OPEN ELSE "The iron gate is locked.")
+ (IN TO INSIDE-GATE
+ IF IRON-GATE IS OPEN ELSE "The iron gate is locked.")
+ (WEST TO WESTERN-ROAD)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (ACTION WEST-CASTLE-F)
+ (GLOBAL IRON-GATE IRON-GATE-CHAINS)>
+
+<ROUTINE WEST-CASTLE-F (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"You are outside the western entrance to the castle. To the east stands
+an iron gate which is ">
+ <COND (<FSET? ,IRON-GATE ,OPENBIT>
+ <TELL "wide open">)
+ (T <TELL "closed and chained">)>
+ <TELL ". A winding road starts here and proceeds
+to the west." CR>)>>
+
+<ROOM WESTERN-ROAD
+ (IN ROOMS)
+ (DESC "Western Road")
+ (LDESC
+"You are on an east-west road, which wends its way through
+the dark, rolling hills of this land. To the west rises a high
+mountain, to the east stands a high castle with dark towers.")
+ (EAST TO WEST-CASTLE)
+ (WEST TO EAST-FORK)
+ (NORTH
+"You would become lost among the brambles. Better to stay on the road.")
+ (SOUTH
+"You would become lost among the brambles. Better to stay on the road.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL HILLS MOUNTAIN DISTANT-CASTLE)>
+
+<ROOM EAST-FORK
+ (IN ROOMS)
+ (DESC "Eastern Fork")
+ (LDESC
+"You are at a fork in the road where paths to the northwest and southwest
+girdle the base of the Lonely Mountain and a smaller path winds its way
+to the east.")
+ (NW TO TRAIL-HEAD)
+ (SW TO VILLAGE-EAST)
+ (EAST TO WESTERN-ROAD)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL HILLS MOUNTAIN)>
+
+<ROOM TRAIL-HEAD
+ (IN ROOMS)
+ (DESC "Trail Head")
+ (LDESC
+"You are on the northeast side of the Lonely Mountain, walking a narrow
+path through rolling hills. On one side of the path is a sign and behind
+that, to the northeast, a winding path through the thick undergrowth. The
+trail continues to the southeast.")
+ (NE TO SHADY-BROOK)
+ (NW TO SHACK-EAST)
+ (SE TO EAST-FORK)
+ ;(WEST "There is no trail up the mountain here.")
+ ;(SOUTH "There is no trail up the mountain here.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL HILLS MOUNTAIN UNDERGROWTH)>
+
+<OBJECT UNDERGROWTH
+ (IN LOCAL-GLOBALS)
+ (DESC "undergrowth")
+ (SYNONYM UNDERGROWTH)
+ (ADJECTIVE THICK)
+ (FLAGS VOWELBIT)
+ (ACTION UNDERGROWTH-F)>
+
+<ROUTINE UNDERGROWTH-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The undergrowth is thick. You would never get through it." CR>)
+ (<VERB? CUT MUNG>
+ <TELL
+"You could spend a few days doing this without much progress." CR>)>>
+
+<OBJECT PATH-SIGN
+ (IN TRAIL-HEAD)
+ (DESC "sign")
+ (SYNONYM SIGN)
+ (FLAGS READBIT NDESCBIT)
+ (ACTION PATH-SIGN-F)>
+
+<ROUTINE PATH-SIGN-F ()
+ <COND (<VERB? EXAMINE READ>
+ <FIXED-FONT-ON>
+ <TELL "|
+ - Shady Brook Trail -|
+|
+ Old Lingolf House|
+ 1000 feet|
+">
+ <FIXED-FONT-OFF>
+ <RTRUE>)>>
+
+<ROOM SHADY-BROOK
+ (IN ROOMS)
+ (DESC "Shady Brook")
+ (LDESC
+"The trail ends here. A ruined stone foundation marks the site of the
+Old Lingolf House, which presumably was a monument of some sort. The
+trail head is off to the southwest, and a small brook flows slowly by.")
+ (SW TO TRAIL-HEAD)
+ ;(NORTH "The only trail heads back to the southwest.")
+ ;(EAST "The only trail heads back to the southwest.")
+ ;(WEST "The only trail heads back to the southwest.")
+ ;(SOUTH "The only trail heads back to the southwest.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL GLOBAL-WATER HILLS MOUNTAIN UNDERGROWTH)>
+
+<OBJECT FOUNDATION
+ (IN SHADY-BROOK)
+ (DESC "foundation")
+ (SYNONYM FOUNDATION HOUSE)
+ (ADJECTIVE STONE RUINED LINGOLF OLD)
+ (FLAGS NDESCBIT)
+ (ACTION FOUNDATION-F)>
+
+<ROUTINE FOUNDATION-F ()
+ <COND (<VERB? THROUGH> <TELL "No way." CR>)
+ (<VERB? WHO> <TELL "There's no way of knowing." CR>)
+ (<VERB? SEARCH LOOK-INSIDE>
+ <TELL
+"There is nothing but stone there." CR>)>>
+
+<OBJECT DISTANT-CASTLE
+ (IN LOCAL-GLOBALS)
+ (DESC "castle")
+ (SYNONYM CASTLE TOWER TOWERS TURRET)
+ (ADJECTIVE HIGH DARK GREAT)
+ (ACTION DISTANT-CASTLE-F)>
+
+<ROUTINE DISTANT-CASTLE-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The castle is far to the east and flanked by dark towers. From this distance,
+not much detail can be discerned." CR>)
+ (<VERB? WALK-TO>
+ <TELL
+"There's no direct path from here, although roads lead there. Try specifying
+a compass direction in order to move around." CR>)>>
+
+<ROOM SHACK-EAST
+ (IN ROOMS)
+ (DESC "Trail")
+ (LDESC
+"The trail turns a corner here, bending out of sight to the southeast and
+southwest. The ground is higher here than to the south, allowing you to make
+out the top of the Lonely Mountain, shrouded in clouds. No path from here
+leads up the mountain, however.")
+ (SE TO TRAIL-HEAD)
+ (SW TO SHACK-ROOM)
+ ;(UP "There is no trail up the mountain here.")
+ ;(SOUTH "There is no trail up the mountain here.")
+ ;(NORTH "There is no trail down the mountain here.")
+ ;(DOWN "There is no trail down the mountain here.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL HILLS MOUNTAIN)>
+
+<ROOM SHACK-ROOM
+ (IN ROOMS)
+ (DESC "Outside of Shack")
+ (LDESC
+"You are south of an old wooden shack, apparently deserted.
+The trail extends from northeast to southwest here, circling the Lonely
+Mountain, which lies to the southeast.")
+ (NE TO SHACK-EAST)
+ (EAST TO SHACK-EAST)
+ (WEST TO WEST-FORK)
+ (SW TO WEST-FORK)
+ (NORTH TO SHACK)
+ (IN TO SHACK)
+ ;(SOUTH "There is no trail up the mountain here.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL SHACK-OBJ HILLS MOUNTAIN)>
+
+<OBJECT SHACK-OBJ
+ (IN LOCAL-GLOBALS)
+ (DESC "wooden shack")
+ (SYNONYM SHACK)
+ (ADJECTIVE OLD WOODEN)
+ (FLAGS NDESCBIT)
+ (ACTION SHACK-OBJ-F)>
+
+<ROUTINE SHACK-OBJ-F ()
+ <COND (<AND <VERB? THROUGH> <EQUAL? ,HERE ,SHACK-ROOM>>
+ <GOTO ,SHACK>
+ <RTRUE>)
+ (<AND <VERB? DROP> <EQUAL? ,HERE ,SHACK>>
+ <GOTO ,SHACK-ROOM>
+ <RTRUE>)>>
+
+<ROOM SHACK
+ (IN ROOMS)
+ (DESC "Inside Shack")
+ (LDESC
+"The inside of the shack is a shambles. An overturned table and bench,
+and a few broken windows remain. An oven is the only fixture
+that's even recognizable. The door is to the south.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL SHACK-OBJ WINDOW)
+ (SOUTH TO SHACK-ROOM)
+ (OUT TO SHACK-ROOM)
+ (TEXT
+"You can't see much except for scrubby vegetation.")
+ (PSEUDO "TABLE" SHACK-STUFF "BENCH" SHACK-STUFF)>
+
+<OBJECT BATTERED-LANTERN
+ (IN SHACK)
+ (DESC "battered lantern")
+ (FDESC
+"The top of a battered lantern is partially visible behind the overturned
+table.")
+ (SYNONYM LANTERN LAMP)
+ (ADJECTIVE BATTERED)
+ (FLAGS TAKEBIT)
+ (ACTION BATTERED-LANTERN-F)>
+
+<ROUTINE BATTERED-LANTERN-F ()
+ <COND (<VERB? ERASE-LINE>
+ <TELL "Aladdin you're not." CR>)
+ (<VERB? LAMP-ON>
+ <TELL
+"The lamp seems to be broken, most likely beyond repair." CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"The lamp is made of brass and is old and battered. It doesn't seem
+likely that any use can be made of it." CR>)
+ (<AND <VERB? LAMP-OFF> <NOT <FSET? ,PRSO ,ONBIT>>>
+ <TELL "It isn't on!" CR>)>>
+
+<ROUTINE SHACK-STUFF ()
+ <COND (<AND <VERB? PUT> <EQUAL? ,PRSI ,PSEUDO-OBJECT>>
+ <TELL
+"They are overturned and don't make good surfaces." CR>)>>
+
+<OBJECT SHACK-OVEN
+ (IN SHACK)
+ (DESC "oven")
+ (SYNONYM OVEN FIXTURE)
+ (FLAGS NDESCBIT CONTBIT VOWELBIT)
+ (CAPACITY 20)
+ (ACTION SHACK-OVEN-F)>
+
+<ROUTINE SHACK-OVEN-F ()
+ <COND (<VERB? LAMP-ON LAMP-OFF>
+ <TELL "It's not working." CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"Strangely, the oven is still slightly warm, as if it had been used
+recently." CR>)>>
+
+<OBJECT BREAD
+ (IN SHACK-OVEN)
+ (DESC "loaf of bread")
+ (SYNONYM LOAF BREAD FOOD)
+ (SIZE 8)
+ (FLAGS TAKEBIT)
+ (ACTION BREAD-F)>
+
+<ROUTINE BREAD-F ("AUX" AMT S)
+ <COND (<VERB? EXAMINE>
+ <TELL "There's "
+ <GET ,BREAD-EXAMINES <GETP ,BREAD ,P?SIZE>>
+ " left." CR>)
+ (<VERB? EAT>
+ <SET S <GET <INT I-HUNGER> ,C-TICK>>
+ <COND (<G? .S 60>
+ <TELL "You aren't the least bit hungry." CR>
+ <RTRUE>)>
+ <PUTP ,BREAD ,P?SIZE <SET AMT <- <GETP ,BREAD ,P?SIZE> 1>>>
+ <SETG SCORE <+ ,SCORE ,EAT-POINT>>
+ <SETG EAT-POINT 0>
+ <TELL
+"Mmm. That tasted great! ">
+ <TELL <GET ,BREAD-AMTS .AMT> CR>
+ <COND (<EQUAL? .AMT 0>
+ <REMOVE ,BREAD>)>
+ <QUEUE I-HUNGER <+ .S 47>>
+ <SETG HUNGER-COUNT 0>
+ <RTRUE>)
+ (<AND <VERB? BURN> <==? ,PRSI ,ETERNAL-FLAME>>
+ <TELL
+"Toast without jam? What a silly idea!" CR>)
+ (<AND <VERB? CUT MUNG> <==? ,PRSI ,MAGIC-KNIFE>>
+ <TELL
+"It seems silly to cut up your bread when it's more easily carried in
+one piece. Besides, you might get crumbs all over your spell book." CR>)>>
+
+<GLOBAL BREAD-EXAMINES <TABLE
+0
+"not much"
+"only a small amount"
+"a good deal"
+"nearly half"
+"about half"
+"a lot"
+"a whole lot"
+"an entire loaf">>
+
+<GLOBAL BREAD-AMTS <TABLE
+"There's none left, though."
+"There's not much left, though."
+"There's only a small amount left, though."
+"There's still a good deal left, too."
+"There's nearly half of it left, too."
+"There's still about half of it left, too."
+"There's a lot of bread left, too."
+"There's a whole lot of it left, too."
+"There's a full loaf, too.">>
+
+<ROOM WEST-FORK
+ (IN ROOMS)
+ (DESC "Fork")
+ (LDESC
+"You stand at a point of decision on a road which makes a wide
+fork to the northeast and southeast, circling the base of the Lonely Mountain,
+which looms high overhead to the east. A very long and winding road starts
+here and stretches out of sight to the west through low, smoky hills.")
+ (WEST TO LONG-ROAD)
+ (NE TO SHACK-ROOM)
+ (SE TO DUSTY-ROAD)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL HILLS MOUNTAIN)>
+
+<ROOM DUSTY-ROAD
+ (IN ROOMS)
+ (DESC "Dusty Trail")
+ (LDESC
+"The trail here turns dry and dusty. To the northwest is the fork leading to
+the Long Road, and the trail continues to the southeast.")
+ (NW TO WEST-FORK)
+ (SE TO HAIRPIN-LOOP)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL HILLS MOUNTAIN)>
+
+<ROOM HAIRPIN-LOOP
+ (IN ROOMS)
+ (DESC "Loop")
+ (LDESC
+"The trail makes a hairpin turn here, swinging out to the northwest and
+northeast, where it enters a small village. Low, smoky hills stretch
+out to the west and south.")
+ (NE TO VILLAGE)
+ (NW TO DUSTY-ROAD)
+ ;(NORTH "There is no trail up the mountain here.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL HILLS MOUNTAIN)>
+
+<ROOM VILLAGE
+ (IN ROOMS)
+ (DESC "Deserted Village")
+ (LDESC
+"This is the castle's village. Formerly, peasants lived here, going to
+their farm plots each day. Merchants and artisans made it a center of
+cultural activity. But now it's deserted. Or almost: there is smoke
+rising from a particularly decrepit hovel to the south. A path travels
+through the village from southwest to northeast, heading towards the
+castle, and a less-used trail heads north up the mountain.")
+ (NE TO VILLAGE-EAST)
+ (SW TO HAIRPIN-LOOP)
+ (NORTH TO MOUNTAIN-TRAIL)
+ (UP TO MOUNTAIN-TRAIL)
+ (EAST
+"You wander around in the village, find nothing of interest, and return to
+the path.")
+ (WEST
+"You wander around in the village, find nothing of interest, and return to
+the path.")
+ (NW
+"You wander around in the village, find nothing of interest, and return to
+the path.")
+ (SE
+"You wander around in the village, find nothing of interest, and return to
+the path.")
+ (IN PER HOVEL-KLUDGE)
+ (SOUTH PER HOVEL-KLUDGE)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL HOVEL HILLS MOUNTAIN)>
+
+<ROOM MOUNTAIN-TRAIL
+ (IN ROOMS)
+ (DESC "Mountain Trail")
+ (LDESC
+"This spot halfway up the Lonely Mountain is desolate of vegetation. Short,
+stunted trees with branches empty surround you and the air is heavy and
+smoke-filled.")
+ (DOWN TO VILLAGE)
+ (SOUTH TO VILLAGE)
+ (UP TO VISTA)
+ (NORTH TO VISTA)
+ (EAST "The trail is narrow and only heads up and down.")
+ (WEST "The trail is narrow and only heads up and down.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL HILLS MOUNTAIN TREES)>
+
+<OBJECT TREES
+ (IN LOCAL-GLOBALS)
+ (DESC "tree")
+ (SYNONYM TREE TREES BRANCH)
+ (ADJECTIVE SHORT STUNTED)
+ (ACTION TREES-F)>
+
+<ROUTINE TREES-F ()
+ <COND (<VERB? CLIMB-UP CLIMB-FOO>
+ <TELL
+"The trees are not suitable for climbing." CR>)
+ (<VERB? EXAMINE>
+ <COND (<FSET? ,HERE ,RMUNGBIT>
+ <TELL
+"The trees are short and stunted and covered in a thick, grey ash. The
+roots themselves are blackened and foul-smelling." CR>)
+ (T
+ <TELL
+"The trees are mostly short and stunted." CR>)>)>>
+
+<ROOM VISTA
+ (IN ROOMS)
+ (DESC "Lonely Mountain")
+ (LDESC
+"This is the top of the Lonely Mountain. In olden days, mariners had
+named it Signal Mountain, for its glistening peak reflected the pale
+moonlight, providing an unmistakable landmark on unclouded nights. The
+bald mountain face is made of a shining substance whose nature is
+unknown to you. Looking to the west, low hills stretch to the horizon,
+and small pieces of the Long Road can be seen winding their way to
+distant lands. To the east, far away, can be seen a great castle at the
+edge of the Sea. Three turrets it has; two, old and still
+majestic, lie on either side of a third, cold, black as night and squat
+as a toad. An evil smoke seems to emanate from this tower, shrouding the
+others in a darkening fog. A small mountain trail leaves the peak and descends
+to the south into a small village far below.")
+ (DOWN TO MOUNTAIN-TRAIL)
+ (SOUTH TO MOUNTAIN-TRAIL)
+ (EAST
+"At the last moment, you remember that you don't know a flying spell.")
+ (WEST
+"At the last moment, you remember that you don't know a flying spell.")
+ (NORTH
+"At the last moment, you remember that you don't know a flying spell.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL DISTANT-CASTLE HILLS MOUNTAIN)>
+
+<OBJECT HOVEL
+ (IN LOCAL-GLOBALS)
+ (DESC "hovel")
+ (SYNONYM HOVEL)
+ (ADJECTIVE DECREPIT)
+ (ACTION HOVEL-F)>
+
+<ROUTINE HOVEL-F ()
+ <COND (<AND <EQUAL? ,HERE ,VILLAGE> <VERB? THROUGH WALK-TO>>
+ <DO-WALK ,P?SOUTH>
+ <RTRUE>)>>
+
+<ROUTINE HOVEL-KLUDGE ()
+ <TELL
+"It is dark and smoky in here, but this is a place of great disorder,
+and its odor is indescribable. A pile of rags sits near a small pot which
+is bubbling and steaming over a tiny fire. The pile of rags sports a gnarled
+hand which busies itself with the noisome stew. A closer look reveals a
+withered crone at the other end of the hand." CR>
+ <COND (<EQUAL? ,CRONE-MOVE 0>
+ <TELL CR
+"The creature looks you over keenly and speaks: \"I should have thought
+they would send someone more ... more ...\" She laughs in an unsettling
+way. \"They've all left! A great storm is brewing in the east, my friend,
+and all have fled before it!\" She starts to chuckle. \"Take this and
+begone!\" With a wave of her hand, you find yourself reeling out of the door
+of the hovel, holding some sort of scroll in your hand." CR>
+ <MOVE ,OPEN-SCROLL ,WINNER>
+ <SETG CRONE-MOVE ,MOVES>)
+ (<L? <- ,MOVES ,CRONE-MOVE> 20>
+ <TELL
+"As you enter the crone's hovel, she booms at you: \"Are you here again?
+What a wizard!\" Her emphasis on the word \"wizard\" is filled with derision.
+\"Make a small effort, would you, to make your Circle proud of you?\" The
+same horrible emphasis on \"proud\" fills you with revulsion. \"Go!\" You
+find yourself back in the village." CR>)
+ (T
+ <SETG CRONE-MOVE ,MOVES>
+ <TELL
+"As you enter, the woman in rags wags her head slowly. \"You've
+returned, have you? You need help perhaps? Well, I've given you all
+the help in my meager store. You want more? Leave me!\" You find
+yourself in the village." CR>)>
+ <RFALSE>>
+
+<GLOBAL CRONE-MOVE 0>
+
+<OBJECT GLOBAL-CRONE
+ (IN GLOBAL-OBJECTS)
+ (DESC "creature swathed in rags")
+ (SYNONYM CRONE)
+ (ACTION GLOBAL-CRONE-F)>
+
+<ROUTINE GLOBAL-CRONE-F ()
+ <COND (<VERB? ZIFMIA>
+ <TELL
+"Slowly, the old woman, swathed in rags, appears before you. She seems to be
+staring through you and speaks slowly and sullenly: \"I thought I might see
+you again, my friend! I gave you all the aid that I can. The rest is up to
+you...\" She disappears." CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"The crone was presumably the village wise woman and its last remaining
+inhabitant." CR>)
+ (T <TELL "The crone isn't here." CR>)>>
+
+<ROOM VILLAGE-EAST
+ (IN ROOMS)
+ (DESC "Village Outskirts")
+ (LDESC
+"You are on a road which enters a small village to the southwest and comes
+to a fork to the northeast. The Lonely Mountain looms above but there is
+no path from here which ascends the mountain.")
+ (SW TO VILLAGE)
+ (NE TO EAST-FORK)
+ (SOUTH "There is no road there.")
+ (NORTH "There is no road there.")
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL HILLS MOUNTAIN)>
+
+<ROOM LONG-ROAD
+ (IN ROOMS)
+ (DESC "Long Road")
+ (EAST PER LONG-ROAD-EXIT-F)
+ (WEST PER LONG-ROAD-EXIT-F)
+ (ACTION LONG-ROAD-F)
+ (FLAGS RLANDBIT ONBIT LIGHTBIT)
+ (GLOBAL HILLS MOUNTAIN FOREST TREES)
+ (PSEUDO "FARM" FARM-PSEUDO)>
+
+<ROUTINE LONG-ROAD-F (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"You are walking along the road. It wends its way through low hills, sparse
+forests, and occasional subsistence farms. To the west, things seem lighter
+and more pleasant. To the east they seem oppressive and dark. A worn sign
+sits beside the road here.">
+ <COND (<==? ,ROAD-LOC ,ROAD-START>
+ <TELL " The deserted village is to the east.">)>
+ <CRLF>)>>
+
+<ROUTINE FARM-PSEUDO ()
+ <COND (<VERB? EXAMINE THROUGH>
+ <TELL
+"It's a poor, run-down farm, and not of interest." CR>)>>
+
+<OBJECT LONG-ROAD-SIGN
+ (IN LONG-ROAD)
+ (DESC "sign")
+ (SYNONYM SIGN)
+ (ADJECTIVE WORN)
+ (FLAGS NDESCBIT)
+ (ACTION LONG-ROAD-SIGN-F)>
+
+<ROUTINE LONG-ROAD-SIGN-F ()
+ <COND (<VERB? EXAMINE READ>
+ <COND (<G? <- ,ROAD-LOC ,ROAD-START> 11>
+ <TELL "The sign is too worn to be read." CR>)
+ (T
+ <TELL "\""
+ <GET ,SIGN-TBL <- ,ROAD-LOC ,ROAD-START>>
+ "\"" CR>)>)>>
+
+<GLOBAL SIGN-TBL <TABLE
+"Why"
+"are"
+"you"
+"going"
+"west"
+"when"
+"the"
+"castle"
+"is"
+"east?"
+"Burma"
+"Shave">>
+
+<ROUTINE LONG-ROAD-EXIT-F ()
+ <COND (<AND <==? ,ROAD-LOC ,ROAD-START>
+ <==? ,PRSO ,P?EAST>>
+ ,WEST-FORK)
+ (ELSE
+ <FCLEAR ,LONG-ROAD ,TOUCHBIT>
+ <ROAD-TO-TABLE ,ROAD-LOC>
+ <COND (<==? ,PRSO ,P?WEST>
+ <SETG ROAD-LOC <+ ,ROAD-LOC 1>>)
+ (<==? ,PRSO ,P?EAST>
+ <SETG ROAD-LOC <- ,ROAD-LOC 1>>)>
+ <TABLE-TO-ROAD ,ROAD-LOC>
+ ,LONG-ROAD)>>
+
+<ROUTINE ROAD-TO-TABLE (SLOC
+ "AUX" TBL (CNT 0)
+ (F <FIRST? ,LONG-ROAD>) N)
+ <SET TBL ,ROAD-TABLE>
+ <REPEAT ()
+ <COND (.F <SET N <NEXT? .F>>)
+ (ELSE <RETURN>)>
+ <COND (<EQUAL? .F ,WINNER>)
+ (<FSET? .F ,TAKEBIT>
+ <REPEAT ()
+ <COND (<==? <GET .TBL .CNT> 0>
+ <PUT .TBL .CNT .SLOC>
+ <PUT .TBL <+ .CNT 1> .F>
+ <SET CNT <+ .CNT 2>>
+ <REMOVE .F>
+ <RETURN>)
+ (ELSE
+ <SET CNT <+ .CNT 2>>)>>)>
+ <SET F .N>>>
+
+<ROUTINE TABLE-TO-ROAD (SLOC
+ "AUX" TBL (CNT 0))
+ <SET TBL ,ROAD-TABLE>
+ <REPEAT ()
+ <COND (<NOT <L? .CNT ,ROAD-TABLE-LENGTH>>
+ <RETURN>)
+ (<==? <GET .TBL .CNT> .SLOC>
+ <PUT .TBL .CNT 0>
+ <MOVE <GET .TBL <+ .CNT 1>> ,LONG-ROAD>)>
+ <SET CNT <+ .CNT 2>>>>
+
+<GLOBAL ROAD-LOC 10000>
+<CONSTANT ROAD-START 10000>
+
+<CONSTANT ROAD-TABLE-LENGTH 80> ;"currently 33 objects with TAKEBIT"
+
+<GLOBAL ROAD-TABLE ;"length should be 2*number of takeable objects"
+ <TABLE 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0>>
+
+<OBJECT ROAD
+ (IN GLOBAL-OBJECTS)
+ (DESC "road")
+ (SYNONYM ROAD PATH TRAIL)
+ (ADJECTIVE WINDING LONG DUSTY DRY)
+ (ACTION ROAD-F)>
+
+<ROUTINE ROAD-F ()
+ <COND (<VERB? FOLLOW TAKE>
+ <TELL
+"You should supply a compass direction in which to follow the path." CR>)
+ (<VERB? DROP>
+ <COND (<OUTSIDE? ,HERE>
+ <TELL
+"It's much safer to stay on the path, especially in these times." CR>)
+ (T
+ <TELL
+"You'll have to give a direction." CR>)>)>>
+
+<OBJECT HILLS
+ (IN LOCAL-GLOBALS)
+ (DESC "hills")
+ (SYNONYM HILL HILLS)
+ (ADJECTIVE LOW ROLLING SMOKY)
+ (ACTION HILLS-F)>
+
+<ROUTINE HILLS-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The hills are mostly low and shrouded in a fine mist-like haze. They
+stretch out mainly to the west." CR>)
+ (<VERB? CLIMB-UP CLIMB-FOO>
+ <PERFORM ,V?LEAVE ,ROAD>
+ <RTRUE>)>>
+
+<OBJECT MOUNTAIN
+ (IN LOCAL-GLOBALS)
+ (DESC "mountain")
+ (SYNONYM MOUNTAIN PEAK)
+ (ADJECTIVE LONELY)
+ (ACTION MOUNTAIN-F)>
+
+<ROUTINE MOUNTAIN-F ()
+ <COND (<AND <VERB? LEAP> <EQUAL? ,HERE ,VISTA>>
+ <JIGS-UP
+"You execute a perfect swan-dive into the rocks below.">)
+ (<VERB? CLIMB-FOO CLIMB-UP>
+ <COND (<EQUAL? ,HERE ,VISTA>
+ <TELL "You are here!" CR>)
+ (<EQUAL? ,HERE ,VILLAGE ,MOUNTAIN-TRAIL>
+ <DO-WALK ,P?UP>)
+ (T
+ <TELL
+"There's no way up the mountain from here." CR>)>)
+ (<VERB? EXAMINE>
+ <TELL
+"The mountain is tall and proud, and its shining peak stands above
+the low-hanging clouds." CR>)>>
+
+<ROUTINE OUTSIDE? (RM)
+ <COND (<NOT <FSET? .RM ,LIGHTBIT>> <RFALSE>)
+ (<OR <EQUAL? .RM ,SHACK ,INSIDE-GATE>
+ <EQUAL? .RM ,PEBBLED-PATH ,COURTYARD-1>
+ <EQUAL? .RM ,COURTYARD-2 ,COURTYARD-3 ,COURTYARD-4>
+ <EQUAL? .RM ,COURTYARD-5 ,COURTYARD-6 ,COURTYARD-7>
+ <EQUAL? .RM ,SHACK-ROOM ,BEDROOM>>
+ <RFALSE>)
+ (ELSE <RTRUE>)>>
+
+<ROUTINE I-SCURRY ()
+ <ENABLE <QUEUE I-SCURRY <+ 15 <RANDOM 20>>>>
+ <COND (<PROB 25>
+ <COND (<OUTSIDE? ,HERE>
+ <COND (<AND <L? ,NIGHTFALL 70> <PROB 50>>
+ <TELL
+"You hear noises in the brambles. Snorting noises are followed by loud
+crashing and finally a hideous squeal of triumph." CR>)
+ (ELSE
+ <TELL
+"You hear a rustling in the brambles nearby, and you catch a glimpse of
+something small and furry as it scurries away." CR>)>)
+ (<OR <EQUAL? ,HERE ,PIT ,REAL-STAIR ,PURLOINED-ROOM>
+ <EQUAL? ,HERE ,WARLOCK-TOWER>>
+ <RFALSE>)
+ (<GETP ,HERE ,P?TMAZE> <RFALSE>)
+ (<OR <EQUAL? <LOC ,WINNER>
+ ,DUNGEON ,NORTH-CELL>
+ <EQUAL? <LOC ,WINNER>
+ ,SECRET-PASSAGE>>
+ <TELL
+"You hear, almost beyond your hearing, the soft rattle of chains, and
+a cold wind blows over the back of your neck." CR>)
+ (<G? ,TOD ,NIGHTFALL>
+ <TELL <PICK-ONE ,NIGHT-GLIMPSES> CR>)
+ (ELSE
+ <TELL <PICK-ONE ,GLIMPSES> CR>)>)>>
+
+<OBJECT GLIMPSE-1
+ (IN GLOBAL-OBJECTS)
+ (DESC "glimpse")
+ (SYNONYM DOG RAT BATS BAT)
+ (ADJECTIVE FERAL GAUNT)
+ (ACTION GLIMPSE-F)>
+
+<OBJECT GLIMPSE-2
+ (IN GLOBAL-OBJECTS)
+ (DESC "glimpse")
+ (SYNONYM MIST OUTLINE BLUEBOTTLE FLY)
+ (ADJECTIVE THIN)
+ (ACTION GLIMPSE-F)>
+
+<ROUTINE GLIMPSE-F ()
+ <COND (<G? ,MOVES 0>
+ <TELL "You can't see that anymore." CR>)
+ (ELSE
+ <TELL "You see no such thing." CR>)>>
+
+<GLOBAL GLIMPSES <LTABLE 0
+"A rat skitters across the floor, sees you, is startled, and rushes
+back the way it came."
+"Bluebottles buzz up to you, and then away."
+"A gaunt, feral-looking dog carrying a well-chewed bone approaches,
+is surprised by your presence, growls and then turns tail.">>
+
+<GLOBAL NIGHT-GLIMPSES <LTABLE 0
+"Bats flutter by, red eyes glowing."
+;"Ahead, a thin mist forms into the ghostly outline of a man. He beckons,
+but before you can approach, the outline wavers, the mist dissolves, and
+all is as before."
+"You hear noises in the darkness nearby."
+"You sense something behind you, turn, and there is nothing there.">>
+
diff --git a/parser.zil b/parser.zil
new file mode 100644
index 0000000..eb05f99
--- /dev/null
+++ b/parser.zil
@@ -0,0 +1,1188 @@
+"PARSER for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+"Parser global variable convention: All parser globals will
+ begin with 'P-'. Local variables are not restricted in any
+ way.
+"
+
+<SETG SIBREAKS ".,\"">
+
+<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>>
+ <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 ;(<AND <EQUAL? .WRD ,W?PERIOD>
+ <EQUAL? .LW ,W?MRS ,W?MR ,W?MS>>
+ <SET LW 0>)
+ (<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 ,ACT?FLY>
+ <OR <==? .LEN 1>
+ <AND <==? .LEN 2>
+ <EQUAL? .VERB ,ACT?WALK ,ACT?FLY>>
+ <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> ;<OR <NOT .VERB>
+ <EQUAL? .VERB ,ACT?WHAT>>>
+ <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>
+ ;<NOT <EQUAL? .VERB ,ACT?ACCUSE>>
+ <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
+"I found 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>)>)>)
+ ;(<OR <EQUAL? .WRD ,W?CAREFULLY ,W?QUIETLY>
+ <EQUAL? .WRD ,W?SLOWLY ,W?QUICKLY
+ ,W?BRIEFLY>>
+ <SETG P-ADVERB .WRD>)
+ (<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>
+ <COND (<EQUAL? .VERB ,ACT?FLY>
+ <SETG TRY-FLY T>)
+ (T
+ <SETG TRY-FLY <>>)>
+ <SETG PRSO .DIR>
+ <SETG P-WALK-DIR .DIR>
+ <RETURN T>)>
+ <SETG P-WALK-DIR <>>
+ <COND (,P-OFLAG <ORPHAN-MERGE>)>
+ ;<COND (<==? <GET ,P-ITBL ,P-VERB> 0> <PUT ,P-ITBL ,P-VERB ,ACT?CALL>)>
+ <COND (<AND <SYNTAX-CHECK> <SNARF-OBJECTS> <TAKE-CHECK> <MANY-CHECK>>
+ T)>>
+
+
+<GLOBAL TRY-FLY <>>
+
+<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))
+ #DECL ((PTR VAL OFF NUM) FIX (WRD NW) <OR FALSE FIX TABLE>
+ (ANDFLG FIRST??) <OR ATOM FALSE>)
+ <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 (<AND <==? .WRD ,W?OF>
+ <==? <GET ,P-ITBL ,P-VERB> ,ACT?ACCUSE>>
+ <PUT ,P-LEXV .PTR ,W?WITH>
+ <SET WRD ,W?WITH>)>
+ <COND ;(<AND <EQUAL? .WRD ,W?PERIOD>
+ <EQUAL? .LW ,W?MRS ,W?MR ,W?MS>>
+ <SET LW 0>)
+ (<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 <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 5000> <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>
+
+
+
+<ROUTINE ORPHAN-MERGE ("AUX" (CNT -1) TEMP VERB BEG END (ADJ <>) WRD)
+ #DECL ((CNT TEMP VERB) FIX (BEG END) <PRIMTYPE VECTOR> (WRD) TABLE)
+ <SETG P-OFLAG <>>
+ <COND
+ (<AND <NOT <0? <SET VERB <GET ,P-ITBL ,P-VERB>>>>
+ <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>>
+ <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>>
+ <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>)>)
+ (,P-ACLAUSE
+ <COND
+ (<NOT <==? ,P-NCN 1>> <SETG P-ACLAUSE <>> <RFALSE>)
+ (T
+ <SET BEG <GET ,P-ITBL ,P-NC1>>
+ <SET END <GET ,P-ITBL ,P-NC1L>>
+ <REPEAT ()
+ <COND (<==? .BEG .END>
+ <COND (.ADJ
+ <ACLAUSE-WIN .ADJ>
+ <RETURN>)
+ (T
+ <SETG P-ACLAUSE <>>
+ <RFALSE>)>)
+ (<AND <BTST <GETB <SET WRD <GET .BEG 0>> ,P-PSOFF>
+ ,PS?ADJECTIVE>
+ <NOT .ADJ>>
+ <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>>>)>)>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN>
+ <SETG P-MERGED T>
+ <RTRUE>)
+ (T <PUT ,P-ITBL .CNT <GET ,P-OTBL .CNT>>)>>
+ T>
+
+<ROUTINE ACLAUSE-WIN (ADJ)
+ <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)
+ #DECL ((PTR BUF) FIX)
+ <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)
+ #DECL ((PTR BUF) FIX)
+ <TELL "I can't use the word \"">
+ <WORD-PRINT <GETB <REST ,P-LEXV <SET BUF <* .PTR 2>>> 2>
+ <GETB <REST ,P-LEXV .BUF> 3>>
+ <TELL "\" here." 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)
+ #DECL ((DRIVE1 DRIVE2) <OR FALSE <PRIMTYPE VECTOR>>
+ (SYN) <PRIMTYPE VECTOR> (LEN NUM VERB PREP) FIX
+ (OBJ) <OR FALSE OBJECT>)
+ <COND (<0? <SET VERB <GET ,P-ITBL ,P-VERB>>>
+ <TELL "I can't find a 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 "I don't understand that sentence." 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 ;,ACT?WHAT>
+ <TELL "I can't answer that question." 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))
+ #DECL ((D1 D2) <OR FALSE <PRIMTYPE VECTOR>>)
+ <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 <>))
+ #DECL ((BEG END) <PRIMTYPE VECTOR> (CP) <OR FALSE ATOM>)
+ <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 PREP-PRINT (PREP "AUX" WRD)
+ #DECL ((PREP) FIX)
+ <COND (<NOT <0? .PREP>>
+ <TELL " ">
+ <SET WRD <PREP-FIND .PREP>>
+ <PRINTB .WRD>)>>
+
+<ROUTINE CLAUSE-COPY (BPTR EPTR "OPTIONAL" (INSRT <>) "AUX" BEG END)
+ #DECL ((BPTR EPTR) FIX (BEG END) <PRIMTYPE VECTOR>
+ (INSRT) <OR FALSE TABLE>)
+ <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)
+ #DECL ((WRD) TABLE (PTR) FIX)
+ <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)
+ #DECL ((PREP CNT SIZE) FIX)
+ <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)
+ #DECL ((SYN) <PRIMTYPE VECTOR>)
+ <SETG P-SYNTAX .SYN>
+ <SETG PRSA <GETB .SYN ,P-SACTION>>>
+
+<GLOBAL P-GWIMBIT 0>
+
+<ROUTINE GWIM (GBIT LBIT PREP "AUX" OBJ)
+ #DECL ((GBIT LBIT) FIX (OBJ) OBJECT)
+ <COND (<==? .GBIT ,RLANDBIT>
+ <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>
+ <SET OBJ <GET ,P-MERGE 1>>
+ <TELL "(">
+ <COND (<NOT <0? .PREP>>
+ <PRINTB <PREP-FIND .PREP>>
+ <COND ;(<==? .OBJ ,HANDS>
+ <TELL " your hands)" CR>)
+ (T
+ <TELL " the ">)>)>
+ <TELL D .OBJ ")" CR>
+ .OBJ)>)
+ (T <SETG P-GWIMBIT 0> <RFALSE>)>>
+
+<ROUTINE SNARF-OBJECTS ("AUX" PTR)
+ #DECL ((PTR) <OR FIX <PRIMTYPE VECTOR>>)
+ <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)
+ #DECL ((TBL NTBL) TABLE (LEN BUTLEN MATCHES) FIX (OBJ) OBJECT)
+ <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 50>>
+
+<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)
+ #DECL ((TBL) TABLE (PTR EPTR) <PRIMTYPE VECTOR>
+ (BUT) <OR FALSE TABLE> (WV) <OR FALSE FIX>)
+ <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)
+ #DECL ((TBL) TABLE (XBITS BITS TLEN LEN) FIX (GWIM) <OR FALSE FIX>
+ (VRB GCHECK) <OR ATOM FALSE>)
+ <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 "I couldn't find a noun 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>
+ <COND (<EQUAL? <GET .TBL 0> .TLEN>
+ <COND (<AND ,P-ADJ <EQUAL? ,P-NAM ,W?SPELL <>>>
+ <SETG P-NAM ,P-ADJN>)>
+ <SPELL-CHECK .TBL ,P-NAM>)>)>
+ <SET LEN <- <GET .TBL ,P-MATCHLEN> .TLEN>>
+ <COND (<BTST ,P-GETFLAGS ,P-ALL> ;<AND * <NOT <EQUAL? .LEN 0>>>)
+ (<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
+"I couldn't find a noun 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-TABLE .TBL>
+ <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)
+ #DECL ((TBL) TABLE (RMG) <OR FALSE TABLE> (RMGL CNT) FIX (OBJ) OBJECT)
+ <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)
+ #DECL ((OBJ) OBJECT (BIT1 BIT2 BTS) FIX)
+ <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)
+ #DECL ((OBJ NOBJ) <OR FALSE OBJECT> (TBL) TABLE (LVL) FIX (FLS) ANY)
+ <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)
+ #DECL ((OBJ) OBJECT (TBL) TABLE (PTR) FIX)
+ <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 BTS "AUX" PTR OBJ TAKEN)
+ #DECL ((TBL) TABLE (BTS PTR) FIX (OBJ) OBJECT
+ (TAKEN) <OR FALSE FIX ATOM>)
+ <COND (<AND <SET PTR <GET .TBL ,P-MATCHLEN>> <BTST .BTS ,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 (<NOT <IN? .OBJ ,WINNER>>
+ <SETG PRSO .OBJ>
+ <COND (<FSET? .OBJ ,TRYTAKEBIT>
+ <SET TAKEN T>)
+ (<==? <ITAKE <>> T>
+ <SET TAKEN <>>)
+ (T <SET TAKEN T>)>
+ <COND (<AND .TAKEN <BTST .BTS ,SHAVE>>
+ <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>)
+ (<NOT .TAKEN>
+ <TELL "(Taken)" CR>)>)>)>>)
+ (T)>>
+
+<ROUTINE MANY-CHECK ("AUX" (LOSS <>) TMP)
+ #DECL ((LOSS) <OR FALSE FIX>)
+ <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 "I 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))
+ #DECL ((ITM) ANY (TBL) TABLE (SIZE CNT) FIX)
+ <REPEAT ()
+ <COND (<==? .ITM <GETB .TBL .CNT>> <RTRUE>)
+ (<IGRTR? CNT .SIZE> <RFALSE>)>>>
+
+<GLOBAL ALWAYS-LIT <>>
+
+<ROUTINE LIT? (RM "OPTIONAL" (RMBIT T) "AUX" OHERE (LIT <>))
+ #DECL ((RM OHERE) OBJECT (LIT) <OR ATOM FALSE>)
+ <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>)
+ (<AND .RMBIT
+ <NOT <G? ,TOD ,NIGHTFALL>>
+ <FSET? .RM ,LIGHTBIT>>
+ <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> <>>)>> \ No newline at end of file
diff --git a/purloined.zil b/purloined.zil
new file mode 100644
index 0000000..3ae0315
--- /dev/null
+++ b/purloined.zil
@@ -0,0 +1,1059 @@
+"PURLOINED for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+;"La Grande Illusion"
+
+<ROOM PURLOINED-ROOM
+ (IN ROOMS)
+ (DESC "Guarded Door")
+ (WEST TO NORTH-GATE)
+ (UP TO MAP-ROOM IF DOOR-REALITY IS OPEN)
+ (NORTH TO MAP-ROOM IF DOOR-REALITY IS OPEN)
+ (FLAGS RLANDBIT)
+ (ACTION PURLOINED-ROOM-F)
+ (ADVFCN PURLOINED-ROOM-A)
+ (GLOBAL DOOR-ILLUSION DOOR-REALITY)>
+
+<OBJECT DOOR-REALITY
+ (IN LOCAL-GLOBALS)
+ (DESC "simple wooden door")
+ (SYNONYM DOOR)
+ (ADJECTIVE SIMPLE WOODEN)
+ (FLAGS NDESCBIT LOCKEDBIT INVISIBLE DOORBIT CONTBIT)>
+
+<ROOM MAP-ROOM
+ (IN ROOMS)
+ (DESC "Map Room")
+ (LDESC
+"This room in the high tower appears to be a map room, with hundreds of ancient
+maps covering the walls. A huge globe, made of gold, sits on a pedestal in the
+center of the room. Through the tower windows can be seen a vast forest
+stretching out to the northeast and the sea, covered in fog, to the east and
+south. Stairs to the south lead to the bottom of the tower.")
+ (DOWN TO PURLOINED-ROOM IF DOOR-REALITY IS OPEN)
+ (SOUTH TO PURLOINED-ROOM IF DOOR-REALITY IS OPEN)
+ (FLAGS RLANDBIT)
+ (TEXT
+"Through the windows you can discern a vast forest to the northeast and the
+fog-shrouded sea stretching out to the east and south.")
+ (GLOBAL DOOR-REALITY WINDOW FOREST SEA)>
+
+<OBJECT MAPS
+ (IN MAP-ROOM)
+ (DESC "maps")
+ (SYNONYM MAPS WALL WALLS)
+ (ADJECTIVE ANCIENT)
+ (FLAGS NDESCBIT)
+ (ACTION MAPS-F)>
+
+<ROUTINE MAPS-F ()
+ <COND (<VERB? TAKE>
+ <TELL
+"Most of the maps are murals painted onto the walls. The others are securely
+mounted." CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"The maps on the walls were made in the Elder days, when the face of the earth
+was different. You can recognize the ancient cities of Galepath and Mareilon
+on the shores of the Sea from your legends class at the University, but you
+have trouble discerning any other places. One map shows a proud castle
+standing on a cliff rising above the Sea. Largoneth it was, the once-proud
+home of Entharion the Wise, King of Quendor. As you realize that this place
+was the King's Map Room, you are filled with wonder at the ancient days."
+CR>)>>
+
+<OBJECT ENTHARION
+ (IN GLOBAL-OBJECTS)
+ (DESC "Entharion")
+ (SYNONYM ENTHARION)
+ (FLAGS VILLAIN)
+ (ACTION ENTHARION-F)>
+
+<ROUTINE ENTHARION-F ()
+ <COND (<VERB? EXAMINE WHO>
+ <TELL
+"You can remember little of the legends of Entharion the Wise. Perhaps you
+should have paid more attention in Legends class." CR>)
+ (<VERB? ZIFMIA>
+ <TELL
+"Poor Entharion, he's been dead these many years. You would need more
+than a summoning spell to get him here." CR>)>>
+
+<OBJECT GLOBE
+ (IN PEDESTAL)
+ (DESC "golden globe")
+ (SYNONYM GLOBE)
+ (ADJECTIVE GOLD GOLDEN)
+ (FLAGS NDESCBIT)
+ (ACTION GLOBE-F)>
+
+<ROUTINE GLOBE-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The globe represents the world as it was thought to be in the ancient
+days. Very little can be recognized of the seas or land masses." CR>)>>
+
+<OBJECT PEDESTAL
+ (IN MAP-ROOM)
+ (DESC "pedestal")
+ (SYNONYM PEDESTAL)
+ (FLAGS NDESCBIT CONTBIT OPENBIT SURFACEBIT)
+ (ACTION PEDESTAL-F)>
+
+<ROUTINE PEDESTAL-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL "A globe is sitting on it." CR>)>>
+
+<GLOBAL DOOR-ILLUSION-GONE <>>
+
+;"A pronounced 'blue shift' (actually purple) occurs here."
+
+<ROUTINE PURLOINED-ROOM-F (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <COND (<NOT ,DOOR-ILLUSION-GONE>
+ <TELL
+"A more incongruous place than this would be difficult to believe. The room
+itself is nothing more than a small room at the base of the northeast tower
+with a narrow passageway entering from the west. Standing in front of
+you to the north, however, is a door surpassing anything you could have
+imagined. For starters, its massive lock is wrapped in a dozen six-inch thick
+iron chains. In addition, a certain five-headed monster sporting razor-sharp
+spears for tongues seems to be imbedded within its heavy oak frame. One is
+almost embarrassed to mention the gargoyles spewing flame and sulphurous ash
+which ornament either side of the door, or the ninety-seven slimy groping
+tentacles which taunt you ever closer to certain death. A sign, floating
+serenely above the door and glowing hideously in purple letters, offers
+the following rude understatement: ">
+ <TELL <GETP ,FLOATING-SIGN ,P?TEXT> "." CR>)
+ (T
+ <TELL
+"This rather unobtrusive room at the base of the northwest tower sports a small
+passageway to the west and a small, rickety door to the north
+which is ">
+ <COND (<FSET? ,DOOR-REALITY ,OPENBIT>
+ <TELL "open">)
+ (T <TELL "closed">)>
+ <TELL "." CR>)>)
+ (<AND <EQUAL? .RARG ,M-BEG>
+ <VERB? WALK>
+ <EQUAL? ,PRSO ,P?UP ,P?NORTH>
+ <NOT ,DOOR-ILLUSION-GONE>>
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <PERFORM ,V?OPEN ,DOOR-ILLUSION>
+ <RTRUE>)
+ (T
+ <TELL "\"I'd like to, but the door's closed.\"" CR>
+ <RTRUE>)>)>>
+
+<OBJECT DOOR-ILLUSION
+ (IN LOCAL-GLOBALS)
+ (DESC "guarded door")
+ (SYNONYM DOOR)
+ (ADJECTIVE GUARDED OAK)
+ (FLAGS VICBIT DOORBIT CONTBIT NDESCBIT)
+ (ACTION DOOR-ILLUSION-F)>
+
+<GLOBAL BEATEN-UP 0>
+
+<GLOBAL DOOR-KULCAD <>>
+
+<ROUTINE DOOR-ILLUSION-F ()
+ <COND (<NOT ,DOOR-ILLUSION-GONE>
+ <COND (<VERB? KULCAD>
+ <TELL
+"As the last syllable of the kulcad spell echoes through the chamber,
+the door itself seems to dissolve. Slowly at first, then quickly, each
+of its rather unlovely ornaments turns pale, then transparent, then -
+nothing! What remains is a simple, wooden door which is standing shut.
+You move hesitantly toward the door. Nothing. You pause for
+a moment to regain your composure." CR>
+ <SETG DOOR-KULCAD T>
+ <FSET ,DOOR-ILLUSION ,INVISIBLE>
+ <FCLEAR ,DOOR-REALITY ,INVISIBLE>
+ <FCLEAR ,DOOR-REALITY ,OPENBIT>
+ <FCLEAR ,DOOR-REALITY ,LOCKEDBIT>
+ <SETG DOOR-ILLUSION-GONE T>
+ <REMOVE ,MONSTERS-1>
+ <REMOVE ,MONSTERS-2>
+ <REMOVE ,MONSTERS-3>)
+ (<AND <VERB? SHOW>
+ <EQUAL? ,PRSI ,ADVENTURER>>
+ <PERFORM ,V?POINT ,PRSO>
+ <RTRUE>)
+ (<AND <VERB? POINT>
+ <IN? ,ADVENTURER ,HERE>>
+ <SETG ADVENTURER-STAY T>
+ <COND (,ADVENTURER-CHARMED
+ <TELL
+"As you motion toward the monstrous door, the adventurer follows the imaginary
+line which proceeds thence from your outstretched arm." CR CR>
+ <NO-ILLUSIONS>
+ <RTRUE>)
+ (T
+ <TELL
+"The adventurer seems frightened, and he backs up toward the door." CR>)>)
+ (<VERB? OPEN RUB UNLOCK MUNG KILL ATTACK KNOCK>
+ <COND (<G? <SETG BEATEN-UP <+ ,BEATEN-UP 1>> 4>
+ <JIGS-UP
+"You've really gotten those tentacles in an uproar. Sixty-three of them
+grab you and pull in sixty-three different directions. Not good for the
+digestion.">
+ <RTRUE>)>
+ <TELL <PICK-ONE ,ILLUSION-HACKS> CR>
+ <PUTP ,FLOATING-SIGN
+ ,P?TEXT
+ <PICK-ONE ,SIGN-TEXTS>>
+ <RTRUE>)
+ (<VERB? REZROV>
+ <TELL
+"As you cast the rezrov spell, the door shudders briefly, and
+a few tentacles pause in their unending motion. The two gargoyles look
+at each other, perplexed. After a tense moment, the sign above the door
+flashes briefly: \"Fat Chance\"." CR>)>)>>
+
+<GLOBAL SIGN-TEXTS <LTABLE 0
+"\"Give Up\"" "\"Go Away\"" "\"Had Enough?\"">>
+
+<OBJECT FLOATING-SIGN
+ (IN PURLOINED-ROOM)
+ (DESC "sign")
+ (SYNONYM SIGN LETTER)
+ (ADJECTIVE FLOATING PURPLE)
+ (FLAGS READBIT NDESCBIT)
+ (TEXT "\"Don't Bother\"")>
+
+<OBJECT MONSTERS-1
+ (IN PURLOINED-ROOM)
+ (DESC "monster")
+ (SYNONYM MONSTER TENTACLE GARGOYLE DRAGON)
+ (ADJECTIVE FIVE-HEADED GROPING SLIMY)
+ (FLAGS NDESCBIT VICBIT)
+ (ACTION DOOR-ILLUSION-F)>
+
+<OBJECT MONSTERS-2
+ (IN PURLOINED-ROOM)
+ (DESC "iron chain")
+ (SYNONYM CHAIN CHAINS)
+ (ADJECTIVE SIX-INCH THICK IRON HEAVY)
+ (FLAGS NDESCBIT VICBIT VOWELBIT)
+ (ACTION DOOR-ILLUSION-F)>
+
+<OBJECT MONSTERS-3
+ (IN PURLOINED-ROOM)
+ (DESC "spear")
+ (SYNONYM SPEAR SPEARS TONGUE)
+ (FLAGS NDESCBIT VICBIT)
+ (ACTION DOOR-ILLUSION-F)>
+
+<GLOBAL ILLUSION-HACKS <LTABLE 0
+"Two, or perhaps three, monster heads reach out for you, spearing
+you in the process."
+"One of the gargoyles spits in your direction, burning your arm
+with incendiary byproducts."
+"Three or four tentacles grab you briefly and send you flying."
+"You manage to reach one of the iron chains before it turns into
+a pair of teeth and bites you."
+"The floating sign, once serene, knocks you delicately over the head."
+"The door opens, and nineteen demons, each a cross between
+a carrot and a sledge hammer, march out from behind it, knock you
+senseless, and return, the last closing the door behind it.">>
+
+;"Parlor magic, this time with mirrors"
+
+<ROOM MIRROR-HALL-1
+ (IN ROOMS)
+ (DESC "Hall of Mirrors One")
+ (WEST TO NW-TOWER)
+ (EAST TO MIRROR-HALL-2)
+ (FLAGS RLANDBIT)
+ (COUNT 1)
+ (ACTION MIRROR-HALL-F)
+ (GLOBAL ADVENTURER-LG MIRROR MIRROR-STUFF SHARDS)>
+
+<OBJECT GLOBAL-ADVENTURER
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM ADVENTURER)
+ (DESC "adventurer")
+ (ACTION GLOBAL-ADVENTURER-F)
+ (FLAGS VOWELBIT)>
+
+<ROOM MIRROR-HALL-2
+ (IN ROOMS)
+ (DESC "Hall of Mirrors Two")
+ (WEST TO MIRROR-HALL-1)
+ (EAST TO MIRROR-HALL-3)
+ (FLAGS RLANDBIT)
+ (COUNT 2)
+ (ACTION MIRROR-HALL-F)
+ (GLOBAL ADVENTURER-LG MIRROR MIRROR-STUFF SHARDS)>
+
+<ROOM MIRROR-HALL-3
+ (IN ROOMS)
+ (DESC "Hall of Mirrors Three")
+ (WEST TO MIRROR-HALL-2)
+ (EAST TO MIRROR-HALL-4)
+ (FLAGS RLANDBIT)
+ (COUNT 3)
+ (ACTION MIRROR-HALL-F)
+ (GLOBAL ADVENTURER-LG MIRROR MIRROR-STUFF SHARDS)>
+
+<ROOM MIRROR-HALL-4
+ (IN ROOMS)
+ (DESC "Hall of Mirrors Four")
+ (WEST TO MIRROR-HALL-3)
+ (EAST TO NORTH-GATE)
+ (FLAGS RLANDBIT)
+ (COUNT 4)
+ (ACTION MIRROR-HALL-F)
+ (GLOBAL ADVENTURER-LG MIRROR MIRROR-STUFF SHARDS)>
+
+<OBJECT MIRROR
+ (IN LOCAL-GLOBALS)
+ (DESC "mirror")
+ (SYNONYM MIRROR)
+ (FLAGS NDESCBIT VICBIT)
+ (ACTION MIRROR-F)>
+
+<ROUTINE MIRROR-F ()
+ <COND (<FSET? ,HERE ,NDESCBIT>
+ <COND (<VERB? KREBF>
+ <FCLEAR ,HERE ,NDESCBIT>
+ <TELL
+"Shards of glass fly into the air, solving a jigsaw puzzle of a million
+pieces. The mirror is repaired!" CR>)
+ (ELSE
+ <TELL
+"There's no mirror left here after the way you treated it." CR>)>)
+ (<VERB? LOOK-INSIDE EXAMINE>
+ <TELL
+"The scene behind the \"mirror\" is an underground landscape.">
+ <COND (<NOT <FSET? ,ADVENTURER-LG ,INVISIBLE>>
+ <TELL " A weary
+adventurer is standing there, dejected.">)>
+ <CRLF>)
+ (<VERB? MUNG ATTACK>
+ <TELL
+"The mirror here smashes into tiny shards. Behind the mirror is a bare
+rock wall." CR>
+ <NO-MORE-ADVENTURER>
+ <FSET ,HERE ,NDESCBIT>)>>
+
+<OBJECT SHARDS
+ (IN LOCAL-GLOBALS)
+ (DESC "shards of glass")
+ (SYNONYM GLASS SHARDS)
+ (FLAGS NDESCBIT)
+ (ACTION SHARDS-F)>
+
+<ROUTINE SHARDS-F ()
+ <COND (<NOT <FSET? ,HERE ,NDESCBIT>>
+ <TELL "There are no shards of glass here...yet." CR>)
+ (<VERB? TAKE MOVE PUT RUB>
+ <TELL "You would slice your fingers on them." CR>)>>
+
+<GLOBAL MIRROR-HALL-TBL1 <LTABLE
+"This is the western end of the"
+"This is a spot within the long"
+"This is a spot within the long"
+"This is the eastern end of the">>
+
+<ROUTINE MIRROR-HALL-F (RARG "AUX" RM)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL <GET ,MIRROR-HALL-TBL1 <SET RM <GETP ,HERE ,P?COUNT>>>>
+ <COND (<FSET? ,HERE ,NDESCBIT>
+ <TELL " Hall of Mirrors. Where there used to be a large
+mirror mounted on the wall is only an empty frame. Shards of mirror cover the
+floor." CR>)
+ (T
+ <TELL " Hall of Mirrors. The hall itself is
+astounding and not a little bit confusing. To be sure, its northern wall is
+glass, but it does not seem to reflect anything within the hall. Rather, it
+seems to be a window on another world. This other world appears to be a large
+underground labyrinth, filled with tunnels, caves, and peculiar rock
+formations." CR>)>
+ <COND (,ADVENTURER-LOC
+ <DESCRIBE-ADVENTURER>)>)
+ (<AND <EQUAL? .RARG ,M-END>
+ <NOT <FSET? ,HERE ,NDESCBIT>>
+ <NOT ,ADVENTURER-SUMMONED>
+ <FSET? ,ADVENTURER-LG ,INVISIBLE>
+ <PROB 15>>
+ <SETG ADVENTURER-LOC ,HERE>
+ <ENABLE <QUEUE I-LG-ADVENTURER -1>>
+ <TELL
+"From the other side of the \"mirror\" a bedraggled adventurer comes into
+view, carrying a brass lantern and an elvish sword, which is glowing dimly.
+He stops and stares in your direction." CR>
+ <SETG ADVENTURER-SEEN T>
+ <FCLEAR ,ADVENTURER-LG ,INVISIBLE>)>>
+
+<OBJECT MIRROR-STUFF
+ (IN LOCAL-GLOBALS)
+ (DESC "mirror environment")
+ (SYNONYM CAVE TUNNEL FORMATION LABYRINTH)
+ (ADJECTIVE ROCK)
+ (ACTION MIRROR-STUFF-F)>
+
+<ROUTINE MIRROR-STUFF-F ()
+ <COND (<FSET? ,HERE ,NDESCBIT>
+ <GLOBAL-NOT-HERE-PRINT ,MIRROR-STUFF>)
+ (<VERB? EXAMINE>
+ <TELL
+"The scene is an underground world, quite dissimilar from your own." CR>)>>
+
+<GLOBAL ADVENTURER-SEEN <>>
+
+<ROUTINE NO-MORE-ADVENTURER ()
+ <FSET ,ADVENTURER-LG ,INVISIBLE>
+ <SETG ADVENTURER-LOC <>>
+ <QUEUE I-LG-ADVENTURER 0>
+ <RTRUE>>
+
+<ROUTINE I-LG-ADVENTURER ()
+ <COND (<OR ,ADVENTURER-SUMMONED
+ <NOT <EQUAL? ,HERE ,ADVENTURER-LOC>>>
+ <NO-MORE-ADVENTURER>
+ <RFALSE>)
+ (<PROB 25>
+ <TELL
+"The adventurer, after checking his compass, walks off." CR>
+ <NO-MORE-ADVENTURER>
+ <RTRUE>)>>
+
+<GLOBAL ADVENTURER-LOC <>>
+
+<GLOBAL ADVENTURER-SUMMONED <>>
+
+<GLOBAL ADVENTURER-FEEBLES <LTABLE 0
+"stares in your direction but seems not to see you"
+"is combing his hair"
+"is wandering around his surroundings, seemingly lost"
+"is deep in thought">>
+
+<ROUTINE DESCRIBE-ADVENTURER ()
+ <TELL
+"A bedraggled adventurer, carrying a brass lantern and a dimly glowing elvish
+sword, can be seen through the \"mirror\". He ">
+ <TELL <PICK-ONE ,ADVENTURER-FEEBLES> "." CR>>
+
+<OBJECT ADVENTURER-LG
+ (IN LOCAL-GLOBALS)
+ (DESC "adventurer")
+ (SYNONYM ADVENTURER PERSON)
+ (ADJECTIVE WEARY BEDRAGGLED)
+ (FLAGS NDESCBIT VOWELBIT INVISIBLE)
+ (ACTION ADVENTURER-LG-F)>
+
+<ROUTINE GLOBAL-ADVENTURER-F ()
+ <COND (<VERB? ZIFMIA>
+ <NO-ZIF>)
+ (<AND <VERB? FOLLOW> ,ADVENTURER-SUMMONED>
+ <COND (<EQUAL? ,ADV-OLD-LOC ,HERE>
+ <GOTO ,ADV-NEW-LOC>
+ <RTRUE>)
+ (T
+ <TELL "You have lost track of him." CR>)>)
+ (T
+ <GLOBAL-NOT-HERE-PRINT ,GLOBAL-ADVENTURER>
+ <RTRUE>)>>
+
+<ROUTINE ADVENTURER-LG-F ()
+ <COND (<VERB? EXAMINE>
+ <DESCRIBE-ADVENTURER>)
+ (<VERB? WAVE-AT>
+ <TELL "He doesn't seem to notice your gesture." CR>)
+ (<VERB? ZIFMIA>
+ <TELL
+"All at once, the bedraggled adventurer appears before you, brightly glowing
+sword in hand. His jaw has dropped and his eyes are bulging. His eyes dart
+this way and that, as if looking for a way to escape." CR>
+ <SETG SCORE <+ ,SCORE ,SUMMON-POINT>>
+ <SETG SUMMON-POINT 0>
+ <MOVE ,ADVENTURER ,HERE>
+ <SETG ADVENTURER-SUMMONED T>
+ <SETG ADVENTURER-STAY T>
+ <ENABLE <QUEUE I-ADVENTURER -1>>
+ <THIS-IS-IT ,ADVENTURER>
+ <RTRUE>)
+ (<VERB? CLEESH>
+ <TELL
+"The spell has no effect, perhaps because he isn't here." CR>)
+ (<VERB? GUNCHO>
+ <TELL
+"Behind the \"mirror\", the luckless adventurer seems to fade away.
+He shimmers briefly and then vanishes without a trace." CR>
+ <NO-MORE-ADVENTURER>
+ <SETG ADVENTURER-SUMMONED T>)>>
+
+<OBJECT ADVENTURER
+ (DESC "adventurer")
+ (SYNONYM ADVENTURER PERSON)
+ (ADJECTIVE BEDRAGGLED WEARY)
+ (FLAGS VICBIT VILLAIN VOWELBIT CONTBIT OPENBIT)
+ (DESCFCN ADVENTURER-D)
+ (CONTFCN ADVENTURER-C)
+ (CAPACITY 100)
+ (ACTION ADVENTURER-F)>
+
+<ROUTINE ADVENTURER-C ()
+ <COND (<VERB? TAKE>
+ <PERFORM ,V?ASK-FOR ,ADVENTURER ,PRSO>
+ <RTRUE>)
+ (<VERB? READ>
+ <COND (<NOT ,ADVENTURER-CHARMED>
+ <TELL
+"The adventurer pulls back as you approach." CR>)
+ (T
+ <TELL
+"The adventurer moves closer so that you might read it." CR>
+ <RFALSE>)>)>>
+
+<ROUTINE ADVENTURER-D (RARG)
+ <TELL
+"There is a bedraggled and weary adventurer standing here. He is carrying
+">
+ <PRINT-CONTENTS ,ADVENTURER>
+ <COND (,ADVENTURER-CHARMED
+ <TELL ".
+He seems pleased to see you and frequently smiles in your direction">)>
+ <TELL "." CR>>
+
+<OBJECT LANTERN
+ (IN ADVENTURER)
+ (DESC "brass lantern")
+ (SYNONYM LANTERN)
+ (ADJECTIVE BRASS)
+ (FLAGS LIGHTBIT ONBIT TAKEBIT)>
+
+<OBJECT SWORD
+ (IN ADVENTURER)
+ (DESC "sword")
+ (SYNONYM SWORD)
+ (ADJECTIVE ELVISH)
+ (FLAGS WEAPONBIT)
+ (ACTION SWORD-F)>
+
+<ROUTINE SWORD-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The sword is of elvish workmanship and is glowing brightly." CR>)>>
+
+<ROUTINE ADVENTURER-ACTOR ()
+ <COND (<VERB? FOLLOW>
+ <COND (,ADVENTURER-CHARMED
+ <TELL
+"\"Sorry, but I've got better things to do than follow you.\"" CR>)
+ (T
+ <TELL
+"\"I'd sooner follow Dimwit Flathead!\"" CR>)>)
+ (<VERB? EXAMINE>
+ <COND (<NOT ,ADVENTURER-CHARMED>
+ <TELL
+"He glances suspiciously at it." CR>)
+ (<EQUAL? ,PRSO ,DOOR-ILLUSION>
+ <TELL "\"It's a door.\"" CR>)
+ (ELSE
+ <TELL "\"It's " A ,PRSO ".\"" CR>)>)
+ (<AND <VERB? OPEN THROUGH>
+ <EQUAL? ,PRSO ,DOOR-ILLUSION>>
+ <COND (,ADVENTURER-CHARMED
+ <SETG WINNER ,PLAYER>
+ <SETG HERE <LOC ,WINNER>>
+ <PERFORM ,V?POINT ,DOOR-ILLUSION>
+ <RTRUE>)
+ (ELSE
+ <TELL
+"The adventurer looks at you suspiciously. \"Can't you open it
+yourself?\"" CR>)>)
+ (<VERB? HELLO>
+ <COND (,ADVENTURER-CHARMED
+ <TELL "\"Hello. Nice to meet you.\"" CR>)
+ (,PRSO
+ <TELL "The " D ,PRSO " steps away from you." CR>)
+ (T
+ <TELL "The adventurer steps warily away." CR>)>)
+ (<AND <VERB? UNTIE>
+ <EQUAL? ,PRSO ,MAGIC-ROPE>
+ ,ADVENTURER-CHARMED>
+ <TELL
+"The adventurer tries to untie the rope, but he only becomes entangled.
+He gives up and glares suspiciously at you." CR>)
+ (<AND <VERB? MUNG ATTACK> <EQUAL? ,PRSO ,DOOR-ILLUSION>>
+ <TELL
+"He pauses as if searching for the right thing to say. \"I've known strange
+people, but fighting a wooden door?\"" CR>)
+ (<AND <VERB? CUT MUNG>
+ <EQUAL? ,PRSO ,MAGIC-ROPE>>
+ <COND (<NOT ,ADVENTURER-CHARMED>
+ <TELL
+"\"Not bloody likely! There's magic there!\"" CR>)
+ (<NOT ,ROPE-MAGIC?>
+ <ROPE-DISSOLVES>
+ <MOVE ,JEWELLED-BOX ,ADVENTURER>
+ <MOVE ,PROTECTION-SCROLL <LOC ,ADVENTURER>>
+ <TELL
+"The adventurer draws his sword and slices the rope cleanly into so
+much fluff. He opens the box, revealing a scroll! He drops this on
+the ground disdainfully but retains the box." CR>)
+ (<OR <NOT ,PRSI> <EQUAL? ,PRSI ,SWORD>>
+ <TELL
+"\"Ooo! Nice idea!\" He slashes at the rope with his sword, but to no
+avail. The rope is impervious to the magic of this weapon! He looks
+crestfallen." CR>)
+ (ELSE <TELL "\"I doubt that would work.\"" CR>)>)
+ (<VERB? SGIVE SSHOW> <RFALSE>)
+ (<AND <VERB? GIVE SHOW> <EQUAL? ,PRSI ,ME>>
+ <COND (<VERB? GIVE>
+ <PERFORM ,V?ASK-FOR ,ADVENTURER ,PRSO>)
+ (,ADVENTURER-CHARMED
+ <TELL "The " D ,ADVENTURER
+" allows you a quick look at the " D ,PRSO "." CR>)
+ (T
+ <TELL "The " D ,ADVENTURER
+" gives you a suspicious look and attempts to conceal his possessions." CR>)>
+ <RTRUE>)
+ (T
+ <TELL
+"\"I'll do what I please, thank you.\"" CR>)>>
+
+<ROUTINE ADVENTURER-F ()
+ <COND (<EQUAL? ,WINNER ,ADVENTURER>
+ <ADVENTURER-ACTOR>)
+ (<VERB? WAVE-AT>
+ <COND (,ADVENTURER-CHARMED
+ <TELL "The adventurer waves right back." CR>)
+ (T <TELL "The adventurer steps back a few paces." CR>)>)
+ (<VERB? FOLLOW>
+ <TELL "He's right here!" CR>)
+ (<VERB? ATTACK KILL>
+ <SETG ADVENTURER-CHARMED <>>
+ <JIGS-UP
+"The adventurer, startled momentarily, fights back with surprising skill.
+In fact, his skill is much greater than your own, and he quickly dispatches
+you.">)
+ (<VERB? NITFOL>
+ <TELL
+"He already speaks your language, but now a bit better." CR>)
+ (<VERB? GUNCHO>
+ <TELL
+"The adventurer blurs as though you were seeing him from a distance, wavers
+like a mirage, and then vanishes." CR>
+ <REMOVE ,ADVENTURER>
+ <QUEUE I-ADVENTURER 0>)
+ (<VERB? FROTZ>
+ <TELL
+"The adventurer is now bathed in light, much to his amazement." CR>
+ <SETG ADVENTURER-CHARMED <>>
+ <FSET ,ADVENTURER ,LIGHTBIT>
+ <FSET ,ADVENTURER ,ONBIT>)
+ (<VERB? VAXUM>
+ <SETG ADVENTURER-STAY T>
+ <SETG ADVENTURER-CHARMED T>
+ <ENABLE <QUEUE I-ADVENTURER-UNCHARM 20>>
+ <TELL
+"The adventurer smiles at you with an air of good will." CR>)
+ (<VERB? HELLO>
+ <COND (,ADVENTURER-CHARMED
+ <TELL "The " D ,PRSO
+" waves back and says \"Hello!\"" CR>)
+ (T
+ <TELL "The " D ,PRSO
+" keeps his distance, eyeing you cautiously." CR>)>)
+ (<VERB? SEARCH>
+ <TELL "The " D ,PRSO
+" isn't inclined to allow himself to be searched." CR>)
+ (<VERB? MUNG>
+ <TELL "The " D ,PRSO
+" dodges your blow and becomes very wary of you." CR>
+ <SETG ADVENTURER-CHARMED <>>
+ <RTRUE>)
+ (<AND <VERB? GIVE> <EQUAL? ,PRSI ,ADVENTURER>>
+ <COND (<NOT ,ADVENTURER-CHARMED>
+ <TELL "The " D ,PRSI
+" eyes you suspiciously. Why, he thinks, is this sorcerer
+handing me something">
+ <COND (<FSET? ,PRSO ,TREASURE>
+ <TELL ", especially something valuable">)>
+ <TELL "?" CR>)
+ (<AND ,SAILOR? <L? <- ,MOVES ,SAILOR?> 2>>
+ <MOVE ,PRSO ,ADVENTURER>
+ <TELL
+"A wide smile comes over his face as he takes the " D ,PRSO ", as though
+your action resolved for him some great mystery." CR>)
+ (<FSET? ,PRSO ,TREASURE>
+ <TELL "The " D ,PRSI
+" gratefully accepts the offer of the " D ,PRSO ". He is fascinated by
+its beauty and stops to thank you." CR>
+ <MOVE ,PRSO ,ADVENTURER>)
+ (T
+ <TELL "The " D ,PRSI
+" refuses your offer politely." CR>)>)
+ (<AND <VERB? SHOW>
+ <EQUAL? ,PRSI ,ADVENTURER>>
+ <COND (<NOT ,ADVENTURER-CHARMED>
+ <TELL "He ignores you pointedly." CR>)
+ (<EQUAL? ,PRSO ,DOOR-ILLUSION>
+ <RFALSE> ;"let DOOR-ILLUSION-F handle it")
+ (<FSET? ,PRSO ,TREASURE>
+ <TELL
+"His eyes light up at the sight of the " D ,PRSO "." CR>
+ <SETG ADVENTURER-STAY T>)
+ (T
+ <TELL
+"He yawns briefly, indicating his disinterest." CR>)>)
+ (<AND <VERB? TAKE> <EQUAL? ,PRSI ,ADVENTURER>>
+ <PERFORM ,V?ASK-FOR ,PRSI ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE I-ADVENTURER-UNCHARM ()
+ <SETG ADVENTURER-CHARMED <>>
+ <COND (<IN? ,ADVENTURER ,HERE>
+ <TELL
+"The adventurer looks at you as if seeing you for the first time. It's
+not clear that he likes what he sees, either." CR>)>>
+
+;"Here's how the adventurer comports himself"
+
+<GLOBAL ADVENTURER-MOVE -1>
+
+<ROUTINE I-ADVENTURER ("AUX" L NL)
+ <SET L <LOC ,ADVENTURER>>
+ <COND (<FSET? .L ,ONBIT>
+ <FCLEAR ,LANTERN ,ONBIT>)
+ (ELSE
+ <FSET ,LANTERN ,ONBIT>)>
+ <SETG ADVENTURER-MOVE <+ ,ADVENTURER-MOVE 1>>
+ <COND (<EQUAL? ,ADVENTURER-MOVE 0>
+ <RTRUE>)
+ (<APPLY <GETP .L ,P?ADVFCN>>
+ <RTRUE>)
+ (,ADVENTURER-STAY
+ <SETG ADVENTURER-STAY <>>
+ <COND (<AND <EQUAL? ,HERE .L> ,ADVENTURER-CHARMED> ;"6/27"
+ <TELL "The adventurer"
+ <PICK-ONE ,ADVENTURER-LOITERS> CR>)>)
+ (<OR <EQUAL? .L ,MIRROR-HALL-1 ,MIRROR-HALL-2 ,MIRROR-HALL-3>
+ <EQUAL? .L ,MIRROR-HALL-4 ,NORTH-GATE>>
+ <COND (<TREASURE-HERE? <SET NL <NEXT-HALL .L T>>>
+ <RETURN <MOVE-ADVENTURER .NL>>)
+ (<L? ,ADVENTURER-MOVE 5>
+ <RETURN <MOVE-ADVENTURER <NEXT-HALL .L <>>>>)
+ (T <RETURN <ADVENTURER-DECIDE .L>>)>)
+ (<AND <PROB 25> <EQUAL? ,HERE .L>>
+ <TELL "The adventurer ">
+ <COND (,ADVENTURER-CHARMED
+ <COND (<AND <NOT ,SAILOR?> <PROB 16>>
+ <SETG SAILOR? ,MOVES>
+ <TELL
+"waves at you and asks \"Hello, Sailor?\" Strange, you've never even been
+to sea." CR>)
+ (T
+ <TELL <PICK-ONE ,ADVENTURER-NICE> CR>)>)
+ (T
+ <TELL <PICK-ONE ,ADVENTURER-QUIPS> CR>)>)
+ (<ADVENTURER-TAKE .L>
+ <SETG ADVENTURER-STAY <>>
+ <RTRUE>)
+ (T
+ <COND (<AND <NOT ,ADV-HASTE> <EQUAL? ,HASTED? ,ADVENTURER>>
+ <SETG ADV-HASTE T>
+ <ADVENTURER-DECIDE .L>
+ <I-ADVENTURER>)
+ (T
+ <SETG ADV-HASTE <>>
+ <ADVENTURER-DECIDE .L>)>
+ <RTRUE>)>>
+
+<GLOBAL ADVENTURER-LOITERS <LTABLE 0
+" eyes your possessions intently."
+", not overly tactful, asks to see what you're holding."
+" asks what you would be needing treasures for."
+" offers to relieve you of some of your possessions.">>
+
+<GLOBAL ADV-HASTE <>>
+
+<GLOBAL SAILOR? <>> ;"becomes ,MOVES when he says hello sailor to you"
+
+<GLOBAL ADVENTURER-NICE <LTABLE 0
+"smiles at you like an idiot."
+"pulls out his map, a convoluted collection of lines, arrows, and
+boxes, and checks it briefly."
+"stares at his possessions as if expecting a revelation."
+"tries to make some small talk, but he only mumbles. He'll have to speak
+up if he expects you to hear him."
+"asks for directions to Flood Control Dam #3.">>
+
+<GLOBAL ADVENTURER-QUIPS <LTABLE 0
+"pulls out his map, a convoluted collection of lines, arrows, and
+boxes, and checks it briefly."
+"stares at his possessions as if expecting a revelation."
+"tries to make some small talk, but only mumbles. He'll have to speak
+up if he expects you to hear him."
+"waves his sword menacingly in your direction."
+"fends you off with his sword."
+"attempts to eat his sword. I don't think it would agree with him.">>
+
+<ROUTINE MOVE-ADVENTURER (RM "AUX" L (CNT 0) OBJ DIR)
+ <SET L <LOC ,ADVENTURER>>
+ <COND (<AND <EQUAL? .L ,NORTH-GATE>
+ <EQUAL? .RM ,PURLOINED-ROOM>
+ <NOT <TREASURE-HERE? .RM>>>
+ <FSET ,PURLOINED-ROOM ,VILLAIN>
+ <COND (<EQUAL? ,HERE .L>
+ <TELL
+"The adventurer starts toward the east but, seeing nothing of interest,
+changes his mind." CR>)>
+ <RTRUE>)
+ (<EQUAL? .RM ,TEMPLE>
+ <COND (<EQUAL? ,HERE .L>
+ <TELL
+"The adventurer looks as if he might go into the temple, but then he thinks
+better of it." CR>)>
+ <FSET ,TEMPLE ,VILLAIN>
+ <RTRUE>)
+ (<EQUAL? .RM ,T-A>
+ <COND (<EQUAL? ,HERE .L>
+ <TELL
+"The adventurer starts to descend further, but chickens out. He won't make
+Dungeon Master at that rate!" CR>)>
+ <FSET ,T-A ,VILLAIN>
+ <SET RM ,DIM-DESCENT>)
+ (<EQUAL? .RM ,WEST-CASTLE>
+ <COND (<EQUAL? ,HERE .L>
+ <TELL
+"The adventurer peers through the gate, but he decides against passing
+through." CR>)>
+ <FSET ,WEST-CASTLE ,VILLAIN>
+ <SET RM ,COURTYARD-1>)>
+ <COND (<EQUAL? ,HERE .L>
+ <TELL "The adventurer ">
+ <COND (<EQUAL? ,HASTED? ,ADVENTURER>
+ <TELL "rockets out of">)
+ (T <TELL "leaves">)>
+ <TELL " the room">
+ <COND (<SET OBJ <DOOR-FROM? .L .RM>>
+ <TELL " through the " D .OBJ>)>
+ <TELL ", heading ">
+ <SET DIR <DIR-FROM .L .RM>>
+ <COND (<NOT <EQUAL? .DIR ,P?UP ,P?DOWN>>
+ <TELL "to ">)>
+ <DIR-PRINT .DIR>
+ <SETG ADV-NEW-LOC .RM>
+ <SETG ADV-OLD-LOC .L>
+ <TELL "." CR>)
+ (<EQUAL? ,HERE .RM>
+ <COND (<AND <EQUAL? ,HERE ,PURLOINED-ROOM>
+ <NOT <FSET? ,MAP-ROOM ,VILLAIN>>
+ <TREASURE-HERE? ,HERE>>
+ <TELL
+"An adventurer peeks into the room, sees the " D <TREASURE-HERE? ,HERE>
+", and enters." CR>)
+ (T
+ <TELL
+"A bedraggled adventurer ">
+ <COND (<EQUAL? ,HASTED? ,ADVENTURER>
+ <TELL "speeds">)
+ (T <TELL "walks">)>
+ <TELL " into the room from ">
+ <DIR-PRINT <DIR-FROM .RM .L>>
+ <COND (<SET OBJ <DOOR-FROM? .RM .L>>
+ <TELL ", coming through the " D .OBJ>)>
+ <TELL "." CR>)>)>
+ <MOVE ,ADVENTURER .RM>
+ <FSET .RM ,VILLAIN>
+ <COND (<NOT <EQUAL? .RM ,PURLOINED-ROOM>>
+ <ADVENTURER-TAKE .RM>)>>
+
+<ROUTINE DOOR-FROM? (HERE THERE "AUX" P L TX)
+ <SET P 0>
+ <REPEAT ()
+ <COND (<0? <SET P <NEXTP .HERE .P>>>
+ <RFALSE>)
+ (<NOT <L? .P ,LOW-DIRECTION>>
+ <SET TX <GETPT .HERE .P>>
+ <SET L <PTSIZE .TX>>
+ <COND (<AND <EQUAL? .L ,DEXIT>
+ <==? <GETB .TX ,REXIT> .THERE>>
+ <RETURN <GETB .TX ,DEXITOBJ>>)>)>>>
+
+<GLOBAL ADV-NEW-LOC <>>
+<GLOBAL ADV-OLD-LOC <>>
+
+<ROUTINE ADVENTURER-TAKE (RM "AUX" F N (TR <>) (CNT 0) OBJ)
+ <SET F <FIRST? .RM>>
+ <REPEAT ()
+ <COND (<NOT .F> <RETURN>)
+ (T
+ <SET N <NEXT? .F>>
+ <COND (<AND <FSET? .F ,TAKEBIT>
+ <NOT <FSET? .F ,INVISIBLE>>
+ <NOT <EQUAL? .F ,STRONG-BOX>>
+ <OR <FSET? .F ,TREASURE>
+ <PROB 25>>>
+ <COND (<NOT <APPLY <GETP .F ,P?ADVFCN>>>
+ <MOVE .F ,ADVENTURER>
+ <SET CNT <+ .CNT 1>>
+ <SET OBJ .F>
+ <COND (<FSET? .F ,TREASURE>
+ <SET TR T>)>)>)>
+ <SET F .N>)>>
+ <COND (<AND <EQUAL? ,HERE .RM> <G? .CNT 0>>
+ <TELL
+"The adventurer stoops over and picks up ">
+ <COND (<EQUAL? .CNT 1>
+ <TELL "the " D .OBJ>)
+ (T
+ <TELL "some objects">)>
+ <COND (.TR
+ <TELL " and seems pleased
+by his discovery">)>
+ <TELL "." CR>)>>
+
+<ROUTINE DIR-FROM (HERE THERE "AUX" P L TX O)
+ #DECL ((HERE THERE O) OBJECT (P L) FIX)
+ <SET P 0>
+ <REPEAT ()
+ <COND (<0? <SET P <NEXTP .HERE .P>>>
+ <RFALSE>)
+ (<EQUAL? .P ,P?IN ;,P?OUT> T)
+ (<NOT <L? .P ,LOW-DIRECTION>>
+ <SET TX <GETPT .HERE .P>>
+ <SET L <PTSIZE .TX>>
+ <COND (<AND <EQUAL? .L ,DEXIT ,UEXIT ,CEXIT>
+ <==? <GETB .TX ,REXIT> .THERE>>
+ <RETURN .P>)>)>>>
+
+<ROUTINE DIR-PRINT (DIR "AUX" (CNT 0))
+ #DECL ((DIR CNT) FIX)
+ <REPEAT ()
+ <COND (<==? <GET ,DIR-STRINGS .CNT> .DIR>
+ <COND (<NOT <EQUAL? .DIR ,P?UP ,P?DOWN>>
+ <TELL "the ">)>
+ <PRINT <GET ,DIR-STRINGS <+ .CNT 1>>>
+ <RTRUE>)>
+ <SET CNT <+ .CNT 1>>>>
+
+<GLOBAL DIR-STRINGS
+ <TABLE P?NORTH "north" P?SOUTH "south"
+ P?EAST "east" P?WEST "west"
+ P?NW "northwest" P?NE "northeast"
+ P?SW "southwest" P?SE "southeast"
+ P?DOWN "downstairs" P?UP "upstairs"
+ P?IN "in" P?OUT "out">>
+
+<GLOBAL ADV-POSS <TABLE 0 0 0 0 0 0 0 0>>
+
+<ROUTINE ADVENTURER-DECIDE (L "AUX" P S TX)
+ <SET P <NEXTP .L 0>>
+ <PUT ,ADV-POSS 0 0>
+ <REPEAT ()
+ <COND (<L? .P ,LOW-DIRECTION> <RETURN>)
+ (T
+ <SET S <PTSIZE <SET TX <GETPT .L .P>>>>
+ <COND (<OR <EQUAL? .S ,UEXIT>
+ <AND <EQUAL? .S ,DEXIT>
+ <NOT <FSET? <GETB .TX ,DEXITOBJ>
+ ,LOCKEDBIT>>>
+ <AND <EQUAL? .S ,CEXIT>
+ <VALUE <GETB .TX ,CEXITFLAG>>>>
+ <SET S <GETB .TX ,REXIT>>
+ <PUT ,ADV-POSS
+ 0
+ <SET TX <+ <GET ,ADV-POSS 0> 1>>>
+ <PUT ,ADV-POSS .TX .S>)>)>
+ <SET P <NEXTP .L .P>>>
+ <COND (<EQUAL? <SET S <GET ,ADV-POSS 0>> 0>
+ <TELL "**BUG: Can't move from " D <LOC ,ADVENTURER> "!" CR>)
+ (<EQUAL? .S 1>
+ <MOVE-ADVENTURER <GET ,ADV-POSS 1>>)
+ (T
+ <SET P 0>
+ <REPEAT ()
+ <COND (<G? <SET P <+ .P 1>> .S>
+ <RETURN>)
+ (<NOT <FSET? <SET TX <GET ,ADV-POSS .P>>
+ ,VILLAIN>>
+ <MOVE-ADVENTURER .TX>
+ <RTRUE>)>>
+ <MOVE-ADVENTURER <RANDOM-ELEMENT ,ADV-POSS>>)>>
+
+<GLOBAL HALL-TBL <TABLE NW-TOWER MIRROR-HALL-1 MIRROR-HALL-2
+ MIRROR-HALL-3 MIRROR-HALL-4 NORTH-GATE
+ PURLOINED-ROOM 0>>
+
+<ROUTINE NEXT-HALL (RM "OPTIONAL" (L-R T) "AUX" TBL (OFFS 0) NR)
+ <SET TBL ,HALL-TBL>
+ <REPEAT ()
+ <COND (<EQUAL? <SET NR <GET .TBL .OFFS>> .RM>
+ <COND (.L-R <RETURN <GET .TBL <+ .OFFS 1>>>)
+ (T <RETURN <GET .TBL <- .OFFS 1>>>)>)>
+ <SET OFFS <+ .OFFS 1>>>>
+
+<ROUTINE TREASURE-HERE? (RM "AUX" F)
+ <SET F <FIRST? .RM>>
+ <REPEAT ()
+ <COND (<NOT .F> <RFALSE>)
+ (<FSET? .F ,TREASURE> <RETURN .F>)
+ (T
+ <SET F <NEXT? .F>>)>>>
+
+;"The denouement"
+
+<GLOBAL ADVENTURER-CHARMED <>>
+<GLOBAL ADVENTURER-STAY <>>
+
+<ROUTINE PURLOINED-ROOM-A ("AUX" TX)
+ <SET TX <TREASURE-HERE? ,PURLOINED-ROOM>>
+ <COND (.TX
+ <SETG ADVENTURER-STAY T>
+ <COND (<EQUAL? ,HERE ,PURLOINED-ROOM>
+ <MOVE .TX ,ADVENTURER>
+ <COND (<FSET? ,DOOR-REALITY ,INVISIBLE>
+ <TELL
+"The adventurer stops to pick up the " D .TX ". As he rises, he casts a cursory
+glance at the door, then he notices you. ">
+ <COND (,ADVENTURER-CHARMED
+ <TELL
+"He smiles at you as he pockets the " D .TX "." CR>)
+ (T
+ <TELL
+"He straightens quickly, glaring at you with distrust." CR>)>)>)>)
+ (<NOT ,ADVENTURER-NOTES-DOOR>
+ <SETG ADVENTURER-NOTES-DOOR T>
+ <SETG ADVENTURER-STAY T>
+ <COND (<FSET? ,DOOR-REALITY ,INVISIBLE>
+ <TELL
+"The adventurer glances around the room in a businesslike way and makes a few
+notes on his map." CR>)>)>
+ <RFALSE>>
+
+<GLOBAL ADVENTURER-NOTES-DOOR <>>
+
+<ROUTINE NO-ILLUSIONS ()
+ <FSET ,DOOR-ILLUSION ,INVISIBLE>
+ <FCLEAR ,DOOR-REALITY ,INVISIBLE>
+ <FCLEAR ,DOOR-REALITY ,LOCKEDBIT>
+ <FSET ,DOOR-REALITY ,OPENBIT>
+ <SETG DOOR-ILLUSION-GONE T>
+ <TELL
+"The seemingly fearless adventurer shrugs and walks purposefully toward the
+door, ignoring all harm to his person in the form of knives, tentacles, and
+molten lead. As three buckets of the latter pour over his head, he casts
+you a perplexed look.|
+\"Did you try the doorknob?\" he asks, as twenty-seven knives delicately
+skewer him.|
+Before you can answer, he reaches for one of the gargoyle heads which, by
+sheerest coincidence, has just flooded him in red-orange flame,
+and turns it gently.|
+\"I think it's unlocked,\" he says, stoically ignoring the host of human-sized
+rats which feed on his incinerated torso.|
+His left hand, broken and bloodied, pulls at the gargoyle head.|
+\"I'm going on ahead!\" he cries, opening a simple wooden door.|
+Wooden door? You rub your eyes for a moment and look again as he
+goes through it. Yes, just a plain wooden door." CR>
+ <SETG SCORE <+ ,SCORE ,DOOR-POINT>>
+ <SETG DOOR-POINT 0>
+ <MOVE ,ADVENTURER ,MAP-ROOM>
+ <SETG ADVENTURER-STAY T>> \ No newline at end of file
diff --git a/record.zil b/record.zil
new file mode 100644
index 0000000..cce3f5d
--- /dev/null
+++ b/record.zil
@@ -0,0 +1,30 @@
+"RECORD for
+ MAGE
+ (c) Copyright 1985 Infocom, Inc. All Rights Reserved."
+
+<SYNTAX \#RANDOM OBJECT = V-$RANDOM>
+<SYNTAX \#COMMAND = V-$COMMAND>
+<SYNTAX \#RECORD = V-$RECORD>
+<SYNTAX \#UNRECORD = V-$UNRECORD>
+
+<ROUTINE V-$COMMAND ()
+ <DIRIN 1>
+ <RTRUE>>
+
+<ROUTINE V-$RANDOM ()
+ <COND (<NOT <EQUAL? ,PRSO ,INTNUM>>
+ <TELL "Illegal call to #RANDOM." CR>)
+ (T
+ <RANDOM <- 0 ,P-NUMBER>>
+ <RTRUE>)>>
+
+<CONSTANT D-RECORD-ON 4>
+<CONSTANT D-RECORD-OFF -4>
+
+<ROUTINE V-$RECORD ()
+ <DIROUT ,D-RECORD-ON> ;"all READS and INPUTS get sent to command file"
+ <RTRUE>>
+
+<ROUTINE V-$UNRECORD ()
+ <DIROUT ,D-RECORD-OFF>
+ <RTRUE>>
diff --git a/sleep.zil b/sleep.zil
new file mode 100644
index 0000000..6d816d7
--- /dev/null
+++ b/sleep.zil
@@ -0,0 +1,327 @@
+"SLEEP for
+ ENCHANTER
+ Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+;"Not exactly Holiday Inn, much less the Ritz"
+
+<GLOBAL LAST-SLEEP 0>
+
+<CONSTANT MOVES-PER-DAY 86>
+<CONSTANT MOVES-PER-SLEEP 42>
+
+<ROUTINE V-TIME ("AUX" EL)
+ <SET EL </ ,TOD 10>>
+ <TELL "It would be " <GET ,TIME-TABLE .EL> " now." CR>>
+
+<GLOBAL TIME-TABLE <TABLE
+"just past dawn" ;"6am"
+"early morning" ;"8am"
+"mid-morning"
+"around noon" ;"12n"
+"early afternoon"
+"mid-afternoon" ;"4pm"
+"early evening"
+"mid evening" ;"8pm"
+"late evening"
+"midnight" ;"12m"
+"in the early hours"
+"pre-dawn" ;"4am"
+"dawn">>
+
+<OBJECT GLOBAL-SLEEP
+ (IN GLOBAL-OBJECTS)
+ (DESC "sleep")
+ (SYNONYM SLEEP)
+ (ACTION GLOBAL-SLEEP-F)>
+
+<ROUTINE GLOBAL-SLEEP-F ()
+ <COND (<VERB? WALK-TO TAKE>
+ <COND (<IN? ,WINNER ,BEDROOM>
+ <MOVE ,WINNER ,BED>)>
+ <PERFORM ,V?SLEEP>
+ <RTRUE>)
+ (<VERB? FIND> <TELL "Why not find a bed to sleep in?" CR>)>>
+
+<GLOBAL THIRST-COUNT 0>
+
+<ROUTINE I-THIRST ()
+ <COND (<G? <SETG THIRST-COUNT <+ ,THIRST-COUNT 1>> 5>
+ <SETG THIRST-COUNT 0>
+ <QUEUE I-THIRST 40>
+ <SETG WINNER ,PLAYER>
+ <JIGS-UP
+"You pass out from lack of water and die." <>>)
+ (T
+ <TELL <GET ,THIRST-TABLE ,THIRST-COUNT> CR>
+ <QUEUE I-THIRST 10>)>>
+
+<GLOBAL THIRST-TABLE <LTABLE
+"Your mouth is getting rather dry."
+"You are becoming quite thirsty."
+"You are very thirsty now. You'd better have a drink soon."
+"Your lips are parched. If you don't get a drink soon you will pass out."
+"You are beginning to feel faint from lack of water."
+"BUG">>
+
+<GLOBAL HUNGER-COUNT 0>
+
+<ROUTINE I-HUNGER ()
+ <COND (<G? <SETG HUNGER-COUNT <+ ,HUNGER-COUNT 1>> 5>
+ <SETG HUNGER-COUNT 0>
+ <QUEUE I-HUNGER 47>
+ <SETG WINNER ,PLAYER>
+ <JIGS-UP
+"You pass out from lack of strength and die." <>>)
+ (T
+ <TELL <GET ,HUNGER-TABLE ,HUNGER-COUNT> CR>
+ <QUEUE I-HUNGER 10>)>>
+
+<GLOBAL HUNGER-TABLE <LTABLE
+"Your stomach is starting to grumble."
+"You are becoming quite hungry."
+"You are very hungry now. You'd better have something to eat."
+"You're fairly starving. If you don't eat soon you will pass out."
+"You are beginning to feel faint from lack of sustenance."
+"BUG">>
+
+<ROUTINE I-TIRED ("AUX" (FORG <>))
+ <COND (<IN? ,WINNER ,BED>
+ <TELL
+"The bed sure is comfortable and you are becoming tired." CR>
+ <V-SLEEP T>
+ <RFATAL>)>
+ <COND (<G? ,LOAD-ALLOWED 10>
+ <SETG LOAD-ALLOWED <- ,LOAD-ALLOWED 10>>)>
+ <COND (<G? ,FUMBLE-NUMBER 1>
+ <SETG FUMBLE-NUMBER <- ,FUMBLE-NUMBER 1>>)>
+ <SETG FUMBLE-PROB <+ ,FUMBLE-PROB 1>>
+ <COND (<G? ,SPELL-MAX 1>
+ <SETG SPELL-MAX <- ,SPELL-MAX 1>>
+ <COND (<NOT <EQUAL? ,SPELL-ROOM 0>>
+ <SETG SPELL-ROOM <- ,SPELL-ROOM 1>>)>
+ <COND (<EQUAL? ,SPELL-ROOM 0>
+ <SET FORG T>
+ <FORGET-SPELL ,DISPEL-SPELL>)>)>
+ <ENABLE <QUEUE I-TIRED 10>>
+ <SETG AWAKE <+ ,AWAKE 1>>
+ <COND (<G? ,AWAKE 10>
+ <TELL
+"You drop in your tracks from exhaustion." CR>
+ <CRLF>
+ <V-SLEEP>
+ <RFATAL>)
+ (ELSE
+ <TELL "You are " <GET ,TIRED-TELL ,AWAKE>>
+ <COND (.FORG
+ <TELL
+" and the spells you've memorized are becoming confused">)>
+ <TELL "." CR>)>>
+
+<GLOBAL AWAKE -1>
+
+<ROUTINE V-DIAGNOSE ()
+ <COND (<L? ,AWAKE 0>
+ <TELL "You are wide awake">)
+ (T <TELL "You are " <GET ,TIRED-TELL ,AWAKE>>)>
+ <TELL ". You are ">
+ <TELL <GET ,THIRST-TELL ,THIRST-COUNT>>
+ <TELL " and ">
+ <TELL <GET ,HUNGER-TELL ,HUNGER-COUNT>>
+ <TELL "." CR>>
+
+<GLOBAL HUNGER-TELL <TABLE
+"well fed"
+"a bit hungry"
+"becoming quite hungry"
+"very hungry"
+"fairly starving"
+"faint from lack of food"
+"huoo">>
+
+<GLOBAL THIRST-TELL <TABLE
+"well hydrated"
+"a bit thirsty"
+"quite thirsty"
+"very thirsty"
+"extremely thirsty"
+"faint from lack of water">>
+
+<GLOBAL TIRED-TELL <TABLE
+"beginning to tire"
+"feeling tired"
+"worn out"
+"feeling wrung out and tired"
+"getting more and more tired"
+"dead on your feet"
+"so tired you can barely put one foot in front of another"
+"practically asleep"
+"moving only on your last reserves of strength"
+"barely able to move your arms"
+"unable to keep your eyes open for more than a few moments
+at a time">>
+
+<GLOBAL BED-WARNING <>>
+
+<ROUTINE V-SLEEP ("OPTIONAL" (TOLD? <>) "AUX" TILL-TIRED MUNGED?)
+ <SET TILL-TIRED <- ,MOVES-PER-DAY <- ,MOVES ,LAST-SLEEP>>>
+ <COND (<EQUAL? ,HERE ,REAL-STAIR ,PIT>
+ <TELL "To sleep here would be fatal!" CR>)
+ (<G? .TILL-TIRED 10>
+ <TELL
+"You settle down to sleep, but you really aren't tired, so you
+thrash around for a while and then give up." CR>)
+ (<EQUAL? ,HERE ,ENGINE-ROOM ,CLOSET ,SE-TOWER>
+ <TELL "You try to sleep but it's too noisy." CR>)
+ (<AND <EQUAL? ,HERE ,BEDROOM>
+ <NOT <IN? ,WINNER ,BED>>
+ <NOT ,BED-WARNING>>
+ <SETG BED-WARNING T>
+ <TELL
+"You might try getting into the bed first. It would be more comfortable." CR>)
+ (ELSE
+ <COND (<AND <G? .TILL-TIRED 0>
+ <IN? ,WINNER ,BED>
+ <NOT .TOLD?>>
+ <TELL
+"You're not all that tired, but the bed is very comfortable." CR>)>
+ <SETG REAL-SPELL-MAX <+ ,REAL-SPELL-MAX 1>>
+ <SETG SPELL-MAX ,REAL-SPELL-MAX>
+ <SETG SPELL-ROOM ,SPELL-MAX>
+ <SETG LAST-SLEEP ,MOVES>
+ <SETG MOVES <+ ,MOVES ,MOVES-PER-SLEEP>>
+ <SETG TOD <MOD <+ ,TOD ,MOVES-PER-SLEEP> 128>>
+ <SETG LOAD-ALLOWED ,LOAD-MAX>
+ <SETG FUMBLE-NUMBER 7>
+ <SETG FUMBLE-PROB 8>
+ <ENABLE <QUEUE I-TIRED ,MOVES-PER-DAY>>
+ <SETG AWAKE -1>
+ <FORGET-ALL>
+ <SET MUNGED? <FSET? ,HERE ,RMUNGBIT>>
+ <I-MUNG-ROOM <>>
+ <I-MUNG-ROOM <>>
+ <I-MUNG-ROOM <>>
+ <COND (<AND <NOT .MUNGED?>
+ <FSET? ,HERE ,RMUNGBIT>>
+ <TELL
+"You fall asleep quickly and begin to dream. The dream turns into a
+nightmare of decay and desolation, as your surroundings turn grey and
+lifeless. You feel a great weight, like a pile of ashes, constricting
+your movements, and then you bolt awake!" CR>
+ <RTRUE>)
+ (<AND <IN? ,WINNER ,BED>
+ <NOT <IN? ,BEDPOST-BUTTON ,BED>>
+ <G? ,CHARM-POINT 0>>
+ <MOVE ,BEDPOST-BUTTON ,BED>
+ <TELL
+"You fall asleep quickly, the bed being so comfortable. You dream as
+well, of this very room. A beautiful damsel, obviously noble, is
+standing by the bed holding a scroll in one hand and resting the other
+on the bedpost. Turning to block your view, she does something you can't
+see. Then she gets in bed and turns out the light, but before she does
+you can see she is no longer carrying the scroll... You wake." CR>
+ <RTRUE>)>
+ <TELL
+"Ah, sleep! It's been a long day, indeed. The rest will do you good.
+">
+ <COND (<IN? ,WINNER ,BED>
+ <TELL "You make yourself comfortable on the bed">)
+ (<OUTSIDE? ,HERE>
+ <TELL "You spread your cloak under the open sky">)
+ (T <TELL "You spread your cloak on the floor">)>
+ <TELL " and drift off, renewing your powers
+and refreshing your mind ... Time passes as you snore blissfully." CR>
+ <CRLF>
+ <COND (<AND <OUTSIDE? ,HERE>
+ <NOT ,PROTECTED-FROM-EVIL>
+ <PROB ,MOLESTED>>
+ <COND (<PROB ,MUNCHED>
+ <JIGS-UP
+"You sleep blissfully, unaware of the evil creatures lurking in the
+darkness. Unaware, that is, until one of them sets upon you with nasty
+sharp teeth.">
+ <RFATAL>)
+ (ELSE
+ <ROB ,WINNER>
+ <ROB ,HERE>
+ <TELL
+"You don't sleep too well, and you awake at least once with the feeling
+that something has jostled you in the dark." CR>)>)
+ (<AND <NOT <EQUAL? ,GALLERY-POINT 0>>
+ <NOT ,GALLERY-DREAM>>
+ <SETG GALLERY-DREAM T>
+ <TELL
+"After a while, your sleep is disturbed by a strange dream. You are
+wandering in a darkened place, for you have no light or other
+possessions. You feel that you are being watched! You are surrounded by
+faces, their eyes following you. They drift in and out, staring at you
+with proud indifference. One face, brightly lit (unlike the rest), draws
+you closer and closer. As you touch it, you wake." CR>)
+ (<AND <NOT <EQUAL? ,GALLERY-POINT 0>> <PROB 70>>
+ <TELL
+"Your sleep is disturbed by the strange dream of an earlier night. You are
+in the dark, with no light or other possessions. You are surrounded by
+many faces, their eyes following you. The one brightly lit face beckons
+you closer and closer. You wake, convinced that the dream holds a message
+for you." CR>)
+ (<AND <NOT ,DOOR-KULCAD>
+ <NOT ,DOOR-DREAM>
+ <FSET? ,DOOR-REALITY ,INVISIBLE>>
+ <SETG DOOR-DREAM T>
+ <TELL
+"You dream of a nondescript room in which a cartoonish figure casually opens
+a simple wooden door and ascends the flight of stairs which lies behind. The
+scene fades to black, but you awaken in a cold sweat." CR>)
+ (<AND ,DOOR-KULCAD <NOT ,DOOR-DREAM-2>>
+ <SETG DOOR-DREAM-2 T>
+ <TELL
+"You dream of climbing in an unfamiliar place. You seem to climb forever,
+beyond reason. A fleeting hope arises in you, and you search furiously in
+your spell book and possessions for something. After a moment, you become
+frantic as you realize that you don't have it! You bolt awake in a cold
+sweat." CR>)
+ (<AND <NOT ,PROTECTED-FROM-EVIL>
+ <PROB 50>>
+ <ROB ,HERE ,WARLOCK-TOWER>
+ <COND (<PROB 50> <ROB ,WINNER ,WARLOCK-TOWER>)>
+ <COND (<NOT <==? ,HERE <LOC ,WINNER>>>
+ <ROB <LOC ,WINNER> ,WARLOCK-TOWER>)>
+ <TELL
+"You sleep fitfully. At one point it seems that some evil presence is searching
+nearby. The tense feeling passes, but it's replaced by one of foreboding." CR>)
+ (<PROB 50>
+ <TELL
+"You sleep uneventfully, dreamlessly, and awake refreshed." CR>)
+ (ELSE
+ <TELL <PICK-ONE ,DREAMS>>
+ <TELL " You awaken." CR>)>)>>
+
+<GLOBAL DOOR-DREAM-2 <>>
+
+<GLOBAL DOOR-DREAM <>>
+
+<GLOBAL GALLERY-DREAM <>>
+
+<GLOBAL MOLESTED 20>
+<GLOBAL MUNCHED 45>
+
+<GLOBAL DREAMS <LTABLE 0
+
+"You dream of being pursued through a dank cavern. Something is behind
+you, something horrible that you can't turn to face. It gets closer and
+closer, and you can feel its hot breath on your neck."
+
+"You dream of an idyllic scene in the country, a picnic of wood-sprites
+and dryads."
+
+"You dream of Krill. He works feverishly in an evilly lit workroom. He
+is working a conjuration of great complexity and power, and the room is
+strewn with the noisome components of this horrific casting. Krill chants
+words of awful power as he works."
+
+"You dream of dancing penguins in formal dress. One has a particularly
+nice tuxedo and a cane with a gold top."
+
+"You dream of a river, slow and muddy. Great grey hippopotami sport there,
+bellowing and splashing, and twitching their ears.">>
+
diff --git a/stair.zil b/stair.zil
new file mode 100644
index 0000000..a3e0a4e
--- /dev/null
+++ b/stair.zil
@@ -0,0 +1,581 @@
+"STAIR for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+<ROOM LANDING
+ (IN ROOMS)
+ (DESC "Landing")
+ (LDESC
+"The wall is cylindrical here, with exits east and west. The eastern one
+opens into a dark, enclosed space. The air is thick with acrid smoke, and
+black, greasy ashes mar the floor. The mortar and stones of the walls
+are stained and crumbly.")
+ (EAST PER LANDING-EXIT-F)
+ (WEST TO JUNCTION)
+ (FLAGS ONBIT RLANDBIT RMUNGBIT)
+ (PSEUDO "ASHES" ASHES-PSEUDO)>
+
+<GLOBAL STAIR-SOLVED? <>>
+
+<ROUTINE LANDING-EXIT-F ()
+ <COND (,STAIR-SOLVED?
+ <TELL
+"There is no floor there, and the pit beneath you is of great, if not
+infinite, depth. You fall forever.">
+ <FINISH>)
+ (ELSE ,ENDLESS-STAIR)>>
+
+<ROOM ENDLESS-STAIR
+ (IN ROOMS)
+ (DESC "Winding Stair")
+ (UP PER ENDLESS-UP)
+ (DOWN PER ENDLESS-DOWN)
+ (WEST PER ENDLESS-EXIT-F)
+ (ACTION ENDLESS-STAIR-F)
+ (ADVFCN ADVENTURER-DROPS-OUT)
+ (FLAGS RLANDBIT)
+ (GLOBAL STAIRS)>
+
+<ROUTINE ADVENTURER-DROPS-OUT ()
+ <TELL
+"The adventurer seems to have dropped out of existence. In a voice that seems
+to recede into the void, you hear his final word: \"Restore....\" You muse
+about how a mere adventurer might come to possess a spell of such power." CR>
+ <REMOVE ,ADVENTURER>
+ <QUEUE I-ADVENTURER 0>
+ <RTRUE>>
+
+<OBJECT STAIRS
+ (IN LOCAL-GLOBALS)
+ (SYNONYM STAIRS STEPS STAIR STAIRWAY)
+ (ADJECTIVE SPIRAL WINDING)
+ (DESC "stairs")
+ (FLAGS NDESCBIT CLIMBBIT TOUCHBIT)
+ (ACTION STAIRS-F)>
+
+<ROUTINE STAIRS-F ()
+ <COND (<EQUAL? ,HERE ,JUNCTION>
+ <TELL
+"The stairs are to the east. You'll have to go there to get a look." CR>)
+ (<AND <EQUAL? ,HERE ,ENDLESS-STAIR>
+ <VERB? KULCAD>>
+ <STAIR-DISPEL>)>>
+
+<GLOBAL DROPPED-SOME? <>>
+
+<ROUTINE STAIR-DISPEL ()
+ <QUEUE I-HUNGER 0>
+ <QUEUE I-THIRST 0>
+ <QUEUE I-TIRED 0>
+ <QUEUE I-TURTLE 0>
+ ;"Stop hunger and thirst. The loser has enough on his mind now..."
+ <SETG STAIR-SOLVED? T>
+ <SETG SCORE <+ ,SCORE ,STAIR-POINT>>
+ <SETG STAIR-POINT 0>
+ <SETG DROPPED-SOME? <DESTROY-ALL ,WINNER ,REAL-STAIR>>
+ <MOVE ,FLY-SCROLL ,WINNER>
+ <TELL
+"The stairway begins to dissolve before your eyes, leaving a circular area
+with exits east and west, but remarkable mainly for its absence of a floor.
+Indeed, you find yourself standing in midair above a deep pit with the
+sort of comical look which is found mainly among duped cartoon characters.
+Frantically, you grab for the solid bannister">
+ <COND (,DROPPED-SOME? <TELL ", dropping your heavier possessions
+in your desire to save yourself">)>
+ <TELL "! But the bannister shifts and dissolves
+as well, leaving you grasping what appears to be an ornate scroll." CR>
+ <THIS-IS-IT ,FLY-SCROLL>
+ <ENABLE <QUEUE I-FALL-FOREVER 5>>
+ <ENABLE <QUEUE I-FALL -1>>
+ <DISABLE <INT I-TIRED>>
+ <GOTO ,REAL-STAIR <>>
+ <RTRUE>>
+
+<ROUTINE ENDLESS-UP ()
+ <ENDLESS-UP-DOWN T>
+ ,ENDLESS-STAIR>
+
+<ROUTINE ENDLESS-DOWN ()
+ <ENDLESS-UP-DOWN <>>
+ ,ENDLESS-STAIR>
+
+<ROUTINE ENDLESS-UP-DOWN (UP?)
+ <FCLEAR ,ENDLESS-STAIR ,TOUCHBIT>
+ <STAIR-TO-TABLE ,STAIR-LOC>
+ <TELL "You ">
+ <COND (.UP?
+ <TELL "climb">
+ <SETG STAIR-LOC <+ ,STAIR-LOC 1>>)
+ (T
+ <TELL "descend">
+ <SETG STAIR-LOC <- ,STAIR-LOC 1>>)>
+ <TELL " the stairs, making one circuit of the tower." CR>
+ <TABLE-TO-STAIR ,STAIR-LOC>>
+
+<ROUTINE ENDLESS-STAIR-F (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"This is a winding stair, stretching up and down out of sight. The walls are
+mossy and damp.">
+ <COND (<==? ,STAIR-LOC ,STAIR-START>
+ <TELL " An exit leads west to a landing.">)>
+ <CRLF>)
+ (<AND <EQUAL? .RARG ,M-ENTER>
+ <NOT <EQUAL? ,WINNER ,PLAYER>>
+ <NOT <IN? ,WINNER <LOC ,PLAYER>>>>
+ <REMOVE ,WINNER>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RFALSE>)>>
+
+<ROUTINE ENDLESS-EXIT-F ()
+ <COND (<==? ,STAIR-LOC ,STAIR-START> ,LANDING)
+ (T
+ <TELL "You can't go that way." CR>
+ <RFALSE>)>>
+
+<ROUTINE STAIR-TO-TABLE (SLOC
+ "AUX" TBL (CNT 0)
+ (F <FIRST? ,ENDLESS-STAIR>) N)
+ <SET TBL ,STAIR-TABLE>
+ <REPEAT ()
+ <COND (.F <SET N <NEXT? .F>>)
+ (ELSE <RETURN>)>
+ <COND (<EQUAL? .F ,WINNER>)
+ (<FSET? .F ,TAKEBIT>
+ <REPEAT ()
+ <COND (<==? <GET .TBL .CNT> 0>
+ <PUT .TBL .CNT .SLOC>
+ <PUT .TBL <+ .CNT 1> .F>
+ <SET CNT <+ .CNT 2>>
+ <REMOVE .F>
+ <RETURN>)
+ (ELSE
+ <SET CNT <+ .CNT 2>>)>>)>
+ <SET F .N>>>
+
+<ROUTINE TABLE-TO-STAIR (SLOC
+ "AUX" TBL (CNT 0))
+ <SET TBL ,STAIR-TABLE>
+ <REPEAT ()
+ <COND (<NOT <L? .CNT ,STAIR-TABLE-LENGTH>>
+ <RETURN>)
+ (<==? <GET .TBL .CNT> .SLOC>
+ <PUT .TBL .CNT 0>
+ <MOVE <GET .TBL <+ .CNT 1>> ,ENDLESS-STAIR>)>
+ <SET CNT <+ .CNT 2>>>>
+
+<GLOBAL STAIR-LOC 10000>
+<CONSTANT STAIR-START 10000>
+
+<CONSTANT STAIR-TABLE-LENGTH 70> ;"currently 33 takeable objects"
+
+<GLOBAL STAIR-TABLE ;"length should be 2*number of takeable objects"
+ <TABLE 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0>>
+
+\
+
+<ROOM REAL-STAIR
+ (IN ROOMS)
+ (DESC "Winding Stair")
+ (LDESC
+"This is a circular room with no floor. There are exits east and west.
+A crude drawing of stairsteps graces the ceiling. Downward is only
+darkness.")
+ (WEST PER REAL-STAIR-EXIT-F) ;"LANDING"
+ (EAST PER REAL-STAIR-EXIT-F) ;"WARLOCK-TOWER"
+ (DOWN PER REAL-STAIR-EXIT-F) ;"PIT"
+ (FLAGS RLANDBIT)
+ (ACTION PIT-F)
+ (GLOBAL STAIRS)>
+
+<ROUTINE REAL-STAIR-EXIT-F ()
+ <SETG FALL-COUNT 0>
+ <COND (,FLYING?
+ <TELL "Effortlessly, you float ">
+ <COND (<==? ,PRSO ,P?DOWN>
+ <SETG FALL-COUNT 1>
+ <TELL "downward." CR>
+ <DESTROY-ALL ,HERE ,PIT>
+ ,PIT)
+ (<==? ,PRSO ,P?EAST>
+ <SETG SCORE <+ ,SCORE ,FLY-POINT>>
+ <SETG FLY-POINT 0>
+ <STOP-FLYING>
+ <TELL "eastward and settle to the ground." CR>
+ ,WARLOCK-TOWER)
+ (<==? ,PRSO ,P?WEST>
+ <STOP-FLYING>
+ <TELL "westward and settle to the ground." CR>
+ ,LANDING)>)
+ (ELSE ;"I'm not sure this can happen"
+ <TELL
+"You must think you can fly." CR>
+ <RFALSE>)>>
+
+<ROOM PIT
+ (IN ROOMS)
+ (DESC "Bottomless Pit")
+ (LDESC
+"This is a circular pit of apparently infinite depth. The walls are of
+crudely dressed stone. No floor is visible.")
+ (UP PER PIT-EXIT-F)
+ (DOWN PER PIT-EXIT-F)
+ (ACTION PIT-F)
+ (FLAGS RLANDBIT ONBIT)>
+
+<ROUTINE PIT-EXIT-F ()
+ <COND (,FLYING?
+ <TELL "Effortlessly, you float ">
+ <COND (<==? ,PRSO ,P?DOWN>
+ <SETG FALL-COUNT <+ ,FALL-COUNT 1>>
+ <TELL "downward." CR>)
+ (T
+ <SETG FALL-COUNT <- ,FALL-COUNT 1>>
+ <TELL "upward." CR>)>
+ <COND (<==? ,FALL-COUNT 0>
+ <DESTROY-ALL ,HERE ,REAL-STAIR>
+ ,REAL-STAIR)
+ (ELSE
+ <DESTROY-ALL ,HERE ,PIT>
+ <FCLEAR ,PIT ,TOUCHBIT>
+ ,PIT)>)
+ (ELSE
+ <TELL
+"You must think you can fly." CR>
+ <RFALSE>)>>
+
+<ROUTINE PIT-F ("OPTIONAL" RARG)
+ <COND (<==? .RARG ,M-BEG>
+ <COND (<AND <VERB? DROP> <HELD? ,PRSO>>
+ <FSET ,PRSO ,NDESCBIT>
+ <FCLEAR ,PRSO ,TAKEBIT>
+ <TELL
+"The " D ,PRSO " falls out of sight below you." CR>)
+ (<AND <VERB? TAKE EXAMINE> <NOT <HELD? ,PRSO>>>
+ <TELL
+"The " D ,PRSO " is out of reach below you." CR>)>)>>
+
+<GLOBAL FALL-COUNT 0>
+
+<ROUTINE STOP-FLYING ()
+ <SETG FLYING? <>>
+ <QUEUE I-FALL 0>
+ <QUEUE I-FALL-FOREVER 0>
+ <QUEUE I-FLY 0>
+ <RTRUE>>
+
+<ROUTINE I-FALL ()
+ <COND (,FLYING? <RTRUE>)>
+ <SETG FALL-COUNT <+ ,FALL-COUNT 1>>
+ <TELL
+"You plummet downward, deeper into the pit, but the bottom is still not
+visible.">
+ <COND (,DROPPED-SOME?
+ <TELL " Far ahead of you fall your former possessions." CR>)>
+ <RTRUE>>
+
+<ROUTINE I-FALL-FOREVER ()
+ <TELL
+"You plummet deeper and deeper into the pit! Oddly enough, you never
+seem to hit bottom. After many years, only tattered remnants of you
+remain, still falling." CR>
+ <FINISH>>
+
+<ROUTINE DESTROY-ALL (WHO WHERE "AUX" N X (DEST? <>))
+ <SET X <FIRST? .WHO>>
+ <REPEAT ()
+ <COND (<NOT .X> <RETURN .DEST?>)>
+ <SET N <NEXT? .X>>
+ <COND (<AND <NOT <EQUAL? .X ,WINNER>>
+ <G? <GETP .X ,P?SIZE> 4>>
+ <REMOVE-ALL .X>
+ <MOVE .X .WHERE>
+ <FSET .X ,NDESCBIT>
+ <FCLEAR .X ,TAKEBIT>
+ <SET DEST? T>)>
+ <SET X .N>>>
+
+<ROUTINE REMOVE-ALL (WHAT "AUX" N X)
+ <SET X <FIRST? .WHAT>>
+ <REPEAT ()
+ <COND (<NOT .X> <RETURN>)>
+ <SET N <NEXT? .X>>
+ <REMOVE .X>
+ <SET X .N>>>
+
+\
+
+<ROOM WARLOCK-TOWER
+ (IN ROOMS)
+ (DESC "Warlock's Tower")
+ (LDESC
+"This is a room carved out of black basalt, eerily lit by flickering
+fires and the dim glow of magic.")
+ (DOWN "The pit yawns before you, and the izyuk spell has worn off!")
+ (WEST "The pit yawns before you, and the izyuk spell has worn off!")
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION WARLOCK-TOWER-F)>
+
+<ROUTINE WARLOCK-TOWER-F (RARG)
+ <COND (<EQUAL? .RARG ,M-ENTER>
+ <FSET ,WARLOCK-TOWER ,TOUCHBIT>
+ <TELL
+"As you enter, you realize that this is Krill's secret chamber,
+protected by powerful illusions now broken by your skills. Before you
+stands Krill, engaged in the casting of some complex and horrific magic.
+Krill turns to face you, surprised and annoyed by your intrusion. You
+have seen him before: cloaked in black, he sacrificed you at the Altar
+before his hoard. His yellow eyes glisten and he breathes deeply. In a
+voice as deep as the great caverns of the earth, he speaks: \"Fool!
+Parlor magician! You dare to defile my chamber with your worm-like
+presence. I shall not waste words with you. Goodbye, spell-monger!\"">
+ <COND (<EQUAL? ,HASTED? ,PLAYER>
+ <TELL "
+He pauses. \"Ah! You seem to be in a hurry, campfire-conjurer! Slow down
+and enjoy the show!\" He waves his hand, and you are robbed of your energy.">)>
+ <TELL "
+Krill snaps his fingers loudly, and a giant dragon appears, breathing gouts
+of flame. He moves ever closer, red eyes bulging with malice!" CR CR>
+ <MOVE ,DRAGON ,HERE>
+ <ENABLE <QUEUE I-DRAGON 2>>)>>
+
+<OBJECT KRILL
+ (IN WARLOCK-TOWER)
+ (DESC "warlock Krill")
+ (LDESC
+"The warlock Krill, robed in black, stands before you, in eager anticipation
+of your death.")
+ (SYNONYM KRILL WARLOCK)
+ (FLAGS VICBIT)
+ (ACTION KRILL-F)>
+
+<OBJECT GLOBAL-KRILL
+ (IN GLOBAL-OBJECTS)
+ (DESC "warlock Krill")
+ (SYNONYM KRILL WARLOCK)
+ (ACTION GLOBAL-KRILL-F)>
+
+<ROUTINE GLOBAL-KRILL-F ()
+ <COND (<VERB? GUNCHO HELLO>
+ <TELL
+"Krill is not here, and lucky for you." CR>)
+ (<VERB? ZIFMIA>
+ <JIGS-UP
+"The warlock Krill appears before you, staring in astonishment. \"Who is
+it that disturbs my slumber? Oh, it is only you, secondary-school sorcerer!\"
+He points a finger and chants a spell. You are cast into the endless void!"
+<>>)
+ (<VERB? EXAMINE WHO>
+ <TELL
+"Krill is an evil warlock who was banished from the Circle of Enchanters.
+His malice was thought to be forever ended, his reign of terror a dim and
+frightful memory. But he has returned, and his power must be destroyed lest
+the Circle's great works be overthrown." CR>)
+ (T
+ <GLOBAL-NOT-HERE-PRINT ,GLOBAL-KRILL>
+ <RTRUE>)>>
+
+<OBJECT DRAGON
+ (DESC "dragon")
+ (SYNONYM DRAGON FLAME FLAMES)
+ (LDESC
+"A dragon, spouting flame, approaches!")
+ (FLAGS VICTIM)
+ (ACTION DRAGON-F)>
+
+<ROUTINE DRAGON-F ()
+ <COND (<VERB? GONDAR>
+ <TELL
+"The dragon's flame is doused in a torrent of water as you cast the
+gondar spell! He disappears with a torturous scream.">
+ <REMOVE ,DRAGON>
+ <SECOND-ACT>)
+ (<VERB? VAXUM NITFOL>
+ <TELL
+"The dragon pauses and roars out a benevolent greeting, which, to your
+chagrin, fries you to a delicate crisp." CR>
+ <FINISH>)
+ (<VERB? GUNCHO>
+ <TELL
+"Unfortunately, the dragon is practically on top of you, and before you
+can finish saying the guncho spell he blasts you to beyond well-done." CR>
+ <FINISH>)
+ (<VERB? CLEESH>
+ <TELL
+"The dragon, being reptilian himself, is unaffected." CR>)
+ (<VERB? KILL ATTACK MUNG>
+ <TELL
+"Your strength isn't nearly enough to best the dragon!" CR>)>>
+
+<ROUTINE SECOND-ACT ("OPTIONAL" (GUNCH <>))
+ <TELL CR
+"Krill ">
+ <COND (.GUNCH <TELL "seems shaken, but regains his composure.">)
+ (T <TELL "seems to be somewhat amused.">)>
+ <TELL CR CR
+"\"A fine spell, wizard-worm, but your luck has ended!\" With another snap
+of his fingers, he summons a being whose essence is evil. It has a shape which
+is masked by its blackness and exudes a foul, fetid odor. In its hand
+is a large battle axe. At a signal from Krill, it advances!" CR>
+ <ENABLE <QUEUE I-SHAPE 2>>
+ <MOVE ,SHAPE ,HERE>>
+
+<GLOBAL NO-LONGER-PROTECTED
+"Krill looks your way and spits: \"You were fortunate, wizard-worm, to have
+survived our last encounter. But your trivial spells of protection will not
+save you now!\"">
+
+<ROUTINE I-DRAGON ()
+ <COND (<IN? ,DRAGON ,HERE>
+ <COND (<OR <==? ,DEATH-CHEATED ,ME>
+ ,PROTECTED-FROM-EVIL>
+ <TELL ,NO-LONGER-PROTECTED CR>)>
+ <TELL
+"The dragon engulfs you in flame. As you perish, you can hear Krill's
+mocking laughter." CR>
+ <FINISH>)>
+ <QUEUE I-DRAGON 0>
+ <RTRUE>>
+
+<OBJECT SHAPE
+ (DESC "monster")
+ (SYNONYM MONSTER SHAPE BEING)
+ (ACTION SHAPE-F)>
+
+<ROUTINE SHAPE-F ()
+ <COND (<VERB? VAXUM>
+ <TELL
+"The monster hesitates, stops, smiles, and disappears." CR>
+ <THIRD-ACT>)
+ (<VERB? CLEESH>
+ <TELL
+"The monster hesitates, trembles, then turns into a newt. Poor monster. Its
+battle axe, now unsupported, falls on it, slicing it neatly in half." CR>
+ <THIRD-ACT>)
+ (<VERB? NITFOL>
+ <TELL
+"\"Yum, yum!\" are the last words you hear." CR>
+ <FINISH>)
+ (<VERB? GUNCHO>
+ <TELL
+"The monster pauses for a moment as you begin the guncho spell, then swiftly
+cleaves you with its axe before you can finish!" CR>
+ <FINISH>)
+ (<VERB? KILL ATTACK MUNG>
+ <TELL
+"Your effort is useless. It is still coming closer!" CR>)>>
+
+<ROUTINE THIRD-ACT ()
+ <REMOVE ,SHAPE>
+ <TELL CR
+"Krill seems to be losing patience.|
+|
+\"I am through playing games, carnival-clown! You shall return to your
+Circle, but I am afraid that all the little pieces will prove hard to
+reassemble!\" He laughs hideously and starts a guttural chant which
+shakes the very tower." CR>
+ <SETG KRILL-KILL T>
+ <ENABLE <QUEUE I-BYE 2>>
+ <RTRUE>>
+
+<GLOBAL KRILL-KILL <>>
+
+<ROUTINE I-SHAPE ()
+ <COND (<IN? ,SHAPE ,HERE>
+ <COND (<OR <==? ,DEATH-CHEATED ,ME>
+ ,PROTECTED-FROM-EVIL>
+ <TELL ,NO-LONGER-PROTECTED CR>)>
+ <TELL
+"The monster hits you with its battle axe! You fall, dead, as the
+laughter of Krill reaches a crescendo!" CR>
+ <FINISH>)>
+ <QUEUE I-SHAPE 0>
+ <RTRUE>>
+
+<ROUTINE I-BYE ()
+ <COND (<EQUAL? ,HERE ,WARLOCK-TOWER>
+ <TELL CR
+"Krill finishes his spell and his harsh laughter is all that remains!
+You are in a void, without sight, sound, or sensation. You scream at the
+top of your lungs, but nothing happens. You break into a cold sweat as you
+ponder the infinite, beyond all help and hope!" CR>
+ <FINISH>)>>
+
+<ROUTINE KRILL-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"Krill is not a pretty sight! Enough said." CR>)
+ (<AND <VERB? GUNCHO> ,KRILL-KILL>
+ <TELL
+"Krill recoils as he hears the first words of the guncho spell. For a few
+seconds he continues with the spell he was casting, trying to finish before
+you. He fumbles some syllables! Then he steps
+back and, with his hands outstretched toward you, lets out a blood-curdling
+scream. His face twisted, and his body vibrating with the effort of resisting
+the enchantment, he utters a spell
+of power, and is gone! After a quiet moment, a rumble begins deep in the
+earth. It strengthens as the tower starts to sway. The floor gives way
+beneath you and you tumble down towards the sea ... then you are surrounded
+by a burst of light.|
+|
+You realize that you are with the Circle. The Eldest of the Circle, Belboz,
+rises and speaks: \"The evil of Krill is ended this day. From beyond hope,
+you have proved yourself great and worthy. Our hearts are gladdened at your
+return.\" A chair appears at his right hand and he motions for you to
+sit beside him. He smiles warmly. \"Join with us,\" he says, \"and tell us
+of your quest!\"|
+|
+Here ends the first chapter of the Enchanter saga, in which, by virtue of your
+skills, you have joined the Circle of Enchanters. Further adventures await you
+as the Enchanter series continues." CR CR>
+ <SETG SCORE <+ ,SCORE ,WARLOCK-POINT>>
+ <USL>
+ <FINISH>)
+ (<VERB? CLEESH>
+ <TELL
+"Krill shimmers for a moment, then laughs heartily. The laugh sounds
+vaguely like a croak, but perhaps it is only your imagination." CR>)
+ (<VERB? VAXUM>
+ <TELL
+"The spell seems to have no influence over Krill. You wouldn't much
+like to see him smile, anyway." CR>)
+ (<VERB? GUNCHO>
+ <TELL
+"The look of surprise on Krill's face as you recite the first few
+syllables of the guncho spell is exceeded only by your look of disappointment
+as you are "
+ <COND (<IN? ,SHAPE ,HERE> "sliced into bits by the monster!")
+ (T "incinerated by the dragon!")>
+ CR>
+ <FINISH>)
+ (<VERB? HELLO>
+ <TELL "Krill grins and the sight is ghastly." CR>)>>
+
+<ROUTINE I-MUNG-ROOM ("OPTIONAL" (TELL? T) "AUX" RM TBL)
+ <ENABLE <QUEUE I-MUNG-ROOM 20>>
+ <SET TBL ,MUNG-ROOM-TABLE>
+ <REPEAT ()
+ <COND (<SET RM <GET .TBL 0>>
+ <COND (<NOT <FSET? .RM ,RMUNGBIT>>
+ <RETURN>)>
+ <SET TBL <REST .TBL 2>>)
+ (T <RETURN>)>>
+ <COND (.RM
+ <FSET .RM ,RMUNGBIT>
+ <FCLEAR .RM ,TOUCHBIT>
+ <COND (<AND .TELL? <==? .RM ,HERE>>
+ <TELL
+"Suddenly, you sense a great wind of evil magic blowing around you. You
+are weighed down by its power, and only your sorcerous training permits
+you to withstand it. When you regain your composure, your surroundings
+have changed." CR>)>)>
+ .RM>
+
diff --git a/syntax.zil b/syntax.zil
new file mode 100644
index 0000000..d6c8978
--- /dev/null
+++ b/syntax.zil
@@ -0,0 +1,738 @@
+"SYNTAX for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+"SUBTITLE VOCABULARY"
+
+<BUZZ A AN THE IS AND OF THEN ALL ONE BUT EXCEPT \. \, \" YES NO Y
+ PRY PLEASE LINE LINES YOU SOME>
+
+<SYNONYM BETWEEN GOING>
+<SYNONYM WITH USING THROUGH THRU>
+<SYNONYM ON ONTO>
+<SYNONYM IN INSIDE INTO>
+<SYNONYM UNDER BELOW BENEATH UNDERNEATH>
+
+<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>
+
+\
+
+"ZORK game commands"
+
+<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 $VERIFY = V-$VERIFY>
+<SYNTAX $VERIFY OBJECT = V-$VERIFY>
+
+<SYNTAX VERSION = V-VERSION>
+
+<SYNTAX VERBOSE = V-VERBOSE>
+
+\
+
+"SUBTITLE REAL VERBS"
+
+<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 VILLAIN) (ON-GROUND IN-ROOM) = V-ATTACK PRE-HIT>
+<SYNTAX ATTACK
+ OBJECT (FIND VILLAIN) (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE)
+ = V-ATTACK PRE-HIT>
+<SYNONYM ATTACK FIGHT HURT INJURE HIT>
+
+<SYNTAX BACK = V-BACK>
+
+<SYNTAX BOARD OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM)
+ = V-BOARD PRE-BOARD>
+
+<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 IGNITE>
+
+<SYNTAX CLIMB ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
+<SYNTAX CLIMB UP OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-UP>
+<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>
+<SYNONYM CLIMB SIT SCALE>
+
+<SYNTAX LIE DOWN OBJECT (FIND RLANDBIT) = V-LIE-DOWN>
+
+<SYNTAX CLOSE
+ OBJECT (FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-CLOSE>
+
+<SYNTAX COUNT OBJECT = V-COUNT>
+<SYNONYM COUNT>
+
+<SYNTAX CROSS OBJECT = V-CROSS>
+<SYNONYM CROSS FORD>
+
+<SYNTAX CUT OBJECT WITH OBJECT (FIND WEAPONBIT) (CARRIED HELD) = V-CUT>
+<SYNTAX CUT WITH OBJECT WITH OBJECT (FIND WEAPONBIT) (CARRIED HELD) = V-CUT>
+<SYNONYM CUT SLICE PIERCE>
+
+<SYNTAX CURSE = V-CURSES>
+<SYNTAX CURSE OBJECT (FIND VILLAIN) = V-CURSES>
+<SYNONYM CURSE DAMN>
+
+<SYNTAX DEFLATE OBJECT = V-DEFLATE>
+
+<SYNTAX DIG IN OBJECT = V-DIG PRE-DIG>
+<SYNTAX DIG WITH OBJECT = V-DIG PRE-DIG>
+<SYNTAX DIG
+ OBJECT ;(FIND DIGBIT) (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND TOOLBIT) (HELD CARRIED HAVE)
+ = V-DIG PRE-DIG ;*>
+<SYNTAX DIG
+ IN
+ OBJECT ;(FIND DIGBIT) (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND TOOLBIT) (HELD CARRIED HAVE)
+ = V-DIG PRE-DIG>
+
+<SYNTAX DISEMBARK OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM)
+ = V-DISEMBARK>
+
+<SYNTAX DRINK
+ OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-DRINK>
+<SYNTAX DRINK FROM OBJECT (HELD CARRIED) = V-DRINK-FROM>
+<SYNONYM DRINK SIP SWALLOW>
+
+<SYNTAX DROP OBJECT (HELD MANY HAVE) = V-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 PRE-PUT>
+<SYNONYM DROP RELEASE EXIT>
+
+<SYNTAX LEAN ON OBJECT (HELD HAVE) = V-LEAN-ON>
+
+<SYNTAX EAT
+ OBJECT (HELD CARRIED ON-GROUND IN-ROOM MANY)
+ = V-EAT>
+<SYNONYM EAT CONSUME TASTE>
+
+<SYNTAX ENTER = V-ENTER>
+<SYNTAX ENTER OBJECT = V-THROUGH>
+<SYNTAX EXIT = V-EXIT>
+<SYNTAX EXIT OBJECT = V-EXIT>
+
+<SYNTAX ESCAPE OBJECT = V-ESCAPE>
+<SYNTAX ESCAPE FROM OBJECT = V-ESCAPE>
+
+<SYNTAX EXAMINE OBJECT = 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 INSPECT DESCRIBE WHAT WHATS>
+
+<SYNTAX WHO OBJECT = V-WHO>
+
+<SYNTAX EXORCISE OBJECT = V-EXORCISE>
+<SYNTAX EXORCISE OUT OBJECT (FIND VILLAIN) = V-EXORCISE>
+<SYNTAX EXORCISE AWAY OBJECT (FIND VILLAIN) = V-EXORCISE>
+<SYNONYM EXORCISE BANISH DRIVE BEGONE>
+
+<SYNTAX EXTINGUISH
+ OBJECT (FIND LIGHTBIT) (MANY HELD CARRIED ON-GROUND IN-ROOM TAKE HAVE)
+ = V-LAMP-OFF>
+<SYNONYM EXTINGUISH DOUSE>
+
+<SYNTAX FILL
+ OBJECT (FIND CONTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH
+ OBJECT
+ = V-FILL>
+<SYNTAX FILL
+ OBJECT (FIND CONTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-FILL>
+<SYNTAX FILL OBJECT (FIND CONTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ AT OBJECT = V-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 FORGET OBJECT = V-FORGET>
+<SYNONYM FORGET UNLEARN UNMEMORIZE>
+
+<SYNTAX GIVE
+ OBJECT (MANY HELD HAVE ;CARRIED ;ON-GROUND ;IN-ROOM)
+ TO
+ OBJECT (FIND VICBIT) (ON-GROUND)
+ = V-GIVE PRE-GIVE>
+<SYNTAX GIVE
+ OBJECT (FIND VICBIT) (ON-GROUND)
+ OBJECT (MANY HELD HAVE)
+ = V-SGIVE PRE-SGIVE>
+<SYNONYM GIVE HAND DONATE OFFER FEED>
+
+<SYNTAX HELLO = V-HELLO ;*>
+<SYNTAX HELLO OBJECT = V-HELLO>
+<SYNONYM HELLO HI>
+
+<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 INFLAT
+ OBJECT
+ WITH
+ OBJECT (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED)
+ = V-INFLATE>
+
+<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 BITE>
+
+<SYNTAX KILL OBJECT (FIND VILLAIN) (ON-GROUND IN-ROOM) = V-KILL PRE-HIT>
+<SYNTAX KILL
+ OBJECT (FIND VILLAIN) (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE)
+ = V-KILL PRE-HIT>
+<SYNONYM KILL MURDER SLAY DISPATCH STAB>
+
+<SYNTAX KISS OBJECT (FIND VILLAIN) (ON-GROUND IN-ROOM) = V-KISS>
+
+<SYNTAX KNOCK AT OBJECT = V-KNOCK ;*>
+<SYNTAX KNOCK ON OBJECT = V-KNOCK>
+<SYNTAX KNOCK DOWN OBJECT (FIND VICBIT) (ON-GROUND IN-ROOM) = V-ATTACK PRE-HIT>
+<SYNONYM KNOCK RAP>
+
+<SYNTAX LAUNCH OBJECT (FIND VEHBIT) = V-LAUNCH>
+
+<SYNTAX LEAVE = V-LEAVE>
+<SYNTAX LEAVE OBJECT = V-DROP>
+
+<SYNTAX LIGHT
+ OBJECT (FIND LIGHTBIT)
+ (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-LAMP-ON ;*>
+<SYNTAX LIGHT
+ OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND FLAMEBIT) (HELD CARRIED 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 RLANDBIT) = V-LOOK>
+<SYNTAX LOOK AT OBJECT (HELD CARRIED ON-GROUND IN-ROOM MANY) = V-EXAMINE>
+<SYNTAX LOOK WITH OBJECT = V-LOOK-INSIDE>
+<SYNTAX LOOK THROUGH OBJECT = V-LOOK-INSIDE>
+<SYNTAX LOOK OUT OBJECT = 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 MANY) WITH OBJECT
+ = V-READ PRE-READ>
+<SYNTAX LOOK FOR OBJECT = V-FIND>
+<SYNTAX LOOK OBJECT = V-CHASTISE>
+<SYNONYM LOOK L STARE GAZE>
+
+<SYNTAX SEARCH OBJECT = V-SEARCH>
+<SYNTAX SEARCH IN OBJECT = V-SEARCH>
+<SYNTAX SEARCH FOR OBJECT = V-FIND>
+
+<SYNTAX LOWER OBJECT = V-LOWER>
+
+<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 ROLL UP OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+
+<SYNTAX PLAY OBJECT = V-PLAY>
+
+<SYNTAX PULL OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE ; *>
+<SYNTAX PULL ON OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+<SYNONYM PULL TUG>
+
+<SYNTAX MUMBLE = V-MUMBLE>
+<SYNONYM MUMBLE SIGH>
+
+<SYNTAX DESTROY OBJECT (ON-GROUND IN-ROOM) = V-MUNG>
+
+<SYNTAX DESTROY
+ OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ WITH
+ OBJECT (HELD CARRIED TAKE)
+ = V-MUNG>
+<SYNTAX DESTROY
+ DOWN
+ OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ WITH
+ OBJECT (HELD CARRIED TAKE)
+ = V-MUNG>
+<SYNONYM DESTROY DAMAGE BREAK HATCH CRACK SMASH>
+
+<SYNTAX LUBRICATE OBJECT WITH OBJECT (HELD CARRIED) = V-OIL PRE-OIL>
+<SYNONYM LUBRICATE OIL GREASE>
+
+<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 PLUG OBJECT WITH OBJECT = V-PLUG>
+<SYNONYM PLUG GLUE PATCH REPAIR FIX>
+
+<SYNTAX PLUGH = V-ADVENT>
+<SYNONYM PLUGH XYZZY>
+
+<SYNTAX POINT AT OBJECT = V-POINT>
+<SYNTAX POINT TO OBJECT = V-POINT>
+<SYNONYM POINT GESTURE>
+
+<SYNTAX POKE
+ OBJECT (FIND VILLAIN) (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE)
+ = V-MUNG>
+<SYNONYM POKE JAB BLIND>
+
+<SYNTAX POUR OBJECT (HELD CARRIED) = V-DROP ;*>
+<SYNTAX POUR OBJECT (HELD CARRIED) IN OBJECT = V-DROP>
+<SYNTAX POUR OBJECT (HELD CARRIED) ON OBJECT = V-POUR-ON>
+<SYNTAX POUR OBJECT (HELD CARRIED) FROM OBJECT = V-DROP>
+<SYNONYM POUR SPILL>
+
+<SYNTAX PRAY = V-PRAY>
+
+<SYNTAX PUMP UP OBJECT = V-PUMP>
+<SYNTAX PUMP UP OBJECT WITH OBJECT = V-PUMP>
+
+<SYNTAX PUSH OBJECT (IN-ROOM ON-GROUND MANY) = V-PUSH>
+<SYNTAX PUSH ON OBJECT (IN-ROOM ON-GROUND MANY) = V-PUSH>
+<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 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>
+<SYNTAX PUT OBJECT (HELD MANY HAVE) UNDER OBJECT = V-PUT-UNDER>
+<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 LAY>
+
+<SYNTAX HIDE = V-HIDE>
+<SYNTAX HIDE OBJECT (HELD HAVE) = V-HIDE>
+<SYNTAX HIDE OBJECT (HELD HAVE) FROM OBJECT = V-HIDE>
+<SYNONYM HIDE CONCEAL>
+
+<SYNTAX RAISE OBJECT = V-RAISE ;*>
+<SYNTAX RAISE UP OBJECT = V-RAISE>
+<SYNONYM RAISE LIFT>
+
+<SYNTAX RAPE OBJECT (FIND VICBIT) = V-RAPE>
+<SYNONYM RAPE MOLEST>
+
+<SYNTAX READ
+ OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-READ PRE-READ ; *>
+<SYNTAX READ
+ OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH
+ OBJECT
+ = V-READ PRE-READ>
+<SYNONYM READ SKIM>
+
+<SYNTAX REACH IN OBJECT (ON-GROUND IN-ROOM) = V-REACH-IN>
+
+<SYNTAX REPENT = V-REPENT>
+
+<SYNTAX TOUCH OBJECT = V-RUB>
+<SYNTAX TOUCH OBJECT WITH OBJECT = V-RUB>
+<SYNONYM TOUCH FEEL PAT PET>
+
+<SYNTAX SCRIPT = V-SCRIPT>
+<SYNTAX UNSCRIPT = V-UNSCRIPT>
+
+<SYNTAX SEND FOR OBJECT = V-SEND>
+
+<SYNTAX SHAKE OBJECT = V-SHAKE>
+
+<SYNTAX SLEEP = V-SLEEP>
+<SYNTAX SLEEP IN OBJECT (IN-ROOM ON-GROUND) = V-BOARD>
+<SYNTAX SLEEP ON OBJECT (IN-ROOM ON-GROUND) = V-BOARD>
+<SYNONYM SLEEP NAP SNOOZE>
+
+<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 SKIP = V-SKIP>
+<SYNONYM SKIP HOP>
+
+<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 RLANDBIT) = V-STAND>
+
+<SYNTAX STAY = V-STAY>
+<SYNTAX STAY OBJECT = V-STAY>
+
+<SYNTAX STRIKE
+ OBJECT (FIND VICBIT) (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND WEAPONBIT) (HELD CARRIED ON-GROUND IN-ROOM HAVE)
+ = V-ATTACK PRE-HIT>
+<SYNTAX STRIKE
+ OBJECT (FIND VICBIT) (ON-GROUND IN-ROOM)
+ = V-ATTACK PRE-HIT ;*>
+<SYNTAX STRIKE OBJECT (ON-GROUND IN-ROOM HELD CARRIED) = V-LAMP-ON>
+
+<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 VILLAIN) (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) = V-DISEMBARK>
+<SYNTAX TAKE ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
+<SYNTAX TAKE OFF OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-DISEMBARK>
+<SYNTAX TAKE UP OBJECT (FIND RLANDBIT) = 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 GRAB GET HOLD CARRY REMOVE>
+
+<SYNTAX TELL OBJECT (FIND VICBIT) (IN-ROOM) = V-TELL>
+
+<SYNTAX BRING OBJECT OBJECT = V-BRING PRE-BRING>
+<SYNTAX TAKE OBJECT OBJECT = V-BRING PRE-BRING>
+
+<SYNTAX ASK OBJECT FOR OBJECT = V-ASK-FOR>
+
+<SYNTAX SAY TO OBJECT (FIND VICBIT) (IN-ROOM) = V-TELL>
+<SYNTAX SAY = V-SAY>
+<SYNONYM SAY TALK CALL>
+
+<SYNTAX THANK OBJECT = V-THANK>
+<SYNTAX THANK = V-THANK>
+<SYNONYM THANK THANKS>
+
+<SYNTAX THROW
+ OBJECT (HELD CARRIED HAVE)
+ AT
+ OBJECT (ON-GROUND IN-ROOM)
+ = V-THROW ;*>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) OFF OBJECT = V-THROW-OFF>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) OVER OBJECT = V-THROW-OFF>
+<SYNTAX THROW
+ OBJECT (HELD CARRIED HAVE)
+ WITH
+ OBJECT (ON-GROUND IN-ROOM)
+ = V-THROW>
+
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) IN OBJECT = V-PUT PRE-PUT>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) ON OBJECT = V-PUT PRE-PUT>
+<SYNONYM THROW HURL CHUCK TOSS>
+
+<SYNTAX TIE OBJECT TO OBJECT = V-TIE PRE-TIE>
+<SYNTAX TIE UP
+ OBJECT (FIND VICBIT) (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED HAVE)
+ = V-TIE-UP>
+<SYNONYM TIE FASTEN SECURE ATTACH>
+
+<SYNTAX TURN OBJECT TO OBJECT = V-TURN>
+<SYNTAX TURN OBJECT FOR OBJECT = V-TURN>
+<SYNTAX TURN OBJECT = V-TURN>
+<SYNTAX TURN
+ OBJECT ( HELD CARRIED ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED HAVE)
+ = V-TURN>
+<SYNTAX TURN ON
+ OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ = V-LAMP-ON>
+<SYNTAX TURN OFF
+ OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ = V-LAMP-OFF>
+<SYNONYM TURN FLIP SHUT SET>
+
+<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 UNFASTEN UNATTACH UNHOOK>
+
+<SYNTAX WAIT = V-WAIT>
+<SYNTAX WAIT FOR OBJECT = V-WAIT-FOR>
+<SYNONYM WAIT Z>
+
+<SYNTAX WAKE OBJECT = V-ALARM ;*>
+<SYNTAX WAKE UP OBJECT = V-ALARM>
+<SYNONYM WAKE AWAKE SURPRISE STARTLE>
+
+<SYNTAX WALK OBJECT = V-WALK>
+<SYNTAX WALK IN OBJECT = V-THROUGH>
+<SYNTAX WALK ON OBJECT = V-THROUGH>
+<SYNTAX WALK OVER OBJECT = V-LEAP>
+<SYNTAX WALK WITH OBJECT = V-THROUGH>
+<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>
+<SYNTAX WALK TO OBJECT = V-WALK-TO>
+<SYNONYM WALK GO RUN PROCEED STEP>
+
+<SYNTAX FLY OBJECT = V-WALK>
+
+<SYNTAX WAVE OBJECT (HELD CARRIED) = V-WAVE>
+<SYNTAX WAVE AT OBJECT = V-WAVE-AT>
+<SYNTAX WAVE TO OBJECT = V-WAVE-AT>
+<SYNTAX YELL AT OBJECT = V-WAVE-AT>
+<SYNTAX WAVE OBJECT (HELD CARRIED) AT OBJECT = V-WAVE-AT>
+<SYNONYM WAVE MOTION BRANDISH BECKON>
+
+<SYNTAX WEAR OBJECT = V-WEAR>
+
+<SYNTAX WIND OBJECT = V-WIND>
+<SYNTAX WIND UP OBJECT = V-WIND>
+
+<SYNTAX YELL = V-YELL>
+<SYNONYM YELL SCREAM SHOUT>
+
+<SYNTAX ZORK = V-ZORK>
+
+<SYNTAX SHOW OBJECT TO OBJECT = V-SHOW>
+<SYNTAX SHOW OBJECT OBJECT = V-SSHOW PRE-SSHOW>
+
+<SYNTAX MAKE ON OBJECT = V-DRAW-ON>
+<SYNTAX MAKE ON OBJECT WITH OBJECT = V-DRAW-ON>
+<SYNTAX MAKE FROM OBJECT (MANY) = V-MAKE-LINE>
+<SYNTAX MAKE FROM OBJECT (MANY) WITH OBJECT = V-MAKE-LINE>
+<SYNTAX MAKE BETWEEN OBJECT (MANY) = V-MAKE-LINE>
+<SYNTAX MAKE BETWEEN OBJECT (MANY) WITH OBJECT = V-MAKE-LINE>
+<SYNTAX MAKE FROM OBJECT TO OBJECT = V-MAKE-LINE-TO>
+<SYNTAX MAKE BETWEEN OBJECT TO OBJECT = V-MAKE-LINE-TO>
+<SYNONYM MAKE DRAW>
+
+<SYNTAX CONNECT OBJECT (MANY) = V-MAKE-LINE>
+<SYNTAX CONNECT OBJECT (MANY) WITH OBJECT = V-MAKE-LINE>
+<SYNTAX CONNECT OBJECT TO OBJECT = V-MAKE-LINE-TO>
+
+<SYNTAX ERASE FROM OBJECT (MANY) = V-ERASE-LINE>
+<SYNTAX ERASE FROM OBJECT (MANY) WITH OBJECT = V-ERASE-LINE>
+<SYNTAX ERASE OUT OBJECT (MANY) = V-ERASE-LINE>
+<SYNTAX ERASE OUT OBJECT (MANY) WITH OBJECT = V-ERASE-LINE>
+<SYNTAX ERASE BETWEEN OBJECT (MANY) = V-ERASE-LINE>
+<SYNTAX ERASE BETWEEN OBJECT (MANY) WITH OBJECT = V-ERASE-LINE>
+<SYNTAX ERASE FROM OBJECT TO OBJECT = V-ERASE-LINE-TO>
+<SYNTAX ERASE BETWEEN OBJECT TO OBJECT = V-ERASE-LINE-TO>
+<SYNTAX ERASE OBJECT (MANY) = V-ERASE-LINE>
+<SYNONYM ERASE DISCONNECT RUB>
+
+;"Simple questions"
+
+;"<SYNTAX WHAT ...> WHAT is a synonym of EXAMINE"
+
+;"<SYNTAX WHERE ...> WHERE is a synonym of FIND"
+
+"SPELL SYNTAXES"
+
+<SYNTAX CAST OBJECT = V-CAST>
+<SYNTAX CAST OBJECT ON OBJECT = V-CAST>
+<SYNTAX CAST OBJECT AT OBJECT = V-CAST>
+<SYNONYM CAST INCANT>
+
+<SYNTAX LEARN OBJECT (MANY) = V-LEARN>
+<SYNTAX MEMORIZE OBJECT (MANY) = V-MEMORIZE>
+
+<SYNTAX SPELLS = V-SPELLS> ;"inventory of memorized spells"
+
+<SYNTAX GONDAR OBJECT = V-GONDAR PRE-QUICK-CAST> ;"quench flame"
+
+<SYNTAX GNUSTO OBJECT = V-GNUSTO PRE-QUICK-CAST> ;"write magic"
+
+<SYNTAX FROTZ OBJECT = V-FROTZ PRE-QUICK-CAST> ;"light"
+
+<SYNTAX OZMOO OBJECT = V-OZMOO PRE-QUICK-CAST> ;"resurrect"
+
+<SYNTAX ZIFMIA OBJECT = V-ZIFMIA PRE-QUICK-CAST> ;"summon"
+
+<SYNTAX VAXUM OBJECT = V-VAXUM PRE-QUICK-CAST> ;"charm"
+
+<SYNTAX REZROV OBJECT = V-REZROV PRE-QUICK-CAST> ;"open"
+
+<SYNTAX NITFOL OBJECT = V-NITFOL PRE-QUICK-CAST> ;"talk to animal"
+
+<SYNTAX EXEX OBJECT = V-EXEX PRE-QUICK-CAST> ;"haste"
+
+<SYNTAX KULCAD OBJECT = V-KULCAD PRE-QUICK-CAST> ;"dispel"
+
+<SYNTAX MELBOR OBJECT = V-MELBOR PRE-QUICK-CAST> ;"protection"
+
+<SYNTAX BLORB OBJECT = V-BLORB PRE-QUICK-CAST> ;"strong-box"
+
+<SYNTAX GUNCHO OBJECT = V-GUNCHO PRE-QUICK-CAST> ;"banish"
+
+<SYNTAX KREBF = V-KREBF PRE-QUICK-CAST> ;"repair damage"
+<SYNTAX KREBF OBJECT = V-KREBF PRE-QUICK-CAST>
+
+<SYNTAX CLEESH OBJECT = V-CLEESH PRE-QUICK-CAST> ;"change into newt"
+
+<SYNTAX IZYUK OBJECT = V-IZYUK PRE-QUICK-CAST> ;"fly like a bird"
+
+<SYNTAX FILFRE = V-FILFRE PRE-QUICK-CAST> ;"gratuitous fireworks"
+<SYNTAX FILFRE OBJECT = V-FILFRE PRE-QUICK-CAST>
+
+<SYNTAX TIME = V-TIME>
+<SYNONYM TIME T>
+
+<SYNTAX WRITE WITH OBJECT = V-WRITE-WITH>
+<SYNTAX WRITE ON OBJECT = V-WRITE-ON>
+<SYNTAX WRITE ON OBJECT WITH OBJECT = V-WRITE-ON>
+
+<SYNTAX SHARPEN OBJECT WITH OBJECT (FIND TOOLBIT) (HAVE) = V-SHARPEN>
+<SYNONYM SHARPEN HONE>
+
+<SYNTAX AVOID OBJECT = V-AVOID>
+<SYNTAX WALK UNDER OBJECT = V-AVOID>
+<SYNTAX WALK BEHIND OBJECT = V-AVOID>
+
+<SYNTAX GAG OBJECT WITH OBJECT = V-GAG>
+<SYNTAX GROSS OUT OBJECT = V-GROSS-OUT> \ No newline at end of file
diff --git a/temple.zil b/temple.zil
new file mode 100644
index 0000000..92fbf1f
--- /dev/null
+++ b/temple.zil
@@ -0,0 +1,368 @@
+"TEMPLE for
+ ENCHANTER
+ Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+<ROOM TEMPLE
+ (IN ROOMS)
+ (DESC "Temple")
+ (LDESC
+"This is the interior of a huge temple of primitive construction. A few
+flickering torches cast a sallow illumination over the altar, which, atop
+a row of stairs, is still drenched with the blood of human sacrifice. Behind
+the altar is an enormous statue of a demon which seems to reach towards you
+with dripping fangs and razor-sharp talons. Two open doorways lead out of the
+temple to the east and west, while two wooden doors stand at the north and
+south. A mass of hunched figures in the temple are chanting a haunting tune.
+They don't seem interested in your presence.")
+ (NORTH TO TOWER-N IF TOWER-N-DOOR IS OPEN)
+ (SOUTH TO TOWER-S IF TOWER-S-DOOR IS OPEN)
+ (WEST TO COURTYARD-3)
+ (EAST TO COURTYARD-7)
+ (UP TO ALTAR)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL STAIRS TOWER-N-DOOR TOWER-S-DOOR STATUE TEMPLE-OBJ)
+ (ACTION TEMPLE-F)
+ (PSEUDO "ALTAR" ALTAR-PSEUDO)>
+
+<ROUTINE ALTAR-PSEUDO ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"A close examination of the altar nearly sickens you. It fairly screams with
+the memory of the horrors it has seen since the coming of Krill. Its original
+white marble has been crusted with blood and desecrated by the minions of the
+evil Warlock." CR>)
+ (<AND <EQUAL? ,HERE ,TEMPLE>
+ <VERB? CLIMB-UP CLIMB-FOO CLIMB-ON WALK-TO>>
+ <DO-WALK ,P?UP>
+ <RTRUE>)
+ (<VERB? CLIMB-ON WALK-TO RUB CLIMB-UP CLIMB-FOO>
+ <TELL
+"There is nothing you would like less than nearing the altar." CR>)>>
+
+<OBJECT STATUE
+ (IN LOCAL-GLOBALS)
+ (DESC "statue")
+ (SYNONYM STATUE TALONS FANGS)
+ (ADJECTIVE RAZOR-SHARP DRIPPING ENORMOUS)
+ (FLAGS NDESCBIT)
+ (ACTION STATUE-F)>
+
+<ROUTINE STATUE-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"It is an enormous statue of a loathsome creature, dark and vile, with
+dripping fangs and razor-sharp talons. It appears almost to be motioning
+with its outstretched talons for you to approach." CR>)
+ (<VERB? RUB>
+ <TELL
+"Your sensibilities are offended by the very idea." CR>)>>
+
+<OBJECT GANG-OF-N
+ (IN TEMPLE)
+ (DESC "huddled mass, yearning to drink blood")
+ (SYNONYM MASS FIGURE SHAPES MEN)
+ (ADJECTIVE HUDDLED HAIRY)
+ (FLAGS NDESCBIT VICBIT)
+ (ACTION GANG-OF-N-F)>
+
+<ROUTINE GANG-OF-N-F ()
+ <COND (<VERB? GUNCHO>
+ <TELL
+"The majority of the mass of figures fades away into nothingness.
+Enough remain, however, to continue the service (or whatever
+it is)." CR>)
+ (<VERB? FROTZ>
+ <TELL
+"A few select figures suddenly start to give off light, to the horror of
+the remaining ones, who rip them to shreds in an instant." CR>)
+ (<VERB? VAXUM>
+ <TELL
+"Nothing seems to have happened, although a few of the figures seem
+to be chanting in a less guttural tone." CR>)
+ (<VERB? ZIFMIA>
+ <TELL
+"Something appears to have snapped. The figures, who were so peacefully
+ignoring you, now seem to have taken a different, and less pleasant, tack." CR>
+ <TAKE-TO-TOWER>)
+ (<VERB? CLEESH>
+ <TELL
+"Some of the figures hunch down even more and scuttle off." CR>)>>
+
+<ROOM ALTAR
+ (IN ROOMS)
+ (DESC "Sacrificial Altar")
+ (LDESC
+"This is the altar of the temple. Acrid smoke fills the air, and a feeling
+of lurking evil is all around. A low droning, just at the lowest end of
+your perception, causes your hair to stand on end. Behind the altar is an
+enormous statue of a demon which reaches toward you with dripping fangs
+and razor-sharp talons. The fangs and talons are blood-red. In the
+temple below is a mass of hunched figures, chanting in hideous tones.")
+ (DOWN TO TEMPLE)
+ (FLAGS RLANDBIT ONBIT RMUNGBIT)
+ (GLOBAL STAIRS STATUE VOICES)
+ (PSEUDO "ALTAR" ALTAR-PSEUDO)>
+
+<ROOM TOWER-N
+ (IN ROOMS)
+ (DESC "Cell")
+ (LDESC
+"This is a small prison cell in the north tower of the temple. Hideous shapes
+can be seen through the iron-barred window in the prison door. From the temple,
+a blood-curdling chant can be heard.")
+ (SOUTH TO TEMPLE IF TOWER-N-DOOR IS OPEN)
+ (FLAGS RLANDBIT ONBIT)
+ (TEXT
+"Hideous shapes chanting in unison can be seen through the cell window.")
+ (GLOBAL TOWER-N-DOOR WINDOW GUARDS)
+ (PSEUDO "CELL" CELL-PSEUDO)>
+
+<OBJECT GUARDS
+ (IN LOCAL-GLOBALS)
+ (DESC "guards")
+ (SYNONYM GUARD GUARDS SHAPE SHAPES)
+ (ADJECTIVE HIDEOUS HAIRY)
+ (FLAGS VICBIT)
+ (ACTION GUARDS-F)>
+
+<ROUTINE GUARDS-F ()
+ <COND (<VERB? VAXUM>
+ <TELL
+"The guards outside your cell cheer up a bit, upsetting a larger figure who
+could well be their boss. They are dismissed and replaced by other guards
+who don't seem to have the air of bonhomie shared by the others." CR>)
+ (<VERB? CLEESH>
+ <TELL
+"A couple of the guards turn into newts, running this way and that. They
+are quickly replaced, however, by others. Perhaps turning into a newt is
+a commonplace around these parts." CR>)
+ (<VERB? GUNCHO>
+ <TELL
+"A few guards disappear, seeming to vanish with distance while still
+standing in front of you. They are replaced quite quickly
+and efficiently by others. To judge by the reaction to your show of magical
+prowess, you would think these things happen every day." CR>)
+ (<VERB? ZIFMIA>
+ <TELL
+"Oh, no. You've done it now. The guards approach, and they don't look
+very pleased." CR>
+ <QUEUE I-TAKE-TO-ALTAR 1>)
+ (<VERB? EXAMINE>
+ <TELL
+"They are hunched and hairy shapes, but more detail cannot be discerned." CR>)
+ (<VERB? KILL ATTACK MUNG>
+ <TELL
+"You can't reach them from in here, and you wouldn't have a prayer even
+if you could." CR>)
+ (<VERB? LISTEN>
+ <TELL
+"The guards make low, grumbling sounds that could pass for speech, but it
+is incomprehensible to you." CR>)
+ (<VERB? TELL HELLO>
+ <TELL
+"They go right on ignoring you. They don't seem to be much on conversation,
+although from time to time they grumble in an unsettling sort of way." CR>)
+ (<AND <NOT ,GUARDS-HEARD> <VERB? NITFOL>>
+ <SETG GUARDS-HEARD T>
+ <TELL
+"The guards are having a delightful conversation, after a fashion:|
+Guard 1: \"Brgh! Last night, good bloodbath!\"|
+Guard 2: \"Yes. Quite. Best in weeks. Have you seen the new sacrifice?\"|
+Guard 1: \"Brggh! No! Just get here.\"|
+Guard 2: \"It's a scrawny one. Not too much meat.\"|
+Guard 1: \"Brrrgh! No meat! Not had good meal in many days!\"|
+Guard 2: \"Perhaps tonight...\"|
+Voice: \"Stop your yapping, both of you!\"|
+The yapping stops abruptly." CR>)
+ (<VERB? NITFOL>
+ <TELL "The guards aren't speaking much." CR>)>>
+
+<GLOBAL GUARDS-HEARD <>>
+
+<OBJECT TOWER-N-DOOR
+ (IN LOCAL-GLOBALS)
+ (DESC "north cell door")
+ (SYNONYM DOOR)
+ (ADJECTIVE NORTH CELL PRISON)
+ (FLAGS CONTBIT DOORBIT)
+ (ACTION TOWER-DOOR-F)>
+
+<OBJECT TOWER-S-DOOR
+ (IN LOCAL-GLOBALS)
+ (DESC "south cell door")
+ (SYNONYM DOOR)
+ (ADJECTIVE SOUTH CELL PRISON)
+ (FLAGS CONTBIT DOORBIT)
+ (ACTION TOWER-DOOR-F)>
+
+<ROUTINE TOWER-DOOR-F ()
+ <COND (<AND <VERB? UNLOCK OPEN>
+ ,LOCKED-IN-TOWER>
+ <TELL
+"The door is locked from the outside.">
+ <COND (<NOT ,PROTECTED-FROM-EVIL>
+ <TELL " even if you could open it, the guards
+would undoubtedly return you with little difficulty">)>
+ <TELL "." CR>)
+ (<VERB? KNOCK>
+ <TELL
+"It would only get the attention of the guards." CR>)
+ (<VERB? REZROV>
+ <TELL
+"The locked cell door opens with a powerful snap! Unfortunately, the
+guards seem to have heard the snap and approach!" CR>
+ <FSET ,PRSO ,OPENBIT>
+ <SETG LOCKED-IN-TOWER <>>
+ <QUEUE I-TAKE-TO-ALTAR 1>
+ <RTRUE>)>>
+
+<ROOM TOWER-S
+ (IN ROOMS)
+ (DESC "Cell")
+ (NORTH TO TEMPLE IF TOWER-S-DOOR IS OPEN)
+ (FLAGS RLANDBIT ONBIT)
+ (TEXT
+"Hideous shapes chanting in unison can be seen through the cell window.")
+ (ACTION TOWER-S-F)
+ (GLOBAL TOWER-S-DOOR WINDOW)
+ (PSEUDO "CELL" CELL-PSEUDO)>
+
+<ROUTINE TOWER-S-F (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <COND (,SACRIFICED?
+ <TELL
+"This prison cell is similar to the one in which you were held captive
+prior to your sacrifice.">)
+ (ELSE
+ <TELL
+"This is a small prison cell in the south tower of the temple.">)>
+ <TELL " A window in the cell door looks out on the
+temple itself." CR>
+ <COND (<EQUAL? ,ANYTHING-TAKEN ,SCROLLS-TAKEN> <RTRUE>)
+ (<AND <G? ,ANYTHING-TAKEN 0> <G? ,SCROLLS-TAKEN 0>>
+ <TELL
+"The guards must have brought your possessions here, but something is
+definitely missing!" CR>)>
+ <RTRUE>)>>
+
+<ROUTINE CELL-PSEUDO ()
+ <COND (<AND <VERB? ESCAPE>
+ ,LOCKED-IN-TOWER>
+ <TELL
+"That poses a difficult problem. There's only one way out, and that would
+mean tackling a few hundred unpleasant creatures." CR>)
+ (<VERB? DROP>
+ <COND (<EQUAL? ,HERE ,TOWER-S>
+ <DO-WALK ,P?NORTH>)
+ (T <DO-WALK ,P?SOUTH>)>)
+ (<VERB? OPEN>
+ <COND (<EQUAL? ,HERE ,TOWER-S>
+ <PERFORM ,V?OPEN ,TOWER-S-DOOR>)
+ (T
+ <PERFORM ,V?OPEN ,TOWER-N-DOOR>)>
+ <RTRUE>)
+ (<VERB? SEARCH>
+ <PERFORM ,V?LOOK>
+ <RTRUE>)>>
+
+<ROUTINE TEMPLE-F (RARG)
+ <COND (<AND <EQUAL? .RARG ,M-END>
+ <IN? ,PLAYER ,TEMPLE>
+ <NOT ,PROTECTED-FROM-EVIL>
+ <NOT ,LETTER-OF-TRANSIT>>
+ <CRLF>
+ <TAKE-TO-TOWER>)>>
+
+<GLOBAL LOCKED-IN-TOWER <>>
+
+<ROUTINE TAKE-TO-TOWER ()
+ <SETG LOCKED-IN-TOWER T>
+ <SETG WINNER ,PLAYER>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <SETG ADVENTURER-CHARMED <>>
+ <QUEUE I-TURTLE 0>
+ <TELL
+"A low noise begins behind you, and you turn to see hundreds of hunched
+and hairy shapes. A guttural chant issues from their throats. Near you
+stands a figure draped in a robe of deepest black, brandishing a vicious
+dagger. The chant grows louder as the robed figure approaches the altar. As the
+shapes grab you, the figure in black speaks: \"Take the victim to the tower.
+I shall prepare for the sacrifice!\" The figures, whose form you can barely
+guess, take you from here through the northern door and into a prison cell.
+They ">
+ <COND (<SETG ANYTHING-TAKEN <BLT ,PLAYER ,TOWER-S>>
+ <TELL "take your possessions from you and ">)>
+ <TELL "close the door with a crash!" CR CR>
+ <SETG SCROLLS-TAKEN 0>
+ <GOTO ,TOWER-N>
+ <COND (<IN? ,DISPEL-SCROLL ,TOWER-S>
+ <REMOVE ,DISPEL-SCROLL>
+ <SETG SCROLLS-TAKEN 1>)>
+ <COND (<IN? ,BANISH-SCROLL ,TOWER-S>
+ <REMOVE ,BANISH-SCROLL>
+ <SETG SCROLLS-TAKEN <+ ,SCROLLS-TAKEN 1>>)>
+ <ENABLE <QUEUE I-TAKE-TO-ALTAR 4>>
+ <RTRUE>>
+
+<GLOBAL ANYTHING-TAKEN <>>
+
+<GLOBAL SCROLLS-TAKEN <>>
+
+<GLOBAL SACRIFICED? <>>
+
+<ROUTINE I-TAKE-TO-ALTAR ()
+ <COND (,PROTECTED-FROM-EVIL
+ <TELL
+"A gang of hunched and hairy shapes appear, look around cursorily, and then
+depart." CR>
+ <RTRUE>)>
+ <TELL CR
+"A host of hunched and hairy shapes appear through the window. The cell door
+opens and you are marched solemnly to the temple and, from there, up the steps
+to the altar. The large, black figure approaches menacingly. He reaches into
+his cloak and pulls out a ">
+ <COND (,DAGGER-SEEN <TELL "blood-drenched scimitar">)
+ (T <TELL "great, glowing dagger">)>
+ <TELL ". He pulls you onto the altar,
+and with a murmur of approval from the throng, he plunges the blade into
+your heart!" CR>
+ <SETG SACRIFICED? T>
+ <COND (<NOT <==? ,DEATH-CHEATED ,ME>>
+ <SETG WINNER ,PLAYER>
+ <JIGS-UP <> <>>)
+ (T
+ <SETG LOCKED-IN-TOWER <>>
+ <TELL CR
+"You feel yourself filled with a strange warmth as your eyes slowly open.
+You are lying on the altar">
+ <COND (<NOT ,DAGGER-SEEN>
+ <TELL ", a glowing dagger in your chest">)>
+ <TELL ". You are in no
+pain, however. The large figure is gone, but the throng of shapes, taking
+no notice of your movement, is chanting in the temple below.">
+ <COND (<NOT ,DAGGER-SEEN>
+ <TELL " You slowly remove
+the dagger from your chest, but you are not harmed. The blade shines faintly
+in the light of the flickering torches.">)>
+ <CRLF>
+ <CRLF>
+ <SETG SCORE <+ ,SCORE ,TEMPLE-POINT>>
+ <SETG TEMPLE-POINT 0>
+ <COND (<NOT ,DAGGER-SEEN>
+ <SETG DAGGER-SEEN T>
+ <MOVE ,MAGIC-KNIFE ,WINNER>)>
+ <ENABLE <QUEUE I-LETTER-OF-TRANSIT 10>>
+ <SETG LETTER-OF-TRANSIT T>
+ <GOTO ,ALTAR>)>>
+
+<GLOBAL DAGGER-SEEN <>>
+
+<GLOBAL LETTER-OF-TRANSIT <>>
+
+<ROUTINE I-LETTER-OF-TRANSIT ()
+ <COND (<EQUAL? ,HERE ,TEMPLE> <QUEUE I-LETTER-OF-TRANSIT 3>)
+ (T
+ <SETG LETTER-OF-TRANSIT <>>)>
+ <RFALSE>> \ No newline at end of file
diff --git a/terror.zil b/terror.zil
new file mode 100644
index 0000000..40f810f
--- /dev/null
+++ b/terror.zil
@@ -0,0 +1,873 @@
+"TERROR for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+;"It even strikes fear in the hearts of implementers...."
+
+<OBJECT TERROR
+ (IN T-I)
+ (DESC "lurking evil presence")
+ (SYNONYM TERROR PRESENCE FORCE)
+ (ADJECTIVE STALKING EVIL LURKING UNSEEN)
+ (FLAGS NDESCBIT)
+ (GLOBAL TERROR)
+ (ACTION TERROR-F)>
+
+<ROUTINE TERROR-F ()
+ <COND (<VERB? ZIFMIA>
+ <TELL
+"As you cast the zifmia spell, you are overpowered with such a sense of
+malice that you cannot continue. All in all, a good thing probably." CR>)
+ (<VERB? VAXUM>
+ <TELL
+"The terror may be friendlier, but with friends like that...." CR>)
+ (<VERB? GUNCHO>
+ <REMOVE ,TERROR>
+ <TELL
+"The room fills with a horrible noise, darkens to pitch blackness, and
+then lightens. The weight of fear lifts." CR>)>>
+
+<OBJECT TMAP
+ (IN MAP-ROOM)
+ (DESC "map")
+ (FDESC
+"Lying on the ground is an old parchment map.")
+ (SYNONYM MAP)
+ (ADJECTIVE OLD PARCHMENT)
+ (FLAGS TAKEBIT READBIT CONTBIT OPENBIT)
+ (CAPACITY 100)
+ (ACTION TMAP-F)>
+
+<OBJECT PENCIL
+ (IN MAP-ROOM)
+ (DESC "badly worn pencil")
+ (FDESC
+"In one corner of the room is a badly worn pencil, inscribed with runes.")
+ (SYNONYM PENCIL ERASER RUNES)
+ (ADJECTIVE BADLY WORN)
+ (FLAGS TAKEBIT READBIT)
+ (TEXT
+"It says \"Frobozz Magic Pencil Company.\" Some sort of joke, probably.")
+ (ACTION PENCIL-F)>
+
+<ROUTINE TMAP-F ()
+ <COND (<VERB? KULCAD>
+ <TELL
+"At once, a maze of lines forms, connecting all of the spots on the map.
+Suddenly, the world becomes still and cold." CR CR>
+ <END-OF-WORLD>
+ <RTRUE>)
+ (<VERB? OPEN CLOSE PUT>
+ <TELL "You can't do that." CR>)
+ (<VERB? DRAW-ON>
+ <COND (<IN? ,PENCIL ,WINNER>
+ <WRITE-HINT>
+ <RTRUE>)
+ (T
+ <TELL "You have nothing to draw with." CR>)>)
+ (<VERB? READ EXAMINE LOOK-INSIDE>
+ <TELL
+"The map consists of a drawing with nine points, each represented by
+a strange character, with interconnecting thin pencil lines. Using your
+native alphabet, it looks like this:" CR>
+ <DRAW-TMAZE>)>>
+
+<GLOBAL PENCIL-COUNT 2>
+<GLOBAL ERASER-COUNT 2>
+
+<GLOBAL PENCIL-TBL
+ <TABLE "gone" "very nearly gone" "nearly gone">>
+
+<GLOBAL ERASER-TBL
+ <TABLE "not fit for use" "barely usable" "negligible">>
+
+<ROUTINE PENCIL-F ()
+ <COND (<VERB? KULCAD>
+ <TELL
+"As the pencil dissolves into nothingness, everything becomes still
+and cold." CR CR>
+ <END-OF-WORLD>
+ <RTRUE>)
+ (<VERB? EXAMINE>
+ <TELL
+"The pencil is very old and covered with finely inlaid runes. The point is
+">
+ <TELL <GET ,PENCIL-TBL ,PENCIL-COUNT>
+ " and the attached eraser is "
+ <GET ,ERASER-TBL ,ERASER-COUNT>
+ "." CR>)>>
+
+<OBJECT POINT-B
+ (IN TMAP)
+ (DESC "point B")
+ (SYNONYM B)
+ (ADJECTIVE POINT)
+ (FLAGS POINTBIT NDESCBIT)
+ (POINT 1)>
+
+<OBJECT POINT-R
+ (IN TMAP)
+ (DESC "point R")
+ (SYNONYM R)
+ (ADJECTIVE POINT)
+ (FLAGS POINTBIT NDESCBIT)
+ (POINT 2)>
+
+<OBJECT POINT-K
+ (IN TMAP)
+ (DESC "point K")
+ (SYNONYM K)
+ (ADJECTIVE POINT)
+ (FLAGS POINTBIT NDESCBIT)
+ (POINT 3)>
+
+<OBJECT POINT-H
+ (IN TMAP)
+ (DESC "point H")
+ (SYNONYM H)
+ (ADJECTIVE POINT)
+ (FLAGS POINTBIT NDESCBIT)
+ (POINT 4)>
+
+<OBJECT POINT-J
+ (IN TMAP)
+ (DESC "point J")
+ (SYNONYM J)
+ (ADJECTIVE POINT)
+ (FLAGS POINTBIT NDESCBIT)
+ (POINT 5)>
+
+<OBJECT POINT-M
+ (IN TMAP)
+ (DESC "point M")
+ (SYNONYM M)
+ (ADJECTIVE POINT)
+ (FLAGS POINTBIT NDESCBIT)
+ (POINT 6)>
+
+<OBJECT POINT-V
+ (IN TMAP)
+ (DESC "point V")
+ (SYNONYM V)
+ (ADJECTIVE POINT)
+ (FLAGS POINTBIT NDESCBIT)
+ (POINT 7)>
+
+<OBJECT POINT-F
+ (IN TMAP)
+ (DESC "point F")
+ (SYNONYM F)
+ (ADJECTIVE POINT)
+ (FLAGS POINTBIT NDESCBIT)
+ (POINT 8)>
+
+<OBJECT POINT-P
+ (IN TMAP)
+ (DESC "point P")
+ (SYNONYM P)
+ (ADJECTIVE POINT)
+ (FLAGS POINTBIT NDESCBIT)
+ (POINT 9)>
+
+<CONSTANT T-NW 1>
+<CONSTANT T-WEST 3>
+<CONSTANT T-SW 5>
+<CONSTANT T-SOUTH 7>
+<CONSTANT T-SE 9>
+<CONSTANT T-EAST 11>
+<CONSTANT T-NE 13>
+<CONSTANT T-NORTH 15>
+
+<GLOBAL T-DIR-TABLE <TABLE 0 0 0 0 0 "/" 0 "!" 0 "\\">>
+
+<ROOM T-A
+ (IN ROOMS)
+ (DESC "Translucent Room")
+ (FLAGS RLANDBIT)
+ (TMAZE <TABLE
+ ;"NW" 0 0 ;"WEST" 0 0 ;"SW" 0 0 ;"SOUTH" T-B 1
+ ;"SE" T-C 0 ;"EAST" T-E 0 ;"NE" 0 0 ;"NORTH" 0 0 -1>)
+ (CAPACITY 1)
+ (GLOBAL BLACK-PASSAGE)
+ (ACTION TMAZE-F)>
+
+<ROOM T-B
+ (IN ROOMS)
+ (DESC "Translucent Room")
+ (FLAGS RLANDBIT)
+ (TMAZE <TABLE
+ ;"NW" 0 0 ;"WEST" 0 0 ;"SW" 0 0 ;"SOUTH" 0 0
+ ;"SE" T-D 1 ;"EAST" T-F 1 ;"NE" T-C 0 ;"NORTH" T-A 1 -1>)
+ (CAPACITY 2)
+ (GLOBAL BLACK-PASSAGE)
+ (ACTION TMAZE-F)>
+
+<ROOM T-C
+ (IN ROOMS)
+ (DESC "Translucent Room")
+ (FLAGS RLANDBIT)
+ (TMAZE <TABLE
+ ;"NW" T-A 0 ;"WEST" 0 0 ;"SW" T-B 0 ;"SOUTH" T-D 0
+ ;"SE" T-F 0 ;"EAST" T-G 0 ;"NE" T-E 1 ;"NORTH" 0 0 -1>)
+ (CAPACITY 3)
+ (GLOBAL BLACK-PASSAGE)
+ (ACTION TMAZE-F)>
+
+<ROOM T-D
+ (IN ROOMS)
+ (DESC "Translucent Room")
+ (FLAGS RLANDBIT)
+ (TMAZE <TABLE
+ ;"NW" T-B 1 ;"WEST" 0 0 ;"SW" 0 0 ;"SOUTH" 0 0
+ ;"SE" 0 0 ;"EAST" T-I 0 ;"NE" T-F 1 ;"NORTH" T-C 0 -1>)
+ (CAPACITY 4)
+ (GLOBAL BLACK-PASSAGE)
+ (ACTION TMAZE-F)>
+
+<ROOM T-E
+ (IN ROOMS)
+ (DESC "Translucent Room")
+ (FLAGS RLANDBIT)
+ (TMAZE <TABLE
+ ;"NW" 0 0 ;"WEST" T-A 0 ;"SW" T-C 1 ;"SOUTH" T-F 0
+ ;"SE" T-G 1 ;"EAST" 0 0 ;"NE" 0 0 ;"NORTH" 0 0 -1>)
+ (CAPACITY 5)
+ (GLOBAL BLACK-PASSAGE)
+ (ACTION TMAZE-F)>
+
+<ROOM T-F
+ (IN ROOMS)
+ (DESC "Translucent Room")
+ (FLAGS RLANDBIT)
+ (TMAZE <TABLE
+ ;"NW" T-C 0 ;"WEST" T-B 1 ;"SW" T-D 1 ;"SOUTH" 0 0
+ ;"SE" T-I 0 ;"EAST" T-H 0 ;"NE" T-G 1 ;"NORTH" T-E 0 -1>)
+ (CAPACITY 6)
+ (GLOBAL BLACK-PASSAGE)
+ (ACTION TMAZE-F)>
+
+<ROOM T-G
+ (IN ROOMS)
+ (DESC "Translucent Room")
+ (FLAGS RLANDBIT)
+ (TMAZE <TABLE
+ ;"NW" T-E 1 ;"WEST" T-C 0 ;"SW" T-F 1 ;"SOUTH" T-I 0
+ ;"SE" T-H 1 ;"EAST" 0 0 ;"NE" 0 0 ;"NORTH" 0 0 -1>)
+ (CAPACITY 7)
+ (GLOBAL BLACK-PASSAGE)
+ (ACTION TMAZE-F)>
+
+<ROOM T-H
+ (IN ROOMS)
+ (DESC "Translucent Room")
+ (FLAGS RLANDBIT)
+ (TMAZE <TABLE
+ ;"NW" T-G 1 ;"WEST" T-F 0 ;"SW" T-I 0 ;"SOUTH" 0 0
+ ;"SE" 0 0 ;"EAST" 0 0 ;"NE" 0 0 ;"NORTH" 0 0 -1>)
+ (CAPACITY 8)
+ (GLOBAL BLACK-PASSAGE)
+ (ACTION TMAZE-F)>
+
+<ROOM T-I
+ (IN ROOMS)
+ (DESC "Translucent Room")
+ (FLAGS RLANDBIT)
+ (TMAZE <TABLE
+ ;"NW" T-F 0 ;"WEST" T-D 0 ;"SW" 0 0 ;"SOUTH" 0 0
+ ;"SE" 0 0 ;"EAST" 0 0 ;"NE" T-H 0 ;"NORTH" T-G 0 -1>)
+ (CAPACITY 9)
+ (GLOBAL BLACK-PASSAGE)
+ (ACTION TMAZE-F)>
+
+<GLOBAL TMAZE-DIRS <TABLE "northwest" "west" "southwest" "south"
+ "southeast" "east" "northeast" "north">>
+
+<OBJECT BLACK-PASSAGE
+ (IN LOCAL-GLOBALS)
+ (DESC "black passage")
+ (SYNONYM PASSAGE)
+ (ADJECTIVE BLACK)
+ (ACTION BLACK-PASSAGE-F)>
+
+<ROUTINE BLACK-PASSAGE-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The passages are perfectly round and black; the walls seem to be made of
+carbon." CR>)>>
+
+<ROUTINE TMAZE-F (RARG "AUX" TBL (NEX 0) (FLG <>) (OFFS 0) (PLU <>))
+ <COND (<AND <IN? ,BANISH-SCROLL ,WINNER>
+ <EQUAL? ,HERE ,T-A>
+ ,TERROR-TRAPPED
+ <G? ,TERROR-POINT 0>>
+ <TELL
+"You hear a horrible anguished scream through the walls of the cavern as the
+terror realizes that it is trapped and its scroll of power stolen!" CR CR>
+ <SETG SCORE <+ ,SCORE ,TERROR-POINT>>
+ <SETG TERROR-POINT 0>)>
+ <COND (<EQUAL? .RARG ,M-LOOK>
+ <TELL
+"This is a peculiar room, whose cream-colored walls are thin and
+translucent." CR>
+ <SET TBL <GETP ,HERE ,P?TMAZE>>
+ <REPEAT ()
+ <COND (<EQUAL? <GET .TBL .OFFS> -1>
+ <RETURN>)
+ (<EQUAL? <GET .TBL <+ .OFFS 1>> 1>
+ <SET NEX <+ .NEX 1>>)>
+ <SET OFFS <+ .OFFS 2>>>
+ <COND (<EQUAL? .NEX 0>
+ <TELL
+"There is not a single exit from this place." CR>
+ <RTRUE>)
+ (<EQUAL? .NEX 1>
+ <TELL
+"An exit is">)
+ (T
+ <SET PLU T>
+ <TELL
+"Passages go">)>
+ <TELL " to the ">
+ <SET OFFS 0>
+ <REPEAT ()
+ <COND (<EQUAL? <GET .TBL .OFFS> -1>
+ <RETURN>)
+ (<EQUAL? <GET .TBL <+ .OFFS 1>> 1>
+ <TELL <GET ,TMAZE-DIRS </ .OFFS 2>>>
+ <COND (<G? .NEX 2>
+ <SET FLG T>
+ <TELL ", ">)
+ (<EQUAL? .NEX 2>
+ <COND (.FLG <TELL ",">)>
+ <TELL " and ">)>
+ <SET NEX <- .NEX 1>>)>
+ <SET OFFS <+ .OFFS 2>>>
+ <TELL "
+and ">
+ <COND (.PLU <TELL "they are">)
+ (T <TELL "it is">)>
+ <TELL
+" very strange indeed, perfectly round and black as pitch." CR>)
+ (<EQUAL? .RARG ,M-BEG>
+ <COND (<IN? ,TERROR ,HERE>
+ <COND (<VERB? WALK>
+ <TELL
+"Your feet are leaden with fear, and cold sweat runs down your back as you
+make your way to the door, but you make no progress. Your mind tells you
+you are running, but you aren't getting anywhere." CR>)>)
+ (<VERB? WALK>
+ <COND (<AND <EQUAL? ,HERE ,T-A>
+ <EQUAL? ,PRSO ,P?UP>>
+ <GOTO ,DUNGEON>
+ <RTRUE>)
+ (<AND <G? ,PRSO ,P?UP>
+ <EQUAL? <GET <SET TBL <GETP ,HERE ,P?TMAZE>>
+ <SET OFFS
+ <- <* <- ,PRSO
+ ,P?UP>
+ 2>
+ 1>>>
+ 1>>
+ <GOTO <GET .TBL <- .OFFS 1>>>
+ <COND (<IN? ,TERROR ,HERE>
+ <TELL
+"An evil presence pervades the room, its source unseen. Fear seeps into
+your mind, like fog. You look fearfully around. There is something
+horrible here." CR>)
+ (<CONNECTED? ,HERE <LOC ,TERROR>>
+ <TELL
+"You sense that near this place an evil presence lurks. It seems close by
+and is moving." CR>)>
+ <RTRUE>)
+ (T
+ <TELL "You can't go that way." CR>)>)>)>>
+
+<ROUTINE END-OF-WORLD ()
+ <TELL
+"You suddenly feel weak and your knees buckle. Just as you collapse to the
+ground, you find yourself in the presence of the Circle. They seem tense
+and frightened and ask desperately about your recent doings. As you tell
+your tale of the map and pencil, they recoil in horror. \"The Terror is
+released!\" cries one. Belboz sinks into his throne. \"We are doomed!\"
+he gasps. One by one, the wizards flee to prepare a hopeless defense." CR>
+ <SETG SCORE -10>
+ <FINISH>>
+
+<ROUTINE DRAW-TMAZE ()
+ <FIXED-FONT-ON>
+ <TELL CR "B">
+ <ECN ,T-A ,T-H ;"Place holder">
+ <TELL "J" CR>
+ <CN ,T-A ,T-SOUTH>
+ <CN ,T-A ,T-SE>
+ <TELL " ">
+ <CN ,T-E ,T-SW>
+ <CN ,T-E ,T-SOUTH>
+ <CN ,T-E ,T-SE>
+ <CRLF>
+ <CN ,T-A ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-A ,T-SE>
+ <TELL " ">
+ <CN ,T-E ,T-SW>
+ <TELL " ">
+ <CN ,T-E ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-E ,T-SE>
+ <CRLF>
+ <CN ,T-A ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-A ,T-SE>
+ <TELL " ">
+ <CN ,T-E ,T-SW>
+ <TELL " ">
+ <CN ,T-E ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-E ,T-SE>
+ <CRLF>
+ <CN ,T-A ,T-SOUTH>
+ <TELL " K">
+ <ECN ,T-C ,T-E>
+ <TELL "V" CR>
+ <CN ,T-A ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-C ,T-SW>
+ <CN ,T-C ,T-SOUTH>
+ <CN ,T-C ,T-SE>
+ <TELL " ">
+ <CN ,T-E ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-G ,T-SW>
+ <CN ,T-G ,T-SOUTH>
+ <CN ,T-G ,T-SE>
+ <CRLF>
+ <CN ,T-A ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-C ,T-SW>
+ <TELL " ">
+ <CN ,T-C ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-C ,T-SE>
+ <TELL " ">
+ <CN ,T-E ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-G ,T-SW>
+ <TELL " ">
+ <CN ,T-G ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-G ,T-SE>
+ <CRLF>
+ <CN ,T-A ,T-SOUTH>
+ <CN ,T-C ,T-SW>
+ <TELL " ">
+ <CN ,T-C ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-C ,T-SE>
+ <CN ,T-E ,T-SOUTH>
+ <CN ,T-G ,T-SW>
+ <TELL " ">
+ <CN ,T-G ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-G ,T-SE>
+ <CRLF>
+ <TELL "R">
+ <ECN ,T-B ,T-C>
+ <TELL "M">
+ <ECN ,T-F ,T-G>
+ <TELL "F">
+ <TELL CR " ">
+ <CN ,T-B ,T-SE>
+ <TELL " ">
+ <CN ,T-C ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-F ,T-SW>
+ <TELL " ">
+ <CN ,T-F ,T-SE>
+ <TELL " ">
+ <CN ,T-G ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-H ,T-SW>
+ <TELL CR " ">
+ <CN ,T-B ,T-SE>
+ <TELL " ">
+ <CN ,T-C ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-F ,T-SW>
+ <TELL " ">
+ <CN ,T-F ,T-SE>
+ <TELL " ">
+ <CN ,T-G ,T-SOUTH>
+ <TELL " ">
+ <CN ,T-H ,T-SW>
+ <TELL CR " ">
+ <CN ,T-B ,T-SE>
+ <CN ,T-C ,T-SOUTH>
+ <CN ,T-F ,T-SW>
+ <TELL " ">
+ <CN ,T-F ,T-SE>
+ <CN ,T-G ,T-SOUTH>
+ <CN ,T-H ,T-SW>
+ <TELL CR " H">
+ <ECN ,T-D ,T-H ;"Place holder">
+ <TELL "P" CR CR>
+ <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 CN (L DIR)
+ <COND (<NOT <0? <GET <GETP .L ,P?TMAZE> .DIR>>>
+ <TELL <GET ,T-DIR-TABLE .DIR>>)
+ (T <TELL " ">)>>
+
+<ROUTINE ECN (L DN "AUX" (FLG <>))
+ <COND (<NOT <0? <GET <GETP .L ,P?TMAZE> ,T-EAST>>>
+ <SET FLG T>
+ <TELL "---">)
+ (T <TELL " ">)>
+ <COND (<NOT <0? <GET <GETP .DN ,P?TMAZE> ,T-SOUTH>>>
+ <COND (.FLG <TELL "+">)
+ (T <TELL "!">)>)
+ (.FLG <TELL "-">)
+ (T <TELL " ">)>
+ <COND (.FLG <TELL "---">)
+ (T <TELL " ">)>>
+
+<ROUTINE CONNECT (RM1 RM2 "OPTIONAL" (FLIP <>) "AUX" TBL RMX)
+ <SET TBL <GETP .RM1 ,P?TMAZE>>
+ <REPEAT ()
+ <COND (<EQUAL? <SET RMX <GET .TBL 0>> -1>
+ <TELL
+"The pencil doesn't seem to allow that line to be drawn." CR>
+ <RTRUE>)
+ (<EQUAL? .RMX .RM2>
+ <COND (<0? <GET .TBL 1>>
+ <COND (<NOT .FLIP>
+ <CONNECT .RM2 .RM1 T>
+ <SETG PENCIL-COUNT
+ <- ,PENCIL-COUNT 1>>
+ <TELL
+"A thin line now connects the two spots on the map, but the
+pencil point is " <GET ,PENCIL-TBL ,PENCIL-COUNT> "." CR>
+ <COND (<EQUAL? ,HERE .RM1 .RM2>
+ <DESCRIBE-NEW-EXIT .RM1 .RM2>)>)>
+ <PUT .TBL 1 1>
+ <COND (<AND <LOC ,TERROR>
+ <TWALK <LOC ,TERROR>>>
+ <SETG TERROR-TRAPPED <>>
+ <ENABLE <QUEUE I-TERROR -1>>)>)
+ (T
+ <TELL
+"There is already a line connecting those spots." CR>)>
+ <RTRUE>)>
+ <SET TBL <REST .TBL 4>>>>
+
+<ROUTINE DISCONNECT (RM1 RM2 "OPTIONAL" (FLIP <>) "AUX" TBL RMX)
+ <SET TBL <GETP .RM1 ,P?TMAZE>>
+ <REPEAT ()
+ <COND (<EQUAL? <SET RMX <GET .TBL 0>> -1>
+ <TELL
+"Those two spots aren't connected on the map." CR>
+ <RTRUE>)
+ (<EQUAL? .RMX .RM2>
+ <COND (<0? <GET .TBL 1>>
+ <TELL
+"Those two spots aren't connected on the map." CR>)
+ (T
+ <COND (<NOT .FLIP>
+ <DISCONNECT .RM2 .RM1 T>
+ <SETG ERASER-COUNT
+ <- ,ERASER-COUNT 1>>
+ <TELL
+"The line between the two spots is erased, leaving the eraser
+" <GET ,ERASER-TBL ,ERASER-COUNT> "." CR>
+ <COND (<EQUAL? ,HERE .RM1 .RM2>
+ <DESCRIBE-NEW-EXIT .RM1
+ .RM2
+ <>>)>)>
+ <PUT .TBL 1 0>)>
+ <RTRUE>)>
+ <SET TBL <REST .TBL 4>>>>
+
+<ROUTINE DESCRIBE-NEW-EXIT (RM1 RM2 "OPTIONAL" (MAKE? T)
+ "AUX" TMP TBL (OFFS 0))
+ <COND (<EQUAL? .RM2 ,HERE>
+ <SET TMP .RM1>
+ <SET RM1 .RM2>
+ <SET RM2 .TMP>)>
+ <SET TBL <GETP .RM1 ,P?TMAZE>>
+ <REPEAT ()
+ <COND (<EQUAL? <SET TMP <GET .TBL .OFFS>> .RM2>
+ <RETURN>)
+ (<EQUAL? .TMP -1>
+ <TELL "*ERROR* BAD-EXIT DESCRIBE-NEW-EXIT" CR>
+ <RETURN>)
+ (T
+ <SET OFFS <+ .OFFS 2>>)>>
+ <TELL "Suddenly, the ">
+ <COND (.MAKE? <TELL "wall">)
+ (T <TELL "black passage">)>
+ <TELL " to the ">
+ <TELL <GET ,TMAZE-DIRS </ .OFFS 2>>>
+ <COND (.MAKE?
+ <TELL " opens to form a perfectly round and black passage">)
+ (T
+ <TELL " closes off">)>
+ <TELL "!" CR>>
+
+
+<ROUTINE CONNECTED? (RM1 RM2 "AUX" TBL RMX)
+ <SET TBL <GETP .RM1 ,P?TMAZE>>
+ <COND (<NOT .TBL> <RFALSE>)>
+ <REPEAT ()
+ <COND (<EQUAL? <SET RMX <GET .TBL 0>> -1>
+ <RFALSE>)
+ (<EQUAL? .RMX .RM2>
+ <COND (<0? <GET .TBL 1>>
+ <RFALSE>)
+ (T
+ <RTRUE>)>)>
+ <SET TBL <REST .TBL 4>>>>
+
+;<GLOBAL TERROR-ROOM ,T-I>
+
+<GLOBAL TWAIT 0>
+
+<GLOBAL TERROR-ARRIVES
+"An evil presence, borne on a cold blast of air, seems to move beside
+you, weighing you down with emanations of malice and hatred. A cold fear
+covers you like fog.">
+
+<GLOBAL TERROR-MOVED <>>
+
+<ROUTINE I-TERROR ("AUX" RM NRM (FLG <>))
+ <COND (,TERROR-TRAPPED
+ <SET RM <LOC ,TERROR>>
+ <COND (<CONNECTED? ,HERE .RM>
+ <MOVE ,TERROR ,HERE>
+ <TELL ,TERROR-ARRIVES CR>)>)
+ ;(<PROB 5> <RFALSE>)
+ (<TWALK <SET RM <LOC ,TERROR>>>
+ <SETG TERROR-TRAPPED <>>
+ <SETG TWAIT 0>
+ <MOVE ,TERROR <SET NRM <GET ,TMAZE-ROOMS <GET ,PATH-TBL 2>>>>
+ <COND (<EQUAL? ,HERE .NRM>
+ <TELL ,TERROR-ARRIVES CR>
+ <SET FLG T>)
+ (<CONNECTED? ,HERE .NRM>
+ <TELL
+"Somewhere near, an evil presence lurks, probing your mind. It
+seems to be moving quickly." CR>
+ <SET FLG T>)
+ (<CONNECTED? ,HERE .RM>
+ <TELL
+"You can no longer sense the evil presence nearby." CR>
+ <SET FLG T>)>
+ <COND (<NOT ,TERROR-MOVED>
+ <SETG TERROR-MOVED T>
+ <SETG LOSSAGE <+ ,LOSSAGE 1>>
+ <SET FLG T>
+ <TELL
+"You feel that two powerful, evil forces are searching each other out.
+As they meet, the air lightens. Belboz appears before you. \"Something
+has disturbed the ancient Terror. Krill himself knows this and will try
+to use it to his purposes. Already, they may have joined together. You
+must not allow the Terror to escape, or we are all doomed!\" He fades into
+the gloom." CR>)>
+ <COND (<EQUAL? .NRM ,T-A>
+ <END-OF-WORLD>
+ <COND (<EQUAL? ,HERE ,T-A>
+ <SET FLG T>
+ <TELL
+"The presence seems to grow stronger each passing second,
+beating you down with its awesome power." CR>)
+ (T
+ <SET FLG T>
+ <TELL
+"At once, a strange and horrible feeling wells up inside of you.
+An unseen yet awesomely powerful force, exuding pure evil, seems
+to fill the very chamber." CR>)>)>
+ .FLG)
+ (<TNULL-F> <RTRUE>)
+ (<OR <G? <SETG TWAIT <+ ,TWAIT 1>> 6>
+ <NOT <SET RM <TWALK1>>>>
+ <RTRUE>)
+ (T
+ <SET NRM <LOC ,TERROR>>
+ <COND (<EQUAL? .NRM ,T-I> <RTRUE>)
+ (<CONNECTED? .NRM ,T-I>
+ <MOVE ,TERROR ,T-I>)
+ (<CONNECTED? .NRM ,T-F>
+ <MOVE ,TERROR ,T-F>)
+ ;(T
+ <MOVE ,TERROR .RM>)>
+ <COND (<IN? ,TERROR ,HERE>
+ <TELL ,TERROR-ARRIVES CR>)
+ (T
+ <TELL
+"From somewhere nearby, an unseen force probes you, and you are gripped
+by a sickening feeling." CR>)>
+ <RTRUE>)>>
+
+<GLOBAL TERROR-TRAPPED <>>
+
+<GLOBAL TWALK-PATHS
+ <LTABLE ;A <LTABLE>
+ ;B <LTABLE 1 3 4 6>
+ ;C <LTABLE 1 2 5 6 7 4>
+ ;D <LTABLE 2 3 6 9>
+ ;E <LTABLE 1 3 6 7>
+ ;F <LTABLE 3 5 2 4 7 8 9>
+ ;G <LTABLE 5 3 6 8 9>
+ ;H <LTABLE 6 7 9>
+ ;I <LTABLE 4 6 7 8>>>
+
+<GLOBAL TMAZE-ROOMS <LTABLE T-A T-B T-C T-D T-E T-F T-G T-H T-I>>
+
+<ROUTINE TNULL-F ()
+ <SETG TERROR-TRAPPED T>
+ <RFALSE>>
+
+<ROUTINE TWALK (RM)
+ <SETG TWALK-LEVEL 0>
+ <SETG TTRIES 0>
+ <SETG PSTART .RM>
+ <PATH-OUT? .RM>>
+
+<GLOBAL TTRIES 0>
+<GLOBAL PSTART <>>
+
+<CONSTANT TWALK-MAX 5>
+
+;<GLOBAL SLOW-TIMES <LTABLE
+"You feel a passing wave of anger permeating the walls of the room."
+"The feeling of anger from a moment before is greater now."
+"An intense surge of anger fills the very air."
+"This is a bug. Report it."
+"This is a bug. Report it."
+"This is a bug. Report it.">>
+
+<GLOBAL PATH-TBL <TABLE 0 0 0 0 0 0 0>>
+
+<GLOBAL TWALK-LEVEL 0>
+
+<ROUTINE TWALK1 ("AUX" TBL RM NRM (OFFS 1) CNT)
+ <SET RM <LOC ,TERROR>>
+ <SET TBL <GET ,TWALK-PATHS <GETP .RM ,P?CAPACITY>>>
+ <SET CNT <GET .TBL 0>>
+ <REPEAT ()
+ <COND (<G? .OFFS .CNT>
+ <RFALSE>)
+ (<CONNECTED? .RM
+ <SET NRM <GET ,TMAZE-ROOMS
+ <GET .TBL .OFFS>>>>
+ <RETURN .NRM>)>
+ <SET OFFS <+ .OFFS 1>>>>
+
+<ROUTINE PATH-OUT? (RM "AUX" (OFFS 1) TBL (CNT 0) NRM)
+ <SETG TTRIES <+ ,TTRIES 1>>
+ ;<COND (<0? <MOD ,TTRIES 16>>
+ <TELL <GET ,SLOW-TIMES </ ,TTRIES 32>> CR>)>
+ <SETG TWALK-LEVEL <+ ,TWALK-LEVEL 1>>
+ <PUT ,PATH-TBL ,TWALK-LEVEL <GETP .RM ,P?CAPACITY>>
+ <COND (<EQUAL? .RM ,T-A>
+ <SETG TWALK-LEVEL <- ,TWALK-LEVEL 1>>
+ <RTRUE>)
+ (<G? ,TWALK-LEVEL ,TWALK-MAX>
+ <SETG TWALK-LEVEL <- ,TWALK-LEVEL 1>>
+ <RFALSE>)>
+ <SET TBL <GET ,TWALK-PATHS <GETP .RM ,P?CAPACITY>>>
+ <COND (<0? <SET CNT <GET .TBL 0>>>
+ <SETG TWALK-LEVEL <- ,TWALK-LEVEL 1>>
+ <RTRUE>)>
+ <REPEAT ()
+ <COND (<G? .OFFS .CNT>
+ <SETG TWALK-LEVEL <- ,TWALK-LEVEL 1>>
+ <RFALSE>)
+ (<AND <CONNECTED? .RM
+ <SET NRM <GET ,TMAZE-ROOMS
+ <GET .TBL .OFFS>>>>
+ <NOT <EQUAL? .NRM ,PSTART>>
+ <PATH-OUT? .NRM>>
+ <SETG TWALK-LEVEL <- ,TWALK-LEVEL 1>>
+ <RTRUE>)>
+ <SET OFFS <+ .OFFS 1>>>>
+
+<OBJECT LEGEND-BOOK
+ (IN LIBRARY)
+ (DESC "dusty book")
+ (SYNONYM BOOK PAGE)
+ (ADJECTIVE OLD DUSTY FIRST LEGEND)
+ (FDESC
+"Amid the tubes is an old and dusty book.")
+ (FLAGS TAKEBIT READBIT OPENBIT CONTBIT)
+ (SIZE 6)
+ (ACTION LEGEND-BOOK-F)>
+
+<ROUTINE LEGEND-BOOK-F ()
+ <COND (<AND <VERB? CLOSE>
+ <FSET? ,PRSO ,OPENBIT>>
+ <FCLEAR ,PRSO ,OPENBIT>
+ <TELL
+"Closed." CR>)
+ (<VERB? READ EXAMINE LOOK-INSIDE OPEN>
+ <FSET ,PRSO ,OPENBIT>
+ <TELL
+"The first page of the book was the table of contents. Only two chapter names
+can be read: The Legend of the Unseen Terror and The Legend of the Great
+Implementers." CR>)
+ (<VERB? TURN>
+ <TELL
+"Rather than turning pages, why don't you simply read the legends." CR>)>>
+
+<OBJECT LEGEND-ONE
+ (IN LEGEND-BOOK)
+ (DESC "Legend of the Unseen Terror")
+ (SYNONYM LEGEND TERROR)
+ (ADJECTIVE UNSEEN)
+ (FLAGS READBIT NDESCBIT)
+ (GLOBAL TERROR)
+ (TEXT
+"This legend, written in an ancient tongue, goes something like this:
+At one time a shapeless and formless manifestation of evil was disturbed
+from millenia of sleep. It was so powerful that it required the combined
+wisdom of the leading enchanters of that age to conquer it. The legend tells
+how the enchanters lured the Terror \"to a recess deep within the earth\" by
+placing there a powerful spell scroll. When it had reached the scroll, the
+enchanters trapped it there with a spell that encased it in the living
+rock. The Terror was so horrible that none would dare speak of it. A comment
+at the end of the narration indicates that the story is considered to be quite
+fanciful; no other chronicles of the age mention the Terror in any form.")>
+
+<OBJECT LEGEND-TWO
+ (IN LEGEND-BOOK)
+ (DESC "Legend of the Great Implementers" )
+ (SYNONYM LEGEND IMPLEMENTERS)
+ (ADJECTIVE GREAT)
+ (FLAGS READBIT NDESCBIT)
+ (TEXT
+"This legend, written in an ancient tongue, speaks of the creation
+of the world. A more absurd account can hardly be imagined. The universe,
+it seems, was created by \"Implementers\" who directed the running of great
+engines. These engines produced this world and others, strange and wondrous,
+as a test or puzzle for others of their kind. It goes on to state that these
+beings stand ready to aid those entrapped within their creation. The great
+magician-philosopher Helfax notes that a creation of this kind is morally
+and logically indefensible and discards the theory as \"colossal claptrap
+and kludgery.\"")
+ (ACTION LEGEND-TWO-F)>
+
+<ROUTINE LEGEND-TWO-F ()
+ <COND (<AND <VERB? ZIFMIA> <NOT ,IMP-SEEN>>
+ <SETG IMP-SEEN T>
+ <TELL
+"The implementers of the world, Marc Blank and Dave Lebling, appear before
+you, looking quite as confused as yourself. They speak:|
+Dave: \"What's happening here?\"|
+Marc: \"Uh, I dunno. YOU wrote this code, not me.\"|
+Dave: \"Hmm. Another day, another bug. Let's see here...\"|
+They disappear a moment later.|
+Dave's voice: \"That should do it.\"" CR>)>> \ No newline at end of file
diff --git a/verbs.zil b/verbs.zil
new file mode 100644
index 0000000..2da679d
--- /dev/null
+++ b/verbs.zil
@@ -0,0 +1,1893 @@
+"VERBS for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+"SUBTITLE DESCRIBE THE UNIVERSE"
+
+"SUBTITLE SETTINGS FOR VARIOUS LEVELS OF DESCRIPTION"
+
+<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>>
+
+\
+
+"SUBTITLE DESCRIBERS"
+
+<ROUTINE V-LOOK ()
+ <COND (<AND ,PRSO <NOT <EQUAL? ,PRSO ,ROOMS>>>
+ <PERFORM ,V?EXAMINE ,PRSO>
+ <RTRUE>)>
+ <COND (<DESCRIBE-ROOM T>
+ <DESCRIBE-OBJECTS T>)>>
+
+<ROUTINE V-FIRST-LOOK ()
+ <COND (<DESCRIBE-ROOM>
+ <COND (<NOT ,SUPER-BRIEF> <DESCRIBE-OBJECTS>)>)>>
+
+<ROUTINE V-EXAMINE ()
+ <COND (<GETP ,PRSO ,P?TEXT>
+ <TELL <GETP ,PRSO ,P?TEXT> CR>)
+ (<OR <FSET? ,PRSO ,CONTBIT>
+ <FSET? ,PRSO ,DOORBIT>>
+ <V-LOOK-INSIDE>)
+ (ELSE
+ <TELL "You see nothing special about the "
+ D ,PRSO "." CR>)>>
+
+<GLOBAL LIT <>>
+
+<ROUTINE DESCRIBE-ROOM ("OPTIONAL" (LOOK? <>) "AUX" V? STR AV)
+ <SET V? <OR .LOOK? ,VERBOSE>>
+ <COND (<NOT ,LIT>
+ <TELL
+"It is pitch black and there is evil in the darkness.">
+ <CRLF>
+ <RETURN <>>)>
+ <COND (<NOT <FSET? ,HERE ,TOUCHBIT>>
+ <FSET ,HERE ,TOUCHBIT>
+ <SET V? T>)>
+ <COND (<IN? ,HERE ,ROOMS> <TELL D ,HERE CR>)>
+ <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?
+ <FSET? ,HERE ,RMUNGBIT>
+ <SET STR <GETP ,HERE ,P?MUNGDESC>>>
+ <TELL .STR CR>)
+ (<AND .V? <SET STR <GETP ,HERE ,P?LDESC>>>
+ <COND (<AND <FSET? ,HERE ,RMUNGBIT>
+ <NOT <EQUAL? ,HERE ,ALTAR ,JUNCTION>>>
+ <TELL
+"Everything you see is grey and lifeless, as though covered
+with a veil of ash. Sound is muted and there is a faint acrid odor." CR>)>
+ <TELL .STR CR>)
+ (T <APPLY <GETP ,HERE ,P?ACTION> ,M-FLASH>)>
+ <COND (<AND <NOT <==? ,HERE .AV>> <FSET .AV ,VEHBIT>>
+ <APPLY <GETP .AV ,P?ACTION> ,M-LOOK>)>
+ <COND (<NOT <FSET? ,HERE ,LIGHTBIT>>
+ <RTRUE>)
+ (<G? ,TOD ,NIGHTFALL>
+ <TELL
+"The stars shine down on you from a clear, dark sky." CR>)
+ (<G? ,TOD ,DUSK>
+ <TELL
+"The darkening sky is lit by a waning moon." CR>)
+ (<AND <NOT <L? ,TOD ,DAWN>>
+ <L? ,TOD <+ ,DAWN 3>>>
+ <TELL
+"The sun is rising over the lands to the east." CR>)>)>
+ T>
+
+<ROUTINE DESCRIBE-OBJECTS ("OPTIONAL" (V? <>))
+ <COND (,LIT
+ <COND (<FIRST? ,HERE>
+ <PRINT-CONT ,HERE <SET V? <OR .V? ,VERBOSE>> -1>)>)
+ (ELSE
+ <TELL "You can't see anything in the dark." 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 LIGHTED? (OBJ)
+ <COND (<AND <FSET? .OBJ ,LIGHTBIT>
+ <FSET? .OBJ ,ONBIT>>
+ <TELL " (providing light)">)>>
+
+<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>
+ <LIGHTED? .OBJ>)
+ (<0? .LEVEL>
+ <TELL "There is " A .OBJ " here">
+ <LIGHTED? .OBJ>
+ <TELL ".">)
+ (ELSE
+ <TELL <GET ,INDENTS .LEVEL>>
+ <TELL "A">
+ <COND (<FSET? .OBJ ,VOWELBIT> <TELL "n">)>
+ <COND (<EQUAL? .OBJ ,BREAD>
+ <COND (<L? <GETP .OBJ ,P?SIZE> 8>
+ <TELL " partially eaten">)>)
+ (<EQUAL? .OBJ ,WATER>
+ <COND (<L? <GETP .OBJ ,P?SIZE> 2>
+ <TELL " very">)>
+ <COND (<L? <GETP .OBJ ,P?SIZE> 3>
+ <TELL " small">)>)>
+ <TELL " " D .OBJ>
+ <LIGHTED? .OBJ>)>
+ <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-CONT (OBJ "OPTIONAL" (V? <>) (LEVEL 0)
+ "AUX" Y 1ST? AV STR (PV? <>) (INV? <>))
+ #DECL ((OBJ) OBJECT (LEVEL) FIX)
+ <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?>>)
+ (<==? .Y .AV> <SET PV? T>)
+ (<==? .Y ,WINNER>)
+ (<AND <NOT <FSET? .Y ,INVISIBLE>>
+ <NOT <FSET? .Y ,TOUCHBIT>>
+ <SET STR <GETP .Y ,P?FDESC>>>
+ <COND (<NOT <FSET? .Y ,NDESCBIT>>
+ <TELL .STR>
+ <LIGHTED? .Y>
+ <CRLF>)>
+ <COND (<AND <SEE-INSIDE? .Y>
+ <NOT <GETP <LOC .Y> ,P?DESCFCN>>
+ <FIRST? .Y>>
+ <PRINT-CONT .Y .V? 0>)>)>
+ <SET Y <NEXT? .Y>>>)>
+ <SET Y <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<NOT .Y>
+ <COND (<AND .PV? .AV <FIRST? .AV>>
+ <PRINT-CONT .AV .V? .LEVEL>)>
+ <RETURN <NOT .1ST?>>)
+ (<EQUAL? .Y .AV ,PLAYER>)
+ (<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? <>>)>
+ <DESCRIBE-OBJECT .Y .V? .LEVEL>)
+ (<AND <FIRST? .Y> <SEE-INSIDE? .Y>>
+ <PRINT-CONT .Y .V? .LEVEL>)>)>
+ <SET Y <NEXT? .Y>>>>
+
+<ROUTINE FIRSTER (OBJ LEVEL)
+ <COND (<==? .OBJ ,WINNER>
+ <TELL "You are carrying:" CR>)
+ (<NOT <IN? .OBJ ,ROOMS>>
+ <COND (<G? .LEVEL 0>
+ <TELL <GET ,INDENTS .LEVEL>>)>
+ <COND (<EQUAL? .OBJ ,ADVENTURER>
+ <TELL "The adventurer is carrying:" CR>)
+ (<FSET? .OBJ ,SURFACEBIT>
+ <TELL "Sitting on the " D .OBJ
+ " is:" CR>)
+ (ELSE
+ <TELL "The " D .OBJ
+ " contains:" CR>)>)>>
+
+\
+
+"SUBTITLE SCORING"
+
+<GLOBAL MOVES 0>
+<GLOBAL SCORE 0>
+
+<ROUTINE V-SCORE ("OPTIONAL" (ASK? T))
+ #DECL ((ASK?) <OR ATOM FALSE>)
+ <TELL "Your score is " N ,SCORE>
+ <TELL " of a possible " N ,SCORE-MAX ", in ">
+ <TELL N ,MOVES>
+ <COND (<1? ,MOVES> <TELL " move.">) (ELSE <TELL " moves.">)>
+ <CRLF>
+ <COND (<L? ,SCORE 0>
+ <TELL
+"This gives you the rank of Menace to Society." CR>)
+ (T
+ <TELL
+"This puts you in the class of " <GET ,RANKINGS </ ,SCORE 50>> "." CR>)>
+ ,SCORE>
+
+<GLOBAL RANKINGS <TABLE
+"Charlatan"
+"Parlor Magician"
+"Novice Enchanter"
+"Intermediate Enchanter"
+"Enchanter"
+"Expert Enchanter"
+"Master Enchanter"
+"Candidate for membership in the Circle of Enchanters"
+"Member of the Circle of Enchanters">>
+
+<ROUTINE FINISH ("OPTIONAL" (REPEATING <>))
+ <CRLF>
+ <COND (<NOT .REPEATING>
+ <V-SCORE>
+ <CRLF>)>
+ <TELL
+"Would you like to restart the game from the beginning, restore a saved
+game position, or end this session of the game?|
+(Type RESTART, RESTORE, or QUIT):|
+|
+>">
+ <READ ,P-INBUF ,P-LEXV>
+ <COND (<EQUAL? <GET ,P-LEXV 1> ,W?RESTART>
+ <RESTART>
+ <TELL "Failed." CR>
+ <FINISH T>)
+ (<EQUAL? <GET ,P-LEXV 1> ,W?RESTORE>
+ <COND (<RESTORE>
+ <TELL "Okay." CR>)
+ (T
+ <TELL "Failed." CR>
+ <FINISH T>)>)
+ (T
+ <QUIT>)>>
+
+<ROUTINE V-QUIT ("OPTIONAL" (ASK? T) "AUX" SCOR)
+ #DECL ((ASK?) <OR ATOM <PRIMTYPE LIST>> (SCOR) FIX)
+ <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 YES? ()
+ <PRINTI ">">
+ <READ ,P-INBUF ,P-LEXV>
+ <COND (<EQUAL? <GET ,P-LEXV 1> ,W?YES ,W?Y>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE V-VERSION ("AUX" (CNT 17))
+ <TELL
+"ENCHANTER|
+Infocom interactive fiction - a fantasy story|
+Copyright (C) 1983, 1984 by Infocom, Inc. All rights reserved.|
+ENCHANTER is a trademark of Infocom, Inc.|
+Release ">
+ <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-AGAIN ("AUX" OBJ)
+ <COND (<==? ,L-PRSA ,V?WALK>
+ <SETG P-WALK-DIR ,L-PRSO>
+ <PERFORM ,L-PRSA ,L-PRSO>)
+ (T
+ <SET OBJ
+ <COND (<AND ,L-PRSO <NOT <LOC ,L-PRSO>>>
+ ,L-PRSO)
+ (<AND ,L-PRSI <NOT <LOC ,L-PRSI>>>
+ ,L-PRSI)>>
+ <COND (<AND .OBJ
+ <NOT <EQUAL? .OBJ ,PSEUDO-OBJECT ,ROOMS>>>
+ <TELL "I can't see the " D .OBJ " anymore." CR>
+ <RFATAL>)
+ (T
+ <PERFORM ,L-PRSA ,L-PRSO ,L-PRSI>)>)>>
+
+\
+
+"SUBTITLE DEATH AND TRANSFIGURATION"
+
+<GLOBAL DEATHS 0>
+;<GLOBAL LUCKY 1>
+
+"optional arg survive? says whether ozmoo allows you to survive this
+experience."
+
+<ROUTINE JIGS-UP (DESC "OPTIONAL" (SURVIVE? T)
+ "AUX" (BOTH <>) (OZMOOD? <>) (CHEATED? <>))
+ <SET CHEATED? <EQUAL? ,DEATH-CHEATED ,WINNER ,ME>>
+ <SET OZMOOD? <AND .SURVIVE? .CHEATED?>>
+ <SETG DEATH-CHEATED <>>
+ <COND (.DESC <TELL .DESC CR>)>
+ <COND (<NOT <==? ,PLAYER ,WINNER>>
+ <TELL "|
+*** The " D ,WINNER " has died ***
+|
+|">
+ <COND (.OZMOOD?
+ <TELL
+"Fortunately the " D ,WINNER " has been magically protected from violent
+death and appears to be none the worse for his horrible experience." CR>)
+ (ELSE
+ <COND (.CHEATED?
+ <TELL
+"Unfortunately, even the ozmoo spell was not enough to protect the " D ,WINNER
+" from this eventuality." CR>)>
+ <REMOVE ,WINNER>)>
+ <SETG WINNER ,PLAYER>
+ <SETG HERE <LOC ,WINNER>>
+ <SETG LIT <LIT? ,HERE>>
+ <RFATAL>)>
+ <FORGET-ALL>
+ <TELL "
+| **** You have died ****
+|
+|">
+ <COND (.OZMOOD?
+ <TELL
+"Fortunately, you had the foresight to protect yourself against this
+eventuality by a judicious use of the ozmoo spell. You survive this
+horrible experience none the worse for wear, if somewhat chastened." CR>)
+ (T
+ <COND (.CHEATED?
+ <TELL
+"Unfortunately, even the ozmoo spell was not enough to protect you from
+this eventuality." CR>)>
+ <COND (<G? <SETG DEATHS <+ ,DEATHS 1>> 3>
+ <TELL
+"You awaken among the members of the Circle. Belboz the Necromancer
+is exhausted, and the other members of the Circle are disgusted.
+\"I told you Krill was too powerful for such as this,\" says one.
+\"We must send someone who has a chance to defeat a warlock of
+Krill's experience and guile.\" Acrimonious discussion begins, as
+you are waved away to join the apprentices in the scullery. A long
+acquaintance with potatoes and dirty pots is about to begin." CR>
+ <FINISH>)
+ (T
+ <TELL
+"You awaken among the members of the Circle. Belboz the Necromancer
+looks tired, and scattered about are the remains of the components of
+a spell of great healing power. The other members of the Circle are
+pleased to see you revived, but worried by the setback. \"I think
+Krill is too powerful,\" says one. \"This inexperienced wizard will
+never defeat one so puissant as he.\" Quiet discussion ensues, with
+well-concealed acrimony beneath the surface." CR>
+ <COND (<OR <HELD? ,DISPEL-SCROLL>
+ <HELD? ,BANISH-SCROLL>>
+ <COND (<AND <HELD? ,DISPEL-SCROLL>
+ <HELD? ,BANISH-SCROLL>>
+ <SET BOTH T>)>
+ <TELL
+"Belboz tilts his head, as if sensing something amiss. He examines
+your possessions and is taken aback: \"You have acquired ">
+ <COND (.BOTH <TELL "scrolls">)
+ (T <TELL "a scroll">)>
+ <TELL " of great power.
+Using spells of this kind requires surpassing wisdom.\" With a wave
+of his hand, the scroll">
+ <COND (.BOTH <TELL "s disappear">)
+ (T <TELL " disappears">)>
+ <TELL "." CR>
+ <COND (<HELD? ,DISPEL-SCROLL>
+ <REMOVE ,DISPEL-SCROLL>)>
+ <COND (<HELD? ,BANISH-SCROLL>
+ <REMOVE ,BANISH-SCROLL>)>)>
+ <MOVE ,SPELL-BOOK ,WINNER>
+ <FCLEAR ,SPELL-BOOK ,NDESCBIT>
+ <FSET ,SPELL-BOOK ,TAKEBIT>
+ <COND (<FSET? ,JUG ,TOUCHBIT>
+ <MOVE ,JUG ,EAST-FORK>)>
+ <COND (<AND <FSET? ,BREAD ,TOUCHBIT>
+ <G? <GETP ,BREAD ,P?SIZE> 0>>
+ <MOVE ,BREAD ,EAST-FORK>)>
+ <TELL
+"Debate ensues, with Belboz returning frequently to the contents of the ancient
+manuscript. His wishes prevail, and it is agreed to send you back...." CR>
+ <SETG THIRST-COUNT 0>
+ <SETG HUNGER-COUNT 0>
+ <SETG LOCKED-IN-TOWER <>>)>)>
+ <CRLF>
+ <RANDOMIZE-OBJECTS>
+ <COND (<NOT .OZMOOD?>
+ <KILL-INTERRUPTS>
+ <GOTO ,EAST-FORK>)>
+ <SETG P-CONT <>>
+ <RFATAL>>
+
+<ROUTINE RANDOMIZE-OBJECTS ("AUX" (F <FIRST? ,WINNER>) N)
+ <REPEAT ()
+ <COND (.F
+ <SET N <NEXT? .F>>
+ <COND (<FSET? .F ,SCROLLBIT>
+ <MOVE .F ,HERE>)>
+ <SET F .N>)
+ (ELSE <RETURN>)>>
+ <RTRUE>>
+
+<ROUTINE KILL-INTERRUPTS ()
+ <SETG ADVENTURER-CHARMED <>>
+ <STOP-FLYING>
+ <QUEUE I-TURTLE 0>
+ <QUEUE I-TAKE-TO-ALTAR 0>
+ <QUEUE I-GANG 0>
+ <QUEUE I-GUARDS-ARRIVE 0>
+ <RTRUE>>
+
+<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>)>>
+
+<ROUTINE V-RESTART ()
+ <V-SCORE T>
+ <TELL "Do you wish to restart? (Y is affirmative): ">
+ <COND (<YES?>
+ <TELL "Restarting." CR>
+ <RESTART>
+ <TELL "Failed." CR>)>>
+
+<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>
+
+<ROUTINE V-WALK-AROUND ()
+ <USE-DIRECTIONS>>
+
+<ROUTINE USE-DIRECTIONS ()
+ <TELL "You should use compass directions if you wish to move." CR>>
+
+<ROUTINE V-LAUNCH ()
+ <COND (<FSET? ,PRSO ,VEHBIT>
+ <TELL "You can't launch that by saying \"launch\"!" CR>)
+ (T <TELL "How in blazes does one launch that?" CR>)>>
+
+;<ROUTINE LKP (ITM TBL "AUX" (CNT 0) (LEN <GET .TBL 0>))
+ #DECL ((ITM) ANY (TBL) TABLE (CNT LEN) FIX)
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> .LEN>
+ <RFALSE>)
+ (<==? <GET .TBL .CNT> .ITM>
+ <COND (<==? .CNT .LEN> <RFALSE>)
+ (T
+ <RETURN <GET .TBL <+ .CNT 1>>>)>)>>>
+
+<ROUTINE V-WALK ("AUX" PT PTS STR OBJ RM)
+ #DECL ((PT) <OR FALSE TABLE> (PTS) FIX (STR) <OR STRING FALSE>
+ (OBJ) OBJECT (RM) <OR FALSE OBJECT>)
+ <COND (<AND ,TRY-FLY <PRE-FLY>>
+ <RTRUE>)>
+ <COND (<NOT ,P-WALK-DIR>
+ <PERFORM ,V?WALK-TO ,PRSO>
+ <RTRUE>)
+ (<SET PT <GETPT ,HERE ,PRSO>>
+ <COND (<==? <SET PTS <PTSIZE .PT>> ,UEXIT>
+ <GOTO <GETB .PT ,REXIT>>)
+ (<==? .PTS ,NEXIT>
+ <TELL <GET .PT ,NEXITSTR> CR>
+ <RFATAL>)
+ (<==? .PTS ,FEXIT>
+ <COND (<SET RM <APPLY <GET .PT ,FEXITFCN>>>
+ <GOTO .RM>)
+ (T
+ <RFATAL>)>)
+ (<==? .PTS ,CEXIT>
+ <COND (<VALUE <GETB .PT ,CEXITFLAG>>
+ <GOTO <GETB .PT ,REXIT>>)
+ (<SET STR <GET .PT ,CEXITSTR>>
+ <TELL .STR CR>
+ <RFATAL>)
+ (<EQUAL? ,WINNER ,TURTLE>
+ <COND (<IN? ,TURTLE <LOC ,PLAYER>>
+ <TELL "\"I can't go that way.\"" CR>)>
+ <RFATAL>)
+ (<OUTSIDE? ,HERE>
+ <TELL "There's no path in that direction." CR>
+ <RFATAL>)
+ (T
+ <TELL "You can't go that way." CR>
+ <RFATAL>)>)
+ (<==? .PTS ,DEXIT>
+ <COND (<FSET? <SET OBJ <GETB .PT ,DEXITOBJ>> ,OPENBIT>
+ <GOTO <GETB .PT ,REXIT>>)
+ (<SET STR <GET .PT ,DEXITSTR>>
+ <TELL .STR CR>
+ <THIS-IS-IT .OBJ>
+ <RFATAL>)
+ (T
+ <TELL "The " D .OBJ " is closed." CR>
+ <THIS-IS-IT .OBJ>
+ <RFATAL>)>)>)
+ (<AND <EQUAL? ,WINNER ,PLAYER>
+ <NOT ,LIT>
+ <PROB 90>>
+ <JIGS-UP
+"Oh, no! Something has come up from behind you and feasted on your person!">
+ <RFATAL>)
+ (<AND <EQUAL? ,WINNER ,TURTLE>
+ <IN? ,TURTLE <LOC ,PLAYER>>>
+ <TELL "\"I can't go that way.\"" CR>)
+ (T
+ <TELL "You can't go that way." CR>
+ <RFATAL>)>>
+
+<ROUTINE THIS-IS-IT (OBJ)
+ <SETG P-IT-OBJECT .OBJ>
+ <SETG P-IT-LOC ,HERE>>
+
+<ROUTINE V-INVENTORY ()
+ <COND (<FIRST? ,WINNER> <PRINT-CONT ,WINNER>)
+ (T <TELL "You are empty-handed." CR>)>>
+
+<GLOBAL INDENTS
+ <TABLE ""
+ " "
+ " "
+ " "
+ " "
+ " ">>
+
+\
+
+<ROUTINE PRE-TAKE ()
+ <COND (<IN? ,PRSO ,WINNER>
+ <COND ;(<FSET? ,PRSO ,WEARBIT>
+ <TELL "You are already wearing it." CR>)
+ (T <TELL "You already have it." CR>)>)
+ (<AND <FSET? <LOC ,PRSO> ,CONTBIT>
+ <NOT <FSET? <LOC ,PRSO> ,OPENBIT>>>
+ <TELL "You can't reach that." CR>
+ <RTRUE>)
+ (,PRSI
+ <COND (<EQUAL? ,PRSO ,ME>
+ <PERFORM ,V?DROP ,PRSI>
+ <RTRUE>)
+ (<NOT <==? ,PRSI <LOC ,PRSO>>>
+ <TELL "The " D ,PRSO " isn't in the " D ,PRSI "." CR>)
+ (T
+ <SETG PRSI <>>
+ <RFALSE>)>)
+ (<==? ,PRSO <LOC ,WINNER>>
+ <TELL "You are in it!" CR>)>>
+
+<ROUTINE V-TAKE ()
+ <COND (<==? <ITAKE> T>
+ <COND ;(<FSET? ,PRSO ,WEARBIT>
+ <TELL "You are now wearing the " D ,PRSO "." CR>)
+ (T <TELL "Taken." CR>)>)>>
+
+<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 (<NOT <FSET? ,PRSO ,TAKEBIT>>
+ <COND (.VB
+ <TELL <PICK-ONE ,YUKS> CR>)>
+ <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 exhaustion.">)
+ (ELSE <TELL ".">)>
+ <CRLF>)>
+ <RFATAL>)
+ (<AND <G? <SET CNT <CCOUNT ,WINNER>> ,FUMBLE-NUMBER>
+ <PROB <* .CNT ,FUMBLE-PROB>>>
+ <TELL "You're holding too many things already." CR>
+ <RFATAL>)
+ (T
+ <MOVE ,PRSO ,WINNER>
+ <FSET ,PRSO ,TOUCHBIT>
+ <RTRUE>)>>
+
+<ROUTINE V-PUT-ON ()
+ <COND (<FSET? ,PRSI ,SURFACEBIT>
+ <V-PUT>)
+ (T <TELL "There's no good surface on the " D ,PRSI "." CR>)>>
+
+<ROUTINE PRE-PUT ()
+ <COND (<OR <IN? ,PRSO ,GLOBAL-OBJECTS>
+ <NOT <FSET? ,PRSO ,TAKEBIT>>>
+ <TELL "Nice try." CR>)>>
+
+<ROUTINE V-PUT ()
+ <COND (<OR <FSET? ,PRSI ,OPENBIT>
+ <OPENABLE? ,PRSI>
+ <FSET? ,PRSI ,VEHBIT>>)
+ (T
+ <TELL "I can't do that." CR>
+ <RTRUE>)>
+ <COND (<NOT <FSET? ,PRSI ,OPENBIT>>
+ <TELL "The " D ,PRSI " isn't open." CR>)
+ (<==? ,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>>
+ <EQUAL? <ITAKE> ,M-FATAL <>>>
+ <RTRUE>)
+ (T
+ <MOVE ,PRSO ,PRSI>
+ <FSET ,PRSO ,TOUCHBIT>
+ <TELL "Done." CR>)>>
+
+;<ROUTINE PRE-DROP ()
+ <COND (<==? ,PRSO <LOC ,WINNER>>
+ <PERFORM ,V?DISEMBARK ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE PRE-GIVE ()
+ <COND (<NOT <HELD? ,PRSO>>
+ <TELL
+"That's easy for you to say since you don't even have it." CR>)>>
+
+<ROUTINE PRE-SGIVE ()
+ <PERFORM ,V?GIVE ,PRSI ,PRSO>
+ <RTRUE>>
+
+<ROUTINE HELD? (OBJ)
+ <COND (<NOT .OBJ> <RFALSE>)
+ (<IN? .OBJ ,WINNER> <RTRUE>)
+ (<IN? .OBJ ,ROOMS> <RFALSE>)
+ (<IN? .OBJ ,GLOBAL-OBJECTS> <RFALSE>)
+ (T <HELD? <LOC .OBJ>>)>>
+
+<ROUTINE V-GIVE ()
+ <COND (<NOT <FSET? ,PRSI ,VICBIT>>
+ <TELL "You can't give " A ,PRSO " to " A ,PRSI "!" CR>)
+ (T <TELL "The " D ,PRSI " refuses it politely." CR>)>>
+
+<ROUTINE V-SGIVE ()
+ <TELL "**Bug" CR>>
+
+<ROUTINE V-DROP () <COND (<IDROP> <TELL "Dropped." CR>)>>
+
+<ROUTINE V-THROW () <COND (<IDROP> <TELL "Thrown." CR>)>>
+
+<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 V-OPEN ("AUX" F STR)
+ <COND (<NOT <FSET? ,PRSO ,CONTBIT>>
+ <TELL "You must tell me how to do that to " A ,PRSO "." CR>)
+ (<NOT <==? <GETP ,PRSO ,P?CAPACITY> 0>>
+ <COND (<FSET? ,PRSO ,OPENBIT> <TELL "It is already open." CR>)
+ (T
+ <FSET ,PRSO ,OPENBIT>
+ <COND (<OR <NOT <FIRST? ,PRSO>> <FSET? ,PRSO ,TRANSBIT>>
+ <TELL "Opened." CR>)
+ (<AND <SET F <FIRST? ,PRSO>>
+ <NOT <NEXT? .F>>
+ <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 "The " D ,PRSO " fails to open." CR>)>>
+
+<ROUTINE PRINT-CONTENTS (OBJ "AUX" F N (1ST? T))
+ #DECL ((OBJ) OBJECT (F N) <OR FALSE OBJECT>)
+ <COND (<SET F <FIRST? .OBJ>>
+ <REPEAT ()
+ <SET N <NEXT? .F>>
+ <COND (.1ST? <SET 1ST? <>>)
+ (ELSE
+ <TELL ", ">
+ <COND (<NOT .N> <TELL "and ">)>)>
+ <TELL A .F>
+ <SET F .N>
+ <COND (<NOT .F> <RETURN>)>>)>>
+
+<ROUTINE V-CLOSE ()
+ <COND (<NOT <FSET? ,PRSO ,CONTBIT>>
+ <TELL "You must tell me how to do that to " A ,PRSO "." CR>)
+ (<AND <NOT <FSET? ,PRSO ,SURFACEBIT>>
+ <NOT <==? <GETP ,PRSO ,P?CAPACITY> 0>>>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <FCLEAR ,PRSO ,OPENBIT>
+ <TELL "Closed." CR>)
+ (T <TELL "It is already closed." CR>)>)
+ (<FSET? ,PRSO ,DOORBIT>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <TELL "The " D ,PRSO " is now closed." CR>
+ <FCLEAR ,PRSO ,OPENBIT>)
+ (T <TELL "It is already closed." CR>)>)
+ (ELSE
+ <TELL "You cannot close that." CR>)>>
+
+<ROUTINE CCOUNT (OBJ "AUX" (CNT 0) X)
+ <COND (<SET X <FIRST? .OBJ>>
+ <REPEAT ()
+ <SET CNT <+ .CNT 1>>
+ <COND (<NOT <SET X <NEXT? .X>>>
+ <RETURN>)>>)>
+ .CNT>
+
+"WEIGHT: Get sum of SIZEs of supplied object, recursing to the nth level."
+
+<ROUTINE WEIGHT
+ (OBJ "AUX" CONT (WT 0))
+ #DECL ((OBJ) OBJECT (CONT) <OR FALSE OBJECT> (WT) FIX)
+ <COND (<SET CONT <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND ;(<AND <==? .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>>>
+
+<GLOBAL COPR-NOTICE
+" a transcript of interaction with ENCHANTER|
+ENCHANTER is a trademark of Infocom, Inc.|
+Copyright (c) 1983 Infocom, Inc. All rights reserved.|">
+
+<ROUTINE V-SCRIPT ()
+ <PUT 0 8 <BOR <GET 0 8> 1>>
+ <TELL "Here begins" ,COPR-NOTICE CR>>
+
+<ROUTINE V-UNSCRIPT ()
+ <TELL "Here ends" ,COPR-NOTICE CR>
+ <PUT 0 8 <BAND <GET 0 8> -2>>
+ <RTRUE>>
+
+<ROUTINE PRE-MOVE ()
+ <COND (<OR <EQUAL? ,PRSO ,EGG-KNOB-1 ,EGG-KNOB-2 ,EGG-KNOB-3>
+ <EQUAL? ,PRSO ,EGG-KNOB-4 ,EGG-KNOB-5>>
+ <RFALSE> ;"kludge")
+ (<HELD? ,PRSO>
+ <TELL "I don't juggle objects!" 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-LAMP-ON
+ ()
+ <COND (<FSET? ,PRSO ,LIGHTBIT>
+ <COND (<FSET? ,PRSO ,ONBIT> <TELL "It is already on." CR>)
+ (ELSE
+ <FSET ,PRSO ,ONBIT>
+ <TELL "The " D ,PRSO " is now on." CR>
+ <COND (<NOT ,LIT>
+ <SETG LIT <LIT? ,HERE>>
+ <CRLF>
+ <V-LOOK>)>)>)
+ (T
+ <TELL "You can't turn that on." CR>)>
+ <RTRUE>>
+
+<ROUTINE V-LAMP-OFF ()
+ <COND (<FSET? ,PRSO ,LIGHTBIT>
+ <COND (<NOT <FSET? ,PRSO ,ONBIT>>
+ <TELL "It is already off." CR>)
+ (ELSE
+ <FCLEAR ,PRSO ,ONBIT>
+ <COND (<NOT <EQUAL? ,ETERNAL-FLAME ,LANTERN>>
+ <FCLEAR ,PRSO ,LIGHTBIT>)>
+ <COND (,LIT
+ <SETG LIT <LIT? ,HERE>>)>
+ <TELL "The " D ,PRSO " is now off." CR>
+ <SETG LIT <LIT? ,HERE>>
+ <COND (<NOT <LIT? ,HERE <>>>
+ <COND (<OR <NOT <EQUAL? ,HERE ,GALLERY>>
+ <NOT <DESCRIBE-PORTRAIT-GALLERY>>>
+ <TELL "It is now pitch black." CR>)>)>)>)
+ (<FSET? ,PRSO ,ONBIT>
+ <TELL "It's not easy to see how. It's glowing by magic." CR>)
+ (ELSE <TELL "You can't turn that off." CR>)>
+ <RTRUE>>
+
+<ROUTINE V-WAIT ("OPTIONAL" (NUM 3))
+ #DECL ((NUM) FIX)
+ <TELL "Time passes..." CR>
+ <REPEAT ()
+ <COND (<L? <SET NUM <- .NUM 1>> 0> <RETURN>)
+ (<CLOCKER> <RETURN>)>>
+ <SETG CLOCK-WAIT T>>
+
+<ROUTINE V-WAIT-FOR ()
+ <COND (<EQUAL? <LOC ,PRSO> ,HERE ,WINNER>
+ <TELL "It's already here!" CR>)
+ (T <TELL "You will probably be waiting quite a while." CR>)>>
+
+<ROUTINE PRE-BOARD
+ ("AUX" AV)
+ <SET AV <LOC ,WINNER>>
+ <COND (<FSET? ,PRSO ,VEHBIT>
+ <COND (<FSET? .AV ,VEHBIT>
+ <TELL "You are already in the " D .AV ", cretin!" CR>)
+ (T <RFALSE>)>)
+ (T
+ <TELL "You can't get into the "
+ D
+ ,PRSO
+ "!" CR>)>
+ <RFATAL>>
+
+<ROUTINE V-BOARD
+ ("AUX" AV)
+ #DECL ((AV) OBJECT)
+ <TELL "You are now in the " D ,PRSO "." CR>
+ <MOVE ,WINNER ,PRSO>
+ <APPLY <GETP ,PRSO ,P?ACTION> ,M-ENTER>
+ <RTRUE>>
+
+<ROUTINE V-DISEMBARK ()
+ <COND (<NOT <==? <LOC ,WINNER> ,PRSO>>
+ <TELL "You're not in that!" CR>
+ <RFATAL>)
+ (T
+ <TELL "You are on your feet again." CR>
+ <MOVE ,WINNER ,HERE>)>>
+
+<ROUTINE GOTO (RM "OPTIONAL" (V? T) "AUX" OLIT OHERE)
+ <SET OHERE ,HERE>
+ <SET OLIT ,LIT>
+ <MOVE ,WINNER .RM>
+ <SETG HERE .RM>
+ <SETG LIT <LIT? ,HERE>>
+ <COND (<AND <EQUAL? ,WINNER ,PLAYER>
+ <NOT .OLIT>
+ <NOT ,LIT>
+ <PROB 85>>
+ <JIGS-UP
+"Oh, no! Something slithered alongside you and feasted on your person!">
+ <RTRUE>)>
+ <APPLY <GETP ,HERE ,P?ACTION> ,M-ENTER>
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <SETG ADV-OLD-LOC <>>
+ <COND (<AND <IN? ,ADVENTURER .OHERE>
+ ,ADVENTURER-CHARMED
+ <WINNER-HAS-TREASURE?>
+ <NOT <EQUAL? ,HERE ,T-A ,TEMPLE ,CLOSET>>
+ <NOT <EQUAL? ,HERE ,WEST-CASTLE>>>
+ <TELL
+"The adventurer, proceeding cautiously, follows you. He seems to be
+paying particular attention to your possessions." CR CR>
+ <MOVE ,ADVENTURER ,HERE>
+ <SETG ADVENTURER-STAY T>)>)>
+ <COND (<NOT <==? ,HERE .RM>> <RTRUE>)
+ (<NOT <==? ,PLAYER ,WINNER>>
+ <COND (<AND <NOT <EQUAL? ,HERE ,CLOSET ,ENGINE-ROOM>>
+ <IN? ,PLAYER .OHERE ;"Used to be ,HERE">>
+ <TELL
+"The " D ,WINNER ", ever the good friend, leaves you." CR>)
+ (<AND <NOT <EQUAL? ,HERE ,CLOSET ,ENGINE-ROOM>>
+ <IN? ,PLAYER ,HERE>>
+ <TELL
+"The " D ,WINNER " returns to you." CR>)>)
+ (.V? <V-FIRST-LOOK>)>
+ <RTRUE>>
+
+<ROUTINE WINNER-HAS-TREASURE? ()
+ <COND (<OR <IN? ,EGG ,WINNER>
+ <IN? ,MAGIC-KNIFE ,WINNER>
+ <IN? ,JEWELLED-BOX ,WINNER>
+ <IN? ,SILVER-SPOON ,WINNER>>
+ <RTRUE>)>>
+
+<ROUTINE V-BACK ()
+ <USE-DIRECTIONS>>
+
+<ROUTINE V-POUR-ON () <TELL "You can't pour that on anything!" CR>>
+
+<ROUTINE V-SPRAY () <V-SQUEEZE>>
+<ROUTINE V-SSPRAY () <PERFORM ,V?SPRAY ,PRSI ,PRSO>>
+
+<ROUTINE V-SQUEEZE
+ ()
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <TELL "The " D ,PRSO " does not understand this.">)
+ (ELSE <TELL "How singularly useless.">)>
+ <CRLF>>
+
+<ROUTINE PRE-OIL ()
+ <TELL "You probably put spinach in your gas tank, too." CR>>
+
+<ROUTINE V-OIL () <TELL "That's not very useful." CR>>
+
+<ROUTINE V-ADVENT () <TELL "A hollow voice says \"Fool.\"" CR>>
+
+<ROUTINE V-DRINK ("AUX" S)
+ <COND (<AND <EQUAL? ,PRSO ,WATER>
+ <FSET? ,PRSO ,RMUNGBIT>>
+ <TELL
+"Ooh! The water tastes terrible, and even the slightest amount makes you
+ill." CR>)
+ (<AND <EQUAL? ,PRSO ,GLOBAL-WATER>
+ <EQUAL? ,HERE ,BEACH ,FOREST-2>>
+ <TELL "Ooh! That tastes terrible!" CR>)
+ (<NOT <EQUAL? ,PRSO ,WATER ,GLOBAL-WATER>>
+ <TELL "You can't drink that!" CR>)
+ (T
+ <SET S <GET <INT I-THIRST> ,C-TICK>>
+ <COND (<G? .S 60>
+ <TELL "You aren't the least bit thirsty." CR>
+ <RTRUE>)>
+ <QUEUE I-THIRST <+ .S 39>>
+ <SETG THIRST-COUNT 0>
+ <SETG SCORE <+ ,SCORE ,DRINK-POINT>>
+ <SETG DRINK-POINT 0>
+ <TELL
+"The delicious spring water tasted great">
+ <COND (<EQUAL? ,HERE ,SHADY-BROOK>
+ <TELL "." CR>)
+ (<EQUAL? ,PRSO ,WATER>
+ <PUTP ,PRSO ,P?SIZE <SET S <- <GETP ,PRSO ,P?SIZE> 1>>>
+ <COND (<EQUAL? .S 0>
+ <REMOVE ,WATER>)>
+ <TELL <GET ,JUG-FILLS .S> CR>)
+ (T <TELL "." CR>)>)>>
+
+<GLOBAL JUG-FILLS <TABLE
+", but the jug is now empty."
+", and there's still some left."
+", and there's plenty more."
+", and there's lots more where that came from."
+", and the jug's practically full.">>
+
+<ROUTINE V-EAT ()
+ <TELL
+"Did they teach you to eat that in survival school?" CR>>
+
+<ROUTINE V-CURSES ()
+ <COND (,PRSO
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <TELL "Insults of this nature won't help you." CR>)
+ (T
+ <TELL "What a loony!" CR>)>)
+ (T
+ <TELL
+"Such language from an enchanter!" CR>)>>
+
+<ROUTINE V-LISTEN ()
+ <TELL "The " D ,PRSO " makes no sound." CR>>
+
+<ROUTINE V-FOLLOW ()
+ <TELL "You're nuts!" CR>>
+
+<ROUTINE V-STAY ()
+ <TELL "You will be lost without me!" CR>>
+
+<ROUTINE V-PRAY ()
+ <TELL "If you pray enough, your prayers may be answered." CR>>
+
+<ROUTINE V-LEAP ("AUX" TX S)
+ <COND (,PRSO
+ <COND (<IN? ,PRSO ,HERE>
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <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 <==? .S 2> ;NEXIT
+ <AND <==? .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>>)
+ (T <V-SKIP>)>)
+ (ELSE <V-SKIP>)>>
+
+<ROUTINE V-SKIP () <TELL "Wasn't that fun?" CR>>
+
+<ROUTINE V-LEAVE () <DO-WALK ,P?OUT>>
+
+<ROUTINE V-HELLO ()
+ <COND (,PRSO
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <TELL "The "
+ D
+ ,PRSO
+ " bows his head to you in greeting." CR>)
+ (ELSE
+ <TELL
+"I think that only schizophrenics say \"Hello\" to a "
+ D
+ ,PRSO
+ "." CR>)>)
+ (ELSE <TELL <PICK-ONE ,HELLOS> CR>)>>
+
+<GLOBAL HELLOS <LTABLE 0
+"Hello."
+"Good day."
+"Nice weather we've been having lately."
+"Good-bye.">>
+
+<GLOBAL JUMPLOSS <LTABLE 0
+"You should have looked before you leaped."
+"I'm afraid that leap was a bit much for your weak frame.">>
+
+<ROUTINE PRE-READ ()
+ <COND (<==? ,PRSO ,SPELL-BOOK> <RFALSE> ;"special case")
+ (<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 ,PRSI "?" CR>)>>
+
+<ROUTINE V-READ ()
+ <COND (<NOT <FSET? ,PRSO ,READBIT>>
+ <TELL "How can I read " A ,PRSO "?" CR>)
+ (ELSE <TELL <GETP ,PRSO ,P?TEXT> CR>)>>
+
+<ROUTINE V-LOOK-UNDER () <TELL "There is nothing but dust there." CR>>
+
+<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.">)
+ (ELSE <TELL "The " D ,PRSO " is closed.">)>
+ <CRLF>)
+ (<FSET? ,PRSO ,CONTBIT>
+ <COND (<FSET? ,PRSO ,VICBIT>
+ <TELL "There is nothing special to be seen." CR>)
+ (<SEE-INSIDE? ,PRSO>
+ <COND (<AND <FIRST? ,PRSO> <PRINT-CONT ,PRSO>>
+ <RTRUE>)
+ (<FSET? ,PRSO ,SURFACEBIT>
+ <TELL "There is nothing on the " D ,PRSO "." CR>)
+ (T
+ <TELL "The " D ,PRSO " is empty." CR>)>)
+ (ELSE <TELL "The " D ,PRSO " is closed." CR>)>)
+ (ELSE <TELL "You can't look inside " A ,PRSO "." CR>)>>
+
+<ROUTINE SEE-INSIDE? (OBJ)
+ <AND <NOT <FSET? .OBJ ,INVISIBLE>>
+ <OR <FSET? .OBJ ,TRANSBIT> <FSET? .OBJ ,OPENBIT>>>>
+
+<ROUTINE V-REPENT () <TELL "It could very well be too late!" CR>>
+
+<ROUTINE PRE-BURN ()
+ <COND (<NOT ,PRSI>
+ <TELL "Your blazing gaze is insufficient." CR>)
+ (<EQUAL? ,PRSI ,ETERNAL-FLAME> <RFALSE>)
+ (T <TELL "With " A ,PRSI "??!?" CR>)>>
+
+<ROUTINE V-BURN ()
+ <COND (<FSET? ,PRSO ,BURNBIT>
+ <COND (<IN? ,PRSO ,WINNER>
+ <REMOVE ,PRSO>
+ <TELL "The " D ,PRSO " catches fire." CR>
+ <JIGS-UP
+"Unfortunately, you were holding it at the time.">)
+ (T
+ <REMOVE ,PRSO>
+ <TELL "The " D ,PRSO
+" catches fire and is consumed." CR>)
+ (ELSE <TELL "You don't have that." CR>)>)
+ (T <TELL "I don't think you can burn " A ,PRSO "." CR>)>>
+
+<ROUTINE V-TURN () <TELL "This has no effect." CR>>
+
+<ROUTINE V-PUMP () <TELL "It's not clear how." CR>>
+
+<ROUTINE V-INFLATE () <TELL "How can you inflate that?" CR>>
+
+<ROUTINE V-DEFLATE () <TELL "Come on, now!" CR>>
+
+<ROUTINE V-LOCK () <TELL "It doesn't seem to work." CR>>
+
+<ROUTINE V-PICK () <TELL "You can't pick that." CR>>
+
+<ROUTINE V-UNLOCK () <V-LOCK>>
+
+<ROUTINE V-CUT ()
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <PERFORM ,V?KILL ,PRSO ,PRSI>)
+ (<AND <FSET? ,PRSO ,BURNBIT>
+ <FSET? ,PRSI ,WEAPONBIT>>
+ <REMOVE ,PRSO>
+ <TELL "Your skillful "
+ D
+ ,PRSI
+ "smanship slices the "
+ D
+ ,PRSO
+ " into innumerable
+slivers which evaporate instantaneously."
+ CR>)
+ (<NOT <FSET? ,PRSI ,WEAPONBIT>>
+ <TELL
+"I doubt that the \"cutting edge\" of " A ,PRSI " is adequate." CR>)
+ (T
+ <TELL "Strange concept, cutting the " D ,PRSO "...." CR>)>>
+
+<ROUTINE PRE-HIT ()
+ <COND (<AND ,PRSI <NOT <IN? ,PRSI ,WINNER>>>
+ <TELL "You don't have the " D ,PRSI "." CR>)>>
+
+<ROUTINE V-KILL ()
+ <IKILL "kill">>
+
+<ROUTINE IKILL (STR)
+ #DECL ((STR) STRING)
+ <COND (<NOT ,PRSO> <TELL "There is nothing here to " .STR "." CR>)
+ (<AND <NOT <FSET? ,PRSO ,VILLAIN>>
+ <NOT <FSET? ,PRSO ,VICBIT>>>
+ <TELL "I've known strange people, but fighting a "
+ D
+ ,PRSO
+ "?" CR>)
+ (<OR <NOT ,PRSI> <==? ,PRSI ,HANDS>>
+ <TELL "Trying to "
+ .STR
+ " 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 "
+ .STR
+ " the "
+ D
+ ,PRSO
+ " with a "
+ D
+ ,PRSI
+ " is suicidal." CR>)
+ (ELSE <TELL "You'd never survive the attack." CR>)>>
+
+<ROUTINE V-ATTACK () <IKILL "attack">>
+
+<ROUTINE V-SWING ()
+ <COND (<NOT ,PRSI>
+ <TELL "Whoosh!" CR>)
+ (T <PERFORM ,V?ATTACK ,PRSI ,PRSO>)>>
+
+<ROUTINE V-KICK () <HACK-HACK "Kicking the ">>
+
+<ROUTINE V-WAVE () <HACK-HACK "Waving the ">>
+
+<ROUTINE V-WAVE-AT () <TELL
+"Despite your friendly nature, the " D ,PRSO " isn't likely to respond." CR>>
+
+<ROUTINE V-RAISE () <HACK-HACK "Playing in this way with the ">>
+
+<ROUTINE V-LOWER () <HACK-HACK "Playing in this way with the ">>
+
+<ROUTINE V-RUB () <HACK-HACK "Fiddling with the ">>
+
+<ROUTINE V-PUSH () <HACK-HACK "Pushing the ">>
+
+<ROUTINE V-PUSH-TO () <TELL "You can't push things to that." CR>>
+
+<ROUTINE V-MUNG ()
+ <COND (<NOT <FSET? ,PRSO ,VICBIT>>
+ <HACK-HACK "Trying to damage the ">)
+ (<NOT ,PRSI>
+ <TELL "Trying to break the "
+ D
+ ,PRSO
+ " with your bare hands is suicidal." CR>)
+ (<NOT <FSET? ,PRSI ,WEAPONBIT>>
+ <TELL "Trying to destroy the "
+ D
+ ,PRSO
+ " with a "
+ D
+ ,PRSI
+ " is quite self-destructive." CR>)
+ (T <TELL "You can't." CR>)>>
+
+<ROUTINE HACK-HACK
+ (STR)
+ #DECL ((STR) STRING)
+ <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 do anything."
+ " doesn't accomplish anything."
+ " has no desirable effect.">>
+
+<ROUTINE WORD-TYPE
+ (OBJ WORD "AUX" SYNS)
+ #DECL ((OBJ) OBJECT (WORD SYNS) TABLE)
+ <ZMEMQ .WORD
+ <SET SYNS <GETPT .OBJ ,P?SYNONYM>>
+ <- </ <PTSIZE .SYNS> 2> 1>>>
+
+<ROUTINE V-KNOCK
+ ()
+ <COND (<WORD-TYPE ,PRSO ,W?DOOR>
+ <TELL "I don't think that anybody's home." CR>)
+ (ELSE <TELL "Why knock on " A ,PRSO "?" CR>)>>
+
+<ROUTINE V-YELL () <TELL "Aarrrrrgggggggghhhhhhhhhhh!" CR>>
+
+<ROUTINE V-PLUG () <TELL "This has no effect." CR>>
+
+<ROUTINE V-EXORCISE () <TELL "You can't do that with mere words!" CR>>
+
+\
+
+<ROUTINE V-SHAKE ("AUX" X)
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <TELL "Be real." CR>)
+ (<NOT <FSET? ,PRSO ,TAKEBIT>>
+ <TELL "You can't take it; thus, you can't shake it!" CR>)
+ (T <TELL "There's no point in shaking that." CR>)>>
+
+<ROUTINE PRE-DIG ()
+ <COND (<NOT ,PRSI> <SETG PRSI ,HANDS>)>
+ <COND (<FSET? ,PRSO ,TOOLBIT>
+ <SETG PRSI ,PRSO>
+ <SETG PRSO ,GROUND>)>
+ <COND (<FSET? ,PRSI ,TOOLBIT> <RFALSE>)
+ (ELSE
+ <TELL "Digging with the " D ,PRSI " is very silly." CR>)>>
+
+<ROUTINE V-DIG ()
+ <TELL "The ground is unsuitable for digging here." CR>>
+
+<ROUTINE V-SMELL ()
+ <TELL "It smells just like " A ,PRSO "." CR>>
+
+<ROUTINE GLOBAL-IN? (OBJ1 OBJ2 "AUX" TX)
+ <COND (<SET TX <GETPT .OBJ2 ,P?GLOBAL>>
+ <ZMEMQB .OBJ1 .TX <- <PTSIZE .TX> 1>>)>>
+
+<ROUTINE V-SWIM ()
+ <COND (<AND <NOT ,PRSO>
+ <GLOBAL-IN? ,GLOBAL-WATER ,HERE>>
+ <SETG PRSO ,GLOBAL-WATER>)>
+ <COND (<EQUAL? ,PRSO ,GLOBAL-WATER ,SEA>
+ <TELL "You'd probably drown." CR>)
+ (<EQUAL? ,PRSO ,WATER>
+ <TELL "This is a very small brook. Forget it." CR>)
+ (T <TELL "There's nothing to swim in!" CR>)>>
+
+<ROUTINE V-UNTIE () <TELL "This cannot be tied, so it cannot be untied!" CR>>
+
+<ROUTINE PRE-TIE
+ ()
+ <COND (<==? ,PRSI ,WINNER>
+ <TELL "You can't tie it to yourself." CR>)>>
+
+<ROUTINE V-TIE () <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-MELT () <TELL "I'm not sure that " A ,PRSO " can be melted." CR>>
+
+<ROUTINE V-MUMBLE
+ ()
+ <TELL "You'll have to speak up if you expect me to hear you!" CR>>
+
+<ROUTINE V-ALARM ()
+ <TELL "The " D ,PRSO " isn't sleeping." CR>>
+
+<ROUTINE V-ZORK ()
+ <TELL
+"ZORK (R) - A trilogy of fantasy classics from INFOCOM. " CR>>
+
+\
+
+<ROUTINE V-CLIMB-ON ()
+ <COND (<FSET? ,PRSO ,VEHBIT>
+ <V-CLIMB-UP ,P?UP T>)
+ (T
+ <TELL "You can't climb onto the " D ,PRSO "." CR>)>>
+
+<ROUTINE V-CLIMB-FOO ()
+ <V-CLIMB-UP ,P?UP T>>
+
+<ROUTINE V-CLIMB-UP ("OPTIONAL" (DIR ,P?UP) (OBJ <>) "AUX" X)
+ #DECL ((DIR) FIX (OBJ) <OR ATOM FALSE> (X) TABLE)
+ <COND (<GETPT ,HERE .DIR>
+ <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>)
+ (ELSE <TELL "Bizarre!" CR>)>>
+
+<ROUTINE V-LIE-DOWN ()
+ <COND (<EQUAL? ,HERE ,BEDROOM>
+ <PERFORM ,V?BOARD ,BED>
+ <RTRUE>)
+ (T
+ <PERFORM ,V?SLEEP>
+ <RTRUE>)>>
+
+<ROUTINE V-CLIMB-DOWN ()
+ <V-CLIMB-UP ,P?DOWN>>
+
+<ROUTINE V-SEND ()
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <TELL "Why would you send for the " D ,PRSO "?" CR>)
+ (ELSE <TELL <PICK-ONE ,YUKS> CR>)>>
+
+<ROUTINE V-WIND ()
+ <TELL "You cannot wind up " A ,PRSO "." CR>>
+
+<ROUTINE V-COUNT ()
+ <TELL "You have lost your mind." CR>>
+
+<ROUTINE V-PUT-UNDER ()
+ <TELL "You can't put anything under that." CR>>
+
+;"Fix this"
+
+<ROUTINE V-PLAY ()
+ <COND (<EQUAL? ,PRSO ,KRILL ,GLOBAL-KRILL>
+ <TELL
+"You are so engrossed in the role of the " D ,PRSO " that
+you kill yourself, just as he would have done!" CR>
+ <JIGS-UP <>>)
+ (T <TELL "How peculiar!" CR>)>>
+
+<ROUTINE V-ENTER ()
+ <DO-WALK ,P?IN>>
+
+<ROUTINE V-EXIT ()
+ <DO-WALK ,P?OUT>>
+
+<ROUTINE V-CROSS ()
+ <TELL "You can't cross that!" CR>>
+
+<ROUTINE V-SEARCH ()
+ <TELL "You find nothing unusual." CR>>
+
+<ROUTINE V-FIND ("AUX" (L <LOC ,PRSO>))
+ <COND (<EQUAL? ,PRSO ,HANDS>
+ <TELL
+"Within six feet of your head, assuming you haven't left that
+somewhere." CR>)
+ (<==? ,PRSO ,ME>
+ <TELL "You're around here somewhere..." CR>)
+ (<IN? ,PRSO ,WINNER>
+ <TELL "You have it!" CR>)
+ (<OR <IN? ,PRSO ,HERE>
+ <IN? ,PRSO ,LOCAL-GLOBALS>
+ <EQUAL? ,PRSO ,PSEUDO-OBJECT ,ROAD>>
+ <TELL "It's right in front of you." CR>)
+ (<FSET? .L ,VILLAIN>
+ <TELL "The " D .L " has it." CR>)
+ (<FSET? .L ,CONTBIT>
+ <TELL "It's in the " D .L "." CR>)
+ (ELSE
+ <TELL "Beats me, but it's not here." CR>)>>
+
+<ROUTINE V-TELL ()
+ <COND (<EQUAL? ,PRSO ,TURTLE ,ADVENTURER ,FROG>
+ <COND (,P-CONT
+ <SETG WINNER ,PRSO>
+ <SETG HERE <LOC ,WINNER>>)
+ (T
+ <TELL
+"The " D, PRSO " looks at you expectantly, as though he thought you were
+about to talk." CR>)>)
+ (T
+ <TELL "You can't talk to the " D ,PRSO "!" CR>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <RFATAL>)>>
+
+<ROUTINE V-ANSWER ()
+ <TELL "Nobody seems to be awaiting your answer." CR>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>>
+
+<ROUTINE V-REPLY ()
+ <TELL "It is hardly likely that the " D ,PRSO " is interested." CR>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>>
+
+<ROUTINE V-KISS ()
+ <TELL "I'd sooner kiss a pig." CR>>
+
+<ROUTINE V-RAPE ()
+ <TELL "What a (ahem!) strange idea." CR>>
+
+<ROUTINE FIND-IN (WHERE WHAT "AUX" W)
+ <SET W <FIRST? .WHERE>>
+ <COND (<NOT .W> <RFALSE>)>
+ <REPEAT ()
+ <COND (<FSET? .W .WHAT> <RETURN .W>)
+ (<NOT <SET W <NEXT? .W>>> <RETURN <>>)>>>
+
+<ROUTINE V-SAY ("AUX" V)
+ <COND (<SET V <FIND-IN ,HERE ,VICBIT>>
+ <TELL "You must address the " D .V " directly." CR>)
+ (<==? <GET ,P-LEXV ,P-CONT> ,W?HELLO>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>)
+ (ELSE
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <TELL
+"Talking to yourself is said to be a sign of impending mental
+collapse." CR>)>>
+
+<ROUTINE V-SPIN ()
+ <TELL "You can't spin that!" CR>>
+
+<ROUTINE V-THROUGH ("AUX" M)
+ <COND (<FSET? ,PRSO ,DOORBIT>
+ <DO-WALK <OTHER-SIDE ,PRSO>>
+ <RTRUE>)
+ (<FSET? ,PRSO ,VEHBIT>
+ <PERFORM ,V?BOARD ,PRSO>
+ <RTRUE>)
+ (<NOT <FSET? ,PRSO ,TAKEBIT>>
+ <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>)
+ (ELSE <TELL <PICK-ONE ,YUKS> CR>)>>
+
+<ROUTINE V-WEAR ()
+ <COND ;(<FSET? ,PRSO ,WEARBIT> <PERFORM ,V?TAKE ,PRSO> <RTRUE>)
+ (ELSE
+ <TELL "You can't wear the " D ,PRSO "." CR>)>>
+
+<ROUTINE V-THROW-OFF ()
+ <TELL "You can't throw anything off that!" CR>>
+
+<ROUTINE V-$VERIFY ()
+ <COND (<AND <EQUAL? ,PRSO ,INTNUM>
+ <EQUAL? ,P-NUMBER 4338>>
+ <TELL N ,SERIAL CR>)
+ (,PRSO <TELL "I don't understand that sentence." CR>)
+ (ELSE
+ <TELL "Verifying disk..." CR>
+ <COND (<VERIFY> <TELL "The disk is correct." CR>)
+ (T <TELL CR "** Disk Failure **" CR>)>)>>
+
+<ROUTINE V-STAND ()
+ <COND (<FSET? <LOC ,WINNER> ,VEHBIT>
+ <PERFORM ,V?DISEMBARK <LOC ,WINNER>>
+ <RTRUE>)
+ (ELSE
+ <TELL "You are already standing, I think." CR>)>>
+
+<ROUTINE V-PUT-BEHIND ()
+ <TELL "That hiding place is too obvious." CR>>
+
+<ROUTINE DO-WALK (DIR)
+ <SETG P-WALK-DIR .DIR>
+ <PERFORM ,V?WALK .DIR>>
+
+<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>)>>
+
+;"Finds the room on the other side of a door"
+
+<ROUTINE OTHER-SIDE (DOBJ "AUX" (P 0) TX)
+ <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 V-DRINK-FROM ()
+ <COND (<EQUAL? ,PRSO ,GLOBAL-WATER>
+ <PERFORM ,V?DRINK ,PRSO>
+ <RTRUE>)
+ (<AND <EQUAL? ,PRSO ,JUG>
+ <IN? ,WATER ,JUG>>
+ <PERFORM ,V?DRINK ,WATER>
+ <RTRUE>)
+ (T <TELL "How peculiar!" CR>)>>
+
+<ROUTINE V-LEAN-ON ()
+ <TELL "Are you so very tired, then?" CR>>
+
+<ROUTINE V-MAKE-LINE-TO ()
+ <COND (<AND <FSET? ,PRSO ,POINTBIT>
+ <FSET? ,PRSI ,POINTBIT>>
+ <COND (<NOT <IN? ,PENCIL ,WINNER>>
+ <TELL
+"You're not holding anything you can make it with." CR>)
+ (<EQUAL? ,PENCIL-COUNT 0>
+ <TELL
+"There's not enough left of the pencil to make a line with." CR>)
+ (T
+ <CONNECT <GET ,TMAZE-ROOMS <GETP ,PRSO ,P?POINT>>
+ <GET ,TMAZE-ROOMS <GETP ,PRSI ,P?POINT>>>)>)
+ (T <TELL "That's silly." CR>)>>
+
+<ROUTINE V-MAKE-LINE ()
+ <COND (<AND ,PRSI <FSET? ,PRSI ,POINTBIT>>
+ <PERFORM ,V?MAKE-LINE-TO ,PRSO ,PRSI>
+ <RFATAL>)
+ (<AND ,PRSI <NOT <EQUAL? ,PRSI ,PENCIL>>>
+ <TELL
+"You won't write anything with that!" CR>)
+ (<NOT <2OBJS?>> <RFATAL>)
+ (T
+ <PERFORM ,V?MAKE-LINE-TO <GET ,P-PRSO 1> <GET ,P-PRSO 2>>
+ <RFATAL>)>>
+
+<ROUTINE V-ERASE-LINE-TO ()
+ <COND (<AND <FSET? ,PRSO ,POINTBIT>
+ <FSET? ,PRSI ,POINTBIT>>
+ <COND (<NOT <IN? ,PENCIL ,WINNER>>
+ <TELL
+"You're not holding anything you can erase it with." CR>)
+ (<EQUAL? ,ERASER-COUNT 0>
+ <TELL
+"There's not enough left of the eraser." CR>)
+ (T
+ <DISCONNECT <GET ,TMAZE-ROOMS
+ <GETP ,PRSO ,P?POINT>>
+ <GET ,TMAZE-ROOMS
+ <GETP ,PRSI ,P?POINT>>>)>)
+ (T <TELL "That's silly." CR>)>>
+
+<ROUTINE V-ERASE-LINE ()
+ <COND (<AND ,PRSI <NOT <EQUAL? ,PRSI ,PENCIL>>>
+ <TELL
+"You won't erase anything with that!" CR>)
+ (<EQUAL? <GET ,P-PRSO 0> 1>
+ <COND (<EQUAL? <GET ,P-PRSO 1> ,PENCIL>
+ <TELL
+"If you want to erase one of the pencil lines, you should specify the
+line. For example, \"ERASE THE LINE BETWEEN X AND Z.\"" CR>)
+ (<FSET? <GET ,P-PRSO 1> ,POINTBIT>
+ <TELL "You can't seem to erase the marking." CR>)
+ (T
+ <TELL "You can't erase that!" CR>)>)
+ (<NOT <2OBJS?>> <RFATAL>)
+ (T
+ <PERFORM ,V?ERASE-LINE-TO <GET ,P-PRSO 1> <GET ,P-PRSO 2>>
+ <RFATAL>)>>
+
+<ROUTINE 2OBJS? ()
+ <COND (<NOT <EQUAL? <GET ,P-PRSO 0> 2>>
+ <PUT ,P-PRSO 0 1>
+ <TELL "That sentence doesn't make sense." CR>
+ <RFALSE>)
+ (T <RTRUE>)>>
+
+<GLOBAL YUKS
+ <LTABLE 0
+ "No spell would help with that!"
+ "It would take more magic than you've got!"
+ "You can't be serious."
+ "You must have had a silliness spell cast upon you.">>
+
+<ROUTINE V-REACH-IN ("AUX" OBJ)
+ <COND (<OR <NOT <FSET? ,PRSO ,CONTBIT>>
+ <FSET? ,PRSO ,VILLAIN>>
+ <TELL "What a maroon!" CR>)
+ (<NOT <FSET? ,PRSO ,OPENBIT>>
+ <TELL "It's not open." CR>)
+ (<OR <NOT <SET OBJ <FIRST? ,PRSO>>>
+ <FSET? .OBJ ,INVISIBLE>
+ <NOT <FSET? .OBJ ,TAKEBIT>>>
+ <TELL "It's empty." CR>)
+ (T
+ <TELL
+"You reach into the " D ,PRSO " and feel something." CR>
+ <RTRUE>)>>
+
+<ROUTINE ROB (WHO "OPTIONAL" (WHERE <>) (HIDE? <>) "AUX" N X (ROBBED? <>))
+ <SET X <FIRST? .WHO>>
+ <REPEAT ()
+ <COND (<NOT .X> <RETURN .ROBBED?>)>
+ <SET N <NEXT? .X>>
+ <COND (<RIPOFF .X .WHERE>
+ <COND (.HIDE? <FSET .X ,NDESCBIT>)>
+ <SET ROBBED? .X>)>
+ <SET X .N>>>
+
+<ROUTINE BLT (WHO WHERE "AUX" N X (CNT 0))
+ <SET X <FIRST? .WHO>>
+ <REPEAT ()
+ <COND (<NOT .X> <RETURN .CNT>)>
+ <SET N <NEXT? .X>>
+ <MOVE .X .WHERE>
+ <SET CNT <+ .CNT 1>>
+ <SET X .N>>>
+
+<ROUTINE RIPOFF (X WHERE)
+ <COND (<AND <NOT <IN? .X .WHERE>>
+ <NOT <FSET? .X ,INVISIBLE>>
+ <NOT <FSET? .X ,SCROLLBIT>>
+ <NOT <EQUAL? .X ,BREAD ,JUG>>
+ <FSET? .X ,TOUCHBIT>
+ <FSET? .X ,TAKEBIT>>
+ <COND (<==? .X ,STRONG-BOX> <RFALSE>)>
+ <COND (.WHERE <MOVE .X .WHERE>)
+ (ELSE <REMOVE .X>)>
+ <RTRUE>)>>
+
+<ROUTINE V-POINT ()
+ <COND (<IN? ,ADVENTURER ,HERE>
+ <COND (<IN? ,PRSO ,ADVENTURER>
+ <PERFORM ,V?ASK-FOR ,ADVENTURER ,PRSO>
+ <RTRUE>)
+ (,ADVENTURER-CHARMED
+ <TELL
+"The adventurer nods as if in approval of the " D ,PRSO "." CR>)
+ (T
+ <TELL
+"The adventurer backs off from the " D ,PRSO "." CR>)>)
+ (T <TELL "Not much use in that...." CR>)>>
+
+<ROUTINE V-ASK-FOR ()
+ <COND (<EQUAL? ,PRSO ,ADVENTURER>
+ <COND (<NOT <IN? ,PRSI ,PRSO>>
+ <TELL "He's not holding that!" CR>)
+ (,ADVENTURER-CHARMED
+ <COND (<FSET? ,PRSI ,TREASURE>
+ <TELL
+"The adventurer politely refuses, indicating its great beauty and value." CR>)
+ (<EQUAL? ,PRSI ,LANTERN ,SWORD>
+ <TELL
+"The adventurer refuses, indicating its utter necessity in his travels." CR>)
+ (T
+ <MOVE ,PRSI ,WINNER>
+ <TELL
+"The adventurer, not seeing any use in keeping the " D ,PRSI " anyway, hands
+it to you gladly." CR>)>)
+ (T
+ <TELL
+"The adventurer waves you off with an aggressive gesture." CR>)>)
+ (T <TELL "The " D ,PRSO " is not likely to oblige." CR>)>>
+
+<ROUTINE V-THANK ()
+ <COND (<AND ,PRSO <FSET? ,PRSO ,VILLAIN>>
+ <TELL "The " D ,PRSO " seems less than overjoyed." CR>)
+ (T
+ <TELL
+"The Circle will revoke your certificate if you keep this up." CR>)>>
+
+<ROUTINE V-FILL ()
+ <COND (<NOT ,PRSI>
+ <COND (<GLOBAL-IN? ,GLOBAL-WATER ,HERE>
+ <PERFORM ,V?FILL ,PRSO ,GLOBAL-WATER>)
+ (T
+ <TELL "There's nothing to fill it with." CR>)>)
+ (T <TELL "I don't see how you propose to do that." CR>)>>
+
+<ROUTINE V-ESCAPE ()
+ <TELL "There is no escape from the " D ,PRSO "!" CR>>
+
+<ROUTINE V-WRITE-WITH ()
+ <COND (<EQUAL? ,PRSO ,PENCIL>
+ <COND (<IN? ,TMAP ,WINNER>
+ <WRITE-HINT>
+ <RTRUE>)
+ (T
+ <TELL "There's nothing good to write on." CR>)>)
+ (T <TELL "You can't write with that!" CR>)>>
+
+<ROUTINE WRITE-HINT ()
+ <TELL
+"You can't draw on it arbitrarily. Rather, the pencil seems to home in on
+various points on the map, daring you to draw a line between them." CR>>
+
+<ROUTINE V-WRITE-ON ("AUX" SPELL)
+ <COND (<OR <EQUAL? ,PRSI ,PENCIL>
+ <AND <NOT ,PRSI> <IN? ,PENCIL ,WINNER>>>
+ <COND (<EQUAL? ,PRSO ,TMAP>
+ <WRITE-HINT>)
+ (<AND <FSET? ,PRSO ,SCROLLBIT>
+ <FIRST? ,PRSO>>
+ <SET SPELL <FIRST? ,PRSO>>
+ <FSET .SPELL ,RMUNGBIT>
+ <TELL
+"You've written on the scroll all right, but you've also defaced the spell
+written on it." CR>)
+ (T
+ <TELL "You can't write on that!" CR>)>
+ <RTRUE>)
+ (,PRSI
+ <TELL "You can't write with that!" CR>)
+ (T
+ <TELL "You have nothing to write with!" CR>)>>
+
+<ROUTINE V-AVOID ()
+ <TELL "Perhaps that is unavoidable." CR>>
+
+<ROUTINE V-SHOW ()
+ <TELL "I doubt the " D ,PRSI " is interested." CR>>
+
+<ROUTINE PRE-SSHOW ()
+ <PERFORM ,V?SHOW ,PRSI ,PRSO>
+ <RTRUE>>
+
+<ROUTINE V-SSHOW () <V-SGIVE>>
+
+<ROUTINE PRE-BRING ()
+ <COND (<NOT <EQUAL? ,PRSO ,ME>>
+ <TELL "I don't understand that sentence." CR>
+ <RTRUE>)>>
+
+<ROUTINE V-BRING ()
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <TELL "Are you talking to yourself again?" CR>)
+ (T
+ <TELL "\"You can get it yourself!\"" CR>)>>
+
+<ROUTINE V-DRAW-ON ()
+ <COND (<FSET? ,PRSO ,SCROLLBIT>
+ <PERFORM ,V?WRITE-ON ,PRSO>
+ <RTRUE>)
+ (T <TELL "You can't draw on that!" CR>)>>
+
+<ROUTINE V-SHARPEN ()
+ <COND (<EQUAL? ,PRSI ,MAGIC-KNIFE ,SWORD>
+ <COND (<EQUAL? ,PRSO ,MAGIC-KNIFE ,SWORD>
+ <TELL "It's plenty sharp already." CR>)
+ (<EQUAL? ,PRSO ,PENCIL>
+ <TELL
+"The pencil can't be sharpened. Perhaps it is magical." CR>)
+ (T
+ <TELL "You can't sharpen that." CR>)>)
+ (T
+ <TELL "You'll never sharpen anything with that!" CR>)>>
+
+<ROUTINE V-FORGET ()
+ <TELL
+"You might also try not thinking about a purple hippopotamus!" CR>>
+
+<ROUTINE PRE-FLY ()
+ <COND (,FLYING? <RFALSE>)
+ (,PRSO
+ <TELL "What a loon!" CR>
+ <RTRUE>)
+ (T
+ <TELL
+"You are probably a loon, although you can't fly." CR>)>>
+
+<ROUTINE V-HIDE ()
+ <COND (<NOT ,PRSO>
+ <TELL
+"You'll have to say which direction you want to go." CR>
+ <RFATAL>)
+ (<OR <EQUAL? ,PRSI ,ADVENTURER>
+ <AND <NOT ,PRSI> <IN? ,ADVENTURER ,HERE>>>
+ <COND (<FSET? ,PRSO ,TREASURE>
+ <TELL
+"Too late. The adventurer has already noticed the " D ,PRSO "." CR>)
+ (T
+ <TELL
+"He isn't interested in that anyway." CR>)>)
+ (<AND ,PRSI <FSET? ,PRSI ,VICBIT>>
+ <TELL
+"Why? The " D ,PRSI " isn't interested in it." CR>)
+ (<NOT ,PRSI>
+ <TELL
+"From what? From whom? Why?" CR>)>>
+
+<ROUTINE V-CHASTISE ()
+ <TELL
+"Use prepositions to indicate precisely what you want to do: LOOK AT THE
+OBJECT, LOOK INSIDE THE OBJECT, LOOK FOR THE OBJECT, etc." CR>>
+
+<ROUTINE V-GAG ()
+ <COND (<NOT <EQUAL? ,PRSO ,ME>>
+ <TELL "What a concept!" CR>)
+ (<NOT <EQUAL? ,PRSI ,SILVER-SPOON>>
+ <TELL "With a " D ,PRSO "?" CR>)
+ (T <TELL "Grody to the max! Like, totally!" CR>)>>
+
+<ROUTINE V-GROSS-OUT ()
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <TELL "Let's not be disgusting!" CR>)
+ (T
+ <TELL "Gag me with a spoon!" CR>)>>
+
+<ROUTINE V-WHO ()
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <PERFORM ,V?EXAMINE ,PRSO>
+ <RTRUE>)
+ (T <TELL "That's not a person!" CR>)>>
+ \ No newline at end of file
diff --git a/z4.zil b/z4.zil
new file mode 100644
index 0000000..31c63b8
--- /dev/null
+++ b/z4.zil
@@ -0,0 +1,53 @@
+"ENCHANTER for
+ ENCHANTER
+ (c) Copyright 1983 Infocom, Inc. All Rights Reserved.
+"
+
+<PRINC "
+ *** ENCHANTER: Interlogic Fantasy ***
+
+">
+
+<SNAME "ENCHANTER">
+
+<SET REDEFINE T>
+
+<CONSTANT SERIAL 0>
+
+<OR <GASSIGNED? ZILCH>
+ <SETG WBREAKS <STRING !\" !,WBREAKS>>>
+
+<OR <GASSIGNED? INSERT-CRUFTY>
+ <DEFINE INSERT-CRUFTY (STR) <INSERT-FILE .STR T>>>
+
+<COND (<GASSIGNED? PREDGEN>
+ <ID 0>)>
+
+<INSERT-FILE "SYNTAX" T>
+
+<INSERT-FILE "MACROS" T>
+<INSERT-FILE "CLOCK" T>
+<INSERT-FILE "MAIN" T>
+<INSERT-FILE "PARSER" T>
+
+<INSERT-CRUFTY "CRUFTY">
+<INSERT-FILE "VERBS" T>
+<INSERT-FILE "RECORD" T>
+<INSERT-FILE "GLOBALS" T>
+<INSERT-FILE "TERROR" T>
+<INSERT-FILE "STAIR" T>
+<INSERT-FILE "MAGIC" T>
+<INSERT-FILE "KNOT" T>
+<INSERT-FILE "PURLOINED" T>
+<INSERT-FILE "CASTLE" T>
+<INSERT-FILE "TEMPLE" T>
+<INSERT-FILE "GALLERY" T>
+<INSERT-FILE "EGG" T>
+<INSERT-FILE "SLEEP" T>
+<INSERT-FILE "GEARS" T>
+<INSERT-FILE "OUTSIDE" T>
+
+<PROPDEF SIZE 5>
+<PROPDEF CAPACITY 0>
+
+