aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhistoricalsource <historicalsoftware@textfiles.com>2019-04-14 00:48:04 -0400
committerhistoricalsource <historicalsoftware@textfiles.com>2019-04-14 00:48:04 -0400
commitaf919a956f77f2a94c430a8a96184db98674f308 (patch)
tree4609effb048d5f7bb3e17126e4bcba22a5e5a6eb
downloadbeyondzork-af919a956f77f2a94c430a8a96184db98674f308.tar.gz
beyondzork-af919a956f77f2a94c430a8a96184db98674f308.tar.bz2
beyondzork-af919a956f77f2a94c430a8a96184db98674f308.zip
Revision 50 (Original Source)
-rw-r--r--README.md1
-rw-r--r--constants.zil1753
-rw-r--r--events.zil4481
-rw-r--r--macros.zil277
-rw-r--r--misc.zil3269
-rw-r--r--monsters.zil1558
-rw-r--r--parser.zil3397
-rw-r--r--people.zil2166
-rw-r--r--places.zil6152
-rw-r--r--rarities.zil2242
-rw-r--r--syntax.zil1428
-rw-r--r--things.zil13540
-rw-r--r--verbs.zil5344
-rw-r--r--z.zil43
14 files changed, 45651 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..360dd1e
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# beyondzork
diff --git a/constants.zil b/constants.zil
new file mode 100644
index 0000000..62c19eb
--- /dev/null
+++ b/constants.zil
@@ -0,0 +1,1753 @@
+"CONSTANTS for BEYOND ZORK:
+ Copyright (C)1987 Infocom, Inc. All rights reserved."
+
+<CONSTANT EOL 13>
+<CONSTANT LF 10>
+<CONSTANT SP 32>
+<CONSTANT EXCLAM 33>
+<CONSTANT QUOTATION 34>
+<CONSTANT PER 46>
+<CONSTANT COMMA 44>
+
+<CONSTANT DEC-20 1>
+<CONSTANT APPLE-2E 2>
+<CONSTANT MACINTOSH 3>
+<CONSTANT AMIGA 4>
+<CONSTANT ATARI-ST 5>
+<CONSTANT IBM 6>
+<CONSTANT C128 7>
+<CONSTANT C64 8>
+<CONSTANT APPLE-2C 9>
+<CONSTANT APPLE-2GS 10>
+
+<CONSTANT MACHINES
+ <PLTABLE "DEC-20"
+ "Apple //e"
+ "Macintosh"
+ "Amiga"
+ "Atari ST"
+ "IBM/MS-DOS"
+ "Commodore 128"
+ "C64"
+ "Apple //c"
+ "Apple //gs"
+ "Tandy Color Computer">>
+
+<CONSTANT F-OLD 0>
+<CONSTANT F-DEFAULT 1>
+<CONSTANT F-PICTURES 2>
+<CONSTANT F-NEWFONT 3>
+
+<CONSTANT S-TEXT 0>
+<CONSTANT S-WINDOW 1>
+
+<CONSTANT S-BEEP 1>
+<CONSTANT S-BOOP 2>
+
+<CONSTANT H-NORMAL 0>
+<CONSTANT H-INVERSE 1>
+<CONSTANT H-BOLD 2>
+<CONSTANT H-ITALIC 4>
+<CONSTANT H-MONO 8>
+
+<CONSTANT D-SCREEN-ON 1>
+<CONSTANT D-SCREEN-OFF -1>
+<CONSTANT D-PRINTER-ON 2>
+<CONSTANT D-PRINTER-OFF -2>
+<CONSTANT D-TABLE-ON 3>
+<CONSTANT D-TABLE-OFF -3>
+<CONSTANT D-RECORD-ON 4>
+<CONSTANT D-RECORD-OFF -4>
+
+"Color constants"
+
+<CONSTANT C-SAME 0>
+<CONSTANT C-DEFAULT 1>
+<CONSTANT C-BLACK 2>
+<CONSTANT C-RED 3>
+<CONSTANT C-GREEN 4>
+<CONSTANT C-YELLOW 5>
+<CONSTANT C-BLUE 6>
+<CONSTANT C-MAGENTA 7>
+<CONSTANT C-CYAN 8>
+<CONSTANT C-WHITE 9>
+
+<CONSTANT COLOR-NAMES
+ <PTABLE "same" "default" "black" "red" "green" "yellow"
+ "blue" "magenta" "cyan" "white">>
+
+<CONSTANT BWWW <PTABLE (BYTE) C-BLUE C-WHITE C-WHITE C-WHITE>>
+<CONSTANT BWCR <PTABLE (BYTE) C-BLACK C-WHITE C-CYAN C-RED>>
+<CONSTANT WBBB <PTABLE (BYTE) C-WHITE C-BLACK C-BLACK C-BLACK>>
+<CONSTANT DWWW <PTABLE (BYTE) C-BLACK C-WHITE C-WHITE C-WHITE>>
+
+<CONSTANT ST-MONO <PLTABLE DWWW WBBB>>
+
+<CONSTANT MACHINE-COLORS
+ <PLTABLE
+ 0 ; "DEC-20"
+ 0 ; "Apple //e"
+ <PLTABLE
+ WBBB
+ DWWW > ; "Macintosh"
+ <PLTABLE
+ BWCR DWWW BWWW WBBB> ; "Amiga"
+ <PLTABLE
+ BWCR DWWW BWWW WBBB> ; "Atari ST"
+ <PLTABLE
+ BWWW
+ <PTABLE (BYTE) C-BLUE C-WHITE C-WHITE C-CYAN>
+ <PTABLE (BYTE) C-BLUE C-WHITE C-WHITE C-GREEN>
+ BWCR DWWW WBBB> ; "IBM"
+ <PLTABLE
+ <PTABLE (BYTE) C-BLACK C-WHITE C-YELLOW C-CYAN>
+ DWWW WBBB BWWW> ; "C128"
+ 0 ; "C64"
+ 0 ; "Apple //c"
+ <PLTABLE
+ BWCR DWWW BWWW WBBB> ; "Apple //gs"
+ >>
+
+"Apple //c MouseText characters."
+
+<CONSTANT APPLE-LEFT 95>
+<CONSTANT APPLE-RIGHT 90>
+<CONSTANT APPLE-HORZ 76>
+
+"IBM graphics chars."
+
+<CONSTANT IBM-TRC 191>
+<CONSTANT IBM-BLC 192>
+<CONSTANT IBM-BRC 217>
+<CONSTANT IBM-TLC 218>
+<CONSTANT IBM-HORZ 196>
+<CONSTANT IBM-VERT 179>
+
+<CONSTANT DIR-HACKS <PTABLE -7 -6 1 8 7 6 -1 -8>>
+
+<CONSTANT I-NORTH 0>
+<CONSTANT I-NE 1>
+<CONSTANT I-EAST 2>
+<CONSTANT I-SE 3>
+<CONSTANT I-SOUTH 4>
+<CONSTANT I-SW 5>
+<CONSTANT I-WEST 6>
+<CONSTANT I-NW 7>
+<CONSTANT I-U 8>
+<CONSTANT I-D 9>
+
+<CONSTANT DIR-NAMES
+ <PTABLE <VOC "NORTH" <>> <VOC "NORTHEAST" <>>
+ <VOC "EAST" <>> <VOC "SOUTHEAST" <>>
+ <VOC "SOUTH" <>> <VOC "SOUTHWEST" <>>
+ <VOC "WEST" <>> <VOC "NORTHWEST" <>>
+ <VOC "UP" <>> <VOC "DOWN" <>> >>
+
+<CONSTANT PDIR-LIST
+ <PTABLE (BYTE)
+ P?NORTH P?NE P?EAST P?SE
+ P?SOUTH P?SW P?WEST P?NW
+ P?UP P?DOWN P?IN P?OUT>>
+
+<CONSTANT XPDIR-LIST
+ <PTABLE (BYTE)
+ P?SOUTH P?SW P?WEST P?NW
+ P?NORTH P?NE P?EAST P?SE
+ P?DOWN P?UP P?OUT P?IN>>
+
+<CONSTANT UP-ARROW 129>
+<CONSTANT DOWN-ARROW 130>
+<CONSTANT LEFT-ARROW 131>
+<CONSTANT RIGHT-ARROW 132>
+
+<CONSTANT F1 133>
+<CONSTANT F2 134>
+<CONSTANT F3 135>
+<CONSTANT F4 136>
+<CONSTANT F5 137>
+<CONSTANT F6 138>
+<CONSTANT F7 139>
+<CONSTANT F8 140>
+<CONSTANT F9 141>
+<CONSTANT F10 142>
+<CONSTANT F11 143>
+<CONSTANT F12 144>
+
+<CONSTANT PAD0 145>
+<CONSTANT PAD1 146>
+<CONSTANT PAD2 147>
+<CONSTANT PAD3 148>
+<CONSTANT PAD4 149>
+<CONSTANT PAD5 150>
+<CONSTANT PAD6 151>
+<CONSTANT PAD7 152>
+<CONSTANT PAD8 153>
+<CONSTANT PAD9 154>
+
+<CONSTANT CLICK1 254>
+<CONSTANT CLICK2 253>
+
+<CONSTANT MAC-DOWN-ARROW <ASCII !\/>>
+<CONSTANT MAC-UP-ARROW <ASCII !\\>>
+
+<CONSTANT TCHARS
+ <TABLE (KERNEL BYTE)
+ UP-ARROW DOWN-ARROW LEFT-ARROW RIGHT-ARROW
+ F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
+ PAD0 PAD1 PAD2 PAD3 PAD4 PAD5 PAD6 PAD7 PAD8 PAD9
+ CLICK1 CLICK2 0 0 0>>
+
+<CONSTANT FIRST-MAC-ARROW 26>
+
+<CONSTANT PAD-NAMES
+ <PTABLE <VOC "SOUTHWEST" <>>
+ <VOC "SOUTH" <>>
+ <VOC "SOUTHEAST" <>>
+ <VOC "WEST" <>>
+ <VOC "AROUND" <>>
+ <VOC "EAST" <>>
+ <VOC "NORTHWEST" <>>
+ <VOC "NORTH" <>>
+ <VOC "NORTHEAST" <>>>>
+
+<CONSTANT C-TABLE-LENGTH 100>
+<CONSTANT C-TABLE <ITABLE %<+ ,C-TABLE-LENGTH 1>>>
+
+<CONSTANT C-INTLEN 4> "Length of an interrupt entry."
+<CONSTANT C-RTN 0> "Offset of routine name."
+<CONSTANT C-TICK 1> "Offset of count."
+
+<CONSTANT REXIT 0>
+<CONSTANT UEXIT 2>
+<CONSTANT NEXIT 3>
+<CONSTANT FEXIT 4>
+<CONSTANT CEXIT 5>
+<CONSTANT DEXIT 6>
+
+<CONSTANT NEXITSTR 0>
+<CONSTANT FEXITFCN 0>
+<CONSTANT CEXITFLAG 4>
+<CONSTANT CEXITSTR 1>
+<CONSTANT DEXITOBJ 1>
+<CONSTANT DEXITSTR 2>
+
+<CONSTANT NEW-STATS <ITABLE 8 (BYTE) 0>>
+<CONSTANT NORMAL-RATE 2>
+<CONSTANT BLESSED-RATE %<* ,NORMAL-RATE 2>>
+
+<CONSTANT MIN-HIT-PROB 50>
+<CONSTANT MAX-HIT-PROB 95>
+
+<CONSTANT STSTR <PTABLE "EN" "ST" "DX" "IQ" "CM" "LK" "AC">>
+
+<CONSTANT KEY-LABELS
+ <PTABLE " F1" " F2" " F3" " F4" " F5"
+ " F6" " F7" " F8" " F9" "F10">>
+
+<CONSTANT APPLE-LABELS
+ <PTABLE "[1]" "[2]" "[3]" "[4]" "[5]"
+ "[6]" "[7]" "[8]" "[9]" "[0]">>
+
+<CONSTANT SOFT-LEN 36>
+<CONSTANT NSOFT-LEN -36>
+
+<CONSTANT SOFT-KEYS
+ <PTABLE
+ <ITABLE <+ ,SOFT-LEN 2> (BYTE) 0>
+ <ITABLE <+ ,SOFT-LEN 2> (BYTE) 0>
+ <ITABLE <+ ,SOFT-LEN 2> (BYTE) 0>
+ <ITABLE <+ ,SOFT-LEN 2> (BYTE) 0>
+ <ITABLE <+ ,SOFT-LEN 2> (BYTE) 0>
+ <ITABLE <+ ,SOFT-LEN 2> (BYTE) 0>
+ <ITABLE <+ ,SOFT-LEN 2> (BYTE) 0>
+ <ITABLE <+ ,SOFT-LEN 2> (BYTE) 0>
+ <ITABLE <+ ,SOFT-LEN 2> (BYTE) 0>
+ <ITABLE <+ ,SOFT-LEN 2> (BYTE) 0>>>
+
+<CONSTANT KEY-DEFAULTS
+ <PTABLE
+ <PLTABLE (STRING) "look around|">
+ <PLTABLE (STRING) "inventory|">
+ <PLTABLE (STRING) "status|">
+ <PLTABLE (STRING) "examine">
+ <PLTABLE (STRING) "take">
+ <PLTABLE (STRING) "drop">
+ <PLTABLE (STRING) "attack monster|">
+ <PLTABLE (STRING) "again|">
+ <PLTABLE (STRING) "undo|">
+ <PLTABLE (STRING) "oops">>>
+
+<CONSTANT FUMBLE-NUMBER 6>
+<CONSTANT LOAD-ALLOWED 30>
+
+<CONSTANT NORMAL-ATTACK 0>
+<CONSTANT PARRYING 1>
+<CONSTANT THRUSTING 2>
+
+<CONSTANT YAWNS
+ <LTABLE 2 "unusual" "interesting" "extraordinary" "special">>
+
+<CONSTANT HO-HUM
+ <LTABLE 2
+ "n't do anything useful"
+ " accomplish nothing"
+ " have no desirable effect"
+ "n't be very productive"
+ " serve no purpose"
+ " be pointless">>
+
+<CONSTANT YUKS
+ <LTABLE 2
+ "That's impossible"
+ "What a ridiculous concept"
+ "You can't be serious">>
+
+<CONSTANT FIRMS
+ <LTABLE 2 "firm" "permanent" "immovab" "secure">>
+
+<CONSTANT ATTACHES
+ <LTABLE 2 "attached" "affixed">>
+
+<CONSTANT POINTLESS
+ <LTABLE 2
+ "There's no point in doing that"
+ "That would be pointless"
+ "That's a pointless thing to do">>
+
+<CONSTANT PUZZLES
+ <LTABLE 2 "puzzl" "bewilder" "confus" "perplex">>
+
+<CONSTANT UNKNOWN-MSGS
+ <LTABLE 2
+ <PTABLE "The word \""
+ "\" isn't in the vocabulary that you can use.">
+ <PTABLE "You don't need to use the word \""
+ "\" to complete this story.">
+ <PTABLE "This story doesn't recognize the word \""
+ ".\"">>>
+
+<CONSTANT LIKELIES
+ <LTABLE 2
+ " isn't likely"
+ " seems doubtful"
+ " seems unlikely"
+ "'s unlikely"
+ "'s not likely"
+ "'s doubtful">>
+
+"List of words to be capitalized."
+
+<CONSTANT CAPS
+ <LTABLE
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ <VOC "MR" <>> <VOC "MRS" <>> <VOC "MISS" <>>
+ <VOC "I" <>> <VOC "N" <>> <VOC "S" <>>
+ <VOC "E" <>> <VOC "W" <>> <VOC "ZORK" <>>
+ <VOC "ZORKMID" <>> <VOC "ZORKMIDS" <>> <VOC "ZM" <>>
+ <VOC "CHRISTMAS" <>> <VOC "XMAS" <>>
+ <VOC "FROON" <>> <VOC "FROTZEN" <>>
+ <VOC "GUILD" <>> <VOC "ACCARDI" <>> <VOC "GRUBBO" <>>
+ <VOC "THRIFF" <>> <VOC "ALEXIS" <>> <VOC "PHEE" <>>
+ <VOC "PHEEBOR" <>> <VOC "PHEEHELM" <>>
+ <VOC "QUEEN" <>> <VOC "GROTE" <>> <VOC "CLUTCHCAKE" <>>
+ <VOC "BOK" <>> <VOC "YABBA" <>> <VOC "SMEE" <>>
+ <VOC "SQUIRP" <>> <VOC "STELLA" <>> <VOC "BLARN" <>>
+ <VOC "PROSSER" <>> <VOC "YQUEM" <>> <VOC "WATKIN" <>>
+ <VOC "JUKES" <>> <VOC "MACUGA" <>>
+ <VOC "GRUESLAYER" NOUN> <VOC "SKYCAR" <>>
+ <VOC "SKYWAY" <>> <VOC "Y\'GAEL" <>> >>
+
+<CONSTANT VOCAB2 <ITABLE 160 (BYTE) 0>>
+
+"Game-specific constants."
+
+<CONSTANT BASE-CHAR 79> "Base (0) character of bargraph charset."
+
+<CONSTANT MARKBIT 128>
+
+<CONSTANT SHOWING-ROOM 1>
+<CONSTANT SHOWING-INV 2>
+<CONSTANT SHOWING-ALL %<+ ,SHOWING-ROOM ,SHOWING-INV>>
+<CONSTANT SHOWING-STATS 4>
+
+<CONSTANT SLINE-LENGTH 82>
+<CONSTANT SLINE <ITABLE ,SLINE-LENGTH (BYTE) 0>>
+
+<CONSTANT MAX-HEIGHT 25>
+<CONSTANT MAX-DWIDTH 62>
+<CONSTANT DBOX-LENGTH %<+ <* ,MAX-HEIGHT ,MAX-DWIDTH> 2>>
+<CONSTANT DBOX <ITABLE ,DBOX-LENGTH (BYTE) 0>>
+
+<CONSTANT MWIDTH 17>
+<CONSTANT MHEIGHT 11>
+<CONSTANT MAP-SIZE %<* ,MWIDTH ,MHEIGHT>>
+<CONSTANT MAP <ITABLE ,MAP-SIZE (BYTE) 0>>
+
+<CONSTANT CENTERX %</ ,MWIDTH 2>>
+<CONSTANT NCENTERX %<- 0 ,CENTERX>>
+
+<CONSTANT CENTERY %</ ,MHEIGHT 2>>
+<CONSTANT NCENTERY %<- 0 ,CENTERY>>
+
+<CONSTANT ROOMS-MAPPED-LENGTH 46>
+<CONSTANT ROOMS-MAPPED <ITABLE ,ROOMS-MAPPED-LENGTH (BYTE) 0>>
+
+<CONSTANT MAP-TOP 1>
+<CONSTANT MAP-BOT %<- ,MHEIGHT 2>>
+<CONSTANT MAP-LEFT 256>
+<CONSTANT MAP-RIGHT %<* <- ,MWIDTH 2> 256>>
+
+<CONSTANT NGVERBS 33> "Number of GAME-VERBS."
+
+<CONSTANT GAME-VERBS
+ <PTABLE
+ V?INVENTORY V?STATUS V?TELL
+ V?SAVE V?RESTORE V?RESTART V?UNDO V?TIME V?SCORE V?DIAGNOSE
+ V?SCRIPT V?UNSCRIPT V?HELP V?MONITOR V?CASH
+ V?VERSION V?QUIT V?MODE V?SETTINGS V?DEFINE
+ V?VERBOSE V?BRIEF V?SUPER-BRIEF V?NOTIFY V?NAME
+ V?PRIORITY-ON V?PRIORITY-OFF V?ZOOM
+ V?REFRESH V?COLOR V?$VERIFY V?SPELLS V?$CREDITS
+ ; "V?$RECORD V?$UNRECORD V?$COMMAND V?$RANDOM V?$CHEAT V?$SUSS">>
+
+"These verbs reverse the order of PRSO and PRSI."
+
+<CONSTANT NR-VERBS 19>
+<CONSTANT R-VERBS
+ <PTABLE V?STOUCH-TO V?SASK-FOR
+ V?SGIVE V?SSHOW V?SFEED V?SSELL-TO V?SBUY
+ V?SHIT V?SPOINT-AT V?STHROW
+ V?SWRAP V?COVER V?DIG V?DIG-UNDER V?SDIG V?SLOOK-THRU
+ V?WEDGE V?SFIRE-AT V?SWING>>
+
+<CONSTANT NHAVES 23> "Number of HAVEVERBS."
+
+<CONSTANT HAVEVERBS
+ <PTABLE V?DROP V?PUT V?PUT-ON V?GIVE V?SHOW V?FEED V?THROW V?HIT
+ V?PUT-UNDER V?PUT-BEHIND V?THROW-OVER V?RELEASE
+ V?TAKE-WITH V?TOUCH-TO V?OPEN V?OPEN-WITH V?CLOSE V?COVER
+ V?ERASE-WITH V?POINT-AT V?SUBMERGE V?WIELD V?UNWIELD>>
+
+<CONSTANT NTVERBS 17> "Number of TALKVERBS."
+
+<CONSTANT TALKVERBS
+ <PTABLE
+ V?TELL V?TELL-ABOUT V?ASK-ABOUT V?ASK-FOR V?WHAT V?WHERE V?WHO
+ V?ALARM V?HELLO V?GOODBYE V?SAY V?YELL V?THANK V?QUESTION V?REPLY
+ V?LAUGH V?REQUEST>>
+
+<CONSTANT NTOUCHES 81> "Number of TOUCHVERBS"
+
+<CONSTANT TOUCHVERBS
+ <PTABLE
+ V?TAKE V?TAKE-OFF V?TAKE-WITH
+ V?PUT V?PUT-ON V?PUT-UNDER V?PUT-BEHIND
+ V?COVER V?EMPTY-INTO V?REACH-IN V?TOUCH-TO V?TOUCH V?HIT V?THRUST
+ V?PARRY V?PUNCH V?KICK V?MOVE V?PUSH V?PUSH-TO V?PUSH-UP V?PUSH-DOWN
+ V?PULL V?LOWER V?RAISE V?LOOSEN V?TURN-TO V?ADJUST V?SPIN V?TURN
+ V?SHAKE V?SWING V?OPEN V?OPEN-WITH V?CLOSE V?LOCK V?UNLOCK
+ ; "V?SCREW V?UNSCREW" V?UPROOT
+ V?PLUG-IN V?UNPLUG V?TIE V?UNTIE V?FOLD V?LAMP-ON V?LAMP-OFF
+ V?WRAP-AROUND V?CUT V?RIP V?MUNG V?DIG V?DIG-UNDER
+ V?FILL V?FILL-FROM
+ V?DEFLATE V?BURN-WITH V?CLEAN V?CLEAN-OFF V?BLOW-INTO V?DETONATE
+ V?WIND V?REPAIR V?REPLACE V?PICK V?MELT V?SQUEEZE ; V?PLAY
+ ; "V?UNSCREW-FROM V?SCREW-WITH" V?GIVE V?FEED V?STAND-ON
+ V?SIT V?LIE-DOWN V?EAT V?BITE V?TASTE V?DRINK V?DRINK-FROM V?POP
+ V?CRANK V?SCRATCH V?SCRAPE-ON V?PEEL V?SUBMERGE>>
+
+<CONSTANT NHVERBS 17> "Number of HURTVERBS."
+
+<CONSTANT HURTVERBS
+ <PTABLE
+ V?HIT V?PUNCH V?KICK V?MUNG V?KNOCK V?KICK V?SQUEEZE V?CUT
+ V?RIP V?BITE V?RAPE V?SHAKE V?UNDRESS V?DETONATE V?PUSH V?PUSH-TO
+ V?PULL>>
+
+<CONSTANT NUMPUTS 10> "# PUTVERBS."
+
+<CONSTANT PUTVERBS
+ <PTABLE V?DROP V?PUT V?PUT-ON V?PUT-UNDER V?PUT-BEHIND V?THROW
+ V?THROW-OVER V?EMPTY V?EMPTY-INTO V?HANG-ON>>
+
+<CONSTANT NMVERBS 28> "Number of MOVEVERBS."
+
+<CONSTANT MOVEVERBS
+ <PTABLE
+ V?TAKE V?TAKE-OFF V?MOVE V?PULL V?PUSH V?PUSH-TO V?PUSH-UP
+ V?PUSH-DOWN V?TURN V?RAISE V?UPROOT
+ V?LOWER V?SPIN V?SHAKE ; V?PLAY V?OPEN V?OPEN-WITH V?CLOSE V?ADJUST
+ V?TURN-TO V?POINT-AT V?SWING V?UNPLUG V?BOUNCE
+ V?PUT-UNDER V?PUT-BEHIND V?LOOK-UNDER V?LOOK-BEHIND V?CRANK>>
+
+<CONSTANT NSVERBS 19> "Number of SEEVERBS"
+<CONSTANT SEEVERBS
+ <PTABLE V?EXAMINE V?LOOK V?LOOK-INSIDE V?LOOK-ON V?READ V?FIND
+ V?SEARCH V?SHOW V?LOOK-UNDER V?LOOK-BEHIND V?LOOK-THRU
+ V?LOOK-DOWN V?LOOK-UP V?READ-TO V?LOOK-OUTSIDE V?COUNT
+ V?ADJUST V?POINT V?EXAMINE-IN>>
+
+<CONSTANT ENTER-VERBS 5>
+<CONSTANT CLIMB-ON-VERBS 13>
+<CONSTANT E-VERBS
+ <PTABLE V?WALK-TO V?ENTER V?THROUGH V?FOLLOW V?USE
+ V?CLIMB-ON V?CLIMB-UP V?CLIMB-OVER V?SIT V?RIDE
+ V?STAND-ON V?LIE-DOWN V?CROSS>>
+
+<CONSTANT EXIT-VERBS 3>
+<CONSTANT CLIMB-DOWN-VERBS 5>
+<CONSTANT X-VERBS
+ <PTABLE V?EXIT V?LEAVE V?ESCAPE
+ V?CLIMB-DOWN V?LEAP>>
+
+<CONSTANT D-N #2 00000001>
+<CONSTANT D-NE #2 00000010>
+<CONSTANT D-E #2 00000100>
+<CONSTANT D-SE #2 00001000>
+<CONSTANT D-S #2 00010000>
+<CONSTANT D-SW #2 00100000>
+<CONSTANT D-W #2 01000000>
+<CONSTANT D-NW #2 10000000>
+
+<CONSTANT DBIT-LIST
+ <PTABLE (BYTE) D-N D-NE D-E D-SE D-S D-SW D-W D-NW>>
+
+<CONSTANT XD-N #2 11111110>
+<CONSTANT XD-NE #2 11111101>
+<CONSTANT XD-E #2 11111011>
+<CONSTANT XD-SE #2 11110111>
+<CONSTANT XD-S #2 11101111>
+<CONSTANT XD-SW #2 11011111>
+<CONSTANT XD-W #2 10111111>
+<CONSTANT XD-NW #2 01111111>
+
+<CONSTANT XDBIT-LIST
+ <PTABLE (BYTE) XD-N XD-NE XD-E XD-SE
+ XD-S XD-SW XD-W XD-NW
+ XD-N XD-NE XD-E XD-SE>>
+
+<CONSTANT D-ALL 255>
+
+<CONSTANT D-LEFT %<+ ,D-N ,D-NE ,D-E ,D-SE ,D-S>>
+<CONSTANT D-RIGHT %<+ ,D-N ,D-S ,D-SW ,D-W ,D-NW>>
+<CONSTANT D-TOP %<+ ,D-E ,D-SE ,D-S ,D-SW ,D-W>>
+<CONSTANT D-BOTTOM %<+ ,D-N ,D-NE ,D-E ,D-W ,D-NW>>
+
+"Pure border data (copied into BORDERS)."
+
+<CONSTANT DEFAULT-BORDERS
+ <PLTABLE (BYTE)
+ %<+ ,D-E ,D-SE ,D-S>
+ ,D-TOP ,D-TOP ,D-TOP ,D-TOP ,D-TOP
+ %<+ ,D-S ,D-SW ,D-W>
+ ,D-LEFT ,D-ALL ,D-ALL ,D-ALL ,D-ALL ,D-ALL ,D-RIGHT
+ ,D-LEFT ,D-ALL ,D-ALL ,D-ALL ,D-ALL ,D-ALL ,D-RIGHT
+ ,D-LEFT ,D-ALL ,D-ALL ,D-ALL ,D-ALL ,D-ALL ,D-RIGHT
+ ,D-LEFT ,D-ALL ,D-ALL ,D-ALL ,D-ALL ,D-ALL ,D-RIGHT
+ ,D-LEFT ,D-ALL ,D-ALL ,D-ALL ,D-ALL ,D-ALL ,D-RIGHT
+ %<+ ,D-N ,D-NE ,D-E>
+ ,D-BOTTOM ,D-BOTTOM ,D-BOTTOM ,D-BOTTOM ,D-BOTTOM
+ %<+ ,D-N ,D-W ,D-NW>>>
+
+<CONSTANT XLIST-NAMES
+ <PTABLE "N" "NE" "E" "SE" "S" "SW" "W" "NW"
+ "Up" "Down" "In" "Out">>
+
+<CONSTANT NORMAL-DHEIGHT 9>
+
+<CONSTANT XOFFS <PTABLE 0 1 1 1 0 -1 -1 -1>>
+<CONSTANT YOFFS <PTABLE -1 -1 0 1 1 1 0 -1>>
+
+<CONSTANT SHITCHARS
+ <PTABLE (BYTE) 124 47 45 92 124 47 45 92>>
+
+<CONSTANT QDIRS <PTABLE (BYTE) 0 2 4 6 0>>
+<CONSTANT ZDIRS <PTABLE (BYTE) 3 5 7 1 3 5>>
+
+<CONSTANT SETOFFS
+ <PTABLE (BYTE) 4 4 3 3 8 0 2 19 19>>
+
+<CONSTANT SNAMES
+ <PTABLE " Display Mode "
+ " Descriptions "
+ " Transcripting "
+ " Status Notify "
+ " Map View "
+ " Display Priority "
+ " Combat Monitor "
+ " Restore Defaults "
+ " Exit ">>
+
+"Character set data."
+
+<CONSTANT QMARK 96>
+<CONSTANT IQMARK 126>
+
+<CONSTANT TRCORNER 71>
+<CONSTANT BRCORNER 72>
+<CONSTANT BLCORNER 73>
+<CONSTANT TLCORNER 74>
+<CONSTANT TOPEDGE 75>
+<CONSTANT BOTEDGE 76>
+<CONSTANT LEDGE 77>
+<CONSTANT REDGE 78>
+
+<CONSTANT RDIAG 35>
+<CONSTANT LDIAG 36>
+<CONSTANT SOLID 37>
+<CONSTANT BOT 38>
+<CONSTANT TOP 39>
+<CONSTANT LSID 40>
+<CONSTANT RSID 41>
+<CONSTANT NCON 42>
+<CONSTANT SCON 43>
+<CONSTANT ECON 44>
+<CONSTANT WCON 45>
+<CONSTANT BLC 46>
+<CONSTANT TLC 47>
+<CONSTANT TRC 48>
+<CONSTANT BRC 49>
+<CONSTANT SWCON 50>
+<CONSTANT NWCON 51>
+<CONSTANT NECON 52>
+<CONSTANT SECON 53>
+<CONSTANT ISOLID 54>
+<CONSTANT XCROSS 90>
+<CONSTANT HVCROSS 91>
+
+<CONSTANT UARROW 92>
+<CONSTANT DARROW 93>
+<CONSTANT UDARROW 94>
+
+<CONSTANT SMBOX 95>
+
+<CONSTANT MCHARS
+ <PTABLE (BYTE) LSID RDIAG BOT LDIAG LSID RDIAG BOT LDIAG>>
+<CONSTANT XCHARS
+ <PTABLE (BYTE) NCON NECON ECON SECON SCON SWCON WCON NWCON>>
+<CONSTANT NXCHARS
+ <PTABLE (BYTE) TOP TRC LSID BRC BOT BLC RSID TLC>>
+
+<CONSTANT IUARROW 123>
+<CONSTANT IDARROW 124>
+<CONSTANT IUDARROW 125>
+
+<CONSTANT LCAP 88>
+<CONSTANT RCAP 89>
+
+<CONSTANT ENDURANCE 0>
+<CONSTANT HP 0>
+<CONSTANT STRENGTH 1>
+<CONSTANT STR 1>
+<CONSTANT DEXTERITY 2>
+<CONSTANT DEX 2>
+<CONSTANT INTELLIGENCE 3>
+<CONSTANT IQ 3>
+<CONSTANT COMPASSION 4>
+<CONSTANT COM 4>
+<CONSTANT LUCK 5>
+<CONSTANT ARMOR-CLASS 6>
+<CONSTANT AC 6>
+<CONSTANT EXPERIENCE 7>
+<CONSTANT EXP 7>
+
+<CONSTANT NSTATS 8> "Number of statistics."
+
+<CONSTANT BEGINNERS-ENDURANCE 16>
+<CONSTANT BEGINNERS-STRENGTH 8>
+<CONSTANT BEGINNERS-DEXTERITY 8>
+<CONSTANT BEGINNERS-INTELLIGENCE 8>
+<CONSTANT BEGINNERS-COMPASSION 1>
+<CONSTANT BEGINNERS-LUCK 25>
+<CONSTANT NAKED-ARMOR-CLASS 1>
+<CONSTANT BEGINNERS-EXPERIENCE 0>
+
+<CONSTANT STATMAX 99> "High as any statistic can go."
+<CONSTANT READING-IQ 40>
+
+<CONSTANT WINNING-COMPASSION -45>
+
+<CONSTANT DEFAULT-STATS
+ <PTABLE ,BEGINNERS-ENDURANCE
+ ,BEGINNERS-STRENGTH
+ ,BEGINNERS-DEXTERITY
+ ,BEGINNERS-INTELLIGENCE
+ ,BEGINNERS-COMPASSION
+ ,BEGINNERS-LUCK
+ ,NAKED-ARMOR-CLASS
+ ,BEGINNERS-EXPERIENCE>>
+
+
+<CONSTANT CNAME-LEN 7>
+<CONSTANT BARMAR %<+ ,CNAME-LEN 3>>
+
+<CONSTANT APPBOX 18> "Width of Apple stat box."
+
+<CONSTANT CNAMES
+ <PTABLE "Lucky "
+ "Tank "
+ "Muscles"
+ "Nimble "
+ "Genius "
+ "Saint " >>
+
+<CONSTANT CSTATS
+ <PTABLE <PTABLE 16 8 8 8 1 25>
+ <PTABLE 30 16 8 1 1 10>
+ <PTABLE 18 20 18 4 1 5>
+ <PTABLE 12 14 20 4 1 15>
+ <PTABLE 12 10 8 16 5 15>
+ <PTABLE 12 10 8 8 16 12>
+ >>
+
+<CONSTANT INIT-POTENTIAL
+ <+ -6 ,BEGINNERS-LUCK ,BEGINNERS-COMPASSION
+ ,BEGINNERS-INTELLIGENCE ,BEGINNERS-DEXTERITY
+ ,BEGINNERS-STRENGTH ,BEGINNERS-ENDURANCE>>
+<CONSTANT AVERAGE %</ ,INIT-POTENTIAL 6>>
+<CONSTANT SPREAD %</ ,AVERAGE 2>>
+
+<CONSTANT THRESHOLDS <PTABLE 9 29 59 99 149 209 279 359 449>>
+<CONSTANT MAX-LEVEL 8>
+<CONSTANT RANK-NAMES <PTABLE "Peasant" "Novice" "Cheater">>
+
+<CONSTANT CHARNAME-LENGTH 24>
+<CONSTANT CHARNAME <ITABLE %<+ ,CHARNAME-LENGTH 1> (BYTE) 0>>
+
+<CONSTANT SAVE-NAME <PLTABLE (STRING) "BEYONDZ">>
+
+<CONSTANT NAMES-LENGTH 12>
+
+<CONSTANT DEFAULT-NAME-LENGTH 13>
+<CONSTANT DEFAULT-NAME
+ <PTABLE (STRING) 11 "Buck Palace" 0>>
+
+<CONSTANT LABEL-WIDTH 12>
+<CONSTANT BAR-LABELS
+ <PTABLE (STRING)
+ " Endurance"
+ " Strength"
+ " Dexterity"
+ "Intelligence"
+ " Compassion"
+ " Luck"
+ " Armor Class">>
+
+<CONSTANT STAT-NAMES
+ <PTABLE "endurance"
+ "strength"
+ "dexterity"
+ "intelligence"
+ "compassion"
+ "luck"
+ "armor class"
+ "experience">>
+
+<CONSTANT BORDERS <ITABLE 50 (BYTE) 0>>
+<CONSTANT MAZE-ROOMS <ITABLE 51 (BYTE) 0>>
+
+<CONSTANT MOOR-ROOMS
+ <PLTABLE (BYTE) IN-GAS MOOR2 MOOR3 MOOR4 MOOR5 MOOR6>>
+
+<CONSTANT CELLAR-ROOMS
+ <PLTABLE (BYTE) AT-STACK THRONE-ROOM AT-BOTTOM SKEL-ROOM
+ MOSS-ROOM WC1>>
+
+<CONSTANT TOWER1-ROOMS
+ <PLTABLE (BYTE) LEVEL1A LEVEL1B LEVEL1C LEVEL1D>>
+
+<CONSTANT TOWER2-ROOMS
+ <PLTABLE (BYTE) LEVEL2A LEVEL2B LEVEL2C LEVEL2D>>
+
+<CONSTANT TOWER3-ROOMS
+ <PLTABLE (BYTE) LEVEL3A LEVEL3B LEVEL3C LEVEL3D>>
+
+<CONSTANT PLAIN-ROOMS
+ <PLTABLE (BYTE) PLAIN0 PLAIN1 PLAIN2 PLAIN3 PLAIN4 PLAIN5>>
+
+<CONSTANT INIT-STORM-TIMER 4>
+
+<CONSTANT MIZNIA-ROOMS <PLTABLE (BYTE) IN-PORT IN-YARD SW-MOOR>>
+
+<CONSTANT JUNGLE-ROOMS
+ <PLTABLE (BYTE)
+ JUN0 WORM-ROOM JUN2 JUN3 JUN4 JUN5 JUN6>>
+
+<CONSTANT CAVE-ROOMS
+ <PLTABLE (BYTE)
+ CAVE0 CAVE1 CAVE2 CAVE3 CAVE4 CAVE6>>
+
+<CONSTANT GRUE-SIGHTS
+ <LTABLE 2
+ "You sense a presence lurking in the darkness"
+ "A presence lurks in the darkness close at hand"
+ "Something is lurking in the darkness nearby">>
+
+<CONSTANT MIRROR-LIFE 36>
+
+<CONSTANT GRUE-ROOMS
+ <PLTABLE (BYTE)
+ CAVE0 CAVE1 CAVE2 CAVE3 CAVE4
+ CAVE6 CAVE7 SE-CAVE NE-CAVE IN-LAIR>>
+
+<CONSTANT FOREST-ROOMS
+ <PLTABLE (BYTE)
+ TWILIGHT FOREST1 FOREST2 FOREST3
+ FOREST4 FOREST5 FOREST6>>
+
+<CONSTANT RUIN-ROOMS
+ <PLTABLE (BYTE) RUIN0 RUIN1 RUIN2 RUIN3 RUIN4 RUIN5>>
+
+<CONSTANT ACCARDI-ROOMS
+ <PLTABLE (BYTE) IN-ACCARDI AT-GATE IN-HALL IN-WEAPON>>
+
+<CONSTANT SHORE-ROOMS
+ <PLTABLE (BYTE) AT-LEDGE AT-BRINE TOWER-BASE>>
+
+<CONSTANT WAND-LIST
+ <LTABLE 0 WAND STAFF STAVE STICK ROD CANE>>
+
+<VOC "ANNIHILATION" NOUN>
+<VOC "SAYONARA" NOUN>
+<VOC "ANESTHESIA" NOUN>
+<VOC "EVERSION" NOUN>
+<VOC "LEVITATION" NOUN>
+
+<CONSTANT WAND-FUNCTIONS
+ <LTABLE 0
+ <PTABLE BLAST-WAND-F
+ DESCRIBE-BLAST-WAND
+ <VOC "ANNIHILATION" ADJ>>
+ <PTABLE TELE-WAND-F
+ DESCRIBE-TELE-WAND
+ <VOC "SAYONARA" ADJ>>
+ <PTABLE SLEEP-WAND-F
+ DESCRIBE-SLEEP-WAND
+ <VOC "ANESTHESIA" ADJ>>
+ <PTABLE IO-WAND-F
+ DESCRIBE-IO-WAND
+ <VOC "EVERSION" ADJ>>
+ <PTABLE LEV-WAND-F
+ DESCRIBE-LEV-WAND
+ <VOC "LEVITATION" ADJ>>>>
+
+<CONSTANT POTION-LIST
+ <LTABLE 0 APOTION BPOTION CPOTION DPOTION EPOTION>>
+
+<VOC "ENLIGHTENMENT" NOUN>
+<VOC "HEALING" NOUN>
+<VOC "DEATH" NOUN>
+<VOC "MIGHT" NOUN>
+<VOC "FORGETFUL" NOUN>
+
+<CONSTANT POTION-TABLES
+ <LTABLE 0
+ <PTABLE IQ-POTION-F
+ DESCRIBE-IQ-POTION
+ <VOC "ENLIGHTENMENT" ADJ>>
+ <PTABLE HEALING-POTION-F
+ DESCRIBE-HEALING-POTION
+ <VOC "HEALING" ADJ>>
+ <PTABLE DEATH-POTION-F
+ DESCRIBE-DEATH-POTION
+ <VOC "DEATH" ADJ>>
+ <PTABLE MIGHT-POTION-F
+ DESCRIBE-MIGHT-POTION
+ <VOC "MIGHT" ADJ>>
+ <PTABLE FORGET-POTION-F
+ DESCRIBE-FORGET-POTION
+ <VOC "FORGETFUL" ADJ>>>>
+
+<CONSTANT ALL-SCROLLS
+ <PLTABLE PARCHMENT GILT SMOOTH RUMPLE VELLUM
+ PALIMP RENEWAL>>
+
+<CONSTANT SCROLL-LIST
+ <LTABLE 0 PARCHMENT GILT SMOOTH RUMPLE VELLUM>>
+
+<VOC "MISCHIEF" NOUN>
+<VOC "HONING" NOUN>
+<VOC "PROTECTION" NOUN>
+<VOC "FIREWORKS" NOUN>
+<VOC "RECALL" NOUN>
+
+<CONSTANT SCROLL-FUNCTIONS
+ <LTABLE 0
+ <PTABLE DO-PARTAY
+ DESCRIBE-DO-PARTAY
+ <VOC "MISCHIEF" ADJ>
+ "yard improvements"
+ 1
+ 8>
+ <PTABLE DO-BLESS-WEAPON
+ DESCRIBE-BLESS-WEAPON
+ <VOC "HONING" ADJ>
+ "weaponry"
+ 5
+ 16>
+ <PTABLE DO-BLESS-ARMOR
+ DESCRIBE-BLESS-ARMOR
+ <VOC "PROTECTION" ADJ>
+ "armor"
+ 5
+ 16>
+ <PTABLE DO-FILFRE
+ DESCRIBE-DO-FILFRE
+ <VOC "FIREWORKS" ADJ>
+ "humility and self-effacement"
+ 1
+ 8>
+ <PTABLE DO-GOTO
+ DESCRIBE-DO-GOTO
+ <VOC "RECALL" ADJ>
+ "transportation"
+ 5
+ 24>>>
+
+<CONSTANT TELEROOMS
+ <PLTABLE (BYTE)
+ HILLTOP AT-BROOK IN-PORT N-MOOR XROADS NFORD SFORD
+ NGURTH IN-THRIFF>>
+
+<CONSTANT OVERS
+ <LTABLE "Ruins" "Bridge" "Forest" "Town"
+ "City" "Seashore" "Roadway"
+ "Fields" "Village" "Castle" "Mist"
+ "Jungle" "Seaport" "Mountainside">>
+
+<CONSTANT HIGHEST-ZBOT 16384>
+
+<CONSTANT ORUINS 1>
+<CONSTANT OBRIDGE 2>
+<CONSTANT OFOREST 3>
+<CONSTANT OACCARDI 4>
+<CONSTANT OCITY 5>
+<CONSTANT OSHORE 6>
+<CONSTANT OXROADS 7>
+<CONSTANT OPLAIN 8>
+<CONSTANT OGRUBBO 9>
+<CONSTANT OCAVES 10>
+<CONSTANT OMOOR 11>
+<CONSTANT OJUNGLE 12>
+<CONSTANT OMIZNIA 13>
+<CONSTANT OTHRIFF 14>
+
+<CONSTANT FLY-TABLES
+ <PLTABLE
+ ; 1 <PTABLE (BYTE) %<+ ,D-SE ,D-SW>
+ OACCARDI OBRIDGE>
+ ; 2 <PTABLE (BYTE) %<+ ,D-NE ,D-SE ,D-SW>
+ ORUINS OSHORE OFOREST>
+ ; 3 <PTABLE (BYTE) %<+ ,D-NE ,D-E ,D-S>
+ OBRIDGE OACCARDI OCITY>
+ ; 4 <PTABLE (BYTE) %<+ ,D-S ,D-SW ,D-W ,D-NW>
+ OSHORE OXROADS OFOREST ORUINS>
+ ; 5 <PTABLE (BYTE) %<+ ,D-N ,D-E ,D-SE ,D-S>
+ OFOREST OSHORE OPLAIN OXROADS>
+ ; 6 <PTABLE (BYTE) %<+ ,D-N ,D-S ,D-SW ,D-W ,D-NW>
+ OACCARDI OGRUBBO OPLAIN OCITY OBRIDGE>
+ ; 7 <PTABLE (BYTE) %<+ ,D-N ,D-NE ,D-E ,D-SE ,D-SW>
+ OCITY OACCARDI OPLAIN OMIZNIA OCAVES>
+ ; 8 <PTABLE (BYTE) %<+ ,D-NE ,D-E ,D-SE ,D-S ,D-W ,D-NW>
+ OSHORE OGRUBBO OMOOR
+ OMIZNIA OXROADS OCITY>
+ ; 9 <PTABLE (BYTE) %<+ ,D-N ,D-S ,D-SW ,D-W>
+ OSHORE OMOOR OJUNGLE OPLAIN>
+ ; 10 <PTABLE (BYTE) %<+ ,D-NE ,D-SE>
+ OXROADS OTHRIFF>
+ ; 11 <PTABLE (BYTE) %<+ ,D-N ,D-SW ,D-NW>
+ OGRUBBO OMIZNIA OPLAIN>
+ ; 12 <PTABLE (BYTE) %<+ ,D-NE ,D-E ,D-SW>
+ OGRUBBO OMIZNIA OTHRIFF>
+ ; 13 <PTABLE (BYTE) %<+ ,D-N ,D-NE ,D-W ,D-NW>
+ OPLAIN OMOOR OJUNGLE OXROADS>
+ ; 14 <PTABLE (BYTE) %<+ ,D-NE ,D-NW>
+ OJUNGLE OCAVES>
+ >>
+
+<CONSTANT PICT-LIST
+ <PTABLE G-EYE G-EAR G-NOSE G-MOUTH G-HAND G-CLOCK>>
+
+<CONSTANT GURDY-EFFECTS
+ <PTABLE "wraith of colored light"
+ "brief chord of music"
+ "whiff of random odors"
+ "puff of tasty flavors"
+ "vague itchiness"
+ "strange sense of urgency">>
+
+<CONSTANT GURDY-PEEKS
+ <PTABLE "eyes sting"
+ "ears ring"
+ "nose tickle"
+ "mouth water"
+ "skin crawl"
+ "pulse race">>
+
+<CONSTANT Q-BUZZES
+ <PLTABLE <VOC "WHY" <>> <VOC "HOW" <>>
+ <VOC "WHEN" <>> <VOC "WOULD" <>>
+ <VOC "COULD" <>> <VOC "SHOULD" <>>
+ <VOC "HAS" <>> <VOC "AM" <>> <VOC "IS" <>>
+ <VOC "WAS" <>> >>
+
+<CONSTANT N-BUZZES
+ <PLTABLE <VOC "ZERO" <>> <VOC "ONE" <>> <VOC "TWO" <>>
+ <VOC "THREE" <>> <VOC "FOUR" <>> <VOC "FIVE" <>>
+ <VOC "SIX" <>> <VOC "SEVEN" <>> <VOC "EIGHT" <>>
+ <VOC "NINE" <>> <VOC "TEN" <>>>>
+
+<CONSTANT SWEAR-WORDS
+ <PLTABLE <VOC "CURSE" <>> <VOC "GODDAMNED" <>> <VOC "CUSS" <>>
+ <VOC "DAMN" <>> <VOC "FUCK" <>>
+ <VOC "SHITHEAD" <>> <VOC "BASTARD" <>> <VOC "ASS" <>>
+ <VOC "FUCKING" <>> <VOC "BITCH" <>> <VOC "DAMNED" <>>
+ <VOC "COCKSUCKER" <>> <VOC "FUCKED" <>> <VOC "PEE" <>>
+ <VOC "CUNT" <>> <VOC "ASSHOLE" <>> <VOC "PISS" <>>
+ ; <VOC "SUCK" <>> <VOC "SHIT" <>> <VOC "CRAP" <>> >>
+
+<CONSTANT COLOR-WORDS
+ <PLTABLE <VOC "MAUVE" <>> <VOC "LAVENDER" <>> <VOC "PUCE" <>>
+ <VOC "RED" ADJ> <VOC "SILVER" <>>
+ <VOC "GOLD" <>> <VOC "ORANGE" ADJ> <VOC "YELLOW" ADJ> >>
+
+<CONSTANT NO-MIRROR -1>
+
+<CONSTANT PILLAR-DOINGS
+ <LTABLE 2
+ " wiggles its antennae"
+ " looks up at you inquisitively"
+ " arches its back">>
+
+<CONSTANT PILLAR-MOVES
+ <LTABLE 2
+ " silently explores "
+ " crawls across "
+ " wiggles its way around ">>
+
+<CONSTANT BFLY-EATINGS
+ <LTABLE 2
+ " explores the rim of the goblet"
+ " slowly opens and closes its wings"
+ " wiggles its antennae">>
+
+<CONSTANT BFLY-DOINGS
+ <LTABLE 2
+ " darts around your head"
+ " lights on your nose, then flutters off"
+ " lands on your hand, then darts away">>
+
+<CONSTANT BFLY-HOVERS
+ <LTABLE 2
+ " hovers around "
+ " seems interested in "
+ " is fluttering close to ">>
+
+<CONSTANT REACH-TABLES
+ <PTABLE
+ <PLTABLE (BYTE) 1 3>
+ <PLTABLE (BYTE) 0 2 3 5>
+ <PLTABLE (BYTE) 1 5>
+ <PLTABLE (BYTE) 0 1 6 7>
+ <PLTABLE (BYTE) 0 1 2 3 5 6 7 8>
+ <PLTABLE (BYTE) 1 2 7 8>>>
+
+<CONSTANT MIRROR-LIST
+ <PLTABLE MIRROR0 MIRROR1 MIRROR2 MIRROR3 MIRROR4
+ MIRROR5 MIRROR6>>
+
+<CONSTANT AMB 255>
+
+; "Removed per TAA. No longer used for direction lookup with mouse."
+;<CONSTANT COMPASS
+ <PTABLE (BYTE)
+I-NW I-NW I-NW I-NW I-NW I-NW AMB I-NORTH I-NORTH I-NORTH I-NORTH I-NORTH AMB I-NE I-NE I-NE I-NE I-NE
+AMB AMB I-NW I-NW I-NW I-NW I-NW AMB I-NORTH I-NORTH I-NORTH AMB I-NE I-NE I-NE I-NE I-NE AMB
+AMB AMB AMB AMB AMB I-NW I-NW I-NW I-NORTH I-NORTH I-NORTH I-NE I-NE I-NE AMB AMB AMB AMB
+I-WEST I-WEST I-WEST I-WEST AMB AMB I-NW I-NW AMB I-NORTH AMB I-NE I-NE AMB AMB I-EAST I-EAST I-EAST
+I-WEST I-WEST I-WEST I-WEST I-WEST I-WEST I-WEST AMB I-NW I-NORTH I-NE AMB I-EAST I-EAST I-EAST I-EAST I-EAST I-EAST
+I-WEST I-WEST I-WEST I-WEST I-WEST I-WEST I-WEST I-WEST I-WEST AMB I-EAST I-EAST I-EAST I-EAST I-EAST I-EAST I-EAST I-EAST
+I-WEST I-WEST I-WEST I-WEST I-WEST I-WEST I-WEST AMB I-SW I-SOUTH I-SE AMB I-EAST I-EAST I-EAST I-EAST I-EAST I-EAST
+I-WEST I-WEST I-WEST I-WEST AMB AMB I-SW I-SW AMB I-SOUTH AMB I-SE I-SE AMB AMB I-EAST I-EAST I-EAST
+AMB AMB AMB AMB AMB I-SW I-SW I-SW I-SOUTH I-SOUTH I-SOUTH I-SE I-SE I-SE AMB AMB AMB AMB
+AMB AMB I-SW I-SW I-SW I-SW I-SW AMB I-SOUTH I-SOUTH I-SOUTH AMB I-SE I-SE I-SE I-SE I-SE AMB
+I-SW I-SW I-SW I-SW I-SW I-SW AMB I-SOUTH I-SOUTH I-SOUTH I-SOUTH I-SOUTH AMB I-SE I-SE I-SE I-SE I-SE
+I-SW I-SW I-SW I-SW I-SW AMB AMB I-SOUTH I-SOUTH I-SOUTH I-SOUTH I-SOUTH AMB AMB I-SE I-SE I-SE I-SE >>
+
+
+; <CONSTANT DORN-SOUNDS
+ <LTABLE 2
+ "Far overhead, you hear something bellow \"Hurumph!\""
+ "\"Hurumph!\" bellows a distant voice."
+ "A loud \"Hurumph!\" echoes in the lighthouse.">>
+
+; <CONSTANT CLOSE-DORNS
+ <LTABLE 2
+ "Close at hand, you hear something bellow \"Hurumph!\""
+ "\"Hurumph!\" bellows a nearby voice."
+ "A loud \"Hurumph!\" echoes in the lighthouse.">>
+
+<CONSTANT TREE-DOINGS
+ <LTABLE 2
+ " whisper among themselves"
+ " shuffle around uncertainly"
+ " seem to be regrouping">>
+
+<CONSTANT SAD-TREES
+ <LTABLE 2
+ " shuffle around disconsolately"
+ " sing carols of mourning"
+ " shake their ornaments with frustration">>
+
+<CONSTANT HUNTER-DOINGS
+ <LTABLE 2
+ " skulk about the pasture's edge"
+ " shout something incoherent"
+ " call out to one another">>
+
+<CONSTANT MINX-DOINGS
+ <LTABLE 2
+ " rubs up against your leg"
+ " mews sweetly"
+ " plays at your feet"
+ " looks up at you and mews">>
+
+<CONSTANT DARK-MINXES
+ <LTABLE 2
+ " rubs up against your leg"
+ " is moving about your feet"
+ " purrs in the darkness">>
+
+<CONSTANT MINX-SETTLES
+ <LTABLE 2
+ " settles comfortably"
+ " purrs and nudges about"
+ " squirms around">>
+
+<CONSTANT MINX-RESTLESS
+ <LTABLE 2
+ " is acting a bit restless"
+ " shifts its position in your arms"
+ " fidgets about uncomfortably">>
+
+<CONSTANT MINX-SLEEPS
+ <LTABLE 2
+ " snores gently"
+ " fidgets in its sleep"
+ " yawns without waking up">>
+
+<CONSTANT MINX-NERVES
+ <LTABLE 2
+ " fidgets nervously"
+ " whimpers with fear"
+ " mews anxiously">>
+
+<CONSTANT ARCH-SNIFFS
+ <LTABLE 2
+ " sniffs the ground suspiciously"
+ " whines anxiously, pawing at the ground"
+ " is snuffling around underfoot">>
+
+<CONSTANT CORBIE-SOUNDS
+ <LTABLE 2 "screech" "squawk" "croak">>
+
+<CONSTANT FEAR-CORBIES
+ <LTABLE 2 "fear" "anxiety" "terror">>
+
+<CONSTANT MAD-CORBIES
+ <LTABLE 2 "anger" "rage" "fury">>
+
+<CONSTANT SICK-DACT
+ <LTABLE 2
+ " snaps at you with its beak"
+ " screeches pitifully"
+ " flutters its good wing back and forth"
+ " cries out with pain"
+ " limps about in a helpless circle">>
+
+<CONSTANT HAPPY-DACT
+ <LTABLE 2
+ " scratches the ground with its claws"
+ " emits a dry croak of contentment"
+ " watches you with a sharp, beady eye"
+ " screeches at the sky"
+ " flutters about restlessly">>
+
+<CONSTANT DACT-WAITS
+ <LTABLE 2
+ " eyeing you expectantly"
+ " sharpening its beak"
+ " fluttering its wings">>
+
+<CONSTANT FLYING-DACT
+ <LTABLE 2
+ " peers at the ground below"
+ " circles patiently"
+ " beats its powerful wings"
+ " turns to look at you">>
+
+<CONSTANT TORTURES
+ <LTABLE 2
+"your mouth gags with the taste of orcish nightsoil"
+"the stench of burning fish cakes makes you stagger"
+"hundreds of imaginary spiders crawl across your skin"
+"a syrupy arrangement of \"Born in the GUE\" pounds in your ears"
+"the raw glare of a disco strobe sends you reeling">>
+
+<CONSTANT MAMA-CLIMBS
+ <LTABLE 2
+" tries to climb higher, but can't quite manage it"
+" snorts at you angrily, trying to climb higher"
+" angrily paws the bottom of the maw">>
+
+<CONSTANT CLERIC-WOES
+ <LTABLE 2
+ "Woe! Woe is us"
+ "Who will save us? O woe"
+ "O woe is us, woe"
+ "Will no one answer our prayers? Woe">>
+
+<CONSTANT MAGIC-WORDS
+ <LTABLE 0
+ <TABLE <VOC "SMEE" NOUN> <PLTABLE (STRING) "Smee"> 0>
+ <TABLE <VOC "YABBA" NOUN> <PLTABLE (STRING) "Yabba"> 0>
+ <TABLE <VOC "BOK" NOUN> <PLTABLE (STRING) "Bok"> 0>
+ <TABLE <VOC "SQUIRP" NOUN> <PLTABLE (STRING) "Squirp"> 0>
+ <TABLE <VOC "STELLA" NOUN> <PLTABLE (STRING) "Stella"> 0>
+ <TABLE <VOC "BLARN" NOUN> <PLTABLE (STRING) "Blarn"> 0>
+ <TABLE <VOC "PROSSER" NOUN> <PLTABLE (STRING) "Prosser"> 0>
+ <TABLE <VOC "YQUEM" NOUN> <PLTABLE (STRING) "Yquem"> 0>
+ <TABLE <VOC "WATKIN" NOUN> <PLTABLE (STRING) "Watkin"> 0>
+ <TABLE <VOC "JUKES" NOUN> <PLTABLE (STRING) "Jukes"> 0>
+ <TABLE <VOC "MACUGA" NOUN> <PLTABLE (STRING) "Macuga"> 0>>>
+
+<CONSTANT SCARE-COLORS <LTABLE 0 W?PUCE W?LAVENDER W?MAUVE>>
+
+<CONSTANT SHYNESS
+ <LTABLE 2
+ " hobbles out of your reach"
+ " backs away from you"
+ " won't let you near">>
+
+<CONSTANT CAROLS
+ <LTABLE 2
+ "Plover the River and Frotz the Woods"
+ "Winter Bozbarland"
+ "Dwaarnyn the Dark-Nosed Ur-Grue"
+ "I'm Dreaming of a Black Cavern"
+ "Good King Flathead"
+ "Dornbeasts Roasting on an Open Fire" >>
+
+<CONSTANT HOW-SINGS
+ <LTABLE 2
+ " sing a few verses of \""
+ " hum the chorus from \""
+ " begin crooning \"">>
+
+<CONSTANT XTREE-DOINGS
+ <LTABLE 2
+ " blink their lights"
+ " whisper among themselves"
+ " swish their tinsel"
+ " rattle their ornaments">>
+
+<CONSTANT COOK-DOINGS
+ <LTABLE 2
+ " does his best to ignore you"
+ " busies himself around the kitchen"
+ " glances up at you and scowls"
+ " bustles around the room">>
+
+<CONSTANT MAGIC-ITEMS
+ <PLTABLE STAFF CANE WAND ROD STICK STAVE
+ RENEWAL PARCHMENT VELLUM SMOOTH RUMPLE GILT
+ APOTION BPOTION CPOTION DPOTION EPOTION
+ RFOOT CLOVER SHOE
+ AMULET GOBLET VIAL
+ SCABBARD COCO ROOT RING STONE UHEMI LHEMI DIARY
+ PALIMP CHEST PHASE JAR CIRCLET GLASS
+ HELM GURDY SPENSE ROSE CLOAK WHISTLE >>
+
+<CONSTANT WEAPON-ITEMS
+ <PLTABLE SWORD SHILL AXE DAGGER ARROW>>
+
+<CONSTANT ARMOR-ITEMS
+ <PLTABLE CLOAK TUNIC SCALE CHAIN PLATE HELM PACK SCABBARD>>
+
+<CONSTANT LIGHT-SOURCES <PLTABLE AMULET LANTERN>>
+
+<CONSTANT WIND-ALERTS
+ <LTABLE 2 "You feel the wind changing direction"
+ "The wind changes direction again"
+ "A fresh wind blows from a new direction">>
+
+<CONSTANT STORAGE-SPACE 1024>
+<CONSTANT FREE-STORAGE <ITABLE ,STORAGE-SPACE (BYTE) 0>>
+
+<CONSTANT PRESENT 6>
+<CONSTANT MAX-ATIME 11>
+
+<CONSTANT ARCH-ROOMS
+ <TABLE (BYTE)
+ ARCH-VOID ARCH1 ARCH2 ARCH3 ARCH4 ARCH5 0
+ ARCH9 ARCH10 ARCH11 ARCH12 ARCH-VOID>>
+
+<CONSTANT DORN-MISSES
+ <LTABLE 2
+ " moves its deadly gaze across the room"
+ " tries to lock eyes with yours"
+ " scans the room with its deadly gaze"
+ " almost stares you down">>
+
+<CONSTANT DORN-HITS
+ <LTABLE 2
+ " fixes its deadly gaze upon you"
+ "'s eyes meet yours"
+ " locks its eyes onto your face"
+ "'s gaze stops you cold">>
+
+<CONSTANT DORN-ROOMS
+ <PLTABLE (BYTE) TOWER-TOP LEVEL3A LEVEL3B LEVEL3C LEVEL3D>>
+
+<CONSTANT PUPP-DOINGS
+ <LTABLE 2
+ "making faces at you"
+ "hurling insults at you"
+ "reciting libelous rhymes about your personal life"
+ "spreading rumors about you"
+ "accusing you of shocking indiscretions"
+ "taunting you">>
+
+<CONSTANT PUPP-MISSES
+ <LTABLE 2
+ " swings back and forth in its tree"
+ " pauses to think of another insult"
+ " dodges behind a tree trunk"
+ " stops to chuckle at its own cleverness">>
+
+<CONSTANT PUPP-HITS
+ <LTABLE 2
+" twists its body into an unflattering parody of your own"
+" recites your nightly personal habits in excruciating detail"
+" mirrors the expression on your face with infuriating accuracy"
+" accuses your mother of shocking improprieties"
+" reminds you how much weight you've gained lately, and where">>
+
+<CONSTANT STRANGLES
+ <LTABLE 2
+ "The bony fingers close tighter around your throat"
+ "You gasp for breath as the skeleton throttles your neck"
+ "The skeleton grins with menace as its fingers close tighter">>
+
+<CONSTANT S-LADDER 0>
+<CONSTANT S-CAT 1>
+<CONSTANT S-13 2>
+<CONSTANT S-UMBRELLA 3>
+
+<CONSTANT SUCKER-TYPES <LTABLE 0 S-LADDER S-CAT S-13 S-UMBRELLA>>
+
+<CONSTANT SUCKER-NAMES
+ <PTABLE "stepladder"
+ "black cat"
+ "giant number 13"
+ "spinning umbrella">>
+
+<CONSTANT SUCKER-SYNS-A
+ <PTABLE <VOC "LADDER" NOUN>
+ <VOC "CAT" NOUN>
+ <VOC "THIRTEEN" NOUN>
+ <VOC "UMBRELLA" NOUN>>>
+
+<CONSTANT SUCKER-SYNS-B
+ <PTABLE <VOC "STEPLADDER" NOUN>
+ <VOC "KITTY" NOUN>
+ <VOC "INTNUM" NOUN>
+ <VOC "BROLLY" NOUN>>>
+
+<CONSTANT SUCKER-ADJS
+ <PTABLE <VOC "STEP" ADJ>
+ <VOC "KITTY" ADJ>
+ <VOC "NUMBER" ADJ>
+ <VOC "SPINNING" ADJ>>>
+
+<CONSTANT SUCKER-SMASHES
+ <PTABLE
+" pirouettes across the chamber, grazing the mirror"
+" yowls playfully, leaps high and rakes its claws across the mirror"
+" studies itself in the mirror, frowns, and jabs at it angrily"
+"'s point nudges against the mirror">>
+
+<CONSTANT SUCKER-HITS
+ <PTABLE
+ <LTABLE 2
+ " opens its legs wide, and steps right over you"
+ " does a somersault over your head"
+ " leaps over your head">
+ <LTABLE 2
+ " marches back and forth in front of you"
+ " places itself directly in your path"
+ " slinks to and fro before you">
+ <LTABLE 2
+ " points to itself, then at you"
+ " stares you right in the face"
+ " waves at you grimly">
+ <LTABLE 2
+ " slowly opens, then snaps itself shut"
+ " snaps itself open, then slowly closes"
+ " opens itself as wide as possible">>>
+
+<CONSTANT SUCKER-MISSES
+ <PTABLE
+ <LTABLE 2
+ " clumps around the passage"
+ " twirls on one leg"
+ " tries to step over you">
+ <LTABLE 2
+ " races around the chamber"
+ " tries to cross your path"
+ " slinks along the edge of the passage">
+ <LTABLE 2
+ " slides closer to you"
+ " does its best to keep your attention"
+ " tries to block the passage">
+ <LTABLE 2
+ " whacks the wall trying to open itself"
+ " whirls towards the center of the passage"
+ " stops moving, then spins the other way">>>
+
+<CONSTANT SUCKER-STALKS
+ <LTABLE 2 "brushes past" "is stalking" "circles around">>
+
+<CONSTANT LUCKY-OBJECTS
+ <PLTABLE RFOOT CLOVER SHOE>>
+
+<CONSTANT EMPTY-WANDS
+ <LTABLE 2
+ " sputters uselessly"
+ " emits a few feeble sparks"
+ " coughs impotently">>
+
+<CONSTANT NO-SLEEPS
+ <PLTABLE DUST CRAB VAPOR DEAD SKELETON
+ ASUCKER BSUCKER CSUCKER>>
+
+<CONSTANT OFFERS
+ <LTABLE 2 "Yours for only "
+ "A rare bargain at "
+ "I'd part with it for "
+ "For you, just ">>
+
+<CONSTANT USED-OFFERS
+ <LTABLE 2 "This used one's worth "
+ "Used, it's worth about "
+ "A used one like this goes for ">>
+
+<CONSTANT JUNGLE-DESCS
+ <LTABLE 0
+ <PTABLE DESCRIBE-JD0 JD0-F>
+ <PTABLE DESCRIBE-JD1 JD1-F>
+ <PTABLE DESCRIBE-JD2 JD2-F>
+ <PTABLE DESCRIBE-JD3 JD3-F>>>
+
+<CONSTANT CITY-ENTRIES
+ <LTABLE 2
+ "The peace of the countryside is shattered"
+ "Decrepit buildings close in on every side"
+ "The road becomes noisy and crowded">>
+
+<CONSTANT FOREST-DESCS
+ <LTABLE 0
+ <PTABLE DESCRIBE-F1 F1-F>
+ <PTABLE DESCRIBE-F2 F2-F>
+ <PTABLE DESCRIBE-F3 F3-F>
+ <PTABLE DESCRIBE-F4 F4-F>
+ <PTABLE DESCRIBE-F5 F5-F>
+ <PTABLE DESCRIBE-F6 F6-F>>>
+
+<CONSTANT RUIN-DESCS
+ <LTABLE 0
+ <PTABLE DESCRIBE-RD0 RD0-F>
+ <PTABLE DESCRIBE-RD1 RD1-F>
+ <PTABLE DESCRIBE-RD2 RD2-F>
+ <PTABLE DESCRIBE-RD3 RD3-F>
+ <PTABLE DESCRIBE-RD4 RD4-F>>>
+
+<CONSTANT BRIDGE-TYPES
+ <LTABLE 2
+ "Clammy mist obscures your view of either end"
+ "Your ears ring from the roar of water far below"
+ "Both edges of the chasm are obscured in the clammy mist"
+ "The deafening roar of water is giving you a headache">>
+
+<CONSTANT NOPEELS <PLTABLE CLERIC OWOMAN SALT COOK>>
+
+<CONSTANT FULL 5>
+
+<CONSTANT SUSS-WIDTH 18>
+<CONSTANT SUSS-HEIGHT 5>
+<CONSTANT SUSSY 7>
+<CONSTANT SUSS-STATS <PTABLE (BYTE) P?ENDURANCE P?STRENGTH P?DEXTERITY>>
+
+<CONSTANT AH-YESSES
+ <LTABLE 2
+ "Ah, yes! A "
+ "That's a "
+ "A "
+ "Your basic "
+ "Behold! A "
+ "This is a ">>
+
+<CONSTANT MENU-LIST
+ <PTABLE " Begin using a preset character "
+ " Select a preset character "
+ " Randomly generate a new character "
+ " Create your own character "
+ " Quit ">>
+
+<CONSTANT SALT-DABS
+ <LTABLE 2
+ " dabs a bit more paint onto the canvas"
+ " eyes his work critically"
+ " touches up a spot on his painting"
+ " pauses to squint at his handiwork">>
+
+<CONSTANT DARK-WALKS
+ <LTABLE 2
+ "stumble blindly ahead"
+ "inch forward one step at a time"
+ "feel your way onward">>
+
+<CONSTANT OWOMAN-SNORTS
+ <LTABLE 2 "sniff" "laugh" "observe" "chuckle" "mutter">>
+
+<CONSTANT DARK-MOVINGS
+ <LTABLE 2
+ "You hear something move"
+ "Something is moving around"
+ "You hear a movement"
+ "Something moves">>
+
+<CONSTANT URGRUE-GREETS
+ <LTABLE 2
+ "Welcome back"
+ "Still alive? Impressive"
+ "How nice of you to return">>
+
+<CONSTANT URGRUE-BYES
+ <LTABLE 2
+ "You'll be back,"
+ "Leaving so soon?"
+ "Do drop in again,">>
+
+<CONSTANT CHARLIST
+ <PLTABLE CONGREG BABY MAMA MINX DACT CLERIC UNICORN
+ MAYOR HUNTER CONDUCTOR SALT COOK OWOMAN>>
+
+<CONSTANT BUNNY-SPLITS
+ <LTABLE 2 " divide once again"
+ " are still dividing"
+ " have divided once again"
+ " continue to divide">>
+
+<CONSTANT OWOMAN-MOVES
+ <LTABLE 2
+ " dusts off the items in "
+ " putters around behind "
+ " polishes the top of "
+ " leans against ">>
+
+<CONSTANT BANDIT-MUTTERS
+ <LTABLE 2
+ "The bandits chuckle among themselves"
+ "\"Har!\" shouts a bandit, for no apparent reason"
+ "One of the bandits winks at you">>
+
+<CONSTANT OWOMAN-EYES
+ <LTABLE 2
+ "eyeing you curiously"
+ "keeping an eye on you"
+ "watching every move you make">>
+
+<CONSTANT OUCHES
+ <LTABLE 2 "Yow" "Ouch" "Oof">>
+
+<CONSTANT CRAB-ATTACKS
+ <LTABLE 2 " closes in with its pincers"
+ " gives you a nasty pinch"
+ "'s pincers close in again"
+ " pinches you hard">>
+
+<CONSTANT CRAB-MISSES
+ <LTABLE 2
+ "'s pincers barely miss your leg"
+ " misses you again, but just barely"
+ " feints sideways, pincers snapping"
+ " barely misses you again"
+ " snaps out with its pincers, just missing you"
+ " strikes out at you, but misses"
+ " poises itself for another strike" >>
+
+<CONSTANT RAT-ATTACKS
+ <LTABLE 2 " closes in with its sharp teeth"
+ " gives you a nasty bite"
+ "'s teeth close in again"
+ " bites you hard">>
+
+<CONSTANT RAT-MISSES
+ <LTABLE 2
+ "'s teeth barely miss your ankle"
+ " misses you again, but just barely"
+ " feints to one side, teeth snapping"
+ " barely misses you again"
+ " swipes out with its claws, just missing you"
+ " strikes out at you, but misses"
+ " poises itself for another strike" >>
+
+<CONSTANT SNIPE-HITS
+ <LTABLE 2 " closes in with its sharp beak"
+ " gives you a nasty peck"
+ "'s beak closes in again"
+ " pecks you hard">>
+
+<CONSTANT SNIPE-MISSES
+ <LTABLE 2
+ "'s beak barely misses your eye"
+ " misses you again, but just barely"
+ " feints to one side, eyes flashing"
+ " barely misses you again"
+ " swipes out with its beak, just missing you"
+ " strikes out at you, but misses"
+ " poises itself for another strike" >>
+
+<CONSTANT VAPOR-DOINGS
+ <LTABLE 2
+ " whispers an obscene secret in your ear"
+ " giggles insanely"
+ " darts around your head, just out of reach">>
+
+<CONSTANT VAPOR-LAUGHS
+ <LTABLE 2
+ "Giggling with glee"
+ "Cackling with mischief"
+ "Sniggering maliciously">>
+
+<CONSTANT VAPOR-TICKLES
+ <LTABLE 2
+ " tickles you in a sensitive place"
+ " pokes you where you ought not to be poked"
+ " infiltrates your naughty bits">>
+
+<CONSTANT VAPOR-SNEERS
+ <LTABLE 2
+ "Boo"
+ "Nyeah, nyeah"
+ "Cootchy-cootchy-coo"
+ "Woo-woo-woo"
+ "Nyuk, nyuk, nyuk">>
+
+<CONSTANT SPIDER-HITS
+ <LTABLE 2 " closes in with its mandibles"
+ " gives you a nasty sting"
+ "'s mandibles close in again"
+ " stings you hard">>
+
+<CONSTANT SPIDER-MISSES
+ <LTABLE 2
+ " tries to grab you with its mandibles"
+ " misses you again, but just barely"
+ " feints to one side, mandibles ready"
+ " barely misses you again"
+ " reaches out with its mandibles, just missing you"
+ " strikes out at you, but misses"
+ " poises itself for another strike" >>
+
+<CONSTANT SLUG-HITS
+ <LTABLE 2 " squirts vile ichors at you"
+ " gives you a nasty squirt"
+ "'s squirt glands score a direct hit"
+ " squirts you again">>
+
+<CONSTANT SLUG-MISSES
+ <LTABLE 2
+ " tries to squirt you with vile ichors"
+ " poises itself for another squirt"
+ " misses you again, but just barely"
+ " feints to one side, squirt glands at the ready"
+ " barely misses you again"
+ " squirts out again, just missing you" >>
+
+<CONSTANT WORM-HITS
+ <LTABLE 2 " closes in with its fangs"
+ " gives you a nasty bite"
+ "'s fangs close in again"
+ " strikes you hard">>
+
+<CONSTANT WORM-MISSES
+ <LTABLE 2
+ " tries to impale you with its fangs"
+ " misses you again, but just barely"
+ " feints to one side, fangs bared"
+ " barely misses you again"
+ " strikes out with its fangs, just missing you"
+ " strikes out at you, but misses"
+ " poises itself for another strike" >>
+
+<CONSTANT JAW-HITS
+ <LTABLE 2 " closes in with its jaws"
+ " gives you a nasty snap"
+ "'s jaws close in again"
+ " bites you hard">>
+
+<CONSTANT JAW-MISSES
+ <LTABLE 2
+ " tries to snap you with its jaws"
+ " misses you again, but just barely"
+ " feints to one side, jaws snapping"
+ " barely misses you again"
+ " strikes out with its jaws, just missing you"
+ " strikes out at you, but misses"
+ " poises itself for another strike" >>
+
+<CONSTANT DEAD-HITS
+ <LTABLE 2 " closes in with his ghostly blade"
+ " gives you a nasty cut"
+ "'s blade closes in again"
+ " strikes you hard">>
+
+<CONSTANT DEAD-MISSES
+ <LTABLE 2
+ " tries to slice you with his ghostly blade"
+ " misses you again, but just barely"
+ " feints to one side, blade swinging"
+ " barely misses you again"
+ " strikes out with his blade, just missing you"
+ " strikes out at you, but misses"
+ " poises himself for another strike" >>
+
+<CONSTANT GHOUL-HITS
+ <LTABLE 2 " closes in with his spade"
+ " gives you a nasty cut"
+ "'s spade closes in again"
+ " strikes you hard">>
+
+<CONSTANT GHOUL-MISSES
+ <LTABLE 2
+ " tries to brain you with his spade"
+ " misses you again, but just barely"
+ " feints to one side, spade swinging"
+ " barely misses you again"
+ " strikes out with his spade, just missing you"
+ " strikes out at you, but misses"
+ " poises himself for another strike" >>
+
+<CONSTANT MISSES
+ <LTABLE 2 "but miss"
+ "missing by a hair"
+ "nearly hitting it"
+ "just barely missing">>
+
+<CONSTANT NO-MINX
+ <PLTABLE (BYTE)
+ IN-SPLENDOR ON-BRIDGE IN-SKY APLANE
+ NW-SUPPORT SW-SUPPORT SE-SUPPORT
+ FOREST-EDGE ON-TRAIL ON-PEAK IN-CABIN>> \ No newline at end of file
diff --git a/events.zil b/events.zil
new file mode 100644
index 0000000..9a8e254
--- /dev/null
+++ b/events.zil
@@ -0,0 +1,4481 @@
+"EVENTS for BEYOND ZORK:
+ Copyright (C)1987 Infocom, Inc. All rights reserved."
+
+<CONSTANT MAX-LAMP-LIFE 100>
+<GLOBAL LAMP-LIFE:NUMBER 20>
+
+<ROUTINE I-LANTERN ("AUX" V)
+ <SET V <VISIBLE? ,LANTERN>>
+ <COND (<DLESS? LAMP-LIFE 1>
+ <SETG LAMP-LIFE 0>
+ <DEQUEUE ,I-LANTERN>
+ <UNMAKE ,LANTERN ,LIGHTED>
+ <REPLACE-ADJ? ,LANTERN ,W?LIGHTED ,W?DARK>
+ <COND (<ZERO? .V>
+ <RFALSE>)>
+ <SETG P-IT-OBJECT ,LANTERN>
+ <TELL " The " 'LANTERN
+ "'s light flickers and goes out." CR>
+ <SAY-IF-HERE-LIT>
+ <RTRUE>)
+ (<ZERO? .V>
+ <RFALSE>)
+ (<EQUAL? ,LAMP-LIFE 20>
+ <SETG P-IT-OBJECT ,LANTERN>
+ <TELL " The light from the " 'LANTERN
+ " is getting dimmer." CR>
+ <RTRUE>)
+ (<EQUAL? ,LAMP-LIFE 10>
+ <SETG P-IT-OBJECT ,LANTERN>
+ <TELL " The " 'LANTERN "'s glow is fading rapidly." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<CONSTANT DOOR-CRASHER 30> "Strength required to break open a door."
+
+"Returns a direction for a monster to move, -1 if none."
+
+<ROUTINE I-CRAB ("AUX" L DIR TBL DEST DAMAGE)
+ <SET L <LOC ,CRAB>>
+ <COND (<EQUAL? .L ,HERE>
+ <COND (<L? <GETP ,CRAB ,P?ENDURANCE> 1>
+ <TELL ,TAB
+"Something falls to your feet with a ">
+ <ITALICIZE "plink">
+ <TELL ,COMMA-AND>
+ <COND (<ZERO? ,LIT?>
+ <TELL "a shadow">)
+ (T
+ <TELL THE ,CRAB>)>
+ <PRINT " retreats into the ">
+ <TELL "darkness." CR>
+ <KILL-MONSTER ,CRAB>
+ <MOVE ,CROWN ,HERE>
+ <SETG P-IT-OBJECT ,CROWN>
+ <RTRUE>)
+ (<IS? ,CRAB ,SURPRISED>
+ <SEE-MONSTER ,CRAB>
+ <COND (<NOT <IS? ,CRAB ,SLEEPING>>
+ <TELL ,TAB>
+ <COND (<ZERO? ,LIT?>
+ <DARK-MOVES>
+ <RTRUE>)>
+ <COND (<AND <HERE? THRONE-ROOM>
+ <NOT <IS? ,CRAB ,TOUCHED>>>
+ <MAKE ,CRAB ,TOUCHED>
+ <TELL CTHE ,CRAB
+"'s antennae snap to alert as you enter. He rises from " THE ,THRONE
+" and charges across " THE ,FLOOR ", claws snapping with anticipation!" CR>
+ <RTRUE>)>
+ <WHIRLS ,CRAB>
+ <RTRUE>)>)>
+ <COND (<STILL-SLEEPING? ,CRAB>
+ <RTRUE>)>
+ <SET DAMAGE <MONSTER-STRIKES? ,CRAB>>
+ <TELL ,TAB>
+ <COND (<T? .DAMAGE>
+ <COND (<ZERO? ,LIT?>
+ <TELL "Something pinches you">)
+ (T
+ <TELL CTHE ,CRAB <PICK-NEXT ,CRAB-ATTACKS>>)>
+ <OUCH ,CRAB .DAMAGE>
+ <RTRUE>)
+ (<ZERO? ,LIT?>
+ <DARK-MOVES>
+ <RTRUE>)>
+ <TELL CTHE ,CRAB <PICK-NEXT ,CRAB-MISSES> ,PERIOD>
+ <RTRUE>)>
+
+ <SET DIR <MOVE-MONSTER? ,CRAB>>
+ <COND (<T? .DIR>
+ <TELL ,TAB>
+ <COND (<ZERO? ,LIT?>
+ <TELL ,YOU-HEAR B ,W?SOMETHING>
+ <COND (<IS? ,CRAB ,SEEN>
+ <TELL " else">)>
+ <TELL " scuttle ">)
+ (T
+ <COND (<IS? ,CRAB ,SEEN>
+ <TELL ,XTHE>)
+ (T
+ <TELL ,XA>)>
+ <TELL D ,CRAB " scuttles ">)>
+ <MAKE ,CRAB ,SEEN>
+ <PASSAGE .DIR>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE PASSAGE (DIR)
+ <TELL "in from the " B .DIR " passage!" CR>
+ <RTRUE>>
+
+<ROUTINE I-RAT ("AUX" L DIR TBL DEST DAMAGE)
+ <SET L <LOC ,RAT>>
+ <COND (<EQUAL? .L ,HERE>
+ <COND (<L? <GETP ,RAT ,P?ENDURANCE> 1>
+ <TELL ,TAB>
+ <COND (<ZERO? ,LIT?>
+ <TELL ,YOU-HEAR B ,W?SOMETHING " retreat">)
+ (T
+ <TELL "Mortally wounded, " THE ,RAT
+ " retreats">)>
+ <TELL " into the darkness." CR>
+ <KILL-MONSTER ,RAT>
+ <RTRUE>)
+ (<IS? ,RAT ,SURPRISED>
+ <SEE-MONSTER ,RAT>
+ <COND (<NOT <IS? ,RAT ,SLEEPING>>
+ <TELL ,TAB>
+ <COND (<ZERO? ,LIT?>
+ <DARK-MOVES>
+ <RTRUE>)>
+ <WHIRLS ,RAT>
+ <RTRUE>)>)>
+ <COND (<STILL-SLEEPING? ,RAT>
+ <RTRUE>)>
+ <SET DAMAGE <MONSTER-STRIKES? ,RAT>>
+ <TELL ,TAB>
+ <COND (<T? .DAMAGE>
+ <COND (<ZERO? ,LIT?>
+ <TELL "Something bites you">)
+ (T
+ <TELL CTHE ,RAT <PICK-NEXT ,RAT-ATTACKS>>)>
+ <OUCH ,RAT .DAMAGE>
+ <RTRUE>)
+ (<ZERO? ,LIT?>
+ <DARK-MOVES>
+ <RTRUE>)>
+ <TELL CTHE ,RAT <PICK-NEXT ,RAT-MISSES> ,PERIOD>
+ <RTRUE>)>
+ <SET DIR <MOVE-MONSTER? ,RAT>>
+ <COND (<T? .DIR>
+ <TELL ,TAB>
+ <COND (<ZERO? ,LIT?>
+ <TELL ,YOU-HEAR B ,W?SOMETHING " scurry ">)
+ (T
+ <COND (<IS? ,RAT ,SEEN>
+ <TELL ,XTHE>)
+ (T
+ <TELL ,XA>)>
+ <TELL D ,RAT " scurries ">)>
+ <MAKE ,RAT ,SEEN>
+ <PASSAGE .DIR>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE I-SNIPE ("AUX" L DIR TBL DEST DAMAGE)
+ <SET L <LOC ,SNIPE>>
+ <COND (<EQUAL? .L ,HERE>
+ <COND (<L? <GETP ,SNIPE ,P?ENDURANCE> 1>
+ <TELL ,TAB "Battered beyond endurance, " THE ,SNIPE>
+ <PRINT " retreats into the ">
+ <TELL "fog." CR>
+ <KILL-MONSTER ,SNIPE>
+ <RTRUE>)
+ (<IS? ,SNIPE ,SURPRISED>
+ <SEE-MONSTER ,SNIPE>
+ <COND (<NOT <IS? ,SNIPE ,SLEEPING>>
+ <TELL ,TAB>
+ <WHIRLS ,SNIPE>
+ <RTRUE>)>)>
+ <COND (<STILL-SLEEPING? ,SNIPE>
+ <RTRUE>)>
+ <SET DAMAGE <MONSTER-STRIKES? ,SNIPE>>
+ <TELL ,TAB CTHE ,SNIPE>
+ <COND (<T? .DAMAGE>
+ <TELL <PICK-NEXT ,SNIPE-HITS>>
+ <OUCH ,SNIPE .DAMAGE>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,SNIPE-MISSES> ,PERIOD>
+ <RTRUE>)>
+ <SET DIR <MOVE-MONSTER? ,SNIPE>>
+ <COND (<T? .DIR>
+ <TELL ,TAB>
+ <COND (<IS? ,SNIPE ,SEEN>
+ <TELL ,XTHE>)
+ (T
+ <TELL ,XA>)>
+ <MAKE ,SNIPE ,SEEN>
+ <TELL D ,SNIPE " streaks out of the mist!" CR>
+ <TOPPLED? ,SNIPE>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE I-VAPOR ("AUX" L DIR DAMAGE)
+ <SET L <LOC ,VAPOR>>
+ <COND (<EQUAL? .L ,HERE>
+ <COND (<L? <GETP ,VAPOR ,P?ENDURANCE> 1>
+ <TELL ,TAB CTHE ,VAPOR>
+ <PRINT " disappears in a spectral flash">
+ <TELL ,PERIOD>
+ <NEXT-MONSTER ,SNIPE>
+ <KILL-MONSTER ,VAPOR>
+ <RTRUE>)
+ (<IS? ,VAPOR ,SURPRISED>
+ <SEE-MONSTER ,VAPOR>
+ <TELL ,TAB CTHE ,VAPOR
+ " giggles when it sees you." CR>
+ <TOPPLED? ,VAPOR>
+ <RTRUE>)
+ (<TOPPLED? ,VAPOR>
+ <RTRUE>)>
+ <NEXT-ENDURANCE? ,VAPOR>
+ <COND (<AND <PROB 50>
+ <VAPOR-SNATCH?>>
+ <RTRUE>)>
+ <SET DAMAGE <MONSTER-STRIKES? ,VAPOR>>
+ <TELL ,TAB CTHE ,VAPOR>
+ <COND (<T? .DAMAGE>
+ <TELL <PICK-NEXT ,VAPOR-TICKLES> C ,PER>
+ <COND (<ZERO? ,STATIC>
+ <TELL " \"" <PICK-NEXT ,VAPOR-SNEERS>
+ "!\"">)>
+ <CRLF>
+ <UPDATE-STAT <MSPARK? ,VAPOR .DAMAGE>>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,VAPOR-DOINGS>>
+ <COND (<PROB 50>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <TELL ". \"" <PICK-NEXT ,VAPOR-SNEERS> "!\"" CR>
+ <RTRUE>)>
+ <SET DIR <MOVE-MONSTER? ,VAPOR>>
+ <COND (<T? .DIR>
+ <TELL ,TAB>
+ <COND (<IS? ,VAPOR ,SEEN>
+ <TELL ,XTHE>)
+ (T
+ <TELL "Without warning, an ">)>
+ <MAKE ,VAPOR ,SEEN>
+ <TELL D ,VAPOR " coalesces out of the surrounding mist">
+ <COND (<PROB 50>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <TELL ". \"" <PICK-NEXT ,VAPOR-SNEERS> "!\"" CR>
+ <TOPPLED? ,VAPOR>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE VAPOR-SNATCH? ("AUX" (ANY 0) OBJ NXT RM LEN X)
+ <SET LEN <GETB ,MOOR-ROOMS 0>>
+ <COND (<SET OBJ <FIRST? ,PLAYER>>
+ <REPEAT ()
+ <SET NXT <NEXT? .OBJ>>
+ <COND (<IS? .OBJ ,NODESC>)
+ (<OR <IS? .OBJ ,WIELDED>
+ <IS? .OBJ ,WORN>>
+ <COND (<ZERO? .ANY>
+ <TELL ,TAB CTHE ,VAPOR " tries to snatch ">
+ <SAY-YOUR .OBJ>
+ <TELL " from your grasp, ">
+ <COND (<PROB 50>
+ <TELL "and nearly succeeds">)
+ (T
+ <TELL "but fails">)>
+ <COND (<PROB 50>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <INC ANY>)>)
+ (<IS? .OBJ ,TAKEABLE>
+ <PROG ()
+ <SET RM <GETB ,MOOR-ROOMS <RANDOM .LEN>>>
+ <COND (<EQUAL? .RM ,HERE>
+ <AGAIN>)>>
+ <UNMAKE .OBJ ,WORN>
+ <UNMAKE .OBJ ,WIELDED>
+ <MOVE .OBJ .RM>
+ <MOVE ,VAPOR .RM>
+ <MAKE ,VAPOR ,SURPRISED>
+ <SETG LAST-MONSTER <FIND-IN? ,HERE ,MONSTER>>
+ <SETG LAST-MONSTER-DIR <>>
+ <SETG P-IT-OBJECT ,NOT-HERE-OBJECT>
+ <WINDOW ,SHOWING-ALL>
+ <COND (<T? .ANY>
+ <TELL ". Instead, it encircles ">)
+ (T
+ <TELL ,TAB
+<PICK-NEXT ,VAPOR-LAUGHS> ", " THE ,VAPOR " snatches ">)>
+ <SAY-YOUR .OBJ>
+ <TELL " and spirits it away!" CR>
+ <RTRUE>)>
+ <SET OBJ .NXT>
+ <COND (<ZERO? .OBJ>
+ <RETURN>)>>)>
+ <COND (<T? .ANY>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <SET X <GET ,STATS ,LUCK>>
+ <COND (<L? .X 2>)
+ (<PROB .X>
+ <RFALSE>)>
+ <PROG ()
+ <SET RM <GETB ,MOOR-ROOMS <RANDOM .LEN>>>
+ <COND (<EQUAL? .RM ,HERE>
+ <AGAIN>)>>
+ <MAKE ,VAPOR ,SURPRISED>
+ <TELL ,TAB <PICK-NEXT ,VAPOR-LAUGHS> ", " THE ,VAPOR
+ " grabs you by the ankles and lifts you high into the air!" CR>
+ <COND (<T? ,VERBOSITY>
+ <CRLF>)>
+ <GOTO .RM>
+ <SET X <GET ,STATS ,ENDURANCE>>
+ <COND (<G? .X 5>
+ <SET X -5>)
+ (T
+ <SET X <- 0 <- .X 1>>>)>
+ <UPDATE-STAT .X>
+ <TELL ,TAB "You slowly recover your bearings." CR>
+ <RTRUE>>
+
+<ROUTINE I-SPIDER ("AUX" L DIR TBL DEST DAMAGE)
+ <SET L <LOC ,SPIDER>>
+ <COND (<EQUAL? .L ,HERE>
+ <COND (<L? <GETP ,SPIDER ,P?ENDURANCE> 1>
+ <TELL ,TAB CTHE ,SPIDER>
+ <PRINT " retreats down the passageway, ">
+ <TELL "its wounds oozing with vile ichors." CR>
+ <KILL-MONSTER ,SPIDER>
+ <RTRUE>)
+ (<IS? ,SPIDER ,SURPRISED>
+ <SEE-MONSTER ,SPIDER>
+ <COND (<NOT <IS? ,SPIDER ,SLEEPING>>
+ <TELL ,TAB>
+ <WHIRLS ,SPIDER>
+ <RTRUE>)>)>
+ <COND (<STILL-SLEEPING? ,SPIDER>
+ <RTRUE>)>
+ <SET DAMAGE <MONSTER-STRIKES? ,SPIDER>>
+ <TELL ,TAB CTHE ,SPIDER>
+ <COND (<T? .DAMAGE>
+ <TELL <PICK-NEXT ,SPIDER-HITS>>
+ <OUCH ,SPIDER .DAMAGE>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,SPIDER-MISSES> ,PERIOD>
+ <RTRUE>)>
+ <SET DIR <MOVE-MONSTER? ,SPIDER>>
+ <COND (<T? .DIR>
+ <TELL ,TAB>
+ <COND (<IS? ,SPIDER ,SEEN>
+ <TELL ,XTHE>)
+ (T
+ <MAKE ,SPIDER ,SEEN>
+ <TELL ,XA>)>
+ <TELL D ,SPIDER " crawls in from the " B .DIR " passage!" CR>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE I-SLUG ("AUX" L DIR TBL DEST DAMAGE)
+ <SET L <LOC ,SLUG>>
+ <COND (<EQUAL? .L ,HERE>
+ <COND (<L? <GETP ,SLUG ,P?ENDURANCE> 1>
+ <TELL ,TAB CTHE ,SLUG>
+ <PRINT " retreats down the passageway, ">
+ <TELL "oozing something wet." CR>
+ <KILL-MONSTER ,SLUG>
+ <RTRUE>)
+ (<IS? ,SLUG ,SURPRISED>
+ <SEE-MONSTER ,SLUG>
+ <COND (<NOT <IS? ,SLUG ,SLEEPING>>
+ <TELL ,TAB>
+ <WHIRLS ,SLUG>
+ <RTRUE>)>)>
+ <COND (<STILL-SLEEPING? ,SLUG>
+ <RTRUE>)>
+ <SET DAMAGE <MONSTER-STRIKES? ,SLUG>>
+ <TELL ,TAB CTHE ,SLUG>
+ <COND (<T? .DAMAGE>
+ <TELL <PICK-NEXT ,SLUG-HITS>>
+ <OUCH ,SLUG .DAMAGE>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,SLUG-MISSES> ,PERIOD>
+ <RTRUE>)>
+ <SET DIR <MOVE-MONSTER? ,SLUG>>
+ <COND (<T? .DIR>
+ <TELL ,TAB>
+ <COND (<IS? ,SLUG ,SEEN>
+ <TELL ,XTHE>)
+ (T
+ <MAKE ,SLUG ,SEEN>
+ <TELL ,XA>)>
+ <TELL D ,SLUG " oozes ">
+ <PASSAGE .DIR>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE I-WORM ("AUX" L DIR TBL DEST DAMAGE)
+ <SET L <LOC ,WORM>>
+ <COND (<EQUAL? .L ,HERE>
+ <COND (<L? <GETP ,WORM ,P?ENDURANCE> 1>
+ <TELL " Hissing with humiliation, " THE ,WORM
+ " slithers away into the undergrowth." CR>
+ <KILL-MONSTER ,WORM>
+ <RTRUE>)
+ (<IS? ,WORM ,SURPRISED>
+ <SEE-MONSTER ,WORM>
+ <COND (<NOT <IS? ,WORM ,SLEEPING>>
+ <TELL ,TAB CTHE ,WORM
+ " rears up as it sees you." CR>
+ <TOPPLED? ,WORM>
+ <RTRUE>)>)>
+ <COND (<STILL-SLEEPING? ,WORM>
+ <RTRUE>)>
+ <TELL ,TAB CTHE ,WORM>
+ <COND (<IN? ,PLAYER ,MAW>
+ <PRINT " lurks around the idol's maw">
+ <COND (<PROB 50>
+ <TELL ", sharpening its fangs">)>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <SET DAMAGE <MONSTER-STRIKES? ,WORM>>
+ <COND (<T? .DAMAGE>
+ <TELL <PICK-NEXT ,WORM-HITS>>
+ <OUCH ,WORM .DAMAGE>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,WORM-MISSES> ,PERIOD>
+ <RTRUE>)>
+ <SET DIR <MOVE-MONSTER? ,WORM>>
+ <COND (<T? .DIR>
+ <TELL ,TAB CTHE ,WORM>
+ <PRINT " reappears from the ">
+ <TELL B .DIR "!" CR>
+ <TOPPLED? ,WORM>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE I-CROC ("AUX" DAMAGE)
+ <COND (<IN? ,CROC ,HERE>
+ <COND (<L? <GETP ,CROC ,P?ENDURANCE> 1>
+ <TELL ,TAB CTHE ,CROC>
+ <TELL " drags itself off into the bushes." CR>
+ <KILL-MONSTER ,CROC>
+ <RTRUE>)
+ (<IS? ,CROC ,SURPRISED>
+ <SEE-MONSTER ,CROC>
+ <COND (<NOT <IS? ,CROC ,SLEEPING>>
+ <TELL ,TAB>
+ <WHIRLS ,CROC>
+ <RTRUE>)>)>
+ <COND (<STILL-SLEEPING? ,CROC>
+ <RTRUE>)>
+ <TELL ,TAB CTHE ,CROC>
+ <COND (<IN? ,PLAYER ,MAW>
+ <PRINT " lurks around the idol's maw">
+ <CHOPS>
+ <RTRUE>)>
+ <SET DAMAGE <MONSTER-STRIKES? ,CROC>>
+ <COND (<T? .DAMAGE>
+ <TELL <PICK-NEXT ,JAW-HITS>>
+ <OUCH ,CROC .DAMAGE>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,JAW-MISSES> ,PERIOD>
+ <RTRUE>)>
+ <RETURN <CHARGING? ,CROC>>>
+
+<ROUTINE CHARGING? (OBJ "AUX" DIR)
+ <SET DIR <MOVE-MONSTER? .OBJ>>
+ <COND (<T? .DIR>
+ <TELL ,TAB>
+ <COND (<IS? .OBJ ,SEEN>
+ <TELL ,XTHE>)
+ (T
+ <MAKE .OBJ ,SEEN>
+ <TELL ,XA>)>
+ <TELL D .OBJ " charges in from the " B .DIR "!" CR>
+ <TOPPLED? .OBJ>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE CHOPS ()
+ <COND (<PROB 50>
+ <TELL ", licking its chops">)>
+ <TELL ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE I-HOUND ("AUX" DAMAGE)
+ <COND (<IN? ,HOUND ,HERE>
+ <COND (<L? <GETP ,HOUND ,P?ENDURANCE> 1>
+ <TELL " Whining with pain, " THE ,HOUND
+ " limps away into the forest." CR>
+ <KILL-MONSTER ,HOUND>
+ <RTRUE>)
+ (<IS? ,HOUND ,SURPRISED>
+ <SEE-MONSTER ,HOUND>
+ <COND (<NOT <IS? ,HOUND ,SLEEPING>>
+ <TELL ,TAB CTHE ,HOUND
+ " bares its fangs when it sees you." CR>
+ <TOPPLED? ,HOUND>
+ <RTRUE>)>)>
+ <COND (<STILL-SLEEPING? ,HOUND>
+ <RTRUE>)>
+ <TELL ,TAB CTHE ,HOUND>
+ <COND (<IN? ,PLAYER ,POOL>
+ <TELL " prowls the edge of " THE ,POOL>
+ <CHOPS>
+ <RTRUE>)>
+ <SET DAMAGE <MONSTER-STRIKES? ,HOUND>>
+ <COND (<T? .DAMAGE>
+ <TELL <PICK-NEXT ,JAW-HITS>>
+ <OUCH ,HOUND .DAMAGE>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,JAW-MISSES> ,PERIOD>
+ <RTRUE>)>
+ <RETURN <CHARGING? ,HOUND>>>
+
+<ROUTINE I-PUPP ("AUX" L PL DIR TBL DEST DAMAGE)
+ <SET L <LOC ,PUPP>>
+ <COND (<EQUAL? .L ,HERE>
+ <COND (<L? <GETP ,PUPP ,P?ENDURANCE> 1>
+ <TELL " With a furious snarl, " THE ,PUPP>
+ <PRINT " retreats into the ">
+ <TELL "forest." CR>
+ <NEXT-MONSTER ,HOUND>
+ <KILL-MONSTER ,PUPP>
+ <RTRUE>)
+ (<IS? ,PUPP ,SURPRISED>
+ <SEE-MONSTER ,PUPP>
+ <COND (<NOT <IS? ,PUPP ,SLEEPING>>
+ <TELL ,TAB CTHE ,PUPP
+ " grins evilly when it sees you." CR>
+ <TOPPLED? ,PUPP>
+ <RTRUE>)>)>
+ <COND (<STILL-SLEEPING? ,PUPP>
+ <RTRUE>)>
+ <NEXT-ENDURANCE? ,PUPP>
+ <SET PL <LOC ,PLAYER>>
+ <TELL ,TAB CTHE ,PUPP>
+ <COND (<NOT <EQUAL? .PL ,HERE>>
+ <TELL <PICK-NEXT ,PUPP-MISSES> ,PERIOD>
+ <RTRUE>)>
+ <SET DAMAGE <MONSTER-STRIKES? ,PUPP>>
+ <TELL <PICK-NEXT ,PUPP-HITS>>
+ <COND (<ZERO? .DAMAGE>
+ <TELL ", but you manage to ignore it." CR>
+ <RTRUE>)>
+ <TELL ,PERIOD>
+ <UPDATE-STAT .DAMAGE>
+ <RTRUE>)>
+ <SET DIR <MOVE-MONSTER? ,PUPP>>
+ <COND (<T? .DIR>
+ <TELL ,TAB>
+ <COND (<IS? ,PUPP ,SEEN>
+ <TELL CTHE ,PUPP " swings in from the " B .DIR ,PERIOD>
+ <RTRUE>)>
+ <MAKE ,PUPP ,SEEN>
+ <SETG LAST-MONSTER-DIR ,P-WALK-DIR>
+ <TELL CA ,PUPP " drops out of the treetops!" CR>
+ <TOPPLED? ,PUPP>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE I-DEAD ("AUX" DIR DAMAGE)
+ <COND (<IN? ,DEAD ,HERE>
+ <COND (<L? <GETP ,DEAD ,P?ENDURANCE> 1>
+ <TELL " Wailing with self-pity, " THE ,DEAD
+ " fades out of existence." CR>
+ <KILL-MONSTER ,DEAD>
+ <RTRUE>)
+ (<IS? ,DEAD ,SURPRISED>
+ <SEE-MONSTER ,DEAD>
+ <WHIRLS ,DEAD>
+ <RTRUE>)
+ (<TOPPLED? ,DEAD>
+ <RTRUE>)>
+ <NEXT-ENDURANCE? ,DEAD>
+ <SET DAMAGE <MONSTER-STRIKES? ,DEAD>>
+ <TELL ,TAB CTHE ,DEAD>
+ <COND (<T? .DAMAGE>
+ <TELL <PICK-NEXT ,DEAD-HITS>>
+ <OUCH ,DEAD .DAMAGE>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,DEAD-MISSES> ,PERIOD>
+ <RTRUE>)>
+ <SET DIR <MOVE-MONSTER? ,DEAD>>
+ <COND (<T? .DIR>
+ <TELL ,TAB>
+ <COND (<IS? ,DEAD ,SEEN>
+ <TELL CTHE ,DEAD>
+ <PRINT " reappears from the ">
+ <TELL B .DIR>)
+ (T
+ <MAKE ,DEAD ,SEEN>
+ <TELL "With a fearful battle cry, "
+ A ,DEAD " rises out of the ruins">)>
+ <TELL "!" CR>
+ <TOPPLED? ,DEAD>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE I-GHOUL ("AUX" DIR DAMAGE)
+ <COND (<IN? ,GHOUL ,HERE>
+ <COND (<L? <GETP ,GHOUL ,P?ENDURANCE> 1>
+ <NEXT-MONSTER ,DEAD>
+ <TELL ,TAB "Howling with pain and rage, "
+ THE ,GHOUL " abandons his spade and">
+ <PRINT " retreats into the ">
+ <TELL "ruins." CR>
+ <KILL-MONSTER ,GHOUL>
+ <MOVE ,SPADE ,HERE>
+ <SETG P-IT-OBJECT ,SPADE>
+ <RTRUE>)
+ (<IS? ,GHOUL ,SURPRISED>
+ <SEE-MONSTER ,GHOUL>
+ <COND (<NOT <IS? ,GHOUL ,SLEEPING>>
+ <WHIRLS ,GHOUL>
+ <RTRUE>)>)>
+ <COND (<STILL-SLEEPING? ,GHOUL>
+ <RTRUE>)>
+ <SET DAMAGE <MONSTER-STRIKES? ,GHOUL>>
+ <TELL ,TAB CTHE ,GHOUL>
+ <COND (<T? .DAMAGE>
+ <TELL <PICK-NEXT ,GHOUL-HITS>>
+ <OUCH ,GHOUL .DAMAGE>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,GHOUL-MISSES> ,PERIOD>
+ <RTRUE>)>
+ <SET DIR <MOVE-MONSTER? ,GHOUL>>
+ <COND (<T? .DIR>
+ <TELL ,TAB>
+ <COND (<IS? ,GHOUL ,SEEN>
+ <TELL CTHE ,GHOUL>
+ <PRINT " reappears from the ">
+ <TELL B .DIR>)
+ (T
+ <MAKE ,GHOUL ,SEEN>
+ <TELL "Without warning, " A ,GHOUL
+ " leaps out of the rubble">)>
+ <TELL "!" CR>
+ <TOPPLED? ,GHOUL>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE I-ASUCKER ()
+ <RETURN <MOVE-SUCKERS ,ASUCKER ,BSUCKER>>>
+
+<ROUTINE I-BSUCKER ()
+ <RETURN <MOVE-SUCKERS ,BSUCKER ,CSUCKER>>>
+
+<ROUTINE I-CSUCKER ()
+ <RETURN <MOVE-SUCKERS ,CSUCKER>>>
+
+<ROUTINE MOVE-SUCKERS (OBJ "OPT" (NXT 0)
+ "AUX" (DAMAGE 0) L PL DIR TBL DEST X)
+ <SET L <LOC .OBJ>>
+ <COND (<EQUAL? .L ,HERE>
+ <TELL ,TAB>
+ <COND (<L? <GETP .OBJ ,P?ENDURANCE> 1>
+ <TELL "Squealing with fear, " THE .OBJ
+ " retreats down the passageway." CR>
+ <COND (<T? .NXT>
+ <NEXT-MONSTER .NXT>
+ <NEXT-SUCKER .NXT>)>
+ <KILL-MONSTER .OBJ>
+ <RTRUE>)
+ (<IS? .OBJ ,SURPRISED>
+ <SEE-MONSTER .OBJ>
+ <COND (<ZERO? ,LIT?>
+ <DARK-MOVES>
+ <RTRUE>)>
+ <TELL CTHE .OBJ " glances up as you appear." CR>
+ <RTRUE>)
+ (<PROB 20>
+ <PUTP .OBJ ,P?ENDURANCE <GETP .OBJ ,P?EMAX>>
+ <WINDOW ,SHOWING-ROOM>
+ <COND (<T? ,LIT?>
+ <BLINK .OBJ>
+ <TELL " turns into ">)>
+ <NEXT-SUCKER .OBJ>
+ <COND (<T? ,LIT?>
+ <TELL A .OBJ "!" CR>
+ <RTRUE>)>
+ <TELL ,YOU-HEAR "a curious sound in the darkness." CR>
+ <RTRUE>)>
+
+ <SET X <GET ,STATS ,LUCK>>
+ <COND (<G? .X 9>
+ <SET DAMAGE <PERCENT 10 .X>>)
+ (<G? .X 1>
+ <SET DAMAGE 1>)>
+ <NEXT-ENDURANCE? .OBJ>
+ <SET X <GETP ,HERE ,P?MIRROR-OBJ>>
+ <COND (<NOT <EQUAL? .X <> ,NO-MIRROR>>
+ <COND (<T? ,LIT?>
+ <TELL CTHE .OBJ
+ <GET ,SUCKER-SMASHES ,THIS-SUCKER> ,PTAB>
+ <ITALICIZE "Pop">
+ <TELL "!" CR>)
+ (T
+ <TELL ,YOU-HEAR "a flabby ">
+ <ITALICIZE "pop">
+ <TELL " in the darkness." CR>)>
+ <DESTROY-MIRROR .X>
+ <COND (<NOLUCK?>
+ <UPDATE-STAT <- 0 .DAMAGE> ,LUCK T>)>
+ <RTRUE>)
+ (<ZERO? ,LIT?>)
+ (<PROB 67>
+ <TELL CTHE .OBJ
+ <PICK-NEXT <GET ,SUCKER-HITS ,THIS-SUCKER>>
+ ,PERIOD>
+ <COND (<NOLUCK?>
+ <UPDATE-STAT <- 0 .DAMAGE> ,LUCK T>)>
+ <RTRUE>)>
+ <COND (<T? ,LIT?>
+ <TELL CTHE .OBJ
+ <PICK-NEXT <GET ,SUCKER-MISSES ,THIS-SUCKER>>
+ ,PERIOD>
+ <RTRUE>)>
+ <TELL "Something " <PICK-NEXT ,SUCKER-STALKS>
+ " you in the darkness." CR>
+ <RTRUE>)>
+ <SET DIR <MOVE-MONSTER? .OBJ>>
+ <COND (<T? .DIR>
+ <TELL ,TAB>
+ <COND (<ZERO? ,LIT?>
+ <TELL ,YOU-HEAR B ,W?SOMETHING
+ " stalk into the passage." CR>
+ <RTRUE>)
+ (<IS? .OBJ ,SEEN>
+ <TELL ,XTHE>)
+ (T
+ <MAKE .OBJ ,SEEN>
+ <TELL ,XA>)>
+ <TELL D .OBJ " stalks in from the " B .DIR " passage." CR>
+ <RTRUE>)>
+
+ <SET X <GETP <LOC .OBJ> ,P?MIRROR-OBJ>>
+ <COND (<EQUAL? .X <> ,NO-MIRROR>
+ <RFALSE>)>
+ <TELL ,TAB ,YOU-HEAR
+ "a distant patter of stalking feet, then a flabby ">
+ <ITALICIZE "pop">
+ <PRINT ,PERIOD>
+ <DESTROY-MIRROR .X>
+ <RTRUE>>
+
+<ROUTINE NEXT-SUCKER (OBJ "AUX" X)
+ <PROG ()
+ <SET X <PICK-ONE ,SUCKER-TYPES>>
+ <COND (<EQUAL? .X ,THIS-SUCKER>
+ <AGAIN>)>>
+ <SETG THIS-SUCKER .X>
+ <SET X <GETPT .OBJ ,P?SYNONYM>>
+ <PUT .X 0 <GET ,SUCKER-SYNS-A ,THIS-SUCKER>>
+ <PUT .X 1 <GET ,SUCKER-SYNS-B ,THIS-SUCKER>>
+ <SET X <GETPT .OBJ ,P?ADJECTIVE>>
+ <PUT .X 0 <GET ,SUCKER-ADJS ,THIS-SUCKER>>
+ <RFALSE>>
+
+<GLOBAL AMULET-TIMER:NUMBER 0>
+
+<ROUTINE I-AMULET ()
+ <COND (<DLESS? AMULET-TIMER 1>
+ <COND (<VISIBLE? ,AMULET>
+ <STAR-FADES>)>
+ <STOP-AMULET>
+ <COND (<WEARING-MAGIC? ,AMULET>
+ <NORMAL-STRENGTH>)>)>
+ <RFALSE>>
+
+<ROUTINE STAR-FADES ("OPT" (ANGRY <>))
+ <TELL " The amulet's glowing star ">
+ <COND (<T? .ANGRY>
+ <TELL "flares angrily, ">)>
+ <TELL "fades and disappears." CR>
+ <RTRUE>>
+
+<ROUTINE I-SALT ()
+ <COND (<NOT <HERE? ON-WHARF>>
+ <RFALSE>)
+ (<IS? ,SALT ,SEEN>
+ <UNMAKE ,SALT ,SEEN>
+ <RFALSE>)
+ (<PROB 75>
+ <RFALSE>)>
+ <MAKE ,SALT ,SEEN>
+ <TELL ,TAB CTHE ,SALT <PICK-NEXT ,SALT-DABS> ,PERIOD>
+ <RTRUE>>
+
+<GLOBAL GOSSIP:NUMBER 0>
+
+<ROUTINE I-BANDITS ()
+ <COND (<NOT <HERE? IN-PUB>>
+ <RFALSE>)
+ (<IS? ,BANDITS ,SEEN>
+ <UNMAKE ,BANDITS ,SEEN>
+ <RFALSE>)
+ (<PROB 50>
+ <RFALSE>)>
+ <MAKE ,BANDITS ,SEEN>
+ <TELL ,TAB>
+ <COND (<G? ,GOSSIP 4>
+ <TELL <PICK-NEXT ,BANDIT-MUTTERS> ,PERIOD>
+ <RTRUE>)>
+ <INC GOSSIP>
+ <COND (<EQUAL? ,GOSSIP 1>
+ <TELL
+"One of the bandits leers at you. \"Har!\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,GOSSIP 2>
+ <TELL
+"You overhear the word \"helmet\" in a conversation nearby." CR>
+ <RTRUE>)
+ (<EQUAL? ,GOSSIP 3>
+ <TELL
+"A bandit looks you up and down. \"Monster bait. Har!\"" CR>
+ <RTRUE>)>
+ <TELL
+"\"... north of the River Phee,\" whispers a bandit." CR>
+ <RTRUE>>
+
+<ROUTINE I-COOK ()
+ <COND (<NOT <HERE? IN-KITCHEN>>
+ <RFALSE>)
+ (<IS? ,COOK ,SEEN>
+ <UNMAKE ,COOK ,SEEN>
+ <RFALSE>)
+ (<PROB 75>
+ <RFALSE>)>
+ <MAKE ,COOK ,SEEN>
+ <SEE-CHARACTER ,COOK>
+ <TELL ,TAB CTHE ,COOK <PICK-NEXT ,COOK-DOINGS> ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE I-ONION-OFFER ()
+ <COND (<NOT <HERE? IN-KITCHEN>>
+ <RFALSE>)
+ (<IS? ,COOK ,SEEN>
+ <UNMAKE ,COOK ,SEEN>
+ <RFALSE>)>
+ <STOP-ONION-OFFER>
+ <TELL ,TAB CTHE ,COOK
+ "'s scowl changes to a malicious grin. \"Listen, ">
+ <BOY-GIRL>
+ <TELL
+",\" he says. \"You look like somebody who knows a great vegetable when ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "s">)>
+ <TELL
+"he sees one. You want this here onion? Okay. There's an old bottle of wine lyin' around downstairs somewhere. Bring it up to me in one piece, and "
+THE ,ONION "'s yours.\" He" ,GLANCES-AT THE ,CELLAR-DOOR
+" and shudders. \"Simple.\"" CR>
+ <RTRUE>>
+
+<GLOBAL GON:NUMBER 14> "Gondola timetable."
+
+<ROUTINE I-GONDOLA ("AUX" (RIDING 0))
+ <COND (<IN? ,WINNER ,GONDOLA>
+ <INC RIDING>)>
+ <COND (<IGRTR? GON 14>
+ <SETG GON 0>
+ <REPLACE-GLOBAL? ,AT-DOCK ,DGONDOLA ,NULL>
+ <MOVE ,GONDOLA ,AT-DOCK>
+ <MAKE ,GONDOLA ,OPENED>
+ <COND (<T? .RIDING>
+ <SETG HERE ,AT-DOCK>)
+ (<HERE? AT-DOCK>
+ <SETG P-IT-OBJECT ,GONDOLA>)
+ (T
+ <RFALSE>)>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CTHE ,GONDOLA
+" glides to a halt at " THE ,DOCK ,PTAB
+"\"All off,\" calls " THE ,CONDUCTOR " as the hatch swings open. ">
+ <PRINT
+"\"Thank you for riding the Miznia Jungle Skyway">
+ <TELL ". Please exit the Skycar in an orderly manner.\"" CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 1>
+ <COND (<NOT <HERE? AT-DOCK>>
+ <RFALSE>)>
+ <TELL ,TAB "The last few " 'PASSENGERS
+ " are shuffling out of " THE ,GONDOLA>
+ <COND (<T? .RIDING>
+ <TELL
+". \"All off, please,\" repeats " THE ,CONDUCTOR ", meaning you">)>
+ <TELL ,PERIOD>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 2>
+ <COND (<NOT <HERE? AT-DOCK>>
+ <RFALSE>)>
+ <TELL ,TAB>
+ <COND (<T? .RIDING>
+ <MOVE ,PLAYER ,AT-DOCK>
+ <MAKE ,GONDOLA ,NODESC>
+ <SETG P-WALK-DIR <>>
+ <PRINT
+"\"Thank you for riding the Miznia Jungle Skyway">
+ <TELL
+",\" growls " THE ,CONDUCTOR ", pushing you out of " THE ,GONDOLA>
+ <RELOOK>)>
+ <TELL
+"Eager " 'PASSENGERS " surge into the emptied " 'GONDOLA
+". \"All aboard, please,\" announces " THE ,CONDUCTOR " unnecessarily." CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 3>
+ <UNMAKE ,GONDOLA ,OPENED>
+ <COND (<T? .RIDING>)
+ (<NOT <HERE? AT-DOCK>>
+ <RFALSE>)>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB
+"\"Stay clear of the door, please,\" calls " THE ,CONDUCTOR
+" as the last few " 'PASSENGERS " squeeze into " THE ,GONDOLA ,PERIOD>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 4>
+ <MOVE ,GONDOLA ,OVER-JUNGLE>
+ <REPLACE-GLOBAL? ,AT-DOCK ,NULL ,DGONDOLA>
+ <COND (<T? .RIDING>
+ <SETG P-WALK-DIR <>>
+ <SETG OLD-HERE <>>
+ <SETG HERE ,OVER-JUNGLE>)
+ (<HERE? AT-DOCK>
+ <SETG P-IT-OBJECT ,DGONDOLA>)
+ (T
+ <RFALSE>)>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CTHE ,GONDOLA
+" slides away from the dock and glides west, high over " THE ,JUNGLE ,PTAB
+"\"Welcome to the Miznia Jungle Skyway.\" drawls " THE ,CONDUCTOR
+", his voice heavy with boredom." CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 5>
+ <REPLACE-GLOBAL? ,AT-DOCK ,DGONDOLA ,NULL>
+ <REPLACE-GLOBAL? ,NW-SUPPORT ,NULL ,DGONDOLA>
+ <REPLACE-GLOBAL? ,NW-UNDER ,NULL ,DGONDOLA>
+ <REPLACE-GLOBAL? ,OVER-JUNGLE ,DOCK ,SUPPORT>
+ <PUTP ,NW-UNDER ,P?OVERHEAD ,DGONDOLA>
+ <COND (<HERE? AT-DOCK>
+ <GONDOLA-GONE ,W?WEST>
+ <RTRUE>)
+ (<HERE? NW-SUPPORT NW-UNDER>
+ <VIEWGLIDE ,NW-UNDER ,W?EAST>
+ <RTRUE>)
+ (<ZERO? .RIDING>
+ <RFALSE>)>
+ <WINDOW ,SHOWING-ROOM>
+ <SETG P-IT-OBJECT ,SUPPORT>
+ <TELL ,TAB CTHE ,GONDOLA
+" glides over " THE ,JUNGLE ", towards a tall " 'SUPPORT ,PTAB
+"\"The jungles of Miznia are the spawning grounds of the deadly " 'WORM
+",\" drones " THE ,CONDUCTOR
+". \"Often mistaken for a mossy boulder, the " 'WORM
+"'s fangs extend up to 32 inches during an attack.\"|
+ \"Oooh,\" murmurs the crowd." CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 6>
+ <MOVE ,GONDOLA ,NW-SUPPORT>
+ <COND (<HERE? NW-SUPPORT>
+ <GLIDING>)
+ (<ZERO? .RIDING>
+ <RFALSE>)
+ (T
+ <GLIDE-PAST ,NW-SUPPORT>)>
+ <TELL ,TAB
+"\"The tower to your right is one of several erected to elevate the Skyway above the treetops,\" explains " THE ,CONDUCTOR
+". \"Before the Skyway opened in 882 GUE, an average of twenty Miznia Jungle Train passengers died of wormbite each year.\"|
+ The crowd giggles nervously." CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 7>
+ <MOVE ,GONDOLA ,OVER-JUNGLE>
+ <COND (<T? .RIDING>
+ <SETG HERE ,OVER-JUNGLE>)
+ (<HERE? NW-SUPPORT>
+ <SETG P-IT-OBJECT ,DGONDOLA>)
+ (T
+ <RFALSE>)>
+ <TURNS ,W?SOUTH>
+ <COND (<ZERO? .RIDING>
+ <RTRUE>)>
+ <TELL ,TAB
+"\"The jungle is a rich source of exciting stories,\" continues "
+THE ,CONDUCTOR ", stifling a yawn. \"The most famous is the Legend of the Crocodile's Tear.\"" CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 8>
+ <REPLACE-GLOBAL? ,NW-SUPPORT ,DGONDOLA ,NULL>
+ <REPLACE-GLOBAL? ,NW-UNDER ,DGONDOLA ,NULL>
+ <PUTP ,NW-UNDER ,P?OVERHEAD ,SUPPORT>
+ <REPLACE-GLOBAL? ,SW-SUPPORT ,NULL ,DGONDOLA>
+ <REPLACE-GLOBAL? ,SW-UNDER ,NULL ,DGONDOLA>
+ <PUTP ,SW-UNDER ,P?OVERHEAD ,DGONDOLA>
+ <COND (<HERE? NW-SUPPORT NW-UNDER>
+ <SETG P-IT-OBJECT ,NOT-HERE-OBJECT>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CTHE ,GONDOLA
+" glides southward, and is soon out of sight." CR>
+ <RTRUE>)
+ (<HERE? SW-SUPPORT SW-UNDER>
+ <VIEWGLIDE ,SW-UNDER ,W?NORTH>
+ <RTRUE>)
+ (<ZERO? .RIDING>
+ <RFALSE>)>
+ <JUNGLE-GLIDE>
+ <TELL ,TAB
+"\"The Crocodile's Tear is a sapphire of extraordinary size and clarity. It was discovered by a slave working the granola mines of Antharia, who died bringing it to the surface.\"" CR>
+ <TELL ,TAB "Another " 'SUPPORT " is approaching." CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 9>
+ <MOVE ,GONDOLA ,SW-SUPPORT>
+ <COND (<HERE? SW-SUPPORT>
+ <GLIDING>)
+ (<ZERO? .RIDING>
+ <RFALSE>)
+ (T
+ <GLIDE-PAST ,SW-SUPPORT>)>
+ <TELL ,TAB
+"\"After passing through many hands, including those of Thaddium Fzort\" (\"Bless you,\" mutters a passenger), \"the jewel came into the possession of the evil sorceress Y'Syska, whose collection of gems and minerals is still without peer.\"" CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 10>
+ <MOVE ,GONDOLA ,OVER-JUNGLE>
+ <COND (<T? .RIDING>
+ <SETG HERE ,OVER-JUNGLE>)
+ (<HERE? SW-SUPPORT>
+ <SETG P-IT-OBJECT ,DGONDOLA>)
+ (T
+ <RFALSE>)>
+ <TURNS ,W?EAST>
+ <COND (<ZERO? .RIDING>
+ <RTRUE>)>
+ <TELL ,TAB
+"\"Flash photography is prohibited,\" growls " THE ,CONDUCTOR
+" as a passenger snaps a picture of the hazy landscape." CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 11>
+ <REPLACE-GLOBAL? ,SW-SUPPORT ,DGONDOLA ,NULL>
+ <REPLACE-GLOBAL? ,SW-UNDER ,DGONDOLA ,NULL>
+ <PUTP ,SW-UNDER ,P?OVERHEAD ,SUPPORT>
+ <REPLACE-GLOBAL? ,SE-SUPPORT ,NULL ,DGONDOLA>
+ <REPLACE-GLOBAL? ,SE-UNDER ,NULL ,DGONDOLA>
+ <PUTP ,SE-UNDER ,P?OVERHEAD ,DGONDOLA>
+ <COND (<HERE? SW-SUPPORT SW-UNDER>
+ <GONDOLA-GONE ,W?EAST>
+ <RTRUE>)
+ (<HERE? SE-SUPPORT SE-UNDER>
+ <VIEWGLIDE ,SE-UNDER ,W?WEST>
+ <RTRUE>)
+ (<ZERO? .RIDING>
+ <RFALSE>)>
+ <JUNGLE-GLIDE>
+ <TELL ,TAB
+"\"To protect the Crocodile's Tear from thieves, Y'Syska concealed it somewhere in the jungle below,\" concludes " THE ,CONDUCTOR
+" lamely. \"There it remains to this very day, guarded by bloodworms and whatever traps the sorceress laid to confound the unwary.\"" CR>
+ <TELL ,TAB "Another " 'SUPPORT " looms to the east." CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 12>
+ <MOVE ,GONDOLA ,SE-SUPPORT>
+ <COND (<HERE? SE-SUPPORT>
+ <GLIDING>)
+ (<ZERO? .RIDING>
+ <RFALSE>)
+ (T
+ <GLIDE-PAST ,SE-SUPPORT>)>
+ <TELL ,TAB "\"Thirsty?\" asks " THE ,CONDUCTOR
+ ". \"Stop by ">
+ <PRINT "the Skyway Adventure Emporium for a ">
+ <TELL "tall, frosty Granola Float.\" He smacks his lips dispiritedly. \"Mmm, so good.\"" CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 13>
+ <MOVE ,GONDOLA ,OVER-JUNGLE>
+ <COND (<T? .RIDING>
+ <SETG HERE ,OVER-JUNGLE>)
+ (<NOT <HERE? SE-SUPPORT>>
+ <RFALSE>)>
+ <TURNS ,W?NORTH>
+ <COND (<ZERO? .RIDING>
+ <RTRUE>)>
+ <TELL ,TAB
+"\"Bloodworms are not the only inhabitants of the Miznia jungle,\" remarks "
+THE ,CONDUCTOR ", pausing to stretch. \"Survivors have reported a wide variety of birds, reptiles and other unclassifiable dangers.\"" CR>
+ <RTRUE>)
+
+ (<EQUAL? ,GON 14>
+ <REPLACE-GLOBAL? ,SE-SUPPORT ,DGONDOLA ,NULL>
+ <REPLACE-GLOBAL? ,OVER-JUNGLE ,SUPPORT ,DOCK>
+ <REPLACE-GLOBAL? ,SE-UNDER ,DGONDOLA ,NULL>
+ <PUTP ,SW-UNDER ,P?OVERHEAD ,SUPPORT>
+ <REPLACE-GLOBAL? ,AT-DOCK ,NULL ,DGONDOLA>
+ <COND (<HERE? SE-SUPPORT SE-UNDER>
+ <GONDOLA-GONE ,W?NORTH>
+ <RTRUE>)
+ (<HERE? AT-DOCK>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CA ,GONDOLA ,SIS>
+ <PRINT "approaching from the south.|">
+ <RTRUE>)
+ (<ZERO? .RIDING>
+ <RFALSE>)>
+ <JUNGLE-GLIDE>
+ <TELL ,TAB "\"Be sure to visit ">
+ <PRINT "the Skyway Adventure Emporium for a ">
+ <TELL
+"thrilling selection of one-of-a-kind gift ideas,\" urges " THE ,CONDUCTOR
+" as " THE ,DOCK " appears to the north." CR>
+ <RTRUE>)
+ (T
+ ; <SAY-ERROR "I-GONDOLA">
+ <RFALSE>)>>
+
+<ROUTINE GONDOLA-GONE (WRD)
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CTHE ,GONDOLA
+ " disappears to the " B .WRD ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE TURNS (WRD)
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CTHE ,GONDOLA " turns and glides " B .WRD
+ ", away from " THE ,SUPPORT ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE VIEWGLIDE (RM WRD)
+ <SETG P-IT-OBJECT ,DGONDOLA>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CA ,GONDOLA " glides into view ">
+ <COND (<EQUAL? .RM ,HERE>
+ <TELL "overhead." CR>
+ <RTRUE>)>
+ <TELL "from the " B .WRD ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE GLIDING ()
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CTHE ,GONDOLA
+" glides smoothly past, just a few feet away." CR>
+ <RTRUE>>
+
+<ROUTINE GLIDE-PAST (RM)
+ <SETG HERE .RM>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CTHE ,GONDOLA
+" is gliding just a few feet from the top of " THE ,SUPPORT ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE JUNGLE-GLIDE ()
+ <WINDOW ,SHOWING-ROOM>
+ <SETG P-IT-OBJECT ,SUPPORT>
+ <TELL ,TAB CTHE ,GONDOLA " glides across "
+ THE ,JUNGLE ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE I-PHASE ("AUX" L)
+ <COND (<IS? ,PHASE ,SEEN> ; "1-move delay."
+ <UNMAKE ,PHASE ,SEEN>
+ <RFALSE>)
+ (<NOT <IS? ,PHASE ,NODESC>>
+ <RFALSE>)
+ (<VISIBLE? ,PHASE>
+ <UNMAKE ,PHASE ,NODESC>
+ <SETG P-IT-OBJECT ,PHASE>
+ <WINDOW ,SHOWING-ALL>
+ <SET L <LOC ,PHASE>>
+ <TELL ,TAB CTHE ,PHASE>
+ <COND (<EQUAL? .L ,PLAYER>
+ <TELL ,SIN 'HANDS "s">)
+ (<EQUAL? .L ,HERE>
+ <TELL ,SON>
+ <COND (<IS? ,HERE ,INDOORS>
+ <TELL THE ,FLOOR>)
+ (T
+ <TELL THE ,GROUND>)>)
+ (<IS? .L ,CONTAINER>
+ <TELL ,SIN THE .L>)
+ (<IS? .L ,SURFACE>
+ <TELL ,SON THE .L>)>
+ <TELL " reappears at the edge of your vision." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE I-OWOMAN ()
+ <COND (<NOT <IN? ,OWOMAN ,HERE>>
+ <RFALSE>)
+ (<IS? ,OWOMAN ,SEEN>
+ <UNMAKE ,OWOMAN ,SEEN>
+ <RFALSE>)
+ (<PROB 50>
+ <RFALSE>)>
+ <SETG P-HER-OBJECT ,OWOMAN>
+ <MAKE ,OWOMAN ,SEEN>
+ <TELL ,TAB ,CTHELADY <PICK-NEXT ,OWOMAN-MOVES> THE ,MCASE ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE I-MIRRORS ("AUX" (V 0) HEAR L OBJ CNT TIME LEN)
+ <SET HEAR <GRUE-ROOM?>>
+ <SET LEN <GET ,MIRROR-LIST 0>>
+ <SET CNT 7>
+ <REPEAT ()
+ <SET OBJ <GET ,MIRROR-LIST .LEN>>
+ <SET L <LOC .OBJ>>
+ <COND (<T? .L>
+ <SET TIME <GETP .OBJ ,P?SIZE>>
+ <COND (<DLESS? TIME 1>
+ <DEC CNT>
+ <COND (<EQUAL? .L ,HERE>
+ <INC V>
+ <TELL ,TAB>
+ <SAY-MIRROR-POPS .OBJ>)
+ (<T? .HEAR>
+ <INC V>
+ <TELL ,TAB "A distant ">
+ <ITALICIZE "pop">
+ <TELL " echoes down the passageway." CR>)>
+ <DESTROY-MIRROR .OBJ>)
+ (T
+ <PUTP .OBJ ,P?SIZE .TIME>
+ <COND (<AND <EQUAL? .L ,HERE>
+ <EQUAL? .TIME 2 10 18>>
+ <INC V>
+ <TELL ,TAB>
+ <SETG P-IT-OBJECT .OBJ>
+ <TELL CTHE .OBJ>
+ <COND (<EQUAL? .TIME 2>
+ <TELL " is flexing dangerously now">
+ <PRINT
+". It probably won't last much longer.|">)
+ (<EQUAL? .TIME 10>
+ <TELL
+" shimmers uncertainly for a moment." CR>)
+ (T
+ <TELL
+" billows slightly, then stabilizes." CR>)>)>)>)
+ (T
+ <DEC CNT>)>
+ <COND (<DLESS? LEN 1>
+ <RETURN>)>>
+ <COND (<ZERO? .CNT>
+ <DEQUEUE ,I-MIRRORS>)>
+ <RETURN .V>>
+
+<ROUTINE SAY-MIRROR-POPS (OBJ)
+ <ITALICIZE "Pop">
+ <TELL "! " CTHE .OBJ " disappears in a silver spray." CR>
+ <RTRUE>>
+
+<ROUTINE DESTROY-MIRROR (OBJ "AUX" L)
+ <COND (<EQUAL? .OBJ <> ,NO-MIRROR>
+ <RFALSE>)>
+ <SET L <LOC .OBJ>>
+ <PUTP .OBJ ,P?MIRROR-DIR ,NO-MIRROR>
+ <PUTP .OBJ ,P?SIZE 0>
+ <REMOVE .OBJ>
+ <COND (<EQUAL? .L ,HERE>
+ <WINDOW ,SHOWING-ROOM>)>
+ <COND (<EQUAL? <GETP .L ,P?MIRROR-OBJ> .OBJ>
+ <PUTP .L ,P?MIRROR-OBJ ,NO-MIRROR>
+ <REFLECTIONS>)>
+ <RFALSE>>
+
+"Returns direction mirror is facing (1/3/5/7)."
+
+<ROUTINE CREATE-MIRROR? (OBJ "AUX" DIR)
+ <WINDOW ,SHOWING-ROOM>
+ <MOVE .OBJ ,HERE>
+ <SETG P-IT-OBJECT .OBJ>
+ <SET DIR <BOR <RANDOM 7> 1>>
+ <PUTP .OBJ ,P?MIRROR-DIR .DIR>
+ <PUTP .OBJ ,P?SIZE ,MIRROR-LIFE>
+ <COND (<NOT <QUEUED? ,I-MIRRORS>>
+ <QUEUE ,I-MIRRORS>)>
+ <RETURN .DIR>>
+
+<GLOBAL URSCRIPT:NUMBER 0>
+
+<ROUTINE I-URGRUE ("AUX" (SEE 0))
+ <COND (<NOT <HERE? IN-LAIR>>
+ <RFALSE>)
+ (<OR <T? ,LIT?>
+ <WEARING-MAGIC? ,HELM>>
+ <INC SEE>)>
+ <MAKE ,URGRUE ,SEEN>
+ <TELL ,TAB>
+ <COND (<IS? ,URGRUE ,SURPRISED>
+ <UNMAKE ,URGRUE ,SURPRISED>
+ <COND (<NOT <IS? ,URGRUE ,IDENTIFIED>>
+ <MAKE ,URGRUE ,IDENTIFIED>
+ <COND (<T? .SEE>
+ <TELL "As you glance around the chamber, "
+ THE ,URGRUE " yawns and stretches">)
+ (T
+ <TELL ,YOU-HEAR>
+ <PRINT "a voice in the darkness">
+ <TELL " yawn">)>
+ <TELL ". \"At last we meet.\"" CR>
+ <RTRUE>)>
+ <TELL "\"" <PICK-NEXT ,URGRUE-GREETS>
+ ",\" chuckles ">
+ <COND (<T? .SEE>
+ <TELL THE ,URGRUE>)
+ (T
+ <PRINT "a voice in the darkness">)>
+ <COND (<L? ,URSCRIPT 2>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <TELL
+". \"Now where were we? Ah, yes. We were deciding how best to destroy you.\"" CR>
+ <RTRUE>)>
+ <COND (<IGRTR? URSCRIPT 4>
+ <TIMESTOP>
+ <RTRUE>)
+ (<EQUAL? ,URSCRIPT 4>
+ <TELL "\"I know!\" cries " THE ,URGRUE
+" with delight. \"Girgol, the Time Stop spell! Love it. You'll make a hilarious statue.\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,URSCRIPT 3>
+ <TELL CTHE ,URGRUE
+" mutters thoughtfully to itself. \"Let's see, now. A spell. Cleesh? No; too silly. Espnis? Hmm. Better not; ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "s">)>
+ <TELL "he might snore.\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,URSCRIPT 2>
+ <TELL "\"An interesting question,\" continues " THE ,URGRUE
+ " conversationally, \"is ">
+ <ITALICIZE "how">
+ <TELL
+" to destroy you. Not a trivial decision, no. I must select a spell that will enhance my image, a Magick worthy of my thoroughly evil reputation.\"" CR>
+ <RTRUE>)>
+
+ <TELL CTHE ,URGRUE
+"'s chuckling subsides. \"I rarely get visitors,\" it admits in a wistful tone. \"A pity I have to destroy you.\"" CR>
+ <RTRUE>>
+
+<GLOBAL ARCHTIMER:NUMBER 0>
+
+<ROUTINE I-ARCH3 ()
+ <INC ARCHTIMER>
+ <TELL ,TAB>
+ <COND (<EQUAL? ,ARCHTIMER 1>
+ <TELL CTHE ,ORATOR " stills " THE ,PCROWD
+" with a wave of his hand.|
+ \"Our fathers built this city at the Place Where the Great Waters
+Meet,\" he cries. \"The right to name the One River belongs to us!\"" CR
+,TAB CTHE ,PCROWD " roars its approval." CR>
+ <RTRUE>)
+ (<EQUAL? ,ARCHTIMER 2>
+ <TELL
+"\"The infidels from the east control the One River's mouth,\" continues "
+THE ,ORATOR ". \"But we, who dwell at the joining of the Rivers Phee and Bor, WE control the source!\" " CTHE ,PCROWD " whistles. \"As the daughter takes the name of the father, so shall the One River be known by the place of its birth!\"" CR ,TAB "\"">
+ <ITALICIZE "Pheebor">
+ <TELL "!\" roars " THE ,PCROWD
+". \"Hail the River Pheebor!\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,ARCHTIMER 3>
+ <WINDOW ,SHOWING-ROOM>
+ <REMOVE ,ORATOR>
+ <SETG QCONTEXT <>>
+ <SETG QCONTEXT-ROOM <>>
+ <SETG P-HIM-OBJECT ,NOT-HERE-OBJECT>
+ <TELL "\"Phee-bor! Phee-bor!\" chants " THE ,PCROWD ,PTAB>
+ <TELL "\"We have no quarrel with the city to the east,\" claims " THE ,ORATOR " (amid shouts to the contrary). \"But if they continue to slight our heritage with the wretched name ">
+ <ITALICIZE "Borphee">
+ <TELL "\" (the crowd hisses), \"we shall smite them from the face of the land!\"" CR ,TAB CTHE ,PCROWD
+" goes wild, and carries " THE ,ORATOR " away on its shoulders." CR>
+ <RTRUE>)>
+ <WINDOW ,SHOWING-ROOM>
+ <DEQUEUE ,I-ARCH3>
+ <REMOVE ,PCROWD>
+ <SETG P-THEM-OBJECT ,NOT-HERE-OBJECT>
+ <TELL CTHE ,PCROWD " disperses, and you're left alone." CR>
+ <RTRUE>>
+
+<ROUTINE I-ARCH4 ()
+ <INC ARCHTIMER>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB>
+ <COND (<EQUAL? ,ARCHTIMER 1>
+ <MOVE ,HORSE ,HERE>
+ <SEE-CHARACTER ,PRINCE>
+ <SETG P-IT-OBJECT ,HELM>
+ <TELL
+"A magnificent gray stallion appears amid the smoke. Its rider is a tall, proud man wearing a fabulous helmet." CR>
+ <RTRUE>)
+ (<EQUAL? ,ARCHTIMER 2>
+ <MOVE ,BHORSE ,HERE>
+ <TELL
+"Another stallion, black as night, races out of the smoke. Its rider's armor gleams red in the firelight.|
+ \"At last we meet, Prince Foo,\" snarls the newcomer.|
+ The man on the gray stallion regards him coolly. \"Begone, thou eastern fop!\" he cries. \"Never shall the River Pheebor yield its sacred name!\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,ARCHTIMER 3>
+ <SETG QCONTEXT <>>
+ <SETG QCONTEXT-ROOM <>>
+ <REMOVE ,BHORSE>
+ <MAKE ,PRINCE ,SLEEPING>
+ <MOVE ,PRINCE ,HERE>
+ <MOVE ,HELM ,TRENCH>
+ <PUTP ,PRINCE ,P?ACTION ,DEAD-PRINCE-F>
+ <REPLACE-SYN? ,PRINCE ,W?ZZZP ,W?HEAD>
+ <REPLACE-SYN? ,PRINCE ,W?ZZZP ,W?BODY>
+ <REPLACE-SYN? ,PRINCE ,W?ZZZP ,W?CORPSE>
+ <REPLACE-ADJ? ,PRINCE ,W?ZZZP ,W?DEAD>
+ <TELL
+"The black rider draws a gleaming sword from his scabbard and cuts off the prince's head, which rolls into the trench.|
+ \"The reign of Pheebor is ended!\" cries the black knight, galloping off into the smoke. \"Foo is dead! The age of Borphee is begun!\"|
+ The gray stallion nudges the prince's body, and whinnies softly." CR>
+ <RTRUE>)>
+ <DEQUEUE ,I-ARCH4>
+ <COND (<NOT <IN? ,HORSE ,TRENCH>>
+ <TELL ,XA>
+ <SLAY-HORSE>
+ <TELL ,TAB>)>
+ <TELL
+"Cries of \"Foo is dead! The war is over!\" drift through the smoke. Tattered men race past; the cries grow faint; and soon all is still as death." CR>
+ <RTRUE>>
+
+<ROUTINE I-GLASS ("AUX" V)
+ <SET V <VISIBLE? ,GLASS>>
+ <INC GLASS-BOT>
+ <COND (<DLESS? GLASS-TOP 1>
+ <DEQUEUE ,I-GLASS>
+ <COND (<ZERO? .V>
+ <RFALSE>)>
+ <TELL ,TAB
+"The last grains of sand fall through " THE ,GLASS ,PERIOD>
+ <ARCH-OFF>
+ <RTRUE>)
+ (<ZERO? .V>
+ <RFALSE>)
+ (<EQUAL? ,GLASS-TOP 2 4>
+ <RFALSE>)>
+ <TELL ,TAB>
+ <COND (<EQUAL? ,GLASS-TOP 1>
+ <TELL "The top half of " THE ,GLASS
+ " is almost empty." CR>
+ <RTRUE>)>
+ <TELL "Sand continues to trickle through " THE ,GLASS ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE I-HUNTERS ()
+ <COND (<NOT <HERE? IN-PASTURE>>
+ <RFALSE>)
+ (<NOT <IN? ,HUNTERS ,IN-PASTURE>>
+ <SETG HSCRIPT 0>
+ <QUEUE ,I-HUNT>
+ <MOVE ,HUNTERS ,IN-PASTURE>
+ <MAKE ,HUNTERS ,SEEN>
+ <SEE-CHARACTER ,HUNTERS>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL
+" A distant movement catches your eye. Peering between the oaks, you see men foraging at the pasture's edge. They look like hunters." CR>
+ <RTRUE>)
+ (<IS? ,HUNTERS ,SEEN>
+ <UNMAKE ,HUNTERS ,SEEN>
+ <RFALSE>)
+ (<PROB 50>
+ <RFALSE>)>
+ <MAKE ,HUNTERS ,SEEN>
+ <TELL " The distant " 'HUNTERS
+ <PICK-NEXT ,HUNTER-DOINGS> ,PERIOD>
+ <RTRUE>>
+
+<GLOBAL HSCRIPT:NUMBER 0>
+
+<ROUTINE I-HUNT ()
+ <COND (<NOT <HERE? IN-PASTURE>>
+ <RFALSE>)>
+ <INC HSCRIPT>
+ <MAKE ,HUNTERS ,SEEN>
+ <TELL ,TAB>
+ <COND (<EQUAL? ,HSCRIPT 1>
+ <MOVE ,MINX ,OAK>
+ <MOVE ,TRACKS ,HERE>
+ <WINDOW ,SHOWING-ROOM>
+ <SETG P-HER-OBJECT ,MINX>
+ <SETG P-IT-OBJECT ,MINX>
+ <TELL "\"Come back 'ere, you!\"" CR ,TAB>
+ <ITALICIZE "Whoosh">
+ <TELL "! A golden bundle of fur jumps out of the forest! It bounds across the snow in quick, desperate leaps, ducks behind the trunk of "
+A ,OAK>
+ <PRINT " and disappears from view.|">
+ <TELL ,TAB
+"\"I'll wring yer li'l neck,\" promises an angry voice." CR>
+ <COND (<ZERO? ,DMODE>
+ <RELOOK T>)>
+ <RTRUE>)
+ (<EQUAL? ,HSCRIPT 2>
+ <TELL
+"\"I see yer dirty tracks, ye pest!\" The angry voice is getting much closer." CR>
+ <RTRUE>)
+ (<EQUAL? ,HSCRIPT 3>
+ <MOVE ,HUNTER ,IN-PASTURE>
+ <WINDOW ,SHOWING-ROOM>
+ <SEE-CHARACTER ,HUNTER>
+ <TELL "\"Show yerself, ye flea-bit mop!\"" CR ,TAB
+"A young man strides out of the woods, an angry scowl on his windburned face">
+ <COND (<IN? ,TRACKS ,HERE>
+ <REMOVE ,TRACKS>
+ <TELL " as he follows the tracks in the snow." CR>
+ <HUNTER-SEES-MINX>
+ <RTRUE>)>
+ <TELL "... and a nasty-looking whip in his hands" ,PTAB>
+ <TELL "\"Yo, ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "ma'am">)
+ (T
+ <TELL "sir">)>
+ <TELL
+"!\" he cries, drawing closer. \"Lost a minx 'ereabouts! Came this way, if th' trail speaks truly.\"|
+ Something behind " THE ,OAK " whimpers softly." CR>
+ <RTRUE>)
+ (<EQUAL? ,HSCRIPT 4>
+ <TELL
+"The lad surveys the pasture impatiently. \"Blasted crayture,\" he mutters with a practiced crack of the whip. \"One o' me best. 'Twould be a shame to lose 'er.\"|
+ The beast behind " THE ,OAK " makes itself as small as possible." CR>
+ <RTRUE>)
+ (<EQUAL? ,HSCRIPT 5>
+ <DEQUEUE ,I-HUNT>
+ <SETG HSCRIPT 0>
+ <REMOVE ,HUNTER>
+ <UNMAKE ,HUNTERS ,SEEN>
+ <SETG P-HIM-OBJECT ,NOT-HERE-OBJECT>
+ <WINDOW ,SHOWING-ROOM>
+ <MOVE ,MINX ,IN-PASTURE>
+ <UNMAKE ,MINX ,TRYTAKE>
+ <UNMAKE ,MINX ,NOALL>
+ <MAKE ,MINX ,TAKEABLE>
+ <QUEUE ,I-MINX>
+ <SEE-CHARACTER ,MINX>
+ <TELL
+"\"Hide from me, will ye, ye snufflin' she-devil!\" cries " THE ,HUNTER
+" striding back into the forest. \"It's to the hounds I'll be throwin' yer bleedin' carcass!\" His curses soon ">
+ <PRINT "fade into the distance.|">
+ <TELL ,TAB CTHE ,MINX
+" pokes its nose out from behind " THE ,OAK ", sniffing fearfully. It peeks around " THE ,GCORNER ", and its brown eyes lock with yours" ,PTAB
+"\"Minx?\"" CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE I-MINX ("AUX" L NL PL PLL V TBL DIR X TYPE)
+ <SET L <LOC ,MINX>>
+ <COND (<OR <ZERO? .L>
+ <NOT <IS? ,MINX ,LIVING>>>
+ <DEQUEUE ,I-MINX>
+ <RFALSE>)>
+ <SET V <VISIBLE? ,MINX>>
+ <COND (<IS? ,MINX ,SLEEPING>
+ <COND (<ZERO? .V>
+ <RFALSE>)>
+ <COND (<IS? ,MINX ,SEEN>
+ <UNMAKE ,MINX ,SEEN>
+ <RFALSE>)
+ (<PROB 50>
+ <RFALSE>)>
+ <MINXTAB>
+ <TELL CTHE ,MINX <PICK-NEXT ,MINX-SLEEPS> ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? .L ,PLAYER>
+ <MINXTAB>
+ <COND (<IN? ,TRUFFLE .L>
+ <MINX-EATS-TRUFFLE>
+ <RTRUE>)>
+ <TELL CTHE ,MINX>
+ <COND (<BAD-MINX-PLACE? ,HERE>
+ <SET X ,MINX-NERVES>
+ <COND (<PROB 33>
+ <SET X ,MINX-RESTLESS>)>
+ <TELL <PICK-NEXT .X> ,PERIOD>
+ <RTRUE>)
+ (<IS? ,MINX ,TOUCHED>
+ <UNMAKE ,MINX ,TOUCHED>
+ <MAKE ,MINX ,TRYTAKE>
+ <TELL <PICK-NEXT ,MINX-SETTLES>
+ " in your arms." CR>
+ <RTRUE>)
+ (<IS? ,MINX ,TRYTAKE>
+ <UNMAKE ,MINX ,TRYTAKE>
+ <TELL <PICK-NEXT ,MINX-RESTLESS> ,PERIOD>
+ <RTRUE>)>
+ <WINDOW ,SHOWING-ALL>
+ <PRINTC ,SP>
+ <COND (<PROB 50>
+ <SAY-LEAP>
+ <TELL "s ">
+ <COND (<PROB 50>
+ <TELL "out of your ">
+ <COND (<PROB 50>
+ <TELL "arms ">)
+ (T
+ <TELL "grasp ">)>)
+ (T
+ <TELL "free ">)>)
+ (T
+ <TELL "frees itself ">
+ <COND (<PROB 50>
+ <TELL "with a ">
+ <COND (<PROB 50>
+ <COND (<PROB 50>
+ <TELL "sudden ">)
+ (T
+ <TELL "quick ">)>)>
+ <SAY-LEAP>
+ <PRINTC ,SP>)>)>
+ <TELL "and ">
+ <FALLS ,MINX>
+ <RTRUE>)>
+ <UNMAKE ,MINX ,TOUCHED>
+ <UNMAKE ,MINX ,TRYTAKE>
+ <SET PL <LOC ,PLAYER>>
+ <COND (<EQUAL? .L .PL>
+ <COND (<IS? ,MINX ,SEEN>
+ <UNMAKE ,MINX ,SEEN>
+ <RFALSE>)
+ (<AND <NOT <IN? ,TRUFFLE .L>>
+ <PROB 80>>
+ <RFALSE>)>
+ <MINXTAB>
+ <COND (<ZERO? ,LIT?>
+ <TELL "Something" <PICK-NEXT ,DARK-MINXES> ,PERIOD>
+ <RTRUE>)
+ (<AND <EQUAL? .L ,ARCH ,ARCH4 ,ARCH12>
+ <IN? ,TRUFFLE ,TRENCH>>
+ <UNMAKE ,MINX ,SEEN>
+ <COND (<HERE? ARCH12>
+ <COND (<IS? ,TRENCH ,NODESC>
+ <DIG-UP-TRENCH>
+ <RTRUE>)>
+ <MINX-EATS-TRUFFLE>
+ <RTRUE>)>
+ <SET X ,ARCH-SNIFFS>
+ <COND (<HERE? ARCH4>)
+ (<PROB 25>
+ <SET X ,MINX-DOINGS>)>
+ <TELL CTHE ,MINX <PICK-NEXT .X> ,PERIOD>
+ <RTRUE>)
+ (<IN? ,TRUFFLE .L>
+ <MINX-EATS-TRUFFLE>
+ <RTRUE>)
+ (<LOC ,TRUFFLE>)
+ (<DIG-UP-TRUFFLE? .L>
+ <RTRUE>)>
+ <TELL CTHE ,MINX <PICK-NEXT ,MINX-DOINGS> ,PERIOD>
+ <RTRUE>)
+ (<AND <IS? .PL ,VEHICLE>
+ <IN? .PL .L>>
+ <MOVE ,MINX .PL>
+ <MINXTAB>
+ <COND (<ZERO? ,LIT?>
+ <TELL "Something furry">)
+ (T
+ <WINDOW ,SHOWING-ROOM>
+ <TELL CTHE ,MINX>)>
+ <TELL " joins you">
+ <ON-IN .PL>
+ <TELL ,PERIOD>
+ <RTRUE>)
+ (<OR <IS? .L ,SURFACE>
+ <IS? .L ,CONTAINER>>
+ <SET NL <LOC .L>>
+ <COND (<OR <BAD-MINX-PLACE? .NL>
+ <AND <IS? .L ,CONTAINER>
+ <NOT <IS? .L ,OPENED>>>>
+ <COND (<VISIBLE? .L>
+ <MINXTAB>
+ <COND (<AND <IS? .L ,TRANSPARENT>
+ <T? ,LIT?>>
+ <TELL CTHE ,MINX>)
+ (T
+ <TELL "Something">)>
+ <COND (<IN? ,TRUFFLE .L>
+ <WINDOW %<+ ,SHOWING-ROOM
+ ,SHOWING-INV>>
+ <REMOVE ,TRUFFLE>
+ <TELL " is eating " B ,W?SOMETHING>)
+ (T
+ <TELL " moves restlessly">)>
+ <ON-IN .L>
+ <TELL ,PERIOD>
+ <RTRUE>)
+ (<IN? ,TRUFFLE .L>
+ <REMOVE ,TRUFFLE>)>
+ <COND (<ZERO? .NL>
+ <REMOVE ,MINX>
+ <DEQUEUE ,I-MINX>)>
+ <RFALSE>)
+ (<ZERO? .V>
+ <MOVE ,MINX .NL>
+ <RFALSE>)>
+ <MINXTAB>
+ <COND (<ZERO? ,LIT?>
+ <TELL "Something">)
+ (<IN? ,TRUFFLE .L>
+ <MINX-EATS-TRUFFLE>
+ <RTRUE>)
+ (T
+ <WINDOW ,SHOWING-ROOM>
+ <TELL CTHE ,MINX>)>
+ <PRINTC ,SP>
+ <SAY-LEAP>
+ <TELL "s">
+ <OUT-OF-LOC .L>
+ <PRINT ,PERIOD>
+ <MOVE ,MINX .NL>
+ <RTRUE>)>
+
+ ; "Is player in a room adjacent to minx?"
+
+ <SET PLL <LOC .PL>>
+ <SET DIR ,P?NORTH>
+ <REPEAT ()
+ <SET TBL <GETP .L .DIR>>
+ <COND (<T? .TBL>
+ <SET TYPE <MSB <GET .TBL ,XTYPE>>>
+ <COND (<OR <EQUAL? .TYPE ,CONNECT ,SCONNECT ,X-EXIT>
+ <AND <EQUAL? .TYPE ,DCONNECT>
+ <IS? <GET .TBL ,XDATA> ,OPENED>>>
+ <SET NL <GET .TBL ,XROOM>>
+ <COND (<BAD-MINX-PLACE? .NL>)
+ (<EQUAL? .NL .PL .PLL>
+ <MOVE ,MINX .NL>
+ <MINXTAB>
+ <COND (<ZERO? ,LIT?>
+ <TELL ,YOU-HEAR B ,W?SOMETHING
+ " moving ">)
+ (T
+ <WINDOW ,SHOWING-ROOM>
+ <TELL CTHE ,MINX " appears ">)>
+ <COND (<EQUAL? .NL .PL>
+ <TELL "at your feet." CR>
+ <RTRUE>)>
+ <TELL "nearby." CR>
+ <RTRUE>)>)>)>
+ <COND (<DLESS? DIR ,P?DOWN>
+ <RFALSE>)>>>
+
+<ROUTINE MINXTAB ()
+ <MAKE ,MINX ,SEEN>
+ <PRINT ,TAB>
+ <RFALSE>>
+
+<ROUTINE BAD-MINX-PLACE? (RM "AUX" X)
+ <COND (<ZERO? .RM>
+ <RTRUE>)>
+ <SET X <GETB ,NO-MINX 0>>
+ <COND (<SET X <INTBL? .RM <REST ,NO-MINX 1> .X 1>>
+ <RTRUE>)
+ (<AND <EQUAL? .RM ,IN-GARDEN>
+ <G? ,PTIMER 1>>
+ <RTRUE>)
+ (<AND <EQUAL? .RM ,SADDLE>
+ <IN? ,SADDLE ,DACT>
+ <IN? ,DACT ,IN-SKY>>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE DIG-UP-TRUFFLE? (L "AUX" X)
+ <COND (<EQUAL? .L <LOC ,OAK>>
+ <SET X ,OAK>)
+ (<EQUAL? .L <LOC ,OAK2>>
+ <SET X ,OAK2>)
+ (<EQUAL? .L <LOC ,OAK3>>
+ <SET X ,OAK3>)
+ (T
+ <RFALSE>)>
+ <COND (<IS? .X ,TOUCHED>
+ <RFALSE>)>
+ <OAK-FIND .X>
+ <TELL CTHE ,MINX
+" snuffles inquisitively around the base of " THE .X
+". She scratches around the roots, nosing aside leaves and dirt, and pulls up a " D ,TRUFFLE " with a triumphant mew. ">
+ <PRINT "\"Minx! Minx! Minx!\"|">
+ <RTRUE>>
+
+<ROUTINE DIG-UP-TRENCH ()
+ <UNMAKE ,TRUFFLE ,SEEN>
+ <REMOVE ,TRUFFLE>
+ <UNMAKE ,TRUFFLE ,MUNGED>
+ <DEQUEUE ,I-TRUFFLE>
+ <SETG TRUFFLE-TIMER 0>
+ <MOVE ,TRENCH ,HERE>
+ <UNMAKE ,TRENCH ,NODESC>
+ <MAKE ,TRENCH ,OPENED>
+ <WINDOW ,SHOWING-ROOM>
+ <REPLACE-SYN? ,TRENCH ,W?ZZZP ,W?MINXHOLE>
+ <REPLACE-ADJ? ,TRENCH ,W?ZZZP ,W?MINX>
+ <TELL CTHE ,MINX>
+ <COND (<NOT <IN? ,MINX ,HERE>>
+ <MOVE ,MINX ,HERE>
+ <TELL " leaves " THE ,ARCH " and">)>
+ <TELL
+" runs its nose over the loose earth, snuffling hungrily. Then it paws a deep hole in " THE ,GROUND ", roots up a dirty truffle and swallows it whole"
+,PTAB>
+ <PRINT "\"Minx! Minx! Minx!\"|">
+ <COND (<ZERO? ,DMODE>
+ <RELOOK T>)>
+ <RTRUE>>
+
+<ROUTINE SAY-LEAP ("AUX" X)
+ <SET X <RANDOM 100>>
+ <COND (<L? .X 33>
+ <TELL B ,W?LEAP>
+ <RTRUE>)
+ (<L? .X 67>
+ <TELL B ,W?BOUND>
+ <RTRUE>)>
+ <TELL B ,W?JUMP>
+ <RTRUE>>
+
+<ROUTINE I-CORBIES ("AUX" (FEAR 0) SOUND EMOTION X)
+ <COND (<NOT <PLAIN-ROOM?>>
+ <RFALSE>)>
+ <TELL ,TAB>
+ <MAKE ,CORBIES ,SEEN>
+ <SETG P-THEM-OBJECT ,CORBIES>
+ <SET SOUND <PICK-NEXT ,CORBIE-SOUNDS>>
+ <SET EMOTION <PICK-NEXT ,MAD-CORBIES>>
+ <COND (<OR <EQUAL? <LOC ,SCARE3> ,HERE>
+ <AND <T? ,BADKEY>
+ <EQUAL? <LOC ,BADKEY> ,PLAYER ,HERE>>>
+ <INC FEAR>
+ <SET EMOTION <PICK-NEXT ,FEAR-CORBIES>>)>
+ <SET X <RANDOM 100>>
+ <COND (<L? .X 33>
+ <TELL "Corbies " .SOUND ,WITH .EMOTION
+ " overhead." CR>
+ <RTRUE>)
+ (<L? .X 67>
+ <TELL "You can hear corbies ">)
+ (T
+ <TELL "Corbies ">
+ <SET X <RANDOM 100>>
+ <COND (<OR <T? .FEAR>
+ <L? .X 33>>
+ <TELL "circle ">
+ <COND (<PROB 50>
+ <COND (<ZERO? .FEAR>
+ <TELL "low ">)
+ (T
+ <TELL "high ">)>)>)
+ (<L? .X 67>
+ <TELL "dive ">
+ <COND (<PROB 50>
+ <TELL "down from ">)
+ (T
+ <TELL "and swoop ">)>)
+ (T
+ <TELL "swoop ">
+ <COND (<PROB 50>
+ <COND (<PROB 50>
+ <TELL "low ">)
+ (T
+ <TELL "down from ">)>)>)>)>
+ <TELL "overhead, " .SOUND "ing with " .EMOTION ,PERIOD>
+ <RTRUE>>
+
+<CONSTANT RESET-GURDY 4>
+<GLOBAL GURDY-TIMER:NUMBER 0>
+
+<GLOBAL GURDY-ROOM:OBJECT <>>
+
+<ROUTINE I-COLOR ("AUX" X)
+ <COND (<DLESS? GURDY-TIMER 1>
+ <DEQUEUE ,I-COLOR>
+ <SETG GURDY-TIMER 0>
+ <UNMAKE ,ROSE-ROOM ,SEEN>
+ <SET X <GETB ,PLAIN-ROOMS 0>>
+ <REPEAT ()
+ <UNMAKE <GETB ,PLAIN-ROOMS .X> ,SEEN>
+ <COND (<DLESS? X 1>
+ <RETURN>)>>
+ <COND (<HERE? GURDY-ROOM>
+ <WINDOW ,SHOWING-ROOM>
+ <SETG GURDY-ROOM <>>
+ <TELL ,TAB "The colors in the ">
+ <ROOM-OR-LAND>
+ <TELL " fade back to normal." CR>
+ <RTRUE>)>
+ <SETG GURDY-ROOM <>>
+ <RFALSE>)
+ (<NOT <HERE? GURDY-ROOM>>
+ <RFALSE>)
+ (<EQUAL? ,GURDY-TIMER 1 3>
+ <RFALSE>)>
+ <TELL ,TAB "The heightened colors in the ">
+ <ROOM-OR-LAND>
+ <TELL " are starting to fade." CR>
+ <RTRUE>>
+
+<GLOBAL LAST-CRANK-DIR:OBJECT <>>
+
+<ROUTINE TURN-GURDY ("AUX" X)
+ <SET X ,TURN-GURDY-RIGHT>
+ <COND (<EQUAL? ,LAST-CRANK-DIR ,RIGHT>)
+ (<OR <EQUAL? ,LAST-CRANK-DIR ,LEFT>
+ <PROB 50>>
+ <SET X ,TURN-GURDY-LEFT>)>
+ <APPLY .X>
+ <RFALSE>>
+
+<ROUTINE FIND-CHAR? ("AUX" LEN OBJ)
+ <SET LEN <GET ,CHARLIST 0>>
+ <REPEAT ()
+ <SET OBJ <GET ,CHARLIST .LEN>>
+ <COND (<VISIBLE? .OBJ>
+ <RETURN .OBJ>)
+ (<DLESS? LEN 1>
+ <RETURN>)>>
+ <RETURN <FIND-IN? ,HERE ,MONSTER>>>
+
+<ROUTINE TURN-GURDY-RIGHT ("AUX" (M 0) (P 0) WHO)
+ <SET WHO <FIND-CHAR?>>
+ <COND (<ZERO? .WHO>)
+ (<IS? .WHO ,MONSTER>
+ <COND (<NOT <IS? .WHO ,SLEEPING>>
+ <INC M>)>)
+ (T
+ <INC P>)>
+ <SETG LAST-CRANK-DIR ,RIGHT>
+ <COND (<TURN-GURDY? ,W?RIGHT "violet">
+ <RTRUE>)>
+ <TELL ,TAB>
+ <COND (<ZERO? ,DPOINTER>
+ <WINDOW ,SHOWING-ALL>
+ <SETG P-WALK-DIR <>>
+ <SETG OLD-HERE <>>
+ <SETG GURDY-TIMER ,RESET-GURDY>
+ <SETG LIT? T>
+ <TELL "A rainbow of dazzling spectra">
+ <PRINT " fills the air">
+ <TELL "! It swirls and blends with the ">
+ <COND (<NOT <PLAIN-ROOM?>>
+ <COND (<HERE? GURDY-ROOM>
+ <TELL "already intense ">)>
+ <TELL "colors of the ">)
+ (T
+ <MAKE ,HERE ,SEEN>
+ <TELL "colorless ">)>
+ <ROOM-OR-LAND>
+ <COND (<HERE? GURDY-ROOM>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <SETG GURDY-ROOM ,HERE>
+ <QUEUE I-COLOR>
+ <TELL
+", creating rich, saturated hues that remind you of a postcard">
+ <COND (<T? .M>
+ <PRINT ". Unfortunately, ">
+ <TELL THE .WHO " seems unmoved by the display">)>
+ <TELL ,PERIOD>
+ <COND (<HAPPY-CHAR? .WHO>
+ <RTRUE>)
+ (<EQUAL? .WHO ,OWOMAN ,SALT>
+ <LOVELY .WHO>
+ <RTRUE>)
+ (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB CTHE .WHO " gapes at the display." CR>)>
+ <RTRUE>)
+
+ (<EQUAL? ,DPOINTER 1>
+ <TELL "Strains of soothing melody fill the air">
+ <PRINT "! You can't help but ">
+ <PRINT "close your eyes for a moment ">
+ <TELL
+"as the liquid chords swell to a glorious crescendo, then fade into silence">
+ <COND (<T? .M>
+ <TELL ". Even " THE .WHO " was not unmoved">)>
+ <TELL ,PERIOD>
+ <COND (<VISIBLE? ,DACT>
+ <MAKE ,DACT ,SEEN>
+ <COND (<T? ,DACT-SLEEP>
+ <COND (<NOT <EQUAL? ,DACT-SLEEP 3>>
+ <INC DACT-SLEEP>)>
+ <RTRUE>)>
+ <TELL ,TAB>
+ <TELL "A tear trembles on " THE ,DACT
+ "'s beak. You watch as it">
+ <DACT-TO-SLEEP T>
+ <RTRUE>)
+ (<HAPPY-CHAR? .WHO>
+ <RTRUE>)
+ (<EQUAL? .WHO ,OWOMAN ,MAYOR ,CLERIC>
+ <LOVELY .WHO>
+ <RTRUE>)
+ (<EQUAL? .WHO ,SALT>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB "\"Thought I heard music,\" remarks "
+ THE .WHO ,PERIOD>
+ <RTRUE>)
+ (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB CTHE .WHO " smiles at the sound." CR>
+ <RTRUE>)>
+ <RTRUE>)
+
+ (<EQUAL? ,DPOINTER 2>
+ <TELL "A tide of flavorful aromas">
+ <PRINT " fills the air">
+ <PRINT "! You can't help but ">
+ <TELL
+"breathe deeply as the scents of a dozen exotic delicacies drift past your nostrils, one by one">
+ <COND (<T? .M>
+ <NOW-HUNGRY .WHO>)>
+ <TELL ,PERIOD>
+ <COND (<HAPPY-CHAR? .WHO>
+ <RTRUE>)
+ (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB "\"Ahhh,\" sighs " THE .WHO ,PERIOD>)>
+ <RTRUE>)
+
+ (<EQUAL? ,DPOINTER 3>
+ <TELL
+"A mouthwatering cascade of flavor washes over your tongue">
+ <PRINT "! You can't help but ">
+ <PRINT "close your eyes for a moment ">
+ <TELL "to savor the taste of all your favorite dishes">
+ <COND (<T? .M>
+ <NOW-HUNGRY .WHO>)>
+ <PRINT ,PERIOD>
+ <COND (<HAPPY-CHAR? .WHO>
+ <RTRUE>)
+ (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB "\"Mmmmm,\" sighs " THE .WHO ", smacking ">
+ <COND (<IS? .WHO ,FEMALE>
+ <TELL "her">)
+ (T
+ <TELL "his">)>
+ <TELL " lips." CR>)>
+ <RTRUE>)
+
+ (<EQUAL? ,DPOINTER 4>
+ <TELL "Invisible fingers of delight caress your skin! ">
+ <PRINT "! You can't help but ">
+ <PRINT "close your eyes for a moment ">
+ <TELL
+"as a soothing, sensuous tingle spreads over every inch of your body">
+ <COND (<T? .M>
+ <TELL ,PTAB CTHE .WHO
+ " emits a brief moan of pleasure">)>
+ <PRINT ,PERIOD>
+ <COND (<HAPPY-CHAR? .WHO>
+ <RTRUE>)
+ (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB "\"Mmmmm,\" moans " THE .WHO ,PERIOD>)>
+ <RTRUE>)>
+
+ <RENEW-ALL-IN ,INGURDY>
+ <TELL "A flood of joyful memory swells in your mind">
+ <PRINT "! You can't help but ">
+ <PRINT "close your eyes for a moment ">
+ <TELL
+"as old friends and forgotten secrets rise one by one from of the mists of time, then fade into obscurity">
+ <COND (<T? .M>
+ <LAST-MEAL .WHO>)>
+ <PRINT ,PERIOD>
+ <COND (<HAPPY-CHAR? .WHO>
+ <RTRUE>)
+ (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB CTHE .WHO " smiles wistfully." CR>)>
+ <RTRUE>>
+
+<ROUTINE LOVELY (WHO)
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB "\"Lovely,\" remarks " THE .WHO ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE LAST-MEAL (WHO)
+ <PRINT ". Unfortunately, ">
+ <TELL THE .WHO " seem">
+ <COND (<NOT <IS? .WHO ,PLURAL>>
+ <TELL "s">)>
+ <TELL " to remember only its last meal">
+ <RTRUE>>
+
+<ROUTINE NOW-HUNGRY (WHO)
+ <PRINT ". Unfortunately, ">
+ <TELL THE .WHO " now looks hungrier than before">
+ <RTRUE>>
+
+<ROUTINE HAPPY-CHAR? (WHO)
+ <COND (<OR <EQUAL? .WHO ,MINX ,UNICORN ,BABY>
+ <EQUAL? .WHO ,MAMA ,DACT>>
+ <TELL ,TAB CTHE .WHO " seemed to enjoy that." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE UNHAPPY-CHAR? (WHO)
+ <COND (<OR <EQUAL? .WHO ,MINX ,UNICORN ,BABY>
+ <EQUAL? .WHO ,MAMA ,DACT>>
+ <TELL ,TAB CTHE .WHO " gives you a hurt look." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE TURN-GURDY-LEFT ("AUX" (M 0) (P 0) WHO)
+ <SET WHO <FIND-CHAR?>>
+ <COND (<ZERO? .WHO>)
+ (<IS? .WHO ,MONSTER>
+ <COND (<NOT <IS? .WHO ,SLEEPING>>
+ <INC M>)>)
+ (T
+ <INC P>)>
+ <SETG LAST-CRANK-DIR ,LEFT>
+ <COND (<TURN-GURDY? ,W?LEFT "crimson">
+ <RTRUE>)>
+ <TELL ,TAB>
+ <COND (<ZERO? ,DPOINTER>
+ <WINDOW ,SHOWING-ALL>
+ <COND (<T? ,GURDY-TIMER>
+ <SETG GURDY-TIMER 0>
+ <DEQUEUE ,I-COLOR>)>
+ <TELL ,XTHE>
+ <COND (<HERE? GURDY-ROOM>
+ <TELL "colors in the ">
+ <ROOM-OR-LAND>
+ <TELL " around you fade back to ">
+ <COND (<PLAIN-ROOM?>
+ <SETG OLD-HERE <>>
+ <SETG P-WALK-DIR <>>
+ <UNMAKE ,HERE ,SEEN>
+ <TELL B ,W?GRAY>)
+ (T
+ <TELL "normal">)>)
+ (T
+ <COND (<PLAIN-ROOM?>
+ <TELL "grayness">)
+ (T
+ <TELL "color">)>
+ <TELL " of the ">
+ <ROOM-OR-LAND>
+ <TELL " around you becomes pasty and dull">)>
+ <SETG GURDY-ROOM <>>
+ <COND (<T? .M>
+ <TELL ", an effect " THE .WHO " seem">
+ <COND (<NOT <IS? .WHO ,PLURAL>>
+ <TELL "s">)>
+ <TELL " not to mind in the least">)>
+ <TELL ,PERIOD>
+ <COND (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB CTHE .WHO
+ " glances around, puzzled." CR>)>
+ <RTRUE>)
+
+ (<EQUAL? ,DPOINTER 1>
+ <TELL
+"A dreadful cacophony of random noise">
+ <PRINT " fills the air">
+ <TELL
+"! You cover your ears and wince until the onslaught fades to a welcome silence">
+ <COND (<T? .M>
+ <ANNOY-WHO .WHO>)>
+ <TELL ,PERIOD>
+ <COND (<UNHAPPY-CHAR? .WHO>
+ <RTRUE>)
+ (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB "\"Ouch,\" comments " THE .WHO>
+ <PRINT " with a glare of annoyance.|">)>
+ <RTRUE>)
+
+ (<EQUAL? ,DPOINTER 2>
+ <TELL
+"A nauseating cloud of foul, reeking stenches">
+ <PRINT " fills the air">
+ <TELL "! You cover your nose and try not to gag as the air clears all too slowly">
+ <COND (<T? .M>
+ <TELL ", noting that " THE .WHO " seem">
+ <COND (<NOT <IS? .WHO ,PLURAL>>
+ <TELL "s">)>
+ <TELL " to have enjoyed the disgusting onslaught">)>
+ <TELL ,PERIOD>
+ <COND (<UNHAPPY-CHAR? .WHO>
+ <RTRUE>)
+ (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB "\"Put that away,\" coughs " THE .WHO>
+ <PRINT " with a glare of annoyance.|">)>
+ <RTRUE>)
+
+ (<EQUAL? ,DPOINTER 3>
+ <TELL
+"The unspeakable flavor of dead, rotting filth coats your tongue! You spit and cough uncontrollably until your mouth absorbs the dreadful taste">
+ <COND (<T? .M>
+ <ANNOY-WHO .WHO>)>
+ <TELL ,PERIOD>
+ <COND (<UNHAPPY-CHAR? .WHO>
+ <RTRUE>)
+ (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB "\"Enough,\" gags " THE .WHO>
+ <PRINT " with a glare of annoyance.|">)>
+ <RTRUE>)
+
+ (<EQUAL? ,DPOINTER 4>
+ <TELL
+"Your skin erupts in a dozen places with a painful, burning itch! No scratching can relieve the suffering you endure until the invisible rash subsides">
+ <COND (<T? .M>
+ <ANNOY-WHO .WHO>)>
+ <TELL ,PERIOD>
+ <COND (<UNHAPPY-CHAR? .WHO>
+ <RTRUE>)
+ (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB "\"Thanks,\" mutters " THE .WHO>
+ <PRINT " with a glare of annoyance.|">)>
+ <RTRUE>)>
+
+ <MUNG-ALL-IN ,INGURDY>
+ <TELL
+"A black tide of memory swells in your mind! You blush with shame as thoughtless deeds and filthy little secrets emerge from the dark reaches of your past to taunt you">
+ <COND (<T? .M>
+ <LAST-MEAL .WHO>)>
+ <PRINT ,PERIOD>
+ <COND (<UNHAPPY-CHAR? .WHO>
+ <RTRUE>)
+ (<T? .P>
+ <MAKE .WHO ,SEEN>
+ <TELL ,TAB CTHE .WHO " gives you a bitter glare." CR>)>
+ <RTRUE>>
+
+<ROUTINE ANNOY-WHO (WHO)
+ <PRINT ". Unfortunately, ">
+ <TELL THE .WHO " now look">
+ <COND (<NOT <IS? .WHO ,PLURAL>>
+ <TELL "s">)>
+ <TELL " more annoyed than ever">
+ <RFALSE>>
+
+<ROUTINE TURN-GURDY? (WRD STR)
+ <COND (<NO-MAGIC-HERE? ,GURDY>
+ <RTRUE>)>
+ <TELL "You turn the crank on " THE ,GURDY " to the " B .WRD
+ ", and watch as ">
+ <COND (<IS? ,GURDY ,OPENED>
+ <TELL "wraiths of soft " .STR
+" light escape from the open box, dispersing with no effect." CR>
+ <RTRUE>)>
+ <TELL "a soft " .STR
+" glow brightens the rim of the closed lid." CR>
+ <RFALSE>>
+
+<ROUTINE ROOM-OR-LAND ()
+ <COND (<IS? ,HERE ,INDOORS>
+ <PRINTD ,GLOBAL-ROOM>
+ <RTRUE>)>
+ <PRINTB ,W?LANDSCAPE>
+ <RTRUE>>
+
+<ROUTINE REGAIN-SENSES ()
+ <SETG P-WALK-DIR <>>
+ <SETG OLD-HERE <>>
+ <CARRIAGE-RETURNS>
+ <TELL "You slowly come to your senses." CR>
+ <COND (<T? ,VERBOSITY>
+ <CRLF>)>
+ <RFALSE>>
+
+<GLOBAL STORM-TIMER:NUMBER 0>
+
+<ROUTINE I-STORM ()
+ <COND (<DLESS? STORM-TIMER 1>
+ <REMOVE ,TWISTER>
+ <SETG STORM-TIMER 0>
+ <DEQUEUE ,I-STORM>
+ <WINDOW ,SHOWING-ROOM>
+ <PUTP ,IN-FARM ,P?SDESC 0>
+ <MAKE ,IN-FARM ,SEEN>
+ <PRINT ,TAB>
+ <ITALICIZE "Crash">
+ <TELL "! " CTHE ,FARMHOUSE " strikes " THE ,GROUND
+" with a sickening thud. You're thrown across the room, hit " 'HEAD
+" and...||||||A ray of sunlight opens your eyes." CR>
+ <RTRUE>)
+ (<EQUAL? ,STORM-TIMER 2>
+ <TELL ,TAB CTHE ,FLOOR " lurches crazily underfoot." CR>
+ <RTRUE>)
+ (<EQUAL? ,STORM-TIMER 1>
+ <TELL " The entire " 'FARMHOUSE
+ " shudders as " THE ,TWISTER
+" loosens its grip. It feels as if you're starting to fall!" CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE I-TWISTER ("AUX" X)
+ <MAKE ,CORBIES ,SEEN>
+ <TELL ,TAB>
+ <COND (<DLESS? STORM-TIMER 1>
+ <DEQUEUE ,I-TWISTER>
+ <DEQUEUE ,I-CORBIES>
+ <TELL "The wind ">
+ <COND (<HERE? IN-FARM>
+ <PRINT "outside ">)>
+ <TELL
+"rises to a deafening shriek, and blowing dust turns the day to night" ,PTAB>
+ <ITALICIZE "Thwack">
+ <TELL "! The ">
+ <COND (<HERE? FARM-ROOM>
+ <TELL 'TWISTER
+" rips a clapboard off " THE ,FARMHOUSE
+", blows it across the yard and drives it deep into your chest">
+ <JIGS-UP>
+ <RTRUE>)>
+ <MAKE ,FARMHOUSE ,SEEN>
+ <SETG STORM-TIMER ,INIT-STORM-TIMER>
+ <QUEUE ,I-STORM>
+ <PUTP ,IN-FARM ,P?SDESC ,DESCRIBE-IN-FARM>
+ <WINDOW ,SHOWING-ROOM>
+ <PUTP ,IN-FARM ,P?FNUM 0>
+ <NEW-EXIT? ,IN-FARM ,P?NORTH %<+ ,DCONNECT 1 ,MARKBIT>
+ ,IN-FROON ,FARM-DOOR>
+ <NEW-EXIT? ,IN-FARM ,P?OUT %<+ ,DCONNECT 1 ,MARKBIT>
+ ,IN-FROON ,FARM-DOOR>
+ <COND (<IS? ,FARM-DOOR ,OPENED>
+ <UNMAKE ,FARM-DOOR ,OPENED>
+ <TELL 'FARM-DOOR " slams shut as the ">)>
+ <TELL 'FARMHOUSE
+" jerks violently upward, throwing you to your knees. You feel a strange whirling sensation as " THE ,FLOOR
+" begins to dip and sway like the deck of a boat. A glance out "
+THE ,FARM-WINDOW " confirms what your popping ears already know: "
+CTHE ,FARMHOUSE " is soaring high above the Fields of Frotzen, caught in the vortex of a mighty " 'TWISTER "!" CR>
+ <REFRESH-MAP <>>
+ <RTRUE>)
+ (<EQUAL? ,STORM-TIMER 1>
+ <TELL "The wind ">
+ <COND (<HERE? IN-FARM>
+ <PRINT "outside ">)>
+ <TELL
+"grows from a rumble to a roar as the churning vortex whirls closer." CR>
+ <COND (<HERE? IN-FARM>
+ <RTRUE>)
+ (<NOT <IS? ,FARM-DOOR ,OPENED>>
+ <WINDOW ,SHOWING-ROOM>
+ <MAKE ,FARM-DOOR ,OPENED>
+ <TELL ,TAB>
+ <ITALICIZE "Bang">
+ <TELL "! " CTHE ,FARM-DOOR
+ " blows open in the gale." CR>)>
+ <COND (<VISIBLE? ,MINX>
+ <MOVE ,MINX ,IN-FARM>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CTHE ,MINX
+ " races for the safety of "
+ THE ,FARM ,PERIOD>)>
+ <RTRUE>)
+ (<EQUAL? ,STORM-TIMER 2>
+ <MOVE ,TWISTER ,HERE>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL "An ominous rumble ">
+ <SET X ,W?SOUTHEAST>
+ <COND (<HERE? IN-FARM>
+ <MAKE ,TWISTER ,NODESC>
+ <SET X ,W?WINDOW>
+ <PRINT "outside ">)>
+ <TELL "draws your eyes to the " B .X
+", where a dark, boiling thundercloud is racing across the fields" ,PTAB>
+ <KERBLAM>
+ <TELL
+"Lightning heralds the approach of a deadly funnel!" CR>
+ <RTRUE>)
+ (<EQUAL? ,STORM-TIMER 3>
+ <TELL "The sky ">
+ <COND (<HERE? IN-FARM>
+ <TELL "outside ">)>
+ <TELL "is becoming very dark." CR>
+ <COND (<VISIBLE? ,MINX>
+ <TELL ,TAB CTHE ,MINX
+ " sniffs the air and whimpers." CR>)>
+ <RTRUE>)
+ (T
+ <TELL "The air feels unusually still and expectant." CR>
+ <RTRUE>)>>
+
+<GLOBAL FSCRIPT:NUMBER 0>
+
+<ROUTINE I-FROON ()
+ <COND (<HERE? IN-FARM>
+ <COND (<G? ,FSCRIPT 2>
+ <COND (<IS? ,FCROWD ,SEEN>
+ <UNMAKE ,FCROWD ,SEEN>
+ <RFALSE>)>
+ <MAKE ,FCROWD ,SEEN>
+ <TELL ,TAB
+"The cheers outside show no sign of stopping." CR>
+ <RTRUE>)>
+ <RFALSE>)>
+ <TELL ,TAB>
+ <COND (<IGRTR? FSCRIPT 11>
+ <TELL
+"As you stand contemplating the natural beauty of the " 'FROON
+"ian landscape, another " 'FARMHOUSE
+" falls out of the sky and lands on " 'HEAD>
+ <JIGS-UP>
+ <RTRUE>)
+ (<EQUAL? ,FSCRIPT 11>
+ <WINDOW ,SHOWING-ROOM>
+ <PUTP ,IN-FROON ,P?HEAR 0>
+ <REMOVE ,MAYOR>
+ <SETG P-HIM-OBJECT ,NOT-HERE-OBJECT>
+ <REMOVE ,LADY>
+ <SETG P-HER-OBJECT ,NOT-HERE-OBJECT>
+ <REMOVE ,FCROWD>
+ <SETG P-THEM-OBJECT ,NOT-HERE-OBJECT>
+ <TELL "With a peremptory sniff, " THE ,MAYOR
+" snaps " THE ,JBOX " shut" ,PTAB "\"Very well,\" he sighs. \"I'm sure there are plenty of other heroes who would be more than happy to accept our humble gifts and everlasting adulation.\"|
+ Grumbling with indignation, he and the other folk sullenly retreat into "
+THE ,FBEDS ". In moments, you are completely alone." CR>
+ <RTRUE>)
+ (<EQUAL? ,FSCRIPT 10>
+ <TELL "\"The day is getting long,\" notes " THE ,MAYOR
+" with obvious irritation. \"Please choose one of the keys. ">
+ <ITALICIZE "Now">
+ <TELL ,PERQ>
+ <RTRUE>)
+ (<EQUAL? ,FSCRIPT 9>
+ <TELL CTHE ,MAYOR " taps his foot impatiently. \"" ,CYOUR>
+ <HONORED-ONE>
+ <TELL " will be so kind as to select a key?\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,FSCRIPT 8>
+ <TELL "\"Choose any key you like,\" prompts " THE ,MAYOR
+ " helpfully." CR>
+ <RTRUE>)
+ (<EQUAL? ,FSCRIPT 7>
+ <WINDOW ,SHOWING-ROOM>
+ <MAKE ,JBOX ,OPENED>
+ <TELL CTHE ,MAYOR " opens " THE ,JBOX
+" with a grand flourish.| \"Behold!\" he cries. \"Herein lie the Keys to the Kingdom of " 'FROON
+". This gift is the greatest honor my people can bestow. Humbly, and with eternal gratitude, do we offer one to you.\"" CR ,TAB CTHE ,FCROWD
+" redoubles its cheering." CR>
+ <RTRUE>)
+ (<EQUAL? ,FSCRIPT 6>
+ <WINDOW ,SHOWING-ROOM>
+ <MOVE ,JBOX ,MAYOR>
+ <TELL
+"\"Such a mighty deed commands many thanks,\" continues " THE ,MAYOR
+". \"Bring me the Cask!\"|
+ \"The Cask! " CTHE ,MAYOR " sends for the Cask!\" whispers " THE ,FCROWD
+" as a servant disappears into " THE ,FBEDS
+". Moments later he returns bearing a small "
+'JBOX ", which is delivered to " THE ,MAYOR ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? ,FSCRIPT 5>
+ <TELL
+"\"For over three hundred years, my people have suffered in the shadow of the Heeled One,\" explains " THE ,MAYOR ", glancing hatefully at " THE ,BOOT
+". \"At long last, his evil-smelling reign is at an end!\"|
+ \"Huzzah!\" cries " THE ,FCROWD ", dancing gleefully around " THE ,FARMHOUSE
+". \"Huzzah! The Boot is licked!\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,FSCRIPT 4>
+ <WINDOW ,SHOWING-ROOM>
+ <MOVE ,MAYOR ,IN-FROON>
+ <SEE-CHARACTER ,MAYOR>
+ <MAKE ,FCROWD ,NODESC>
+ <PUTP ,IN-FROON ,P?HEAR ,MAYOR>
+ <TELL
+"An important-looking man, tinier than all the rest, emerges from "
+THE ,FCROWD ,PTAB "\"Greetings, brave ">
+ <SAY-SORC>
+ <TELL ",\" he mumbles, grovelling at your feet. \"I am Grope, Mayor of the City of " 'FROON ". On behalf of us all, I welcome you!\"|
+ \"Welcome! Welcome to the ">
+ <SAY-SORC>
+ <TELL "!\" echoes " THE ,FCROWD " joyfully." CR>
+ <RTRUE>)
+ (<EQUAL? ,FSCRIPT 3>
+ <WINDOW ,SHOWING-ROOM>
+ <MOVE ,FCROWD ,IN-FROON>
+ <SETG P-THEM-OBJECT ,FCROWD>
+ <PUTP ,IN-FROON ,P?HEAR ,FCROWD>
+ <MAKE ,LADY ,NODESC>
+ <TELL
+"\"The Heeled One is fallen! Come see! Come see!\"|
+ More and more of the little folk emerge from " THE ,FBEDS
+", staring first at the crushed boot, then at you. Soon you're completely surrounded by joyous little faces." CR>
+ <RTRUE>)
+ (<EQUAL? ,FSCRIPT 2>
+ <TELL CTHE ,LADY " tiptoes over to " THE ,BOOT
+" and gawks at it, awestruck. She gingerly reaches out to tickle the lifeless sole. Nothing happens. A broad grin spreads across her childlike face.|
+ \"It's dead,\" she squeaks, turning to look at you. \"You killed it.\"" CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE SAY-SORC ()
+ <TELL "sorcere">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "ss">
+ <RTRUE>)>
+ <PRINTC %<ASCII !\r>>
+ <RTRUE>>
+
+<GLOBAL SHILL-TIMER:NUMBER 0>
+
+<ROUTINE I-SHILL ()
+ <COND (<IS? ,SHILL ,NODESC>
+ <UNMAKE ,SHILL ,NODESC>
+ <RFALSE>)
+ (<IGRTR? SHILL-TIMER 5>
+ <DEQUEUE ,I-SHILL>
+ <SETG SHILL-TIMER 0>
+ <VANISH ,SHILL>
+ <COND (<HERE? ON-WHARF>
+ <TELL ,TAB CTHE ,SHILL
+ " slowly floats out of sight." CR>
+ <RTRUE>)>
+ <RFALSE>)
+ (<NOT <HERE? ON-WHARF>>
+ <RFALSE>)
+ (<EQUAL? ,SHILL-TIMER 4>
+ <TELL ,TAB CTHE ,SHILL " is beginning to float away." CR>
+ <RTRUE>)
+ (<EQUAL? ,SHILL-TIMER 1>
+ <TELL ,TAB>
+ <SEE-SHILL>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE SEE-SHILL ()
+ <MAKE ,SHILL ,SEEN>
+ <SETG SHILL-TIMER 1>
+ <WINDOW ,SHOWING-ROOM>
+ <SETG P-IT-OBJECT ,SHILL>
+ <MOVE ,SHILL ,COVE>
+ <TELL "A movement draws your eye to the water, where "
+ A ,SHILL " is bobbing on the waves." CR>
+ <RTRUE>>
+
+<GLOBAL DACT-SLEEP:NUMBER 0>
+
+<ROUTINE I-DACT ("AUX" (V <>) X)
+ <SET V <VISIBLE? ,DACT>>
+ <COND (<T? ,DACT-SLEEP>
+ <DEC DACT-SLEEP>
+ <COND (<EQUAL? ,DACT-SLEEP 3>
+ <RFALSE>)
+ (<T? .V>
+ <TELL ,TAB>)>
+ <COND (<ZERO? ,DACT-SLEEP>
+ <WAKE-DACT>
+ <RTRUE>)
+ (<ZERO? .V>
+ <RFALSE>)>
+ <TELL CTHE ,DACT>
+ <COND (<EQUAL? ,DACT-SLEEP 1>
+ <TELL
+" snorts restlessly. It looks as if it's about to wake up." CR>
+ <RTRUE>)>
+ <TELL " caws softly in its dreams." CR>
+ <RTRUE>)>
+ <COND (<ZERO? .V>
+ <RFALSE>)
+ (<IS? ,DACT ,SEEN>
+ <UNMAKE ,DACT ,SEEN>
+ <RFALSE>)
+ (<PROB 50>
+ <RFALSE>)>
+ <MAKE ,DACT ,SEEN>
+ <SET X ,HAPPY-DACT>
+ <COND (<HERE? IN-SKY>
+ <SET X ,FLYING-DACT>)
+ (<IS? ,DACT ,MUNGED>
+ <SET X ,SICK-DACT>)>
+ <TELL ,TAB CTHE ,DACT <PICK-NEXT .X> ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE WAKE-DACT ()
+ <REPLACE-ADJ? ,DACT ,W?SLEEPING ,W?AWAKE>
+ <UNMAKE ,DACT ,SLEEPING>
+ <MAKE ,DACT ,SEEN>
+ <SETG DACT-SLEEP 0>
+ <COND (<VISIBLE? ,DACT>
+ <WINDOW ,SHOWING-ALL>
+ <TELL CTHE ,DACT
+" shakes its head, blinks its eyes and yawns stupidly." CR>
+ <COND (<AND <IS? ,DACT ,MUNGED>
+ <IN? ,SADDLE ,DACT>>
+ <MOVE ,SADDLE ,HERE>
+ <TELL ,TAB CTHE ,SADDLE ,SON THE ,DACT
+"'s back aggravates his wound. So he shakes it off with a violent twist">
+ <COND (<IN? ,PLAYER ,SADDLE>
+ <MOVE ,PLAYER ,HERE>
+ <TELL
+", which sends you sprawling to " THE ,GROUND>
+ <RELOOK>
+ <RTRUE>)>
+ <PRINT ,PERIOD>
+ <WINDOW ,SHOWING-ROOM>)>)>
+ <RTRUE>>
+
+<GLOBAL GRTIMER:NUMBER 0>
+
+<ROUTINE I-GRINDER-APPEARS ()
+ <COND (<NOT <HERE? AT-GATE>>
+ <RFALSE>)
+ (<DLESS? GRTIMER 1>
+ <SETG GRTIMER 0>
+ <DEQUEUE ,I-GRINDER-APPEARS>
+ <MOVE ,GRINDER ,AT-GATE>
+ <SEE-GRINDER>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB "Blue planes of energy form in the space around you. Their patterns of intersection whirl around a vortex of laughter, growing in power and malevolence.." ,PERIOD>
+ <COND (<OR <ZERO? ,DMODE>
+ <EQUAL? ,PRIOR ,SHOWING-INV ,SHOWING-STATS>>
+ <RELOOK T>)>
+ <RTRUE>)
+ (<EQUAL? ,GRTIMER 1>
+ <TELL ,TAB
+"The invisible voice chuckles again, and the tension in the air rises." CR>
+ <RTRUE>)
+ (<EQUAL? ,GRTIMER 2>
+ <TELL ,TAB
+"A burst of hollow laughter echoes up and down the street. You turn, but see no one" ,PTAB "There's a faint, electrical tension in the air." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE SEE-GRINDER ()
+ <SEE-CHARACTER ,GRINDER>
+ <QUEUE ,I-GRINDER>
+ <SETG LAST-MONSTER ,GRINDER>
+ <SETG LAST-MONSTER-DIR <>>
+ <MAKE ,GRINDER ,SEEN>
+ <RFALSE>>
+
+<ROUTINE I-GRINDER ()
+ <COND (<NOT <HERE? AT-GATE>>
+ <RFALSE>)>
+ <INC GRTIMER>
+ <TELL ,TAB>
+ <COND (<L? <GETP ,GRINDER ,P?ENDURANCE> 1>
+ <EXIT-GRINDER>
+ <TELL CTHE ,GURDY " falls from " THE ,GRINDER
+"'s dying grasp. Moments later, his body dissolves in a puff of steam." CR>
+ <RTRUE>)>
+ <NEXT-ENDURANCE? ,GRINDER>
+ <COND (<EQUAL? ,GRTIMER 1>
+ <TELL CTHE ,GRINDER
+" looks you up and down. \"Peasants,\" he sniffs, adjusting a knob on his "
+'GURDY ". \"Like unto sheep.\"|
+ He turns the crank of " THE ,GURDY ", and the air is filled with the combined stench of five herds of sheep, accompanied by a cacophany of hateful bleating." CR>)
+ (<EQUAL? ,GRTIMER 2>
+ <UNMAKE ,NYMPH ,LIVING>
+ <TELL "Ignoring you for the moment, " THE ,GRINDER
+" strides across to " THE ,GUILD-HALL "'s entrance.|
+ A warning nymph appears beside his ">
+ <NYMPH-SAYS>
+ <TELL
+"... Oomph!\" This last exclamation is " THE ,NYMPH
+"'s last; for, quick as a wink, "
+THE ,GRINDER " snatches it out of the air and crushes it in his fist. \"Miserable pests.\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,GRTIMER 3>
+ <TELL CTHE ,GRINDER
+" turns around. \"Still here?\" he cries, adjusting his " 'GURDY ,PTAB
+"He turns the crank again, and a wall of imaginary flame springs up around you. You wail as your skin burns with synthetic agony." CR>)
+ (<EQUAL? ,GRTIMER 4>
+ <TELL
+"\"Guess I'll just have to finish you off.\"" CR ,TAB>)>
+
+ <COND (<G? ,GRTIMER 3>
+ <TELL CTHE ,GRINDER " turns the crank, and "
+ <PICK-NEXT ,TORTURES> ,PERIOD>)>
+
+ <COND (<T? ,AUTO>
+ <BMODE-ON>)>
+ <UPDATE-STAT <- 0 <RANDOM <GETP ,GRINDER ,P?STRENGTH>>>>
+ <RTRUE>>
+
+; <ROUTINE I-DISTANT-DORN ("AUX" X)
+ <COND (<IN? ,DORN ,HERE>
+ <MAKE ,DORN ,SEEN>
+ <RFALSE>)
+ (<OR <HERE? TOWER-TOP>
+ <SET X <INTBL? ,HERE <REST ,TOWER1-ROOMS 1> 4 1>>
+ <SET X <INTBL? ,HERE <REST ,TOWER2-ROOMS 1> 4 1>>
+ <SET X <INTBL? ,HERE <REST ,TOWER3-ROOMS 1> 4 1>>>
+ <COND (<IS? ,DORN ,SEEN>
+ <UNMAKE ,DORN ,SEEN>
+ <RFALSE>)
+ (<PROB 50>
+ <RFALSE>)>
+ <MAKE ,DORN ,SEEN>
+ <TELL ,TAB>
+ <COND (<SET X <INTBL? ,HERE <REST ,DORN-ROOMS 1> 5 1>>
+ <TELL <PICK-NEXT ,CLOSE-DORNS> CR>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,DORN-SOUNDS> CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<GLOBAL DORN-TIMER:NUMBER 0>
+
+<ROUTINE I-DORN ("AUX" X L DIR TBL DEST DAMAGE)
+ <SET L <LOC ,DORN>>
+ <COND (<EQUAL? .L ,HERE>
+ <MAKE ,DORN ,SEEN>
+ <TELL ,TAB>
+ <COND (<L? <GETP ,DORN ,P?ENDURANCE> 1>
+ <TELL "Howling with pain, " THE ,DORN
+ " beats a hasty retreat." CR>
+ ; <DEQUEUE ,I-DISTANT-DORN>
+ <KILL-MONSTER ,DORN>
+ <RTRUE>)
+ (<IS? ,DORN ,MUNGED>
+ <TELL CTHE ,DORN>
+ <COND (<DLESS? DORN-TIMER 1>
+ <SETG DORN-TIMER 0>
+ <WINDOW ,SHOWING-ROOM>
+ <UNMAKE ,DORN ,MUNGED>
+ <TELL " sniffs away the last of its tears." CR>
+ <RTRUE>)
+ (<EQUAL? ,DORN-TIMER 1>
+ <TELL
+" blows its nose noisily. It looks as if it's recovering." CR>
+ <RTRUE>)
+ (<EQUAL? ,DORN-TIMER 2>
+ <TELL
+" flails around the room, its eyes streaming. \"Hurumph!\" it bawls." CR>
+ <RTRUE>)>
+ <TELL
+" almost crashes into you in its blind frenzy. \"Hurumph!\" it cries, its face soaked with tears." CR>
+ <RTRUE>)
+ (<IS? ,DORN ,SURPRISED>
+ <SEE-MONSTER ,DORN>
+ <TELL CTHE ,DORN
+" begins turning its 69 eyes in your direction." CR>
+ <RTRUE>)>
+ <NEXT-ENDURANCE? ,DORN>
+ <SET DAMAGE <MONSTER-STRIKES? ,DORN>>
+ <TELL CTHE ,DORN>
+ <COND (<T? .DAMAGE>
+ <TELL <PICK-NEXT ,DORN-HITS>
+", and you feel strength drain from your body." CR>
+ <UPDATE-STAT .DAMAGE ,STRENGTH>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,DORN-MISSES> ,PERIOD>
+ <RTRUE>)
+ (<IS? ,DORN ,MUNGED>
+ <COND (<DLESS? DORN-TIMER 1>
+ <SETG DORN-TIMER 0>
+ <UNMAKE ,DORN ,MUNGED>)>
+ <RFALSE>)
+ (<NOT <SET X <INTBL? ,HERE <REST ,DORN-ROOMS 1> 5 1>>>
+ <REMOVE ,DORN>
+ <UNMAKE ,DORN ,SLEEPING>
+ <UNMAKE ,DORN ,MUNGED>
+ <MAKE ,DORN ,SURPRISED>
+ <SETG DORN-TIMER 0>
+ <MAKE ,DORN ,NODESC>
+ <DEQUEUE ,I-DORN>
+ <RFALSE>)>
+ <SET DIR <MOVE-MONSTER? ,DORN T>>
+ <COND (<T? .DIR>
+ <MAKE ,DORN ,SEEN>
+ <TELL ,TAB>
+ <COND (<PROB 50>
+ <TELL "\"Hurumph!\" ">)>
+ <TELL CTHE ,DORN>
+ <COND (<EQUAL? .DIR ,W?UP ,W?DOWN>
+ <TELL " clambers " B .DIR " the steps." CR>
+ <RTRUE>)>
+ <PRINT " reappears from the ">
+ <TELL B .DIR ,PERIOD>
+ <RTRUE>)>
+ <RFALSE>>
+
+<GLOBAL ONION-TIMER:NUMBER 0>
+
+<ROUTINE I-ONION ("AUX" V)
+ <SET V <VISIBLE? ,ONION>>
+ <COND (<DLESS? ONION-TIMER 1>
+ <SETG ONION-TIMER 0>
+ <DEQUEUE ,I-ONION>
+ <COND (<T? ,DORN-TIMER>
+ <SETG DORN-TIMER 1>)>
+ <COND (<ZERO? .V>
+ <RFALSE>)>
+ <TELL ,TAB CTHE ,ONION
+"'s sting diminishes enough to dry your eyes." CR>
+ <RTRUE>)
+ (<ZERO? .V>
+ <RFALSE>)>
+ <TELL ,TAB>
+ <COND (<AND <IN? ,DORN ,HERE>
+ <NOT <IS? ,DORN ,MUNGED>>>
+ <WINDOW ,SHOWING-ROOM>
+ <MAKE ,DORN ,MUNGED>
+ <SETG DORN-TIMER 4>
+ <MAKE ,DORN ,SEEN>
+ <TELL CTHE ,DORN
+"'s multiple eyes turn red and watery under the pungent influence of "
+THE ,ONION ". \"Hurumph!\" it wails, utterly helpless" ,PTAB>)>
+
+ <COND (<EQUAL? ,ONION-TIMER 1>
+ <TELL CTHE ,ONION " seems to be losing its potency." CR>
+ <RTRUE>)
+ (<EQUAL? ,ONION-TIMER 2>
+ <TELL "You rub your swollen eyes to lessen " THE ,ONION
+ "'s pungent sting." CR>
+ <RTRUE>)>
+ <TELL "Your eyes become red and itchy as " THE ,ONION
+ "'s potent miasma">
+ <PRINT " fills the air">
+ <PRINT ,PERIOD>
+ <RTRUE>>
+
+<VOC "ITCH" NOUN>
+<VOC "LONG" ADJ> <VOC "SLENDER" ADJ> <VOC "ITCHY" ADJ>
+
+<GLOBAL MOSS-TIMER:NUMBER 0>
+<GLOBAL THIS-MOSS:OBJECT <>>
+<GLOBAL MOSSES:NUMBER 0>
+
+<ROUTINE I-MOSS ()
+ <COND (<IS? ,THIS-MOSS ,SEEN>
+ <UNMAKE ,THIS-MOSS ,SEEN>
+ <SETG MOSS-TIMER 6>
+ <RFALSE>)
+ (<DLESS? MOSS-TIMER 1>
+ <TELL ,TAB>
+ <DO-MOSS>
+ <RTRUE>)
+ (<EQUAL? ,MOSS-TIMER 2 4>
+ <RFALSE>)>
+ <TELL ,TAB>
+ <COND (<EQUAL? ,MOSS-TIMER 1>
+ <TELL "Those itchy fingers are becoming quite a nuisance">
+ <COND (<G? ,MOSSES 1>
+ <TELL " again">)>
+ <PRINT ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? ,MOSS-TIMER 3>
+ <TELL "You give your fingers a satisfying scratch." CR>
+ <RTRUE>)
+ (<EQUAL? ,MOSS-TIMER 5>
+ <REPLACE-SYN? ,HANDS ,W?ZZZP ,W?ITCH>
+ <REPLACE-ADJ? ,HANDS ,W?ZZZP ,W?ITCHY>
+ <TELL "You idly scratch an itchy finger." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE DO-MOSS ("AUX" X)
+ <SETG THIS-MOSS <>>
+ <SETG MOSS-TIMER 0>
+ <DEQUEUE ,I-MOSS>
+ <MAKE ,HANDS ,MUNGED>
+ <REPLACE-ADJ? ,HANDS ,W?ITCHY ,W?LONG>
+ <REPLACE-ADJ? ,HANDS ,W?ZZZP ,W?SLENDER>
+ <COND (<T? ,LIT?>
+ <SET X <LIGHT-SOURCE?>>
+ <TELL "Damn that itch! You hold your bothersome hand up to ">
+ <COND (<T? .X>
+ <TELL THE .X>)
+ (T
+ <TELL "the light">)>
+ <COND (<G? ,MOSSES 1>
+ <TELL
+" and flex your fingers again, noting their improved agility">)
+ (T
+ <TELL "... and gasp with shock!" CR ,TAB
+"Your fingers, once fat and stubby, are now long and slender as a pianist's. You flex the new digits one at a time; they respond with unfamiliar agility. Fact is, your whole body feels tighter and more coordinated than ever">)>)
+ (T
+ <TELL "Your fingers tingle oddly, and the itch disappears">)>
+ <PRINT ,PERIOD>
+ <UPDATE-STAT 8 ,DEXTERITY T>
+ <RTRUE>>
+
+<ROUTINE I-UNICORN ()
+ <COND (<NOT <HERE? IN-STABLE>>
+ <RFALSE>)
+ (<IS? ,STALL ,OPENED>
+ <TELL ,TAB CTHE ,UNICORN
+" wastes no time edging her way out of " THE ,STALL>
+ <COND (<IN? ,CHEST ,HERE>
+ <TELL ,PERIOD>
+ <UNICORN-OPENS-CHEST>
+ <RTRUE>)>
+ <TELL ". She ">
+ <BYE-UNICORN>
+ <RTRUE>)
+ (<IS? ,UNICORN ,SEEN>
+ <UNMAKE ,UNICORN ,SEEN>
+ <RFALSE>)
+ (<PROB 50>
+ <RFALSE>)>
+ <MAKE ,UNICORN ,SEEN>
+ <SETG P-HER-OBJECT ,UNICORN>
+ <TELL ,TAB CTHE ,UNICORN " whinnies sadly." CR>
+ <RTRUE>>
+
+<ROUTINE I-BABY ()
+ <COND (<NOT <HERE? JUN0>>
+ <RFALSE>)
+ (<IS? ,BABY ,SEEN>
+ <UNMAKE ,BABY ,SEEN>
+ <RFALSE>)
+ (<PROB 50>
+ <RFALSE>)>
+ <MAKE ,BABY ,SEEN>
+ <SETG P-HIM-OBJECT ,BABY>
+ <TELL ,TAB CTHE ,BABY " bellows helplessly">
+ <COND (<VISIBLE? ,MAMA>
+ <MAKE ,MAMA ,SEEN>
+ <COND (<PROB 50>
+ <SETG P-HER-OBJECT ,MAMA>
+ <TELL ", and its mother responds">)>)>
+ <PRINT ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE I-MAMA ("AUX" DAMAGE TBL LEN X L NL PL PLL DIR)
+ <SET L <LOC ,MAMA>>
+ <SET PL <LOC ,PLAYER>>
+ <COND (<VISIBLE? ,MAMA>
+ <COND (<NOT <IS? ,MAMA ,MONSTER>>
+ <COND (<IS? ,MAMA ,SEEN>
+ <UNMAKE ,MAMA ,SEEN>
+ <RFALSE>)
+ (<IS? ,MAMA ,MONSTER>)
+ (<PROB 50>
+ <RFALSE>)>
+ <SETG P-HER-OBJECT ,MAMA>
+ <MAKE ,MAMA ,SEEN>
+ <TELL ,TAB CTHE ,MAMA " bellows">
+ <COND (<VISIBLE? ,BABY>
+ <MAKE ,BABY ,SEEN>
+ <TELL " impotently">
+ <COND (<PROB 50>
+ <SETG P-HIM-OBJECT ,BABY>
+ <TELL ", and her baby responds">)>)>
+ <PRINT ,PERIOD>
+ <RTRUE>)>
+ <SETG P-HER-OBJECT ,MAMA>
+ <MAKE ,MAMA ,SEEN>
+ <COND (<L? <GETP ,MAMA ,P?ENDURANCE> 1>
+ <TELL " Bellowing with defeat, " THE ,MAMA
+ " limps away into the jungle." CR>
+ <KILL-MONSTER ,MAMA>
+ <RTRUE>)>
+ <COND (<STILL-SLEEPING? ,MAMA>
+ <RTRUE>)>
+ <TELL ,TAB CTHE ,MAMA>
+ <COND (<EQUAL? .L .PL>
+ <COND (<EQUAL? .L ,MAW>
+ <TELL <PICK-NEXT ,MAMA-CLIMBS>
+ ,PERIOD>
+ <RTRUE>)>
+ <SET X <MONSTER-STRIKES? ,MAMA>>
+ <TELL " charges you">
+ <COND (<T? .X>
+ <COND (<ZERO? ,STATIC>
+ <TELL ". Ooof!" CR>)
+ (T
+ <TELL ,PERIOD>)>
+ <UPDATE-STAT <MSPARK? ,MAMA .X>>
+ <RTRUE>)>
+ <TELL ", missing by a hair." CR>
+ <RTRUE>)
+ (<EQUAL? .PL ,MAW>
+ <MOVE ,MAMA ,MAW>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL
+" clambers onto the bottom of " THE .PL ", snorting with rage!" CR>
+ <RTRUE>)>
+ <TELL " circles " THE .PL
+ ", snorting angrily." CR>
+ <RTRUE>)>
+
+ <COND (<NOT <IS? ,MAMA ,MONSTER>>
+ <RFALSE>)>
+
+ <SET NL <GETP ,MAMA ,P?LAST-LOC>>
+ <COND (<T? .NL>
+ <MOVE ,MAMA .NL>
+ <COND (<EQUAL? .NL ,HERE>
+ <SETG P-HER-OBJECT ,MAMA>
+ <PUTP ,MAMA ,P?LAST-LOC <>>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CTHE ,MAMA " storms into view!" CR>
+ <RTRUE>)>)>
+
+ ; "Is player in a room adjacent to mama?"
+
+ <COND (<NOT <WEARING-MAGIC? ,CLOAK>>
+ <SET PLL <LOC .PL>>
+ <SET DIR ,P?NORTH>
+ <REPEAT ()
+ <SET TBL <GETP .L .DIR>>
+ <COND (<AND <T? .TBL>
+ <EQUAL? <MSB <GET .TBL ,XTYPE>>
+ ,CONNECT ,SCONNECT>>
+ <SET X <GET .TBL ,XROOM>>
+ <COND (<EQUAL? .X ,AT-FALLS>)
+ (<EQUAL? .X .PL .PLL>
+ <PUTP ,MAMA ,P?LAST-LOC .X>
+ <RFALSE>)>)>
+ <COND (<DLESS? DIR ,P?NW>
+ <RETURN>)>>)>
+
+ <PUTP ,MAMA ,P?LAST-LOC 0>
+ <RFALSE>>
+
+<GLOBAL IMPSAY:NUMBER 4>
+
+<ROUTINE I-IMPS ()
+ <COND (<NOT <HERE? APLANE>>
+ <RFALSE>)
+ (<NOT <EQUAL? ,ABOVE ,OPLAIN>>
+ <RFALSE>)>
+ <MAKE ,IMPS ,SEEN>
+ <SETG P-THEM-OBJECT ,IMPS>
+ <TELL ,TAB>
+ <COND (<DLESS? IMPSAY 1>
+ <DEQUEUE ,I-IMPS>
+ <SETG IMPSAY 3>
+ <QUEUE ,I-IMPS-TAKE>
+ <MOVE ,COCO ,APLANE>
+ <SETG P-IT-OBJECT ,COCO>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL "\"Catch!\" cries the ">
+ <PRINT "cheerful-looking Implementor">
+ <TELL ", lobbing " THE ,COCO " high into the air" ,PTAB
+"\"Got it.\" A loud-mouthed Implementor jumps out of his seat, steps backwards to grab the falling " 'COCO "... and plows directly into you" ,PTAB>
+ <ITALICIZE "Plop">
+ <TELL ". " CTHE ,COCO " skitters across the plane." CR>
+ <RTRUE>)
+ (<EQUAL? ,IMPSAY 3>
+ <TELL
+"One of the Implementors notices your arrival. \"Company,\" he remarks with his mouth full.|
+ A few of the others glance down at you." CR>
+ <RTRUE>)
+ (<EQUAL? ,IMPSAY 2>
+ <TELL ,XA>
+ <PRINT "tall, bearded Implementor">
+ <TELL " pitches " THE ,COCO
+" across the table. \"Isn't this the feeb who ">
+ <COND (<IS? ,BOTTLE ,SEEN>
+ <TELL "opened that mailbox">)
+ (<GETB ,LAST-BAD 0>
+ <TELL "used the word '">
+ <PRINT-TABLE ,LAST-BAD>
+ <TELL "'">)
+ (T
+ <TELL "bought that stupid onion">)>
+ <TELL
+" a few moves ago?\" he mutters, apparently referring to you">
+ <COND (<IS? ,IMPS ,MUNGED>
+ <TELL ". \"Gimme another thunderbolt.\"" CR>
+ <RTRUE>)>
+ <TELL ,PTAB "\"That's ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL B ,W?HER>)
+ (T
+ <TELL B ,W?HIM>)>
+ <TELL ",\" agrees one of the others." CR>
+ <RTRUE>)
+ (<EQUAL? ,IMPSAY 1>
+ <TELL "A ">
+ <PRINT "cheerful-looking Implementor">
+ <TELL " catches " THE ,COCO
+" and glares down at you with silent contempt." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE I-IMPS-TAKE ("AUX" X)
+ <COND (<NOT <HERE? APLANE>>
+ <RFALSE>)
+ (<NOT <EQUAL? ,ABOVE ,OPLAIN>>
+ <RFALSE>)>
+ <MAKE ,IMPS ,SEEN>
+ <SETG P-THEM-OBJECT ,IMPS>
+ <TELL ,TAB>
+ <SETG P-IT-OBJECT ,COCO>
+ <COND (<DLESS? IMPSAY 1>
+ <TELL
+"The loud-mouthed Implementor growls something obscene, shoves you out of the way and reaches down to retrieve " THE ,COCO ,PTAB>
+ <URGRUE-GETS-COCO T>
+ <RTRUE>)
+ (<EQUAL? ,IMPSAY 1>
+ <TELL "\"Pick up that " 'COCO
+ ",\" growls the Implementor, \"or I'll ">
+ <COND (<NOT <L? <GET ,STATS ,INTELLIGENCE> ,READING-IQ>>
+ <ITALICIZE "remove">)
+ (<ZERO? ,VT220>
+ <TELL "(something unintelligible)">)
+ (T
+ <SET X <FONT ,F-NEWFONT>>
+ <TELL B ,W?REMOVE>
+ <SET X <FONT ,F-DEFAULT>>)>
+ <TELL " you.\"" CR ,TAB
+"The other Implementors are enjoying this exchange." CR>
+ <RTRUE>)
+ (<EQUAL? ,IMPSAY 2>
+ <TELL
+"The Implementor who ran into you rises to his feet, livid with rage. \"Pick up that " 'COCO ",\" he demands." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE I-IMPQUEST ()
+ <COND (<NOT <HERE? APLANE>>
+ <RFALSE>)
+ (<NOT <EQUAL? ,ABOVE ,OPLAIN>>
+ <RFALSE>)
+ (<DLESS? IMPSAY 1>
+ <SETG IMPSAY 3>
+ <DEQUEUE ,I-IMPQUEST>
+ <QUEUE ,I-IMPGIVE>
+ <MOVE ,GOBLET ,IMPS>
+ <SETG P-IT-OBJECT ,GOBLET>
+ <WINDOW ,SHOWING-ROOM>
+ <MAKE ,IMPS ,SEEN>
+ <TELL " A ">
+ <PRINT "mild-mannered Implementor">
+ <TELL
+" empties his goblet of nectar with a gulp. \"Here,\" he says, holding it out for you. \"Carry this. It'll keep the thunderbolts off your back.\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,IMPSAY 1>
+ <MAKE ,IMPS ,SEEN>
+ <TELL
+" \"So,\" sighs another Implementor, toying with his sunglasses. \"The Coconut is gone. Stolen. Any volunteers to get it back?\"|
+ One by one, the Implementors turn to look at you.|
+ \"I'd say it's unanimous,\" smiles the ">
+ <PRINT "cheerful-looking Implementor">
+ <TELL ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? ,IMPSAY 2>
+ <MAKE ,IMPS ,SEEN>
+ <TELL
+" \"This is awkward,\" remarks a loudmouthed Implementor. \"No telling what the ur-grue might do with the Coconut. He could crumble the foundations of reality. Plunge the world into a thousand years of darkness. We might even have to buy our own lunch!\" The other Implementors gasp. \"And it's all ">
+ <HLIGHT ,H-ITALIC>
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "her">)
+ (T
+ <TELL "his">)>
+ <HLIGHT ,H-NORMAL>
+ <TELL
+" fault,\" he adds, pointing at you with a drumstick." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE I-IMPGIVE ()
+ <COND (<NOT <HERE? APLANE>>
+ <RFALSE>)
+ (<NOT <EQUAL? ,ABOVE ,OPLAIN>>
+ <RFALSE>)>
+ <MAKE ,IMPS ,SEEN>
+ <SETG P-IT-OBJECT ,GOBLET>
+ <TELL ,TAB>
+ <COND (<DLESS? IMPSAY 1>
+ <MOVE ,GOBLET ,ON-PIKE>
+ <MAKE ,GOBLET ,NODESC>
+ <MAKE ,GOBLET ,TOUCHED>
+ <TELL "\"I don't think ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "s">)>
+ <TELL "he's going to accept " THE ,GOBLET ",\" sighs the ">
+ <PRINT "mild-mannered Implementor">
+ <TELL ,PTAB "\"Of course ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "s">)>
+ <TELL "he will,\" smiles the ">
+ <PRINT "tall, bearded Implementor">
+ <TELL ", forcing it into your hands. \"See?\"" CR>
+ <ATRII-KICK>
+ <RTRUE>)
+ (<EQUAL? ,IMPSAY 1>
+ <TELL
+"\"I really must insist that you take this goblet,\" repeats the ">
+ <PRINT "mild-mannered Implementor">
+ <TELL ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? ,IMPSAY 2>
+ <TELL
+"\"Here. Take this,\" urges the ">
+ <PRINT "mild-mannered Implementor">
+ <TELL ", holding out the ">
+ <PRINT "goblet for you to take.|">
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE I-BFLY ("AUX" (FREE 0) V L LEN)
+ <COND (<NOT <IS? ,BFLY ,LIVING>>
+ <RFALSE>)>
+ <SET L <LOC ,BFLY>>
+ <COND (<T? .L>
+ <SET V <VISIBLE? ,BFLY>>
+ <COND (<IN? .L ,ROOMS>)
+ (<AND <EQUAL? .L ,ARCH>
+ <NOT <EQUAL? ,ATIME ,PRESENT>>>)
+ (<OR <IS? .L ,SURFACE>
+ <IS? .L ,VEHICLE>
+ <IS? .L ,LIVING>
+ <AND <IS? .L ,CONTAINER>
+ <IS? .L ,OPENED>>>
+ <INC FREE>)>)>
+ <COND (<EQUAL? .L ,GOBLET>
+ <COND (<ZERO? .V>
+ <RFALSE>)
+ (<IS? ,BFLY ,SEEN>
+ <UNMAKE ,BFLY ,SEEN>
+ <RFALSE>)
+ (<PROB 75>
+ <RFALSE>)>
+ <MAKE ,BFLY ,SEEN>
+ <MAKE ,BFLY ,IDENTIFIED>
+ <TELL ,TAB CTHE ,BFLY <PICK-NEXT ,BFLY-EATINGS> ,PERIOD>
+ <RTRUE>)
+ (<T? .V>
+ <COND (<IS? ,BFLY ,SEEN>
+ <UNMAKE ,BFLY ,SEEN>
+ <RFALSE>)
+ (<PROB 75>
+ <RFALSE>)>
+ <MAKE ,BFLY ,SEEN>
+ <MAKE ,BFLY ,IDENTIFIED>
+ <TELL ,TAB>
+ <COND (<EQUAL? .L ,HERE>)
+ (<T? .FREE>
+ <MOVE ,BFLY ,HERE>
+ <WINDOW ,SHOWING-ALL>
+ <TELL CTHE ,BFLY " flutters">
+ <OUT-OF-LOC .L>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <COND (<VISIBLE? ,GOBLET>
+ <SET L <LOC ,GOBLET>>
+ <TELL CTHE ,BFLY>
+ <COND (<OR <EQUAL? .L ,PLAYER ,HERE <LOC ,PLAYER>>
+ <IS? .L ,SURFACE>>
+ <MOVE ,BFLY ,GOBLET>
+ <WINDOW ,SHOWING-ALL>
+ <TELL " alights on the rim of "
+ THE ,GOBLET ,PERIOD>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,BFLY-HOVERS> THE .L ,PERIOD>
+ <RTRUE>)>
+ <COND (<HERE? <LOC ,ARCH>>)
+ (<PROB 66>
+ <TELL CTHE ,BFLY <PICK-NEXT ,BFLY-DOINGS> ,PERIOD>
+ <RTRUE>)>
+ <RETURN <NEXT-BFLY-ROOM? ,HERE>>)>
+ <COND (<ZERO? .L>
+ <RFALSE>)
+ (<NOT <IN? .L ,ROOMS>>
+ <COND (<T? .FREE>
+ <MOVE ,BFLY <LOC .L>>)>
+ <RFALSE>)
+ (<PROB 66>
+ <RFALSE>)>
+ <RETURN <NEXT-BFLY-ROOM? .L>>>
+
+<ROUTINE NEXT-BFLY-ROOM? (L "AUX" DIR CNT TBL TYPE X RM)
+ <COND (<NOT <IN? .L ,ROOMS>>
+ <RFALSE>)>
+ <SET CNT 1>
+ <SET DIR ,I-NORTH>
+ <REPEAT ()
+ <SET TBL <GETP .L <GETB ,PDIR-LIST .DIR>>>
+ <COND (<T? .TBL>
+ <SET X <GET .TBL ,XTYPE>>
+ <SET TYPE <MSB .X>>
+ <COND (<OR <EQUAL? .TYPE ,CONNECT ,SCONNECT ,X-EXIT>
+ <AND <EQUAL? .TYPE ,DCONNECT>
+ <IS? <GET .TBL ,XDATA> ,OPENED>>
+ <AND <EQUAL? .TYPE ,FCONNECT>
+ <BAND .X 127>>>
+ <SET RM <GET .TBL ,XROOM>>
+ <COND (<EQUAL? .RM .L ,ON-BRIDGE ,IN-FROON>)
+ (<EQUAL? .RM ,APLANE ,IN-SPLENDOR
+ <LOC ,ARCH>>)
+ (<AND <NOT <PLAIN-ROOM? .RM>>
+ <NOT <IS? ,BFLY ,IDENTIFIED>>>)
+ (<AND <IS? .RM ,INDOORS>
+ <NOT <IS? .L ,INDOORS>>>)
+ (<AND <EQUAL? .RM ,HERE>
+ <NOT <WEARING-MAGIC? ,CLOAK>>>
+ <SET CNT 2>
+ <PUT ,GOOD-DIRS 2 .DIR>
+ <RETURN>)
+ (T
+ <INC CNT>
+ <PUT ,GOOD-DIRS .CNT .DIR>)>)>)>
+ <COND (<IGRTR? DIR ,I-NW>
+ <RETURN>)>>
+ <COND (<EQUAL? .CNT 1>
+ <RFALSE>)
+ (<EQUAL? .CNT 2>
+ <SET DIR <GET ,GOOD-DIRS 2>>)
+ (T
+ <PUT ,GOOD-DIRS 0 .CNT>
+ <PUT ,GOOD-DIRS 1 0>
+ <SET DIR <PICK-ONE ,GOOD-DIRS>>)>
+ <SET RM <GET <GETP .L <GETB ,PDIR-LIST .DIR>> ,XROOM>>
+ <COND (<EQUAL? .L ,HERE>
+ <MOVE ,BFLY .RM>
+ <BFLY-FLIES .DIR>
+ <RTRUE>)
+ (<EQUAL? .RM ,HERE>
+ <BFLY-ARRIVES .DIR>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE BFLY-FLIES ("OPT" DIR)
+ <WINDOW ,SHOWING-ROOM>
+ <TELL CTHE ,BFLY " flutters away">
+ <COND (<ASSIGNED? DIR>
+ <TELL " to the " B <GET ,DIR-NAMES .DIR>>)>
+ <PRINT ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE BFLY-ARRIVES ("OPT" DIR)
+ <WINDOW ,SHOWING-ROOM>
+ <SETG P-IT-OBJECT ,BFLY>
+ <MOVE ,BFLY ,HERE>
+ <MAKE ,BFLY ,SEEN>
+ <MAKE ,BFLY ,IDENTIFIED>
+ <TELL ,TAB>
+ <COND (<IS? ,BFLY ,TOUCHED>
+ <TELL ,XTHE>)
+ (T
+ <MAKE ,BFLY ,TOUCHED>
+ <TELL ,XA>)>
+ <TELL D ,BFLY " flutters into view">
+ <COND (<ASSIGNED? DIR>
+ <SET DIR <+ .DIR 4>>
+ <COND (<G? .DIR ,I-NW>
+ <SET DIR <- .DIR 8>>)>
+ <TELL " from the " B <GET ,DIR-NAMES .DIR>>)>
+ <PRINT ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE I-PILLAR ("AUX" L)
+ <SET L <LOC ,BFLY>>
+ <COND (<ZERO? .L>
+ <RFALSE>)
+ (<NOT <IS? ,BFLY ,LIVING>>
+ <RFALSE>)
+ (<VISIBLE? ,BFLY>
+ <COND (<IS? ,BFLY ,SEEN>
+ <UNMAKE ,BFLY ,SEEN>
+ <RFALSE>)
+ (<IN? .L ,ROOMS>
+ <VANISH ,BFLY>
+ <DEQUEUE ,I-PILLAR>
+ <TELL ,TAB CTHE ,BFLY
+" seems to have crawled out of sight." CR>
+ <RTRUE>)
+ (<PROB 90>
+ <RFALSE>)>
+ <MAKE ,BFLY ,SEEN>
+ <TELL ,TAB CTHE ,BFLY>
+ <COND (<PROB 50>
+ <TELL <PICK-NEXT ,PILLAR-DOINGS>>)
+ (T
+ <TELL <PICK-NEXT ,PILLAR-MOVES>>
+ <COND (<EQUAL? .L ,PLAYER>
+ <SET L ,HANDS>)
+ (<NOT <EQUAL? .L ,HERE>>)
+ (<IS? ,HERE ,INDOORS>
+ <SET L ,FLOOR>)
+ (T
+ <SET L ,GROUND>)>
+ <TELL THE .L>)>
+ <TELL ,PERIOD>
+ <RTRUE>)
+ (<NOT <IN? .L ,ROOMS>>
+ <RFALSE>)
+ (<PROB 33>
+ <REMOVE ,BFLY>
+ <DEQUEUE ,I-PILLAR>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<CONSTANT INIT-CLERIC-SCRIPT 4>
+<GLOBAL CLERIC-SCRIPT:NUMBER ,INIT-CLERIC-SCRIPT>
+
+<ROUTINE I-CLERIC ("AUX" X)
+ <COND (<NOT <HERE? IN-CHAPEL>>
+ <RFALSE>)
+ (<IS? ,CLERIC ,SEEN>
+ <UNMAKE ,CLERIC ,SEEN>
+ <RFALSE>)>
+ <TELL ,TAB>
+ <COND (<IGRTR? CLERIC-SCRIPT ,INIT-CLERIC-SCRIPT>
+ <SETG CLERIC-SCRIPT 0>
+ <TELL CTHE ,CLERIC " lifts his eyes as you walk in">
+ <COND (<NOT <IS? ,CONGREG ,SEEN>>
+ <MAKE ,CONGREG ,SEEN>
+ <TELL
+". \"Art thou the Savior?\" he cries, and the entire "
+'CONGREG " turns to stare at you" ,PTAB
+"\"Naw,\" sneers an unseen voice. \"Just some ">
+ <SET X ,W?GUY>
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <SET X ,W?DAME>)>
+ <TELL B .X>
+ <COND (<SEE-ANYTHING-IN? ,PLAYER>
+ <TELL ,WITH A <FIRST? ,PLAYER>>)>
+ <TELL ,PERQ ,TAB "\"Oh,\" mumbles " THE ,CLERIC
+" with a sigh of resignation. \"Have a seat, good ">
+ <SET X ,W?SIR>
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <SET X ,W?MISS>)>
+ <TELL B .X ", and join us in our hour of need.\"" CR>
+ <RTRUE>)>
+ <TELL ", and bows his head in sorrow." CR>
+ <RTRUE>)
+ (<EQUAL? ,CLERIC-SCRIPT 1>
+ <TELL C ,QUOTATION <PICK-NEXT ,CLERIC-WOES> C ,EXCLAM>
+ <CLERIC-WHINES>
+ <TELL
+"Behold! The wrath of the Trees is almost upon us. When the Glyph of Warding is melted, the village will be lost!\"" CR>
+ <CROWD-AGREES>
+ <RTRUE>)
+ (<EQUAL? ,CLERIC-SCRIPT 2>
+ <TELL "\"Who can stop the marching Trees?">
+ <CLERIC-WHINES>
+ <TELL
+"Orkan's Glyphs are all that keep the monsters at bay. But Orkan answers not our summons; only one Glyph remains, and that is writ in snow!\"" CR>
+ <CROWD-AGREES>
+ <RTRUE>)
+ (<EQUAL? ,CLERIC-SCRIPT 3>
+ <TELL "\"The southern mountains are their nest,">
+ <CLERIC-WHINES>
+ <TELL
+"They march relentlessly, choking the valley with their foul gifts and blasphemous songs. They know the wizard's Glyph is melting, and with it fades our only hope!\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,CLERIC-SCRIPT ,INIT-CLERIC-SCRIPT>
+ <SETG CLERIC-SCRIPT 0>
+ <TELL "\"Where is the Savior of whom our legends speak?">
+ <CLERIC-WHINES>
+ <TELL "Anything ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "s">)>
+ <TELL "he asks will be ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "her">)
+ (T
+ <TELL "his">)>
+ <TELL " reward, if only ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "s">)>
+ <TELL
+"he fulfills the ancient prophecy, and drives the plague of Tree-daemons from our doorstep!\"" CR>
+ <CROWD-AGREES>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE CLERIC-WHINES ("AUX" X)
+ <WHIMPERS ,CLERIC>
+ <COND (<PROB 50>
+ <TELL ", ">
+ <SET X <RANDOM 100>>
+ <COND (<L? .X 33>
+ <TELL "beating his breast">)
+ (<L? .X 67>
+ <TELL "wringing his hands">)
+ (T
+ <TELL "covering his face">)>
+ <COND (<PROB 50>
+ <COND (<PROB 50>
+ <TELL " in supplication">)
+ (T
+ <TELL " hopelessly">)>)>)>
+ <TELL ". \"">
+ <RFALSE>>
+
+<ROUTINE CROWD-AGREES ()
+ <COND (<PROB 33>
+ <TELL ,TAB C ,QUOTATION <PICK-NEXT ,CLERIC-WOES> C ,EXCLAM>
+ <WHIMPERS ,CONGREG>
+ <PRINT ,PERIOD>)>
+ <RFALSE>>
+
+<ROUTINE WHIMPERS (OBJ "AUX" X)
+ <TELL "\" ">
+ <SET X <RANDOM 100>>
+ <COND (<L? .X 33>
+ <TELL "mourn">)
+ (<L? .X 67>
+ <TELL "whine">)
+ (T
+ <TELL "whimper">)>
+ <TELL "s " THE .OBJ>
+ <RFALSE>>
+
+<ROUTINE I-THRIFF-WIN ()
+ <COND (<NOT <VISIBLE? ,CLERIC>>
+ <RFALSE>)
+ (<IS? ,CLERIC ,SEEN>
+ <UNMAKE ,CLERIC ,SEEN>
+ <RFALSE>)>
+ <INC CLERIC-SCRIPT>
+ <TELL ,TAB>
+ <COND (<EQUAL? ,CLERIC-SCRIPT 1>
+ <TELL "\"Congratulations, honored ">
+ <SAY-SORC>
+ <TELL ",\" booms " THE ,CLERIC
+" over the crowd's cheers. \"Truly, thou art the Savior foretold in our eldest legends. Would that Orkan were here to witness this day.\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,CLERIC-SCRIPT 2>
+ <TELL "\"What reward wouldst thou claim of us?\" asks "
+ THE ,CLERIC ", carefully holding ">
+ <PRINT "the reliquary behind his back. \"">
+ <TELL "Ask for anything, and it shall be yours!\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,CLERIC-SCRIPT 3>
+ <TELL
+"\"Anything we possess is yours for the asking,\" repeats "
+THE ,CLERIC ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? ,CLERIC-SCRIPT 4>
+ <TELL CTHE ,CLERIC " adjusts ">
+ <PRINT "the reliquary behind his back. \"">
+ <TELL "Perchance we have nothing to tempt such a mighty ">
+ <SAY-SORC>
+ <TELL ",\" he remarks hopefully." CR>
+ <RTRUE>)>
+ <EXIT-CLERIC>
+ <TELL CTHE ,CONGREG " is beginning to wander away" ,PTAB
+"\"Your reticence betrays your humility, honored one,\" says the Cardinal, bowing his head. \"No doubt you have forsworn earthly gifts in lieu of some greater reward in the afterlife. In that case, farewell!\"|
+ Clutching " THE ,RELIQUARY ", " THE ,CLERIC>
+ <PRINT " disappears into the ">
+ <TELL "crowd. In moments, the place is deserted." CR>
+ <RTRUE>>
+
+<ROUTINE EXIT-CLERIC ()
+ <DEQUEUE ,I-THRIFF-WIN>
+ <REMOVE ,CLERIC>
+ <SETG P-HIM-OBJECT ,NOT-HERE-OBJECT>
+ <REMOVE ,CONGREG>
+ <SETG P-THEM-OBJECT ,NOT-HERE-OBJECT>
+ <WINDOW ,SHOWING-ALL>
+ <RFALSE>>
+
+<CONSTANT INIT-TRUFFLE 50>
+<GLOBAL TRUFFLE-TIMER 0>
+
+<ROUTINE I-TRUFFLE ("AUX" V)
+ <COND (<NOT <LOC ,TRUFFLE>>
+ <SETG TRUFFLE-TIMER 0>
+ <DEQUEUE ,I-TRUFFLE>
+ <RFALSE>)
+ (<HERE? APLANE IN-SPLENDOR>
+ <RFALSE>)>
+ <SET V <VISIBLE? ,TRUFFLE>>
+ <COND (<HERE? APLANE IN-SPLENDOR>
+ <RFALSE>)
+ (<DLESS? TRUFFLE-TIMER 1>
+ <SETG TRUFFLE-TIMER 0>
+ <DEQUEUE ,I-TRUFFLE>
+ <VANISH ,TRUFFLE>
+ <COND (<T? .V>
+ <TELL ,TAB "All that's left of " THE ,TRUFFLE
+ " is a yummy memory." CR>
+ <RTRUE>)>
+ <RFALSE>)
+ (<ZERO? .V>
+ <RFALSE>)
+ (<EQUAL? ,TRUFFLE-TIMER 10>
+ <TELL ,TAB CTHE ,TRUFFLE
+ " looks terribly soft">
+ <PRINT
+". It probably won't last much longer.|">
+ <RTRUE>)
+ (<EQUAL? ,TRUFFLE-TIMER 30>
+ <TELL ,TAB CTHE ,TRUFFLE
+" looks as if it's beginning to soften." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<GLOBAL PTIMER:NUMBER 0>
+
+<ROUTINE I-QUEEN ("AUX" X)
+ <COND (<NOT <HERE? IN-GARDEN>>
+ <RFALSE>)>
+ <INC PTIMER>
+ <COND (<EQUAL? ,PTIMER 1>
+ <RFALSE>)
+ (<EQUAL? ,PTIMER 2>
+ <TELL ,TAB
+"Voices can be heard somewhere in the distance." CR>
+ <RTRUE>)
+ (<EQUAL? ,PTIMER 3>
+ <TELL ,TAB
+"One of the unseen voices laughs harshly." CR>
+ <RTRUE>)
+ (<EQUAL? ,PTIMER 4>
+ <UNMAKE ,QUEEN ,NODESC>
+ <TELL ,TAB ,YOU-HEAR
+"a chorus of unpleasant giggles. \"I'll be in my garden,\" calls one of the voices." CR>
+ <RTRUE>)
+ (<EQUAL? ,PTIMER 5>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB
+"A whirlpool of twinkling light forms in " THE ,GARDEN
+". Something is beginning to materialize!" CR>
+ <COND (<AND <IN? ,DACT ,HERE>
+ <IS? ,DACT ,LIVING>
+ <NOT <IS? ,DACT ,SLEEPING>>>
+ <MAKE ,DACT ,SEEN>
+ <TELL ,TAB CTHE ,DACT
+" beats its wings restlessly." CR>)>
+ <COND (<AND <VISIBLE? ,MINX>
+ <IS? ,MINX ,LIVING>
+ <NOT <IS? ,MINX ,SLEEPING>>>
+ <MAKE ,MINX ,SEEN>
+ <TELL ,TAB CTHE ,MINX
+" whimpers fearfully as " THE ,GARDEN " brightens">
+ <COND (<NOT <IN? ,MINX ,BUSH>>
+ <SET X <LOC ,MINX>>
+ <MOVE ,MINX ,BUSH>
+ <WINDOW ,SHOWING-ALL>
+ <TELL ". Before you can stop her, she ">
+ <COND (<NOT <EQUAL? .X ,IN-GARDEN>>
+ <TELL "leaps away from ">
+ <COND (<EQUAL? .X ,PLAYER>
+ <TELL "your grasp">)
+ (T
+ <TELL THE .X>)>
+ <TELL ", ">)>
+ <TELL
+"streaks across the lawn and disappears behind " THE ,BUSH>)>
+ <TELL ,PERIOD>)>
+ <RTRUE>)
+ (<EQUAL? ,PTIMER 6>
+ <WINDOW ,SHOWING-ROOM>
+ <MOVE ,QUEEN ,HERE>
+ <SEE-CHARACTER ,QUEEN>
+ <TELL ,TAB
+"The twinkling whirl resolves into a furry creature. Her face is turned away at the moment, but there's a flat tail sticking out from under her long, red gown." CR>
+ <TOPPLED? ,QUEEN>
+ <RTRUE>)
+ (<EQUAL? ,PTIMER 7>
+ <WINDOW ,SHOWING-ROOM>
+ <PUTP ,QUEEN ,P?SDESC 0>
+ <TELL ,TAB
+"The furry creature turns around, revealing her dark, beady eyes and fleshy bill. She's a platypus!" CR>
+ <COND (<OR <IN? ,DACT ,HERE>
+ <NOT <IN? ,PLAYER ,BUSH>>>
+ <QUEEN-SEES-YOU>)>
+ <RTRUE>)
+ (<EQUAL? ,PTIMER 8>
+ <MOVE ,JAR ,QUEEN>
+ <MAKE ,BROG ,CONTAINER>
+ <MAKE ,BROG ,OPENABLE>
+ <MAKE ,BROG ,OPENED>
+ <REPLACE-SYN? ,BROG ,W?ZZZP ,W?COMPARTMENT>
+ <REPLACE-ADJ? ,BROG ,W?ZZZP ,W?SECRET>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB CTHE ,QUEEN " steps over to " THE ,BROG
+", glancing around to be sure she is alone. Then she opens a secret compartment and pulls out " A ,JAR ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? ,PTIMER 9>
+ <CREATE-MIRROR? ,MIRROR0>
+ <TELL ,TAB CTHE ,QUEEN
+" opens the jar, takes out a circlet and blows a silver bubble. You watch as the bubble flattens into a round mirror, rotating slowly on its edge." CR>
+ <RTRUE>)
+ (<EQUAL? ,PTIMER 10>
+ <TELL ,TAB CTHE ,QUEEN
+" stops the spinning mirror and turns it until it faces her. Gazing into it she whispers,|
+|
+ \"Mirror, mirror in the air,|
+ Who in Quendor is most fair?\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,PTIMER 11>
+ <TELL
+" The floating mirror shimmers, and a hollow voice says,|
+|
+ \"Your Highness once was fair, 'tis true.|
+ But Morning-Star is ">
+ <ITALICIZE "woo woo woo">
+ <TELL "!\"" CR>
+ <RTRUE>)
+ (<EQUAL? ,PTIMER 12>
+ <UNMAKE ,BROG ,OPENED>
+ <MOVE ,JAR ,BROG>
+ <DESTROY-MIRROR ,MIRROR0>
+ <DEQUEUE ,I-MIRRORS>
+ <REMOVE ,QUEEN>
+ <DEQUEUE ,I-QUEEN>
+ <SETG PTIMER 0>
+ <SETG P-HER-OBJECT ,NOT-HERE-OBJECT>
+ <TELL " \"Liar!\" cries " THE ,QUEEN
+", bursting the mirror with an angry swipe. She stows " THE ,JAR
+" back in " THE ,BROG
+", blows a silver whistle and dissolves in a whirlpool of color." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE I-DUST ("OPT" INDENT "AUX" V)
+ <SET V <VISIBLE? ,DUST>>
+ <COND (<ASSIGNED? INDENT>)
+ (<IS? ,DUST ,SEEN>
+ <UNMAKE ,DUST ,SEEN>
+ <RFALSE>)
+ (T
+ <TELL ,TAB>)>
+ <MAKE ,DUST ,SEEN>
+ <COND (<EQUAL? ,BUNNIES 1>
+ <SETG P-THEM-OBJECT ,DUST>
+ <PUTP ,DUST ,P?SDESC 0>
+ <MAKE ,DUST ,PLURAL>
+ <COND (<T? .V>
+ <TELL "With an ominous ">
+ <HLIGHT ,H-ITALIC>
+ <TELL "poof">
+ <HLIGHT ,H-NORMAL>
+ <TELL ", the dust bunny divides itself in two." CR>)>)
+ (<T? .V>
+ <HLIGHT ,H-ITALIC>
+ <TELL "Poof">
+ <HLIGHT ,H-NORMAL>
+ <TELL ". " CTHE ,DUST <PICK-NEXT ,BUNNY-SPLITS> ,PERIOD>)>
+ <MORE-BUNNIES>
+ <RETURN .V>>
+
+<ROUTINE MORE-BUNNIES ("AUX" X)
+ <COND (<G? ,BUNNIES ,BMAX>
+ <RTRUE>)
+ (<EQUAL? ,BUNNIES ,BMAX>
+ <INC BUNNIES>)
+ (T
+ <SET X ,BUNNIES>
+ <SETG BUNNIES <+ ,OBUNNIES ,BUNNIES>>
+ <SETG OBUNNIES .X>)>
+ <WINDOW ,SHOWING-ROOM>
+ <RFALSE>>
+
+<ROUTINE I-MARE-SEES ()
+ <DEQUEUE ,I-MARE-SEES>
+ <COND (<NOT <HERE? IN-SPLENDOR>>
+ <RFALSE>)>
+ <TELL ,TAB>
+ <UNICORNS-FLEE "as you stand gawking at the landscape">
+ <RTRUE>>
+
+<ROUTINE I-ARREST ("OPT" INDENT "AUX" RM OBJ NXT)
+ <DEQUEUE ,I-ARREST>
+ <COND (<NOT <HERE? IN-SPLENDOR>>
+ <RFALSE>)>
+ <COND (<NOT <ASSIGNED? INDENT>>
+ <TELL ,TAB ,XTHE>)
+ (T
+ <TELL "As you step across the glade, the ">)>
+ <TELL
+"stillness is broken by the rumble of approaching hooves. Before you can think or move, you find yourself enclosed by a dozen sharp horns, each backed by a unicorn in full military regalia.|
+ A magnificent stallion regards you with calm authority. \"You">
+ <COND (<IS? ,HERD ,SEEN>
+ <TELL "r fate is sealed">)
+ (T
+ <TELL " will find no welcome here">)>
+ <TELL ", earth-dweller,\" whispers a stern voice in your mind. \"">
+ <COND (<IS? ,HERD ,SEEN>
+ <TELL
+"The injustice that drove us to this Plane is now yours. Forever.\""
+CR ,TAB
+"A painful metal bit is forced into your mouth, and a wagonload of overweight, aristocratic unicorns is attached. The rest of your life is spent hauling this laughing burden in a small circle, with infrequent stops for dirty water and oats">
+ <JIGS-UP>
+ <RTRUE>)>
+
+ <MAKE ,HERD ,SEEN>
+ <TELL
+"Our children must never know the pain we suffered at the hands of Men. Return to your people now, and describe the fate awaiting any who dares to violate our solitude again.\"" CR ,TAB
+"A lifetime of humiliating drudgery passes before your eyes. You cry out with pain and heartache as you haul wagons full of overweight aristocrats, standing silent and powerless as cruel taskmasters whip you over and over again...">
+ <CARRIAGE-RETURNS>
+ <SAFE-VEHICLE-EXIT>
+ <SET RM <META-LOC ,CHEST>>
+ <COND (<SET OBJ <FIRST? ,IN-SPLENDOR>>
+ <REPEAT ()
+ <SET NXT <NEXT? .OBJ>>
+ <COND (<EQUAL? .OBJ ,WINNER>)
+ (<IS? .OBJ ,TAKEABLE>
+ <MOVE .OBJ .RM>)>
+ <SET OBJ .NXT>
+ <COND (<ZERO? .OBJ>
+ <RETURN>)>>)>
+ <SETG P-WALK-DIR <>>
+ <GOTO .RM>
+ <RTRUE>>
+
+<GLOBAL CHOKE:NUMBER 0>
+
+<ROUTINE I-STRANGLE ("AUX" X)
+ <SET X <GET ,STATS ,ENDURANCE>>
+ <TELL ,TAB>
+ <COND (<L? ,CHOKE .X>
+ <TELL <PICK-NEXT ,STRANGLES>>
+ <COND (<L? </ .X ,CHOKE> 2>
+ <TELL ". Your endurance won't last much longer">)>
+ <TELL "!" CR>
+ <UPDATE-STAT <- 0 ,CHOKE>>
+ <RTRUE>)>
+ <UPDATE-STAT <- 0 .X>>
+ <TELL
+"The choking fingers drain your endurance to its limit. As your consciousness sinks into oblivion, you feel " THE ,SKELETON " draping " B ,W?SOMETHING
+" around your neck">
+ <JIGS-UP>
+ <RTRUE>>
+
+<ROUTINE NOLUCK? ("AUX" CNT LEN OBJ)
+ <SET LEN <GET ,LUCKY-OBJECTS 0>>
+ <REPEAT ()
+ <SET OBJ <GET ,LUCKY-OBJECTS .LEN>>
+ <COND (<AND <IN? .OBJ ,PLAYER>
+ <NOT <IS? .OBJ ,NEUTRALIZED>>>
+ <SET CNT <GETP .OBJ ,P?DNUM>>
+ <COND (<DLESS? CNT 1>
+ <VANISH .OBJ>
+ <TELL ,TAB>
+ <ITALICIZE "Poof">
+ <TELL "! " CTHE .OBJ
+ " is consumed in a silent flash of green." CR>
+ <RFALSE>)>
+ <PUTP .OBJ ,P?DNUM .CNT>
+ <TELL ,TAB ,CYOUR D .OBJ " flickers green">
+ <COND (<EQUAL? .CNT 1>
+ <TELL " again, less brightly than before">)>
+ <PRINT ,PERIOD>
+ <RFALSE>)>
+ <COND (<DLESS? LEN 1>
+ <RTRUE>)>>>
+
+<GLOBAL GRUE-KILLS:NUMBER 0>
+
+<ROUTINE I-GRUE ("AUX" SEE L DIR TBL DEST DAMAGE X)
+ <COND (<T? ,LIT?>
+ <RFALSE>)
+ (<HERE? IN-LAIR>
+ <RFALSE>)
+ (<NOT <GRUE-ROOM?>>
+ <RFALSE>)>
+ <SET SEE <WEARING-MAGIC? ,HELM>>
+ <COND (<IN? ,GRUE ,HERE>
+ <COND (<L? <GETP ,GRUE ,P?ENDURANCE> 1>
+ <COND (<IGRTR? GRUE-KILLS 2>
+ <DEQUEUE ,I-GRUE>)>
+ <TELL ,TAB>
+ <COND (<T? .SEE>
+ <TELL CTHE ,GRUE " retreats">)
+ (T
+ <TELL ,YOU-HEAR B ,W?SOMETHING " retreat">)>
+ <TELL " into the darkness." CR>
+ <UPDATE-STAT <GETP ,GRUE ,P?VALUE> ,EXPERIENCE T>
+ <EXUENT-MONSTER ,GRUE>
+ <PUTP ,GRUE ,P?ENDURANCE <GETP ,GRUE ,P?EMAX>>
+ <RTRUE>)>
+ <NEXT-ENDURANCE? ,GRUE>
+ <TELL ,TAB>
+ <COND (<T? .SEE>
+ <TELL CTHE ,GRUE>)
+ (T
+ <TELL "Something">)>
+ <TELL " strikes out at you">
+ <SET DAMAGE <MONSTER-STRIKES? ,GRUE>>
+ <COND (<ZERO? .DAMAGE>
+ <TELL ", but misses." CR>
+ <RTRUE>)
+ (<ZERO? ,STATIC>
+ <TELL ". Ouch!" CR>)
+ (T
+ <TELL ,PERIOD>)>
+ <UPDATE-STAT <MSPARK? ,GRUE .DAMAGE>>
+ <RTRUE>)
+ (<IS? ,GRUE ,SURPRISED>
+ <UNMAKE ,GRUE ,SURPRISED>
+ <RFALSE>)>
+ <MOVE ,GRUE ,HERE>
+ <SEE-MONSTER ,GRUE>
+ <COND (<T? .SEE>
+ <WINDOW ,SHOWING-ROOM>)>
+ <TELL ,TAB>
+ <COND (<T? .SEE>
+ <TELL "A presence">)
+ (T
+ <TELL "Something">)>
+ <TELL " lurks into the passage." CR>
+ <RTRUE>>
+
+<ROUTINE I-WIGHT ("AUX" DAMAGE)
+ <COND (<HERE? ON-TRAIL>
+ <COND (<L? <GETP ,WIGHT ,P?ENDURANCE> 1>
+ <TELL ,TAB>
+ <COND (<NOT <IS? ,WIGHT ,SLEEPING>>
+ <TELL "Battered and confused, " THE ,WIGHT
+" backs over the edge of the cliff, shrieks and tumbles out of sight." CR>)>
+ <KILL-MONSTER ,WIGHT>
+ <MOVE ,DIAMOND ,ON-TRAIL>
+ <SETG P-IT-OBJECT ,DIAMOND>
+ <TELL ,TAB "Something lands at your feet with a ">
+ <ITALICIZE "plop">
+ <TELL ,PERIOD>
+ <RTRUE>)
+ (<IS? ,WIGHT ,SURPRISED>
+ <SEE-MONSTER ,WIGHT>
+ <COND (<NOT <IS? ,WIGHT ,SLEEPING>>
+ <TELL ,TAB CTHE ,WIGHT
+ " whirls to face you." CR>
+ <TOPPLED? ,WIGHT>
+ <RTRUE>)>)>
+ <COND (<STILL-SLEEPING? ,WIGHT>
+ <RTRUE>)>
+ <NEXT-ENDURANCE? ,WIGHT>
+ <SET DAMAGE <MONSTER-STRIKES? ,WIGHT>>
+ <TELL ,TAB CTHE ,WIGHT>
+ <COND (<T? .DAMAGE>
+ <TELL " claws at you viciously.">
+ <COND (<ZERO? ,STATIC>
+ <TELL " Ouch!">)>
+ <CRLF>
+ <UPDATE-STAT <MSPARK? ,WIGHT .DAMAGE>>
+ <RTRUE>)>
+ <TELL " strikes out at you, but misses." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<GLOBAL LAVA-TIMER:NUMBER 0>
+
+<ROUTINE I-LAVA ()
+ <COND (<DLESS? LAVA-TIMER 1>
+ <COND (<HERE? FOREST-EDGE ON-TRAIL ON-PEAK IN-CABIN>
+ <CASCADE>
+ <RTRUE>)>
+ <REMOVE ,PLUME>
+ <SETG LAVA-TIMER 0>
+ <DEQUEUE ,I-LAVA>
+ <MOVE ,MAGMA-GLOW ,IN-THRIFF>
+ <SETG MAGMA-TIMER 4>
+ <QUEUE ,I-MAGMA>
+ <EMPTY-ROOM ,FOREST-EDGE>
+ <PUTP ,FOREST-EDGE ,P?SDESC 0>
+ <COND (<NOT <HERE? IN-THRIFF>>
+ <RFALSE>)>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB
+"A violent tremor wracks the earth and sends you sprawling. You bravely cover your eyes to await the tide of magma that will sweep you and Thriff into oblivion...|||||||The silence gets the better of your curiosity." CR>
+ <RTRUE>)
+
+ (<EQUAL? ,LAVA-TIMER 1>
+ <COND (<HERE? ON-TRAIL ON-PEAK IN-CABIN>
+ <CASCADE>
+ <RTRUE>)>
+ <REMOVE ,MAILBOX>
+ <PUTP ,ON-TRAIL ,P?SOUTH 0>
+ <PUTP ,ON-TRAIL ,P?IN 0>
+ <REPLACE-GLOBAL? ,ON-TRAIL ,CABIN ,NULL>
+ <COND (<IN? ,WIGHT ,ON-TRAIL>
+ <REMOVE ,WIGHT>
+ <DEQUEUE ,I-WIGHT>)>
+ <EMPTY-ROOM ,ON-TRAIL>
+ <COND (<NOT <HERE? FOREST-EDGE IN-THRIFF>>
+ <RFALSE>)>
+ <TELL ,TAB CTHE ,GROUND " trembles with seismic distress">
+ <COND (<HERE? IN-THRIFF>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <TELL
+" as a deadly torrent of lava sweeps down the western slope, only seconds away!" CR>
+ <RTRUE>)
+
+ (<EQUAL? ,LAVA-TIMER 2>
+ <COND (<HERE? ON-PEAK>
+ <CASCADE>
+ <RTRUE>)>
+ <EMPTY-ROOM ,ON-PEAK>
+ <COND (<NOT <HERE? ON-TRAIL FOREST-EDGE IN-THRIFF IN-CABIN>>
+ <RFALSE>)>
+ <TELL ,TAB "Powerful shock waves rock the mountainside">
+ <COND (<HERE? IN-CABIN>
+ <TELL ", and the entire cabin shudders." CR>
+ <RTRUE>)
+ (<HERE? IN-THRIFF FOREST-EDGE>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <TELL
+" as a red-hot wall of liquid rock roars down the trail, only seconds behind you!" CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE CASCADE ("OPT" STR)
+ <COND (<ASSIGNED? STR>
+ <TELL "As you " .STR " the lava, a cascade of it ">)
+ (T
+ <TELL ,TAB "A cascade of lava ">)>
+ <COND (<HERE? IN-CABIN>
+ <TELL "buries " THE ,CABIN>)
+ (T
+ <COND (<NOT <HERE? ON-PEAK>>
+ <TELL "roars down the mountainside and ">)>
+ <TELL "knocks you off your feet, burying you">)>
+ <TELL " instantly under tons of molten rock">
+ <COND (<WEARING-MAGIC? ,RING>
+ <TELL
+"! Your magic ring miraculously shields you from the volcanic heat, but not from the inconvenience of having nothing to breathe">)>
+ <JIGS-UP>
+ <RTRUE>>
+
+<ROUTINE EMPTY-ROOM (RM "AUX" OBJ NXT)
+ <COND (<SET OBJ <FIRST? .RM>>
+ <REPEAT ()
+ <SET NXT <NEXT? .OBJ>>
+ <COND (<IS? .OBJ ,TAKEABLE>
+ <REMOVE .OBJ>)>
+ <SET OBJ .NXT>
+ <COND (<ZERO? .OBJ>
+ <RETURN>)>>)>
+ <REPLACE-GLOBAL? .RM ,SNOW ,LAVA>
+ <REPLACE-GLOBAL? .RM ,GLYPH ,NULL>
+ <RFALSE>>
+
+<GLOBAL MAGMA-TIMER:NUMBER 0>
+
+<VOC "CRUST" NOUN>
+
+<ROUTINE I-MAGMA ("AUX" TBL X)
+ <SET TBL <GETPT ,MAGMA-GLOW ,P?ADJECTIVE>>
+ <COND (<DLESS? MAGMA-TIMER 1>
+ <SETG MAGMA-TIMER 0>
+ <DEQUEUE ,I-MAGMA>
+ <REMOVE ,MAGMA-GLOW>
+ <REPLACE-SYN? ,LAVA ,W?ZZZP ,W?CRUST>
+ <COND (<HERE? IN-THRIFF FOREST-EDGE ON-TRAIL ON-PEAK>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB "The red glow ">
+ <COND (<HERE? IN-THRIFF>
+ <TELL
+"from the south slowly fades from view">)
+ (T
+ <TELL
+"of the lava fades, leaving a hard crust underfoot">)>
+ <PRINT ,PERIOD>)>
+ <COND (<GLOBAL-IN? ,FOREST-EDGE ,GLYPH>
+ <SETG THRIFF-WON T>
+ <DEQUEUE ,I-CLERIC>
+ <MAKE ,CLERIC ,LIVING>
+ <SETG CLERIC-SCRIPT 0>
+ <UNMAKE ,CLERIC ,SEEN>
+ <QUEUE ,I-THRIFF-WIN>
+ <QUEUE ,I-UNHAPPY-XTREES>
+ <MAKE ,XTREES ,SEEN>
+ <MOVE ,RELIQUARY ,CLERIC>
+ <COND (<HERE? IN-CHAPEL>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB
+"A messenger nymph appears above " THE ,ALTAR
+". \"Hooray!\" she cries. \"">
+ <PRINT-TABLE ,CHARNAME>
+ <TELL " outfoxed " THE ,XTREES "!\"" CR>
+ <RTRUE>)>
+ <UNMAKE ,CLERIC ,NODESC>
+ <SET X ,FOREST-EDGE>
+ <COND (<HERE? IN-THRIFF>
+ <SET X ,HERE>)>
+ <MOVE ,CLERIC .X>
+ <MOVE ,CONGREG .X>
+ <COND (<EQUAL? ,HERE .X>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB "A cheering crowd">
+ <COND (<HERE? IN-THRIFF>
+ <TELL " streams out of "
+ THE ,CHAPEL>)
+ (T
+ <PRINT " appears from the ">
+ <TELL "village">)>
+ <TELL ", led by " THE ,CLERIC ,PERIOD>
+ <RTRUE>)>)>
+
+ <COND (<HERE? FOREST-EDGE>
+ <SAY-XTREES>
+ <TELL
+" test the edges of the clearing with their roots">
+ <COND (<AND <IS? ,BFLY ,MUNGED>
+ <IS? ,BFLY ,LIVING>
+ <OR <IN? ,BFLY ,PLAYER>
+ <IN? ,BFLY ,HERE>>>
+ <TELL
+", but still appear reluctant to approach you." CR>
+ <RTRUE>)>
+ <TELL
+". Finding no Glyphs of Warding or other inconveniences, they elect to ">
+ <XTREES-EAT-YOU T>)>
+
+ <RTRUE>)
+ (<EQUAL? ,MAGMA-TIMER 1>
+ <PUT .TBL 0 ,W?RED>
+ <COND (<HERE? IN-THRIFF>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB "The southern ">
+ <PRINT "glow fades from orange to dull red.|">
+ <RTRUE>)
+ (<NOT <HERE? FOREST-EDGE ON-TRAIL ON-PEAK>>
+ <RFALSE>)>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB "The lava's ">
+ <PRINT "glow fades from orange to dull red.|">
+ <COND (<HERE? FOREST-EDGE>
+ <SAY-XTREES>
+ <TELL
+" shuffle a bit closer to the clearing's edge." CR>)>
+ <RTRUE>)
+ (<EQUAL? ,MAGMA-TIMER 2>
+ <PUT .TBL 0 ,W?ORANGE>
+ <COND (<HERE? IN-THRIFF>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB
+"You watch as the southern glow fades from yellow to orange." CR>
+ <RTRUE>)
+ (<NOT <HERE? FOREST-EDGE ON-TRAIL ON-PEAK>>
+ <RFALSE>)>
+ <WINDOW ,SHOWING-ROOM>
+ <TELL ,TAB
+"The lava's glow fades from yellow to orange as it cools." CR>
+ <COND (<HERE? FOREST-EDGE>
+ <SAY-XTREES>
+ <TELL
+" are keeping well away from the clearing's edge." CR>)>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE SAY-XTREES ()
+ <MAKE ,XTREES ,SEEN>
+ <TELL ,TAB CTHE ,XTREES>
+ <RTRUE>>
+
+<ROUTINE I-XTREES ("AUX" X C)
+ <COND (<GLOBAL-IN? ,FOREST-EDGE ,GLYPH>
+ <COND (<NOT <HERE? FOREST-EDGE>>
+ <RFALSE>)
+ (<IS? ,XTREES ,SEEN>
+ <UNMAKE ,XTREES ,SEEN>
+ <RFALSE>)
+ (<PROB 50>
+ <RFALSE>)>
+ <SAY-XTREES>
+ <COND (<PROB 50>
+ <SET X <PICK-NEXT ,CAROLS>>
+ <TELL <PICK-NEXT ,HOW-SINGS> .X ,PERQ>
+ <RTRUE>)>
+ <TELL <PICK-NEXT ,XTREE-DOINGS> ,PERIOD>
+ <RTRUE>)
+ (<T? ,MAGMA-TIMER>
+ <RFALSE>)
+ (<AND <HERE? FOREST-EDGE IN-THRIFF>
+ <IS? ,BFLY ,MUNGED>
+ <IS? ,BFLY ,LIVING>
+ <OR <IN? ,BFLY ,PLAYER>
+ <IN? ,BFLY ,HERE>>>
+ <SAY-XTREES>
+ <TELL " shuffle nervously at the edge of the ">
+ <COND (<GLOBAL-IN? ,SNOW ,HERE>
+ <TELL B ,W?CLEARING>)
+ (T
+ <TELL B ,W?LAVA>)>
+ <TELL ". They">
+ <PRINT " seem unwilling to approach you.|">
+ <RTRUE>)
+ (<NOT <IS? ,FOREST-EDGE ,MUNGED>>
+ <COND (<HERE? FOREST-EDGE>
+ <XTREES-EAT-YOU>
+ <RTRUE>)>
+ <MAKE ,FOREST-EDGE ,MUNGED>
+ <NEW-EXIT? ,ON-TRAIL ,P?EAST ,FCONNECT ,XTREES-BLOCK>
+ <NEW-EXIT? ,ON-TRAIL ,P?DOWN ,FCONNECT ,XTREES-BLOCK>
+ <NEW-EXIT? ,IN-THRIFF ,P?SOUTH ,FCONNECT ,XTREES-BLOCK>
+ <NEW-EXIT? ,IN-THRIFF ,P?UP ,FCONNECT ,XTREES-BLOCK>
+ <REPLACE-GLOBAL? ,ON-TRAIL ,NULL ,XTREES>
+ <REPLACE-GLOBAL? ,IN-THRIFF ,NULL ,XTREES>
+ <COND (<HERE? IN-THRIFF IN-CHAPEL ON-TRAIL>
+ <XTREES-APPEAR>
+ <RTRUE>)>
+ <RFALSE>)
+ (<NOT <IS? ,IN-THRIFF ,MUNGED>>
+ <COND (<HERE? IN-THRIFF IN-CHAPEL>
+ <XTREES-EAT-YOU>
+ <RTRUE>)>
+ <MAKE ,IN-THRIFF ,MUNGED>
+ <NEW-EXIT? ,IN-PASTURE ,P?SE ,FCONNECT ,XTREES-BLOCK>
+ <NEW-EXIT? ,AT-FALLS ,P?SW ,FCONNECT ,XTREES-BLOCK>
+ <REPLACE-GLOBAL? ,IN-PASTURE ,NULL ,XTREES>
+ <REPLACE-GLOBAL? ,AT-FALLS ,NULL ,XTREES>
+ <COND (<HERE? IN-PASTURE AT-FALLS>
+ <XTREES-APPEAR>
+ <RTRUE>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE XTREES-BLOCK ()
+ <COND (<AND <IN? ,BFLY ,PLAYER>
+ <IS? ,BFLY ,MUNGED>>
+ <TELL CTHE ,XTREES
+" fidget nervously as you approach, but refuse to stand aside." CR>
+ <RFALSE>)>
+ <PRINT "Your path is hopelessly blocked by ">
+ <TELL 'XTREES ,PERIOD>
+ <RFALSE>>
+
+<ROUTINE XTREES-EAT-YOU ("OPT" X)
+ <COND (<NOT <ASSIGNED? X>>
+ <SAY-XTREES>)>
+ <TELL
+" continue their delayed migration into Thriff, cheerfully trampling everything in their path. This includes you">
+ <JIGS-UP>
+ <RTRUE>>
+
+<ROUTINE XTREES-APPEAR ("AUX" X)
+ <WINDOW ,SHOWING-ROOM>
+ <SETG P-THEM-OBJECT ,XTREES>
+ <TELL ,TAB>
+ <COND (<HERE? IN-CHAPEL>
+ <TELL ,YOU-HEAR "a">
+ <PRINT "n ominously cheerful rustling sound ">
+ <TELL "outside." CR>
+ <RTRUE>)>
+ <TELL "A">
+ <PRINT "n ominously cheerful rustling sound ">
+ <TELL "draws your attention to the ">
+ <SET X ,W?SOUTH>
+ <COND (<HERE? IN-PASTURE>
+ <SET X ,W?SOUTHEAST>)
+ (<HERE? AT-FALLS>
+ <SET X ,W?SOUTHWEST>)
+ (<HERE? ON-TRAIL>
+ <SET X ,W?EAST>)>
+ <TELL B .X ", where a solid wall of " 'XTREES
+ " has completely choked the trail." CR>
+ <RTRUE>>
+
+<ROUTINE I-UNHAPPY-XTREES ()
+ <COND (<NOT <HERE? FOREST-EDGE>>
+ <RFALSE>)
+ (<IS? ,XTREES ,SEEN>
+ <UNMAKE ,XTREES ,SEEN>
+ <RFALSE>)
+ (<PROB 50>
+ <RFALSE>)>
+ <SAY-XTREES>
+ <TELL <PICK-NEXT ,SAD-TREES> ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE I-HOUSEFALL ()
+ <COND (<NOT <PLAIN-ROOM?>>
+ <RFALSE>)
+ (<IS? ,FARM ,NODESC>
+ <UNMAKE ,FARM ,NODESC>
+ <RFALSE>)>
+ <DEQUEUE ,I-HOUSEFALL>
+ <UNMAKE ,FARMHOUSE ,NODESC>
+ <COND (<T? ,FARM-ROOM>
+ <DROP-FARM>)>
+ <MAKE ,CORBIES ,SEEN>
+ <TELL " A movement overhead catches your eye" ,PTAB
+"Oh, my. A small farmhouse is falling out of the clouds! You ">
+ <COND (<HERE? FARM-ROOM>
+ <SETG P-WALK-DIR <>>
+ <SET OLD-HERE <>>
+ <WINDOW ,SHOWING-ROOM>
+ <SETG P-IT-OBJECT ,FARMHOUSE>
+ <TELL "dive out of the way just in time to avoid ">
+ <LUMBER>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <TELL "watch it spin as it tumbles earthward, and hear ">
+ <LUMBER>
+ <TELL " somewhere nearby." CR>
+ <RTRUE>>
+
+<ROUTINE LUMBER ()
+ <TELL ,LTHE>
+ <ITALICIZE "crunch">
+ <TELL " of splintering lumber">
+ <RFALSE>>
+
+<ROUTINE DROP-FARM ()
+ <UNMAKE ,FARM ,NODESC>
+ <MOVE ,FARM ,FARM-ROOM>
+ <PUTP ,FARM-ROOM ,P?SDESC ,DESCRIBE-FARM-ROOM>
+ <REPLACE-GLOBAL? ,FARM-ROOM ,NULL ,FARM-DOOR>
+ <REPLACE-GLOBAL? ,FARM-ROOM ,NULL ,FARM-WINDOW>
+ <NEW-EXIT? ,IN-FARM ,P?NORTH %<+ ,DCONNECT 1 ,MARKBIT>
+ ,FARM-ROOM ,FARM-DOOR>
+ <NEW-EXIT? ,IN-FARM ,P?OUT %<+ ,DCONNECT 1 ,MARKBIT>
+ ,FARM-ROOM ,FARM-DOOR>
+ <NEW-EXIT? ,FARM-ROOM ,P?SOUTH %<+ ,DCONNECT 1 ,MARKBIT>
+ ,IN-FARM ,FARM-DOOR>
+ <NEW-EXIT? ,FARM-ROOM ,P?IN %<+ ,DCONNECT 1 ,MARKBIT>
+ ,IN-FARM ,FARM-DOOR>
+ <RFALSE>>
+
+<ROUTINE I-IQ ()
+ <WINDOW ,SHOWING-ALL>
+ <TELL ,TAB
+"Your forehead tingles oddly for a moment." CR>
+ <UPDATE-STAT 20 ,INTELLIGENCE T>
+ <RTRUE>>
+
+<ROUTINE I-HEAL ("AUX" (STAT 0) MAX OLD)
+ <TELL ,TAB
+"Your body is flooded with an indescribable sense of well-being." CR>
+ <REPEAT ()
+ <SET OLD <GET ,STATS .STAT>>
+ <SET MAX <GET ,MAXSTATS .STAT>>
+ <COND (<G? .MAX .OLD>
+ <UPDATE-STAT <- .MAX .OLD> .STAT>)
+ (<EQUAL? .MAX .OLD>
+ <UPDATE-STAT 5 .STAT T>)>
+ <COND (<IGRTR? STAT ,STRENGTH>
+ <RETURN>)>>
+ <BMODE-OFF>
+ <RTRUE>>
+
+<ROUTINE I-MIGHT ("AUX" MAX OLD)
+ <TELL ,TAB
+"You feel a surge of tension in your arms and shoulders." CR>
+ <SET OLD <GET ,STATS ,STRENGTH>>
+ <SET MAX <GET ,MAXSTATS ,STRENGTH>>
+ <COND (<G? .MAX .OLD>
+ <UPDATE-STAT <- .MAX .OLD> ,STRENGTH>)
+ (<EQUAL? .MAX .OLD>
+ <UPDATE-STAT 16 ,STRENGTH T>)>
+ <RTRUE>>
+
+<ROUTINE I-FORGET ("AUX" (ANY 0) OBJ LEN)
+ <UNMAKE ,GLYPH ,SEEN>
+ <COND (<SET OBJ <FIRST? ,ROOMS>>
+ <REPEAT ()
+ <UNMAKE .OBJ ,VIEWED>
+ <COND (<NOT <SET OBJ <NEXT? .OBJ>>>
+ <RETURN>)>>)>
+ <WINDOW ,SHOWING-ALL>
+ <SETG P-WALK-DIR <>>
+ <SETG OLD-HERE <>>
+ <SET LEN <GET ,MAGIC-ITEMS 0>>
+ <REPEAT ()
+ <SET OBJ <GET ,MAGIC-ITEMS .LEN>>
+ <COND (<IS? .OBJ ,IDENTIFIED>
+ <INC ANY>
+ <UNMAKE .OBJ ,IDENTIFIED>
+ <UNMAKE .OBJ ,PROPER>)>
+ <COND (<DLESS? LEN 1>
+ <RETURN>)>>
+ <TELL ,TAB "An uneasy feeling creeps into your soul." CR>
+ <RTRUE>>
+
+<ROUTINE I-DEATH ()
+ <TELL ,TAB
+"A sickening bile rises in your throat, and sweat breaks out on your forehead as your pulse races out of control. Moments later, you experience the combined effects of coronary arrest, catastrophic respiratory collapse and rickets">
+ <JIGS-UP>
+ <RTRUE>>
+
+<ROUTINE I-CAKE ()
+ <COND (<IN? ,CAKE ,IN-GURTH>
+ <REMOVE ,CAKE>
+ <COND (<HERE? IN-GURTH>
+ <WINDOW ,SHOWING-ROOM>
+ <SETG P-IT-OBJECT ,NOT-HERE-OBJECT>
+ <TELL ,TAB
+"An alley cat races between your legs, snatches " THE ,CAKE " and">
+ <PRINT " disappears into the ">
+ <TELL "crowd." CR>
+ <RTRUE>)>)>
+ <RFALSE>>
+
+<GLOBAL QUAKE-TIMER:NUMBER 0>
+
+<ROUTINE I-QUAKE ()
+ <TELL ,TAB>
+ <COND (<IGRTR? QUAKE-TIMER 4>
+ <ENDING>
+ <RTRUE>)
+ (<EQUAL? ,QUAKE-TIMER 4>
+ <TELL CTHE ,GROUND
+" heaves sharply to the right, and bits of broken rock shower down on your head. One more like that..." CR>
+ <RTRUE>)
+ (<EQUAL? ,QUAKE-TIMER 3>
+ <TELL
+"The rumble grows to a roar as a mighty earthquake rocks the caverns to their very roots." CR>
+ <RTRUE>)
+ (<EQUAL? ,QUAKE-TIMER 2>
+ <TELL
+"Another tremor wracks the earth, and a deep, ominous rumble begins to swell around you." CR>
+ <RTRUE>)
+ (T
+ <TELL CTHE ,GROUND
+ " underfoot trembles for a moment." CR>
+ <RTRUE>)>>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/macros.zil b/macros.zil
new file mode 100644
index 0000000..1fda295
--- /dev/null
+++ b/macros.zil
@@ -0,0 +1,277 @@
+"MACROS for BEYOND ZORK:
+ Copyright (C)1987 Infocom, Inc. All rights reserved."
+
+<SETG C-ENABLED? 0>
+<SETG C-ENABLED 1>
+<SETG C-DISABLED 0>
+
+<TELL-TOKENS (CR CRLF) <CRLF>
+ (N NUM) * <PRINTN .X>
+ (D DESC) * <DPRINT .X>
+ (A AN) * <PRINTA .X>
+ (AO ANO) <PRINTA>
+ (CA CAN) * <PRINTCA .X>
+ (CAO CANO) * <PRINTCA>
+ (CHAR CHR C) * <PRINTC .X>
+ B * <PRINTB .X>
+ THE * <THE-PRINT .X>
+ CTHE * <CTHE-PRINT .X>
+ THEO <THE-PRINT>
+ CTHEO <CTHE-PRINT>
+ THEI <THEI-PRINT>
+ CTHEI <CTHEI-PRINT> >
+
+<DEFMAC VERB? ("ARGS" ATMS)
+ <MULTIFROB PRSA .ATMS>>
+
+<DEFMAC PRSO? ("ARGS" ATMS)
+ <MULTIFROB PRSO .ATMS>>
+
+<DEFMAC PRSI? ("ARGS" ATMS)
+ <MULTIFROB PRSI .ATMS>>
+
+<DEFMAC HERE? ("ARGS" ATMS)
+ <MULTIFROB HERE .ATMS>>
+
+<DEFINE MULTIFROB (X ATMS "AUX" (OO (OR)) (O .OO) (LL (T)) (L .LL) 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 <REST <PUTREST
+ .L
+ (<COND (<TYPE? .ATM ATOM>
+ <CHTYPE <COND (<==? .X PRSA>
+ <PARSE
+ <STRING "V?"
+ <SPNAME .ATM>>>)
+ (T .ATM)> GVAL>)
+ (ELSE .ATM)>)>>>
+ <SET ATMS <REST .ATMS>>
+ <COND (<==? <LENGTH .LL> 4>
+ <RETURN!->)>>
+ <SET O <REST <PUTREST .O
+ (<FORM EQUAL? <CHTYPE .X GVAL> !<REST .LL>>)>>>
+ <SET LL (T)>
+ <SET L .LL>>>
+
+; <DEFMAC BSET ('OBJ "ARGS" BITS)
+ <MULTIBITS FSET .OBJ .BITS>>
+
+; <DEFMAC BCLEAR ('OBJ "ARGS" BITS)
+ <MULTIBITS FCLEAR .OBJ .BITS>>
+
+; <DEFMAC BSET? ('OBJ "ARGS" BITS)
+ <MULTIBITS FSET? .OBJ .BITS>>
+
+; <DEFINE MULTIBITS (X OBJ ATMS "AUX" (O ()) ATM)
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS>
+ <RETURN!- <COND (<LENGTH? .O 1>
+ <NTH .O 1>)
+ (<==? .X FSET?>
+ <FORM OR !.O>)
+ (ELSE
+ <FORM PROG () !.O>)>>)>
+ <SET ATM <NTH .ATMS 1>>
+ <SET ATMS <REST .ATMS>>
+ <SET O
+ (<FORM .X
+ .OBJ
+ <COND (<TYPE? .ATM FORM>
+ .ATM)
+ (ELSE
+ <FORM GVAL .ATM>)>>
+ !.O)>>>
+
+<DEFMAC RFATAL ()
+ '<PROG () <PUSH 2> <RSTACK>>>
+
+<DEFMAC PROB ('BASE)
+ <FORM NOT <FORM L? .BASE '<RANDOM 100>>>>
+
+<DEFMAC ENABLE ('INT)
+ <FORM PUT .INT ,C-ENABLED? 1>>
+
+<DEFMAC DISABLE ('INT)
+ <FORM PUT .INT ,C-ENABLED? 0>>
+
+<DEFMAC GET-REXIT-ROOM ('PT)
+ <FORM GET .PT ',REXIT>>
+
+<DEFMAC GET-DOOR-OBJ ('PT)
+ <FORM GET .PT ',DEXITOBJ>>
+
+<DEFMAC GET/B ('TBL 'PTR)
+ <FORM GET .TBL .PTR>>
+
+<DEFMAC RMGL-SIZE ('TBL)
+ <FORM - <FORM / <FORM PTSIZE .TBL> 2> 1>>
+
+<DEFMAC MAKE ('OBJ 'FLAG)
+ <FORM FSET .OBJ .FLAG>>
+
+<DEFMAC UNMAKE ('OBJ 'FLAG)
+ <FORM FCLEAR .OBJ .FLAG>>
+
+<DEFMAC IS? ('OBJ 'FLAG)
+ <FORM FSET? .OBJ .FLAG>>
+
+<DEFMAC T? ('TERM)
+ <FORM NOT <FORM ZERO? .TERM>>>
+
+<DEFMAC ABS ('NUM)
+ <FORM COND (<FORM L? .NUM 0>
+ <FORM - 0 .NUM>)
+ (T
+ .NUM)>>
+
+; <DEFMAC QUOTE? ()
+ <FORM COND (<FORM NOT <FORM EQUAL?
+ <CHTYPE WINNER GVAL>
+ <CHTYPE PLAYER GVAL>>>
+ <FORM PRINTC 34>)>>
+
+<DEFMAC THIS-PRSO? ()
+ <FORM ZERO? <CHTYPE NOW-PRSI? GVAL>>>
+
+<DEFMAC THIS-PRSI? ()
+ <FORM NOT <FORM ZERO? <CHTYPE NOW-PRSI? GVAL>>>>
+
+<DEFMAC TOUCHING? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE TOUCHVERBS GVAL>
+ <CHTYPE NTOUCHES GVAL>>>
+
+<DEFMAC MUST-HAVE? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE HAVEVERBS GVAL>
+ <CHTYPE NHAVES GVAL>>>
+
+<DEFMAC PUTTING? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE PUTVERBS GVAL>
+ <CHTYPE NUMPUTS GVAL>>>
+
+<DEFMAC MOVING? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE MOVEVERBS GVAL>
+ <CHTYPE NMVERBS GVAL>>>
+
+<DEFMAC HURTING? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE HURTVERBS GVAL>
+ <CHTYPE NHVERBS GVAL>>>
+
+<DEFMAC SEEING? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE SEEVERBS GVAL>
+ <CHTYPE NSVERBS GVAL>>>
+
+<DEFMAC GAMEVERB? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE GAME-VERBS GVAL>
+ <CHTYPE NGVERBS GVAL>>>
+
+<DEFMAC TALKING? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE TALKVERBS GVAL>
+ <CHTYPE NTVERBS GVAL>>>
+
+<DEFMAC ENTERING? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE E-VERBS GVAL>
+ <CHTYPE ENTER-VERBS GVAL>>>
+
+<DEFMAC CLIMBING-ON? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE E-VERBS GVAL>
+ <CHTYPE CLIMB-ON-VERBS GVAL>>>
+
+<DEFMAC EXITING? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE X-VERBS GVAL>
+ <CHTYPE EXIT-VERBS GVAL>>>
+
+<DEFMAC CLIMBING-OFF? ()
+ <FORM INTBL? <CHTYPE PRSA GVAL> <CHTYPE X-VERBS GVAL>
+ <CHTYPE CLIMB-DOWN-VERBS GVAL>>>
+
+<DEFINE PSEUDO (L)
+ (<>
+ <MAPF ,PLTABLE
+ <FUNCTION (OBJ)
+ <SET OBJ <EVAL .OBJ>>
+ <COND (<N==? <LENGTH .OBJ> 3>
+ <ERROR BAD-THING .OBJ>)>
+ <MAPRET <COND (<NTH .OBJ 2>
+ <VOC <SPNAME <NTH .OBJ 2>> NOUN>)>
+ <COND (<NTH .OBJ 1>
+ <VOC <SPNAME <NTH .OBJ 1>> ADJECTIVE>)>
+ <3 .OBJ>>>
+ <REST .L>>)>
+
+<PUTPROP THINGS PROPSPEC!-IZILCH PSEUDO>
+
+<DEFMAC LSB ('WRD)
+ <FORM BAND .WRD 127>>
+
+<DEFMAC MSB ('WRD)
+ <FORM BAND .WRD #2 1111111100000000>>
+
+<DEFMAC PERCENT ('X 'Y)
+ <FORM / <FORM * .X .Y> 100>>
+
+<DEFMAC RATIO ('X 'Y)
+ <FORM / <FORM * .X 100> .Y>>
+
+<DEFMAC WINDOW ('BITS)
+ <FORM SETG NEW-DBOX <FORM BOR <CHTYPE NEW-DBOX GVAL> .BITS>>>
+
+"*** NEW EXIT MACROS ***"
+
+<CONSTANT XTYPE 0> "Exit type: MSB identifies type, LSB specifies length."
+<CONSTANT XROOM 1> "Exit room/function/string (depending on XTYPE)."
+<CONSTANT XDATA 2> "Auxiliary exit data (not used in all types of exits)."
+
+<CONSTANT NO-EXIT #2 000100000000>
+<CONSTANT CONNECT #2 001000000000>
+<CONSTANT SCONNECT #2 001100000000>
+<CONSTANT FCONNECT #2 010000000000>
+<CONSTANT DCONNECT #2 010100000000>
+<CONSTANT SORRY-EXIT #2 011000000000>
+<CONSTANT X-EXIT #2 011100000000>
+<CONSTANT SHADOW-EXIT #2 100000000000>
+<CONSTANT FSORRY-EXIT #2 100100000000>
+
+<DEFMAC WALL ()
+ <FORM TABLE ,NO-EXIT 0>>
+
+<DEFMAC SHADOW ('ROOM "OPT" ('LEN 1))
+ <FORM TABLE <+ .LEN ,SHADOW-EXIT> .ROOM>>
+
+<DEFMAC TO ('ROOM "OPT" ('LEN 1))
+ <FORM TABLE <+ .LEN ,CONNECT> .ROOM>>
+
+<DEFMAC CROSS-TO ('ROOM "OPT" ('LEN 1))
+ <FORM TABLE <+ .LEN ,X-EXIT> .ROOM>>
+
+<DEFMAC SAY-TO ('ROOM 'STR "OPT" ('LEN 1))
+ <FORM TABLE <+ .LEN ,SCONNECT> .ROOM .STR>>
+
+<DEFMAC THRU ('DOOR 'ROOM "OPT" ('LEN 1))
+ <FORM TABLE <+ .LEN ,DCONNECT> .ROOM .DOOR>>
+
+<DEFMAC PER ('FCN "OPT" ('LEN 0))
+ <FORM TABLE <+ .LEN ,FCONNECT> .FCN>>
+
+<DEFMAC SORRY ('STR)
+ <FORM TABLE ,SORRY-EXIT .STR>>
+
+<DEFMAC FSORRY ('FCN "OPT" ('ARG <>))
+ <FORM TABLE ,FSORRY-EXIT .FCN .ARG>>
+
+; <DEFMAC WT? ('PTR BIT "OPT" (B1 5))
+ <COND (<G? .B1 4>
+ <FORM BTST <FORM GETB .PTR ,P-PSOFF> .BIT>)
+ (T
+ <FORM DO-WT? .PTR .BIT .B1>)>>
+
+
diff --git a/misc.zil b/misc.zil
new file mode 100644
index 0000000..a09650d
--- /dev/null
+++ b/misc.zil
@@ -0,0 +1,3269 @@
+"MISC for BEYOND ZORK:
+ Copyright (C)1987 Infocom, Inc. All Rights Reserved."
+
+"*** ZCODE STARTS HERE ***"
+
+<OBJECT GLOBAL-OBJECTS
+ (FLAGS LOCATION LIGHTED INDOORS MAPPED PLACE NODESC
+ NOARTICLE PROPER VOWEL PLURAL NOALL SEEN PART
+ TOUCHED SURFACE CONTAINER OPENABLE DOORLIKE OPENED
+ TRANSPARENT LOCKED TAKEABLE TRYTAKE CLOTHING WORN
+ LIVING PERSON FEMALE MUNGED TOOL VEHICLE FERRIC
+ READABLE MANUALLY WIELDED WEAPON MONSTER SLEEPING
+ STRICKEN SURPRISED NAMED BUOYANT NEUTRALIZED
+ IDENTIFIED USED VIEWED NAMEABLE)>
+
+<OBJECT LOCAL-GLOBALS
+ (LOC GLOBAL-OBJECTS)
+ (DESC "that")
+ (FLAGS NODESC)>
+
+<OBJECT ROOMS
+ (FLAGS NODESC NOARTICLE)
+ (DESC "that")>
+
+<OBJECT DUMMY-OBJECT
+ (FLAGS NODESC NOARTICLE)
+ (DESC "nothing")>
+
+<GLOBAL WINNER:OBJECT 0>
+
+<GLOBAL TAB " ">
+<GLOBAL PERIOD ".|">
+<GLOBAL PTAB ".| ">
+<GLOBAL YOU-SEE "You see ">
+<GLOBAL LYOU-SEE ", you see ">
+<GLOBAL CANT "You can't ">
+<GLOBAL DONT "You don't ">
+<GLOBAL YOU-HEAR "You hear ">
+<GLOBAL ALREADY "You're already ">
+<GLOBAL BRACKET "]| ">
+<GLOBAL IMPOSSIBLY "You couldn't possibly ">
+<GLOBAL XTHE "The ">
+<GLOBAL LTHE "the ">
+<GLOBAL COMMA-AND ", and ">
+<GLOBAL SINTO " into ">
+<GLOBAL WITH " with ">
+<GLOBAL CYOU "You ">
+<GLOBAL AND " and ">
+<GLOBAL CYOUR "Your ">
+<GLOBAL SIN " in ">
+<GLOBAL SON " on ">
+<GLOBAL SIS " is ">
+<GLOBAL STO " to ">
+<GLOBAL XA "A ">
+<GLOBAL STHE " the ">
+<GLOBAL GLANCES-AT " glances at ">
+<GLOBAL NOTHING "There's nothing ">
+<GLOBAL AT-MOMENT " at the moment.|">
+<GLOBAL CTHELADY "The old woman">
+<GLOBAL SFIRST " first.|">
+<GLOBAL PERQ ".\"|">
+
+<GLOBAL HOST 0> "Host machine ID."
+<GLOBAL VT220:FLAG <>> "Charsets available?"
+<GLOBAL COLORS?:FLAG <>> "Color available?"
+<GLOBAL GRAPHICS?:FLAG <>> "Graphics available?"
+<GLOBAL CWIDTH:NUMBER 0> "Pixel width of mono chars."
+<GLOBAL CHEIGHT:NUMBER 0> "Pixel height of mono chars."
+<GLOBAL WIDTH:NUMBER 0> "Character width of screen."
+<GLOBAL HEIGHT:NUMBER 0> "Character height of screen."
+<GLOBAL SWIDTH:NUMBER 0> "Width of status bars (in characters)."
+<GLOBAL BARWIDTH:NUMBER 0> "Width of a complete status bar."
+<GLOBAL DWIDTH:NUMBER 0> "Width of status line and DBOX window."
+<GLOBAL BOXWIDTH:NUMBER 0> "Justify and display width for DBOX."
+<GLOBAL MOUSEDGE:NUMBER 0> "Left edge of mouse mindow."
+<GLOBAL BAR-RES:NUMBER 0> "Number of pixels/character."
+<GLOBAL DHEIGHT:NUMBER 0> "Current height of DBOX."
+<GLOBAL MAX-DHEIGHT:NUMBER 0> "Maximum height of DBOX."
+<GLOBAL STAT-ROUTINE <>> "Vector to stat-printing routine."
+<GLOBAL BGND:NUMBER ,C-BLACK>
+<GLOBAL FORE:NUMBER ,C-WHITE>
+<GLOBAL INCOLOR:NUMBER ,C-CYAN>
+<GLOBAL GCOLOR:NUMBER ,C-RED>
+
+<ROUTINE GO ()
+ <SETG HERE ,HILLTOP>
+ <MOVE ,PLAYER ,HERE>
+ <SETG WINNER ,PLAYER>
+ <SETG LIT? T>
+ <INITVARS>
+ <STARTUP>
+ <SETUP-CHARACTER>
+ <SETG WINDIR <- <RANDOM 8> 1>>
+ <QUEUE ,I-BREEZE>
+ <V-REFRESH>
+ <CRLF>
+ <V-LOOK>
+ <DO-MAIN-LOOP>
+ <AGAIN>>
+
+<ROUTINE DO-MAIN-LOOP ("AUX" X)
+ <REPEAT ()
+ <SET X <MAIN-LOOP>>>>
+
+<GLOBAL P-MULT?:FLAG <>>
+
+<ROUTINE MAIN-LOOP ("AUX" ICNT OCNT NUM CNT OBJ TBL (V <>)
+ PTBL OBJ1 TMP X)
+ <SET CNT 0>
+ <SET OBJ <>>
+ <SET PTBL T>
+ <COND (<NOT <HERE? QCONTEXT-ROOM>>
+ <SETG QCONTEXT <>>
+ <SETG QCONTEXT-ROOM <>>)>
+ <SETG P-WON <PARSER>>
+ <COND (<T? ,P-WON>
+ <SET ICNT <GET ,P-PRSI ,P-MATCHLEN>>
+ <SET OCNT <GET ,P-PRSO ,P-MATCHLEN>>
+ <COND (<AND <T? ,P-IT-OBJECT>
+ <ACCESSIBLE? ,P-IT-OBJECT>>
+ <SET TMP <>>
+ <REPEAT ()
+ <COND (<IGRTR? CNT .ICNT>
+ <RETURN>)
+ (<EQUAL? <GET ,P-PRSI .CNT> ,IT>
+ <PUT ,P-PRSI .CNT ,P-IT-OBJECT>
+ <SET TMP T>
+ <RETURN>)>>
+ <COND (<ZERO? .TMP>
+ <SET CNT 0>
+ <REPEAT ()
+ <COND (<IGRTR? CNT .OCNT>
+ <RETURN>)
+ (<EQUAL? <GET ,P-PRSO .CNT> ,IT>
+ <PUT ,P-PRSO .CNT ,P-IT-OBJECT>
+ <RETURN>)>>)>
+ <SET CNT 0>)>
+ <SET NUM 1>
+ <COND (<ZERO? .OCNT>
+ <SET NUM 0>)
+ (<G? .OCNT 1>
+ <SET TBL ,P-PRSO>
+ <SET OBJ <>>
+ <COND (<T? .ICNT>
+ <SET OBJ <GET ,P-PRSI 1>>)>
+ <SET NUM .OCNT>)
+ (<G? .ICNT 1>
+ <SET PTBL <>>
+ <SET TBL ,P-PRSI>
+ <SET OBJ <GET ,P-PRSO 1>>
+ <SET NUM .ICNT>)>
+ <COND (<AND <ZERO? .OBJ>
+ <EQUAL? .ICNT 1>>
+ <SET OBJ <GET ,P-PRSI 1>>)>
+ <COND (<VERB? WALK>
+ <SET V <PERFORM ,PRSA ,PRSO>>)
+ (<ZERO? .NUM>
+ <COND (<NOT <BAND <GETB ,P-SYNTAX ,P-SBITS> ,P-SONUMS>>
+ <SET V <PERFORM ,PRSA>>
+ <SETG PRSO <>>)
+ (<ZERO? ,LIT?>
+ <PCLEAR>
+ <TOO-DARK>)
+ (T
+ <PCLEAR>
+ <TELL "[There isn't anything to ">
+ <SET TMP <GET ,P-ITBL ,P-VERBN>>
+ <COND (<SET X <TALKING?>>
+ <TELL "talk to">)
+ (<OR <T? ,P-MERGED>
+ <T? ,P-OFLAG>>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <SET X <GETB .TMP 3>>
+ <WORD-PRINT <GETB .TMP 2> .X>)>
+ <TELL ".]" CR>
+ <SET V <>>)>)
+ ; (<AND <T? .PTBL>
+ <G? .NUM 1>
+ <VERB? COMPARE>>
+ <SET V <PERFORM ,PRSA ,OBJECT-PAIR>>)
+ (T
+ <SET X 0>
+ <SETG P-MULT? <>>
+ <COND (<G? .NUM 1>
+ <SETG P-MULT? T>)>
+ <SET TMP <>>
+ <REPEAT ()
+ <COND (<IGRTR? CNT .NUM>
+ <COND (<G? .X 0>
+ <TELL "[The ">
+ <COND (<NOT <EQUAL? .X .NUM>>
+ <TELL "other ">)>
+ <TELL "object">
+ <COND (<NOT <EQUAL? .X 1>>
+ <TELL "s">)>
+ <TELL " that you mentioned ">
+ <COND (<NOT <EQUAL? .X 1>>
+ <TELL "are">)
+ (T <TELL "is">)>
+ <TELL "n't here.]" CR>)
+ (<ZERO? .TMP>
+ <REFERRING>)>
+ <RETURN>)>
+ <COND (<T? .PTBL>
+ <SET OBJ1 <GET ,P-PRSO .CNT>>)
+ (T
+ <SET OBJ1 <GET ,P-PRSI .CNT>>)>
+ <COND (<OR <G? .NUM 1>
+ <EQUAL? <GET <GET ,P-ITBL ,P-NC1> 0>
+ ,W?ALL ,W?EVERYTHING>>
+ <COND (<EQUAL? .OBJ1 ,NOT-HERE-OBJECT>
+ <INC X>
+ <AGAIN>)
+ (<AND <EQUAL? ,P-GETFLAGS ,P-ALL>
+ <DONT-ALL? .OBJ1 .OBJ>>
+ <AGAIN>)
+ (<NOT <ACCESSIBLE? .OBJ1>>
+ <AGAIN>)
+ (<EQUAL? .OBJ1 ,PLAYER>
+ <AGAIN>)>
+ <COND (<EQUAL? .OBJ1 ,IT>
+ <COND (<NOT <IS? ,P-IT-OBJECT ,NOARTICLE>>
+ <TELL ,XTHE>)>
+ <TELL D ,P-IT-OBJECT>)
+ (T
+ <COND (<NOT <IS? .OBJ1 ,NOARTICLE>>
+ <TELL ,XTHE>)>
+ <TELL D .OBJ1>)>
+ <TELL ": ">)>
+ <SET TMP T>
+ <SETG PRSO .OBJ1>
+ <SETG PRSI .OBJ>
+ <COND (<ZERO? .PTBL>
+ <SETG PRSO .OBJ>
+ <SETG PRSI .OBJ1>)>
+ <SETG PSEUDO-PRSO? <>>
+ <COND (<EQUAL? ,PRSO ,PSEUDO-OBJECT>
+ <SETG PSEUDO-PRSO? T>)>
+ <SET V <PERFORM ,PRSA ,PRSO ,PRSI>>
+ <COND (<EQUAL? .V ,M-FATAL>
+ <RETURN>)>>)>
+ <COND (<EQUAL? .V ,M-FATAL>
+ <SETG P-CONT <>>)>)
+ (T
+ <SETG P-CONT <>>)>
+ <COND (<AND <T? ,P-WON>
+ <NOT <EQUAL? .V ,M-FATAL>>
+ <NOT <SET X <GAMEVERB?>>>>
+ <SET V <CLOCKER>>)>
+ <SETG PRSA <>>
+ <SETG PRSO <>>
+ <SETG PRSI <>>
+ <RFALSE>>
+
+<ROUTINE DONT-ALL? (O I "AUX" L X)
+ <SET L <LOC .O>>
+ <COND (<OR <ZERO? .L>
+ <EQUAL? .O .I>>
+ <RTRUE>)
+ (<VERB? TAKE>
+ <COND (<EQUAL? .L ,WINNER>
+ <RTRUE>)
+ ; (<IN? .L ,WINNER>
+ <RTRUE>)
+ (<AND <ZERO? ,LIT?>
+ <NOT <IN? .L ,WINNER>>>
+ <RTRUE>)
+ (<IS? .O ,NOALL>
+ <RTRUE>)
+ (<AND <NOT <IS? .O ,TAKEABLE>>
+ <NOT <IS? .O ,TRYTAKE>>>
+ <RTRUE>)
+ (<AND <IS? .L ,CONTAINER>
+ <NOT <IS? .L ,OPENED>>>
+ <RTRUE>)
+ (<T? .I>
+ <COND (<NOT <EQUAL? .L .I>>
+ <RTRUE>)
+ (<SEE-INSIDE? .I>
+ <RFALSE>)>
+ <RTRUE>)
+ (<EQUAL? .L <LOC ,PLAYER>>
+ <RFALSE>)
+ (<AND <NOT <IS? .L ,TAKEABLE>>
+ <SEE-INSIDE? .L>>
+ <RFALSE>)
+ (T
+ <RTRUE>)>)
+ (<SET X <PUTTING?>>
+ <COND (<IS? .O ,WORN>
+ <RTRUE>)
+ (<IS? .O ,WIELDED>
+ <RTRUE>)
+ (<EQUAL? .L ,WINNER>
+ <RFALSE>)
+ (T
+ <RTRUE>)>)
+ (T
+ <RFALSE>)>>
+
+<GLOBAL C-INTS:NUMBER ,C-TABLE-LENGTH>
+
+<ROUTINE DEQUEUE (RTN)
+ <SET RTN <QUEUED? .RTN>>
+ <COND (<T? .RTN>
+ <COPYT .RTN 0 ,C-INTLEN>)>
+ <RFALSE>>
+
+<ROUTINE QUEUED? (RTN "AUX" TBL LEN)
+ <SET TBL <REST ,C-TABLE ,C-INTS>>
+ <SET LEN </ <- <REST ,C-TABLE ,C-TABLE-LENGTH> .TBL> ,C-INTLEN>>
+ <COND (<L? .LEN 1>
+ <RFALSE>)
+ (<SET RTN <INTBL? .RTN .TBL .LEN 132>>
+ <COND (<ZERO? <GET .RTN ,C-TICK>>
+ <RFALSE>)>
+ <RETURN .RTN>)>
+ <RFALSE>>
+
+"This version of QUEUE automatically enables as well."
+
+<ROUTINE QUEUE (RTN "OPT" (TICK -1) "AUX" C E (INT <>))
+ <SET E <REST ,C-TABLE ,C-TABLE-LENGTH>>
+ <SET C <REST ,C-TABLE ,C-INTS>>
+ <REPEAT ()
+ <COND (<EQUAL? .C .E>
+ <COND (<T? .INT>
+ <SET C .INT>)
+ (T
+ <COND (<L? ,C-INTS ,C-INTLEN>
+ ; <SAY-ERROR "QUEUE">
+ <RTRUE>)>
+ <SETG C-INTS <- ,C-INTS ,C-INTLEN>>
+ <SET INT <REST ,C-TABLE ,C-INTS>>)>
+ <PUT .INT ,C-RTN .RTN>
+ <RETURN>)
+ (<EQUAL? <GET .C ,C-RTN> .RTN>
+ <SET INT .C>
+ <RETURN>)
+ (<ZERO? <GET .C ,C-RTN>>
+ <SET INT .C>)>
+ <SET C <REST .C ,C-INTLEN>>>
+ <COND (<G? .INT ,CLOCK-HAND>
+ <SET TICK <- <+ .TICK 3>>>)>
+ <PUT .INT ,C-TICK .TICK>
+ <RETURN .INT>>
+
+<GLOBAL CLOCK-WAIT?:FLAG <>>
+<GLOBAL CLOCK-HAND:NUMBER <>>
+<GLOBAL MOVES:NUMBER 0>
+
+<ROUTINE CLOCKER ("AUX" (FLG 0) (Q? 0) E TICK RTN X OSTAT NSTAT MAX DELTA)
+ <COND (<T? ,CLOCK-WAIT?>
+ <SETG CLOCK-WAIT? <>>
+ <RFALSE>)>
+ <SETG CLOCK-HAND <REST ,C-TABLE ,C-INTS>>
+ <SET E <REST ,C-TABLE ,C-TABLE-LENGTH>>
+ <REPEAT ()
+ <COND (<EQUAL? ,CLOCK-HAND .E>
+ <INC MOVES>
+ <COND (<REFRESH-STATS?>
+ <SET FLG T>)>
+ <RETURN>)
+ (<GET ,CLOCK-HAND ,C-RTN>
+ <SET TICK <GET ,CLOCK-HAND ,C-TICK>>
+ <COND (<L? .TICK -1>
+ <PUT ,CLOCK-HAND ,C-TICK <- <- .TICK> 3>>
+ <SET Q? ,CLOCK-HAND>)
+ (<T? .TICK>
+ <COND (<G? .TICK 0>
+ <SET TICK <- .TICK 1>>
+ <PUT ,CLOCK-HAND ,C-TICK .TICK>)>
+ <COND (<T? .TICK>
+ <SET Q? ,CLOCK-HAND>)>
+ <COND (<NOT <G? .TICK 0>>
+ <SET RTN <GET ,CLOCK-HAND ,C-RTN>>
+ <COND (<ZERO? .TICK>
+ <COPYT ,CLOCK-HAND 0 ,C-INTLEN>
+ ; <PUT ,CLOCK-HAND ,C-RTN 0>)>
+ <SET X <APPLY .RTN>>
+ <COND (<T? .X>
+ <SET FLG T>)>
+ <COND (<AND <ZERO? .Q?>
+ <GET ,CLOCK-HAND ,C-RTN>>
+ <SET Q? T>)>)>)>)>
+ <SETG CLOCK-HAND <REST ,CLOCK-HAND ,C-INTLEN>>
+ <COND (<ZERO? .Q?>
+ <SETG C-INTS <+ ,C-INTS ,C-INTLEN>>)>>
+ <RETURN .FLG>>
+
+<GLOBAL NO-REFRESH:NUMBER -1> "Which stat NOT to refresh."
+
+<ROUTINE REFRESH-STATS? ("AUX" (CNT 0) (ANY 0)
+ STAT OSTAT NSTAT DELTA MAX RATE)
+ <SET RATE ,NORMAL-RATE>
+ <COND (<AND <IN? ,SCABBARD ,PLAYER>
+ <IS? ,SCABBARD ,WORN>
+ <NOT <IS? ,SCABBARD ,NEUTRALIZED>>>
+ <SET RATE ,BLESSED-RATE>)>
+ <SET STAT ,ENDURANCE>
+ <REPEAT ()
+ <SET OSTAT <GET ,STATS .STAT>>
+ <SET MAX <GET ,MAXSTATS .STAT>>
+ <COND (<AND <EQUAL? .STAT ,INTELLIGENCE>
+ <WEARING-MAGIC? ,HELM>>)
+ (<EQUAL? ,NO-REFRESH .STAT>
+ <SETG NO-REFRESH -1>)
+ (<NOT <EQUAL? .OSTAT .MAX>>
+ <SET DELTA <PERCENT .RATE .MAX>>
+ <COND (<L? .DELTA 1>
+ <SET DELTA 1>)>
+ <COND (<G? .OSTAT .MAX>
+ <SET NSTAT <- .OSTAT .DELTA>>
+ <COND (<L? .NSTAT .MAX>
+ <SET NSTAT .MAX>)>)
+ (T
+ <SET NSTAT <+ .OSTAT .DELTA>>
+ <COND (<G? .NSTAT .MAX>
+ <SET NSTAT .MAX>)>)>
+ <PUT ,STATS .STAT .NSTAT>
+ <COND (<ZERO? ,DMODE>)
+ (<OR <EQUAL? ,IN-DBOX ,SHOWING-STATS>
+ <AND <T? ,BMODE>
+ <EQUAL? .STAT ,ENDURANCE>>>
+ <SHOW-STAT .STAT>)>
+ <INC ANY>
+ <COND (<EQUAL? .NSTAT .MAX>
+ <INC CNT>
+ <PUTB ,NEW-STATS .CNT .STAT>)>)>
+ <COND (<IGRTR? STAT ,LUCK>
+ <RETURN>)>>
+
+ <COND (<ZERO? .ANY>
+ <RFALSE>)
+ (<ZERO? ,DMODE>
+ <UPPER-SLINE>)
+ (<ZERO? ,VT220>
+ <APPLE-STATS>)>
+
+ <COND (<ZERO? .CNT>
+ <RFALSE>)
+ (<ZERO? ,SAY-STAT>
+ <RFALSE>)>
+
+ <COND (<NOT <EQUAL? ,HOST ,MACINTOSH>>
+ <HLIGHT ,H-BOLD>)>
+ <TELL ,TAB "[Your ">
+ <SET ANY .CNT>
+ <REPEAT ()
+ <TELL <GET ,STAT-NAMES <GETB ,NEW-STATS .ANY>>>
+ <COND (<DLESS? ANY 1>
+ <RETURN>)
+ (<EQUAL? .ANY 1>
+ <TELL ,AND>)
+ (T
+ <TELL ", ">)>>
+ <TELL C ,SP>
+ <COND (<G? .CNT 1>
+ <TELL B ,W?ARE>)
+ (T
+ <TELL B ,W?IS>)>
+ <TELL " back to normal.]" CR>
+ <HLIGHT ,H-NORMAL>
+ <SOUND ,S-BEEP>
+ <COND (<ZERO? ,AUTO>)
+ (<EQUAL? <GETB ,NEW-STATS 1> ,ENDURANCE>
+ <BMODE-OFF>)>
+ <RTRUE>>
+
+<ROUTINE INITVARS ("AUX" X)
+ <SETG HOST <LOWCORE INTID>> ; "Establish host machine ID."
+ <SETG COLORS? <BAND <LOWCORE (ZVERSION 1)> 1>>
+ <SETG GRAPHICS? <BAND <LOWCORE FLAGS> 8>>
+ <SETG BAR-RES 8>
+ <COND (<EQUAL? ,HOST ,MACINTOSH>
+ <PUTB ,TCHARS ,FIRST-MAC-ARROW ,MAC-UP-ARROW>
+ <PUTB ,TCHARS <+ ,FIRST-MAC-ARROW 1> ,MAC-DOWN-ARROW>
+ <SETG BAR-RES 6>)>
+ <HLIGHT ,H-MONO>
+ <SETG CWIDTH <LOWCORE (FWRD 0)>> ; "Pixel width of chars."
+ <SETG CHEIGHT <LOWCORE (FWRD 1)>> ; "Pixel height of chars."
+ <SET X <FONT ,F-NEWFONT>> ; "For IBM."
+ <SET X <FONT ,F-DEFAULT>>
+ <HLIGHT ,H-NORMAL>
+
+ <SET X <LOWCORE HWRD>> ; "Get pixel width of screen."
+ <SETG WIDTH </ .X ,CWIDTH>> ; "Screen width in chars."
+ <COND (<G? ,WIDTH 80>
+ <SETG WIDTH 80>)>
+
+ <SET X <LOWCORE VWRD>> ; "Get pixel height of screen."
+ <SETG HEIGHT </ .X ,CHEIGHT>> ; "Screen width in chars."
+
+ <SETG DWIDTH <- ,WIDTH %<+ ,MWIDTH 3>>> ; "Width of DBOX."
+ <SETG BOXWIDTH ,DWIDTH>
+ <COND (<EQUAL? ,HOST ,APPLE-2C>
+ <DEC BOXWIDTH>)>
+ <SETG MOUSEDGE <- <- ,WIDTH ,MWIDTH> 1>>
+
+ <SETG SWIDTH <+ </ ,STATMAX ,BAR-RES> 1>>
+ <SETG BARWIDTH <+ <+ ,LABEL-WIDTH ,SWIDTH> 5>>
+
+ <SETG CAN-UNDO 0>
+ <SETG STAT-ROUTINE ,RAWBAR>
+ <SETG VT220 T>
+ <SETG MAX-DHEIGHT ,NORMAL-DHEIGHT>
+ <SETG DHEIGHT ,MAX-DHEIGHT>
+ <SETG MAP-ROUTINE ,CLOSE-MAP>
+ <COND (<OR <T? ,VT100>
+ <EQUAL? ,HOST ,APPLE-2E ,APPLE-2C>
+ <AND <ZERO? ,GRAPHICS?>
+ <EQUAL? ,HOST ,IBM>>>
+ <SETUP-APPLE-MODE>)>
+ <RFALSE>>
+
+<ROUTINE SETUP-APPLE-MODE ()
+ <SETG VT220 <>>
+ <SETG GRAPHICS? <>>
+ <SETG STAT-ROUTINE ,BAR-NUMBER>
+ <SETG MAX-DHEIGHT %<- ,NORMAL-DHEIGHT 1>>
+ <SETG MAP-ROUTINE ,FAR-MAP>
+ <SETG DHEIGHT ,MAX-DHEIGHT>
+ <RFALSE>>
+
+<ROUTINE CENTER (Y X)
+ <DO-CURSET .Y </ <- ,WIDTH .X> 2>>
+ <RFALSE>>
+
+<ROUTINE DO-CURSET (Y X)
+ <COND (<EQUAL? 1 ,CWIDTH ,CHEIGHT>
+ <CURSET .Y .X>
+ <RFALSE>)>
+ <SET X <* .X ,CWIDTH>>
+ <CURSET <* ,CHEIGHT .Y> .X>
+ <RFALSE>>
+
+<ROUTINE TO-TOP-WINDOW ("AUX" X)
+ <SET X <FONT ,F-DEFAULT>>
+ <SCREEN ,S-WINDOW>
+ <BUFOUT <>>
+ <HLIGHT ,H-NORMAL>
+ <HLIGHT ,H-MONO>
+ <COLOR ,GCOLOR ,BGND>
+ <RFALSE>>
+
+<ROUTINE TO-BOTTOM-WINDOW ("AUX" X)
+ <SET X <FONT ,F-DEFAULT>>
+ <SCREEN ,S-TEXT>
+ <BUFOUT T>
+ <HLIGHT ,H-NORMAL>
+ <COLOR ,FORE ,BGND>
+ <RFALSE>>
+
+<GLOBAL OLD-HERE:OBJECT <>>
+
+<ROUTINE V-REFRESH ("AUX" REDGE X)
+ <SET X <LOWCORE FLAGS>>
+ <LOWCORE FLAGS <BAND .X #2 1111111111111011>>
+ <SETG OLD-HERE <>>
+ <SETG P-WALK-DIR <>>
+ <COLOR ,FORE ,BGND>
+ <CLEAR -1>
+ <COND (<ZERO? ,DMODE>
+ <SPLIT 2>
+ <TO-BOTTOM-WINDOW>
+ <RTRUE>)>
+ <SETG NEW-DBOX ,IN-DBOX>
+ <SPLIT 12>
+
+ <COND (<ZERO? ,VT220>
+ <APPLE-STATS>
+ <COND (<EQUAL? ,HOST ,APPLE-2C>
+ <2C-BOX>)
+ (<EQUAL? ,HOST ,IBM>
+ <IBM-BOX>)>
+ <RTRUE>)>
+
+ <TO-TOP-WINDOW>
+ <SET X <FONT ,F-NEWFONT>>
+ <SET REDGE <- <- ,WIDTH ,MWIDTH> 1>>
+
+ <DO-CURSET 2 1>
+ <PRINTC ,TLC>
+ <SET X .REDGE>
+ <REPEAT ()
+ <PRINTC ,TOP>
+ <COND (<DLESS? X 3>
+ <RETURN>)>>
+ <PRINTC ,TRC>
+
+ <DO-CURSET 12 1>
+ <PRINTC ,BLC>
+ <SET X .REDGE>
+ <REPEAT ()
+ <PRINTC ,BOT>
+ <COND (<DLESS? X 3>
+ <RETURN>)>>
+ <PRINTC ,BRC>
+
+ <SET X 3>
+ <REPEAT ()
+ <DO-CURSET .X 1>
+ <PRINTC ,RSID>
+ <DO-CURSET .X .REDGE>
+ <PRINTC ,LSID>
+ <COND (<IGRTR? X 11>
+ <RETURN>)>>
+
+ <SETG DHEIGHT ,MAX-DHEIGHT>
+ <TO-BOTTOM-WINDOW>
+ <COND (<EQUAL? ,PRIOR ,SHOWING-STATS>
+ <SHOW-RANK>
+ <DISPLAY-STATS>)
+ (<T? ,BMODE>
+ <BATTLE-MODE-ON>)>
+ <RTRUE>>
+
+<ROUTINE IBM-BOX ("AUX" REDGE X)
+ <TO-TOP-WINDOW>
+ <SET X <FONT ,F-NEWFONT>>
+
+ <SET REDGE <- <- ,WIDTH ,MWIDTH> 1>>
+
+ <CURSET 3 1>
+ <PRINTC ,IBM-TLC>
+ <SET X .REDGE>
+ <REPEAT ()
+ <PRINTC ,IBM-HORZ>
+ <COND (<DLESS? X 3>
+ <RETURN>)>>
+ <PRINTC ,IBM-TRC>
+
+ <DO-CURSET 12 1>
+ <PRINTC ,IBM-BLC>
+ <SET X .REDGE>
+ <REPEAT ()
+ <PRINTC ,IBM-HORZ>
+ <COND (<DLESS? X 3>
+ <RETURN>)>>
+ <PRINTC ,IBM-BRC>
+
+ <SET X 4>
+ <REPEAT ()
+ <DO-CURSET .X 1>
+ <PRINTC ,IBM-VERT>
+ <DO-CURSET .X .REDGE>
+ <PRINTC ,IBM-VERT>
+ <COND (<IGRTR? X 11>
+ <RETURN>)>>
+
+ <TO-BOTTOM-WINDOW>
+ <RTRUE>>
+
+<ROUTINE 2C-BOX ("AUX" CNT X)
+ <TO-TOP-WINDOW>
+ <SET X <FONT ,F-NEWFONT>>
+
+ ; "Draw bottom edge."
+
+ <SET X <- <- ,WIDTH ,MWIDTH> 2>> ; "Right edge."
+ <SET CNT 2>
+ <CURSET 12 2>
+ <REPEAT ()
+ <PRINTC ,APPLE-HORZ>
+ <COND (<IGRTR? CNT .X>
+ <RETURN>)>>
+
+ ; "Do sides."
+
+ <SET X 1>
+ <REPEAT ()
+ <CURSET .X 1>
+ <PRINTC ,APPLE-RIGHT>
+ <CURSET .X .CNT>
+ <PRINTC ,APPLE-LEFT>
+ <COND (<IGRTR? X 11>
+ <RETURN>)>>
+ <TO-BOTTOM-WINDOW>
+ <RTRUE>>
+
+<ROUTINE DISPLAY-PLACE ("AUX" (DIR 0) LEN X DEST END)
+ <SET LEN <GETB ,ROOMS-MAPPED 0>>
+ <COND (<ZERO? .LEN>)
+ (<ZERO? ,OLD-HERE>)
+ (<SET DEST <INTBL? ,OLD-HERE <REST ,ROOMS-MAPPED 1> .LEN 1>>
+ <SET END <REST ,ROOMS-MAPPED .LEN>>
+ <COND (<L? .DEST .END>
+ <SET X <- 0 <- .END .DEST>>>
+ <COPYT <REST .DEST 1> .DEST .X>)>
+ <PUTB ,ROOMS-MAPPED 0 <- .LEN 1>>)>
+ <SETUP-SLINE>
+ <SAY-HERE>
+ <CENTER-SLINE>
+ <SHOW-SLINE>
+ <COND (<OR <EQUAL? ,P-WALK-DIR <> ,P?UP ,P?DOWN>
+ <EQUAL? ,P-WALK-DIR ,P?IN ,P?OUT>>
+ <NEW-MAP>)
+ (T
+ <REPEAT ()
+ <COND (<EQUAL? ,P-WALK-DIR <GETB ,PDIR-LIST .DIR>>
+ <SET X <+ .DIR 4>>
+ <COND (<G? .X ,I-NW>
+ <SET X <- .X 8>>)>
+ <SET LEN <GETP ,HERE <GETB ,PDIR-LIST .X>>>
+ <COND (<ZERO? .LEN>
+ <NEW-MAP>
+ <RETURN>)>
+ <SET LEN <BAND <GET .LEN ,XTYPE> 127>>
+ <INC LEN>
+ <SET X <GET ,YOFFS .DIR>>
+ <COND (<EQUAL? ,MAP-ROUTINE ,CLOSE-MAP>
+ <SET X <+ .X .X>>)>
+ <SET X <* .X .LEN>>
+ <SETG MAPY <+ ,MAPY .X>>
+ <SET X <GET ,XOFFS .DIR>>
+ <COND (<EQUAL? ,MAP-ROUTINE ,CLOSE-MAP>
+ <SET X <+ .X .X>>)>
+ <SET X <* .X .LEN>>
+ <SETG MAPX <+ ,MAPX .X>>
+ <COND (<OR <L? ,MAPY 1>
+ <G? ,MAPY %<- ,MHEIGHT 2>>
+ <L? ,MAPX 1>
+ <G? ,MAPX %<- ,MWIDTH 2>>>
+ <NEW-MAP>
+ <RETURN>)>
+ ; <APPLY ,MAP-ROUTINE ,HERE ,MAPY ,MAPX>
+ <DRAW-MAP>
+ <RETURN>)>
+ <COND (<IGRTR? DIR ,I-NW>
+ <RETURN>)>>)>
+ <SHOW-MAP>
+ <COND (<AND <T? ,DMODE>
+ <EQUAL? ,PRIOR 0 ,SHOWING-ROOM>>
+ <SETG DBOX-TOP 0>
+ <UPDATE-ROOMDESC>)>
+ <SETG OLD-HERE ,HERE>
+ <RTRUE>>
+
+<ROUTINE REFRESH-MAP ("OPT" (NEW T))
+ <COND (<ZERO? ,DMODE>
+ <LOWER-SLINE>
+ <RFALSE>)>
+ <SETG SAME-COORDS .NEW>
+ <WINDOW ,SHOWING-ROOM>
+ <NEW-MAP>
+ <SHOW-MAP>
+ <RFALSE>>
+
+<ROUTINE SHOW-MAP ("AUX" X)
+ <TO-TOP-WINDOW>
+ <COND (<T? ,VT220>
+ <SET X <FONT ,F-NEWFONT>>)>
+ <DO-CURSET 1 <- ,WIDTH ,MWIDTH>>
+ <PRINTT ,MAP ,MWIDTH ,MHEIGHT>
+ <TO-BOTTOM-WINDOW>
+ <RFALSE>>
+
+<ROUTINE SHOW-RANK ("OPT" (RIGHT-EDGE ,DWIDTH) "AUX" LEN X)
+ <SETUP-SLINE>
+ <TELL C ,SP>
+ <PRINT-TABLE ,CHARNAME>
+ <DIROUT ,D-TABLE-OFF>
+ <SET LEN <GET ,AUX-TABLE 0>>
+ <COPYT <REST ,AUX-TABLE 2> ,SLINE .LEN>
+ <PUT ,AUX-TABLE 0 0>
+ <DIROUT ,D-TABLE-ON ,AUX-TABLE>
+ <ANNOUNCE-RANK>
+ <PRINTC ,SP>
+ <DIROUT ,D-TABLE-OFF>
+ <SET LEN <GET ,AUX-TABLE 0>>
+ <SET X <REST ,SLINE <- .RIGHT-EDGE .LEN>>>
+ <COPYT <REST ,AUX-TABLE 2> .X .LEN>
+ <SHOW-SLINE 1 .RIGHT-EDGE>
+ <RTRUE>>
+
+<GLOBAL RANK:NUMBER 0>
+
+<ROUTINE ANNOUNCE-RANK ("AUX" (LEVEL 0) STAT)
+ <SET STAT <GET ,STATS ,EXPERIENCE>>
+ <TELL "Level ">
+ <REPEAT ()
+ <COND (<L? .STAT <GET ,THRESHOLDS .LEVEL>>
+ <RETURN>)
+ (<IGRTR? LEVEL ,MAX-LEVEL>
+ <SET LEVEL 0>
+ <PUT ,STATS ,EXPERIENCE 0>
+ <COND (<IGRTR? RANK 2>
+ <SET RANK 2>)>
+ <RETURN>)>>
+ <TELL N .LEVEL C ,SP>
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "Fem">)
+ (T
+ <TELL "M">)>
+ <TELL "ale " <GET ,RANK-NAMES ,RANK>>
+ <RETURN .LEVEL>>
+
+<ROUTINE SETUP-SLINE ()
+ <PUTB ,SLINE 0 ,SP>
+ <COPYT ,SLINE <REST ,SLINE 1> %<- 0 <- ,SLINE-LENGTH 1>>>
+ <PUT ,AUX-TABLE 0 0>
+ <DIROUT ,D-TABLE-ON ,AUX-TABLE>
+ <RFALSE>>
+
+<ROUTINE CENTER-SLINE ("AUX" X LEN)
+ <DIROUT ,D-TABLE-OFF>
+ <SET LEN <GET ,AUX-TABLE 0>>
+ <SET X <REST ,SLINE </ <- ,DWIDTH .LEN> 2>>>
+ <COPYT <REST ,AUX-TABLE 2> .X .LEN>
+ <RFALSE>>
+
+<ROUTINE SHOW-SLINE ("OPT" (Y 1) (RIGHT-EDGE ,DWIDTH) "AUX" X)
+ <TO-TOP-WINDOW>
+ <DO-CURSET .Y 1>
+ <COND (<EQUAL? .RIGHT-EDGE ,WIDTH>)
+ (<T? ,VT220>
+ <SET X <FONT ,F-NEWFONT>>
+ <PRINTC 58>
+ <SET X <FONT ,F-DEFAULT>>)
+ (<EQUAL? ,HOST ,APPLE-2C>
+ <SET X <FONT ,F-NEWFONT>>
+ <PRINTC ,APPLE-RIGHT>
+ <SET X <FONT ,F-DEFAULT>>)
+ (T
+ <TELL C ,SP>)>
+ <HLIGHT ,H-INVERSE>
+ <PRINTT ,SLINE .RIGHT-EDGE>
+ <HLIGHT ,H-NORMAL>
+ <HLIGHT ,H-MONO>
+ <COND (<EQUAL? .RIGHT-EDGE ,WIDTH>)
+ (<T? ,VT220>
+ <SET X <FONT ,F-NEWFONT>>
+ <PRINTC 57>
+ <SET X <FONT ,F-DEFAULT>>)
+ (<EQUAL? ,HOST ,APPLE-2C>
+ <SET X <FONT ,F-NEWFONT>>
+ <PRINTC ,APPLE-LEFT>
+ <SET X <FONT ,F-DEFAULT>>)
+ (T
+ <TELL C ,SP>)>
+ <TO-BOTTOM-WINDOW>
+ <RFALSE>>
+
+<ROUTINE SAY-HERE ("AUX" X)
+ <COND (<HERE? DEATH>)
+ (<ZERO? ,LIT?>
+ <TELL "Darkness">
+ <RTRUE>)>
+ <TELL D ,HERE>
+ <SET X <LOC ,PLAYER>>
+ <COND (<IS? .X ,VEHICLE>
+ <TELL C ,COMMA>
+ <COND (<AND <EQUAL? .X ,SADDLE>
+ <IN? ,SADDLE ,DACT>>
+ <TELL ,SON A ,DACT>
+ <RTRUE>)>
+ <ON-IN .X>)>
+ <RTRUE>>
+
+<ROUTINE PRINT-SPACES (N)
+ <REPEAT ()
+ <COND (<DLESS? N 0>
+ <RTRUE>)>
+ <TELL C ,SP>>>
+
+<GLOBAL MAPX:NUMBER ,CENTERX>
+<GLOBAL MAPY:NUMBER ,CENTERY>
+
+<GLOBAL MAP-ROUTINE <>>
+
+<GLOBAL SAME-COORDS:FLAG <>>
+
+<ROUTINE NEW-MAP ("AUX" TBL X)
+ <COND (<T? ,SAME-COORDS>
+ <SETG SAME-COORDS <>>)
+ (T
+ <SETG MAPX ,CENTERX>
+ <SETG MAPY ,CENTERY>
+ <SET TBL <GETPT ,HERE ,P?COORDS>>
+ <COND (<T? .TBL>
+ <SET X <GETB .TBL 0>>
+ <COND (<T? .X>
+ <SETG MAPX .X>)>
+ <SET X <GETB .TBL 1>>
+ <COND (<T? .X>
+ <SETG MAPY .X>)>)>)>
+ <DRAW-MAP>
+ <RTRUE>>
+
+<ROUTINE DRAW-MAP ()
+ <COPYT ,ROOMS-MAPPED 0 ,ROOMS-MAPPED-LENGTH>
+ <PUTB ,MAP 0 ,SP>
+ <COPYT ,MAP <REST ,MAP 1> %<- 0 <- ,MAP-SIZE 1>>>
+ <APPLY ,MAP-ROUTINE ,HERE ,MAPY ,MAPX>
+ <RFALSE>>
+
+<ROUTINE CLOSE-MAP (RM Y X "AUX" DIR TBL CHAR TYPE LEN DEST
+ NY NX YOFF XOFF CTBL)
+ <SET LEN <GETB ,ROOMS-MAPPED 0>>
+ <COND (<OR <ZERO? .LEN>
+ <NOT <SET CHAR
+ <INTBL? .RM <REST ,ROOMS-MAPPED 1> .LEN 1>>>>
+ <COND (<IGRTR? LEN %<- ,ROOMS-MAPPED-LENGTH 1>>
+ ; <SAY-ERROR "CLOSE-MAP <1>">
+ <RTRUE>)>
+ <PUTB ,ROOMS-MAPPED .LEN .RM>
+ <PUTB ,ROOMS-MAPPED 0 .LEN>)>
+ <COND (<AND <G? .Y -1>
+ <L? .Y ,MHEIGHT>
+ <G? .X -1>
+ <L? .X ,MWIDTH>>
+ <COND (<T? ,VT220>
+ <SET CHAR <SMART-CHAR? .RM>>)
+ (T
+ <SET CHAR <DUMB-CHAR? .RM>>)>
+ <PUTB <REST ,MAP <* .Y ,MWIDTH>> .X .CHAR>
+ ; <COND (<T? ,DRAW>
+ <SHOW-DRAWING .Y .X .CHAR>)>)>
+ <MAKE .RM ,MAPPED>
+ <SET DIR -1>
+ <REPEAT ()
+ <COND (<IGRTR? DIR ,I-NW>
+ <UNMAKE .RM ,MAPPED>
+ <RTRUE>)>
+ <SET LEN 0>
+ <SET DEST <>> ; "Very important!"
+ <SET TYPE <>>
+ <SET CTBL ,XCHARS> ; "Assume exit edges."
+
+ ; "Get attributes of a direction."
+
+ <SET TBL <GETP .RM <GETB ,PDIR-LIST .DIR>>>
+ <COND (<T? .TBL>
+ <SET TYPE <GET .TBL ,XTYPE>>
+ <SET LEN <BAND .TYPE 255>>
+ <SET TYPE <MSB .TYPE>>)>
+ <COND (<OR <ZERO? .TBL>
+ <EQUAL? .TYPE ,NO-EXIT ,SORRY-EXIT ; ,FSORRY-EXIT>
+ <NOT <BTST .LEN ,MARKBIT>>>
+ <SET CTBL ,NXCHARS>)
+ (<EQUAL? .TYPE ,FCONNECT>
+ <SET DEST -1>
+ <SET LEN <BAND .LEN 127>>
+ <COND (<ZERO? .LEN>
+ <SET CTBL ,NXCHARS>)>)
+ (T
+ <SET DEST <GET .TBL ,XROOM>>
+ <COND (<OR <ZERO? .DEST>
+ <NOT <IN? .DEST ,ROOMS>>>
+ ; <SAY-ERROR "CLOSE-MAP <3>">
+ <RFALSE>)
+ (<OR <EQUAL? .TYPE ,SHADOW-EXIT>
+ <AND <EQUAL? .TYPE ,DCONNECT>
+ <NOT <IS? <GET .TBL ,XDATA>
+ ,OPENED>>>>
+ <SET CTBL ,NXCHARS>)>)>
+ <SET LEN <BAND .LEN 127>>
+ <SET YOFF <GET ,YOFFS .DIR>> ; "Establish offsets."
+ <SET XOFF <GET ,XOFFS .DIR>>
+ <SET NY <+ .Y .YOFF>> ; "Do room edge."
+ <SET NX <+ .X .XOFF>>
+ <COND (<OR <L? .NY 0>
+ <G? .NY %<- ,MHEIGHT 1>>
+ <L? .NX 0>
+ <G? .NX %<- ,MWIDTH 1>>>
+ <AGAIN>)>
+ <SET CHAR <GETB .CTBL .DIR>>
+ <COND (<ZERO? ,VT220>
+ <SET CHAR <GETB ,SHITCHARS .DIR>>
+ <COND (<EQUAL? .CTBL ,NXCHARS>
+ <SET CHAR ,SP>)>)
+ (<HERE? .RM>
+ <SET CHAR <+ .CHAR 17>>)>
+ <PUTB <REST ,MAP <* .NY ,MWIDTH>> .NX .CHAR>
+ ; <COND (<T? ,DRAW>
+ <SHOW-DRAWING .NY .NX .CHAR>)>
+ <COND (<OR <ZERO? .TBL> ; "If no exit ..."
+ <ZERO? .TYPE>
+ <ZERO? .DEST> ; "Or no connection ..."
+ <L? .Y 0>
+ <G? .Y %<- ,MHEIGHT 1>>
+ <L? .X 0>
+ <G? .X %<- ,MWIDTH 1>>>
+ <AGAIN>)>
+ <SET LEN <+ .LEN <BAND .LEN #2 11111110>>>
+ <SET CHAR <GETB ,MCHARS .DIR>> ; "Continue the path."
+ <COND (<EQUAL? .TYPE ,X-EXIT>
+ <COND (<BTST .DIR 1>
+ <SET CHAR ,XCROSS>
+ <COND (<ZERO? ,VT220>
+ <SET CHAR %<ASCII !\X>>)>)
+ (T
+ <SET CHAR ,HVCROSS>
+ <COND (<ZERO? ,VT220>
+ <SET CHAR %<ASCII !\+>>)>)>)
+ (<EQUAL? .CTBL ,NXCHARS> ; "For closed doors."
+ <SET CHAR ,SOLID>
+ <COND (<ZERO? ,VT220>
+ <SET CHAR ,SP>)>)
+ (<ZERO? ,VT220>
+ <SET CHAR <GETB ,SHITCHARS .DIR>>)>
+ <REPEAT ()
+ <SET NY <+ .NY .YOFF>>
+ <SET NX <+ .NX .XOFF>>
+ <COND (<OR <L? .NY 0>
+ <G? .NY %<- ,MHEIGHT 1>>
+ <L? .NX 0>
+ <G? .NX %<- ,MWIDTH 1>>>
+ <RETURN>)>
+ <PUTB <REST ,MAP <* .NY ,MWIDTH>> .NX .CHAR>
+ ; <COND (<T? ,DRAW>
+ <SHOW-DRAWING .NY .NX .CHAR>)>
+ <COND (<DLESS? LEN 1>
+ <RETURN>)>>
+ <COND (<EQUAL? .DEST -1> ; "If it's an FCONNECT ..."
+ <AGAIN>)
+ (<IS? .DEST ,MAPPED>
+ <AGAIN>)
+ (<SET CHAR <INTBL? .DEST <REST ,ROOMS-MAPPED 1>
+ <GETB ,ROOMS-MAPPED 0> 1>>
+ <AGAIN>)
+ (<NOT <IS? .DEST ,VIEWED>>
+ <AGAIN>)>
+ <SET NY <+ .NY <+ .YOFF .YOFF>>>
+ <SET NX <+ .NX <+ .XOFF .XOFF>>>
+ <COND (<OR <L? .NY -1>
+ <G? .NY ,MHEIGHT>
+ <L? .NX -1>
+ <G? .NX ,MWIDTH>>
+ <AGAIN>)>
+ <CLOSE-MAP .DEST .NY .NX>>>
+
+<ROUTINE DUMB-CHAR? (RM "AUX" CHAR)
+ <SET CHAR %<ASCII !\*>>
+ <COND (<HERE? .RM>
+ <SET CHAR %<ASCII !\@>>)
+ (<NOT <IS-LIT? .RM>>
+ <SET CHAR %<ASCII !\?>>)>
+ <RETURN .CHAR>>
+
+<ROUTINE SMART-CHAR? (RM "AUX" CHAR TBL)
+ <SET CHAR ,SOLID>
+ <COND (<HERE? .RM>
+ <SET CHAR ,ISOLID>)>
+ <COND (<NOT <IS-LIT? .RM>>
+ <SET CHAR ,QMARK>
+ <COND (<HERE? .RM>
+ <SET CHAR ,IQMARK>)>)>
+ <SET TBL <GETP .RM ,P?UP>>
+ <COND (<AND <T? .TBL>
+ <CHECK-EXIT? .RM .TBL>>
+ <SET CHAR ,UARROW>
+ <COND (<HERE? .RM>
+ <SET CHAR ,IUARROW>)>)>
+ <SET TBL <GETP .RM ,P?DOWN>>
+ <COND (<AND <T? .TBL>
+ <CHECK-EXIT? .RM .TBL>>
+ <COND (<EQUAL? .CHAR ,UARROW>
+ <RETURN ,UDARROW>)
+ (<EQUAL? .CHAR ,IUARROW>
+ <RETURN ,IUDARROW>)
+ (<HERE? .RM>
+ <RETURN ,IDARROW>)>
+ <RETURN ,DARROW>)>
+ <RETURN .CHAR>>
+
+<ROUTINE CHECK-EXIT? (RM TBL "AUX" EXIT-WORD ROOM XDIR XTBL TYPE LEN)
+
+ ; "Make sure exit is unique."
+
+ <SET EXIT-WORD <GET .TBL ,XTYPE>>
+ <SET ROOM <GET .TBL ,XROOM>>
+ <SET XDIR ,P?NW>
+ <REPEAT ()
+ <SET XTBL <GETP .RM .XDIR>>
+ <COND (<AND <T? .TBL>
+ <EQUAL? <GET .XTBL ,XTYPE> .EXIT-WORD>
+ <EQUAL? <GET .XTBL ,XROOM> .ROOM>>
+ <RFALSE>)>
+ <COND (<IGRTR? XDIR ,P?NORTH>
+ <RETURN>)>>
+
+ ; "Exit is unique, so see if it's open."
+
+ <SET TYPE <MSB .EXIT-WORD>>
+ <SET LEN <BAND .EXIT-WORD 127>>
+ <COND (<EQUAL? .TYPE ,NO-EXIT ,SORRY-EXIT ; ,FSORRY-EXIT>
+ <RFALSE>)
+ (<NOT <BTST .EXIT-WORD ,MARKBIT>>
+ <RFALSE>)
+ (<EQUAL? .TYPE ,CONNECT ,SCONNECT ,X-EXIT>
+ <RTRUE>)
+ (<AND <EQUAL? .TYPE ,DCONNECT>
+ <IS? <GET .TBL ,XDATA> ,OPENED>>
+ <RTRUE>)
+ (<AND <EQUAL? .TYPE ,FCONNECT>
+ <T? .LEN>>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE FAR-MAP (RM Y X "AUX" DIR TBL CHAR TYPE LEN DEST
+ NY NX YOFF XOFF)
+ <SET LEN <GETB ,ROOMS-MAPPED 0>>
+ <COND (<OR <ZERO? .LEN>
+ <NOT <SET CHAR
+ <INTBL? .RM <REST ,ROOMS-MAPPED 1> .LEN 1>>>>
+ <COND (<IGRTR? LEN %<- ,ROOMS-MAPPED-LENGTH 1>>
+ ; <SAY-ERROR "FAR-MAP <1>">
+ <RTRUE>)>
+ <PUTB ,ROOMS-MAPPED .LEN .RM>
+ <PUTB ,ROOMS-MAPPED 0 .LEN>)>
+ <COND (<AND <G? .Y -1>
+ <L? .Y ,MHEIGHT>
+ <G? .X -1>
+ <L? .X ,MWIDTH>>
+ <COND (<ZERO? ,VT220>
+ <SET CHAR <DUMB-CHAR? .RM>>)
+ (T
+ <SET CHAR ,SMBOX>
+ <COND (<HERE? .RM>
+ <SET CHAR ,ISOLID>)>)>
+ <PUTB <REST ,MAP <* .Y ,MWIDTH>> .X .CHAR>)>
+ <MAKE .RM ,MAPPED>
+ <SET DIR -1>
+ <REPEAT ()
+ <COND (<IGRTR? DIR ,I-NW>
+ <UNMAKE .RM ,MAPPED>
+ <RTRUE>)>
+ <SET LEN 0>
+ <SET DEST <>>
+ <SET TYPE <>>
+ <SET TBL <GETP .RM <GETB ,PDIR-LIST .DIR>>>
+ <COND (<ZERO? .TBL>
+ <AGAIN>)>
+ <SET TYPE <GET .TBL ,XTYPE>>
+ <SET LEN <BAND .TYPE 255>>
+ <SET TYPE <MSB .TYPE>>
+ <COND (<ZERO? .TYPE>
+ ; <SAY-ERROR "FAR-MAP <2>">
+ <RFALSE>)
+ (<EQUAL? .TYPE ,NO-EXIT ,SORRY-EXIT ; ,FSORRY-EXIT>
+ <AGAIN>)
+ (<NOT <BTST .LEN ,MARKBIT>>
+ <AGAIN>)
+ (<EQUAL? .TYPE ,FCONNECT>
+ <SET DEST -1>)
+ (T
+ <SET DEST <GET .TBL ,XROOM>>
+ <COND (<OR <ZERO? .DEST>
+ <NOT <IN? .DEST ,ROOMS>>>
+ ; <SAY-ERROR "FAR-MAP <3>">
+ <RFALSE>)>)>
+ <COND (<OR <ZERO? .DEST> ; "No connection ..."
+ <L? .Y 0>
+ <G? .Y %<- ,MHEIGHT 1>>
+ <L? .X 0>
+ <G? .X %<- ,MWIDTH 1>>>
+ <AGAIN>)>
+ <SET LEN <BAND .LEN 127>>
+ <SET YOFF <GET ,YOFFS .DIR>> ; "Establish offsets."
+ <SET XOFF <GET ,XOFFS .DIR>>
+ <SET CHAR <GETB ,MCHARS .DIR>> ; "Continue the path."
+ <COND (<EQUAL? .TYPE ,X-EXIT>
+ <COND (<BTST .DIR 1>
+ <SET CHAR ,XCROSS>
+ <COND (<ZERO? ,VT220>
+ <SET CHAR %<ASCII !\X>>)>)
+ (T
+ <SET CHAR ,HVCROSS>
+ <COND (<ZERO? ,VT220>
+ <SET CHAR %<ASCII !\+>>)>)>)
+ (<OR <EQUAL? .TYPE ,SHADOW-EXIT>
+ <AND <EQUAL? .TYPE ,DCONNECT>
+ <NOT <IS? <GET .TBL ,XDATA> ,OPENED>>>>
+ <SET CHAR ,SOLID>
+ <COND (<ZERO? ,VT220>
+ <SET CHAR ,SP>)>)
+ (<ZERO? ,VT220>
+ <SET CHAR <GETB ,SHITCHARS .DIR>>)>
+ <SET NY .Y>
+ <SET NX .X>
+ <REPEAT ()
+ <SET NY <+ .NY .YOFF>>
+ <SET NX <+ .NX .XOFF>>
+ <COND (<OR <L? .NY 0>
+ <G? .NY %<- ,MHEIGHT 1>>
+ <L? .NX 0>
+ <G? .NX %<- ,MWIDTH 1>>>
+ <RETURN>)>
+ <PUTB <REST ,MAP <* .NY ,MWIDTH>> .NX .CHAR>
+ <COND (<DLESS? LEN 1>
+ <RETURN>)>>
+ <COND (<EQUAL? .DEST -1> ; "If it's an FCONNECT ..."
+ <AGAIN>)
+ (<IS? .DEST ,MAPPED>
+ <AGAIN>)
+ (<SET CHAR <INTBL? .DEST <REST ,ROOMS-MAPPED 1>
+ <GETB ,ROOMS-MAPPED 0> 1>>
+ <AGAIN>)
+ (<NOT <IS? .DEST ,VIEWED>>
+ <AGAIN>)>
+ <SET NY <+ .NY .YOFF>>
+ <SET NX <+ .NX .XOFF>>
+ <COND (<OR <L? .NY -1>
+ <G? .NY ,MHEIGHT>
+ <L? .NX -1>
+ <G? .NX ,MWIDTH>>
+ <AGAIN>)>
+ <FAR-MAP .DEST .NY .NX>>>
+
+<ROUTINE RELOOK ("OPT" (NOP 0))
+ <COND (<ZERO? .NOP>
+ <PRINT ,PERIOD>)>
+ <COND (<T? ,VERBOSITY>
+ <CRLF>)>
+ <V-LOOK>
+ <RFALSE>>
+
+<ROUTINE V-LOOK ("OPT" (V T))
+ <COND (<NOT <EQUAL? ,HOST ,MACINTOSH>>
+ <HLIGHT ,H-BOLD>)>
+ <SAY-HERE>
+ <CRLF>
+ <HLIGHT ,H-NORMAL>
+ <COND (<T? ,LIT?>
+ <MARK-EXITS>)>
+ <COND (<OR <ZERO? ,DMODE>
+ <EQUAL? ,PRIOR ,SHOWING-STATS ,SHOWING-INV>>
+ <DESCRIBE-HERE .V>
+ <COND (<ZERO? ,DMODE>
+ <UPPER-SLINE>
+ <LOWER-SLINE>
+ <SETG OLD-HERE ,HERE>
+ <RTRUE>)>
+ <DISPLAY-PLACE>
+ <RTRUE>)>
+ <DISPLAY-PLACE>
+ <COND (<BTST <LOWCORE FLAGS> 1>
+ <DIROUT ,D-SCREEN-OFF>
+ <DESCRIBE-HERE .V>
+ <DIROUT ,D-SCREEN-ON>)>
+ <RTRUE>>
+
+"Mark each visible exit as TOUCHED by setting bit 7 of XTYPE word."
+
+<ROUTINE MARK-EXITS ("AUX" DIR TBL WRD TYPE LEN)
+ <SET DIR ,P?NORTH>
+ <REPEAT ()
+ <SET TBL <GETP ,HERE .DIR>>
+ <COND (<T? .TBL>
+ <SET WRD <GET .TBL ,XTYPE>>
+ <SET TYPE <MSB .WRD>>
+ <SET LEN <BAND .WRD 127>>
+ <COND (<BTST .WRD ,MARKBIT>) ; "Already marked?"
+ (<OR <EQUAL? .TYPE ,CONNECT ,SCONNECT ,X-EXIT>
+ <AND <EQUAL? .TYPE ,FCONNECT>
+ <T? .LEN>>
+ <AND <EQUAL? .TYPE ,DCONNECT>
+ <IS? <GET .TBL ,XDATA> ,OPENED>>>
+ <PUT .TBL ,XTYPE <+ .WRD ,MARKBIT>>)>)>
+ <COND (<DLESS? DIR ,P?DOWN>
+ <RFALSE>)>>>
+
+<ROUTINE UPDATE-ROOMDESC ()
+ <SETG IN-DBOX ,SHOWING-ROOM>
+ <SETUP-DBOX>
+ <DESCRIBE-HERE>
+ <JUSTIFY-DBOX>
+ <DISPLAY-DBOX>
+ <RFALSE>>
+
+<ROUTINE DESCRIBE-HERE ("OPT" (V <>) "AUX" (INDENT 0) X)
+ <COND (<OR <ZERO? ,DMODE>
+ <EQUAL? ,PRIOR ,SHOWING-INV ,SHOWING-STATS>>
+ <INC INDENT>)>
+ <COND (<HERE? DEATH>
+ <COND (<T? .INDENT>
+ <TELL ,TAB>)>
+ <TELL "You are de">
+ <COND (<IS? ,DEATH ,MUNGED>
+ <TELL "feated." CR>
+ <RTRUE>)>
+ <TELL "ad." CR>
+ <RTRUE>)
+ (<ZERO? ,LIT?>
+ <MAKE ,HERE ,TOUCHED>
+ <MAKE ,HERE ,VIEWED>
+ <COND (<T? .INDENT>
+ <TELL ,TAB>)>
+ <COND (<WEARING-MAGIC? ,HELM>
+ <COND (<IN? ,URGRUE ,HERE>
+ <SETG P-IT-OBJECT ,URGRUE>
+ <SETG LAST-MONSTER ,URGRUE>
+ <TELL
+"You sense the presence of an obscure shadow in the darkness." CR>
+ <RTRUE>)
+ (<IN? ,GRUE ,HERE>
+ <MAKE ,GRUE ,SEEN>
+ <SETG P-IT-OBJECT ,GRUE>
+ <SETG LAST-MONSTER ,GRUE>
+ <TELL <PICK-NEXT ,GRUE-SIGHTS> ,PERIOD>
+ <RTRUE>)>)>
+ <TELL "It's completely dark">
+ <COND (<OR <NOT <IS? ,GRUE ,SEEN>>
+ <PROB 50>>
+ <MAKE ,GRUE ,SEEN>
+ <TELL ". You are likely to be eaten by a grue">)>
+ <PRINT ,PERIOD>
+ <RTRUE>)>
+ <UNMAKE ,GRUE ,SEEN>
+ <SET X <GETP ,HERE ,P?ACTION>>
+ <COND (<T? .X>
+ <COND (<OR <T? .V>
+ <ZERO? .INDENT>
+ <EQUAL? ,VERBOSITY 2>
+ <AND <EQUAL? ,VERBOSITY 1>
+ <NOT <IS? ,HERE ,TOUCHED>>>>
+ <COND (<T? .INDENT>
+ <TELL ,TAB>)>
+ <APPLY .X ,M-LOOK>)>)>
+ <MAKE ,HERE ,TOUCHED>
+ <MAKE ,HERE ,VIEWED>
+ <COND (<OR <T? .V>
+ <T? ,VERBOSITY>
+ <ZERO? .INDENT>>
+ <DESCRIBE-OBJECTS>)>
+ <RTRUE>>
+
+<ROUTINE UPPER-SLINE ()
+ <SETUP-SLINE>
+ <TELL C ,SP>
+ <PRINT-TABLE ,CHARNAME>
+ <NEXTLINE>
+ <TEXT-STATS>
+ <PRINTLINE 1>
+ <RTRUE>>
+
+<ROUTINE TEXT-STATS ("AUX" (STAT 0) X)
+ <REPEAT ()
+ <TELL <GET ,STSTR .STAT>>
+ <PRINTC %<ASCII !\:>>
+ <SET X <GET ,STATS .STAT>>
+ <COND (<L? .X 10>
+ <PRINTC %<ASCII !\0>>)>
+ <TELL N .X C ,SP>
+ <COND (<IGRTR? STAT 6>
+ <RFALSE>)>>>
+
+<ROUTINE NEXTLINE ("AUX" LEN)
+ <DIROUT ,D-TABLE-OFF>
+ <SET LEN <GET ,AUX-TABLE 0>>
+ <COPYT <REST ,AUX-TABLE 2> ,SLINE .LEN>
+ <DIROUT ,D-TABLE-ON ,AUX-TABLE>
+ <PUT ,AUX-TABLE 0 0>
+ <RFALSE>>
+
+<ROUTINE PRINTLINE (LINE "AUX" LEN X)
+ <DIROUT ,D-TABLE-OFF>
+ <SET LEN <GET ,AUX-TABLE 0>>
+ <SET X <REST ,SLINE <- ,WIDTH .LEN>>>
+ <COPYT <REST ,AUX-TABLE 2> .X .LEN>
+ <TO-TOP-WINDOW>
+ <DO-CURSET .LINE 1>
+ <HLIGHT ,H-INVERSE>
+ <PRINTT ,SLINE ,WIDTH>
+ <TO-BOTTOM-WINDOW>
+ <RFALSE>>
+
+<ROUTINE LOWER-SLINE ("AUX" (ANY 0) PTR DIR TBL TYPE X)
+ <SETUP-SLINE>
+ <PRINTC ,SP>
+ <SAY-HERE>
+ <NEXTLINE>
+ <TELL "Exits:">
+ <COND (<ZERO? ,LIT?>
+ <TELL " None visible">)
+ (T
+ <COPYT ,GOOD-DIRS 0 32> ; "List N-NW, remember in GOOD-DIRS."
+ <SET DIR ,I-NORTH>
+ <REPEAT ()
+ <SET TBL <GETP ,HERE <GETB ,PDIR-LIST .DIR>>>
+ <COND (<T? .TBL>
+ <SET TYPE <GET .TBL ,XTYPE>>
+ <SET X <MSB .TYPE>>
+ <COND (<OR <EQUAL? .X ,CONNECT ,SCONNECT ,X-EXIT>
+ <AND <EQUAL? .X ,FCONNECT>
+ <BAND .TYPE 127>>
+ <AND <EQUAL? .X ,DCONNECT>
+ <IS? <GET .TBL ,XDATA> ,OPENED>>>
+ <COPYT .TBL <REST ,GOOD-DIRS <* .DIR 4>> -4>
+ <INC ANY>
+ <TELL C ,SP <GET ,XLIST-NAMES .DIR>>)>)>
+ <COND (<IGRTR? DIR ,I-NW>
+ <RETURN>)>>
+ <SET PTR <REST ,GOOD-DIRS 2>> ; "Point to XROOM entries."
+ <REPEAT ()
+ <SET TBL <GETP ,HERE <GETB ,PDIR-LIST .DIR>>>
+ <COND (<T? .TBL>
+ <SET TYPE <GET .TBL ,XTYPE>>
+ <SET X <MSB .TYPE>>
+ <COND (<OR <EQUAL? .X ,CONNECT ,SCONNECT ,X-EXIT>
+ <AND <EQUAL? .X ,FCONNECT>
+ <BAND .TYPE 127>>
+ <AND <EQUAL? .X ,DCONNECT>
+ <IS? <GET .TBL ,XDATA> ,OPENED>>>
+ <COND (<OR <NOT <SET X
+ <INTBL? .TYPE ,GOOD-DIRS 8 132>>>
+ <NOT <SET X
+ <INTBL? <GET .TBL ,XROOM>
+ .PTR 8 132>>>>
+ <INC ANY>
+ <TELL C ,SP
+ <GET ,XLIST-NAMES .DIR>>)>)>)>
+ <COND (<IGRTR? DIR 11>
+ <RETURN>)>>
+ <COND (<ZERO? .ANY>
+ <TELL " None">)>)>
+ <PRINTC ,SP>
+ <PRINTLINE 2>
+ <RTRUE>>
+
+<GLOBAL DBOX-LINES:NUMBER 0> "Number of lines in current DBOX."
+<GLOBAL DBOX-TOP:NUMBER 0> "Top line to be displayed."
+
+<GLOBAL IN-DBOX:NUMBER ,SHOWING-ROOM> "Current contents of DBOX."
+<GLOBAL NEW-DBOX:NUMBER ,SHOWING-ROOM> "DBOX to update if visible."
+
+<ROUTINE SETUP-DBOX ()
+ <SETG DBOX-LINES 0>
+ <PUTB ,DBOX 0 ,SP>
+ <COPYT ,DBOX <REST ,DBOX 1> %<- 0 <- ,DBOX-LENGTH 1>>>
+ <PUT ,DBOX 0 0>
+ <DIROUT ,D-TABLE-ON ,DBOX>
+ <RFALSE>>
+
+<ROUTINE JUSTIFY-DBOX ("AUX" (MORE <>)
+ LINE BASE LEN PTR CHAR X SOURCE DEST END XLEN)
+ <DIROUT ,D-TABLE-OFF>
+ <SET LEN <GET ,DBOX 0>>
+ <SET LINE ,DBOX-LINES>
+ <SET BASE <REST ,DBOX 2>> ; "Skip over length word."
+ <SET BASE <+ .BASE <* .LINE ,BOXWIDTH>>>
+ <SET END <- ,BOXWIDTH 1>>
+
+ <REPEAT ()
+ <COND (<G? .BASE <+ <REST ,DBOX 2> .LEN>>
+ <RETURN>)>
+ <COND (<SET PTR <INTBL? ,EOL .BASE .END 1>>
+ ; <PUTB .PTR 0 ,SP>
+ <SET PTR <- .PTR .BASE>>
+ <SET X .PTR>
+ <REPEAT ()
+ <INC X>
+ <SET CHAR <GETB .BASE .X>>
+ <COND (<OR <EQUAL? .CHAR ,EOL>
+ <G? .CHAR 31>>
+ <RETURN>)>>
+ <SET SOURCE <+ .BASE .X>>
+ <SET DEST <+ .BASE ,BOXWIDTH>>
+ <COND (<NOT <EQUAL? .SOURCE .DEST>>
+ <SET XLEN <- .LEN <+ <* .LINE ,BOXWIDTH> .X>>>
+ <COPYT .SOURCE .DEST .XLEN>
+ <REPEAT ()
+ <PUTB .BASE .PTR ,SP>
+ <COND (<IGRTR? PTR .END>
+ <RETURN>)>
+ <INC LEN>>)>)
+ (T
+ <SET PTR ,BOXWIDTH>
+ <REPEAT ()
+ <COND (<DLESS? PTR 0>
+ <RETURN>)>
+ <SET CHAR <GETB .BASE .PTR>>
+ <COND (<AND <EQUAL? .CHAR ,SP>
+ <NOT <EQUAL? .PTR .END>>>
+ <SET SOURCE <+ .BASE .PTR>>
+ <INC SOURCE>
+ <SET DEST <+ .BASE ,BOXWIDTH>>
+ <COND (<EQUAL? .SOURCE .DEST>
+ <RETURN>)>
+ <SET XLEN <* .LINE ,BOXWIDTH>>
+ <SET XLEN <- .LEN <+ .XLEN .PTR>>>
+ <COPYT .SOURCE .DEST .XLEN>
+ <REPEAT ()
+ <COND (<IGRTR? PTR .END>
+ <RETURN>)>
+ <INC LEN>
+ <PUTB .BASE .PTR ,SP>>
+ <RETURN>)>>)>
+ <SET BASE <+ .BASE ,BOXWIDTH>>
+ <COND (<IGRTR? LINE %<- ,MAX-HEIGHT 1>>
+ <RETURN>)>>
+ <SETG DBOX-LINES .LINE>
+ <RTRUE>>
+
+<ROUTINE DISPLAY-DBOX ("AUX" (MORE 0) TLC BASE LINES)
+ <SETG NEW-DBOX 0>
+ <SET TLC <- 12 ,MAX-DHEIGHT>>
+ <SET BASE <REST ,DBOX 2>>
+ <COND (<T? ,DBOX-TOP>
+ <SET BASE <+ .BASE <* ,DBOX-TOP ,BOXWIDTH>>>)>
+ <SET LINES ,DHEIGHT>
+ <COND (<BTST ,IN-DBOX ,SHOWING-STATS>
+ <SET LINES ,MAX-DHEIGHT>)
+ (<G? <- ,DBOX-LINES ,DBOX-TOP> ,DHEIGHT>
+ <INC MORE>
+ <DEC LINES>)>
+ <TO-TOP-WINDOW>
+ <COLOR ,FORE ,BGND>
+ <DO-CURSET .TLC 2>
+ <COND (<EQUAL? ,HOST ,APPLE-2C> ; "Nudge it over."
+ <PRINTC ,SP>)
+ (<ZERO? ,VT220>
+ <COND (<NOT <EQUAL? ,HOST ,IBM>>
+ <HLIGHT ,H-INVERSE>)>)>
+ <PRINTT .BASE ,BOXWIDTH .LINES>
+ <COND (<T? ,DBOX-TOP>
+ <SAY-MORE .TLC T>)>
+ <COND (<T? .MORE>
+ <SAY-MORE <+ ,DHEIGHT <- 11 ,MAX-DHEIGHT>>>)>
+ <TO-BOTTOM-WINDOW>
+ <RTRUE>>
+
+<ROUTINE SAY-MORE (Y "OPT" (UP <>) "AUX" X)
+ <COLOR ,GCOLOR ,BGND>
+ <DO-CURSET .Y 2>
+ <COND (<EQUAL? ,HOST ,APPLE-2C>
+ <PRINTC ,SP>)>
+ <TELL "[MORE]">
+ <COND (<EQUAL? ,HOST ,MACINTOSH>
+ <PRINT-SPACES <- ,BOXWIDTH 30>>
+ <TELL "[Press ">
+ <COND (<T? .UP>
+ <TELL "\\">)
+ (T
+ <TELL "/">)>
+ <TELL " or ">
+ <SET X <FONT ,F-NEWFONT>>
+ <COND (<T? .UP>
+ <PRINTC 92>)
+ (T
+ <PRINTC 93>)>
+ <SET X <FONT ,F-DEFAULT>>)
+ (<OR <T? ,VT220>
+ <EQUAL? ,HOST ,APPLE-2C ,IBM>>
+ <PRINT-SPACES <- ,BOXWIDTH 25>>
+ <TELL "[Press ">
+ <SET X <FONT ,F-NEWFONT>>
+ <COND (<T? ,VT220>
+ <SET X 93>
+ <COND (<T? .UP>
+ <DEC X>)>)
+ (<EQUAL? ,HOST ,APPLE-2C>
+ <SET X 74>
+ <COND (<T? .UP>
+ <INC X>)>)
+ (T
+ <SET X 25>
+ <COND (<T? .UP>
+ <DEC X>)>)>
+ <PRINTC .X>
+ <SET X <FONT ,F-DEFAULT>>)
+ (T
+ <PRINT-SPACES <- ,BOXWIDTH 34>>
+ <COND (<T? .UP>
+ <TELL " ">)>
+ <TELL "[Press ">
+ <COND (<T? .UP>
+ <TELL "UP">)
+ (T
+ <TELL "DOWN">)>
+ <TELL " arrow">)>
+ <TELL " to scroll]">
+ <RFALSE>>
+
+<OBJECT X-OBJECT>
+
+<GLOBAL DESCING:OBJECT <>> "Object currently being described."
+
+<ROUTINE DESCRIBE-OBJECTS ("AUX" (TWO? 0) (IT? 0) (ANY? 0) (CR 0)
+ (B 0) 1ST? OBJ NXT STR X)
+ <COND (<ZERO? ,LIT?>
+ <TOO-DARK>
+ <RTRUE>)
+ (<NOT <SET OBJ <FIRST? ,HERE>>>
+ <RTRUE>)> ; "Nothing here, so scram."
+
+ ; "Handle vehicles."
+
+ <SET OBJ <LOC ,WINNER>>
+ <COND (<AND <NOT <EQUAL? .OBJ ,HERE>>
+ <IS? .OBJ ,VEHICLE>
+ <IN? .OBJ ,HERE>>
+ <MOVE .OBJ ,DUMMY-OBJECT>
+ <COND (<SEE-ANYTHING-IN? .OBJ>
+ <TELL ,TAB ,YOU-SEE>
+ <CONTENTS .OBJ>
+ <ON-IN .OBJ>
+ <TELL ,PERIOD>)>)>
+
+ ; "Hide invisible objects"
+
+ <COND (<SET OBJ <FIRST? ,HERE>>
+ <REPEAT ()
+ <SET NXT <NEXT? .OBJ>>
+ <COND (<OR <IS? .OBJ ,NODESC>
+ <EQUAL? .OBJ ,WINNER>>
+ <MOVE .OBJ ,DUMMY-OBJECT>)>
+ <SET OBJ .NXT>
+ <COND (<ZERO? .OBJ>
+ <RETURN>)>>)>
+
+ ; "Apply FDESCs."
+
+ ; <COND (<SET OBJ <FIRST? ,HERE>>
+ <REPEAT ()
+ <SET NXT <NEXT? .OBJ>>
+ <SET STR <GETP .OBJ ,P?FDESC>>
+ <COND (<AND <T? .STR>
+ <NOT <IS? .OBJ ,TOUCHED>>>
+ <TELL ,TAB .STR CR>
+ <THIS-IS-IT .OBJ>
+ <MOVE .OBJ ,DUMMY-OBJECT>)>
+ <SET OBJ .NXT>
+ <COND (<ZERO? .OBJ>
+ <RETURN>)>>)>
+
+ ; "Apply DESCFCNs."
+
+ <COND (<SET OBJ <FIRST? ,HERE>>
+ <REPEAT ()
+ <SET NXT <NEXT? .OBJ>>
+ <SET STR <GETP .OBJ ,P?DESCFCN>>
+ <COND (<T? .STR>
+ <SETG DESCING .OBJ>
+ <TELL ,TAB>
+ <APPLY .STR ,M-OBJDESC>
+ <CRLF>
+ <THIS-IS-IT .OBJ>
+ <MOVE .OBJ ,DUMMY-OBJECT>)>
+ <SET OBJ .NXT>
+ <COND (<ZERO? .OBJ>
+ <RETURN>)>>)>
+
+ ; "Print whatever's left in a nice sentence"
+
+ <SET 1ST? 1>
+ <SET OBJ <FIRST? ,HERE>>
+ <REPEAT ()
+ <COND (<ZERO? .OBJ>
+ <COND (<T? .1ST?>
+ <RETURN>) ; "Nothin' left."
+ (<AND <T? .IT?>
+ <ZERO? .TWO?>>
+ <THIS-IS-IT .OBJ>)>
+ <TELL " here.">
+ <INC ANY?>
+ <RETURN>)>
+ <SET NXT <NEXT? .OBJ>>
+ <COND (<T? .1ST?>
+ <DEC 1ST?>
+ <TELL ,TAB>
+ <COND (<T? .NXT>
+ <TELL ,YOU-SEE>)
+ (<IS? .OBJ ,PLURAL>
+ <TELL "There are ">)
+ (T
+ <TELL "There's ">)>)
+ (T
+ <COND (<T? .NXT>
+ <TELL ", ">)
+ (T
+ <TELL ,AND>)>)>
+ <SETG DESCING .OBJ>
+ <TELL A .OBJ>
+ <COND (<AND <EQUAL? .OBJ ,GOBLET>
+ <IN? ,BFLY .OBJ>
+ <IS? ,BFLY ,LIVING>>
+ <INC B>
+ <TELL ,WITH A ,BFLY>
+ <PRINT " resting on the rim">
+ <REMOVE ,BFLY>)>
+ <COND (<AND <SEE-INSIDE? .OBJ>
+ <SEE-ANYTHING-IN? .OBJ>>
+ <MOVE .OBJ ,X-OBJECT>)>
+ <COND (<AND <ZERO? .IT?>
+ <ZERO? .TWO?>>
+ <SET IT? .OBJ>)
+ (T
+ <SET TWO? T>
+ <SET IT? <>>)>
+ <SET OBJ .NXT>>
+ <COND (<SET OBJ <FIRST? ,X-OBJECT>>
+ <REPEAT ()
+ <INC ANY?>
+ <TELL C ,SP>
+ <COND (<EQUAL? .OBJ ,GURDY>
+ <TELL "Within">)
+ (<EQUAL? .OBJ ,ARCH>
+ <TELL "Under">)
+ (<IS? .OBJ ,SURFACE>
+ <TELL "On">)
+ (T
+ <TELL "Inside">)>
+ <TELL C ,SP THE .OBJ " you see ">
+ <CONTENTS .OBJ>
+ <PRINTC ,PER>
+ <COND (<NOT <SET OBJ <NEXT? .OBJ>>>
+ <RETURN>)>>)>
+ <COND (<T? .B>
+ <MOVE ,BFLY ,GOBLET>)>
+ <COND (<T? .ANY?>
+ <CRLF>)>
+ <SETG DESCING <>>
+ <MOVE-ALL ,X-OBJECT ,HERE>
+ <MOVE-ALL ,DUMMY-OBJECT ,HERE>
+ <RTRUE>>
+
+<ROUTINE SEE-ANYTHING-IN? ("OPT" (OBJ ,PRSO))
+ <COND (<SET OBJ <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<IS? .OBJ ,NODESC>)
+ (<NOT <EQUAL? .OBJ ,WINNER>>
+ <RTRUE>)>
+ <COND (<NOT <SET OBJ <NEXT? .OBJ>>>
+ <RFALSE>)>>)>
+ <RFALSE>>
+
+<ROUTINE SEE-INSIDE? (OBJ)
+ <COND (<ZERO? .OBJ>
+ <RFALSE>)
+ ; (<T? ,P-MOBY-FLAG>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,WINNER ,PLAYER>
+ <RTRUE>)
+ (<IS? .OBJ ,VEHICLE>
+ <RTRUE>)
+ (<IS? .OBJ ,SURFACE>
+ <RTRUE>)
+ (<IS? .OBJ ,PERSON>
+ <RTRUE>)
+ (<IS? .OBJ ,LIVING>
+ <RTRUE>)
+ (<NOT <IS? .OBJ ,CONTAINER>>
+ <RFALSE>)
+ (<IS? .OBJ ,OPENED>
+ <RTRUE>)
+ (<IS? .OBJ ,TRANSPARENT>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE ACCESSIBLE? (OBJ "AUX" L)
+ <COND (<EQUAL? .OBJ <> ,NOT-HERE-OBJECT>
+ <RFALSE>)
+ (<EQUAL? .OBJ ,PSEUDO-OBJECT>
+ <COND (<EQUAL? ,LAST-PSEUDO-LOC ,HERE>
+ <RTRUE>)>
+ <RFALSE>)>
+ <SET L <META-LOC .OBJ>>
+ <COND (<EQUAL? .L ,GLOBAL-OBJECTS>
+ <RTRUE>)
+ (<AND <EQUAL? .L ,WINNER ,HERE <LOC ,WINNER>>
+ <VISIBLE? .OBJ>>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE META-LOC (OBJ)
+ <REPEAT ()
+ <COND (<ZERO? .OBJ>
+ <RFALSE>)
+ (<IN? .OBJ ,GLOBAL-OBJECTS>
+ <RETURN ,GLOBAL-OBJECTS>)
+ (<IN? .OBJ ,ROOMS>
+ <RETURN .OBJ>)>
+ <SET OBJ <LOC .OBJ>>>>
+
+<ROUTINE VISIBLE? (OBJ "AUX" L)
+ <COND (<EQUAL? .OBJ <> ,NOT-HERE-OBJECT>
+ <RFALSE>)
+ (<EQUAL? .OBJ ,PSEUDO-OBJECT>
+ <COND (<EQUAL? ,LAST-PSEUDO-LOC ,HERE>
+ <RTRUE>)>
+ <RFALSE>)
+ (<EQUAL? .OBJ <LOC ,WINNER>>
+ <RTRUE>)>
+ <SET L <LOC .OBJ>>
+ <COND (<EQUAL? .L <> ,GLOBAL-OBJECTS>
+ <RFALSE>)
+ (<EQUAL? .L ,WINNER <LOC ,WINNER> ,HERE>
+ <RTRUE>)
+ (<AND <EQUAL? .L ,LOCAL-GLOBALS>
+ <GLOBAL-IN? ,HERE .OBJ>>
+ <RTRUE>)
+ (<AND <SEE-INSIDE? .L>
+ <VISIBLE? .L>>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE DPRINT (O "AUX" X)
+ <SET X <GETP .O ,P?SDESC>>
+ <COND (<T? .X>
+ <APPLY .X .O>
+ <RTRUE>)
+ (<IS? .O ,NOARTICLE>
+ <SET X <GETP .O ,P?NAME-TABLE>>
+ <COND (<T? .X>
+ <PRINT-TABLE .X>
+ <RTRUE>)>)>
+ <PRINTD .O>
+ <RTRUE>>
+
+<ROUTINE THE-PRINT ("OPT" (O ,PRSO) "AUX" X)
+ <COND (<NOT <IS? .O ,NOARTICLE>>
+ <TELL ,LTHE>)>
+ <DPRINT .O>
+ <RTRUE>>
+
+<ROUTINE CTHE-PRINT ("OPT" (O ,PRSO) "AUX" X)
+ <COND (<NOT <IS? .O ,PROPER>>
+ <TELL ,XTHE>)>
+ <DPRINT .O>
+ <RTRUE>>
+
+; <ROUTINE CRCTHE-PRINT ("OPT" (O ,PRSO) "AUX" X)
+ <CRLF>
+ <COND (<NOT <IS? .O ,PROPER>>
+ <TELL ,XTHE>)>
+ <DPRINT .O>
+ <RTRUE>>
+
+<ROUTINE THEI-PRINT ("AUX" X)
+ <COND (<NOT <IS? ,PRSI ,NOARTICLE>>
+ <TELL ,LTHE>)>
+ <DPRINT ,PRSI>
+ <RTRUE>>
+
+<ROUTINE CTHEI-PRINT ("AUX" X)
+ <COND (<NOT <IS? ,PRSI ,PROPER>>
+ <TELL ,XTHE>)>
+ <DPRINT ,PRSI>
+ <RTRUE>>
+
+<ROUTINE PRINTA ("OPT" (O ,PRSO) "AUX" X)
+ <COND (<IS? .O ,NOARTICLE>)
+ (<OR <IS? .O ,PROPER>
+ <AND <IS? .O ,PLURAL>
+ <IS? .O ,PERSON>>>
+ <TELL ,LTHE>)
+ (<IS? .O ,VOWEL>
+ <PRINTI "an ">)
+ (T
+ <PRINTI "a ">)>
+ <DPRINT .O>
+ <RTRUE>>
+
+<ROUTINE PRINTCA ("OPT" (O ,PRSO) "AUX" X)
+ <COND (<IS? .O ,NOARTICLE>)
+ (<OR <IS? .O ,PROPER>
+ <AND <IS? .O ,PLURAL>
+ <IS? .O ,PERSON>>>
+ <TELL ,XTHE>)
+ (<IS? .O ,VOWEL>
+ <PRINTI "An ">)
+ (T
+ <TELL ,XA>)>
+ <DPRINT .O>
+ <RTRUE>>
+
+<ROUTINE KERBLAM ()
+ <ITALICIZE "Kerblam">
+ <TELL "! ">
+ <RFALSE>>
+
+<ROUTINE WHOOSH ()
+ <ITALICIZE "Whoosh">
+ <TELL "! ">
+ <RFALSE>>
+
+"Don't call this when you're in Screen 1!"
+
+<ROUTINE ITALICIZE (STR "AUX" (PTR 2) LEN CHAR)
+ <PUT ,AUX-TABLE 0 0>
+ <DIROUT ,D-TABLE-ON ,AUX-TABLE>
+ <TELL .STR>
+ <DIROUT ,D-TABLE-OFF>
+ <SET LEN <GET ,AUX-TABLE 0>>
+ <INC LEN>
+ <COND (<L? .LEN 2>
+ <RTRUE>)
+ (<BTST <LOWCORE (ZVERSION 1)> 8> ; "Italics?"
+ <HLIGHT ,H-ITALIC>
+ <REPEAT ()
+ <SET CHAR <GETB ,AUX-TABLE .PTR>>
+ <COND (<AND <NOT <EQUAL? ,HOST ,ATARI-ST>>
+ <OR <EQUAL? .CHAR ,SP ,PER 44>
+ <EQUAL? .CHAR ,EXCLAM 63 59>
+ <EQUAL? .CHAR 58>>>
+ <HLIGHT ,H-NORMAL>
+ <PRINTC .CHAR>
+ <HLIGHT ,H-ITALIC>)
+ (T
+ <PRINTC .CHAR>)>
+ <COND (<EQUAL? .PTR .LEN>
+ <RETURN>)>
+ <INC PTR>>
+ <HLIGHT ,H-NORMAL>
+ <RTRUE>)>
+ <REPEAT () ; "Caps if no italics."
+ <SET CHAR <GETB ,AUX-TABLE .PTR>>
+ <COND (<AND <G? .CHAR 96>
+ <L? .CHAR 123>>
+ <SET CHAR <- .CHAR ,SP>>)>
+ <PRINTC .CHAR>
+ <COND (<EQUAL? .PTR .LEN>
+ <RETURN>)>
+ <INC PTR>>
+ <RTRUE>>
+
+<ROUTINE NOUN-USED? (WORD1 "OPT" (WORD2 <>) (WORD3 <>)
+ "AUX" O I OOF IOF)
+ <COND (<ZERO? .WORD1>
+ <RFALSE>)
+ (<SET O <INTBL? ,PRSA ,R-VERBS ,NR-VERBS>>
+ <SET O <GET ,P-NAMW 1>>
+ <SET OOF <GET ,P-OFW 1>>
+ <SET I <GET ,P-NAMW 0>>
+ <SET IOF <GET ,P-OFW 0>>)
+ (T
+ <SET O <GET ,P-NAMW 0>>
+ <SET OOF <GET ,P-OFW 0>>
+ <SET I <GET ,P-NAMW 1>>
+ <SET IOF <GET ,P-OFW 1>>)>
+ <COND (<OR <AND <THIS-PRSO?>
+ <EQUAL? .WORD1 .O .OOF>>
+ <AND <T? ,PRSI>
+ <THIS-PRSI?>
+ <EQUAL? .WORD1 .I .IOF>>>
+ <RETURN .WORD1>)
+ (<ZERO? .WORD2>
+ <RFALSE>)
+ (<OR <AND <THIS-PRSO?>
+ <EQUAL? .WORD2 .O .OOF>>
+ <AND <T? ,PRSI>
+ <THIS-PRSI?>
+ <EQUAL? .WORD2 .I .IOF>>>
+ <RETURN .WORD2>)
+ (<ZERO? .WORD3>
+ <RFALSE>)
+ (<OR <AND <THIS-PRSO?>
+ <EQUAL? .WORD3 .O .OOF>>
+ <AND <T? ,PRSI>
+ <THIS-PRSI?>
+ <EQUAL? .WORD3 .I .IOF>>>
+ <RETURN .WORD3>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE ADJ-USED? (WORD1 "OPT" (WORD2 <>) (WORD3 <>) "AUX" O I)
+ <COND (<ZERO? .WORD1>
+ <RFALSE>)
+ (<SET O <INTBL? ,PRSA ,R-VERBS ,NR-VERBS>>
+ <SET O <GET ,P-ADJW 1>>
+ <SET I <GET ,P-ADJW 0>>)
+ (T
+ <SET O <GET ,P-ADJW 0>>
+ <SET I <GET ,P-ADJW 1>>)>
+ <COND (<OR <AND <THIS-PRSO?>
+ <EQUAL? .WORD1 .O>>
+ <AND <T? ,PRSI>
+ <THIS-PRSI?>
+ <EQUAL? .WORD1 .I>>>
+ <RETURN .WORD1>)
+ (<ZERO? .WORD2>
+ <RFALSE>)
+ (<OR <AND <THIS-PRSO?>
+ <EQUAL? .WORD2 .O>>
+ <AND <T? ,PRSI>
+ <THIS-PRSI?>
+ <EQUAL? .WORD2 .I>>>
+ <RETURN .WORD2>)
+ (<ZERO? .WORD3>
+ <RFALSE>)
+ (<OR <AND <THIS-PRSO?>
+ <EQUAL? .WORD3 .O>>
+ <AND <T? ,PRSI>
+ <THIS-PRSI?>
+ <EQUAL? .WORD3 .I>>>
+ <RETURN .WORD3>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE REPLACE-ADJ? (OBJ OLD NEW "AUX" TBL LEN)
+ <SET TBL <GETPT .OBJ ,P?ADJECTIVE>>
+ <COND (<ZERO? .TBL>
+ <RFALSE>)>
+ <SET LEN </ <PTSIZE .TBL> 2>>
+ <REPEAT ()
+ <COND (<DLESS? LEN 0>
+ <RFALSE>)
+ (<EQUAL? <GET .TBL .LEN> .OLD>
+ <PUT .TBL .LEN .NEW>
+ <RTRUE>)>>>
+
+<ROUTINE REPLACE-SYN? (OBJ OLD NEW "AUX" TBL LEN)
+ <SET TBL <GETPT .OBJ ,P?SYNONYM>>
+ <COND (<ZERO? .TBL>
+ <RFALSE>)>
+ <SET LEN </ <PTSIZE .TBL> 2>>
+ <REPEAT ()
+ <COND (<DLESS? LEN 0>
+ <RFALSE>)
+ (<EQUAL? <GET .TBL .LEN> .OLD>
+ <PUT .TBL .LEN .NEW>
+ <RTRUE>)>>>
+
+<ROUTINE REPLACE-GLOBAL? (OBJ OLD NEW "AUX" TBL LEN)
+ <SET TBL <GETPT .OBJ ,P?GLOBAL>>
+ <COND (<ZERO? .TBL>
+ <RFALSE>)>
+ <SET LEN </ <PTSIZE .TBL> 2>>
+ <REPEAT ()
+ <COND (<DLESS? LEN 0>
+ <RFALSE>)
+ (<EQUAL? <GET .TBL .LEN> .OLD>
+ <PUT .TBL .LEN .NEW>
+ <RTRUE>)>>>
+
+<GLOBAL BARY:NUMBER 0> "Y-pos of status bar display."
+<GLOBAL BARX:NUMBER 0> "X-pos of status bar display."
+
+<ROUTINE DISPLAY-STATS ()
+ <SETG BMODE <>>
+ <SETG DHEIGHT ,MAX-DHEIGHT>
+ <SETG DBOX-TOP 0>
+ <SETG DBOX-LINES 0>
+ <SETG IN-DBOX ,SHOWING-STATS>
+ <PUTB ,DBOX 0 ,SP>
+ <COPYT ,DBOX <REST ,DBOX 1> %<- 0 <- ,DBOX-LENGTH 1>>>
+ <DISPLAY-DBOX>
+ <STATBARS <- 13 ,MAX-DHEIGHT>>
+ <RFALSE>>
+
+<ROUTINE STATBARS (Y "OPT" X N "AUX" (STAT 0))
+ <COND (<ZERO? .X>
+ <SET X <+ </ <- ,DWIDTH ,BARWIDTH> 2> 1>>)>
+ <COND (<NOT <ASSIGNED? N>>
+ <SET N ,ARMOR-CLASS>)>
+ <SETG BARY .Y>
+ <SETG BARX .X>
+ <TO-TOP-WINDOW>
+ <COLOR ,FORE ,BGND>
+ <DO-CURSET ,BARY ,BARX>
+ <PRINTT ,BAR-LABELS ,LABEL-WIDTH <+ .N 1>>
+ <REPEAT ()
+ <APPLY ,STAT-ROUTINE .STAT <GET ,STATS .STAT>>
+ <COND (<IGRTR? STAT .N>
+ <RETURN>)>>
+ <TO-BOTTOM-WINDOW>
+ <RFALSE>>
+
+<ROUTINE SHOW-STAT (STAT)
+ <TO-TOP-WINDOW>
+ <APPLY ,STAT-ROUTINE .STAT <GET ,STATS .STAT>>
+ <TO-BOTTOM-WINDOW>
+ <RFALSE>>
+
+<ROUTINE BAR-NUMBER (STAT VAL "AUX" Y)
+ <HLIGHT ,H-NORMAL>
+ <SET Y <+ .STAT ,BARY>>
+ <CURSET .Y <+ ,BARX %<+ ,LABEL-WIDTH 1>>>
+ <COND (<L? .VAL 10>
+ <TELL " ">)
+ (<L? .VAL 100>
+ <TELL C ,SP>)>
+ <TELL N .VAL>
+ <RFALSE>>
+
+<ROUTINE RAWBAR (STAT VAL "AUX" PTR X Y Z)
+ <PUTB ,SLINE 0 ,BASE-CHAR> ; "Clear bar."
+ <SET X <- 0 ,SWIDTH>>
+ <COPYT ,SLINE <REST ,SLINE 1> .X>
+
+ <SET X <+ ,BASE-CHAR ,BAR-RES>> ; "Solid char."
+ <SET Y </ .VAL ,BAR-RES>> ; "# solids to print."
+ <SET Z <- ,SWIDTH 1>> ; "Maximum."
+ <SET PTR 1>
+ <REPEAT ()
+ <COND (<G? .PTR .Y>
+ <RETURN>)>
+ <PUTB ,SLINE .PTR .X>
+ <COND (<IGRTR? PTR .Z>
+ <RETURN>)>>
+ <PUTB ,SLINE .PTR <+ ,BASE-CHAR <MOD .VAL ,BAR-RES>>>
+
+ <PUTB ,SLINE 0 ,LCAP> ; "Install caps at both ends."
+ <PUTB ,SLINE <+ ,SWIDTH 1> ,RCAP>
+
+ <SET Y <+ .STAT ,BARY>>
+ <SET X <+ ,BARX ,LABEL-WIDTH>>
+
+ <DO-CURSET .Y .X>
+ <SET Z <FONT ,F-NEWFONT>>
+ <COLOR ,GCOLOR ,BGND>
+ <SET Z <+ ,SWIDTH 2>>
+ <PRINTT ,SLINE .Z>
+
+ <DO-CURSET .Y <+ .Z .X>>
+ <SET Z <FONT ,F-DEFAULT>>
+ <COLOR ,FORE ,BGND>
+ <COND (<L? .VAL 10>
+ <PRINTC ,SP>)>
+ <TELL N .VAL "%">
+ <RFALSE>>
+
+<ROUTINE APPLE-STATS ("AUX" (CNT 0) X)
+ <SETUP-SLINE>
+ <REPEAT ()
+ <TELL <GET ,STSTR .CNT> ":">
+ <SET X <GET ,STATS .CNT>>
+ <COND (<L? .X 10>
+ <TELL "0">)>
+ <TELL N .X>
+ <COND (<IGRTR? CNT 6>
+ <RETURN>)>
+ <PRINTC ,SP>
+ <COND (<G? ,DWIDTH 46>
+ <PRINTC ,SP>)>>
+ <CENTER-SLINE>
+ <SHOW-SLINE 2>
+ <RTRUE>>
+
+<ROUTINE UPDATE-STAT (DELTA "OPT" (STAT ,ENDURANCE) (UPDATE-MAX <>)
+ "AUX" (NEWRANK 0)
+ NSTAT OSTAT MAX OMAX NLVL OLVL X)
+ <COND (<ZERO? .DELTA>
+ <RFALSE>)>
+ <SET OSTAT <GET ,STATS .STAT>>
+ <SET NSTAT <+ .OSTAT .DELTA>>
+ <COND (<L? .NSTAT 0>
+ <SET NSTAT 0>)
+ (<EQUAL? .STAT ,EXPERIENCE>)
+ (<G? .NSTAT ,STATMAX>
+ <SET NSTAT ,STATMAX>)>
+ <COND (<EQUAL? .OSTAT .NSTAT>
+ <RFALSE>)>
+ <PUT ,STATS .STAT .NSTAT>
+
+ <SET OMAX <GET ,MAXSTATS .STAT>>
+ <COND (<ZERO? .UPDATE-MAX>)
+ (<EQUAL? .STAT ,EXPERIENCE>)
+ (<NOT <EQUAL? .NSTAT .OMAX>>
+ <SET MAX <+ .DELTA .OMAX>>
+ <COND (<L? .MAX 0>
+ <SET MAX 0>)
+ (<G? .MAX ,STATMAX>
+ <SET MAX ,STATMAX>)>
+ <PUT ,MAXSTATS .STAT .MAX>)>
+
+ <COND (<NOT <EQUAL? .NSTAT .OMAX>>
+ <SETG NO-REFRESH .STAT>)>
+
+ <COND (<EQUAL? .STAT ,EXPERIENCE>
+ <SET NLVL <GET-LEVEL? .NSTAT>>
+ <SET OLVL <GET-LEVEL? .OSTAT>>
+ <COND (<OR <G? .NLVL .OLVL>
+ <AND <ZERO? .NLVL>
+ <EQUAL? .OLVL ,MAX-LEVEL>>>
+ <UPGRADE-RANK>
+ <INC NEWRANK>)>)>
+
+ <COND (<T? ,SAY-STAT>
+ <COND (<NOT <EQUAL? ,HOST ,MACINTOSH>>
+ <HLIGHT ,H-BOLD>)>
+ <TELL ,TAB "[Your " <GET ,STAT-NAMES .STAT>>
+ <SET X ,S-BEEP>
+ <COND (<EQUAL? .NSTAT .OMAX>
+ <TELL " is back to normal">)
+ (T
+ <TELL " just went ">
+ <COND (<L? .DELTA 0>
+ <SET X ,S-BOOP>
+ <TELL B ,W?DOWN>)
+ (T
+ <TELL B ,W?UP>)>)>
+
+ <COND (<T? .NEWRANK>
+ <TELL ". You have achieved the rank of ">
+ <ANNOUNCE-RANK>)>
+
+ <TELL ".]" CR>
+ <HLIGHT ,H-NORMAL>
+ <SOUND .X>)>
+
+ <COND (<ZERO? ,DMODE>
+ <UPPER-SLINE>)
+ (<ZERO? ,VT220>
+ <APPLE-STATS>)
+ (<EQUAL? ,IN-DBOX ,SHOWING-STATS>
+ <COND (<T? .NEWRANK>
+ <SHOW-RANK>
+ <TO-TOP-WINDOW>
+ <SET STAT ,ENDURANCE>
+ <REPEAT ()
+ <APPLY ,STAT-ROUTINE .STAT <GET ,STATS .STAT>>
+ <COND (<IGRTR? STAT ,ARMOR-CLASS>
+ <RETURN>)>>
+ <TO-BOTTOM-WINDOW>
+ <RTRUE>)
+ (<EQUAL? .STAT ,EXPERIENCE>
+ <RTRUE>)>
+ <SHOW-STAT .STAT>)
+ (<ZERO? ,BMODE>)
+ (<OR <T? .NEWRANK>
+ <EQUAL? .STAT ,ENDURANCE>>
+ <SHOW-STAT ,ENDURANCE>)>
+
+ <COND (<AND <ZERO? .NSTAT>
+ <EQUAL? .STAT ,ENDURANCE ,STRENGTH>>
+ <TELL ,TAB "Your last ounce of " <GET ,STAT-NAMES .STAT>
+ " gives out">
+ <JIGS-UP>)>
+ <RTRUE>>
+
+<ROUTINE GET-LEVEL? (VAL "AUX" (LVL 0))
+ <REPEAT ()
+ <COND (<L? .VAL <GET ,THRESHOLDS .LVL>>
+ <RETURN .LVL>)
+ (<IGRTR? LVL ,MAX-LEVEL>
+ <RFALSE>)>>>
+
+<ROUTINE UPGRADE-RANK ("AUX" TBL O N)
+ <SET TBL ,STATS>
+ <REPEAT ()
+ <SET O <GET .TBL ,ENDURANCE>>
+ <SET N </ <- ,STATMAX .O> 10>>
+ <COND (<L? .N 1>
+ <SET N 1>)>
+ <SET N <+ .O .N>>
+ <COND (<G? .N ,STATMAX>
+ <SET N ,STATMAX>)
+ (<L? .N 1>
+ <SET N 1>)>
+ <PUT .TBL ,ENDURANCE .N>
+ <COND (<EQUAL? .TBL ,MAXSTATS>
+ <RFALSE>)>
+ <SET TBL ,MAXSTATS>>>
+
+<ROUTINE PRINT-TABLE (TBL "AUX" (PTR 1) LEN)
+ <SET LEN <GETB .TBL 0>>
+ <COND (<ZERO? .LEN>
+ <RFALSE>)>
+ <REPEAT ()
+ <PRINTC <GETB .TBL .PTR>>
+ <COND (<IGRTR? PTR .LEN>
+ <RFALSE>)>>>
+
+<ROUTINE WATER-VANISH ()
+ <VANISH>
+ <TELL CTHEO>
+ <PRINT " disappears into the ">
+ <TELL "water." CR>
+ <RTRUE>>
+
+<ROUTINE VANISH ("OPT" (OBJ ,PRSO))
+ <WINDOW ,SHOWING-ALL>
+ <REMOVE .OBJ>
+ <SETG P-IT-OBJECT ,NOT-HERE-OBJECT>
+ <RFALSE>>
+
+<ROUTINE LIGHT-SOURCE? ("AUX" OBJ LEN)
+ <COND (<IS? ,HERE ,INDOORS>)
+ (<NOT <PLAIN-ROOM?>>
+ <RETURN ,SUN>)>
+ <SET LEN <GET ,LIGHT-SOURCES 0>>
+ <REPEAT ()
+ <SET OBJ <GET ,LIGHT-SOURCES .LEN>>
+ <COND (<AND <IS? .OBJ ,LIGHTED>
+ <VISIBLE? .OBJ>>
+ <RETURN .OBJ>)>
+ <COND (<DLESS? LEN 1>
+ <RETURN>)>>
+ <SET OBJ <FIND-IN? ,WINNER ,LIGHTED>>
+ <COND (<ZERO? .OBJ>
+ <SET OBJ <FIND-IN? <LOC ,WINNER> ,LIGHTED>>)>
+ <RETURN .OBJ>>
+
+<GLOBAL STORAGE:NUMBER 0>
+
+<ROUTINE NEW-EXIT? (OBJ DIR TYPE "OPT" ROOM DATA "AUX" PTR X TBL BYTES)
+ <SET TBL <GETP .OBJ .DIR>>
+ <COND (<ZERO? .TBL>
+ <SET BYTES 4>
+ <COND (<ASSIGNED? DATA>
+ <SET BYTES 6>)>
+ <SET PTR ,STORAGE>
+ <SET X <+ ,STORAGE .BYTES>>
+ <COND (<G? .X ,STORAGE-SPACE>
+ <SAY-ERROR "NEW-EXIT?">
+ <RFALSE>)>
+ <SETG STORAGE .X>
+ <SET TBL <REST ,FREE-STORAGE .PTR>>
+ <PUTP .OBJ .DIR .TBL>)>
+ <PUT .TBL ,XTYPE .TYPE>
+ <COND (<ASSIGNED? ROOM>
+ <PUT .TBL ,XROOM .ROOM>)>
+ <COND (<ASSIGNED? DATA>
+ <PUT .TBL ,XDATA .DATA>)>
+ <RTRUE>>
+
+<ROUTINE JUMPING-OFF? ()
+ <COND (<VERB? LEAP>
+ <RTRUE>)
+ (<AND <VERB? DIVE>
+ <EQUAL? ,P-PRSA-WORD ,V?DIVE>>
+ <RTRUE>)
+ (<AND <VERB? CLIMB-DOWN>
+ <OR <EQUAL? ,P-PRSA-WORD ,W?JUMP ,W?LEAP ,W?HURDLE>
+ <EQUAL? ,P-PRSA-WORD ,W?VAULT ,W?BOUND>>>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE DONT-HAVE-WAND? (OBJ W)
+ <COND (<NOT <IN? .W ,PLAYER>>
+ <MUST-HOLD .W>
+ <TELL " to direct its power." CR>
+ <RTRUE>)
+ (<EQUAL? .OBJ .W>
+ <TELL ,CANT B ,P-PRSA-WORD C ,SP THE .W " at itself." CR>
+ <RTRUE>)
+ (<NO-MAGIC-HERE? .W>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE MUST-HOLD (OBJ)
+ <TELL "You must be holding " THE .OBJ>
+ <RTRUE>>
+
+<ROUTINE CANT-REACH-WHILE-IN? (OBJ1 OBJ2 "AUX" X)
+ <COND (<EQUAL? .OBJ1 <> .OBJ2>
+ <RFALSE>)
+ (<GLOBAL-IN? ,HERE .OBJ1>
+ <RFALSE>)
+ (<AND <IN? .OBJ1 ,HERE>
+ <OR <SET X <TOUCHING?>>
+ <AND <VERB? THRUST>
+ <EQUAL? .OBJ1 ,PRSO ,LAST-MONSTER>>>>
+ <CANT-REACH .OBJ1>
+ <TELL " while you're ">
+ <COND (<EQUAL? .OBJ2 ,ARCH>
+ <TELL B ,W?UNDER>)
+ (<EQUAL? .OBJ2 ,DACT>
+ <TELL B ,W?ON>)
+ (<EQUAL? .OBJ2 ,BUSH>
+ <TELL B ,W?BEHIND>)
+ (T
+ <TELL B ,W?IN>)>
+ <TELL C ,SP THE .OBJ2 ,PERIOD>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE CANT-REACH (OBJ)
+ <TELL ,CANT "quite reach " THE .OBJ>
+ <RFALSE>>
+
+<ROUTINE NO-MAGIC-HERE? (OBJ)
+ <COND (<IN? ,PLAYER ,ARCH>)
+ (<NOT <EQUAL? ,ATIME ,PRESENT>>)
+ (<HERE? IN-CABIN IN-FROON IN-GARDEN>)
+ (<GRUE-ROOM?>)
+ (<AND <NOT <EQUAL? .OBJ ,GURDY>>
+ <PLAIN-ROOM?>>)
+ (<AND <HERE? IN-SKY>
+ <EQUAL? ,ABOVE ,OCAVES>>)
+ (<EQUAL? .OBJ ,PALIMP>
+ <RFALSE>)
+ (<NOT <HERE? APLANE IN-SPLENDOR>>
+ <RFALSE>)>
+ <SPUTTERS .OBJ>
+ <INFLUENCE>
+ <RTRUE>>
+
+<ROUTINE SPUTTERS (OBJ)
+ <TELL CTHE .OBJ " sputters ineffectually. ">
+ <RTRUE>>
+
+<ROUTINE INFLUENCE ()
+ <TELL "A nearby influence must be blocking its Magick." CR>
+ <RTRUE>>
+
+<ROUTINE SEE-COLOR? ()
+ <COND (<NOT <PLAIN-ROOM?>>
+ <RTRUE>)
+ (<IS? ,HERE ,SEEN>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE GRUE-ROOM? ("AUX" X)
+ <SET X <GETB ,GRUE-ROOMS 0>>
+ <COND (<SET X <INTBL? ,HERE <REST ,GRUE-ROOMS 1> .X 1>>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE PLAIN-ROOM? ("OPT" (RM ,HERE) "AUX" X)
+ <COND (<EQUAL? .RM ,IN-FARM ,ROSE-ROOM>
+ <RTRUE>)>
+ <SET X <GETB ,PLAIN-ROOMS 0>>
+ <COND (<SET X <INTBL? .RM <REST ,PLAIN-ROOMS 1> .X 1>>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE GROUND-WORD ()
+ <COND (<IS? ,HERE ,INDOORS>
+ <TELL B ,W?FLOOR>
+ <RFALSE>)>
+ <TELL B ,W?GROUND>
+ <RFALSE>>
+
+"*** THE MONSTER MACHINE ***"
+
+<ROUTINE VIEW-MONSTER ("OPT" CONTEXT "AUX" X)
+ <COND (<IS? ,DESCING ,SLEEPING>
+ <TELL CTHE ,DESCING " lies stunned upon the ">
+ <GROUND-WORD>
+ <TELL C ,PER>
+ <RTRUE>)
+ (<IS? ,DESCING ,SURPRISED>
+ <SET X <GETP ,DESCING ,P?EXIT-STR>>
+ <COND (<OR <IS? ,DESCING ,SEEN>
+ <ZERO? .X>>
+ <TELL CTHE ,DESCING " is waiting for you.">
+ <RTRUE>)>
+ <MAKE ,DESCING ,SEEN>
+ <TELL CA ,DESCING ,SIS .X C ,PER>
+ <RTRUE>)>
+ <SET X <RANDOM 100>>
+ <COND (<L? .X 33>
+ <TELL CA ,DESCING " is attacking you">)
+ (<L? .X 67>
+ <TELL "You're being attacked by " A ,DESCING>)
+ (T
+ <TELL "You're under attack by " A ,DESCING>)>
+ <TELL "!">
+ <RTRUE>>
+
+<ROUTINE DARK-MOVES ()
+ <TELL <PICK-NEXT ,DARK-MOVINGS> " in the darkness">
+ <COND (<PROB 50>
+ <TELL " nearby">)>
+ <TELL ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE OUCH (OBJ DAMAGE)
+ <COND (<T? ,STATIC>)
+ (<PROB 25>
+ <TELL ". " <PICK-NEXT ,OUCHES>>)>
+ <TELL "!" CR>
+ <UPDATE-STAT <MSPARK? .OBJ .DAMAGE>>
+ <RTRUE>>
+
+<GLOBAL LAST-MONSTER:OBJECT <>> "Last monster that bothered you."
+<GLOBAL LAST-MONSTER-DIR 0> "Direction he came from."
+
+<VOC "STUNNED" ADJ>
+
+<ROUTINE STILL-SLEEPING? (OBJ)
+ <COND (<IS? .OBJ ,SLEEPING>
+ <SETG LAST-MONSTER-DIR -1>
+ <SETG ATTACK-MODE ,NORMAL-ATTACK>
+ <TELL ,TAB>
+ <COND (<IS? .OBJ ,NEUTRALIZED>
+ <UNMAKE .OBJ ,NEUTRALIZED>
+ <TELL CTHE .OBJ
+" blinks its eyes, yawns and staggers with groggy impotence">)
+ (T
+ <WINDOW ,SHOWING-ROOM>
+ <UNMAKE .OBJ ,SLEEPING>
+ <REPLACE-ADJ? .OBJ ,W?STUNNED ,W?AWAKE>
+ <TELL CTHE .OBJ " shakes itself out of its stupor">)>
+ <TELL ,PERIOD>
+ <TOPPLED? .OBJ>
+ <RTRUE>)>
+ <NEXT-ENDURANCE? .OBJ>
+ <RFALSE>>
+
+<ROUTINE NEXT-ENDURANCE? (OBJ "AUX" X MAX CHANGE)
+ <SET X <GETP .OBJ ,P?ENDURANCE>>
+ <COND (<IS? .OBJ ,STRICKEN>
+ <UNMAKE .OBJ ,STRICKEN>
+ <RETURN .X>)>
+ <SET MAX <GETP .OBJ ,P?EMAX>>
+ <COND (<G? .MAX .X>
+ <SET CHANGE <PERCENT 2 .MAX>>
+ <COND (<L? .CHANGE 1>
+ <SET CHANGE 1>)>
+ <SET X <+ .X .CHANGE>>
+ <COND (<G? .X .MAX>
+ <SET X .MAX>)>
+ <PUTP .OBJ ,P?ENDURANCE .X>)>
+ <RETURN .X>>
+
+<ROUTINE WHIRLS (OBJ)
+ <TELL CTHE .OBJ " whirls to face you!" CR>
+ <TOPPLED? ,SNIPE>
+ <RTRUE>>
+
+<ROUTINE TOPPLED? (OBJ)
+ <COND (<IS? ,DACT ,MUNGED>
+ <RFALSE>)
+ (<AND <IN? ,PLAYER ,SADDLE>
+ <IN? ,SADDLE ,DACT>>
+ <SETG P-WALK-DIR <>>
+ <SETG OLD-HERE <>>
+ <MOVE ,PLAYER <LOC ,DACT>>
+ <EXIT-DACT .OBJ "play horsey" "sprawling across the dust">
+ <RTRUE>)
+ (<VISIBLE? ,DACT>
+ <EXIT-DACT .OBJ "stick around" "abandoned and alone">
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE EXIT-DACT (OBJ STR1 STR2)
+ <UNMAKE ,DACT ,NODESC>
+ <WINDOW ,SHOWING-ROOM>
+ <REMOVE ,DACT>
+ <TELL ,TAB CTHE ,DACT>
+ <COND (<IS? ,DACT ,SLEEPING>
+ <UNMAKE ,DACT ,SLEEPING>
+ <TELL " shakes himself awake,">)>
+ <TELL " takes one good look at " THE .OBJ
+" and decides that he doesn't want to " .STR1
+" anymore. Before you can think or move, you find yourself " .STR2
+", with a cowardly shadow soaring out of sight overhead." CR>
+ <RTRUE>>
+
+<ROUTINE SEE-MONSTER (OBJ)
+ <SETG LAST-MONSTER .OBJ>
+ <UNMAKE .OBJ ,SURPRISED>
+ <RFALSE>>
+
+<ROUTINE MONSTER-STRIKES? (OBJ "AUX" (DAMAGE 0) STR CHANCE X)
+ <SEE-MONSTER .OBJ>
+ <SET STR <GETP .OBJ ,P?STRENGTH>>
+ <COND (<L? .STR 1>
+ <RFALSE>)>
+ <MAKE .OBJ ,STRICKEN>
+ <SET CHANCE %</ ,MIN-HIT-PROB 4>>
+ <COND (<NOT <EQUAL? ,ATTACK-MODE ,PARRYING>>
+ <SET CHANCE <GETP .OBJ ,P?DEXTERITY>>
+ <COND (<EQUAL? ,ATTACK-MODE ,NORMAL-ATTACK>
+ <SET CHANCE </ .CHANCE 2>>)>
+ <SET CHANCE
+ <PERCENT .CHANCE %<- ,MAX-HIT-PROB ,MIN-HIT-PROB>>>
+ <SET CHANCE <+ .CHANCE ,MIN-HIT-PROB>>
+ <COND (<G? .CHANCE ,MAX-HIT-PROB>
+ <SET CHANCE ,MAX-HIT-PROB>)>)>
+ <SETG ATTACK-MODE ,NORMAL-ATTACK>
+ <COND (<PROB .CHANCE>
+ <SET DAMAGE <- ,STATMAX <GET ,STATS ,ARMOR-CLASS>>>
+ <SET DAMAGE </ <+ <* .DAMAGE .STR> 99> 100>>
+ <COND (<L? .DAMAGE 2>
+ <SET DAMAGE 1>)
+ (T
+ <SET DAMAGE <RANDOM .DAMAGE>>)>
+ <COND (<T? ,AUTO>
+ <BMODE-ON>)>
+ <RETURN <- 0 .DAMAGE>>)
+ (T
+ <RFALSE>)>>
+
+"Returns ,W? of monster appearance, else false."
+
+<ROUTINE MOVE-MONSTER? (OBJ "OPT" (UD 0)
+ "AUX" L RLIST RLEN CNT DIR TBL DEST X BRIGHT FEAR)
+ <COND (<IS? .OBJ ,SLEEPING>
+ <UNMAKE .OBJ ,SLEEPING>
+ <UNMAKE .OBJ ,STRICKEN>
+ <UNMAKE .OBJ ,NEUTRALIZED>
+ <RFALSE>)>
+ <MAKE .OBJ ,SURPRISED>
+ <NEXT-ENDURANCE? .OBJ>
+ <SET L <LOC .OBJ>>
+ <SET FEAR <LOC ,SCARE3>>
+ <SET RLIST <GETP .OBJ ,P?HABITAT>>
+ ; <COND (<ZERO? .RLIST>
+ <SAY-ERROR "MOVE-MONSTER? <1>">
+ <RFALSE>)>
+ <SET RLEN <GETB .RLIST 0>>
+ <SET RLIST <REST .RLIST 1>>
+ <SET CNT 1>
+ <SET DIR ,P?NORTH>
+ <REPEAT ()
+ <SET TBL <GETP .L .DIR>>
+ <COND (<ZERO? .TBL>)
+ (<EQUAL? <MSB <GET .TBL ,XTYPE>> ,CONNECT ,SCONNECT ,X-EXIT>
+ <SET DEST <GET .TBL ,XROOM>>
+ <COND (<AND <SET X <INTBL? .DEST .RLIST .RLEN 1>>
+ <OR <NOT <EQUAL? .OBJ ,GRUE>>
+ <NOT <IS-LIT? .DEST>>>>
+ <COND (<T? ,LAST-MONSTER>)
+ (<WEARING-MAGIC? ,CLOAK>)
+ (<AND <EQUAL? .DEST ,HERE>
+ <NOT <EQUAL? .DEST .FEAR>>>
+ <SET CNT 2>
+ <PUT ,GOOD-DIRS 2 .DIR>
+ <RETURN>)>
+ <COND (<NOT <EQUAL? .DEST .FEAR>>
+ <INC CNT>
+ <PUT ,GOOD-DIRS .CNT .DIR>)>)>)>
+ <COND (<DLESS? DIR ,P?NW>
+ <RETURN>)>>
+
+ <COND (<T? .UD>
+ <SET DIR ,P?UP>
+ <REPEAT ()
+ <SET TBL <GETP .L .DIR>>
+ <COND (<ZERO? .TBL>)
+ (<EQUAL? <MSB <GET .TBL ,XTYPE>> ,CONNECT ,SCONNECT>
+ <SET DEST <GET .TBL ,XROOM>>
+ <COND (<SET X <INTBL? .DEST .RLIST .RLEN 1>>
+ <COND (<T? ,LAST-MONSTER>)
+ (<WEARING-MAGIC? ,CLOAK>)
+ (<EQUAL? .DEST ,HERE>
+ <SET CNT 2>
+ <PUT ,GOOD-DIRS 2 .DIR>
+ <RETURN>)>
+ <INC CNT>
+ <PUT ,GOOD-DIRS .CNT .DIR>)>)>
+ <COND (<EQUAL? .DIR ,P?DOWN>
+ <RETURN>)>
+ <SET DIR ,P?DOWN>>)>
+
+ <COND (<EQUAL? .CNT 1> ; "Can't move!"
+ <RFALSE>)
+ (<EQUAL? .CNT 2> ; "Only one way out."
+ <SET DIR <GET ,GOOD-DIRS 2>>
+ <SET DEST <GET <GETP .L .DIR> ,XROOM>>)
+ (T
+ <SET X <GETP .OBJ ,P?LAST-LOC>>
+ <PUT ,GOOD-DIRS 0 .CNT>
+ <PUT ,GOOD-DIRS 1 0>
+ <PROG ()
+ <SET DIR <PICK-ONE ,GOOD-DIRS>>
+ <SET DEST <GET <GETP .L .DIR> ,XROOM>>
+ <COND (<EQUAL? .DEST .X>
+ <AGAIN>)>>)>
+
+ ; <COND (<NOT <IN? .DEST ,ROOMS>>
+ <SAY-ERROR "MOVE-MONSTER? <2>">
+ <RFALSE>)>
+
+ <COND (<ZERO? ,LAST-MONSTER>)
+ (<EQUAL? .DEST ,HERE>
+ <RFALSE>)>
+ <MOVE .OBJ .DEST>
+ <PUTP .OBJ ,P?LAST-LOC .DEST>
+ <COND (<NOT <EQUAL? .DEST ,HERE>>
+ <RFALSE>)
+ (<T? ,LIT?>
+ <WINDOW ,SHOWING-ROOM>)>
+ <COND (<NOT <EQUAL? .DIR ,P?UP ,P?DOWN>>
+ <SET DIR <+ .DIR 4>>
+ <COND (<G? .DIR ,P?NORTH>
+ <SET DIR <- .DIR 8>>)>
+ <SETG LAST-MONSTER-DIR .DIR>)>
+ <THIS-IS-IT .OBJ>
+ <SETG LAST-MONSTER .OBJ>
+ <UNMAKE .OBJ ,SURPRISED>
+ <COND (<EQUAL? .DIR ,P?UP>
+ <SETG LAST-MONSTER-DIR ,P?DOWN>
+ <RETURN ,W?UP>)
+ (<EQUAL? .DIR ,P?DOWN>
+ <SETG LAST-MONSTER-DIR ,P?UP>
+ <RETURN ,W?DOWN>)>
+ <RETURN <GET ,DIR-NAMES <- 0 <- .DIR ,P?NORTH>>>>>
+
+"Activates monster NXT."
+
+<ROUTINE NEXT-MONSTER (OBJ "AUX" RLIST LEN CNT X RM)
+ <COND (<ZERO? .OBJ>
+ <RFALSE>)>
+ <SET RLIST <GETP .OBJ ,P?HABITAT>>
+ ; <COND (<ZERO? .RLIST>
+ <SAY-ERROR "NEXT-MONSTER">
+ <RFALSE>)>
+ <SET LEN <GETB .RLIST 0>>
+ <SET X .LEN>
+ <SET CNT 1>
+ <REPEAT ()
+ <SET RM <GETB .RLIST .X>>
+ <COND (<EQUAL? .RM ,HERE>)
+ (<AND <EQUAL? .OBJ ,GRUE>
+ <IS? .RM ,LIGHTED>>)
+ (<NOT <IS? .RM ,TOUCHED>>
+ <INC CNT>
+ <PUT ,AUX-TABLE .CNT .RM>)>
+ <COND (<DLESS? X 1>
+ <RETURN>)>>
+ <COND (<EQUAL? .CNT 1>
+ <PROG ()
+ <SET RM <GETB .RLIST <RANDOM .LEN>>>
+ <COND (<EQUAL? .RM ,HERE>
+ <AGAIN>)
+ (<AND <EQUAL? .OBJ ,GRUE>
+ <IS? .RM ,LIGHTED>>
+ <AGAIN>)>>)
+ (<EQUAL? .CNT 2>
+ <SET RM <GET ,AUX-TABLE 2>>)
+ (T
+ <PUT ,AUX-TABLE 0 .CNT>
+ <PUT ,AUX-TABLE 1 0>
+ <SET RM <PICK-ONE ,AUX-TABLE>>)>
+ <MOVE .OBJ .RM>
+ <MAKE .OBJ ,SURPRISED>
+ <PUTP .OBJ ,P?LAST-LOC .RM>
+ <QUEUE <GETP .OBJ ,P?LIFE>>
+ <RFALSE>>
+
+<ROUTINE V-SHIT ()
+ <PERFORM ,V?HIT ,PRSI ,PRSO>
+ <RTRUE>>
+
+<ROUTINE PRE-HIT ("AUX" OBJ X)
+ <COND (<DARKFIGHT?>
+ <RTRUE>)
+ (<T? ,PRSI>
+ <RFALSE>)>
+ <SETG PRSI ,HANDS>
+ <COND (<SET OBJ <FIRST? ,WINNER>>
+ <REPEAT ()
+ <COND (<IS? .OBJ ,WIELDED>
+ <SETG PRSI .OBJ>
+ <RETURN>)
+ (<IS? .OBJ ,WEAPON>
+ <SETG PRSI .OBJ>)>
+ <COND (<NOT <SET OBJ <NEXT? .OBJ>>>
+ <RETURN>)>>)>
+ <COND (<NOT <PRSI? HANDS>>
+ <TELL "[with " THEI ,BRACKET>)>
+ <RFALSE>>
+
+<GLOBAL ATTACK-MODE:NUMBER 0>
+
+<ROUTINE V-PUNCH ()
+ <PERFORM ,V?HIT ,PRSO ,HANDS>
+ <RTRUE>>
+
+<ROUTINE V-HIT ("AUX" (MODE ,NORMAL-ATTACK))
+ <COND (<EQUAL? ,P-PRSA-WORD ,W?THRUST>
+ <SET MODE ,THRUSTING>)>
+ <HIT-MONSTER .MODE>
+ <RTRUE>>
+
+<ROUTINE V-THRUST ()
+ <COND (<PRACTICE? ,W?THRUST>
+ <RTRUE>)>
+ <HIT-MONSTER ,THRUSTING>
+ <RTRUE>>
+
+<ROUTINE DARKFIGHT? ()
+ <COND (<ZERO? ,LIT?>
+ <COND (<AND <PRSO? GRUE URGRUE>
+ <WEARING-MAGIC? ,HELM>>
+ <RFALSE>)>
+ <TOO-DARK>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE PRACTICE? (WRD)
+ <COND (<ZERO? ,PRSO>
+ <COND (<ZERO? ,LAST-MONSTER>
+ <TELL "You practice " B .WRD "ing ">
+ <COND (<ZERO? ,LIT?>
+ <TELL "in the dark ">)>
+ <TELL "for a few moments." CR>
+ <RTRUE>)>
+ <SETG PRSO ,LAST-MONSTER>)>
+ <RETURN <DARKFIGHT?>>>
+
+<ROUTINE V-PARRY ()
+ <COND (<PRACTICE? ,W?PARRY>
+ <RTRUE>)>
+ <COND (<OR <NOT <IS? ,PRSO ,LIVING>>
+ <NOT <IS? ,PRSO ,MONSTER>>
+ <IS? ,PRSO ,SLEEPING>>
+ <TELL CTHEO " isn't attacking you" ,AT-MOMENT>
+ <RTRUE>)>
+ <SETG ATTACK-MODE ,PARRYING>
+ <SETG LAST-MONSTER-DIR <>>
+ <COND (<AND <IN? ,PLAYER ,MAW>
+ <NOT <IN? ,PRSO ,MAW>>>
+ <TELL CTHEO " can't seem to reach you." CR>
+ <RTRUE>)>
+ <TELL "You leap away from " THEO "'s attack." CR>
+ <RTRUE>>
+
+"Returns <> if battle should end, T otherwise."
+
+<GLOBAL ATTACK-MODE:NUMBER ,NORMAL-ATTACK>
+
+<ROUTINE HARMLESS ("OPT" (OBJ ,PRSO))
+ <TELL CTHE .OBJ " obviously means you no harm; ">
+ <COND (<L? <GET ,STATS ,COMPASSION> 15>
+ <TELL "even your meager compassion is enough to stay ">)
+ (T
+ <TELL "compassion stays ">)>
+ <TELL 'HANDS ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE HIT-MONSTER ("OPT" (MODE ,NORMAL-ATTACK)
+ "AUX" STR DAM L MEND PCENT MIN X)
+ <COND (<DARKFIGHT?>
+ <RTRUE>)
+ (<NOT <IS? ,PRSO ,LIVING>>
+ <TELL "Attacking " THEO>
+ <COND (<NOT <EQUAL? ,PRSI <> ,HANDS>>
+ <TELL ,WITH A ,PRSI>)>
+ <WONT-HELP>
+ <RTRUE>)
+ (<NOT <IS? ,PRSO ,MONSTER>>
+ <HARMLESS>
+ <RTRUE>)>
+
+ <SETG ATTACK-MODE .MODE>
+ <COND (<AND <ZERO? ,PRSI>
+ <PRE-HIT>>
+ <RTRUE>)>
+ <SET L <LOC ,PLAYER>>
+ <COND (<NOT <IN? ,PRSO .L>>
+ <TELL ,CANT "quite reach " THEO ,AT-MOMENT>
+ <RTRUE>)
+ (<PRSO? CORBIES>
+ <CORBIES-STAY-AWAY>
+ <RTRUE>)
+ (<PRSO? URGRUE>
+ <HOPELESS>
+ <RTRUE>)
+ (<PRSO? DUST>
+ <HIT-BUNNIES>
+ <RTRUE>)
+ (<PRSO? SHAPE>
+ <TOUCH-SHAPE-WITH ,PRSI>
+ <RTRUE>)
+ (<AND <PRSI? PHASE>
+ <NOT <HERE? APLANE>>>
+ <PHASE-WHOOSH>
+ <RTRUE>)
+ (<PRSO? ASUCKER BSUCKER CSUCKER>
+ <TOUCH-SUCKER-WITH ,PRSO ,PRSI>
+ <RTRUE>)
+ (<PRSO? DEAD>
+ <TOUCH-DEAD-WITH ,PRSI>
+ <RTRUE>)>
+ <SET L <GET ,STATS ,LUCK>>
+ <SET STR <GET ,STATS ,STRENGTH>>
+
+ <SETG NO-REFRESH ,ENDURANCE>
+
+ <SET PCENT ,MAX-HIT-PROB>
+ <COND (<NOT <IS? ,PRSO ,SLEEPING>>
+ <SET PCENT <GET ,STATS ,DEXTERITY>>
+ <COND (<L? .PCENT ,MAX-HIT-PROB>
+ <COND (<L? .PCENT ,MIN-HIT-PROB>
+ <SET PCENT ,MIN-HIT-PROB>)>
+ <SET X <PERCENT .L <- ,MAX-HIT-PROB .PCENT>>>
+ <COND (<NOT <L? .X 1>>
+ <SET PCENT <+ .PCENT .X>>)>)>)>
+
+ <COND (<EQUAL? .MODE ,THRUSTING>
+ <SET PCENT ,MAX-HIT-PROB>)
+ (<G? .PCENT ,MAX-HIT-PROB>
+ <SET PCENT ,MAX-HIT-PROB>)
+ (<L? .PCENT ,MIN-HIT-PROB>
+ <SET PCENT ,MIN-HIT-PROB>)>
+
+ <COND (<PROB .PCENT>
+ <COND (<SPARK-TO? ,PRSI ,PRSO>
+ <TELL ,TAB>)>
+ <SET MEND <GETP ,PRSO ,P?ENDURANCE>>
+ <COND (<L? .MEND 1> ; "Static killed it!"
+ <RFALSE>)>
+
+ <COND (<G? .STR 1>
+ <SET DAM <RANDOM .STR>>)>
+ <SET X <PERCENT <GET ,STATS ,LUCK> .DAM>>
+ <COND (<L? .X 1>
+ <SET X 1>)>
+ <SET DAM <+ .DAM .X>>
+ <COND (<G? .DAM .STR>
+ <SET DAM .STR>)>
+
+ <SET MIN </ .DAM 5>>
+ <SET DAM </ <+ <* <GETP ,PRSI ,P?EFFECT> .DAM> 99> 100>>
+ <COND (<L? .DAM .MIN>
+ <SET DAM .MIN>)
+ (<NOT <IS? ,PRSI ,WIELDED>>
+ <SET DAM </ .DAM 2>>
+ <COND (<L? .DAM .MIN>
+ <SET DAM .MIN>)>)>
+
+ ; "No important damage."
+
+ <MAKE ,PRSO ,STRICKEN>
+ <COND (<L? .DAM .MEND> ; "Non-fatal damage inflicted."
+ <SET PCENT <RATIO .DAM .MEND>>
+ <SET MEND <- .MEND .DAM>>
+ <PUTP ,PRSO ,P?ENDURANCE .MEND>
+ <YOUR-OBJ ,PRSI>
+ <TELL C ,SP>
+ <COND (<ZERO? ,LIT?>
+ <TELL "strikes a blow." CR>
+ <RTRUE>)>
+ <HOW-BAD .PCENT>
+ <TELL "ly wounds " THEO>
+ <COND (<L? .PCENT 20>
+ <TOO-BAD>)>
+ <PRINT ,PERIOD>
+ <RTRUE>)>
+
+ ; "Got the sucker!"
+
+ <PUTP ,PRSO ,P?ENDURANCE 0>
+ <PUTP ,PRSO ,P?STRENGTH 0>
+ <TELL "You deal ">
+ <COND (<T? ,LIT?>
+ <TELL THEO C ,SP>)>
+ <TELL "a decisive blow">
+ <COND (<NOT <EQUAL? ,PRSI <> ,HANDS>>
+ <TELL ,WITH THEI>)>
+ <TELL "!" CR>
+ <RTRUE>)>
+
+ ; "Missed!"
+
+ <TELL ,CYOU>
+ <COND (<EQUAL? ,PRSI ,FEET>
+ <TELL B ,W?KICK>)
+ (<OR <EQUAL? ,PRSI ,HANDS>
+ <PROB 50>>
+ <TELL B ,W?SWING>)
+ (T
+ <TELL B ,W?STRIKE>)>
+ <COND (<ZERO? ,LIT?>
+ <TELL " at the darkness, with no effect." CR>
+ <RTRUE>)>
+ <TELL " at " THEO>
+ <COND (<NOT <EQUAL? ,PRSI <> ,HANDS ,FEET>>
+ <TELL ,WITH THEI>)>
+ <TELL ", " <PICK-NEXT ,MISSES>>
+ <TOO-BAD>
+ <PRINT ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE TOO-BAD ()
+ <COND (<PRSI? HANDS FEET>
+ <RFALSE>)
+ (<AND <IS? ,PRSI ,WEAPON>
+ <NOT <IS? ,PRSI ,WIELDED>>>
+ <TELL ". Too bad you're not wielding " THEI>)>
+ <RFALSE>>
+
+<ROUTINE MONSTER-THROW ()
+ <MOVE ,PRSO <LOC ,PRSI>>
+ <WINDOW ,SHOWING-ALL>
+ <YOUR-OBJ ,PRSO>
+ <TELL " just misses " THEI ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE KILL-MONSTER (OBJ "AUX" X)
+ <EXUENT-MONSTER .OBJ>
+ <UNMAKE .OBJ ,LIVING>
+ <PUTP .OBJ ,P?STRENGTH 0>
+ <PUTP .OBJ ,P?DEXTERITY 0>
+ <PUTP .OBJ ,P?ENDURANCE 0>
+ <SET X <GETP .OBJ ,P?LIFE>>
+ <COND (<T? .X>
+ <DEQUEUE .X>
+ <PUTP .OBJ ,P?LIFE 0>)>
+ <SET X <GETP .OBJ ,P?VALUE>>
+ <COND (<T? .X>
+ <PUTP .OBJ ,P?VALUE 0>
+ <UPDATE-STAT .X ,EXPERIENCE>)>
+ <RFALSE>>
+
+<ROUTINE EXUENT-MONSTER (OBJ)
+ <VANISH .OBJ>
+ <MAKE .OBJ ,SURPRISED>
+ <UNMAKE .OBJ ,STRICKEN>
+ <SETG ATTACK-MODE ,NORMAL-ATTACK>
+ <SETG QCONTEXT ,NOT-HERE-OBJECT>
+ <SETG QCONTEXT-ROOM <>>
+ <SETG LAST-MONSTER <FIND-IN? ,HERE ,MONSTER>>
+ <SETG LAST-MONSTER-DIR <>>
+ <RFALSE>>
+
+<ROUTINE DIAGNOSE-MONSTER ("OPT" (OBJ ,PRSO) "AUX" MAX MEND)
+ <SET MAX <GETP .OBJ ,P?EMAX>>
+ <SET MEND <GETP .OBJ ,P?ENDURANCE>>
+ <COND (<IS? .OBJ ,FEMALE>
+ <TELL "She">)
+ (T
+ <TELL "He">)>
+ <TELL " appears to be ">
+ <COND (<IS? .OBJ ,SLEEPING>
+ <TELL B ,W?STUNNED ", ">
+ <COND (<EQUAL? .MEND .MAX>
+ <TELL B ,W?BUT>)
+ (T
+ <TELL B ,W?AND>)>
+ <TELL ", ">)>
+ <COND (<EQUAL? .MAX .MEND>
+ <TELL "in excellent condition">
+ <COND (<AND <EQUAL? .OBJ ,DORN>
+ <IS? .OBJ ,MUNGED>>
+ <TELL " otherwise">)>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <HOW-BAD <RATIO .MEND .MAX>>
+ <TELL "ly wounded." CR>
+ <RTRUE>>
+
+<ROUTINE HOW-BAD (PCENT)
+ <COND (<L? .PCENT 20>
+ <TELL "dangerous">
+ <RTRUE>)
+ (<L? .PCENT 40>
+ <TELL "grave">
+ <RTRUE>)
+ (<L? .PCENT 60>
+ <TELL "serious">
+ <RTRUE>)
+ (<L? .PCENT 80>
+ <TELL "noticeab">
+ <RTRUE>)
+ (T
+ <TELL "slight">
+ <RTRUE>)>>
+
+<ROUTINE WATER? ("OPT" (OBJ ,PRSI))
+ <COND (<OR <EQUAL? .OBJ ,GREAT-SEA ,COVE ,BROOK>
+ <EQUAL? .OBJ ,WATERFALL ,RIVER>>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE MAGICWORD? ("OPT" (WRD <>) "AUX" LEN OBJ X)
+ <COND (<AND <T? ,TELEWORD>
+ <EQUAL? ,TELEWORD ,P-PRSA-WORD .WRD>>
+ <SAY-TELEWORD>
+ <RTRUE>)
+ (<AND <EQUAL? ,W?LIGHTNING ,P-PRSA-WORD .WRD>
+ <EQUAL? ,HERE <LOC ,RIDDLE>>>
+ <OPEN-CLIFF>
+ <RTRUE>)
+ (<AND <EQUAL? ,W?YOUTH ,P-PRSA-WORD .WRD>
+ <EQUAL? ,HERE <LOC ,BOULDER>>
+ <ZERO? <LOC ,POOL>>>
+ <OPEN-POOL>
+ <RTRUE>)
+ (<AND <T? ,AMULET-WORD>
+ <EQUAL? ,AMULET-WORD ,P-PRSA-WORD .WRD>>
+ <SAY-AMULET-WORD>
+ <RTRUE>)
+ (<AND <T? ,WALL-WORD>
+ <EQUAL? ,WALL-WORD ,P-PRSA-WORD .WRD>>
+ <SAY-WALL-WORD>
+ <RTRUE>)
+ (<AND <T? ,GOBLET-WORD>
+ <EQUAL? ,GOBLET-WORD ,P-PRSA-WORD .WRD>
+ <SAY-GOBLET-WORD?>>
+ <RTRUE>)>
+ <SET LEN <GET ,ALL-SCROLLS 0>>
+ <REPEAT ()
+ <SET OBJ <GET ,ALL-SCROLLS .LEN>>
+ <COND (<OR <EQUAL? .OBJ ,PRSO>
+ <VISIBLE? .OBJ>>
+ <SET X <GET <GETPT .OBJ ,P?SYNONYM> 1>>
+ <COND (<EQUAL? .X ,W?ZZZP>)
+ (<EQUAL? .X .WRD ,P-PRSA-WORD>
+ <SET X <APPLY <GETP .OBJ ,P?EFFECT> .OBJ>>
+ <RTRUE>)>)>
+ <COND (<DLESS? LEN 1>
+ <RFALSE>)>>>
+
+<ROUTINE DESCRIBE-MONSTERS (OBJ)
+ <COND (<NOT <IS? .OBJ ,LIVING>>
+ <TELL "dead ">)
+ (<IS? .OBJ ,SLEEPING>
+ <TELL "stunned ">)>
+ <PRINTD .OBJ>
+ <RTRUE>>
+
+<ROUTINE LAST-ROOM-IN? (TBL "OPT" (LAST 1) "AUX" LEN RM)
+ <COND (<IS? ,HERE ,TOUCHED>
+ <RFALSE>)>
+ <SET LEN <GETB .TBL 0>>
+ <REPEAT ()
+ <SET RM <GETB .TBL .LEN>>
+ <COND (<EQUAL? ,HERE .RM>)
+ (<NOT <IS? .RM ,TOUCHED>>
+ <RFALSE>)>
+ <COND (<DLESS? LEN .LAST>
+ <RTRUE>)>>>
+
+<GLOBAL WINDIR:NUMBER 0>
+
+<ROUTINE I-BREEZE ()
+ <COND (<IS? ,BREEZE ,SEEN>
+ <UNMAKE ,BREEZE ,SEEN>
+ <RFALSE>)
+ (<PROB 7>
+ <RETURN <NEW-WINDIR? <NEXT-WINDIR?>>>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE NEXT-WINDIR? ("AUX" X)
+ <PROG ()
+ <SET X <RANDOM 8>>
+ <DEC X>
+ <COND (<EQUAL? .X ,WINDIR>
+ <AGAIN>)
+ (<NOT <HERE? IN-SKY>>)
+ (<AND <EQUAL? ,ABOVE ,OXROADS>
+ <EQUAL? .X ,I-NE ,I-NORTH ,I-EAST>>
+ <AGAIN>)
+ (<AND <EQUAL? ,ABOVE ,OTHRIFF>
+ <EQUAL? .X ,I-SE ,I-SOUTH ,I-EAST>>
+ <AGAIN>)>>
+ <RETURN .X>>
+
+<ROUTINE NEW-WINDIR? ("OPT" X)
+ <COND (<ASSIGNED? X>
+ <SETG WINDIR .X>)>
+ <MAKE ,BREEZE ,SEEN>
+ <COND (<IS? ,HERE ,INDOORS>
+ <RFALSE>)
+ (<HERE? APLANE IN-SPLENDOR IN-FROON IN-GARDEN>
+ <RFALSE>)
+ (<PLAIN-ROOM?>
+ <RFALSE>)
+ (<SET X <INTBL? ,HERE ,ARCH-ROOMS ,MAX-ATIME 1>>
+ <RFALSE>)>
+ <TELL ,TAB <PICK-NEXT ,WIND-ALERTS> ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE FIND-IN? (OBJ BIT)
+ <COND (<SET OBJ <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<IS? .OBJ .BIT>
+ <RETURN>)
+ (<NOT <SET OBJ <NEXT? .OBJ>>>
+ <RETURN>)>>)>
+ <RETURN .OBJ>>
+
+<ROUTINE ON-IN ("OPT" (OBJ ,PRSO))
+ <PRINTC ,SP>
+ <COND (<EQUAL? .OBJ ,BUSH>
+ <TELL B ,W?BEHIND>)
+ (<EQUAL? .OBJ ,ARCH>
+ <TELL B ,W?UNDER>)
+ (<OR <IS? .OBJ ,CONTAINER>
+ <IS? .OBJ ,PLACE>>
+ <TELL B ,W?IN>)
+ (T
+ <TELL B ,W?ON>)>
+ <TELL C ,SP THE .OBJ>
+ <RTRUE>>
+
+<ROUTINE SHOP-DOOR (OBJ)
+ <TELL "glass " 'BCASE " near the ">
+ <COND (<IS? .OBJ ,OPENED>
+ <TELL "open ">)>
+ <PRINTD .OBJ>
+ <RFALSE>>
+
+<ROUTINE LOOK-ON-CASE (OBJ)
+ <COND (<SEE-ANYTHING-IN? .OBJ>
+ <TELL ". On the case you see ">
+ <CONTENTS .OBJ>)>
+ <TELL
+". Another exit is partly concealed by " A ,CURTAIN ,PERIOD>
+ <RFALSE>>
+
+<ROUTINE DESCRIBE-CAVES (OBJ)
+ <TELL "Underground">
+ <RTRUE>>
+
+<ROUTINE IGNORANT (WHO OBJ)
+ <TELL CTHE .WHO " shrugs. \"Don't know nothin' special about ">
+ <PRONOUN .OBJ>
+ <TELL ,PERQ>
+ <RTRUE>>
+
+<ROUTINE PRONOUN (OBJ "OPT" IT)
+ <COND (<IS? .OBJ ,PLURAL>
+ <TELL B ,W?THEM>
+ <RTRUE>)
+ (<IS? .OBJ ,FEMALE>
+ <TELL B ,W?HER>
+ <RTRUE>)
+ (<IS? .OBJ ,PERSON>
+ <TELL B ,W?HIM>
+ <RTRUE>)
+ (<ASSIGNED? IT>
+ <TELL B ,W?IT>
+ <RTRUE>)
+ (T
+ <TELL B ,W?THAT>
+ <RTRUE>)>>
+
+<ROUTINE DESCRIBE-WEAPONS (CONTEXT)
+ <TELL CA ,DESCING>
+ <PRINT " lies at your feet.">
+ <RTRUE>>
+
+<ROUTINE SAY-YOUR (OBJ)
+ <COND (<NOT <IS? .OBJ ,NOARTICLE>>
+ <TELL "your ">)>
+ <TELL D .OBJ>
+ <RFALSE>>
+
+<ROUTINE YOUR-OBJ ("OPT" (OBJ ,PRSI))
+ <COND (<OR <EQUAL? .OBJ ,FEET>
+ <VERB? KICK>>
+ <TELL "Your foot">
+ <RFALSE>)
+ (<EQUAL? .OBJ <> ,HANDS ,ME>
+ <TELL "Your fist">
+ <RFALSE>)>
+ <COND (<NOT <IS? .OBJ ,NOARTICLE>>
+ <TELL ,CYOUR>)>
+ <TELL D .OBJ>
+ <RFALSE>>
+
+<ROUTINE CARRIAGE-RETURNS ("AUX" NUM)
+ <SET NUM ,HEIGHT>
+ <COND (<T? ,DMODE>
+ <SET NUM <- .NUM 12>>)>
+ <REPEAT ()
+ <CRLF>
+ <COND (<DLESS? NUM 1>
+ <RFALSE>)>>>
+
+<ROUTINE PEERING-BEHIND ()
+ <TELL "Peering behind " THEO ,LYOU-SEE>
+ <CONTENTS>
+ <TELL ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE FROBOZZ (STR)
+ <TELL "Frobozz Magic " .STR " Company">
+ <RTRUE>>
+
+<ROUTINE DO-INPUT ("AUX" CHR)
+ <COND (<EQUAL? <SET CHR <INPUT 1>> ,MAC-UP-ARROW ,MAC-DOWN-ARROW>
+ <COND (<EQUAL? .CHR ,MAC-UP-ARROW> ,UP-ARROW)
+ (T ,DOWN-ARROW)>)
+ (T .CHR)>> \ No newline at end of file
diff --git a/monsters.zil b/monsters.zil
new file mode 100644
index 0000000..2460230
--- /dev/null
+++ b/monsters.zil
@@ -0,0 +1,1558 @@
+"MONSTERS for BEYOND ZORK:
+ Copyright (C)1987 Infocom, Inc. All Rights Reserved."
+
+"*** DISCIPLINE CRAB ***"
+
+<OBJECT CRAB
+ (LOC THRONE-ROOM)
+ (LAST-LOC THRONE-ROOM)
+ (DESC "discipline crab")
+ (FLAGS TRYTAKE LIVING SURFACE SURPRISED)
+ (SDESC DESCRIBE-MONSTERS)
+ (SYNONYM CRAB MONSTER SOMETHING THING)
+ (ADJECTIVE KING DISCIPLINE AWAKE)
+ (LIFE I-CRAB)
+ (ENDURANCE 7)
+ (EMAX 7)
+ (STRENGTH 7)
+ (DEXTERITY 60)
+ (VALUE 5)
+ (HABITAT CELLAR-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (CONTFCN CRAB-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "skulking in the corner")
+ (ACTION CRAB-F)>
+
+<ROUTINE CRAB-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <COND (<EQUAL? .CONTEXT ,M-CONT>
+ <COND (<SET X <TOUCHING?>>
+ <TELL CTHE ,CRAB
+ " snaps at your fingers. Yow!" CR>
+ <RTRUE>)>)>
+ <RFALSE>)
+ (<AND <NOT <VERB? HIT MUNG>>
+ <SET X <TOUCHING?>>>
+ <SHY-CRAB>
+ <RTRUE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)
+ (<VERB? PUT-ON EMPTY-INTO>
+ <PRSO-SLIDES-OFF-PRSI>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE LOOK-ON>
+ <TELL CTHEO
+" adjusts the crown on its head, and glares at you defiantly. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)
+ (<VERB? WHAT WHO>
+ <REFER-TO-PACKAGE>
+ <RFATAL>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE SHY-CRAB ()
+ <TELL CTHE ,CRAB " sidesteps out of your reach." CR>
+ <RTRUE>>
+
+"*** RATS ***"
+
+<OBJECT RAT
+ (LOC WC1)
+ (LAST-LOC WC1)
+ (DESC "rat-ant")
+ (FLAGS MONSTER LIVING SURPRISED)
+ (SDESC DESCRIBE-MONSTERS)
+ (SYNONYM RAT\-ANT RAT ANT MONSTER SOMETHING THING)
+ (ADJECTIVE RAT AWAKE)
+ (LIFE I-RAT)
+ (ENDURANCE 6)
+ (EMAX 6)
+ (STRENGTH 6)
+ (DEXTERITY 60)
+ (VALUE 5)
+ (HABITAT CELLAR-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "scuttling across the dirt")
+ (ACTION RAT-F)>
+
+<ROUTINE RAT-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO " glares back at you, snarling. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** SKELETON ***"
+
+<OBJECT SKELETON
+ (LOC SKEL-ROOM)
+ (DESC "skeleton")
+ (SDESC 0)
+ (FLAGS TRYTAKE NOALL SURFACE)
+ (CAPACITY 10)
+ (VALUE 3)
+ (SYNONYM SKELETON BONES BONE BODY CORPSE NECK MONSTER)
+ (ADJECTIVE SKELETON)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN SKELETON-F)
+ (ACTION SKELETON-F)>
+
+"SEEN = not yet fought."
+
+<ROUTINE DESCRIBE-HEAP (OBJ)
+ <TELL "heap of bones">
+ <RTRUE>>
+
+<ROUTINE SKELETON-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL CA ,SKELETON>
+ <COND (<T? ,CHOKE>
+ <TELL " is clutching your throat.">)
+ (T
+ <PRINT " lies at your feet.">
+ <COND (<NOT <IS? ,AMULET ,TOUCHED>>
+ <MAKE ,AMULET ,NODESC>)>
+ <COND (<SEE-ANYTHING-IN? ,SKELETON>
+ <TELL " On it you see ">
+ <CONTENTS ,SKELETON>
+ <TELL C ,PER>)>
+ <UNMAKE ,AMULET ,NODESC>)>
+ <COND (<NOT <IS? ,AMULET ,TOUCHED>>
+ <TELL " An amulet dangles from its neck.">)>
+ <RTRUE>)
+ (<STRANGLE? ,SKELETON>
+ <RFATAL>)
+ (<THIS-PRSI?>
+ <RFALSE>)
+ (<VERB? TAKE KICK HIT SHAKE MOVE PUSH PULL ADJUST>
+ <COND (<IS? ,PRSO ,MUNGED>
+ <WASTE-OF-TIME>
+ <RTRUE>)>
+ <WINDOW ,SHOWING-ROOM>
+ <MAKE ,PRSO ,MUNGED>
+ <MAKE ,PRSO ,SEEN>
+ <PUTP ,PRSO ,P?SDESC ,DESCRIBE-HEAP>
+ <MAKE ,AMULET ,TOUCHED>
+ <REPLACE-SYN? ,PRSO ,W?BODY ,W?PILE>
+ <REPLACE-SYN? ,PRSO ,W?CORPSE ,W?HEAP>
+ <REPLACE-SYN? ,PRSO ,W?NECK ,W?ZZZP>
+ <REPLACE-ADJ? ,PRSO ,W?SKELETON ,W?ZZZP>
+ <TELL "With a sigh of exhaustion, " THEO>
+ <COND (<T? ,CHOKE>
+ <SETG CHOKE 0>
+ <DEQUEUE ,I-STRANGLE>
+ <TELL " releases its strangle hold and">)>
+ <TELL " crumbles into a useless " D ,PRSO ,PERIOD>
+ <UPDATE-STAT <GETP ,SKELETON ,P?VALUE> ,EXPERIENCE>
+ <RTRUE>)
+ (<VERB? LOOK-ON LOOK-INSIDE SEARCH LOOK-UNDER DIG DIG-UNDER>
+ <TELL "You find ">
+ <COND (<NOT <IS? ,AMULET ,TOUCHED>>
+ <MAKE ,AMULET ,NODESC>)>
+ <CONTENTS>
+ <UNMAKE ,AMULET ,NODESC>
+ <PRINT ,PERIOD>
+ <RTRUE>)
+ (<AND <VERB? EXAMINE LOOK-ON>
+ <NOT <IS? ,PRSO ,MUNGED>>>
+ <TELL "It grins at you horribly. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** GUTTER SNIPES ***"
+
+<OBJECT SNIPE
+ (LAST-LOC 0)
+ (DESC "guttersnipe")
+ (FLAGS MONSTER LIVING SURPRISED)
+ (SDESC DESCRIBE-MONSTERS)
+ (SYNONYM SNIPE GUTTERSNIPE BIRD MONSTER)
+ (ADJECTIVE GUTTER AWAKE)
+ (LIFE I-SNIPE)
+ (ENDURANCE 12)
+ (EMAX 12)
+ (STRENGTH 10)
+ (DEXTERITY 70)
+ (VALUE 7)
+ (HABITAT MOOR-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "lurking among the reeds")
+ (ACTION SNIPE-F)>
+
+<ROUTINE SNIPE-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO
+"'s beak is almost a foot long, and sharp as a needle. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** ELDRITCH VAPORS ***"
+
+<OBJECT VAPOR
+ (LOC IN-GAS)
+ (LAST-LOC IN-GAS)
+ (DESC "eldritch vapor")
+ (FLAGS VOWEL LIVING MONSTER SURPRISED)
+ (SYNONYM VAPORS VAPOR MONSTER)
+ (ADJECTIVE ELDRITCH AWAKE)
+ (LIFE I-VAPOR)
+ (ENDURANCE 6)
+ (EMAX 6)
+ (STRENGTH 5)
+ (DEXTERITY 70)
+ (VALUE 9)
+ (HABITAT MOOR-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "wafting amid the reeds")
+ (ACTION VAPOR-F)>
+
+<ROUTINE VAPOR-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <PCLEAR>
+ <TELL CTHEO " murmurs vaguely in response." CR>
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <DIAGNOSE-MONSTER>
+ <COND (<NOT <IS? ,PRSO ,TOUCHED>>
+ <MAKE ,PRSO ,TOUCHED>
+ <TELL ,TAB>
+ <REFER-TO-PACKAGE>)>
+ <RTRUE>)
+ (<VERB? WHAT WHO>
+ <REFER-TO-PACKAGE>
+ <RFATAL>)
+ (T
+ <RFALSE>)>>
+
+"*** SPIDERS ***"
+
+<OBJECT SPIDER
+ (LOC LEVEL1B)
+ (LAST-LOC LEVEL1B)
+ (DESC "giant spider")
+ (FLAGS NODESC MONSTER LIVING SURPRISED)
+ (SDESC DESCRIBE-MONSTERS)
+ (SYNONYM SPIDER INSECT MANDIBLE MANDIBLES MONSTER)
+ (ADJECTIVE GIANT BIG LARGE AWAKE)
+ (LIFE I-SPIDER)
+ (ENDURANCE 10)
+ (EMAX 10)
+ (STRENGTH 10)
+ (DEXTERITY 80)
+ (VALUE 7)
+ (HABITAT TOWER1-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "lurking in the shadows")
+ (ACTION SPIDER-F)>
+
+<ROUTINE SPIDER-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO " looks alarmingly well-fed. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** SLUGS ***"
+
+<OBJECT SLUG
+ (LOC LEVEL2B)
+ (LAST-LOC LEVEL2B)
+ (DESC "slug")
+ (FLAGS NODESC MONSTER LIVING SURFACE SURPRISED)
+ (SDESC DESCRIBE-MONSTERS)
+ (SYNONYM SLUG INSECT MONSTER)
+ (ADJECTIVE AWAKE)
+ (LIFE I-SLUG)
+ (ENDURANCE 11)
+ (EMAX 11)
+ (STRENGTH 10)
+ (DEXTERITY 60)
+ (VALUE 7)
+ (HABITAT TOWER2-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "squishing across the debris")
+ (ACTION SLUG-F)>
+
+<ROUTINE SLUG-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER PUT-ON PUT TOUCH-TO>
+ <TOUCH-SLUG-WITH ,PRSO>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE LOOK-ON>
+ <TELL CTHEO " is about as long as you are tall. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE TOUCH-SLUG-WITH (OBJ)
+ <ITALICIZE "Splat">
+ <TELL "! ">
+ <COND (<NOT <EQUAL? .OBJ ,CUBE>>
+ <WINDOW ,SHOWING-ALL>
+ <MOVE .OBJ ,HERE>
+ <TELL CTHE .OBJ " slips off " THE ,SLUG
+ "'s oozing body with no effect." CR>
+ <RTRUE>)>
+ <REMOVE ,CUBE>
+ <VANISH ,SLUG>
+ <TELL CTHE ,SLUG " emits a shriek of agony as " THE .OBJ
+" slides across its body. You leap out of its path of retreat, and listen as its repulsive squeals ">
+ <PRINT "fade into the distance.|">
+ <KILL-MONSTER ,SLUG>
+ <RTRUE>>
+
+"*** DUST BUNNIES ***"
+
+<OBJECT DUST
+ (LOC LEVEL3B)
+ (LAST-LOC LEVEL3B)
+ (DESC "dust bunnies")
+ (SDESC DESCRIBE-DUST)
+ (FLAGS MONSTER LIVING)
+ (SYNONYM BUNNIES BUNNY DUST BUNCH GROUP MONSTER MONSTERS)
+ (ADJECTIVE DUST AWAKE)
+ (LIFE I-DUST)
+ ; (ENDURANCE 0)
+ ; (EMAX 0)
+ ; (STRENGTH 0)
+ ; (DEXTERITY 0)
+ (VALUE 10)
+ (HABITAT TOWER3-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN DUST-F)
+ (ACTION DUST-F)>
+
+<ROUTINE DESCRIBE-DUST (OBJ)
+ <TELL "dust bunny">
+ <RTRUE>>
+
+<CONSTANT BMAX 10946>
+<GLOBAL OBUNNIES:NUMBER 1>
+<GLOBAL BUNNIES:NUMBER 1>
+
+<ROUTINE DUST-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <COND (<L? ,BUNNIES 5>
+ <TELL ,XA>
+ <COND (<EQUAL? ,BUNNIES 1>
+ <TELL "dust bunny is ">)
+ (T
+ <COND (<EQUAL? ,BUNNIES 2>
+ <TELL "pair">)
+ (T
+ <TELL "trio">)>
+ <TELL " of " 'DUST " are ">)>
+ <TELL "lurking in " THE ,GCORNER C ,PER>
+ <RTRUE>)
+ (<EQUAL? ,BUNNIES 8>
+ <TELL "Eight">)
+ (<EQUAL? ,BUNNIES 13>
+ <TELL "Thirteen">)
+ (<G? ,BUNNIES ,BMAX>
+ <TELL "Countless">)
+ (<G? ,BUNNIES 999>
+ <TELL N </ ,BUNNIES 1000> C ,COMMA
+ N <MOD ,BUNNIES 1000>>)
+ (T
+ <TELL N ,BUNNIES>)>
+ <TELL C ,SP 'DUST " hover in the air.">
+ <RTRUE>)
+ (<T? .CONTEXT>
+ <RFALSE>)
+ (<IS? ,DUST ,TOUCHED>)
+ (<SET X <TOUCHING?>>
+ <START-DUST>)>
+ <COND (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MOVE ,PRSO ,HERE>
+ <WINDOW ,SHOWING-ALL>
+ <TELL CTHEI " easily avoid " THEO ,PERIOD>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? HIT MUNG CUT TOUCH KICK TAKE SHAKE>
+ <HIT-BUNNIES>
+ <RTRUE>)
+ (<VERB? EXAMINE COUNT>
+ <UNMAKE ,PRSO ,SEEN>
+ <COND (<EQUAL? ,BUNNIES 1>
+ <ONLY-ONE>
+ <RTRUE>)
+ (<G? ,BUNNIES ,BMAX>
+ <TELL CTHEO " number in the countless thousands." CR>
+ <RTRUE>)>
+ <TELL "A quick count turns up ">
+ <COND (<G? ,BUNNIES 999>
+ <TELL N </ ,BUNNIES 1000> C ,COMMA
+ N <MOD ,BUNNIES 1000>>)
+ (T
+ <TELL N ,BUNNIES>)>
+ <TELL C ,SP 'PRSO ,PERIOD>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE HIT-BUNNIES ()
+ <WHOOSH>
+ <COND (<ZERO? ,PRSI>
+ <SETG PRSI ,HANDS>)>
+ <YOUR-OBJ>
+ <TELL " swipes through " THEO ,PTAB>
+ <COND (<SPARK-TO? ,PRSI ,PRSO>
+ <RTRUE>)>
+ <I-DUST <>>
+ <RFALSE>>
+
+<ROUTINE START-DUST ()
+ <MAKE ,DUST ,TOUCHED>
+ <UNMAKE ,DUST ,SEEN>
+ <QUEUE ,I-DUST>
+ <RFALSE>>
+
+"*** DORNBEAST ***"
+
+<OBJECT DORN
+ (LAST-LOC TOWER-TOP)
+ (DESC "dorn")
+ (FLAGS NODESC LIVING MONSTER PERSON SURPRISED)
+ (LIFE I-DORN)
+ (ENDURANCE 100)
+ (EMAX 100)
+ (STRENGTH 25)
+ (DEXTERITY 33)
+ (VALUE 20)
+ (HABITAT DORN-ROOMS)
+ (SYNONYM DORNBEAST DORN BEAST DORNBROOK MONSTER)
+ (ADJECTIVE DORN MIKE MICHAEL AWAKE)
+ (DESCFCN DORN-F)
+ (ACTION DORN-F)>
+
+<ROUTINE DORN-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL CA ,DORN ,SIS>
+ <COND (<IS? ,DORN ,MUNGED>
+ <TELL "thrashing about, bawling helplessly.">
+ <RTRUE>)
+ (<IS? ,DORN ,SURPRISED>
+ <TELL "waiting for you.">
+ <RTRUE>)>
+ <TELL "sweeping its gaze around the room.">
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-WINNER>
+ <MAKE ,DORN ,SEEN>
+ <TELL "\"Hurumph.\"" CR>
+ <RFATAL>)
+ (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? TELL>
+ <SEE-CHARACTER ,PRSO>
+ <COND (<IS? ,PRSO ,MUNGED>
+ <TELL CTHE ,DORN " is too busy bawling to respond." CR>
+ <RFATAL>)
+ (<T? ,P-CONT>
+ <SETG WINNER ,PRSO>
+ <RTRUE>)>
+ <TELL CTHEO " \"Hurumphs\" expectantly." CR>
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <COND (<IS? ,PRSO ,MUNGED>
+ <TELL CTHEO " is bawling like a baby. ">)>
+ <DIAGNOSE-MONSTER>
+ <COND (<NOT <IS? ,PRSO ,TOUCHED>>
+ <MAKE ,PRSO ,TOUCHED>
+ <TELL ,TAB>
+ <REFER-TO-PACKAGE>)>
+ <RTRUE>)
+ (<VERB? WHAT WHO>
+ <REFER-TO-PACKAGE>
+ <RFATAL>)
+ (T
+ <RFALSE>)>>
+
+"*** BLOODWORMS ***"
+
+<OBJECT WORM
+ (LOC WORM-ROOM)
+ (LAST-LOC WORM-ROOM)
+ (DESC "bloodworm")
+ (FLAGS LIVING TRYTAKE SURFACE SURPRISED SLEEPING)
+ (SDESC DESCRIBE-WORM)
+ (SYNONYM WORM BLOODWORM ROCK STONE)
+ (ADJECTIVE BLOOD MOSSY MOSS AWAKE)
+ (LIFE I-WORM)
+ (ENDURANCE 20)
+ (EMAX 20)
+ (STRENGTH 16)
+ (DEXTERITY 70)
+ (VALUE 20)
+ (HABITAT JUNGLE-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN WORM-F)
+ (EXIT-STR "slithering through the grass")
+ (ACTION WORM-F)>
+
+<ROUTINE DESCRIBE-WORM (OBJ)
+ <TELL "mossy rock">
+ <RTRUE>>
+
+<ROUTINE WORM-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <COND (<NOT <IS? ,WORM ,MONSTER>>
+ <TELL "The underbrush almost conceals "
+ A ,WORM C ,PER>
+ <RTRUE>)>
+ <VIEW-MONSTER>
+ <RTRUE>)>
+ <RFALSE>)
+ (<IS? ,WORM ,MONSTER>)
+ (<OR <VERB? LOOK-UNDER LOOK-BEHIND SEARCH>
+ <SET X <TOUCHING?>>>
+ <START-WORM "approach">
+ <RTRUE>)>
+ <COND (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO>
+ <COND (<IS? ,PRSO ,MONSTER>
+ <TELL
+" no longer looks like a mossy rock. It's equipped with three-foot fangs, and seems eager to plunge one or both of them into your chest. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)>
+ <HELMLOOK>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE HELMLOOK ()
+ <COND (<WEARING-MAGIC? ,HELM>
+ <TELL " looks vaguely suspicious." CR>
+ <RTRUE>)>
+ <PRINT " seems ordinary enough.|">
+ <RTRUE>>
+
+<ROUTINE START-WORM (STR "AUX" X)
+ <MAKE ,WORM ,MONSTER>
+ <UNMAKE ,WORM ,SLEEPING>
+ <MAKE ,WORM ,NOALL>
+ <UNMAKE ,WORM ,SURFACE>
+ <REPLACE-SYN? ,WORM ,W?ROCK ,W?MONSTER>
+ <REPLACE-SYN? ,WORM ,W?STONE ,W?ZZZP>
+ <REPLACE-ADJ? ,WORM ,W?MOSSY ,W?ZZZP>
+ <REPLACE-ADJ? ,WORM ,W?MOSS ,W?ZZZP>
+ <QUEUE ,I-WORM>
+ <WINDOW ,SHOWING-ROOM>
+ <SETG LAST-MONSTER ,WORM>
+ <SETG LAST-MONSTER-DIR ,P-WALK-DIR>
+ <SETG P-IT-OBJECT ,WORM>
+ <PUTP ,WORM ,P?SDESC ,DESCRIBE-MONSTERS>
+ <TELL "As you " .STR
+ " the rock, a three-foot set of fangs leaps ">
+ <PRINT "out at you, barely missing your throat!|">
+ <RTRUE>>
+
+"*** CROCS ***"
+
+<OBJECT CROC
+ (LOC JUN2)
+ (LAST-LOC JUN2)
+ (DESC "crocodile")
+ (FLAGS MONSTER LIVING SURPRISED)
+ (SDESC DESCRIBE-MONSTERS)
+ (SYNONYM CROCODILE CROC LIZARD REPTILE MONSTER ALLIGATOR)
+ (ADJECTIVE AWAKE)
+ (LIFE I-CROC)
+ (ENDURANCE 20)
+ (EMAX 20)
+ (STRENGTH 16)
+ (DEXTERITY 80)
+ (VALUE 20)
+ (HABITAT JUNGLE-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "stalking through the undergrowth")
+ (ACTION CROC-F)>
+
+<ROUTINE CROC-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO " looks hungry. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** HOUNDS ***"
+
+<OBJECT HOUND
+ (LAST-LOC 0)
+ (DESC "hellhound")
+ (FLAGS MONSTER LIVING SURPRISED)
+ (SDESC DESCRIBE-MONSTERS)
+ (SYNONYM HELLHOUND HOUND HELL DOG MONSTER)
+ (ADJECTIVE HELL AWAKE)
+ (LIFE I-HOUND)
+ (ENDURANCE 40)
+ (EMAX 40)
+ (STRENGTH 30)
+ (DEXTERITY 70)
+ (VALUE 25)
+ (HABITAT FOREST-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "prowling between the trees")
+ (ACTION HOUND-F)>
+
+<ROUTINE HOUND-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO " is deciding how best to eat you. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** PUPPETS ***"
+
+<OBJECT PUPP
+ (LOC TWILIGHT)
+ (LAST-LOC TWILIGHT)
+ (DESC "cruel puppet")
+ (FLAGS MONSTER LIVING SURPRISED)
+ (SDESC DESCRIBE-MONSTERS)
+ (SYNONYM PUPPET MONSTER)
+ (ADJECTIVE CRUEL AWAKE)
+ (LIFE I-PUPP)
+ (ENDURANCE 30)
+ (EMAX 30)
+ (STRENGTH 20)
+ (DEXTERITY 80)
+ (VALUE 25)
+ (HABITAT FOREST-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "resting beneath a tree")
+ (ACTION PUPP-F)>
+
+<ROUTINE PUPP-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO " twists its face to look just like you. Eeek! ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)
+ (<AND <VERB? LAUGH>
+ <EQUAL? ,P-PRSA-WORD ,W?INSULT ,W?OFFEND>>
+ <SET X <GETP ,PRSO ,P?EMAX>>
+ <COND (<L? <GETP ,PRSO ,P?ENDURANCE> .X>
+ <PUTP ,PRSO ,P?ENDURANCE .X>)
+ (<L? .X 32762>
+ <SET X <+ .X 5>>
+ <PUTP ,PRSO ,P?EMAX .X>
+ <PUTP ,PRSO ,P?ENDURANCE .X>)>
+ <TELL "You instantly regret your words, for " THEO
+ " grins with renewed vitality. It apparently ">
+ <ITALICIZE "feeds">
+ <TELL " off insults like that!" CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** UNDEAD ***"
+
+<OBJECT DEAD
+ (LAST-LOC 0)
+ (DESC "undead warrior")
+ (FLAGS MONSTER LIVING VOWEL SURPRISED)
+ (SDESC DESCRIBE-MONSTERS)
+ (SYNONYM WARRIOR SOLDIER MAN FELLOW GUY UNDEAD MONSTER)
+ (ADJECTIVE UNDEAD AWAKE)
+ (LIFE I-DEAD)
+ (ENDURANCE 36)
+ (EMAX 36)
+ (STRENGTH 30)
+ (DEXTERITY 70)
+ (VALUE 25)
+ (HABITAT RUIN-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "lurking amid the ruins")
+ (ACTION DEAD-F)>
+
+<ROUTINE DEAD-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER TOUCH-TO>
+ <TOUCH-DEAD-WITH ,PRSO>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO " shimmers like a wave of heat. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)
+ (<VERB? HIT MUNG CUT
+ RIP CUT OPEN
+ OPEN-WITH KICK STOUCH-TO>
+ <TOUCH-DEAD-WITH ,PRSI>
+ <RTRUE>)
+ (<SET X <TOUCHING?>>
+ <TOUCH-DEAD-WITH ,HANDS>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE TOUCH-DEAD-WITH (OBJ)
+ <COND (<NOT <EQUAL? .OBJ ,VIAL>>
+ <PASSES-THROUGH .OBJ ,DEAD>
+ <RTRUE>)>
+ <VANISH ,VIAL>
+ <TELL ,YOU-HEAR "a sharp ">
+ <ITALICIZE "crack">
+ <TELL " as " THE ,VIAL
+" shatters, splashing your target with a shower of droplets that burst into fire on contact! The blasphemous creature opens its jaws in a silent scream as a purifying flame engulfs its ghostly form.|
+ Moments later, the last few cinders scatter in the breeze." CR>
+ <KILL-MONSTER ,DEAD>
+ <RTRUE>>
+
+"*** GHOULS ***"
+
+<OBJECT GHOUL
+ (LOC RUIN1)
+ (LAST-LOC RUIN1)
+ (DESC "ghoul")
+ (FLAGS MONSTER LIVING SURPRISED)
+ (SDESC DESCRIBE-MONSTERS)
+ (SYNONYM GHOUL ROBBER MONSTER)
+ (ADJECTIVE GRAVE AWAKE)
+ (LIFE I-GHOUL)
+ (ENDURANCE 36)
+ (EMAX 36)
+ (STRENGTH 30)
+ (DEXTERITY 70)
+ (VALUE 25)
+ (HABITAT RUIN-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (CONTFCN GHOUL-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "skulking about the ruins")
+ (ACTION GHOUL-F)>
+
+<ROUTINE GHOUL-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <COND (<EQUAL? .CONTEXT ,M-CONT>
+ <COND (<SET X <TOUCHING?>>
+ <TELL "Laughing insanely, "
+ THE ,GHOUL " dodges out of reach." CR>
+ <RTRUE>)>
+ <RFALSE>)>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO " glares back at you. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** CORBIES ***"
+
+<OBJECT CORBIES
+ (LOC LOCAL-GLOBALS)
+ (DESC "corbies")
+ (FLAGS NODESC PLURAL LIVING)
+ (SYNONYM CORBIES CORBIE BIRDS BIRD FLOCK GROUP BUNCH MONSTERS MONSTER)
+ (ADJECTIVE GIANT)
+ (ACTION CORBIES-F)>
+
+<ROUTINE CORBIES-F ("AUX" (FEAR 0) X)
+ <COND (<AND <T? ,BADKEY>
+ <EQUAL? <LOC ,BADKEY> ,PLAYER ,HERE>>
+ <INC FEAR>)>
+ <COND (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER GIVE FEED SHOW>
+ <MAKE ,PRSI ,SEEN>
+ <COND (<NOT <VERB? SHOW>>
+ <MOVE ,PRSO ,HERE>
+ <WINDOW ,SHOWING-ALL>)>
+ <TELL CTHEI>
+ <COND (<PRSO? BADKEY>
+ <TELL " screech with fear!" CR>
+ <RTRUE>)>
+ <TELL " snatch " THEO
+ " out of the air, aim carefully and drop it">
+ <COND (<PROB 50>
+ <TELL " on your skull. Ouch!" CR>
+ <UPDATE-STAT <- 0 <GETP ,PRSO ,P?SIZE>>>
+ <RTRUE>)>
+ <TELL ", narrowly missing your skull." CR>
+ <RTRUE>)
+ (<SET X <TOUCHING?>>
+ <CORBIES-STAY-AWAY>
+ <RTRUE>)>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <TELL CTHE ,CORBIES " shriek back obscenities." CR>
+ <RFATAL>)
+ (<VERB? EXAMINE LOOK-ON>
+ <TELL "The flock of " 'PRSO " soars overhead in ">
+ <COND (<T? .FEAR>
+ <TELL "high, frightened ">)
+ (T
+ <TELL "low, menacing ">)>
+ <TELL "circles." CR>
+ <COND (<NOT <IS? ,PRSO ,IDENTIFIED>>
+ <MAKE ,PRSO ,IDENTIFIED>
+ <TELL ,TAB>
+ <REFER-TO-PACKAGE>)>
+ <RTRUE>)
+ (<VERB? WHAT WHO>
+ <REFER-TO-PACKAGE>
+ <RFATAL>)
+ (<T? .FEAR>)
+ (<VERB? HIT MUNG CUT KICK>
+ <UNMAKE ,CORBIES ,SEEN>
+ <TELL CTHEO " flutter out of your reach." CR>
+ <RTRUE>)>
+ <COND (<SET X <TOUCHING?>>
+ <CORBIES-STAY-AWAY>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE CORBIES-STAY-AWAY ()
+ <TELL CTHE ,CORBIES>
+ <COND (<AND <T? ,BADKEY>
+ <EQUAL? <LOC ,BADKEY> ,PLAYER ,HERE>>
+ <MAKE ,CORBIES ,SEEN>
+ <PRINT " seem unwilling to approach you.|">
+ <RTRUE>)>
+ <UNMAKE ,CORBIES ,SEEN>
+ <TELL " easily swoop out of reach." CR>
+ <RTRUE>>
+
+"*** MONKEY GRINDER ***"
+
+<OBJECT GRINDER
+ (LAST-LOC AT-GATE)
+ (DESC "monkey grinder")
+ (FLAGS NODESC PERSON LIVING MONSTER SURPRISED)
+ (LIFE I-GRINDER)
+ (ENDURANCE 100)
+ (EMAX 100)
+ (STRENGTH 16)
+ (DEXTERITY 25)
+ (VALUE 25)
+ (HABITAT ACCARDI-ROOMS)
+ (SYNONYM GRINDER FIGURE MAN FELLOW GUY MONSTER)
+ (ADJECTIVE MONKEY AWAKE)
+ (CONTFCN GRINDER-F)
+ (DESCFCN GRINDER-F)
+ (ACTION GRINDER-F)>
+
+<ROUTINE GRINDER-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <SETG P-HIM-OBJECT ,GRINDER>
+ <TELL CA ,GRINDER ,SIS>
+ <COND (<IS? ,GRINDER ,SURPRISED>
+ <TELL "loafing nearby.">
+ <RTRUE>)>
+ <TELL "attacking you with his " 'GURDY "!">
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-CONT>
+ <COND (<SET X <TOUCHING?>>
+ <TELL CTHE ,GRINDER " slaps your hand away.">
+ <COND (<PROB 50>
+ <TELL " \"Touchy, touchy.\"">)>
+ <CRLF>
+ <RTRUE>)>
+ <RFALSE>)
+ (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? GIVE GET-FOR>
+ <GIVE-TO-GRINDER ,PRSO>
+ <RTRUE>)
+ (<VERB? SHOW>
+ <SHOW-TO-GRINDER ,PRSO>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? HELLO WAVE-AT>
+ <MAKE ,GRINDER ,SEEN>
+ <TELL "\"Hello, victim.\"" CR>
+ <RTRUE>)
+ (<VERB? GOODBYE>
+ <TELL "\"Heh heh heh.\"" CR>
+ <RTRUE>)
+ (<SET X <TALKING?>>
+ <PERPLEXED ,GRINDER>
+ <TELL "You babble of ">
+ <COND (<AND <T? ,PRSI>
+ <OR <IS? ,PRSI ,LIVING>
+ <IS? ,PRSI ,MONSTER>>>
+ <TELL "be">)
+ (T
+ <TELL "th">)>
+ <TELL "ings of no significance to me!\"" CR>
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <DIAGNOSE-MONSTER>
+ <COND (<NOT <IS? ,PRSO ,TOUCHED>>
+ <MAKE ,PRSO ,TOUCHED>
+ <TELL ,TAB>
+ <REFER-TO-PACKAGE>)>
+ <RTRUE>)
+ (<VERB? HIT MUNG>
+ <TELL CTHEO " easily avoids ">
+ <COND (<OR <EQUAL? ,PRSI <> ,HANDS ,FEET>
+ <NOT <IS? ,PRSI ,NOARTICLE>>>
+ <TELL "your ">)>
+ <COND (<OR <VERB? KICK>
+ <PRSI? FEET>>
+ <TELL B ,W?FOOT>)
+ (<EQUAL? ,PRSI <> ,HANDS>
+ <TELL B ,W?BLOW>)
+ (T
+ <TELL D ,PRSI>)>
+ <PRINT ,PERIOD>
+ <RTRUE>)
+ (<VERB? WHAT WHO>
+ <REFER-TO-PACKAGE>
+ <RFATAL>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE SOME (OBJ)
+ <COND (<IS? .OBJ ,PLURAL>
+ <TELL "some">
+ <RTRUE>)>
+ <TELL "one">
+ <RTRUE>>
+
+<ROUTINE GIVE-TO-GRINDER (OBJ)
+ <MAKE ,GRINDER ,SEEN>
+ <COND (<GIVING-LOOT? .OBJ ,GRINDER>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,CHEST>
+ <GRINDERS-BANE>
+ <RTRUE>)>
+ <TELL "\"If I wanted " A .OBJ ", I'd steal ">
+ <SOME .OBJ>
+ <TELL ,PERQ>
+ <RTRUE>>
+
+<ROUTINE SHOW-TO-GRINDER (OBJ)
+ <MAKE ,GRINDER ,SEEN>
+ <COND (<EQUAL? .OBJ ,CHEST>
+ <GRINDERS-BANE T>
+ <RTRUE>)>
+ <TELL CTHE ,GRINDER ,GLANCES-AT THE .OBJ
+ " and yawns conspicuously." CR>
+ <RTRUE>>
+
+<ROUTINE EXIT-GRINDER ()
+ <MOVE ,GURDY ,HERE>
+ <SETG GRTIMER 0>
+ <KILL-MONSTER ,GRINDER>
+ <SETG P-IT-OBJECT ,GURDY>
+ <WINDOW ,SHOWING-ALL>
+ <RFALSE>>
+
+<ROUTINE GRINDERS-BANE ("OPT" (TAKIT <>) "AUX" L)
+ <SET L <LOC ,CHEST>>
+ <MOVE ,CHEST ,AT-GATE>
+ <TELL "\"A treasure chest!\" crows " THE ,GRINDER
+ ", snatching it ">
+ <COND (<EQUAL? .L ,PLAYER>
+ <TELL "rudely away from you">)
+ (T
+ <OUT-OF-LOC .L>)>
+ <TELL ". \"I just ">
+ <ITALICIZE "love">
+ <TELL " surprises.\"|
+ You wince as he taps on the outside of the chest, shakes it, then turns it upside down. Nothing happens. Then he places it on the ground, stares without comprehension at the brass plate, and cracks his knuckles" ,PTAB>
+ <DESCRIBE-GATE ,GRINDER>
+ <EXIT-GRINDER>
+ <RTRUE>>
+
+"*** UR-GRUE ***"
+
+<OBJECT URGRUE
+ (LOC IN-LAIR)
+ (LAST-LOC IN-LAIR)
+ (DESC "shadow")
+ (SDESC DESCRIBE-URGRUE)
+ (FLAGS NODESC VOWEL LIVING MONSTER SURPRISED)
+ (SYNONYM URGRUE UR\-GRUE SHADOW SHADOWS VOICE MONSTER)
+ (ADJECTIVE UR AWAKE)
+ (VALUE 50)
+ (GENERIC GENERIC-MONSTER-F)
+ (ACTION URGRUE-F)>
+
+<ROUTINE DESCRIBE-URGRUE (OBJ)
+ <COND (<OR <T? ,LIT?>
+ <WEARING-MAGIC? ,HELM>>
+ <PRINTD .OBJ>
+ <RTRUE>)>
+ <TELL "voice">
+ <RTRUE>>
+
+<ROUTINE URGRUE-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<NOUN-USED? ,W?URGRUE ,W?UR\-GRUE>
+ <PCLEAR>
+ <TELL "It is unwise to speak of such things." CR>
+ <UPDATE-STAT -1 ,LUCK T>
+ <RFATAL>)
+ (<THIS-PRSI?>
+ <COND (<SET X <PUTTING?>>
+ <HOPELESS>
+ <RTRUE>)
+ (<VERB? GIVE SHOW FEED>
+ <NO-INTS>
+ <RTRUE>)>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <NO-INTS>
+ <RTRUE>)
+ (<VERB? HIT MUNG CUT>
+ <HOPELESS>
+ <RTRUE>)
+ (<VERB? EXAMINE WHAT WHO>
+ <REFER-TO-PACKAGE>
+ <RFATAL>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE HOPELESS ()
+ <TELL "A feeling of utter hopelessness stays your hand." CR>
+ <RTRUE>>
+
+<ROUTINE NO-INTS ()
+ <PCLEAR>
+ <TELL "\"Please don't interrupt my monologue,\" scolds the ">
+ <COND (<OR <T? ,LIT?>
+ <WEARING-MAGIC? ,HELM>>
+ <TELL 'URGRUE ,PERIOD>
+ <RTRUE>)>
+ <TELL "voice in the darkness." CR>
+ <RTRUE>>
+
+"*** CHRISTMAS TREES ***"
+
+<OBJECT XTREES
+ (LOC LOCAL-GLOBALS)
+ (DESC "Christmas tree monsters")
+ (FLAGS LIVING MONSTER PLURAL SURFACE)
+ (SYNONYM TREES TREE MONSTER MONSTERS)
+ (ADJECTIVE CHRISTMAS XMAS TREE)
+ (LIFE 0)
+ (ENDURANCE 12)
+ (EMAX 12)
+ (STRENGTH 6)
+ (DEXTERITY 30)
+ (VALUE 5)
+ (GENERIC GENERIC-MONSTER-F)
+ (ACTION XTREES-F)>
+
+<ROUTINE XTREES-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <V-THROW>
+ <COND (<AND <PRSO? BFLY>
+ <IN? ,PRSO ,HERE>>
+ <TELL ,TAB>
+ <SHOW-XTREES-BFLY?>)>
+ <RTRUE>)
+ (<VERB? SHOW GIVE GET-FOR>
+ <COND (<PRSO? BFLY>
+ <SHOW-XTREES-BFLY?>
+ <RTRUE>)>
+ <TELL CTHE ,XTREES " show no interest in "
+ THEO ,PERIOD>
+ <RTRUE>)
+ (<SET X <PUTTING?>>
+ <TELL CTHEI " edge away from you." CR>
+ <RTRUE>)>
+ <RFALSE>)
+ (<OR <VERB? WAVE-AT HELLO>
+ <SET X <TALKING?>>>
+ <PCLEAR>
+ <TELL CTHE ,XTREES " are too busy singing">
+ <PRINT " to pay you much heed.|">
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <REFER-TO-PACKAGE>
+ <RTRUE>)
+ (<VERB? LISTEN>
+ <TELL "Still singing." CR>
+ <RTRUE>)
+ (<VERB? SMELL>
+ <TELL "The scent of pine">
+ <PRINT " fills the air">
+ <TELL ,PERIOD>
+ <RTRUE>)
+ (<VERB? HIT MUNG KICK>
+ <TELL
+"Sure. And even if you hit one tree, what about the thousands of others?" CR>
+ <RTRUE>)
+ (<VERB? COUNT>
+ <TELL "A quick count reveals 69,105 " 'PRSO ,PERIOD>
+ <RTRUE>)
+ (<VERB? WHAT WHO>
+ <REFER-TO-PACKAGE>
+ <RFATAL>)
+ (<VERB? LAMP-OFF>
+ <HOW?>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE SHOW-XTREES-BFLY? ("OPT" (INDENT 0))
+ <COND (<OR <NOT <IS? ,BFLY ,MUNGED>>
+ <NOT <VISIBLE? ,BFLY>>>
+ <MAKE ,XTREES ,SEEN>
+ <COND (<T? .INDENT>
+ <TELL ,TAB>)>
+ <TELL CTHE ,XTREES " murmur with vague concern." CR>
+ <RTRUE>)
+ (<NOT <IS? ,BFLY ,LIVING>>
+ <MAKE ,XTREES ,SEEN>
+ <COND (<T? .INDENT>
+ <TELL ,TAB>)>
+ <TELL CTHE ,XTREES
+" hesitate for a moment when they spot " THE ,BFLY
+". But as it isn't moving, they soon resume their song." CR>
+ <RTRUE>)>
+ <COND (<T? .INDENT>
+ <TELL ,TAB>)>
+ <MAKE ,XTREES ,SEEN>
+ <TELL CTHE ,XTREES>
+ <COND (<IS? ,XTREES ,NEUTRALIZED>
+ <TELL
+" seem to have gotten over their initial shock. Their carolling proceeds with renewed joy and determination." CR>
+ <RTRUE>)>
+ <MAKE ,XTREES ,NEUTRALIZED>
+ <TELL
+" stop dead in their tracks when they spot " THE ,BFLY
+". Youngsters take root behind their mothers, and the leaders sing an emergency verse of \"" <PICK-NEXT ,CAROLS> ,PERQ>
+ <RTRUE>>
+
+"*** GRUE ***"
+
+<OBJECT GRUE
+ (LAST-LOC 0)
+ (DESC "lurking presence")
+ (FLAGS MONSTER LIVING SURPRISED)
+ (SDESC DESCRIBE-MONSTERS)
+ (SYNONYM GRUE PRESENCE MONSTER)
+ (ADJECTIVE LURKING SINISTER AWAKE)
+ (LIFE I-GRUE)
+ (ENDURANCE 99)
+ (EMAX 99)
+ (STRENGTH 99)
+ (DEXTERITY 95)
+ (VALUE 30)
+ (DNUM 0)
+ (HABITAT GRUE-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (ACTION GRUE-F)>
+
+<ROUTINE GRUE-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? WHAT WHO>
+ <REFER-TO-PACKAGE>
+ <RFATAL>)
+ (<IN? ,GRUE ,HERE>
+ <RFALSE>)
+ (<VERB? FIND WHERE>
+ <TELL "There's probably one">
+ <PRINT " lurking in the darkness nearby.|">
+ <RTRUE>)
+ (<VERB? LISTEN>
+ <TELL "Grues make no sound, but are always">
+ <PRINT " lurking in the darkness nearby.|">
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** LUCKSUCKERS ***"
+
+<OBJECT ASUCKER
+ (LOC CAVE2)
+ (LAST-LOC CAVE2)
+ (DESC "lucksucker")
+ (SDESC DESCRIBE-SUCKERS)
+ (FLAGS MONSTER LIVING SURPRISED)
+ (SYNONYM ZZZP ZZZP LUCKSUCKER SUCKER MONSTER)
+ (ADJECTIVE ZZZP BLACK GIANT LARGE LUCK AWAKE)
+ (LIFE I-ASUCKER)
+ (ENDURANCE 16)
+ (EMAX 16)
+ (STRENGTH 12)
+ (DEXTERITY 60)
+ (VALUE 20)
+ (DNUM 0)
+ (HABITAT GRUE-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "stalking the passageway")
+ (ACTION ASUCKER-F)>
+
+<ROUTINE ASUCKER-F ("OPT" (CONTEXT <>))
+ <RETURN <HANDLE-SUCKERS? ,ASUCKER>>>
+
+<OBJECT BSUCKER
+ (LAST-LOC 0)
+ (DESC "lucksucker")
+ (SDESC DESCRIBE-SUCKERS)
+ (FLAGS MONSTER LIVING SURPRISED)
+ (SYNONYM ZZZP ZZZP LUCKSUCKER SUCKER MONSTER)
+ (ADJECTIVE ZZZP BLACK GIANT LARGE LUCK AWAKE)
+ (LIFE I-BSUCKER)
+ (ENDURANCE 16)
+ (EMAX 16)
+ (STRENGTH 12)
+ (DEXTERITY 60)
+ (VALUE 20)
+ (DNUM 0)
+ (HABITAT GRUE-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "stalking the passageway")
+ (ACTION BSUCKER-F)>
+
+<ROUTINE BSUCKER-F ("OPT" (CONTEXT <>))
+ <RETURN <HANDLE-SUCKERS? ,BSUCKER>>>
+
+<OBJECT CSUCKER
+ (LAST-LOC 0)
+ (DESC "lucksucker")
+ (SDESC DESCRIBE-SUCKERS)
+ (FLAGS MONSTER LIVING SURPRISED)
+ (SYNONYM ZZZP ZZZP LUCKSUCKER SUCKER MONSTER)
+ (ADJECTIVE ZZZP BLACK GIANT LARGE LUCK AWAKE)
+ (LIFE I-CSUCKER)
+ (ENDURANCE 16)
+ (EMAX 16)
+ (STRENGTH 12)
+ (DEXTERITY 60)
+ (VALUE 20)
+ (DNUM 0)
+ (HABITAT GRUE-ROOMS)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN VIEW-MONSTER)
+ (EXIT-STR "stalking the passageway")
+ (ACTION CSUCKER-F)>
+
+<ROUTINE CSUCKER-F ("OPT" (CONTEXT <>))
+ <RETURN <HANDLE-SUCKERS? ,CSUCKER>>>
+
+<GLOBAL THIS-SUCKER:NUMBER S-13>
+
+<ROUTINE DESCRIBE-SUCKERS (OBJ)
+ <TELL <GET ,SUCKER-NAMES ,THIS-SUCKER>>
+ <RTRUE>>
+
+<ROUTINE HANDLE-SUCKERS? (OBJ "AUX" X)
+ <COND (<AND <NOUN-USED? ,W?INTNUM>
+ <NOT <EQUAL? ,P-NUMBER 13>>>
+ <TELL ,CANT "see that number here." CR>
+ <RFATAL>)
+ (<THIS-PRSI?>
+ <COND (<VERB? SHOW>
+ <TELL CTHEI " seems ">
+ <COND (<NOT <PRSO? RFOOT CLOVER SHOE>>
+ <TELL "indifferent to ">
+ <SAY-YOUR ,PRSO>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <TELL "to hesitate for a moment." CR>
+ <RTRUE>)
+ (<VERB? THROW THROW-OVER TOUCH-TO>
+ <TOUCH-SUCKER-WITH .OBJ ,PRSO>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE LOOK-ON>
+ <TELL CTHEO " returns your stare." CR>
+ <RTRUE>)
+ (<VERB? HIT MUNG CUT
+ RIP CUT OPEN
+ OPEN-WITH KICK STOUCH-TO>
+ <TOUCH-SUCKER-WITH .OBJ ,PRSI>
+ <RTRUE>)
+ (<SET X <TOUCHING?>>
+ <TOUCH-SUCKER-WITH .OBJ ,HANDS>
+ <RTRUE>)
+ (<VERB? WHAT WHO>
+ <REFER-TO-PACKAGE>
+ <RFATAL>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE TOUCH-SUCKER-WITH (SUCKER OBJ)
+ <COND (<NOT <EQUAL? .OBJ ,RFOOT ,CLOVER ,SHOE>>
+ <COND (<VERB? THROW THROW-OVER>
+ <MOVE .OBJ ,HERE>
+ <WINDOW ,SHOWING-ALL>)>
+ <PASSES-THROUGH .OBJ .SUCKER>
+ <RTRUE>)>
+ <VANISH .OBJ>
+ <KERBLAM>
+ <TELL CTHE .OBJ>
+ <BLAST-SUCKER .SUCKER>
+ <RTRUE>>
+
+<ROUTINE BLAST-SUCKER (OBJ)
+ <PUTP .OBJ ,P?ENDURANCE 0>
+ <TELL " explodes in a shower of green sparks!" CR>
+ <RTRUE>>
+
+"*** SNOW WIGHT ***"
+
+<OBJECT WIGHT
+ (LOC ON-TRAIL)
+ (DESC "snow wight")
+ (SDESC DESCRIBE-WIGHT)
+ (FLAGS TRYTAKE SURFACE CONTAINER OPENED SURPRISED)
+ (SYNONYM SNOWDRIFT DRIFT SNOW)
+ (ADJECTIVE SNOW AWAKE)
+ (LIFE I-WIGHT)
+ (ENDURANCE 36)
+ (EMAX 36)
+ (STRENGTH 30)
+ (DEXTERITY 70)
+ (VALUE 30)
+ (GENERIC GENERIC-MONSTER-F)
+ (DESCFCN WIGHT-F)
+ (EXIT-STR "waiting for you")
+ (ACTION WIGHT-F)>
+
+<VOC "WIGHT" NOUN>
+
+<ROUTINE DESCRIBE-WIGHT (OBJ)
+ <TELL B ,W?SNOWDRIFT>
+ <RTRUE>>
+
+<ROUTINE START-WIGHT ("AUX" X)
+ <MAKE ,WIGHT ,MONSTER>
+ <MAKE ,WIGHT ,LIVING>
+ <UNMAKE ,WIGHT ,SURFACE>
+ <UNMAKE ,WIGHT ,CONTAINER>
+ <UNMAKE ,WIGHT ,OPENED>
+ <REPLACE-SYN? ,WIGHT ,W?DRIFT ,W?MONSTER>
+ <REPLACE-SYN? ,WIGHT ,W?SNOWDRIFT ,W?WIGHT>
+ <QUEUE ,I-WIGHT>
+ <WINDOW ,SHOWING-ROOM>
+ <SETG LAST-MONSTER ,WIGHT>
+ <SETG LAST-MONSTER-DIR ,P?SOUTH>
+ <SETG P-IT-OBJECT ,WIGHT>
+ <AS-YOU-APPROACH ,WIGHT>
+ <PUTP ,WIGHT ,P?SDESC 0>
+ <TELL "a pair of bloodstained claws swipes ">
+ <PRINT "out at you, barely missing your throat!|">
+ <RTRUE>>
+
+<ROUTINE WIGHT-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <COND (<NOT <IS? ,WIGHT ,MONSTER>>
+ <TELL CA ,WIGHT
+ " is blocking the uphill trail.">
+ <RTRUE>)>
+ <VIEW-MONSTER>
+ <RTRUE>)>
+ <RFALSE>)
+ (<IS? ,WIGHT ,MONSTER>)
+ (<SET X <TOUCHING?>>
+ <START-WIGHT>
+ <RTRUE>)>
+ <COND (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <MONSTER-THROW>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO>
+ <COND (<IS? ,PRSO ,MONSTER>
+ <TELL
+" is equipped with long, sharp teeth and claws, stained with the blood of its last encounter. ">
+ <DIAGNOSE-MONSTER>
+ <RTRUE>)>
+ <HELMLOOK>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** SHAPE ***"
+
+<OBJECT SHAPE
+ (DESC "vague outline")
+ (FLAGS TRYTAKE NOALL MONSTER LIVING)
+ (SYNONYM OUTLINE)
+ (ADJECTIVE AWAKE OUTLINE)
+ (VALUE 10)
+ (DESCFCN SHAPE-F)
+ (ACTION SHAPE-F)>
+
+<ROUTINE SHAPE-F ("OPT" (CONTEXT <>) "AUX" TBL X)
+ <COND (<T? .CONTEXT>
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <SET X ,P?NW>
+ <REPEAT ()
+ <SET TBL <GETP ,HERE .X>>
+ <COND (<ZERO? .TBL>)
+ (<EQUAL? <GET .TBL ,XDATA> ,OPLAIN>
+ <RETURN>)>
+ <COND (<IGRTR? X ,P?NORTH>
+ ; <SAY-ERROR "SHAPE-F">
+ <RTRUE>)>>
+ <TELL CA ,SHAPE
+" is stretched across the " B <GET ,DIR-NAMES <- 0 <- .X ,P?NORTH>>>
+" plane.">
+ <RTRUE>)>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? TOUCH-TO>
+ <TOUCH-SHAPE-WITH ,PRSO>
+ <RTRUE>)
+ (<SET X <PUTTING?>>
+ <COND (<PRSO? PHASE>
+ <TELL CTHEI " flexes away from " THEO
+ ,PERIOD>
+ <RTRUE>)>
+ <PRSO-SLIDES-OFF-PRSI>
+ <RTRUE>)
+ (<VERB? LOOK-THRU>
+ <DISTORTED>
+ <RTRUE>)>
+ <RFALSE>)
+ (<SET X <CLIMBING-ON?>>
+ <TELL CTHEO
+" flexes backwards and sideways, thwarting your best efforts." CR>
+ <RTRUE>)
+ (<VERB? HIT MUNG CUT
+ RIP CUT OPEN
+ OPEN-WITH KICK STOUCH-TO>
+ <TOUCH-SHAPE-WITH ,PRSI>
+ <RTRUE>)
+ (<SET X <TOUCHING?>>
+ <TOUCH-SHAPE-WITH ,HANDS>
+ <RTRUE>)
+ (<VERB? EXAMINE LOOK-ON>
+ <TELL "Looking directly at " THEO
+ " makes your head ache." CR>
+ <RTRUE>)
+ (<VERB? LOOK-UNDER LOOK-BEHIND>
+ <DISTORTED>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE DISTORTED ()
+ <TELL "The space beyond " THE ,SHAPE
+ " appears hopelessly distorted." CR>
+ <RTRUE>>
+
+<ROUTINE TOUCH-SHAPE-WITH (OBJ)
+ <COND (<NOT <EQUAL? .OBJ ,PHASE>>
+ <PASSES-THROUGH .OBJ ,SHAPE>
+ <RTRUE>)
+ (<NOT <IN? .OBJ ,PLAYER>>
+ <YOUD-HAVE-TO "be holding" .OBJ>
+ <RTRUE>)>
+ <VANISH ,SHAPE>
+ <UNMAKE ,SHAPE ,LIVING>
+ <SETG LAST-MONSTER <>>
+ <SETG LAST-MONSTER-DIR <>>
+ <HUMS>
+ <TELL "slashes effortlessly through " THE ,SHAPE
+". The torn edges recoil in agony, twist inside out and vanish in a toroid of collapsing geometry, leaving you with a clear path and a headache." CR>
+ <UPDATE-STAT <GETP ,SHAPE ,P?VALUE> ,EXPERIENCE>
+ <RTRUE>>
+ \ No newline at end of file
diff --git a/parser.zil b/parser.zil
new file mode 100644
index 0000000..f3a6f0a
--- /dev/null
+++ b/parser.zil
@@ -0,0 +1,3397 @@
+"PARSER for BEYOND ZORK:
+ Copyright (C)1987 Infocom, Inc. All rights reserved."
+
+<SETG SIBREAKS ".,\"!?">
+
+<GLOBAL NOW-PRSI?:FLAG <>>
+
+<GLOBAL LIT?:FLAG T>
+<GLOBAL ALWAYS-LIT?:FLAG <>>
+
+<GLOBAL PRSA:VERB 0>
+<GLOBAL PRSI:OBJECT 0>
+<GLOBAL PRSO:OBJECT 0>
+<GLOBAL P-TABLE:NUMBER 0>
+<GLOBAL P-SYNTAX:NUMBER 0>
+<GLOBAL P-LEN:NUMBER 0>
+<GLOBAL P-DIR:NUMBER 0>
+<GLOBAL HERE:OBJECT 0>
+
+; <GLOBAL LAST-PLAYER-LOC 0>
+
+<CONSTANT LEXMAX 59>
+<CONSTANT P-LEXV-LENGTH %<+ <* ,LEXMAX 4> 2>>
+<GLOBAL P-LEXV:TABLE <ITABLE ,P-LEXV-LENGTH (BYTE) 0>>
+<GLOBAL AGAIN-LEXV:TABLE <ITABLE ,P-LEXV-LENGTH (BYTE) 0>>
+<GLOBAL RESERVE-LEXV:TABLE <ITABLE ,P-LEXV-LENGTH (BYTE) 0>>
+
+<GLOBAL RESERVE-PTR:FLAG <>>
+
+<CONSTANT P-INBUF-LENGTH 82>
+<GLOBAL P-INBUF:TABLE <ITABLE ,P-INBUF-LENGTH (BYTE) 0>>
+<GLOBAL RESERVE-INBUF:TABLE <ITABLE ,P-INBUF-LENGTH (BYTE) 0>> "FIX #36"
+<GLOBAL OOPS-INBUF:TABLE <ITABLE ,P-INBUF-LENGTH (BYTE) 0>>
+
+<GLOBAL P-NUMBER:NUMBER -1>
+<GLOBAL P-EXCHANGE:NUMBER 0>
+<GLOBAL P-DIRECTION 0>
+<GLOBAL P-LASTADJ:WORD <>>
+<GLOBAL P-GWIMBIT 0>
+
+<GLOBAL P-NAM <>>
+<GLOBAL P-XNAM <>>
+<GLOBAL P-NAMW:TABLE <TABLE 0 0>>
+<GLOBAL P-ADJ <>>
+<GLOBAL P-XADJ <>>
+<GLOBAL P-ADJW:TABLE <TABLE 0 0>>
+<GLOBAL P-PHR 0> "Which noun phrase is being parsed?"
+
+<GLOBAL P-OFW:TABLE <TABLE 0 0>>
+
+<GLOBAL P-PRSO:TABLE <ITABLE NONE 48>>
+<GLOBAL P-PRSI:TABLE <ITABLE NONE 48>>
+<GLOBAL P-BUTS:TABLE <ITABLE NONE 48>>
+<GLOBAL P-MERGE:TABLE <ITABLE NONE 48>>
+<GLOBAL P-OCL1 <ITABLE NONE 48>>
+<GLOBAL P-OCL2 <ITABLE NONE 48>>
+
+<GLOBAL P-GETFLAGS 0>
+<GLOBAL P-AND <>>
+
+<CONSTANT P-MATCHLEN 0>
+<CONSTANT P-ALL 1>
+<CONSTANT P-ONE 2>
+<CONSTANT P-INHIBIT 4>
+
+<GLOBAL P-CONT:FLAG <>> "Parse-continue flag."
+
+<GLOBAL P-IT-OBJECT:OBJECT <>>
+<GLOBAL P-HER-OBJECT:OBJECT <>>
+<GLOBAL P-HIM-OBJECT:OBJECT <>>
+<GLOBAL P-THEM-OBJECT:OBJECT <>>
+
+<GLOBAL QCONTEXT:OBJECT <>>
+<GLOBAL QCONTEXT-ROOM:OBJECT <>>
+
+"Orphan flag"
+
+<GLOBAL P-OFLAG:FLAG <>>
+
+<GLOBAL P-MERGED <>>
+<GLOBAL P-ACLAUSE <>>
+<GLOBAL P-ANAM <>>
+
+; <GLOBAL P-AADJ <>>
+
+"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 6>
+
+"Offset to first part of speech"
+
+<CONSTANT P-P1OFF 7>
+
+"First part of speech bit mask in PSOFF byte"
+
+<CONSTANT P-P1BITS 3>
+<CONSTANT P-ITBLLEN 20> "In bytes (for COPYT)."
+
+<GLOBAL P-ITBL:TABLE <TABLE 0 0 0 0 0 0 0 0 0 0>>
+<GLOBAL P-OTBL:TABLE <TABLE 0 0 0 0 0 0 0 0 0 0>>
+<GLOBAL P-VTBL:TABLE <TABLE 0 0 0 0>>
+<GLOBAL P-OVTBL:TABLE <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:FLAG <>>
+
+<GLOBAL P-WON:FLAG <>>
+
+<CONSTANT M-FATAL 2>
+
+<CONSTANT M-BEG 1>
+<CONSTANT M-ENTERING 2>
+<CONSTANT M-LOOK 3>
+<CONSTANT M-ENTERED 4>
+<CONSTANT M-OBJDESC 5>
+<CONSTANT M-END 6>
+<CONSTANT M-CONT 7>
+<CONSTANT M-WINNER 8>
+<CONSTANT M-EXIT 9>
+
+<GLOBAL P-WALK-DIR:DIRECTION <>>
+<GLOBAL P-END-ON-PREP <>>
+
+<GLOBAL OOPS-TABLE:TABLE <TABLE <> <> <> <>>>
+<GLOBAL AGAIN-DIR:DIRECTION <>> ; "FIX #44"
+
+<CONSTANT O-PTR 0>
+<CONSTANT O-START 1>
+<CONSTANT O-LENGTH 2>
+<CONSTANT O-END 3>
+
+<GLOBAL P-PRSA-WORD:WORD <>>
+<GLOBAL P-DIR-WORD:WORD <>>
+
+<GLOBAL P-SLOCBITS 0>
+
+" 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) (VAL 0) (VERB <>) (OF-FLAG <>)
+ (LEN 0) (DIR <>) (NW 0) (LW 0) OWINNER OMERGED WRD X)
+ <REPEAT ()
+ <COND (<ZERO? ,P-OFLAG>
+ <COPYT ,P-ITBL ,P-OTBL ,P-ITBLLEN>)>
+ <COPYT ,P-ITBL 0 ,P-ITBLLEN>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <SETG P-XNAM <>>
+ <SETG P-XADJ <>>
+ <SETG P-DIR-WORD <>>
+ <SETG P-PNAM <>>
+ <SETG P-PADJN <>>
+ <COND (<ZERO? ,P-OFLAG>
+ <SETG P-ACT <>>
+ <SETG P-QWORD <>>
+ <SETG P-LASTADJ <>>
+ <PUT ,P-NAMW 0 <>>
+ <PUT ,P-NAMW 1 <>>
+ <PUT ,P-ADJW 0 <>>
+ <PUT ,P-ADJW 1 <>>
+ <PUT ,P-OFW 0 <>>
+ <PUT ,P-OFW 1 <>>)>
+ <SET OMERGED ,P-MERGED>
+ <SETG P-MERGED <>>
+ <SETG P-END-ON-PREP <>>
+ <PUT ,P-PRSO ,P-MATCHLEN 0>
+ <PUT ,P-PRSI ,P-MATCHLEN 0>
+ <PUT ,P-BUTS ,P-MATCHLEN 0>
+ <SET OWINNER ,WINNER>
+ <COND (<AND <ZERO? ,QUOTE-FLAG>
+ <NOT <EQUAL? ,WINNER ,PLAYER>>>
+ <SETG WINNER ,PLAYER>
+ <COND (<NOT <IS? <LOC ,WINNER> ,VEHICLE>>
+ <SETG HERE <LOC ,WINNER>>)>
+ <SETG LIT? <IS-LIT?>>)>
+ <COND (<T? ,RESERVE-PTR>
+ <SET PTR ,RESERVE-PTR>
+ <COPYT ,RESERVE-LEXV ,P-LEXV ,P-LEXV-LENGTH>
+ <COPYT ,RESERVE-INBUF ,P-INBUF ,P-INBUF-LENGTH> ; "FIX #36"
+ <COND (<AND <T? ,VERBOSITY>
+ <EQUAL? ,PLAYER ,WINNER>>
+ <CRLF>)>
+ <SETG RESERVE-PTR <>>
+ <SETG P-CONT <>>)
+ (<T? ,P-CONT>
+ <SET PTR ,P-CONT>
+ <SETG P-CONT <>>
+ <COND (<AND <T? ,VERBOSITY>
+ <EQUAL? ,PLAYER ,WINNER>>
+ <CRLF>)>)
+ (T
+ <SETG WINNER ,PLAYER>
+ <SETG QUOTE-FLAG <>>
+ <COND (<NOT <IS? <LOC ,WINNER> ,VEHICLE>>
+ <SETG HERE <LOC ,WINNER>>)>
+ <SETG LIT? <IS-LIT?>>
+
+ <COND (<BTST <LOWCORE FLAGS> 4>
+ <V-REFRESH>)>
+ <COND (<HERE? OLD-HERE>)
+ (<OR <ZERO? ,DMODE>
+ <EQUAL? ,IN-DBOX ,SHOWING-STATS>
+ <EQUAL? ,PRIOR ,SHOWING-INV ,SHOWING-STATS>>
+ <V-LOOK>)
+ (T
+ <DISPLAY-PLACE>)>
+ <COND (<ZERO? ,DMODE>)
+ (<ZERO? ,AUTO>)
+ (<ZERO? ,NEW-DBOX>)
+ (<AND <EQUAL? ,IN-DBOX ,SHOWING-ROOM>
+ <EQUAL? ,PRIOR 0 ,SHOWING-ROOM>>
+ <COND (<BTST ,NEW-DBOX ,SHOWING-ROOM>
+ <SET X ,P-IT-OBJECT>
+ <UPDATE-ROOMDESC>
+ <THIS-IS-IT .X>)>)
+ (<AND <EQUAL? ,IN-DBOX ,SHOWING-INV>
+ <EQUAL? ,PRIOR 0 ,SHOWING-INV>>
+ <COND (<BTST ,NEW-DBOX ,SHOWING-INV>
+ <SET X ,P-IT-OBJECT>
+ <UPDATE-INVENTORY>
+ <THIS-IS-IT .X>)>)
+ (<AND <EQUAL? ,IN-DBOX ,SHOWING-STATS>
+ <EQUAL? ,PRIOR 0 ,SHOWING-STATS>>
+ <COND (<BTST ,NEW-DBOX ,SHOWING-STATS>
+ <SET X ,ENDURANCE>
+ <TO-TOP-WINDOW>
+ <REPEAT ()
+ <APPLY ,STAT-ROUTINE .X <GET ,STATS .X>>
+ <COND (<IGRTR? X ,LUCK>
+ <RETURN>)>>
+ <TO-BOTTOM-WINDOW>)>)>
+
+ <COND (<T? ,VERBOSITY>
+ <CRLF>)>
+ <TELL ">">
+ <READ-LEXV>)>
+ <SETG P-LEN <GETB ,P-LEXV ,P-LEXWORDS>>
+ <COND (<EQUAL? <GET ,P-LEXV .PTR> ,W?QUOTE> ; "Quote first token?"
+ <SET PTR <+ .PTR ,P-LEXELEN>> ; "If so, ignore it."
+ <SETG P-LEN <- ,P-LEN 1>>)>
+ <COND (<EQUAL? <GET ,P-LEXV .PTR> ,W?THEN ,W?PLEASE ,W?SO>
+ <SET PTR <+ .PTR ,P-LEXELEN>> ; "Ignore boring 1st words."
+ <SETG P-LEN <- ,P-LEN 1>>)>
+ <COND (<AND <L? 1 ,P-LEN>
+ <EQUAL? <GET ,P-LEXV .PTR> ,W?GO> ; "GO first word?"
+ <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>
+ <WT? .NW ,PS?VERB ; ,P1?VERB>> ;" Followed by verb?"
+ <SET PTR <+ .PTR ,P-LEXELEN>> ; "If so, ignore it."
+ <SETG P-LEN <- ,P-LEN 1>>)>
+ <COND (<ZERO? ,P-LEN>
+ <TELL "[What?]" CR>
+ <RFALSE>)>
+ <SET WRD <GET ,P-LEXV .PTR>>
+ <COND (<EQUAL? .WRD ,W?UNDO>
+ <V-UNDO>
+ <RFALSE>)>
+ <SETG CAN-UNDO <ISAVE>>
+ <COND (<NOT <EQUAL? ,CAN-UNDO 2>>
+ <RETURN>)>
+ <V-REFRESH>
+ <COMPLETED "UNDO">
+ <COND (<OR <ZERO? ,DMODE>
+ <NOT <EQUAL? ,PRIOR 0 ,SHOWING-ROOM>>>
+ <CRLF>)>>
+ <COND (<EQUAL? .WRD ,W?OOPS>
+ <COND (<EQUAL? <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>
+ ,W?PERIOD ,W?COMMA>
+ <SET PTR <+ .PTR ,P-LEXELEN>>
+ <SETG P-LEN <- ,P-LEN 1>>)> ; "FIX #38"
+ <COND (<NOT <G? ,P-LEN 1>>
+ <PRINTC %<ASCII !\[>>
+ <TELL ,CANT "use OOPS that way.]" CR>
+ <RFALSE>)
+ (<GET ,OOPS-TABLE ,O-PTR>
+ <COND (<G? ,P-LEN 2> ; "FIX #39"
+ <COND (<EQUAL? <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>
+ ,W?QUOTE>
+ <TELL
+"[Sorry. " ,CANT "correct mistakes in quoted text.]" CR>
+ <RFALSE>)>
+ <TELL
+"[NOTE: Only the first word after OOPS is used.]" CR ,TAB>)>
+ <PUT ,AGAIN-LEXV <GET ,OOPS-TABLE ,O-PTR>
+ <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>
+ <SETG WINNER .OWINNER> ;"Fixes OOPS w/chars"
+ <INBUF-ADD <GETB ,P-LEXV <+ <* .PTR ,P-LEXELEN> 6>>
+ <GETB ,P-LEXV <+ <* .PTR ,P-LEXELEN> 7>>
+ <+ <* <GET ,OOPS-TABLE ,O-PTR> ,P-LEXELEN> 3>>
+ <COPYT ,AGAIN-LEXV ,P-LEXV ,P-LEXV-LENGTH>
+ <SETG P-LEN <GETB ,P-LEXV ,P-LEXWORDS>>
+ <SET PTR <GET ,OOPS-TABLE ,O-START>>
+ <COPYT ,OOPS-INBUF ,P-INBUF ,P-INBUF-LENGTH>)
+ (T
+ <PUT ,OOPS-TABLE ,O-END <>>
+ <TELL
+"[There was no word to replace in that sentence.]" CR>
+ <RFALSE>)>)
+ (T
+ <COND (<NOT <EQUAL? .WRD ,W?AGAIN ,W?G>>
+ <SETG P-QWORD <>>
+ <SETG P-NUMBER -1>)>
+ <PUT ,OOPS-TABLE ,O-END <>>)>
+ <COND (<EQUAL? <GET ,P-LEXV .PTR> ,W?AGAIN ,W?G>
+ <COND (<OR <T? ,P-OFLAG>
+ <ZERO? ,P-WON>
+ <ZERO? <GETB ,OOPS-INBUF 1>>> ; "FIX #50"
+ <PRINTC %<ASCII !\[>>
+ <TELL ,CANT "use AGAIN that way.]" CR>
+ <RFALSE>)
+ (<G? ,P-LEN 1>
+ <COND (<OR <EQUAL? <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>
+ ,W?PERIOD ,W?COMMA ,W?THEN>
+ <EQUAL? <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>
+ ,W?AND>>
+ <SET PTR <+ .PTR <* 2 ,P-LEXELEN>>>
+ <PUTB ,P-LEXV ,P-LEXWORDS
+ <- <GETB ,P-LEXV ,P-LEXWORDS> 2>>)
+ (T
+ <DONT-UNDERSTAND>
+ <RFALSE>)>)
+ (T
+ <SET PTR <+ .PTR ,P-LEXELEN>>
+ <PUTB ,P-LEXV ,P-LEXWORDS
+ <- <GETB ,P-LEXV ,P-LEXWORDS> 1>>)>
+ <COND (<G? <GETB ,P-LEXV ,P-LEXWORDS> 0>
+ <COPYT ,P-LEXV ,RESERVE-LEXV ,P-LEXV-LENGTH>
+ ; <STUFF ,RESERVE-LEXV ,P-LEXV>
+ <COPYT ,P-INBUF ,RESERVE-INBUF ,P-INBUF-LENGTH>
+ ; <INBUF-STUFF ,RESERVE-INBUF ,P-INBUF> ; "FIX #36"
+ <SETG RESERVE-PTR .PTR>)
+ (T
+ <SETG RESERVE-PTR <>>)>
+ ; <SETG P-LEN <GETB ,AGAIN-LEXV ,P-LEXWORDS>>
+ <SETG WINNER .OWINNER>
+ <SETG P-MERGED .OMERGED>
+ <COPYT ,OOPS-INBUF ,P-INBUF ,P-INBUF-LENGTH>
+ ; <INBUF-STUFF ,P-INBUF ,OOPS-INBUF>
+ <COPYT ,AGAIN-LEXV ,P-LEXV ,P-LEXV-LENGTH>
+ ; <STUFF ,P-LEXV ,AGAIN-LEXV>
+ <SET DIR ,AGAIN-DIR> ; "FIX #44"
+ <COPYT ,P-OTBL ,P-ITBL ,P-ITBLLEN>
+ ; <SET CNT -1>
+ ; <REPEAT ()
+ <COND (<IGRTR? CNT ,P-ITBLLEN>
+ <RETURN>)
+ (T
+ <PUT ,P-ITBL .CNT <GET ,P-OTBL .CNT>>)>>)
+ (T
+ <SETG P-NUMBER -1> ; "Fixed BM 2/28/86"
+ <COPYT ,P-LEXV ,AGAIN-LEXV ,P-LEXV-LENGTH>
+ ; <STUFF ,AGAIN-LEXV ,P-LEXV>
+ <COPYT ,P-INBUF ,OOPS-INBUF ,P-INBUF-LENGTH>
+ ; <INBUF-STUFF ,OOPS-INBUF ,P-INBUF>
+ <PUT ,OOPS-TABLE ,O-START .PTR>
+ <PUT ,OOPS-TABLE ,O-LENGTH <* 4 ,P-LEN>> ; "FIX #37"
+ <SET LEN ; "FIX #43"
+ <* 2 <+ .PTR <* ,P-LEXELEN <GETB ,P-LEXV ,P-LEXWORDS>>>>>
+ <PUT ,OOPS-TABLE ,O-END <+ <GETB ,P-LEXV <- .LEN 1>>
+ <GETB ,P-LEXV <- .LEN 2>>>>
+ <SETG RESERVE-PTR <>>
+ <SET LEN ,P-LEN>
+ <SETG P-DIR <>>
+ <SETG P-NCN 0>
+ <SETG P-GETFLAGS 0>
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <REPEAT ()
+ <COND (<DLESS? P-LEN 0>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)>
+ <SET WRD <GET ,P-LEXV .PTR>>
+ <COND (<BUZZER-WORD? .WRD>
+ <RFALSE>)
+ (<OR <T? .WRD>
+ <SET WRD <QUOTED-WORD? .PTR .VERB>>
+ <SET WRD <NUMBER? .PTR>>
+ ; <SET WRD <NAME? .PTR>> >
+ <COND (<ZERO? ,P-LEN>
+ <SET NW 0>)
+ (T
+ <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>)>
+ <COND (<AND <EQUAL? .WRD ,W?TO>
+ <EQUAL? .VERB ,ACT?TELL ,ACT?ASK>>
+ <PUT ,P-ITBL ,P-VERB ,ACT?TELL>
+ ; <SET VERB ,ACT?TELL>
+ <SET WRD ,W?QUOTE>)
+ (<AND <EQUAL? .WRD ,W?THEN ; ,W?PERIOD>
+ ; <NOT <EQUAL? .NW ,W?THEN ,W?PERIOD>>
+ <G? ,P-LEN 0> ; "FIX #40"
+ <ZERO? .VERB>
+ <ZERO? ,QUOTE-FLAG>>
+ <PUT ,P-ITBL ,P-VERB ,ACT?TELL>
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <SET WRD ,W?QUOTE>)
+ (<AND <EQUAL? .WRD ,W?PERIOD>
+ <EQUAL? .LW ,W?MR ,W?MRS ; ,W?DR>>
+ <SETG P-NCN <- ,P-NCN 1>>
+ <CHANGE-LEXV .PTR .LW T>
+ <SET WRD .LW>
+ <SET LW 0>)> ; "FIX #40"
+ <COND ; (<AND <EQUAL? .WRD ,W?PERIOD>
+ <EQUAL? .LW ,W?MR ,W?MRS ; ,W?DR>>
+ <SET LW 0>)
+ (<EQUAL? .WRD ,W?THEN ,W?PERIOD ,W?QUOTE>
+ <COND (<EQUAL? .WRD ,W?QUOTE>
+ <COND (<AND <EQUAL? <GET ,P-LEXV .PTR>
+ ,W?QUOTE>
+ <OR <NOT <EQUAL? .VERB
+ ,ACT?TELL
+ ,ACT?SAY
+ ; ,ACT?NAME>>
+ <NOT <EQUAL? ,WINNER
+ ,PLAYER>>>>
+ <COND (<QUOTED-PHRASE? .PTR .VERB>
+ <SET PTR
+ <+ .PTR ,P-LEXELEN>>
+ <AGAIN>)
+ (T
+ <RFALSE>)>)
+ (<T? ,QUOTE-FLAG>
+ <SETG QUOTE-FLAG <>>)
+ (T
+ <SETG QUOTE-FLAG T>)>)>
+ <OR <ZERO? ,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?GO>
+ <OR <EQUAL? .LEN 1>
+ <AND <EQUAL? .LEN 2>
+ <EQUAL? .VERB ,ACT?WALK ,ACT?GO>>
+ <AND <EQUAL? .NW ,W?THEN ,W?PERIOD
+ ,W?QUOTE>
+ <G? .LEN 1 ;2>>
+ ; <AND <EQUAL? .NW ,W?PERIOD>
+ <G? .LEN 1>>
+ <AND <T? ,QUOTE-FLAG>
+ <EQUAL? .LEN 2>
+ <EQUAL? .NW ,W?QUOTE>>
+ <AND <G? .LEN 2>
+ <EQUAL? .NW ,W?COMMA ,W?AND>>>>
+ <SET DIR .VAL>
+ <SETG P-DIR-WORD .WRD>
+ <COND (<EQUAL? .NW ,W?COMMA ,W?AND>
+ <CHANGE-LEXV <+ .PTR ,P-LEXELEN>
+ ,W?THEN>)>
+ <COND (<NOT <G? .LEN 2>>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)>)
+ (<AND <SET VAL <WT? .WRD ,PS?VERB ,P1?VERB>>
+ <ZERO? .VERB>>
+ <SETG P-PRSA-WORD .WRD> ; "For RUN, etc."
+ <SET VERB .VAL>
+ <PUT ,P-ITBL ,P-VERB .VAL>
+ <PUT ,P-ITBL ,P-VERBN ,P-VTBL>
+ <PUT ,P-VTBL 0 .WRD>
+ <SET X <+ <* .PTR 2> 2>>
+ <PUTB ,P-VTBL 2 <GETB ,P-LEXV .X>>
+ <PUTB ,P-VTBL 3 <GETB ,P-LEXV <+ .X 1>>>)
+ (<OR <SET VAL <WT? .WRD ,PS?PREPOSITION 0>>
+ <EQUAL? .WRD ,W?ALL ,W?EVERYTHING>
+ <EQUAL? .WRD ,W?BOTH ,W?A>
+ <WT? .WRD ,PS?ADJECTIVE>
+ <WT? .WRD ,PS?OBJECT>>
+ ; "Fix for new zilch, 3/12/87."
+ <COND (<AND <G? ,P-LEN 1> ; "1 IN RETROFIX #34"
+ <EQUAL? .NW ,W?OF>
+ <NOT <EQUAL? .VERB
+ ;,ACT?MAKE ,ACT?TAKE>>
+ <ZERO? .VAL>
+ <NOT <EQUAL? .WRD ,W?A>>
+ <NOT <EQUAL? .WRD ,W?ALL ,W?BOTH
+ ,W?EVERYTHING>>>
+ ; <COND (<EQUAL? .WRD ,W?BOTTOM>
+ <SET BOTTOM T>)>
+ <PUT ,P-OFW ,P-NCN .WRD> ; "Save OF-word"
+ <SET OF-FLAG T>)
+ (<AND <T? .VAL>
+ <OR <ZERO? ,P-LEN>
+ <EQUAL? .NW ,W?THEN ,W?PERIOD>>>
+ <SETG P-END-ON-PREP T>
+ <COND (<L? ,P-NCN 2>
+ <PUT ,P-ITBL ,P-PREP1 .VAL>
+ <PUT ,P-ITBL ,P-PREP1N .WRD>)>)
+ (<EQUAL? ,P-NCN 2>
+ <TELL
+"[There are too many nouns in that sentence.]" CR>
+ <RFALSE>)
+ (T
+ <SETG P-NCN <+ ,P-NCN 1>>
+ <SETG P-ACT .VERB>
+ <SET PTR <CLAUSE .PTR .VAL .WRD>>
+ <COND (<ZERO? .PTR>
+ <RFALSE>)
+ (<L? .PTR 0>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)>)>)
+
+ (<EQUAL? .WRD ,W?OF> ; "RETROFIX #34"
+ <COND (<OR <ZERO? .OF-FLAG>
+ <EQUAL? .NW ,W?PERIOD ,W?THEN>>
+ <CANT-USE .PTR>
+ <RFALSE>)
+ (T
+ <SET OF-FLAG <>>)>)
+ (<WT? .WRD ,PS?BUZZ-WORD>)
+ (<AND <EQUAL? .VERB ,ACT?TELL>
+ <WT? .WRD ,PS?VERB ; ,P1?VERB>>
+ <WAY-TO-TALK>
+ <RFALSE>)
+ (T
+ <CANT-USE .PTR>
+ <RFALSE>)>)
+ (T
+ <UNKNOWN-WORD .PTR>
+ <RFALSE>)>
+ <SET LW .WRD>
+ <SET PTR <+ .PTR ,P-LEXELEN>>>)>
+ <PUT ,OOPS-TABLE ,O-PTR <>>
+ <COND (<T? .DIR>
+ <SETG PRSA ,V?WALK>
+ <SETG P-WALK-DIR .DIR>
+ <SETG AGAIN-DIR .DIR> ; "FIX #44"
+ <SETG PRSO .DIR>
+ <SETG P-OFLAG <>>
+ <RTRUE>)>
+ <SETG P-WALK-DIR <>>
+ <SETG AGAIN-DIR <>> ; "FIX #44"
+ <COND (<AND <T? ,P-OFLAG>
+ <ORPHAN-MERGE>>
+ <SETG WINNER .OWINNER>)
+ ; (T
+ <SETG BOTTOM? .BOTTOM>)>
+ ; <COND (<ZERO? <GET ,P-ITBL ,P-VERB>>
+ <PUT ,P-ITBL ,P-VERB ,ACT?TELL>)> ; "Why was this here?"
+ <COND (<AND <SYNTAX-CHECK>
+ <SNARF-OBJECTS>
+ <MANY-CHECK>
+ ; <TAKE-CHECK>
+ <ITAKE-CHECK ,P-PRSO <GETB ,P-SYNTAX ,P-SLOC1>>
+ <ITAKE-CHECK ,P-PRSI <GETB ,P-SYNTAX ,P-SLOC2>>>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE PCLEAR ()
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RFALSE>>
+
+<ROUTINE CHANGE-LEXV (PTR WRD "OPT" PTRS? "AUX" X Y Z)
+ <COND (<ASSIGNED? PTRS?>
+ <SET X <+ 2 <* 2 <- .PTR ,P-LEXELEN>>>>
+ <SET Y <GETB ,P-LEXV .X>>
+ <SET Z <+ 2 <* 2 .PTR>>>
+ <PUTB ,P-LEXV .Z .Y>
+ <PUTB ,AGAIN-LEXV .Z .Y>
+ <SET Y <GETB ,P-LEXV <+ 1 .X>>>
+ <SET Z <+ 3 <* 2 .PTR>>>
+ <PUTB ,P-LEXV .Z .Y>
+ <PUTB ,AGAIN-LEXV .Z .Y>)>
+ <PUT ,P-LEXV .PTR .WRD>
+ <PUT ,AGAIN-LEXV .PTR .WRD>
+ <RTRUE>>
+
+"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 "OPT" (B1 5) "AUX" OFFS TYP)
+ <SET OFFS ,P-P1OFF>
+ <SET TYP <GETB .PTR ,P-PSOFF>>
+ <COND (<NOT <BTST .TYP .BIT>>
+ <RFALSE>)
+ (<G? .B1 4>
+ <RTRUE>)>
+ <SET TYP <BAND .TYP ,P-P1BITS>>
+ <COND (<NOT <EQUAL? .TYP .B1>>
+ <SET OFFS <+ .OFFS 1>>)>
+ <RETURN <GETB .PTR .OFFS>>>
+
+; <ROUTINE WT? (PTR BIT "OPT" (B1 5) "AUX" OFFS TYP)
+ <SET OFFS ,P-P1OFF>
+ <SET TYP <GETB .PTR ,P-PSOFF>>
+ <COND (<BTST .TYP .BIT>
+ <COND (<G? .B1 4>
+ <RTRUE>)>
+ <SET TYP <BAND .TYP ,P-P1BITS>>
+ <COND (<NOT <EQUAL? .TYP .B1>>
+ <INC OFFS>)>
+ <RETURN <GETB .PTR .OFFS>>)
+ (T
+ <RFALSE>)>>
+
+"Scan through a noun phrase, leaving a pointer to its starting location:"
+
+<ROUTINE CLAUSE (PTR VAL WRD "AUX" (FIRST?? T) (ANDFLG <>) (LW 0)
+ OFF NUM NW)
+ <SET OFF <* <- ,P-NCN 1> 2>>
+ <COND (<T? .VAL>
+ <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 (<ZERO? ,P-LEN>
+ <SETG P-NCN <- ,P-NCN 1>>
+ <RETURN -1>)>
+ <PUT ,P-ITBL <SET NUM <+ ,P-NC1 .OFF>> <REST ,P-LEXV <* .PTR 2>>>
+ <COND (<OR <EQUAL? <GET ,P-LEXV .PTR> ,W?THE ,W?A ,W?AN>
+ <EQUAL? <GET ,P-LEXV .PTR> ,W?$BUZZ>>
+ ; <EQUAL? <GET ,P-LEXV .PTR> ,W?THE ,W?A ,W?AN>
+ <PUT ,P-ITBL .NUM <REST <GET ,P-ITBL .NUM> 4>>)>
+ <REPEAT ()
+ <COND (<DLESS? P-LEN 0>
+ <PUT ,P-ITBL <+ .NUM 1> <REST ,P-LEXV <* .PTR 2>>>
+ <RETURN -1>)>
+ <SET WRD <GET ,P-LEXV .PTR>>
+ <COND (<BUZZER-WORD? .WRD>
+ <RFALSE>)
+ (<OR <T? .WRD>
+ <SET WRD <QUOTED-WORD? .PTR>>
+ <SET WRD <NUMBER? .PTR>>
+ ; <SET WRD <NAME? .PTR>>>
+ <COND (<ZERO? ,P-LEN>
+ <SET NW 0>)
+ (T
+ <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>
+ <COND (<ZERO? .NW> ; "FIX"
+ <SET NW
+ <NUMBER? <+ .PTR ,P-LEXELEN>>>)>)>
+ ; <COND (<AND <EQUAL? .WRD ,W?OF>
+ <EQUAL? <GET ,P-ITBL ,P-VERB>
+ ,ACT?MAKE ,ACT?TAKE>>
+ <CHANGE-LEXV .PTR ,W?WITH>
+ <SET WRD ,W?WITH>)>
+ <COND (<AND <EQUAL? .WRD ,W?QUOTE>
+ <NOT <EQUAL? ,P-ACT ,ACT?TELL ,ACT?SAY
+ ,ACT?NAME>>>
+ <COND (<QUOTED-PHRASE? .PTR ,P-ACT>
+ <SET PTR <+ .PTR ,P-LEXELEN>>
+ <AGAIN>)
+ (T
+ <RFALSE>)>)
+ (<AND <EQUAL? .WRD ,W?PERIOD>
+ <EQUAL? .LW ,W?MR ,W?MRS ; ,W?DR>>
+ <SET LW 0>)
+ (<EQUAL? .WRD ,W?AND ,W?COMMA>
+ <SET ANDFLG T>)
+ (<EQUAL? .WRD ,W?ALL ,W?BOTH ,W?EVERYTHING>
+ ; <OR <EQUAL? .WRD ,W?ALL ,W?BOTH ,W?ONE>
+ <EQUAL? .WRD ,W?EVERYTHING>>
+ <COND (<EQUAL? .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>
+ <NOT .FIRST??>>>
+ <SETG P-LEN <+ ,P-LEN 1>>
+ <PUT ,P-ITBL
+ <+ .NUM 1>
+ <REST ,P-LEXV <* .PTR 2>>>
+ <RETURN <- .PTR ,P-LEXELEN>>)
+ ;"3/16/83: This clause used to be later."
+ (<AND <T? .ANDFLG>
+ <OR ;"3/25/83: next statement added."
+ <ZERO? <GET ,P-ITBL ,P-VERBN>>
+ ;"10/26/84: next stmt changed"
+ <VERB-DIR-ONLY? .WRD>>>
+ <SET PTR <- .PTR 4>>
+ <CHANGE-LEXV <+ .PTR 2> ,W?THEN>
+ <SETG P-LEN <+ ,P-LEN 2>>)
+ (<WT? .WRD ,PS?OBJECT>
+ <COND (<AND <G? ,P-LEN 0>
+ <EQUAL? .NW ,W?OF>
+ <NOT <EQUAL? .WRD ,W?ALL ; ,W?ONE
+ ,W?EVERYTHING>>>
+ <PUT ,P-OFW <- ,P-NCN 1> .WRD>)
+ (<AND <WT? .WRD ,PS?ADJECTIVE
+ ;,P1?ADJECTIVE>
+ <T? .NW>
+ <WT? .NW ,PS?OBJECT>>)
+ (<AND <ZERO? .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 <>>)>)
+
+ ; "Next clause replaced by following one to enable OLD WOMAN, HELLO"
+
+ ; (<AND <OR <T? ,P-MERGED>
+ <T? ,P-OFLAG>
+ <T? <GET ,P-ITBL ,P-VERB>>>
+ <OR <WT? .WRD ,PS?ADJECTIVE>
+ <WT? .WRD ,PS?BUZZ-WORD>>>)
+ (<WT? .WRD ,PS?ADJECTIVE>)
+ (<WT? .WRD ,PS?BUZZ-WORD>)
+ (<AND <T? .ANDFLG>
+ <ZERO? <GET ,P-ITBL ,P-VERB>>>
+ <SET PTR <- .PTR 4>>
+ <CHANGE-LEXV <+ .PTR 2> ,W?THEN>
+ <SETG P-LEN <+ ,P-LEN 2>>)
+ (<WT? .WRD ,PS?PREPOSITION>)
+ (T
+ <CANT-USE .PTR>
+ <RFALSE>)>)
+ (T
+ <UNKNOWN-WORD .PTR>
+ <RFALSE>)>
+ <SET LW .WRD>
+ <SET FIRST?? <>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>>>
+
+<ROUTINE SPOKEN-TO (WHO)
+ <COND (<OR <NOT <EQUAL? .WHO ,QCONTEXT>>
+ <NOT <EQUAL? ,HERE ,QCONTEXT-ROOM>>>
+ <SEE-CHARACTER .WHO>
+ <TELL "[spoken to " THE .WHO ,BRACKET>)>
+ <RTRUE>>
+
+<ROUTINE ANYONE-HERE? ("AUX" OBJ)
+ <SET OBJ <QCONTEXT-GOOD?>>
+ <COND (<AND <ZERO? .OBJ>
+ <SET OBJ <FIRST? ,HERE>>>
+ <REPEAT ()
+ <COND (<AND <IS? .OBJ ,PERSON>
+ <NOT <EQUAL? .OBJ ,PLAYER ,WINNER>>
+ <NOT <IS? .OBJ ,PLURAL>>>
+ <RETURN>)
+ (<NOT <SET OBJ <NEXT? .OBJ>>>
+ <RETURN>)>>)>
+ <RETURN .OBJ>>
+
+<ROUTINE SEE-CHARACTER (OBJ)
+ <COND (<IS? .OBJ ,FEMALE>
+ <SETG P-HER-OBJECT .OBJ>)
+ (T
+ <SETG P-HIM-OBJECT .OBJ>)>
+ <SETG QCONTEXT .OBJ>
+ <SETG QCONTEXT-ROOM <LOC .OBJ>>
+ <RFALSE>>
+
+<ROUTINE QCONTEXT-GOOD? ()
+ <COND (<AND <T? ,QCONTEXT>
+ <IS? ,QCONTEXT ,PERSON>
+ <HERE? ,QCONTEXT-ROOM>
+ <VISIBLE? ,QCONTEXT>>
+ <RETURN ,QCONTEXT>)>
+ <RFALSE>>
+
+<ROUTINE THIS-IS-IT (OBJ)
+ <COND (<OR <ZERO? .OBJ>
+ <EQUAL? .OBJ ,PLAYER ,ME ,INTNUM>
+ <EQUAL? .OBJ ,INTDIR ,LEFT ,RIGHT>>
+ <RFALSE>)
+ (<IS? .OBJ ,FEMALE>
+ <SETG P-HER-OBJECT .OBJ>
+ <RFALSE>)
+ (<IS? .OBJ ,PERSON>
+ <SETG P-HIM-OBJECT .OBJ>
+ <RFALSE>)
+ (<IS? .OBJ ,PLURAL>
+ <SETG P-THEM-OBJECT .OBJ>
+ <RFALSE>)
+ (T
+ <SETG P-IT-OBJECT .OBJ>
+ <RFALSE>)>>
+
+<ROUTINE FAKE-ORPHAN ("AUX" TMP X)
+ <ORPHAN ,P-SYNTAX <>>
+ <BE-SPECIFIC>
+ <SET TMP <GET ,P-OTBL ,P-VERBN>>
+ <COND (<ZERO? .TMP>
+ <TELL B ,W?TELL>)
+ (<ZERO? <GETB ,P-VTBL 2>>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <SET X <GETB .TMP 2>>
+ <WORD-PRINT .X <GETB .TMP 3>>
+ <PUTB ,P-VTBL 2 0>)>
+ <SETG P-OFLAG T>
+ <SETG P-WON <>>
+ <TELL "?]" CR>
+ <RTRUE>>
+
+<ROUTINE PERFORM (A "OPT" (O <>) (I <>)
+ "AUX" (V <>) (WHO <>) OA OO OI ONP X)
+ #DECL ((A) FIX (O) <OR FALSE OBJECT FIX> (I) <OR FALSE OBJECT>)
+ <COND (<AND <NOT <EQUAL? ,WINNER ,PLAYER>>
+ <NOT <IS? ,WINNER ,PERSON>>>
+ <NOT-LIKELY ,WINNER>
+ <PRINT " would respond.|">
+ <PCLEAR>
+ <RFATAL>)>
+ <SET OA ,PRSA>
+ <SET OO ,PRSO>
+ <SET OI ,PRSI>
+ <SET ONP ,NOW-PRSI?>
+ <SET WHO <ANYONE-HERE?>>
+ <SETG PRSA .A>
+ <COND (<AND <NOT <EQUAL? ,WINNER ,PLAYER>>
+ <SET X <GAMEVERB?>>>
+ <TELL "[" ,CANT "tell characters to do that.]" CR>
+ <RFATAL>)
+ (<AND <ZERO? ,LIT?>
+ <SET X <SEEING?>>>
+ <TOO-DARK>
+ <RFATAL>)
+ (<NOT <EQUAL? .A ,V?WALK>>
+ <COND (<AND <EQUAL? ,WINNER ,PLAYER>
+ <VERB? WHO WHAT WHERE>
+ <T? .WHO>>
+ <SETG WINNER .WHO>
+ <SPOKEN-TO .WHO>)
+ (<AND <EQUAL? ,WINNER ,PLAYER>
+ <EQUAL? .O ,ME>
+ <VERB? TELL TELL-ABOUT ASK-ABOUT ASK-FOR
+ QUESTION REPLY THANK YELL HELLO GOODBYE
+ SAY ALARM>>
+ <COND (<ZERO? .WHO>
+ <TALK-TO-SELF>
+ <RFATAL>)>
+ <SETG WINNER .WHO>
+ <SPOKEN-TO .WHO>)>
+ <COND (<EQUAL? ,YOU .I .O>
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <COND (<ZERO? .WHO>
+ <TALK-TO-SELF>
+ <RFATAL>)
+ (T
+ <SETG WINNER .WHO>
+ <SPOKEN-TO .WHO>)>)
+ (T
+ <SEE-CHARACTER ,WINNER>
+ <SET WHO ,WINNER>)>
+ <COND (<EQUAL? .I ,YOU>
+ <SET I .WHO>)>
+ <COND (<EQUAL? .O ,YOU>
+ <SET O .WHO>)>)>
+ <COND (<AND <EQUAL? ,IT .I .O>
+ <NOT <ACCESSIBLE? ,P-IT-OBJECT>>>
+ <COND (<ZERO? .I>
+ <FAKE-ORPHAN>)
+ (T
+ <CANT-SEE-ANY ,P-IT-OBJECT>)>
+ <RFATAL>)>
+ <COND (<EQUAL? ,THEM .I .O>
+ <COND (<VISIBLE? ,P-THEM-OBJECT>
+ <COND (<EQUAL? ,THEM .O>
+ <SET O ,P-THEM-OBJECT>)>
+ <COND (<EQUAL? ,THEM .I>
+ <SET I ,P-THEM-OBJECT>)>)
+ (T
+ <COND (<ZERO? .I>
+ <FAKE-ORPHAN>)
+ (T
+ <CANT-SEE-ANY ,P-THEM-OBJECT>)>
+ <RFATAL>)>)>
+ <COND (<EQUAL? ,HER .I .O>
+ <COND (<VISIBLE? ,P-HER-OBJECT>
+ <COND (<AND <EQUAL? ,P-HER-OBJECT ,WINNER>
+ <NO-OTHER? T>>
+ <RFATAL>)>
+ <COND (<EQUAL? ,HER .O>
+ <SET O ,P-HER-OBJECT>)>
+ <COND (<EQUAL? ,HER .I>
+ <SET I ,P-HER-OBJECT>)>)
+ (T
+ <COND (<ZERO? .I>
+ <FAKE-ORPHAN>)
+ (T
+ <CANT-SEE-ANY ,P-HER-OBJECT>)>
+ <RFATAL>)>)>
+ <COND (<EQUAL? ,HIM .I .O>
+ <COND (<VISIBLE? ,P-HIM-OBJECT>
+ <COND (<AND <EQUAL? ,P-HIM-OBJECT ,WINNER>
+ <NO-OTHER?>>
+ <RFATAL>)>
+ <COND (<EQUAL? ,HIM .O>
+ <SET O ,P-HIM-OBJECT>)>
+ <COND (<EQUAL? ,HIM .I>
+ <SET I ,P-HIM-OBJECT>)>)
+ (T
+ <COND (<ZERO? .I>
+ <FAKE-ORPHAN>)
+ (T
+ <CANT-SEE-ANY ,P-HIM-OBJECT>)>
+ <RFATAL>)>)>
+ <COND (<EQUAL? .O ,IT>
+ <SET O ,P-IT-OBJECT>)>
+ <COND (<EQUAL? .I ,IT>
+ <SET I ,P-IT-OBJECT>)>)>
+
+ <SETG PRSI .I>
+ <SETG PRSO .O>
+
+ <SET V <>>
+ <COND (<AND <NOT <EQUAL? .A ,V?WALK>>
+ <EQUAL? ,NOT-HERE-OBJECT ,PRSO ,PRSI>>
+ <SET V <APPLY ,NOT-HERE-OBJECT-F>>
+ <COND (<T? .V>
+ <SETG P-WON <>>)>)>
+
+ <COND (<NOT <EQUAL? .A ,V?WALK>>
+ <THIS-IS-IT ,PRSI>
+ <THIS-IS-IT ,PRSO>)>
+
+ <SET O ,PRSO>
+ <SET I ,PRSI>
+
+ <COND (<ZERO? .V>
+ <SET V <APPLY <GETP ,WINNER ,P?ACTION> ,M-WINNER>>)>
+ <COND (<ZERO? .V>
+ <SET V <APPLY <GETP <LOC ,WINNER> ,P?ACTION> ,M-BEG>>)>
+ <COND (<ZERO? .V>
+ <SET V <APPLY <GET ,PREACTIONS .A>>>)>
+
+ <COND (<T? .V>)
+ (<NOT <EQUAL? .A ,V?TELL-ABOUT ,V?ASK-ABOUT ,V?ASK-FOR>>
+ <SETG NOW-PRSI? T>
+ <COND (<ZERO? .I>)
+ (<AND <NOT <EQUAL? .A ,V?WALK>>
+ <LOC .I>>
+ <SET V <GETP <LOC .I> ,P?CONTFCN>>
+ <COND (<T? .V>
+ <SET V <APPLY .V ,M-CONT>>)>)>
+ <SETG NOW-PRSI? <>>
+ <COND (<T? .V>)
+ (<ZERO? .O>)
+ (<AND <NOT <EQUAL? .A ,V?WALK>>
+ <LOC .O>>
+ <SET V <GETP <LOC .O> ,P?CONTFCN>>
+ <COND (<T? .V>
+ <SET V <APPLY .V ,M-CONT>>)>)>
+ <SETG NOW-PRSI? T>
+ <COND (<T? .V>)
+ (<T? .I>
+ <SET V <APPLY <GETP .I ,P?ACTION>>>)>)>
+ <SETG NOW-PRSI? <>>
+ <COND (<T? .V>)
+ (<ZERO? .O>)
+ (<NOT <EQUAL? .A ,V?WALK>>
+ <SET V <APPLY <GETP .O ,P?ACTION>>>)>
+
+ <COND (<ZERO? .V>
+ <SET V <APPLY <GET ,ACTIONS .A>>>)>
+
+ <COND (<NOT <EQUAL? .V ,M-FATAL>>
+ <APPLY <GETP <LOC ,WINNER> ,P?ACTION> ,M-END>)>
+
+ <SETG PRSA .OA>
+ <SETG PRSO .OO>
+ <SETG PRSI .OI>
+ <SETG NOW-PRSI? .ONP>
+ <RETURN .V>>
+
+<ROUTINE NO-OTHER? ("OPT" (FEMALE? <>) "AUX" OBJ)
+ <COND (<SET OBJ <FIRST? ,HERE>>
+ <REPEAT ()
+ <COND (<EQUAL? .OBJ ,WINNER>)
+ (<IS? .OBJ ,PERSON>
+ <COND (<T? .FEMALE?>
+ <COND (<IS? .OBJ ,FEMALE>
+ <RETURN>)>)
+ (<NOT <IS? .OBJ ,FEMALE>>
+ <RETURN>)>)>
+ <COND (<NOT <SET OBJ <NEXT? .OBJ>>>
+ <RETURN>)>>)>
+ <COND (<ZERO? .OBJ>
+ <PERPLEXED ,WINNER>
+ <TELL "Who are you talking about?\"" CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE BUZZER-WORD? (WORD "AUX" TBL LEN X)
+ <SET LEN <GET ,Q-BUZZES 0>>
+ <COND (<SET TBL <INTBL? .WORD <REST ,Q-BUZZES 2> .LEN>>
+ <TO-DO-THING-USE "ask about" "ASK CHARACTER ABOUT">
+ <RTRUE>)>
+ <SET LEN <GET ,N-BUZZES 0>>
+ <COND (<SET TBL <INTBL? .WORD <REST ,N-BUZZES 2> .LEN>>
+ <NYMPH-APPEARS>
+ <TELL ,DONT "need to use that " 'INTNUM>
+ <TO-COMPLETE>
+ <RTRUE>)>
+ <SET LEN <GET ,SWEAR-WORDS 0>>
+ <COND (<SET TBL <INTBL? .WORD <REST ,SWEAR-WORDS 2> .LEN>>
+ <SET WORD <GET ,STATS ,INTELLIGENCE>>
+ <COND (<L? .WORD 1>
+ <TELL
+"Such language betrays your low intelligence." CR>
+ <RTRUE>)>
+ <TELL "You suddenly feel less intelligent." CR>
+ <UPDATE-STAT -1 ,INTELLIGENCE T>
+ <RTRUE>)>
+
+ <COND (<NOT <SEE-COLOR?>>
+ <SET LEN <GET ,COLOR-WORDS 0>>
+ <COND (<SET TBL <INTBL? .WORD <REST ,COLOR-WORDS 2> .LEN>>
+ <TELL ,DONT "see the color " B .WORD
+" here; or any other colors, for that matter." CR>
+ <RTRUE>)>)>
+
+ <SET LEN <GET ,MAGIC-WORDS 0>>
+ <REPEAT ()
+ <SET TBL <GET ,MAGIC-WORDS .LEN>>
+ <COND (<AND <EQUAL? .WORD <GET .TBL 0>>
+ <ZERO? <GET .TBL 2>>>
+ <TELL "[This story won't recognize the word \""
+ B .WORD ".\"]" CR>
+ <RTRUE>)>
+ <COND (<DLESS? LEN 2>
+ <RETURN>)>>
+
+ <COND (<OR <EQUAL? .WORD ,W?QUIETLY ,W?SLOWLY ,W?CAREFULLY>
+ <EQUAL? .WORD ,W?CLOSELY ,W?QUICKLY ,W?RAPIDLY>>
+ <NYMPH-APPEARS>
+ <TELL "Adverbs (such as \"" B .WORD "\") aren't needed">
+ <TO-COMPLETE>
+ <RTRUE>)>
+
+ <COND (<OR <EQUAL? .WORD ,W?XYZZY ,W?PLUGH ,W?PLOVER>
+ <EQUAL? .WORD ,W?YOHO ,W?ULYSSES ,W?ODYSSEUS>>
+ <PRINT "A hollow voice says, \"Fool!\"">
+ <CRLF>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE VERB-DIR-ONLY? (WRD)
+ <COND (<AND <NOT <WT? .WRD ,PS?OBJECT>>
+ <NOT <WT? .WRD ,PS?ADJECTIVE>>
+ <OR <WT? .WRD ,PS?DIRECTION>
+ <WT? .WRD ,PS?VERB>>>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<BUZZ AGAIN G OOPS>
+
+"For AGAIN purposes, put contents of one LEXV table into another."
+
+; <ROUTINE STUFF (DEST SRC "OPT" (MAX 29)
+ "AUX" (PTR ,P-LEXSTART) (CTR 1) BPTR)
+ <PUTB .DEST 0 <GETB .SRC 0>>
+ <PUTB .DEST 1 <GETB .SRC 1>>
+ <REPEAT ()
+ <PUT .DEST .PTR <GET .SRC .PTR>>
+ <SET BPTR <+ <* .PTR 2> 2>>
+ <PUTB .DEST .BPTR <GETB .SRC .BPTR>>
+ <SET BPTR <+ <* .PTR 2> 3>>
+ <PUTB .DEST .BPTR <GETB .SRC .BPTR>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>
+ <COND (<IGRTR? CTR .MAX>
+ <RETURN>)>>>
+
+"Put contents of one INBUF into another."
+
+; <ROUTINE INBUF-STUFF (DEST SRC "AUX" CNT)
+ <SET CNT <- <GETB .SRC 0> 1>>
+ <REPEAT ()
+ <PUTB .DEST .CNT <GETB .SRC .CNT>>
+ <COND (<DLESS? CNT 0>
+ <RTRUE>)>>>
+
+"Put the word in the positions specified from P-INBUF to the end of
+OOPS-INBUF, leaving the appropriate pointers in AGAIN-LEXV."
+
+<ROUTINE INBUF-ADD (LEN BEG SLOT "AUX" DBEG (CTR 0) TMP)
+ <SET TMP <GET ,OOPS-TABLE ,O-END>>
+ <COND (<T? .TMP>
+ <SET DBEG .TMP>)
+ (T
+ <SET DBEG <+ <GETB ,AGAIN-LEXV
+ <SET TMP <GET ,OOPS-TABLE ,O-LENGTH>>>
+ <GETB ,AGAIN-LEXV <+ .TMP 1>>>>)>
+ <PUT ,OOPS-TABLE ,O-END <+ .DBEG .LEN>>
+ <REPEAT ()
+ <PUTB ,OOPS-INBUF <+ .DBEG .CTR>
+ <GETB ,P-INBUF <+ .BEG .CTR>>>
+ <INC CTR>
+ <COND (<EQUAL? .CTR .LEN>
+ <RETURN>)>>
+ <PUTB ,AGAIN-LEXV .SLOT .DBEG>
+ <PUTB ,AGAIN-LEXV <- .SLOT 1> .LEN>
+ <RTRUE>>
+
+; <GLOBAL P-DOLLAR-FLAG:FLAG <>>
+
+<ROUTINE NUMBER? (PTR "AUX" (SUM 0) (TIM <>) (EXC <>) ; (DOLLAR 0)
+ CNT BPTR CHR CCTR TMP NW)
+ <SET TMP <REST ,P-LEXV <+ .PTR .PTR>>>
+ <SET BPTR <GETB .TMP 3>>
+ <SET CNT <GETB .TMP 2>>
+ <COND (<G? .CNT 3>
+ <SET CNT 3>)>
+ <REPEAT ()
+ <COND (<DLESS? CNT 0>
+ <RETURN>)>
+ <SET CHR <GETB ,P-INBUF .BPTR>>
+ <COND (<EQUAL? .CHR %<ASCII !\:>>
+ <COND (<T? .EXC>
+ <RFALSE>)>
+ <SET TIM .SUM>
+ <SET SUM 0>)
+ (<EQUAL? .CHR %<ASCII !\->>
+ <COND (<T? .TIM>
+ <RFALSE>)>
+ <SET EXC .SUM>
+ <SET SUM 0>)
+ (<G? .SUM 9999>
+ <RFALSE>)
+ ; (<EQUAL? .CHR %<ASCII !\$>>
+ <SET DOLLAR T>)
+ (<AND <G? .CHR %<- <ASCII !\0> 1>>
+ <L? .CHR %<+ <ASCII !\9> 1>>>
+ <SET SUM <+ <* .SUM 10> <- .CHR %<ASCII !\0>>>>)
+ (T
+ <RFALSE>)>
+ <INC BPTR>>
+ <CHANGE-LEXV .PTR ,W?INTNUM>
+ <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>
+ ; <COND (<AND <T? .DOLLAR>
+ <EQUAL? .NW ,W?PERIOD>
+ <G? ,P-LEN 1>>
+ <SET TMP <CENTS-CHECK <+ .PTR <* ,P-LEXELEN 2>>>>
+ <COND (<T? .TMP>
+ <COND (<EQUAL? .TMP 100>
+ <SET TMP 0>)>
+ <SET SUM <+ <* 100 .SUM> .TMP>>
+ <SET CCTR <- ,P-LEN 2>>
+ <REPEAT ()
+ <COND (<DLESS? CCTR 0>
+ <RETURN>)>
+ <SET PTR <+ .PTR ,P-LEXELEN>>
+ <CHANGE-LEXV .PTR
+ <GET ,P-LEXV <+ .PTR <* 2 ,P-LEXELEN>>>>
+ <PUTB ,P-LEXV <+ <* .PTR 2> 2>
+ <GETB ,P-LEXV <+ <* <+ .PTR <* 2 ,P-LEXELEN>> 2> 2>>>
+ <PUTB ,P-LEXV <+ <* .PTR 2> 3>
+ <GETB ,P-LEXV <+ <* <+ .PTR <* 2 ,P-LEXELEN>> 2> 3>>>
+ <SETG P-LEN <- ,P-LEN 2>>
+ <PUTB ,P-LEXV ,P-LEXWORDS <- <GETB ,P-LEXV ,P-LEXWORDS> 2>>>)>)>
+ ; <COND (<T? .DOLLAR>
+ <SET SUM <* .SUM 100>>)
+ (<EQUAL? .NW ,W?DOLLAR ,W?DOLLARS>
+ <SET DOLLAR T>
+ <SET SUM <* .SUM 100>>)
+ (<EQUAL? .NW ,W?CENT ,W?CENTS>
+ <SET DOLLAR T>)>
+ <COND (<G? .SUM 9999>
+ <RFALSE>)
+ (<T? .EXC>
+ <SETG P-EXCHANGE .EXC>)
+ (<T? .TIM>
+ <SETG P-EXCHANGE 0>
+ <COND (<G? .TIM 23>
+ <RFALSE>)
+ (<G? .TIM 19>)
+ (<G? .TIM 12>
+ <RFALSE>)
+ (<G? .TIM 7>)
+ (T
+ <SET TIM <+ 12 .TIM>>)>
+ <SET SUM <+ .SUM <* .TIM 60>>>)
+ (T
+ <SETG P-EXCHANGE 0>)>
+ ; <SETG P-DOLLAR-FLAG .DOLLAR>
+ <SETG P-NUMBER .SUM>
+ ; <COND (<AND <T? .DOLLAR>
+ <G? .SUM 0>>
+ <RETURN ,W?MONEY>)>
+ ; <SETG P-DOLLAR-FLAG <>>
+ <RETURN ,W?INTNUM>>
+
+; <ROUTINE CENTS-CHECK (PTR "AUX" (CCTR 0) (SUM 0) CNT BPTR CHR)
+ <SET CNT <GETB <REST ,P-LEXV <* .PTR 2>> 2>>
+ <SET BPTR <GETB <REST ,P-LEXV <* .PTR 2>> 3>>
+ <REPEAT ()
+ <COND (<DLESS? CNT 0>
+ <RETURN>)>
+ <SET CHR <GETB ,P-INBUF .BPTR>>
+ <COND (<IGRTR? CCTR 2>
+ <RFALSE>)>
+ <COND (<AND <L? .CHR 58>
+ <G? .CHR 47>>
+ <SET SUM <+ <* .SUM 10> <- .CHR 48>>>)
+ (T
+ <RFALSE>)>
+ <INC BPTR>>
+ <COND (<ZERO? .SUM>
+ <RETURN 100>)
+ (<EQUAL? .CCTR 1>
+ <RETURN <* 10 .SUM>>)>
+ <RETURN .SUM>>
+
+"Old ORPHAN-MERGE."
+
+; <ROUTINE ORPHAN-MERGE ("AUX" (CNT -1) TEMP VERB BEG END (ADJ <>) WRD)
+ <SETG P-OFLAG <>>
+ <COND (<OR <EQUAL? <WT? <SET WRD <GET <GET ,P-ITBL ,P-VERBN> 0>>
+ ,PS?VERB ,P1?VERB>
+ <GET ,P-OTBL ,P-VERB>>
+ <WT? .WRD ,PS?ADJECTIVE>>
+ <SET ADJ T>) ; "FIX #45"
+ (<WT? <SET WRD <GET <GET ,P-ITBL ,P-VERBN> 0>>
+ ,PS?ADJECTIVE ;,P1?ADJECTIVE>
+ <SET ADJ T>)
+ (<AND <WT? .WRD ,PS?OBJECT ; ,P1?OBJECT>
+ <ZERO? ,P-NCN>>
+ <PUT ,P-ITBL ,P-VERB 0>
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <PUT ,P-ITBL ,P-NC1 <REST ,P-LEXV 2>>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>
+ <SETG P-NCN 1>)>
+ <COND (<AND <T? <SET VERB <GET ,P-ITBL ,P-VERB>>>
+ <ZERO? .ADJ>
+ <NOT <EQUAL? .VERB <GET ,P-OTBL ,P-VERB>>>>
+ <RFALSE>)
+ (<EQUAL? ,P-NCN 2>
+ <RFALSE>)
+ (<EQUAL? <GET ,P-OTBL ,P-NC1> 1>
+ <COND (<OR <EQUAL? <SET TEMP <GET ,P-ITBL ,P-PREP1>>
+ <GET ,P-OTBL ,P-PREP1>>
+ <ZERO? .TEMP>>
+ <COND (<T? .ADJ>
+ <PUT ,P-OTBL ,P-NC1 <REST ,P-LEXV 2>>
+ <COND (<ZERO? <GET ,P-ITBL ,P-NC1L>> ;"? DELETE?"
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
+ <COND (<ZERO? ,P-NCN> ;"? DELETE?"
+ <SETG P-NCN 1>)>)
+ (T
+ <PUT ,P-OTBL ,P-NC1 <GET ,P-ITBL ,P-NC1>>
+ ;<PUT ,P-OTBL ,P-NC1L <GET ,P-ITBL ,P-NC1L>>)>
+ <PUT ,P-OTBL ,P-NC1L <GET ,P-ITBL ,P-NC1L>>)
+ (T
+ <RFALSE>)>)
+ (<EQUAL? <GET ,P-OTBL ,P-NC2> 1>
+ <COND (<OR <EQUAL? <SET TEMP <GET ,P-ITBL ,P-PREP1>>
+ <GET ,P-OTBL ,P-PREP2>>
+ <ZERO? .TEMP>>
+ <COND (<T? .ADJ>
+ <PUT ,P-ITBL ,P-NC1 <REST ,P-LEXV 2>>
+ <COND (<ZERO? <GET ,P-ITBL ,P-NC1L>> ;"? DELETE?"
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>)>
+ <PUT ,P-OTBL ,P-NC2 <GET ,P-ITBL ,P-NC1>>
+ <PUT ,P-OTBL ,P-NC2L <GET ,P-ITBL ,P-NC1L>>
+ <SETG P-NCN 2>)
+ (T
+ <RFALSE>)>)
+ (<T? ,P-ACLAUSE>
+ <COND (<AND <NOT <EQUAL? ,P-NCN 1>> <NOT .ADJ>>
+ <SETG P-ACLAUSE <>>
+ <RFALSE>)
+ (T
+ <SET BEG <GET ,P-ITBL ,P-NC1>>
+ <COND (<T? .ADJ>
+ <SET BEG <REST ,P-LEXV 2>>
+ <SET ADJ <>>)>
+ <SET END <GET ,P-ITBL ,P-NC1L>>
+ <REPEAT ()
+ <SET WRD <GET .BEG 0>>
+ <COND (<EQUAL? .BEG .END>
+ <COND (<T? .ADJ>
+ <CLAUSE-WIN .ADJ>
+ ; <ACLAUSE-WIN .ADJ>
+ <RETURN>)
+ (T
+ <SETG P-ACLAUSE <>>
+ <RFALSE>)>)
+ (<AND <ZERO? .ADJ>
+ <OR <BTST <GETB .WRD ,P-PSOFF>
+ ,PS?ADJECTIVE> ;"same as WT?"
+ <EQUAL? .WRD ,W?ALL ; ,W?ONE
+ ,W?EVERYTHING>>>
+ <SET ADJ .WRD>)
+ ; (<EQUAL? .WRD ,W?ONE>
+ <CLAUSE-WIN .ADJ>
+ ; <ACLAUSE-WIN .ADJ>
+ <RETURN>)
+ (<BTST <GETB .WRD ,P-PSOFF> ,PS?OBJECT>
+ <COND (<EQUAL? .WRD ,P-ANAM>
+ <CLAUSE-WIN .ADJ>
+ ; <ACLAUSE-WIN .ADJ>)
+ (T
+ <CLAUSE-WIN>
+ ; <NCLAUSE-WIN>)>
+ <RETURN>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>
+ <COND (<ZERO? .END>
+ <SET END .BEG>
+ <SETG P-NCN 1>
+ <PUT ,P-ITBL ,P-NC1 <BACK .BEG 4>>
+ <PUT ,P-ITBL ,P-NC1L .BEG>)>>)>)>
+ <PUT ,P-VTBL 0 <GET ,P-OVTBL 0>>
+ <PUTB ,P-VTBL 2 <GETB ,P-OVTBL 2>>
+ <PUTB ,P-VTBL 3 <GETB ,P-OVTBL 3>>
+ <PUT ,P-OTBL ,P-VERBN ,P-VTBL>
+ <PUTB ,P-VTBL 2 0>
+ ;<AND <NOT <EQUAL? <GET ,P-OTBL ,P-NC2> 0>> <SETG P-NCN 2>>
+ <REPEAT ()
+ <COND (<IGRTR? CNT ,P-ITBLLEN>
+ <SETG P-MERGED T>
+ <RTRUE>)>
+ <PUT ,P-ITBL .CNT <GET ,P-OTBL .CNT>>>>
+
+"New ORPHAN-MERGE."
+
+<ROUTINE ORPHAN-MERGE ("AUX" (WHICH 1) (ADJ <>) TEMP VERB BEG END WRD X)
+ <SETG P-OFLAG <>>
+ <SET WRD <GET <GET ,P-ITBL ,P-VERBN> 0>>
+ <SET X <GET ,P-OTBL ,P-VERB>>
+ <COND (<OR <EQUAL? <WT? .WRD ,PS?VERB ,P1?VERB> .X>
+ <WT? .WRD ,PS?ADJECTIVE>>
+ <SET ADJ T>)
+ (<AND <WT? .WRD ,PS?OBJECT ,P1?OBJECT>
+ <ZERO? ,P-NCN>>
+ <PUT ,P-ITBL ,P-VERB 0>
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <PUT ,P-ITBL ,P-NC1 <REST ,P-LEXV 2>>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>
+ <SETG P-NCN 1>)>
+ <SET VERB <GET ,P-ITBL ,P-VERB>>
+ <COND (<AND <T? .VERB>
+ <ZERO? .ADJ>
+ <NOT <EQUAL? .VERB <GET ,P-OTBL ,P-VERB>>>>
+ <RFALSE>)
+ (<EQUAL? ,P-NCN 2>
+ <RFALSE>)
+ (<EQUAL? <GET ,P-OTBL ,P-NC1> 1>
+ <SET TEMP <GET ,P-ITBL ,P-PREP1>>
+ <COND (<OR <ZERO? .TEMP>
+ <EQUAL? .TEMP <GET ,P-OTBL ,P-PREP1>>>
+ <COND (<T? .ADJ>
+ <PUT ,P-OTBL ,P-NC1 <REST ,P-LEXV 2>>
+ <COND (<ZERO? <GET ,P-ITBL ,P-NC1L>>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
+ <COND (<ZERO? ,P-NCN>
+ <SETG P-NCN 1>)>)
+ (T
+ <PUT ,P-OTBL ,P-NC1 <GET ,P-ITBL ,P-NC1>>)>
+ <PUT ,P-OTBL ,P-NC1L <GET ,P-ITBL ,P-NC1L>>)
+ (T
+ <RFALSE>)>)
+ (<EQUAL? <GET ,P-OTBL ,P-NC2> 1>
+ <SET WHICH 2>
+ <SET TEMP <GET ,P-ITBL ,P-PREP1>>
+ <COND (<OR <ZERO? .TEMP>
+ <EQUAL? .TEMP <GET ,P-OTBL ,P-PREP2>>>
+ <COND (<T? .ADJ>
+ <PUT ,P-ITBL ,P-NC1 <REST ,P-LEXV 2>>
+ <COND (<ZERO? <GET ,P-ITBL ,P-NC1L>>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>)>
+ <PUT ,P-OTBL ,P-NC2 <GET ,P-ITBL ,P-NC1>>
+ <PUT ,P-OTBL ,P-NC2L <GET ,P-ITBL ,P-NC1L>>
+ <SETG P-NCN 2>)
+ (T
+ <RFALSE>)>)
+ (<T? ,P-ACLAUSE>
+ <COND (<AND <NOT <EQUAL? ,P-NCN 1>>
+ <ZERO? .ADJ>>
+ <SETG P-ACLAUSE <>>
+ <RFALSE>)
+ (T
+ <COND (<NOT <EQUAL? ,P-ACLAUSE ,P-NC1>>
+ <SET WHICH 2>)>
+ <SET BEG <GET ,P-ITBL ,P-NC1>>
+ <COND (<T? .ADJ>
+ <SET BEG <REST ,P-LEXV 2>>
+ <SET ADJ <>>)>
+ <SET END <GET ,P-ITBL ,P-NC1L>>
+ <REPEAT ()
+ <SET WRD <GET .BEG 0>>
+ <COND (<EQUAL? .BEG .END>
+ <COND (<T? .ADJ>
+ <CLAUSE-WIN .ADJ>
+ <RETURN>)
+ (T
+ <SETG P-ACLAUSE <>>
+ <RFALSE>)>)
+ (<OR <EQUAL? .WRD ,W?ALL ,W?EVERYTHING ,W?ONE>
+ <EQUAL? .WRD ,W?BOTH>
+ <AND <BTST <GETB .WRD ,P-PSOFF>
+ ,PS?ADJECTIVE> ;"same as WT?"
+ <ZERO? .ADJ>
+ ; <ADJ-CHECK .WRD .ADJ .ADJ>>>
+ <SET ADJ .WRD>)
+ (<EQUAL? .WRD ,W?ONE>
+ <CLAUSE-WIN .ADJ>
+ <RETURN>)
+ (<AND <BTST <GETB .WRD ,P-PSOFF> ,PS?OBJECT>
+ <EQUAL? <REST .BEG ,P-WORDLEN> .END>>
+ <COND (<EQUAL? .WRD ,P-ANAM>
+ <CLAUSE-WIN .ADJ>)
+ (T
+ <CLAUSE-WIN>)>
+ <RETURN>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>
+ <COND (<ZERO? .END>
+ <SET END .BEG>
+ <SETG P-NCN 1>
+ <PUT ,P-ITBL ,P-NC1 <BACK .BEG 4>>
+ <PUT ,P-ITBL ,P-NC1L .BEG>)>>)>)>
+ <PUT ,P-VTBL 0 <GET ,P-OVTBL 0>>
+ <PUTB ,P-VTBL 2 <GETB ,P-OVTBL 2>>
+ <PUTB ,P-VTBL 3 <GETB ,P-OVTBL 3>>
+ <PUT ,P-OTBL ,P-VERBN ,P-VTBL>
+ <PUTB ,P-VTBL 2 0>
+ ; <AND <NOT <EQUAL? <GET ,P-OTBL ,P-NC2> 0>>
+ <SETG P-NCN 2>>
+
+ ; <SET CNT -1>
+ ; <REPEAT ()
+ <COND (<IGRTR? CNT ,P-ITBLLEN>
+ <SETG P-MERGED T>
+ <RTRUE>)>
+ <PUT ,P-ITBL .CNT <GET ,P-OTBL .CNT>>>
+
+ <COPYT ,P-OTBL ,P-ITBL ,P-ITBLLEN>
+ <SETG P-MERGED .WHICH>
+ <RTRUE>>
+
+"ACLAUSE- and NCLAUSE-WIN are replaced by CLAUSE-WIN."
+
+; <ROUTINE ACLAUSE-WIN (ADJ "AUX" X)
+ <PUT ,P-ITBL ,P-VERB <GET ,P-OTBL ,P-VERB>>
+ <SET X <+ ,P-ACLAUSE 1>>
+ <CLAUSE-COPY ,P-OTBL ,P-OTBL ,P-ACLAUSE .X ,P-ACLAUSE .X .ADJ>
+ <AND <T? <GET ,P-OTBL ,P-NC2>> <SETG P-NCN 2>>
+ <SETG P-ACLAUSE <>>
+ <RTRUE>>
+
+; <ROUTINE NCLAUSE-WIN ()
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL ,P-NC1 ,P-NC1L
+ ,P-ACLAUSE <+ ,P-ACLAUSE 1>>
+ <AND <T? <GET ,P-OTBL ,P-NC2>> <SETG P-NCN 2>>
+ <SETG P-ACLAUSE <>>
+ <RTRUE>>
+
+<ROUTINE CLAUSE-WIN ("OPT" (ADJ <>) X)
+ <COND (<T? .ADJ>
+ <SETG P-LASTADJ .ADJ>
+ <PUT ,P-ITBL ,P-VERB <GET ,P-OTBL ,P-VERB>>)
+ (T
+ <SET ADJ T>)>
+
+ <SET X ,P-OCL2>
+ <COND (<EQUAL? ,P-ACLAUSE ,P-NC1>
+ <SET X ,P-OCL1>)>
+ <CLAUSE-COPY ,P-OTBL ,P-OTBL ,P-ACLAUSE <+ ,P-ACLAUSE 1> .X .ADJ>
+
+ ; <CLAUSE-COPY ,P-OTBL ,P-OTBL ,P-ACLAUSE <+ ,P-ACLAUSE 1>
+ <COND (<EQUAL? ,P-ACLAUSE ,P-NC1> ,P-OCL1)
+ (T ,P-OCL2)> .ADJ>
+
+ <COND (<NOT <EQUAL? <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)
+ <COND (<G? .BUF 1>
+ <REPEAT ()
+ <COND (<DLESS? CNT 0>
+ <RFALSE>)>
+ <PRINTC <GETB ,P-INBUF .BUF>>
+ <INC BUF>>)>
+ <RFALSE>>
+
+<CONSTANT LAST-BAD-LEN 13>
+<CONSTANT LAST-BAD <ITABLE ,LAST-BAD-LEN (BYTE) 0>>
+
+<ROUTINE UNKNOWN-WORD (PTR "AUX" (CNT 0) MSG LEN OFFSET CHAR)
+ <PUT ,OOPS-TABLE ,O-PTR .PTR>
+ <SET MSG <PICK-NEXT ,UNKNOWN-MSGS>>
+ <TELL "[" <GET .MSG 0>>
+ <SET OFFSET <REST ,P-LEXV <* .PTR 2>>>
+ <SET LEN <GETB .OFFSET 2>> ; "Length of word typed."
+ <SET OFFSET <GETB .OFFSET 3>> ; "Starting offset into P-INBUF."
+ <COND (<G? .OFFSET 1>
+ <REPEAT ()
+ <COND (<DLESS? LEN 0>
+ <RETURN>)>
+ <SET CHAR <GETB ,P-INBUF .OFFSET>>
+ <PRINTC .CHAR>
+ <INC OFFSET>
+ <COND (<L? .CNT %<- ,LAST-BAD-LEN 1>>
+ <INC CNT>
+ <PUTB ,LAST-BAD .CNT .CHAR>)>>)>
+ <PUTB ,LAST-BAD 0 .CNT>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-OFLAG <>>
+ <TELL <GET .MSG 1> "]" CR>
+ <RTRUE>>
+
+" 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."
+
+<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" (DRIVE1 <>) (DRIVE2 <>)
+ SYN LEN NUM OBJ PREP VERB X Y)
+ <SET VERB <GET ,P-ITBL ,P-VERB>>
+ <COND (<ZERO? .VERB>
+ <NOT-IN-SENTENCE "any verbs">
+ <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>>
+ <SET PREP <GET ,P-ITBL ,P-PREP1>>
+ <SET X <GETB .SYN ,P-SPREP1>>
+ <COND (<G? ,P-NCN .NUM>) ; "Added 4/27/83"
+ (<AND <NOT <L? .NUM 1>>
+ <ZERO? ,P-NCN>
+ <EQUAL? .PREP 0 .X>>
+ <SET DRIVE1 .SYN>)
+ (<EQUAL? .X <GET ,P-ITBL ,P-PREP1>>
+ <COND (<AND <EQUAL? .NUM 2>
+ <EQUAL? ,P-NCN 1>>
+ <SET DRIVE2 .SYN>)
+ (<EQUAL? <GETB .SYN ,P-SPREP2>
+ <GET ,P-ITBL ,P-PREP2>>
+ <SETG P-SYNTAX .SYN>
+ <SETG PRSA <GETB .SYN ,P-SACTION>>
+ <RTRUE>)>)>
+ <COND (<DLESS? LEN 1>
+ <COND (<OR <T? .DRIVE1>
+ <T? .DRIVE2>>
+ <RETURN>)>
+ <DONT-UNDERSTAND>
+ <RFALSE>)>
+ <SET SYN <REST .SYN ,P-SYNLEN>>>
+ <COND (<T? .DRIVE1>
+ <SET X <GETB .DRIVE1 ,P-SFWIM1>>
+ <SET Y <GETB .DRIVE1 ,P-SLOC1>>
+ <SET OBJ <GWIM .X .Y <GETB .DRIVE1 ,P-SPREP1>>>
+ <COND (<T? .OBJ>
+ <PUT ,P-PRSO ,P-MATCHLEN 1>
+ <PUT ,P-PRSO 1 .OBJ>
+ <SETG P-SYNTAX .DRIVE1>
+ <SETG PRSA <GETB .DRIVE1 ,P-SACTION>>
+ <RTRUE>)>)>
+ ; <SET X <GETB .DRIVE1 ,P-SFWIM1>>
+ ; <SET Y <GETB .DRIVE1 ,P-SLOC1>>
+ ; <SET OBJ <GWIM .X .Y <GETB .DRIVE1 ,P-SPREP1>>>
+ ; <COND (<AND <T? .DRIVE1>
+ <T? .OBJ>>
+ <PUT ,P-PRSO ,P-MATCHLEN 1>
+ <PUT ,P-PRSO 1 .OBJ>
+ <SETG P-SYNTAX .DRIVE1>
+ <SETG PRSA <GETB .DRIVE1 ,P-SACTION>>
+ <RTRUE>)>
+ ; <SET OBJ <GWIM <GETB .DRIVE2 ,P-SFWIM2>
+ <GETB .DRIVE2 ,P-SLOC2>
+ <GETB .DRIVE2 ,P-SPREP2>>>
+ <COND (<T? .DRIVE2>
+ <SET X <GETB .DRIVE2 ,P-SFWIM2>>
+ <SET Y <GETB .DRIVE2 ,P-SLOC2>>
+ <SET OBJ <GWIM .X .Y <GETB .DRIVE2 ,P-SPREP2>>>
+ <COND (<T? .OBJ>
+ <PUT ,P-PRSI ,P-MATCHLEN 1>
+ <PUT ,P-PRSI 1 .OBJ>
+ <SETG P-SYNTAX .DRIVE2>
+ <SETG PRSA <GETB .DRIVE2 ,P-SACTION>>
+ <RTRUE>)>)
+ ; (<AND <T? .DRIVE2>
+ <T? .OBJ>>
+ <PUT ,P-PRSI ,P-MATCHLEN 1>
+ <PUT ,P-PRSI 1 .OBJ>
+ <SETG P-SYNTAX .DRIVE2>
+ <SETG PRSA <GETB .DRIVE2 ,P-SACTION>>
+ <RTRUE>)
+ (<EQUAL? .VERB ,ACT?FIND ; ,ACT?WHAT>
+ <DO-IT-YOURSELF>
+ <RFALSE>)>
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <ORPHAN .DRIVE1 .DRIVE2>
+ <TELL "[Wh">)
+ (T
+ <TELL
+"[Your command wasn't complete. Next time, type wh">)>
+ <COND (<EQUAL? .VERB ,ACT?WALK ,ACT?GO>
+ <TELL "ere">)
+ (<OR <AND <T? .DRIVE1>
+ <EQUAL? <GETB .DRIVE1 ,P-SFWIM1> ,PERSON>>
+ <AND <T? .DRIVE2>
+ <EQUAL? <GETB .DRIVE2 ,P-SFWIM2> ,PERSON>>>
+ <TELL "om">)
+ (T
+ <TELL "at">)>
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <TELL " do you want">)
+ (T
+ <TELL " you want " THE ,WINNER>)>
+ <TELL ,STO>
+ <VERB-PRINT>
+ <COND (<T? .DRIVE2>
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L>)>
+ <SETG P-END-ON-PREP <>>
+ <PREP-PRINT <COND (<T? .DRIVE1>
+ <GETB .DRIVE1 ,P-SPREP1>)
+ (T
+ <GETB .DRIVE2 ,P-SPREP2>)>>
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <SETG P-OFLAG T>
+ <TELL "?]" CR>)
+ (T
+ <SETG P-OFLAG <>>
+ <TELL ".]" CR>)>
+ <RFALSE>>
+
+<ROUTINE VERB-PRINT ("AUX" TMP X)
+ <SET TMP <GET ,P-ITBL ,P-VERBN>> ;"? ,P-OTBL?"
+ <COND (<ZERO? .TMP>
+ <TELL B ,W?TELL>)
+ (<ZERO? <GETB ,P-VTBL 2>>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <SET X <GETB .TMP 2>>
+ <WORD-PRINT .X <GETB .TMP 3>>
+ <PUTB ,P-VTBL 2 0>)>>
+
+<ROUTINE ORPHAN (D1 D2)
+ <COND (<ZERO? ,P-MERGED>
+ <PUT ,P-OCL1 ,P-MATCHLEN 0>
+ <PUT ,P-OCL2 ,P-MATCHLEN 0>)>
+ <PUT ,P-OVTBL 0 <GET ,P-VTBL 0>>
+ <PUTB ,P-OVTBL 2 <GETB ,P-VTBL 2>>
+ <PUTB ,P-OVTBL 3 <GETB ,P-VTBL 3>>
+
+ ; <SET CNT -1>
+ ; <REPEAT ()
+ <COND (<IGRTR? CNT ,P-ITBLLEN>
+ <RETURN>)>
+ <PUT ,P-OTBL .CNT <GET ,P-ITBL .CNT>>>
+
+ <COPYT ,P-ITBL ,P-OTBL ,P-ITBLLEN>
+ <COND (<EQUAL? ,P-NCN 2>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL ,P-NC2 ,P-NC2L ,P-OCL2>)>
+ <COND (<NOT <L? ,P-NCN 1>>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL ,P-NC1 ,P-NC1L ,P-OCL1>)>
+ <COND (<T? .D1>
+ <PUT ,P-OTBL ,P-PREP1 <GETB .D1 ,P-SPREP1>>
+ <PUT ,P-OTBL ,P-NC1 1>)
+ (<T? .D2>
+ <PUT ,P-OTBL ,P-PREP2 <GETB .D2 ,P-SPREP2>>
+ <PUT ,P-OTBL ,P-NC2 1>)>
+ <RTRUE>>
+
+<ROUTINE CLAUSE-PRINT (BPTR EPTR "OPT" (THE? T) "AUX" X)
+ <SET X <GET ,P-ITBL .BPTR>>
+ <BUFFER-PRINT .X <GET ,P-ITBL .EPTR> .THE?>
+ <RFALSE>>
+
+<ROUTINE BUFFER-PRINT (BEG END CP
+ "AUX" (NOSP <>) WRD (FIRST?? T) (PN <>) LEN)
+ <REPEAT ()
+ <COND (<EQUAL? .BEG .END>
+ <RETURN>)>
+ <SET WRD <GET .BEG 0>>
+ <COND (<EQUAL? .WRD ,W?$BUZZ>)
+ (<EQUAL? .WRD ,W?COMMA>
+ <TELL ", ">)
+ (<T? .NOSP>
+ <SET NOSP <>>)
+ (T
+ <PRINTC ,SP>)>
+ <COND (<OR <AND <EQUAL? .WRD ,W?HIM>
+ <NOT <VISIBLE? ,P-HIM-OBJECT>>>
+ <AND <EQUAL? .WRD ,W?HER>
+ <NOT <VISIBLE? ,P-HER-OBJECT>>>
+ <AND <EQUAL? .WRD ,W?THEM>
+ <NOT <VISIBLE? ,P-THEM-OBJECT>>>>
+ <SET PN T>)>
+ <SET LEN <GET ,CAPS 0>>
+ <COND (<OR <EQUAL? .WRD ,W?PERIOD ,W?COMMA ,W?$BUZZ>
+ <AND <OR <WT? .WRD ,PS?BUZZ-WORD>
+ <WT? .WRD ,PS?PREPOSITION>>
+ <NOT <WT? .WRD ,PS?ADJECTIVE>>
+ <NOT <WT? .WRD ,PS?OBJECT>>>>
+ <SET NOSP T>)
+ (<EQUAL? .WRD ,W?ME>
+ <PRINT-TABLE ,CHARNAME>
+ <SET PN T>)
+ (<SET LEN <INTBL? .WRD <REST ,CAPS 2> .LEN>>
+ <CAPITALIZE .BEG>
+ <SET PN T>)
+ (T
+ <SET LEN <GETB .BEG 3>>
+ <COND (<AND <T? .FIRST??>
+ <ZERO? .PN>
+ <T? .CP>>
+ <TELL ,LTHE>)>
+ <COND (<OR <T? ,P-OFLAG>
+ <T? ,P-MERGED>>
+ <PRINTB .WRD>)
+ (<AND <EQUAL? .WRD ,W?IT>
+ <VISIBLE? ,P-IT-OBJECT>>
+ <TELL D ,P-IT-OBJECT>)
+ (<AND <EQUAL? .WRD ,W?HER>
+ <ZERO? .PN>>
+ <TELL D ,P-HER-OBJECT>)
+ (<AND <EQUAL? .WRD ,W?THEM>
+ <ZERO? .PN>>
+ <TELL D ,P-THEM-OBJECT>)
+ (<AND <EQUAL? .WRD ,W?HIM>
+ <ZERO? .PN>>
+ <TELL D ,P-HIM-OBJECT>)
+ (T
+ <WORD-PRINT <GETB .BEG 2> .LEN>)>
+ <SET FIRST?? <>>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>>
+
+<ROUTINE ADD-CAP? (WRD "AUX" X)
+ <SET X <GET ,CAPS 0>>
+ <COND (<SET X <INTBL? -1 <REST ,CAPS 2> .X>>
+ <PUT .X 0 .WRD>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE CAPITALIZE (PTR)
+ <COND (<OR <T? ,P-OFLAG>
+ <T? ,P-MERGED>>
+ <PRINTB <GET .PTR 0>>)
+ (T
+ <PRINTC <- <GETB ,P-INBUF <GETB .PTR 3>> ,SP>>
+ <WORD-PRINT <- <GETB .PTR 2> 1> <+ <GETB .PTR 3> 1>>)>>
+
+<ROUTINE PREP-PRINT (PREP "OPT" (SP? T) "AUX" WRD)
+ <COND (<AND <T? .PREP>
+ <ZERO? ,P-END-ON-PREP>>
+ <COND (<T? .SP?>
+ <TELL C ,SP>)>
+ <SET WRD <PREP-FIND .PREP>>
+ <PRINTB .WRD>
+ <COND (<AND <EQUAL? ,W?SIT <GET <GET ,P-ITBL ,P-VERBN> 0>>
+ <EQUAL? ,W?DOWN .WRD>>
+ <TELL " on">)>
+ <COND (<AND <EQUAL? ,W?GET <GET <GET ,P-ITBL ,P-VERBN> 0>>
+ <EQUAL? ,W?OUT .WRD>> ; "Will it ever work? --SWG"
+ <TELL " of">)>
+ <RTRUE>)>>
+
+"Old CLAUSE-COPY."
+
+; <GLOBAL P-OCLAUSE:TABLE <ITABLE NONE 25>>
+
+; <ROUTINE CLAUSE-COPY (SRC DEST SRCBEG SRCEND DESTBEG DESTEND
+ "OPT" (INSRT <>) "AUX" BEG END)
+ <SET BEG <GET .SRC .SRCBEG>>
+ <SET END <GET .SRC .SRCEND>>
+ <PUT .DEST .DESTBEG
+ <REST ,P-OCLAUSE
+ <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN> 2>>>
+ <REPEAT ()
+ <COND (<EQUAL? .BEG .END>
+ <PUT .DEST .DESTEND
+ <REST ,P-OCLAUSE
+ <+ 2 <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN>>>>
+ <RETURN>)
+ (T
+ <COND (<AND <T? .INSRT>
+ <EQUAL? ,P-ANAM <GET .BEG 0>>>
+ <CLAUSE-ADD .INSRT>)>
+ <CLAUSE-ADD <GET .BEG 0>>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>>
+
+"Pointers used by CLAUSE-COPY (source/destination beginning/end pointers)."
+
+; <CONSTANT CC-SBPTR 0>
+; <CONSTANT CC-SEPTR 1>
+; <CONSTANT CC-OCLAUSE 2>
+
+; <GLOBAL P-CCTBL <TABLE 0 0 0 0 0>>
+
+<ROUTINE CLAUSE-COPY (SRC DEST BB EE OCL "OPT" (INSRT <>)
+ "AUX" ; (FLG <>) BEG END OBEG CNT B E ; X)
+ <SET BEG <GET .SRC .BB>>
+ <SET END <GET .SRC .EE>>
+ <SET OBEG <GET .OCL ,P-MATCHLEN>>
+ ; <COND (<AND <T? .INSRT>
+ <EQUAL? .BEG <REST .OCL 2>>>
+ <SET OBEG 0>
+ <SET FLG T>)>
+ <REPEAT ()
+ <COND (<EQUAL? .BEG .END>
+ <RETURN>)>
+ <COND (<AND <T? .INSRT>
+ <EQUAL? ,P-ANAM <GET .BEG 0>>>
+ ; <SET B <GET ,P-ITBL ,P-NC1>>
+ ; <SET E <GET ,P-ITBL ,P-NC1L>>
+ ; <COND (<T? .FLG>
+ <REPEAT ()
+ <SET CNT 0>
+ <COND (<EQUAL? .INSRT T>
+ <PUT .BEG 0 <GET .B 0>>
+ <PUT .BEG 1 0>
+ <SET B <REST .B ,P-WORDLEN>>
+ <REPEAT ()
+ <COND (<EQUAL? .B .E>
+ <RETURN>)>
+ <SET B <REST .B ,P-WORDLEN>>
+ <SET CNT <+ .CNT 1>>>)
+ (T
+ <SET CNT 1>)>
+ <COND (<G? .CNT 0>
+ <SET X <* .CNT 2>>
+ <PUT .OCL ,P-MATCHLEN
+ <+ <GET .OCL ,P-MATCHLEN> .X>>
+ <COND (<AND <NOT <EQUAL? .BEG .END>>
+ <NOT <EQUAL?
+ <REST .BEG ,P-WORDLEN>
+ .END>>>
+ <SET B <BACK .END ,P-WORDLEN>>
+ <SET E <REST .END <* <- .CNT 1>
+ ,P-WORDLEN>>>
+ <REPEAT ()
+ <PUT .E 0 <GET .B 0>>
+ <PUT .E 1 <GET .B 1>>
+ <COND (<EQUAL? .B .BEG>
+ <RETURN>)>
+ <SET B <BACK .B ,P-WORDLEN>>
+ <SET E <BACK .E ,P-WORDLEN>>
+ <COND (<EQUAL? .B .BEG>
+ <RETURN>)>>)>
+ <SET END <REST .END <* .CNT ,P-WORDLEN>>>
+ <SET B <GET ,P-ITBL ,P-NC1>>
+ <SET E <GET ,P-ITBL ,P-NC1L>>
+ <COND (<EQUAL? .INSRT T>
+ <SET B <REST .B ,P-WORDLEN>>
+ <SET BEG <REST .BEG ,P-WORDLEN>>
+ <REPEAT ()
+ <COND (<EQUAL? .B .E>
+ <RETURN>)>
+ <PUT .BEG 0 <GET .B 0>>
+ <PUT .BEG 1 0>
+ <SET B <REST .B ,P-WORDLEN>>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>)
+ (T
+ <PUT .BEG ,P-LEXELEN ,P-ANAM>
+ <PUT .BEG <+ ,P-LEXELEN 1> 0>
+ <PUT .BEG 0 .INSRT>
+ <PUT .BEG 1 0>)>)>>
+ <RETURN>)
+ (<EQUAL? .INSRT T>
+ <REPEAT ()
+ <COND (<EQUAL? .B .E>
+ <RETURN>)>
+ <CLAUSE-ADD <GET .B 0> .OCL>
+ <SET B <REST .B ,P-WORDLEN>>>)
+ (T
+ <COND (<NOT <EQUAL? .INSRT <GET .OCL 1>>>
+ <CLAUSE-ADD .INSRT .OCL>)>
+ <CLAUSE-ADD ,P-ANAM .OCL>)>
+ <COND (<EQUAL? .INSRT T>
+ <SET B <GET ,P-ITBL ,P-NC1>>
+ <SET E <GET ,P-ITBL ,P-NC1L>>
+ <REPEAT ()
+ <COND (<EQUAL? .B .E>
+ <RETURN>)>
+ <CLAUSE-ADD <GET .B 0> .OCL>
+ <SET B <REST .B ,P-WORDLEN>>>)
+ (T
+ <COND (<NOT <EQUAL? .INSRT <GET .OCL 1>>>
+ <CLAUSE-ADD .INSRT .OCL>)>
+ <CLAUSE-ADD ,P-ANAM .OCL>)>)
+ ; (<ZERO? .FLG>
+ <CLAUSE-ADD <ZGET .BEG 0> .OCL>)
+ (T
+ <CLAUSE-ADD <GET .BEG 0> .OCL>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>
+ <SET CNT <- <GET .OCL ,P-MATCHLEN> .OBEG>>
+ <COND (<AND ;<EQUAL? .SRC .DEST>
+ ; <ZERO? .FLG>
+ <G? .OBEG 0>
+ <T? .CNT>>
+ <PUT .OCL ,P-MATCHLEN 0>
+ <SET OBEG <+ .OBEG 1>>
+ <REPEAT ()
+ <CLAUSE-ADD <GET .OCL .OBEG> .OCL>
+ <SET CNT <- .CNT 2>>
+ <COND (<ZERO? .CNT>
+ <RETURN>)>
+ <SET OBEG <+ .OBEG 2>>>
+ <SET OBEG 0>)>
+ <PUT .DEST .BB <REST .OCL <+ <* .OBEG ,P-LEXELEN> 2>>>
+ <PUT .DEST .EE
+ <REST .OCL <+ <* <GET .OCL ,P-MATCHLEN> ,P-LEXELEN> 2>>>
+ <RTRUE>>
+
+; <ROUTINE CLAUSE-ADD (WRD TBL "AUX" PTR)
+ <SET PTR <+ <GET .TBL ,P-MATCHLEN> 2>>
+ <PUT .TBL <- .PTR 1> .WRD>
+ <PUT .TBL .PTR 0>
+ <PUT .TBL ,P-MATCHLEN .PTR>
+ <RFALSE>>
+
+<ROUTINE CLAUSE-ADD (WRD TBL "AUX" PTR)
+ <SET PTR <GET .TBL ,P-MATCHLEN>>
+ <INC PTR>
+ <PUT .TBL .PTR .WRD>
+ <INC PTR>
+ <PUT .TBL .PTR 0>
+ <PUT .TBL ,P-MATCHLEN .PTR>
+ <RFALSE>>
+
+<ROUTINE PREP-FIND (PREP "AUX" (CNT 0) SIZE)
+ <SET SIZE <* <GET ,PREPOSITIONS 0> 2>>
+ <REPEAT ()
+ <COND (<IGRTR? CNT .SIZE>
+ <RFALSE>)
+ (<EQUAL? <GET ,PREPOSITIONS .CNT> .PREP>
+ <RETURN <GET ,PREPOSITIONS <- .CNT 1>>>)>>>
+
+<ROUTINE GWIM (GBIT LBIT PREP "AUX" (OBJ <>))
+ <COND (<EQUAL? .GBIT ,LOCATION>
+ <RETURN ,ROOMS>)
+ (<AND <NOT <EQUAL? ,P-IT-OBJECT <> ,NOT-HERE-OBJECT>>
+ <IS? ,P-IT-OBJECT .GBIT>>
+ <COND (<AND <EQUAL? .GBIT ,TAKEABLE>
+ <IN? ,P-IT-OBJECT ,PLAYER>>)
+ (T
+ <SET OBJ ,P-IT-OBJECT>)>)
+ (<AND <NOT <EQUAL? ,P-HIM-OBJECT <> ,NOT-HERE-OBJECT>>
+ <IS? ,P-HIM-OBJECT .GBIT>>
+ <SET OBJ ,P-HIM-OBJECT>)
+ (<AND <NOT <EQUAL? ,P-HER-OBJECT <> ,NOT-HERE-OBJECT>>
+ <IS? ,P-HER-OBJECT .GBIT>>
+ <SET OBJ ,P-HER-OBJECT>)
+ (<AND <NOT <EQUAL? ,P-THEM-OBJECT <> ,NOT-HERE-OBJECT>>
+ <IS? ,P-THEM-OBJECT .GBIT>>
+ <SET OBJ ,P-THEM-OBJECT>)>
+ <COND (<T? .OBJ>
+ <TELL "[" THE .OBJ ,BRACKET>
+ <RETURN .OBJ>)>
+ <SETG P-GWIMBIT .GBIT>
+ <SETG P-SLOCBITS .LBIT>
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <COND (<GET-OBJECT ,P-MERGE <>>
+ <SETG P-GWIMBIT 0>
+ <COND (<EQUAL? <GET ,P-MERGE ,P-MATCHLEN> 1>
+ <SET OBJ <GET ,P-MERGE 1>>
+ <COND (<AND <EQUAL? ,WINNER ,PLAYER>
+ <NOT <EQUAL? .OBJ ,HANDS>>>
+ <TELL "[">
+ <COND (<PREP-PRINT .PREP <>>
+ <PRINTC ,SP>)>
+ <TELL THE .OBJ ,BRACKET>)>
+ <RETURN .OBJ>)>
+ <RFALSE>)
+ (<EQUAL? .GBIT ,WIELDED>
+ <SETG P-GWIMBIT 0>
+ <RETURN ,HANDS>)
+ (T
+ <SETG P-GWIMBIT 0>
+ <RFALSE>)>>
+
+<ROUTINE SNARF-OBJECTS ("AUX" PTR)
+ <SET PTR <GET ,P-ITBL ,P-NC1>>
+ <COND (<T? .PTR>
+ <SETG P-PHR 0>
+ <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC1>>
+ <COND (<NOT <SNARFEM .PTR <GET ,P-ITBL ,P-NC1L> ,P-PRSO>>
+ <RFALSE>)>
+ <COND (<GET ,P-BUTS ,P-MATCHLEN>
+ <SETG P-PRSO <BUT-MERGE ,P-PRSO>>)>)>
+ <SET PTR <GET ,P-ITBL ,P-NC2>>
+ <COND (<T? .PTR>
+ <SETG P-PHR 1>
+ <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC2>>
+ <COND (<NOT <SNARFEM .PTR <GET ,P-ITBL ,P-NC2L> ,P-PRSI>>
+ <RFALSE>)>
+ <COND (<GET ,P-BUTS ,P-MATCHLEN>
+ <COND (<EQUAL? <GET ,P-PRSI ,P-MATCHLEN> 1>
+ <SETG P-PRSO <BUT-MERGE ,P-PRSO>>
+ <RTRUE>)>
+ <SETG P-PRSI <BUT-MERGE ,P-PRSI>>)>)>
+ <RTRUE>>
+
+<ROUTINE BUT-MERGE (TBL "AUX" LEN BUTLEN (CNT 1) (MATCHES 0) OBJ NTBL X)
+ <SET LEN <GET .TBL ,P-MATCHLEN>>
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <REPEAT ()
+ <COND (<DLESS? LEN 0>
+ <RETURN>)>
+ <SET OBJ <GET .TBL .CNT>>
+ <SET X <REST ,P-BUTS 2>>
+ <COND (<NOT <SET X <INTBL? .OBJ .X <GET ,P-BUTS 0>>>>
+ ; <PUT ,P-MERGE <+ .MATCHES 1> .OBJ>
+ ; <SET MATCHES <+ .MATCHES 1>>
+ <INC MATCHES>
+ <PUT ,P-MERGE .MATCHES .OBJ>)>
+ <INC CNT>>
+ <PUT ,P-MERGE ,P-MATCHLEN .MATCHES>
+ <SET NTBL ,P-MERGE>
+ <SETG P-MERGE .TBL>
+ <RETURN .NTBL>>
+
+"Grabs the first adjective, unless it comes across a special-cased adjective."
+
+; <ROUTINE ADJ-CHECK (WRD ADJ "OPT" (NW <>))
+ <COND (<ZERO? .ADJ>
+ <RTRUE>)
+ (<ZMEMQ .WRD ,CHAR-POSS-TABLE>
+ <RTRUE>)>>
+
+<ROUTINE SNARFEM (PTR EPTR TBL "AUX" (BUT <>) LEN WV WRD NW (WAS-ALL? <>)
+ ONEOBJ)
+ ;"Next SETG 6/21/84 for WHICH retrofix"
+ <SETG P-AND <>>
+ <COND (<EQUAL? ,P-GETFLAGS ,P-ALL>
+ <SET WAS-ALL? T>)>
+ <SETG P-GETFLAGS 0>
+ <PUT ,P-BUTS ,P-MATCHLEN 0>
+ <PUT .TBL ,P-MATCHLEN 0>
+ <SET WRD <GET .PTR 0>>
+ <REPEAT ()
+ <COND (<EQUAL? .PTR .EPTR>
+ <SET WV <GET-OBJECT <OR .BUT .TBL>>>
+ <COND (<T? .WAS-ALL?>
+ <SETG P-GETFLAGS ,P-ALL>)>
+ <RETURN .WV>)
+ (T
+ <COND (<EQUAL? .EPTR <REST .PTR ,P-WORDLEN>>
+ <SET NW 0>)
+ (T
+ <SET NW <GET .PTR ,P-LEXELEN>>)>
+ <COND (<EQUAL? .WRD ,W?ALL ,W?BOTH ,W?EVERYTHING>
+ <SETG P-GETFLAGS ,P-ALL>
+ <COND (<EQUAL? .NW ,W?OF>
+ <SET PTR <REST .PTR ,P-WORDLEN>>)>)
+ (<EQUAL? .WRD ,W?BUT ,W?EXCEPT>
+ <COND (<NOT <GET-OBJECT <OR .BUT .TBL>>>
+ <RFALSE>)>
+ <SET BUT ,P-BUTS>
+ <PUT .BUT ,P-MATCHLEN 0>)
+ (<BUZZER-WORD? .WRD>
+ <RFALSE>)
+ (<EQUAL? .WRD ,W?A ; ,W?ONE>
+ <COND (<ZERO? ,P-ADJ>
+ <SETG P-GETFLAGS ,P-ONE>
+ <COND (<EQUAL? .NW ,W?OF>
+ <SET PTR <REST .PTR ,P-WORDLEN>>)>)
+ (T
+ <SETG P-NAM .ONEOBJ>
+ <COND (<NOT <GET-OBJECT <OR .BUT .TBL>>>
+ <RFALSE>)>
+ <COND (<ZERO? .NW>
+ <RTRUE>)>)>)
+ (<AND <EQUAL? .WRD ,W?AND ,W?COMMA>
+ <NOT <EQUAL? .NW ,W?AND ,W?COMMA>>>
+ ;"Next SETG 6/21/84 for WHICH retrofix"
+ <SETG P-AND T>
+ <COND (<NOT <GET-OBJECT <OR .BUT .TBL>>>
+ <RFALSE>)>)
+ (<WT? .WRD ,PS?BUZZ-WORD>)
+ (<EQUAL? .WRD ,W?AND ,W?COMMA>)
+ (<EQUAL? .WRD ,W?OF>
+ <COND (<ZERO? ,P-GETFLAGS>
+ <SETG P-GETFLAGS ,P-INHIBIT>)>)
+ (<AND <WT? .WRD ,PS?ADJECTIVE>
+ <ZERO? ,P-ADJ>
+ <NOT <EQUAL? .NW ,W?OF>>> ; "FIX #41"
+ <SETG P-ADJ .WRD>)
+ (<WT? .WRD ,PS?OBJECT ;,P1?OBJECT>
+ <SETG P-NAM .WRD>
+ <SET ONEOBJ .WRD>)>)>
+ <COND (<NOT <EQUAL? .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 "OPT" (VRB T)
+ "AUX" (GCHECK <>) (OLEN 0)
+ BTS LEN XBITS TLEN OBJ ADJ X XTBL
+ TTBL TOBJ)
+ <SET XBITS ,P-SLOCBITS>
+ <SET TLEN <GET .TBL ,P-MATCHLEN>>
+ <COND (<BTST ,P-GETFLAGS ,P-INHIBIT>
+ <RTRUE>)>
+ <SET ADJ ,P-ADJ>
+ <COND (<AND <ZERO? ,P-NAM>
+ <T? ,P-ADJ>>
+ <COND (<WT? ,P-ADJ ,PS?OBJECT>
+ <SETG P-NAM ,P-ADJ>
+ <SETG P-ADJ <>>)
+ (<SET BTS <WT? ,P-ADJ ,PS?DIRECTION ,P1?DIRECTION>>
+ <SETG P-ADJ <>>
+ <PUT .TBL ,P-MATCHLEN 1>
+ <PUT .TBL 1 ,INTDIR>
+ <SETG P-DIRECTION .BTS>
+ <RTRUE>)>)>
+ <COND (<AND <ZERO? ,P-NAM>
+ <ZERO? ,P-ADJ>
+ <NOT <EQUAL? ,P-GETFLAGS ,P-ALL>>
+ <ZERO? ,P-GWIMBIT>>
+ <COND (<T? .VRB>
+ <NOT-IN-SENTENCE "enough nouns">)>
+ <RFALSE>)>
+ <COND (<OR <NOT <EQUAL? ,P-GETFLAGS ,P-ALL>>
+ <ZERO? ,P-SLOCBITS>>
+ <SETG P-SLOCBITS -1>)>
+ <SETG P-TABLE .TBL>
+ <PROG ()
+ <COND (<T? .GCHECK>
+ <GLOBAL-CHECK .TBL>)
+ (T
+ <DO-SL ,HERE ,SOG ,SIR>
+ <DO-SL ,WINNER ,SH ,SC>)>
+ <SET LEN <- <GET .TBL ,P-MATCHLEN> .TLEN>>
+ <COND (<BTST ,P-GETFLAGS ,P-ALL>)
+ (<AND <T? .LEN>
+ <BTST ,P-GETFLAGS ,P-ONE>>
+ <COND (<G? .LEN 1>
+ <PUT .TBL 1 <GET .TBL <RANDOM .LEN>>>
+ <TELL "[How about " THE <GET .TBL 1> "?]" CR>)>
+ <PUT .TBL ,P-MATCHLEN 1>)
+ (<OR <G? .LEN 1>
+ <AND <ZERO? .LEN>
+ <NOT <EQUAL? ,P-SLOCBITS -1>>>>
+ <COND (<EQUAL? ,P-SLOCBITS -1>
+ <SETG P-SLOCBITS .XBITS>
+ <SET OLEN .LEN>
+ <PUT .TBL ,P-MATCHLEN <- <GET .TBL ,P-MATCHLEN> .LEN>>
+ <AGAIN>)
+ (T
+ <PUT ,P-NAMW ,P-PHR ,P-NAM>
+ <PUT ,P-ADJW ,P-PHR ,P-ADJ>
+ <COND (<ZERO? .LEN>
+ <SET LEN .OLEN>)>
+ <COND (<AND <T? ,P-NAM>
+ <SET OBJ <GET .TBL <+ .TLEN 1>>>>
+ <SET TTBL <REST .TBL <* .TLEN 2>>>
+ <SET TOBJ <GET .TTBL 0>>
+ <PUT .TTBL 0 .LEN>
+ <SET OBJ <APPLY <GETP .OBJ ,P?GENERIC> .TTBL>>
+ <PUT .TTBL 0 .TOBJ>
+ <COND (<T? .OBJ>
+ <COND (<EQUAL? .OBJ ,NOT-HERE-OBJECT>
+ <RFALSE>)>
+ <SET X <+ .TLEN 1>>
+ <PUT .TBL .X ; <+ .TLEN 1> .OBJ>
+ <PUT .TBL ,P-MATCHLEN .X ; <+ .TLEN 1>>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RTRUE>)>)>
+ <COND (<AND <T? .VRB>
+ <NOT <EQUAL? ,WINNER ,PLAYER>>>
+ <DONT-UNDERSTAND>
+ <RFALSE>)
+ (<AND <T? .VRB>
+ <T? ,P-NAM>>
+ <SET XTBL ,P-OCL2>
+ <COND (<EQUAL? .TBL ,P-PRSO>
+ <SET XTBL ,P-OCL1>)>
+ <COND (<VERB? NAME>
+ <MORE-SPECIFIC>)
+ (<G? <GET .XTBL 0> 22>
+ <PUT .XTBL 0 0>
+ <NYMPH-APPEARS>
+ <TELL
+"Parser overflow! Please try something else">
+ <PRINT
+". Bye!\"| She disappears with a wink.|">)
+ (T
+ <WHICH-PRINT .TLEN .LEN .TBL>
+ <SETG P-ACLAUSE ,P-NC2>
+ <COND (<EQUAL? .TBL ,P-PRSO>
+ <SETG P-ACLAUSE ,P-NC1>)>
+ <SETG P-ANAM ,P-NAM>
+ <ORPHAN <> <>>
+ <SETG P-OFLAG T>)>)
+ (<T? .VRB>
+ <NOT-IN-SENTENCE "enough nouns">)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RFALSE>)>)
+ (<T? ,P-OFLAG>
+ <RFALSE>)
+ (<AND <ZERO? .LEN>
+ <T? .GCHECK>>
+ <PUT ,P-NAMW ,P-PHR ,P-NAM>
+ <PUT ,P-ADJW ,P-PHR ,P-ADJ>
+ <COND (<T? .VRB>
+ <SETG P-SLOCBITS .XBITS> ; "RETROFIX #33"
+ <OBJ-FOUND ,NOT-HERE-OBJECT .TBL>
+ <SETG P-XNAM ,P-NAM>
+ <SETG P-NAM <>>
+ <SETG P-XADJ ,P-ADJ>
+ <SETG P-ADJ <>>
+ <COND (<ZERO? ,LIT?>
+ <TOO-DARK>)>
+ <RTRUE>)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RFALSE>)
+ (<ZERO? .LEN>
+ <SET GCHECK T>
+ <AGAIN>)>
+ <SET X <GET .TBL <+ .TLEN 1>>>
+ <COND (<AND <T? ,P-ADJ>
+ <ZERO? ,P-NAM>
+ <T? .X>>
+ <TELL "[" THE .X ,BRACKET>)>
+ <SETG P-SLOCBITS .XBITS>
+ <PUT ,P-NAMW ,P-PHR ,P-NAM>
+ <PUT ,P-ADJW ,P-PHR ,P-ADJ>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RTRUE>>>
+
+<GLOBAL P-MOBY-FOUND <>>
+
+; <GLOBAL P-MOBY-FLAG <>> ; "Needed only for ZIL"
+
+"This MOBY-FIND works in ZIP only!"
+
+<CONSTANT LAST-OBJECT:OBJECT 0>
+
+<ROUTINE MOBY-FIND (TBL "AUX" OBJ LEN NAM ADJ X)
+ <SET OBJ 1>
+ <SET NAM ,P-NAM>
+ <SET ADJ ,P-ADJ>
+ <SETG P-NAM ,P-XNAM>
+ <SETG P-ADJ ,P-XADJ>
+ <PUT .TBL ,P-MATCHLEN 0>
+ <REPEAT ()
+ <COND (<AND <NOT <IN? .OBJ ,ROOMS>>
+ <THIS-IT? .OBJ>>
+ <OBJ-FOUND .OBJ .TBL>)>
+ <COND (<IGRTR? OBJ ,LAST-OBJECT>
+ <RETURN>)>>
+ <SET LEN <GET .TBL ,P-MATCHLEN>>
+ <COND (<EQUAL? .LEN 1>
+ <SETG P-MOBY-FOUND <GET .TBL 1>>)>
+ <SETG P-NAM .NAM>
+ <SETG P-ADJ .ADJ>
+ <RETURN .LEN>>
+
+"This MOBY-FIND works in both ZIL and ZIP."
+
+; <ROUTINE MOBY-FIND (TBL "AUX" (OBJ 1) LEN FOO NAM ADJ)
+ <SET NAM ,P-NAM>
+ <SET ADJ ,P-ADJ>
+ <SETG P-NAM ,P-XNAM>
+ <SETG P-ADJ ,P-XADJ>
+; <COND (<T? ,DEBUG>
+ <TELL "[MOBY-FIND called, P-NAM = " B ,P-NAM "]" CR>)>
+ <PUT .TBL ,P-MATCHLEN 0>
+ %<COND (<GASSIGNED? ZILCH> ; "ZIP case"
+ '<PROG ()
+ <REPEAT ()
+ <COND (<AND ; <SET FOO <META-LOC .OBJ T>>
+ <NOT <IN? .OBJ ,ROOMS>>
+ <SET FOO <THIS-IT? .OBJ>>>
+ <SET FOO <OBJ-FOUND .OBJ .TBL>>)>
+ <COND (<IGRTR? OBJ ,LAST-OBJECT>
+ <RETURN>)>>>)
+ (T ;"ZIL case"
+ '<PROG ()
+ <SETG P-SLOCBITS -1>
+ <COND (<SET FOO <FIRST? ,ROOMS>>
+ <REPEAT ()
+ <SEARCH-LIST .FOO .TBL ,P-SRCALL T>
+ <COND (<NOT <SET FOO <NEXT? .FOO>>>
+ <RETURN>)>>)>
+ <DO-SL ,LOCAL-GLOBALS 1 1 .TBL T>
+ <SEARCH-LIST ,ROOMS .TBL ,P-SRCTOP T>>)>
+ <COND (<EQUAL? <SET LEN <GET .TBL ,P-MATCHLEN>> 1>
+ <SETG P-MOBY-FOUND <GET .TBL 1>>)>
+ <SETG P-NAM .NAM>
+ <SETG P-ADJ .ADJ>
+ <RETURN .LEN>>
+
+<GLOBAL WHICH-PRINTING:FLAG <>>
+
+<ROUTINE WHICH-PRINT (TLEN LEN TBL "AUX" OBJ RLEN)
+ <SET RLEN .LEN>
+ <TELL "[Which">
+ <COND (<OR <T? ,P-OFLAG>
+ <T? ,P-MERGED>
+ <T? ,P-AND>>
+ <PRINTC ,SP>
+ <COND (<T? ,P-LASTADJ>
+ <TELL B ,P-LASTADJ C ,SP>)>
+ <PRINTB ,P-NAM>)
+ (<EQUAL? .TBL ,P-PRSO>
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L <>>)
+ (T
+ <CLAUSE-PRINT ,P-NC2 ,P-NC2L <>>)>
+ <TELL " do you mean,">
+ <SETG WHICH-PRINTING T>
+ <REPEAT ()
+ <INC TLEN>
+ <SET OBJ <GET .TBL .TLEN>>
+ <TELL C ,SP THE .OBJ>
+ <COND (<EQUAL? .LEN 2>
+ <COND (<NOT <EQUAL? .RLEN 2>>
+ <TELL ",">)>
+ <TELL " or">)
+ (<G? .LEN 2>
+ <TELL ",">)>
+ <COND (<DLESS? LEN 1>
+ <RETURN>)>>
+ <SETG WHICH-PRINTING <>>
+ <TELL "?]" CR>
+ <RTRUE>>
+
+<GLOBAL LAST-PSEUDO-LOC:OBJECT <>>
+
+<GLOBAL P-PNAM <>>
+<GLOBAL P-PADJN <>>
+
+<GLOBAL PSEUDO-PRSO?:FLAG <>> "T if original PRSO was PSEUDO-OBJECT."
+
+<OBJECT PSEUDO-OBJECT
+ (LOC GLOBAL-OBJECTS)
+ (DESC "that")
+ (SDESC DESCRIBE-PSEUDO-OBJECT)
+ (FLAGS NODESC NOARTICLE NOALL)
+ (ACTION ME-F)>
+
+<ROUTINE DESCRIBE-PSEUDO-OBJECT (OBJ)
+ <COND (<AND <T? ,P-PNAM>
+ <HERE? LAST-PSEUDO-LOC>>
+ <PRINTB ,P-PNAM>
+ <RTRUE>)>
+ <PRINTD ,PSEUDO-OBJECT>
+ <RTRUE>>
+
+<ROUTINE GLOBAL-CHECK (TBL "AUX" LEN RMG RMGL (CNT 0) OBJ OBITS X)
+ <SET LEN <GET .TBL ,P-MATCHLEN>>
+ <SET OBITS ,P-SLOCBITS>
+ <SET RMG <GETPT ,HERE ,P?GLOBAL>>
+ <COND (<T? .RMG>
+ <SET RMGL <RMGL-SIZE .RMG>>
+ <REPEAT ()
+ <SET OBJ <GET/B .RMG .CNT>>
+ <COND (<SET X <FIRST? .OBJ>>
+ <SEARCH-LIST .OBJ .TBL ,P-SRCALL>)>
+ <COND (<THIS-IT? .OBJ>
+ <OBJ-FOUND .OBJ .TBL>)>
+ <COND (<IGRTR? CNT .RMGL>
+ <RETURN>)>>)>
+ <SET RMG <GETP ,HERE ,P?THINGS>>
+ <COND (<T? .RMG>
+ <SET RMGL <GET .RMG 0>>
+ <SET CNT 0>
+ <REPEAT ()
+ <COND (<AND <EQUAL? ,P-NAM <GET .RMG <+ .CNT 1>>>
+ <OR <ZERO? ,P-ADJ>
+ <EQUAL? ,P-ADJ ; ,P-ADJN
+ <GET .RMG <+ .CNT 2>>>>>
+ <SETG P-PNAM ,P-NAM>
+ <COND (<T? ,P-ADJ>
+ <SETG P-PADJN ,P-ADJ ; ,P-ADJN>)
+ (T
+ <SETG P-PADJN <>>)>
+ <SETG LAST-PSEUDO-LOC ,HERE>
+ <UNMAKE ,PSEUDO-OBJECT ,NOARTICLE>
+ <PUTP ,PSEUDO-OBJECT
+ ,P?ACTION
+ <GET .RMG <+ .CNT 3>>>
+ ; <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>)>
+ <SET CNT <+ .CNT 3>>
+ <COND (<NOT <L? .CNT .RMGL>>
+ <RETURN>)>>)>
+ <COND (<EQUAL? <GET .TBL ,P-MATCHLEN> .LEN>
+ <SETG P-SLOCBITS -1>
+ <SETG P-TABLE .TBL>
+ <DO-SL ,GLOBAL-OBJECTS 1 1>
+ <SETG P-SLOCBITS .OBITS>
+ ; <COND (<ZERO? <GET .TBL ,P-MATCHLEN>>
+ <COND (<VERB? EXAMINE LOOK-ON LOOK-INSIDE FIND FOLLOW
+ LEAVE SEARCH SMELL WALK-TO THROUGH
+ WAIT-FOR>
+ <DO-SL ,ROOMS 1 1>)>)>)>>
+
+<CONSTANT P-SRCTOP 0>
+<CONSTANT P-SRCALL 1>
+<CONSTANT P-SRCBOT 2>
+
+<ROUTINE DO-SL (OBJ BIT1 BIT2)
+ <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>)>)>>
+
+<ROUTINE SEARCH-LIST (OBJ TBL LVL "AUX" X)
+ <COND (<SET OBJ <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<AND <NOT <EQUAL? .LVL ,P-SRCBOT>>
+ <THIS-IT? .OBJ>>
+ <OBJ-FOUND .OBJ .TBL>)>
+ <COND (<AND ; <NOT <EQUAL? .LVL ,P-SRCTOP>>
+ <NOT <EQUAL? .OBJ ,WINNER ,LOCAL-GLOBALS
+ ,GLOBAL-OBJECTS>>
+ <SET X <FIRST? .OBJ>>
+ <SEE-INSIDE? .OBJ>
+ ; <SEE-ANYTHING-IN? .OBJ>>
+ <SET X ,P-SRCTOP>
+ <COND (<IS? .OBJ ,SURFACE>
+ <SET X ,P-SRCALL>)>
+ <SEARCH-LIST .OBJ .TBL .X>)>
+ <COND (<NOT <SET OBJ <NEXT? .OBJ>>>
+ <RETURN>)>>)>
+ <RFALSE>>
+
+<ROUTINE THIS-IT? (OBJ "AUX" TBL LEN)
+ <COND (<AND <T? ,P-NAM>
+ <OR <NOT <SET TBL <GETPT .OBJ ,P?SYNONYM>>>
+ <NOT <SET LEN </ <PTSIZE .TBL> 2>>>
+ <NOT <SET LEN <INTBL? ,P-NAM .TBL .LEN>>>>>
+ <RFALSE>)
+ (<AND <T? ,P-ADJ>
+ <OR <NOT <SET TBL <GETPT .OBJ ,P?ADJECTIVE>>>
+ <NOT <SET LEN </ <PTSIZE .TBL> 2>>>
+ <NOT <SET LEN <INTBL? ,P-ADJ .TBL .LEN>>>>>
+ <RFALSE>)
+ (<AND <T? ,P-GWIMBIT>
+ <NOT <IS? .OBJ ,P-GWIMBIT>>>
+ <RFALSE>)
+ (T
+ <RTRUE>)>>
+
+<ROUTINE OBJ-FOUND (OBJ TBL "AUX" PTR)
+ <SET PTR <GET .TBL ,P-MATCHLEN>>
+ <INC PTR>
+ <PUT .TBL .PTR .OBJ>
+ <PUT .TBL ,P-MATCHLEN .PTR>
+ <RFALSE>>
+
+; <ROUTINE TAKE-CHECK ()
+ <COND (<AND <ITAKE-CHECK ,P-PRSO <GETB ,P-SYNTAX ,P-SLOC1>>
+ <ITAKE-CHECK ,P-PRSI <GETB ,P-SYNTAX ,P-SLOC2>>>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE ITAKE-CHECK (TBL BITS "AUX" PTR LEN OBJ L GOT-IT TOOK-IT)
+ <SET PTR 1>
+ <SET LEN <GET .TBL ,P-MATCHLEN>>
+ <COND (<ZERO? .LEN>
+ <RTRUE>)
+ (<OR <BTST .BITS ,SHAVE>
+ <BTST .BITS ,STAKE>>
+ <REPEAT ()
+ <SET OBJ <GET .TBL .PTR>>
+ <COND (<EQUAL? .OBJ ,IT>
+ <COND (<NOT <ACCESSIBLE? ,P-IT-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)>
+ <SET OBJ ,P-IT-OBJECT>)
+ (<EQUAL? .OBJ ,THEM>
+ <COND (<NOT <ACCESSIBLE? ,P-THEM-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)>
+ <SET OBJ ,P-THEM-OBJECT>)
+ (<EQUAL? .OBJ ,HER>
+ <COND (<NOT <ACCESSIBLE? ,P-HER-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)>
+ <SET OBJ ,P-HER-OBJECT>)
+ (<EQUAL? .OBJ ,HIM>
+ <COND (<NOT <ACCESSIBLE? ,P-HIM-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)>
+ <SET OBJ ,P-HIM-OBJECT>)>
+ <COND (<AND <NOT <EQUAL? .OBJ ,WINNER ,HANDS ,FEET>>
+ <NOT <EQUAL? .OBJ ,ME ,YOU ,ROOMS>>
+ <NOT <EQUAL? .OBJ ,INTDIR ,RIGHT ,LEFT>>
+ <NOT <EQUAL? .OBJ ,MONEY>>
+ <NOT <HELD? .OBJ>>
+ ; <NOT <IN? .OBJ ,WINNER>>>
+ <SETG PRSO .OBJ>
+ <SET L <LOC .OBJ>>
+ <SET GOT-IT 0>
+ <SET TOOK-IT 0>
+ <COND (<ZERO? .L>)
+ (<AND <IS? .OBJ ,TRYTAKE>
+ <NOT <IS? .OBJ ,TAKEABLE>>>
+ <COND (<AND <BTST .BITS ,SHAVE>
+ <IN? .L ,WINNER>>
+ <INC GOT-IT>)>)
+ ; (<NOT <EQUAL? ,WINNER ,PLAYER>>)
+ (<AND <ZERO? ,P-MULT?>
+ ; <BTST .BITS ,STAKE>
+ <IN? .L ,WINNER>
+ ; <OR <IN? .L ,WINNER>
+ <IN? ,WINNER .L>>
+ <ITAKE <>>>
+ <INC GOT-IT>
+ <INC TOOK-IT>)
+ (<AND <EQUAL? .L ,WINNER>
+ <BTST .BITS ,SHAVE>>
+ <INC GOT-IT>)>
+ <COND (<AND <ZERO? .GOT-IT>
+ <BTST .BITS ,SHAVE>>
+ <WINNER-NOT-HOLDING>
+ <COND (<AND <EQUAL? .LEN .PTR>
+ <T? ,P-MULT?>>
+ <TELL "all of those things">)
+ (<EQUAL? .OBJ ,NOT-HERE-OBJECT>
+ <THIS-IS-IT .OBJ>
+ <TELL D .OBJ>)
+ (T
+ <THIS-IS-IT .OBJ>
+ <COND (<IS? .OBJ ,PLURAL>
+ <TELL "any ">)
+ (<NOT <IS? .OBJ ,NOARTICLE>>
+ <COND (<IS? .OBJ ,PROPER>
+ <TELL ,LTHE>)
+ (<IS? .OBJ ,VOWEL>
+ <TELL "an ">)
+ (T
+ <TELL "a ">)>)>
+ <TELL D .OBJ>)>
+ <PRINT ,PERIOD>
+ <RFALSE>)
+ (<AND <T? .GOT-IT>
+ <T? .TOOK-IT>
+ ; <BTST .BITS ,STAKE>
+ <EQUAL? ,WINNER ,PLAYER>>
+ <TAKING-OBJ-FIRST .OBJ>)>)>
+ <COND (<IGRTR? PTR .LEN>
+ <RTRUE>)>>)>
+ <RTRUE>>
+
+<ROUTINE HELD? ("OPT" (OBJ ,PRSO) "AUX" L)
+ <COND (<ZERO? .OBJ>
+ <RFALSE>)
+ (<IS? .OBJ ,TAKEABLE>)
+ (<NOT <IS? .OBJ ,TRYTAKE>>
+ <RFALSE>)>
+ <SET L <LOC .OBJ>>
+ <COND (<EQUAL? .L <> ,ROOMS ,GLOBAL-OBJECTS>
+ <RFALSE>)
+ (<EQUAL? .L ,WINNER>
+ <RTRUE>)>
+ <RETURN <HELD? .L>>>
+
+<ROUTINE TAKING-OBJ-FIRST (OBJ "AUX" L)
+ <SET L <LOC .OBJ>>
+ <TELL "[taking " THE .OBJ>
+ <COND (<NOT <EQUAL? .L ,HERE <LOC ,WINNER> <>>>
+ <OUT-OF-LOC .L>)>
+ <TELL " first" ,BRACKET>
+ <SPARK? <> .OBJ>
+ <RFALSE>>
+
+; <ROUTINE ITAKE-CHECK (TBL BITS "AUX" PTR OBJ TAKEN L)
+ <SET PTR <GET .TBL ,P-MATCHLEN>>
+ <COND (<AND <T? .PTR>
+ <OR <BTST .BITS ,SHAVE>
+ <BTST .BITS ,STAKE>>>
+ <REPEAT ()
+ <COND (<DLESS? PTR 0>
+ <RETURN>)>
+ ; <COND (<L? <DEC PTR> 0>
+ <RETURN>)>
+ <SET OBJ <GET .TBL <+ .PTR 1>>>
+ <COND (<EQUAL? .OBJ ,IT>
+ <COND (<NOT <ACCESSIBLE? ,P-IT-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-IT-OBJECT>)>)
+ (<EQUAL? .OBJ ,HER>
+ <COND (<NOT <ACCESSIBLE? ,P-HER-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-HER-OBJECT>)>)
+ (<EQUAL? .OBJ ,HIM>
+ <COND (<NOT <ACCESSIBLE? ,P-HIM-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-HIM-OBJECT>)>)
+ (<EQUAL? .OBJ ,THEM>
+ <COND (<NOT <ACCESSIBLE? ,P-THEM-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-THEM-OBJECT>)>)>
+ <COND (<AND <NOT <HELD? .OBJ>>
+ <NOT <EQUAL? .OBJ ,HANDS ,FEET>>>
+ <SETG PRSO .OBJ>
+ <SET L <LOC .OBJ>>
+ <COND (<ZERO? .L>
+ <SET TAKEN T>)
+ (<AND <IS? .OBJ ,TRYTAKE>
+ <NOT <IS? .OBJ ,TAKEABLE>>>
+ <SET TAKEN T>)
+ (<NOT <EQUAL? ,WINNER ,PLAYER>>
+ <SET TAKEN <>>)
+ (<AND <BTST .BITS ,STAKE>
+ <IN? .L ,WINNER>
+ <ZERO? ,P-MULT?>
+ <ITAKE <>>>
+ <SET TAKEN <>>)
+ (<AND <BTST .BITS ,SHAVE>
+ <EQUAL? .L ,WINNER>>
+ <SET TAKEN <>>)
+ (T
+ <SET TAKEN T>)>
+ <COND (<AND <T? .TAKEN>
+ <BTST .BITS ,SHAVE>>
+ <WINNER-NOT-HOLDING>
+ <COND (<L? 1 <GET .TBL ,P-MATCHLEN>>
+ <TELL "all of those things">)
+ (<EQUAL? .OBJ ,NOT-HERE-OBJECT>
+ <TELL D ,NOT-HERE-OBJECT>)
+ (T
+ <THIS-IS-IT .OBJ>
+ <COND (<IS? .OBJ ,PLURAL>
+ <TELL "any ">)
+ (<NOT <IS? .OBJ ,NOARTICLE>>
+ <TELL ,LTHE>)>
+ <TELL D .OBJ>)>
+ <PRINT ,PERIOD>
+ <RFALSE>)
+ (<AND <ZERO? .TAKEN>
+ <EQUAL? ,WINNER ,PLAYER>>
+ <TELL "[taking " THEO>
+ <COND (<T? .L>
+ <OUT-OF-LOC .L>)>
+ <TELL " first" ,BRACKET>
+ <SPARK? <>>)>)>>)
+ (T
+ <RTRUE>)>>
+
+<ROUTINE MANY-CHECK ("AUX" (LOSS <>) TMP)
+ <COND (<AND <G? <GET ,P-PRSO ,P-MATCHLEN> 1>
+ <NOT <BTST <GETB ,P-SYNTAX ,P-SLOC1> ,SMANY>>>
+ <SET LOSS 1>)
+ (<AND <G? <GET ,P-PRSI ,P-MATCHLEN> 1>
+ <NOT <BTST <GETB ,P-SYNTAX ,P-SLOC2> ,SMANY>>>
+ <SET LOSS 2>)>
+ <COND (<T? .LOSS>
+ <PRINTC %<ASCII !\[>>
+ <TELL ,CANT "refer to more than one object at a time with \"">
+ <SET TMP <GET ,P-ITBL ,P-VERBN>>
+ <COND (<ZERO? .TMP>
+ <TELL B ,W?TELL>)
+ (<OR <T? ,P-OFLAG>
+ <T? ,P-MERGED>>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>)>
+ <TELL ".\"]" CR>
+ <RFALSE>)
+ (T
+ <RTRUE>)>>
+
+<ROUTINE SAY-IF-HERE-LIT ()
+ <SETG LIT? <IS-LIT?>>
+ <COND (<ZERO? ,LIT?>
+ <SETG P-CONT <>>
+ <SETG OLD-HERE <>>
+ <SETG P-WALK-DIR <>>
+ <RELOOK T>)>
+ <RTRUE>>
+
+<ROUTINE LIGHT-ROOM-WITH (SOURCE)
+ <MAKE .SOURCE ,LIGHTED>
+ <REPLACE-ADJ? .SOURCE ,W?DARK ,W?LIGHTED>
+ <COND (<T? ,LIT?>
+ <RFALSE>)
+ (<VISIBLE? .SOURCE>
+ <SETG LIT? T>
+ <SETG P-CONT <>>
+ <SETG OLD-HERE <>>
+ <CRLF>
+ <V-LOOK>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE IS-LIT? ("OPT" (RM ,HERE) (RMBIT T) "AUX" (LIT 0) OHERE)
+ <COND (<AND <T? ,ALWAYS-LIT?>
+ <EQUAL? ,WINNER ,PLAYER>>
+ <RTRUE>)>
+ <SETG P-GWIMBIT ,LIGHTED>
+ <SET OHERE ,HERE>
+ <SETG HERE .RM>
+ <COND (<AND <T? .RMBIT>
+ <IS? .RM ,LIGHTED>>
+ <INC LIT>)
+ (T
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <SETG P-TABLE ,P-MERGE>
+ <SETG P-SLOCBITS -1>
+ <COND (<EQUAL? .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>
+ <INC LIT>)>)>
+ <SETG HERE .OHERE>
+ <SETG P-GWIMBIT 0>
+ <RETURN .LIT>>
+
+<ROUTINE DONT-HAVE? ("OPT" (OBJ ,PRSO) "AUX" L O)
+ <SET L <LOC .OBJ>>
+ <COND (<ZERO? .L>)
+ (<EQUAL? .L ,WINNER>
+ <RFALSE>)
+ (<AND <IN? .L ,PLAYER>
+ <EQUAL? ,WINNER ,PLAYER>>
+ <SET O ,PRSO>
+ <SETG PRSO .OBJ>
+ <COND (<ITAKE <>>
+ <TELL "[taking " THEO>
+ <OUT-OF-LOC .L>
+ <TELL " first" ,BRACKET>
+ <SPARK? <>>
+ <SETG PRSO .O>
+ <THIS-IS-IT ,PRSO>
+ <RFALSE>)>
+ <SETG PRSO .O>
+ <TAKE-FIRST .OBJ .L>
+ <RTRUE>)>
+ <WINNER-NOT-HOLDING>
+ <COND (<T? .OBJ>
+ <COND (<IS? .OBJ ,PLURAL>
+ <TELL "any ">)>
+ <TELL THE .OBJ>)
+ (T
+ <TELL D ,NOT-HERE-OBJECT>)>
+ <PRINT ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE TAKE-FIRST (OBJ1 OBJ2)
+ <TELL "You'd have to take " THE .OBJ1>
+ <OUT-OF-LOC .OBJ2>
+ <TELL ,SFIRST>
+ <RTRUE>>
+
+<ROUTINE OUT-OF-LOC (L)
+ <TELL C ,SP>
+ <COND (<EQUAL? .L ,HERE>
+ <TELL "off the ">
+ <GROUND-WORD>
+ <RTRUE>)>
+ <COND (<EQUAL? .L ,PLAYER>
+ <TELL "away from you">
+ <RTRUE>)
+ (<IS? .L ,LIVING>
+ <TELL "away from">)
+ (<EQUAL? .L ,ARCH>
+ <TELL "out from under">)
+ (<IS? .L ,CONTAINER>
+ <TELL "out of">)
+ (<IS? .L ,SURFACE>
+ <TELL B ,W?OFF>)
+ (T
+ <TELL B ,W?FROM>)>
+ <TELL C ,SP THE .L>
+ <RTRUE>>
+
+<ROUTINE SAY-WHERE (L)
+ <COND (<EQUAL? .L ,PLAYER>
+ <TELL "in " 'HANDS "s">
+ <RTRUE>)
+ (<EQUAL? .L ,HERE>
+ <TELL "in front of you">
+ <RTRUE>)
+ (<EQUAL? .L ,MCASE ,BCASE ,WCASE>
+ <TELL B ,W?IN>)
+ (<IS? .L ,SURFACE>
+ <TELL B ,W?ON>)
+ (<IS? .L ,CONTAINER>
+ <TELL B ,W?IN>)
+ (T
+ <TELL B ,W?WITH>)>
+ <TELL C ,SP THE .L>
+ <RTRUE>>
+
+<ROUTINE WINNER-NOT-HOLDING ()
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <TELL "You're not holding ">
+ <RTRUE>)>
+ <TELL CTHE ,WINNER " do">
+ <COND (<NOT <IS? ,WINNER ,PLURAL>>
+ <TELL "es">)>
+ <TELL "n't have ">
+ <RTRUE>>
+
+<OBJECT NOT-HERE-OBJECT
+ (DESC "that")
+ (FLAGS NODESC NOARTICLE)
+ (ACTION NOT-HERE-OBJECT-F)>
+
+<ROUTINE NOT-HERE-OBJECT-F ("AUX" (PRSO? T) TBL OBJ LEN)
+ <COND (<AND <PRSO? NOT-HERE-OBJECT>
+ <PRSI? NOT-HERE-OBJECT>>
+ <TELL "Those things aren't here." CR>
+ <RTRUE>)
+ (<PRSO? NOT-HERE-OBJECT>
+ <SET TBL ,P-PRSO>)
+ (T
+ <SET TBL ,P-PRSI>
+ <SET PRSO? <>>)>
+
+ <COND (<T? .PRSO?>
+ <COND (<VERB? ; WALK-TO ; FOLLOW FIND WHO WHAT WHERE BUY
+ WAIT-FOR ; PHONE>
+ <SET OBJ <FIND-NOT-HERE .TBL .PRSO?>>
+ <COND (<T? .OBJ>
+ <COND (<NOT <EQUAL? .OBJ ,NOT-HERE-OBJECT>>
+ <RFATAL>)>)
+ (T
+ <RFALSE>)>)>)
+ (T
+ <COND (<VERB? TELL-ABOUT ASK-ABOUT ASK-FOR>
+ <SET OBJ <FIND-NOT-HERE .TBL .PRSO?>>
+ <COND (<T? .OBJ>
+ <COND (<NOT <EQUAL? .OBJ ,NOT-HERE-OBJECT>>
+ <RFATAL>)>)
+ (T
+ <RFALSE>)>)>)>
+
+ <TELL ,CANT>
+ <COND (<VERB? LISTEN>
+ <TELL B ,W?HEAR>)
+ (<VERB? SMELL>
+ <TELL B ,W?SMELL>)
+ (T
+ <TELL B ,W?SEE>)>
+ <SET LEN <GET ,CAPS 0>>
+ <COND (<NOT <SET LEN <INTBL? ,P-XNAM <REST ,CAPS 2> .LEN>>>
+ <TELL " any">)>
+ <NOT-HERE-PRINT .PRSO?>
+ <TELL " here." CR>
+ <PCLEAR>
+ <RFATAL>>
+
+<ROUTINE FIND-NOT-HERE (TBL PRSO? "AUX" M-F OBJ)
+ <SET M-F <MOBY-FIND .TBL>>
+ <COND (<EQUAL? .M-F 1>
+ <COND (<T? .PRSO?>
+ <SETG PRSO ,P-MOBY-FOUND>
+ <RFALSE>)>
+ <SETG PRSI ,P-MOBY-FOUND>
+ <RFALSE>)
+ (<AND <G? .M-F 1>
+ <SET OBJ <GET .TBL 1>>
+ <SET OBJ <APPLY <GETP .OBJ ,P?GENERIC> .TBL>>>
+ <COND (<EQUAL? .OBJ <> ,NOT-HERE-OBJECT>
+ <RTRUE>)
+ (<T? .PRSO?>
+ <SETG PRSO .OBJ>
+ <RFALSE>)>
+ <SETG PRSI .OBJ>
+ <RFALSE>)
+ (<VERB? ASK-ABOUT TELL-ABOUT ASK-FOR WHO WHAT WHERE
+ FIND FOLLOW TELL>
+ <RFALSE>)
+ (<ZERO? .PRSO?>
+ <TELL "You wouldn't find any">
+ <NOT-HERE-PRINT .PRSO?>
+ <TELL " there." CR>
+ <RTRUE>)
+ (T
+ <RETURN ,NOT-HERE-OBJECT>)>>
+
+<ROUTINE NOT-HERE-PRINT ("OPT" (PRSO? <>) "AUX" X)
+ <COND (<OR <T? ,P-OFLAG>
+ <T? ,P-MERGED>>
+ <COND (<T? ,P-XADJ>
+ <TELL C ,SP B ,P-XADJ>)>
+ <COND (<T? ,P-XNAM>
+ <TELL C ,SP B ,P-XNAM>)>
+ <RFALSE>)
+ (<T? .PRSO?>
+ <SET X <GET ,P-ITBL ,P-NC1>>
+ <BUFFER-PRINT .X <GET ,P-ITBL ,P-NC1L> <>>
+ <RFALSE>)
+ (T
+ <SET X <GET ,P-ITBL ,P-NC2>>
+ <BUFFER-PRINT .X <GET ,P-ITBL ,P-NC2L> <>>
+ <RFALSE>)>>
+
+<OBJECT C-OBJECT>
+
+<ROUTINE CONTENTS ("OPT" (THING ,PRSO) (SAY-OR <>)
+ "AUX" OBJ NXT (1ST? T) (IT? <>) (TWO? <>))
+ <COND (<SET OBJ <FIRST? .THING>>
+ <REPEAT ()
+ <SET NXT <NEXT? .OBJ>>
+ <COND (<OR <EQUAL? .OBJ ,WINNER>
+ <IS? .OBJ ,NODESC>>
+ <MOVE .OBJ ,C-OBJECT>)>
+ <SET OBJ .NXT>
+ <COND (<ZERO? .OBJ>
+ <RETURN>)>>)>
+ <SET OBJ <FIRST? .THING>>
+ <COND (<ZERO? .OBJ>
+ <TELL "nothing " <PICK-NEXT ,YAWNS>>)
+ (T
+ <REPEAT ()
+ <COND (<T? .OBJ>
+ <SET NXT <NEXT? .OBJ>>
+ <COND (<T? .1ST?>
+ <SET 1ST? <>>)
+ (T
+ <COND (<T? .NXT>
+ <TELL ", ">)
+ (<T? .SAY-OR>
+ <TELL " or ">)
+ (T
+ <TELL ,AND>)>)>
+ <SETG DESCING .OBJ>
+ <TELL A .OBJ>
+ <COND (<AND <EQUAL? .OBJ ,GOBLET>
+ <IN? ,BFLY .OBJ>
+ <IS? ,BFLY ,LIVING>>
+ <TELL ,WITH A ,BFLY>
+ <PRINT " resting on the rim">)>
+ <COND (<AND <EQUAL? .THING ,WINNER>
+ <IS? .OBJ ,WIELDED>>
+ <TELL " (wielded)">)>
+ ; <COND (<IS? .OBJ ,LIGHTED>
+ <TELL " (providing light)">)>
+ <COND (<AND <ZERO? .IT?>
+ <ZERO? .TWO?>>
+ <SET IT? .OBJ>)
+ (T
+ <SET TWO? T>
+ <SET IT? <>>)>
+ <SET OBJ .NXT>)
+ (T
+ <COND (<AND <T? .IT?>
+ <ZERO? .TWO?>>
+ <THIS-IS-IT .IT?>)>
+ <RETURN>)>>)>
+ <SETG DESCING <>>
+ <MOVE-ALL ,C-OBJECT .THING>
+ <RTRUE>>
+
+<ROUTINE MOVE-ALL (FROM TO "OPT" EXCEPT "AUX" OBJ NXT)
+ <COND (<SET OBJ <FIRST? .FROM>>
+ <REPEAT ()
+ <SET NXT <NEXT? .OBJ>>
+ <COND (<OR <NOT <ASSIGNED? EXCEPT>>
+ <NOT <IS? .OBJ .EXCEPT>>>
+ <MOVE .OBJ .TO>)>
+ <SET OBJ .NXT>
+ <COND (<ZERO? .OBJ>
+ <RTRUE>)>>)>
+ <RFALSE>>
+
+"Note that the object to be searched is the FIRST parameter expected in this
+ version of GLOBAL-IN? ... allowing optional target objects."
+
+<ROUTINE GLOBAL-IN? (SOURCE OBJ1 "OPT" OBJ2 OBJ3 "AUX" LEN X)
+ <SET SOURCE <GETPT .SOURCE ,P?GLOBAL>>
+ <COND (<ZERO? .SOURCE>
+ <RFALSE>)>
+ <SET LEN </ <PTSIZE .SOURCE> 2>>
+ <COND (<SET X <INTBL? .OBJ1 .SOURCE .LEN>>
+ <RTRUE>)
+ (<NOT <ASSIGNED? OBJ2>>
+ <RFALSE>)
+ (<SET X <INTBL? .OBJ2 .SOURCE .LEN>>
+ <RTRUE>)
+ (<NOT <ASSIGNED? OBJ3>>
+ <RFALSE>)
+ (<SET X <INTBL? .OBJ3 .SOURCE .LEN>>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+; <ROUTINE GLOBAL-IN? (OBJ1 OBJ2 "AUX" TBL)
+ <SET TBL <GETPT .OBJ2 ,P?GLOBAL>>
+ <COND (<T? .TBL>
+ <INTBL? .OBJ1 .TBL </ <PTSIZE .TBL> 2>>
+ ; <ZMEMQ .OBJ1 .TBL <RMGL-SIZE .TBL>>)>>
+
+<CONSTANT AUX-TABLE-LENGTH 82>
+<GLOBAL AUX-TABLE:TABLE <ITABLE ,AUX-TABLE-LENGTH (BYTE) 0>>
+
+<ROUTINE READ-LEXV ("AUX" KEY TBL LEN ILEN X Y CNT PTR DEST OFFSET
+ PAGE-SIZE LAST-PAGE)
+ <SET PAGE-SIZE <- ,DHEIGHT 2>>
+ <SET LAST-PAGE <- ,MAX-HEIGHT ,DHEIGHT>>
+ <COPYT ,P-INBUF 0 ,P-INBUF-LENGTH>
+ <PUTB ,P-INBUF 0 %<- ,P-INBUF-LENGTH 2>>
+ <COPYT ,P-LEXV 0 ,P-LEXV-LENGTH>
+ <PUTB ,P-LEXV 0 ,LEXMAX>
+
+
+ <REPEAT ()
+ <COLOR ,INCOLOR ,BGND>
+ <SET KEY <READ ,P-INBUF 0>>
+ <COND (<EQUAL? .KEY ,EOL ,LF>
+ <DO-LEX>
+ <RFALSE>)>
+ <SET TBL <>>
+ <SET ILEN <GETB ,P-INBUF 1>>
+ <SET DEST <REST ,P-INBUF <+ .ILEN 2>>>
+ <SET OFFSET 0>
+ <COND (<AND <G? .KEY ,PAD0>
+ <L? .KEY %<+ ,PAD9 1>>>
+ <SET TBL <KEYPAD .KEY>>
+ <COND (<ZERO? .TBL>
+ <SOUND ,S-BOOP>
+ <AGAIN>)>)
+ (<ZERO? ,DMODE>)
+ (<EQUAL? .KEY ,CLICK1 ,CLICK2>
+ <SET Y <LOWCORE MSLOCY>>
+ <SET X <LOWCORE MSLOCX>>
+ <COND (<G? ,CWIDTH 1>
+ <DEC X>
+ <SET X </ .X ,CWIDTH>>
+ <INC X>)>
+ <COND (<G? ,CHEIGHT 1>
+ <DEC Y>
+ <SET Y </ .Y ,CHEIGHT>>
+ <INC Y>)>
+ <COND (<G? .Y %<+ ,MHEIGHT 1>>
+ <AGAIN>)
+ (<L? .X ,MOUSEDGE>
+ <AGAIN>)>
+ <SET TBL <CLICKED .KEY .Y .X>>
+ <COND (<ZERO? .TBL>
+ <SOUND ,S-BOOP>
+ <AGAIN>)>)
+ (<EQUAL? .KEY ,UP-ARROW ,MAC-UP-ARROW>
+ <COND (<ZERO? ,DBOX-TOP>
+ <SOUND 2>
+ <AGAIN>)>
+ <SETG DBOX-TOP <- ,DBOX-TOP .PAGE-SIZE>>
+ <COND (<L? ,DBOX-TOP 0>
+ <SETG DBOX-TOP 0>)>
+ <DISPLAY-DBOX>
+ <AGAIN>)
+ (<EQUAL? .KEY ,DOWN-ARROW ,MAC-DOWN-ARROW>
+ <SET X <- ,DBOX-LINES ,DHEIGHT>>
+ <COND (<OR <BTST ,IN-DBOX ,SHOWING-STATS>
+ <G? ,DBOX-TOP .X>
+ <G? ,DBOX-TOP <- .LAST-PAGE 1>>>
+ <SOUND 2>
+ <AGAIN>)>
+ <INC X>
+ <SETG DBOX-TOP <+ ,DBOX-TOP .PAGE-SIZE>>
+ <COND (<G? ,DBOX-TOP .X>
+ <SETG DBOX-TOP .X>)
+ (<G? ,DBOX-TOP .LAST-PAGE>
+ <SETG DBOX-TOP .LAST-PAGE>)>
+ <DISPLAY-DBOX>
+ <AGAIN>)>
+ <COND (<AND <G? .KEY %<- ,F1 1>>
+ <L? .KEY %<+ ,F10 1>>>
+ <SET TBL <GET ,SOFT-KEYS <- .KEY ,F1>>>)>
+ <COND (<ZERO? .TBL>
+ <AGAIN>)>
+ <SET LEN <GETB .TBL 1>>
+ <COND (<ZERO? .LEN>
+ <SOUND ,S-BOOP>
+ <AGAIN>)
+ (<ZERO? .ILEN>)
+ (<G? .LEN <- %<- ,P-INBUF-LENGTH 6> .ILEN>>
+ <SOUND ,S-BOOP>
+ <AGAIN>)
+ (<NOT <EQUAL? <GETB <BACK .DEST 1> 0> ,SP>>
+ <PUTB .DEST 0 ,SP>
+ <INC DEST>
+ <INC OFFSET>
+ <BUFOUT <>>
+ <TELL C ,SP>)>
+ <BUFOUT <>>
+ <SHOW-TABLE .TBL .LEN>
+ <SET TBL <REST .TBL 2>>
+ <SET PTR 0>
+ <SET CNT <- .LEN 1>>
+ <REPEAT ()
+ <SET X <GETB .TBL .PTR>>
+ <COND (<OR <EQUAL? .X ,EOL ,LF>
+ <EQUAL? .X %<ASCII !\|> %<ASCII !\!>>>
+ <BUFOUT T>
+ <PUTB .DEST .PTR 0>
+ <SET LEN <+ <+ .PTR .ILEN> .OFFSET>>
+ <PUTB ,P-INBUF 1 .LEN>
+ <DO-LEX>
+ <RFALSE>)>
+ <PUTB .DEST .PTR .X>
+ <COND (<IGRTR? PTR .CNT>
+ <RETURN>)>>
+ <TELL C ,SP>
+ <BUFOUT T>
+ <PUTB .DEST .PTR ,SP>
+ <INC OFFSET>
+ <SET LEN <+ <+ .LEN .ILEN> .OFFSET>>
+ <PUTB ,P-INBUF 1 .LEN>>>
+
+<ROUTINE DO-LEX ()
+ <LEX ,P-INBUF ,P-LEXV>
+ <LEX ,P-INBUF ,P-LEXV ,VOCAB2 1>
+ <COLOR ,FORE ,BGND>
+ <RFALSE>>
+
+<ROUTINE SHOW-TABLE (TBL LEN "AUX" PTR CHAR)
+ <SET PTR 2>
+ <INC LEN>
+ <REPEAT ()
+ <SET CHAR <GETB .TBL .PTR>>
+ <COND (<OR <EQUAL? .CHAR ,EOL ,LF>
+ <EQUAL? .CHAR %<ASCII !\|> %<ASCII !\!>>>
+ <CRLF>
+ <RFALSE>)
+ (<AND <G? .CHAR %<- <ASCII !\a> 1>>
+ <L? .CHAR %<+ <ASCII !\z> 1>>>
+ <SET CHAR <- .CHAR ,SP>>)>
+ <PRINTC .CHAR>
+ <COND (<IGRTR? PTR .LEN>
+ <RFALSE>)>>>
+
+<ROUTINE CLICKED (CLK Y X "AUX" NX NY DIR TMP MX MY)
+
+ ; "Zero-align X and Y."
+
+ <SET X <- .X ,MOUSEDGE 1>>
+ <DEC Y>
+
+ ; "Get direction of mouse relative to HERE."
+
+ ; "Changed per TAA. Instead of using COMPASS, we do
+ computation. Cardinal directions happen if one coordinate
+ is L=? half of the other. Otherwise do nw, etc."
+ <COND (<AND <EQUAL? .Y ,MAPY>
+ <EQUAL? .X ,MAPX>>
+ ; "We're in the same room, so check for up/down"
+ <SET DIR <GETB <REST ,MAP <* ,MAPY ,MWIDTH>> ,MAPX>>
+ <COND (<EQUAL? .DIR ,IUARROW ,UARROW>
+ <SET DIR ,I-U>)
+ (<EQUAL? .DIR ,IDARROW ,DARROW>
+ <SET DIR ,I-D>)
+ (T
+ <RFALSE>)>)
+ (T
+ <SET NX <- .X ,MAPX>>
+ ; "Get position relative to current"
+ ;<COND (<ZERO? .NX>)
+ (<G? .NX ,CENTERX>
+ <SET X <- .X ,CENTERX>>)
+ (<L? .NX ,NCENTERX>
+ <SET X <+ .X ,CENTERX>>)>
+ ;<SET NX <+ .X <- ,CENTERX ,MAPX>>>
+
+ <SET NY <- .Y ,MAPY>>
+ ;<COND (<ZERO? .NY>)
+ (<G? .NY ,CENTERY>
+ <SET Y <- .Y ,CENTERY>>)
+ (<L? .NY ,NCENTERY>
+ <SET Y <+ .Y ,CENTERY>>)>
+ ;<SET NY <+ .Y <- ,CENTERY ,MAPY>>>
+
+ ;<SET DIR <GETB <REST ,COMPASS <* .NY %<+ ,MWIDTH 1>>> .NX>>
+ ; "Get magnitude of X and Y difference"
+ <COND (<L? .NY 0>
+ <SET MY <- .NY>>)
+ (T
+ <SET MY .NY>)>
+ <COND (<L? .NX 0>
+ <SET MX <- .NX>>)
+ (T
+ <SET MX .NX>)>
+ <COND (<AND <0? .MX> <0? .MY>>
+ <SET DIR ,AMB>)
+ (<L=? <* 3 .MX> .MY>
+ ; "X is small compared to Y, so this is N/S"
+ <COND (<G? .NY 0>
+ ; "Mouse is below current loc"
+ <SET DIR ,I-SOUTH>)
+ (T
+ <SET DIR ,I-NORTH>)>)
+ (<L=? <* 2 .MY> .MX>
+ ; "Y is small compared to X, so this is E/W"
+ <COND (<G? .NX 0>
+ <SET DIR ,I-EAST>)
+ (T
+ <SET DIR ,I-WEST>)>)
+ (<G? .NX 0>
+ ; "Tending eastward"
+ <COND (<G? .NY 0>
+ <SET DIR ,I-SE>)
+ (T
+ <SET DIR ,I-NE>)>)
+ (<G? .NY 0>
+ <SET DIR ,I-SW>)
+ (T
+ <SET DIR ,I-NW>)>)>
+
+
+ <COND (<EQUAL? .DIR ,AMB> ; "DIR ambiguous."
+ <RFALSE>)>
+
+ <TABLE-WALK <GET ,DIR-NAMES .DIR>>
+ <RETURN ,AUX-TABLE>>
+
+<ROUTINE TABLE-WALK (WRD)
+ <PUT ,AUX-TABLE 0 0>
+ <DIROUT ,D-TABLE-ON ,AUX-TABLE>
+ <COND (<EQUAL? .WRD ,W?AROUND>
+ <TELL "walk ">)>
+ <TELL B .WRD CR>
+ <DIROUT ,D-TABLE-OFF>
+ <PUTB ,AUX-TABLE 1 <GET ,AUX-TABLE 0>>
+ <RFALSE>>
+
+<ROUTINE KEYPAD (KEY "AUX" TBL WRD)
+ <SET WRD <GET ,PAD-NAMES <- .KEY ,PAD1>>>
+ <COND (<EQUAL? .KEY ,PAD5>
+ <SET TBL <GETP ,HERE ,P?UP>>
+ <COND (<ZERO? .TBL>)
+ (<CHECK-EXIT? ,HERE .TBL>
+ <SET WRD ,W?UP>)>
+ <SET TBL <GETP ,HERE ,P?DOWN>>
+ <COND (<ZERO? .TBL>)
+ (<CHECK-EXIT? ,HERE .TBL>
+ <COND (<EQUAL? .WRD ,W?UP>
+ <SET WRD ,W?AROUND>)
+ (T
+ <SET WRD ,W?DOWN>)>)>)>
+ <TABLE-WALK .WRD>
+ <RETURN ,AUX-TABLE>>
+
+"PICK-ONE expects an LTABLE, with an initial element of 0."
+
+<ROUTINE PICK-ONE (TBL "AUX" L CNT RND X RTBL)
+ <SET L <GET .TBL 0>>
+ <SET CNT <GET .TBL 1>>
+ <DEC L>
+ <SET TBL <REST .TBL 2>>
+ <SET RTBL <REST .TBL <* .CNT 2>>>
+ <SET RND <RANDOM <- .L .CNT>>>
+ <SET X <GET .RTBL .RND>>
+ <PUT .RTBL .RND <GET .RTBL 1>>
+ <PUT .RTBL 1 .X>
+ <INC CNT>
+ <COND (<EQUAL? .CNT .L>
+ <SET CNT 0>)>
+ <PUT .TBL 0 .CNT>
+ <RETURN .X>>
+
+"PICK-NEXT expects an LTABLE of strings, with an initial element of 2."
+
+<ROUTINE PICK-NEXT (TBL "AUX" CNT STR)
+ <SET CNT <GET .TBL 1>>
+ <SET STR <GET .TBL .CNT>>
+ <COND (<IGRTR? CNT <GET .TBL 0>>
+ <SET CNT 2>)>
+ <PUT .TBL 1 .CNT>
+ <RETURN .STR>>
+
+<GLOBAL P-ACT <>>
+<GLOBAL P-QWORD <>>
+
+<BUZZ $BUZZ>
+
+<OBJECT QWORD
+ (LOC GLOBAL-OBJECTS)
+ (DESC "that")
+ (SYNONYM PPPZ)
+ (FLAGS NOARTICLE NODESC)>
+
+<ROUTINE QUOTED-WORD? (PTR "OPT" (VERB <>) (NAMING <>) "AUX" (WRD 0))
+ <COND (<ZERO? .VERB>)
+ (<AND <ZERO? ,P-QWORD>
+ <T? .NAMING>
+ <EQUAL? .VERB ,ACT?NAME ; ,ACT?SAY>>
+ <SETG P-QWORD .PTR>
+ <SET WRD ,W?PPPZ>)>
+ <CHANGE-LEXV .PTR .WRD>
+ <RETURN .WRD>>
+
+<ROUTINE QUOTED-PHRASE? (PTR VERB "AUX" (1ST? T) LEN WRD BPTR)
+ <CHANGE-LEXV .PTR ,W?$BUZZ> ; "Neutralizes W?QUOTE."
+ <SET LEN <- ,P-LEN 1>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>
+ <SET BPTR <REST ,P-LEXV <* .PTR 2>>>
+ <REPEAT ()
+ <COND (<L? .LEN 0>
+ <PCLEAR>
+ <TELL "[You forgot a second quote.]" CR>
+ <RFALSE>)>
+ <SET WRD <GET ,P-LEXV .PTR>>
+ <COND (<EQUAL? .WRD ,W?QUOTE>
+ <CHANGE-LEXV .PTR ,W?$BUZZ>
+ <RTRUE>)
+ (<T? .1ST?>
+ <COND (<T? .WRD>
+ <COND (<EQUAL? .VERB ,ACT?SAY>)
+ (<EQUAL? .VERB ,ACT?NAME>
+ <HOLLOW-VOICE
+ "reserved by the Implementors">
+ <RFALSE>)>)
+ (<QUOTED-WORD? .PTR .VERB T>
+ <SET 1ST? <>>)
+ (T
+ <TELL ,CANT "see any ">
+ <SET LEN <GETB .BPTR 2>>
+ <WORD-PRINT .LEN <GETB .BPTR 3>>
+ <TELL " here. [2]" CR>
+ <RFALSE>)>)
+ (T
+ <CHANGE-LEXV .PTR ,W?$BUZZ>)>
+ <SET PTR <+ .PTR ,P-LEXELEN>>
+ <SET LEN <- .LEN 1>>>>
+
+<ROUTINE ITS-CLOSED ("OPT" (OBJ ,PRSO))
+ <THIS-IS-IT .OBJ>
+ <TELL CTHE .OBJ>
+ <IS-ARE .OBJ>
+ <TELL B ,W?CLOSED ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE REMOVE-ALL (THING "AUX" OBJ NXT)
+ <COND (<SET OBJ <FIRST? .THING>>
+ <REPEAT ()
+ <SET NXT <NEXT? .OBJ>>
+ <REMOVE .OBJ>
+ <SET OBJ .NXT>
+ <COND (<ZERO? .OBJ>
+ <RFALSE>)>>)>
+ <RFALSE>>
+
diff --git a/people.zil b/people.zil
new file mode 100644
index 0000000..de6cb37
--- /dev/null
+++ b/people.zil
@@ -0,0 +1,2166 @@
+"PEOPLE for BEYOND ZORK: Copyright 1987 Infocom, Inc.
+ All rights reserved."
+
+"*** OLD SALT ***"
+
+<OBJECT SALT
+ (LOC ON-WHARF)
+ (DESC "old sailor")
+ (FLAGS VOWEL LIVING PERSON TRANSPARENT)
+ (SYNONYM SAILOR ARTIST PAINTER MAN GUY FELLOW
+ HIMSELF YOURSELF M MALE)
+ (ADJECTIVE OLD)
+ (LIFE I-SALT)
+ (DESCFCN SALT-F)
+ (CONTFCN SALT-F)
+ (ACTION SALT-F)>
+
+<ROUTINE SALT-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL CA ,SALT " is seated before " A ,EASEL
+ ", dabbing color onto " A ,CANVAS>
+ <COND (<SEE-ANYTHING-IN? ,SALT>
+ <TELL ". He's holding ">
+ <CONTENTS ,SALT>)>
+ <TELL C ,PER>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-WINNER>
+ <COND (<AND <VERB? HELLO>
+ <PRSO? ROOMS SALT>>
+ <GREET-SAILOR>
+ <RFATAL>)
+ (<AND <VERB? TELL-ABOUT SSHOW>
+ <PRSO? ME>>
+ <ASK-SALT-ABOUT ,PRSI>
+ <RFATAL>)
+ (<OR <VERB? EXAMINE WHAT WHO WHERE>
+ <AND <VERB? SHOW>
+ <PRSI? ME>>>
+ <ASK-SALT-ABOUT ,PRSO>
+ <RFATAL>)
+ (<AND <VERB? GIVE GET-FOR>
+ <PRSI? ME>>
+ <ASK-SALT-FOR ,PRSO>
+ <RFATAL>)
+ (<AND <VERB? SGIVE SGET-FOR>
+ <PRSO? ME>>
+ <ASK-SALT-FOR ,PRSI>
+ <RFATAL>)>
+ <DEAF-SALT>
+ <RFATAL>)
+ (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <HARMLESS ,PRSI>
+ <RTRUE>)
+ (<VERB? GIVE GET-FOR>
+ <GIVE-TO-SALT ,PRSO>
+ <RTRUE>)
+ (<VERB? SHOW>
+ <DO-GLANCE ,SALT ,PRSO>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? TELL>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO "'s ice-blue eyes glance up from his work." CR>
+ <RTRUE>)
+ (<VERB? YELL>
+ <NOT-DEAF>
+ <RTRUE>)
+ (<VERB? ASK-FOR>
+ <ASK-SALT-FOR ,PRSI>
+ <RTRUE>)
+ (<VERB? ASK-ABOUT>
+ <ASK-SALT-ABOUT ,PRSI>
+ <RTRUE>)
+ (<VERB? TELL-ABOUT>
+ <DO-GLANCE ,SALT ,PRSI>
+ <RTRUE>)
+ (<VERB? HELLO GOODBYE WAVE-AT>
+ <GREET-SAILOR>
+ <RTRUE>)
+ (<SET X <HURTING?>>
+ <HARMLESS>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE NOT-DEAF ()
+ <MAKE ,SALT ,SEEN>
+ <TELL CTHE ,SALT " cringes. \"I'm not deaf, y'know!\"" CR>
+ <RTRUE>>
+
+<ROUTINE DEAF-SALT ("AUX" X)
+ <MAKE ,SALT ,SEEN>
+ <SET X <RANDOM 100>>
+ <COND (<L? .X 33>
+ <TELL CTHE ,SALT
+" doesn't look up from his work. Perhaps he didn't hear you." CR>
+ <RTRUE>)
+ (<L? .X 67>
+ <TELL CTHE ,SALT
+" cocks his head. \"Eh? Didn't catch that.\"" CR>
+ <RTRUE>)>
+ <TELL "\"Stop whispering, ">
+ <BOY-GIRL>
+ <TELL "! Can't hear a word you're sayin'.\"" CR>
+ <RTRUE>>
+
+<ROUTINE BOY-GIRL ()
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL B ,W?GIRL>
+ <RTRUE>)>
+ <TELL B ,W?BOY>
+ <RTRUE>>
+
+<ROUTINE GREET-SAILOR ()
+ <MAKE ,SALT ,SEEN>
+ <COND (<PROB 33>
+ <DEAF-SALT>
+ <RTRUE>)>
+ <TELL CTHE ,SALT>
+ <COND (<IS? ,SALT ,TOUCHED>
+ <TELL " shrugs. \"Okay. Hello, again.\"" CR>
+ <RTRUE>)>
+ <MAKE ,SALT ,TOUCHED>
+ <COND (<AND <EQUAL? ,P-PRSA-WORD ,W?HELLO>
+ <NOUN-USED? ,W?SAILOR>>
+ <TELL
+" chuckles softly and nods. \"Thought I 'membered you. ">)
+ (T
+ <TELL " nods. \"">)>
+ <TELL "Hello, ">
+ <BOY-GIRL>
+ <TELL ,PERQ>
+ <RTRUE>>
+
+<ROUTINE ASK-SALT-ABOUT (OBJ "AUX" TBL LEN X)
+ <MAKE ,SALT ,SEEN>
+ <COND (<PROB 33>
+ <DEAF-SALT>
+ <RTRUE>)>
+ <COND (<NOT <VISIBLE? .OBJ>>
+ <PERPLEXED ,SALT>
+ <TELL "Not sure">
+ <WHO-WHAT .OBJ>
+ <TELL "you're talkin' 'bout, ">
+ <BOY-GIRL>
+ <TELL ,PERQ>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,SALT>
+ <TELL "\"Been retired, ah, goin' on five years.\"" CR>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,SHILL>
+ <TELL "\"Lucky ye saw it a-floatin' there.\"" CR>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,EASEL ,CANVAS>
+ <TELL "\"Like it? Reminds me o' the good old days.\"" CR>
+ <RTRUE>)
+ (<PROB 75>
+ <DEAF-SALT>
+ <RTRUE>)>
+ <IGNORANT ,SALT .OBJ>
+ <RTRUE>>
+
+<ROUTINE ASK-SALT-FOR (OBJ "AUX" X L)
+ <MAKE ,SALT ,SEEN>
+ <COND (<PROB 33>
+ <DEAF-SALT>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,EASEL ,CANVAS>
+ <TELL "\"Sorry. Not for sale.\"" CR>
+ <RTRUE>)>
+ <AINT-GOT ,SALT .OBJ>
+ <RTRUE>>
+
+<ROUTINE AINT-GOT (WHO OBJ)
+ <TELL "\"Don't have " A .OBJ>
+ <PRINT ",\" points out ">
+ <TELL THE .WHO ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE GIVE-TO-SALT (OBJ)
+ <MAKE ,SALT ,SEEN>
+ <COND (<GIVING-LOOT? .OBJ ,SALT>
+ <RTRUE>)>
+ <NO-THANKS ,SALT>
+ <RTRUE>>
+
+<ROUTINE NO-THANKS (WHO)
+ <TELL CTHE .WHO " shakes his head. \"No, thanks.\"" CR>
+ <RTRUE>>
+
+<ROUTINE DO-GLANCE (WHO OBJ)
+ <MAKE .WHO ,SEEN>
+ <TELL CTHE .WHO>
+ <COND (<VISIBLE? .OBJ>
+ <TELL ,GLANCES-AT THE .OBJ>)
+ (T
+ <PRINT " gives you a puzzled frown">)>
+ <PRINT ", but says nothing.|">
+ <RTRUE>>
+
+"*** INNCOOK ***"
+
+<OBJECT COOK
+ (LOC IN-KITCHEN)
+ (DESC "cook")
+ (FLAGS NOALL LIVING PERSON TRANSPARENT)
+ (SYNONYM GROTE CLUTCHCAKE COOK MAN GUY FELLOW PERSON
+ SELF HIMSELF YOURSELF)
+ (ADJECTIVE GROTE)
+ (LIFE I-COOK)
+ (DESCFCN COOK-F)
+ (ACTION COOK-F)>
+
+<ROUTINE COOK-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL "A skinny old cook is bustling around the kitchen.">
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-WINNER>
+ <COND (<AND <VERB? TELL-ABOUT SSHOW>
+ <PRSO? ME>>
+ <ASK-COOK-ABOUT ,PRSI>
+ <RFATAL>)
+ (<OR <VERB? EXAMINE WHAT WHO WHERE>
+ <AND <VERB? SHOW>
+ <PRSI? ME>>>
+ <ASK-COOK-ABOUT ,PRSO>
+ <RFATAL>)
+ (<AND <VERB? GIVE GET-FOR>
+ <PRSI? ME>>
+ <ASK-COOK-FOR ,PRSO>
+ <RFATAL>)
+ (<AND <VERB? SGIVE SGET-FOR>
+ <PRSO? ME>>
+ <ASK-COOK-FOR ,PRSI>
+ <RFATAL>)>
+ <TELL CTHE ,COOK
+" scowls. \"Don't bother me now, I'm busy!\"" CR>
+ <RFATAL>)
+ (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<IS? ,PRSI ,NODESC>
+ <CANT-FROM-HERE>
+ <RTRUE>)
+ (<VERB? BUY-FROM>
+ <ASK-COOK-FOR ,PRSO>
+ <RTRUE>)
+ (<VERB? GIVE GET-FOR>
+ <GIVE-TO-COOK ,PRSO>
+ <RTRUE>)
+ (<VERB? SHOW>
+ <SHOW-TO-COOK ,PRSO>
+ <RTRUE>)>
+ <RFALSE>)
+ (<IS? ,PRSO ,NODESC>
+ <COND (<SET X <TALKING?>>
+ <PCLEAR>
+ <TELL "He">
+ <PRINT " doesn't seem to hear you.|">
+ <RFATAL>)>
+ <CANT-FROM-HERE>
+ <RTRUE>)
+ (<VERB? ASK-FOR>
+ <ASK-COOK-FOR ,PRSI>
+ <RTRUE>)
+ (<VERB? ASK-ABOUT>
+ <ASK-COOK-ABOUT ,PRSI>
+ <RTRUE>)
+ (<VERB? TELL-ABOUT>
+ <SHOW-TO-COOK ,PRSI>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE ASK-COOK-ABOUT (OBJ "AUX" TBL LEN X)
+ <SEE-CHARACTER ,COOK>
+ <MAKE ,COOK ,SEEN>
+ <COND (<EQUAL? .OBJ ,BOTTLE>
+ <COND (<IS? ,ONION ,SEEN>
+ <TELL
+"\"Got it put away, nice and safe. Thanks again.\"" CR>
+ <RTRUE>)
+ (<IS? ,BOTTLE ,IDENTIFIED>
+ <TELL "\"This here onion's yours if you ">
+ <COND (<VISIBLE? .OBJ>
+ <TELL "hand it over.\"" CR>
+ <RTRUE>)>
+ <TELL "get it for me.\"" CR>
+ <RTRUE>)
+ (<IS? ,ONION ,TOUCHED>
+ <UNMAKE ,COOK ,SEEN>
+ <TELL "\"Ahem.\"" CR>
+ <I-ONION-OFFER>
+ <RTRUE>)>
+ <DO-GLANCE ,COOK ,CELLAR-DOOR>
+ <RTRUE>)
+
+ (<EQUAL? .OBJ ,COOK>
+ <TELL "\"Grote Clutchcake's the name.\"" CR>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,CELLAR ,CELLAR-DOOR>
+ <TELL
+"\"Used t'be a wine cellar. Can't go down no more; too dangerous.\"" CR>
+ <RTRUE>)
+ (<NOT <VISIBLE? .OBJ>>
+ <PERPLEXED ,COOK>
+ <TELL "Don't know">
+ <WHO-WHAT .OBJ>
+ <TELL "you're talkin' 'bout.\"" CR>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,ONION>
+ <COOK-MENTIONS-ONION>
+ <RTRUE>)>
+ <TELL CTHE ,COOK " shrugs impatiently. \"Can't say anythin' 'bout ">
+ <PRONOUN .OBJ>
+ <TELL " you wouldn't know already.\"" CR>
+ <RTRUE>>
+
+<ROUTINE ASK-COOK-FOR (OBJ "AUX" X L)
+ <SEE-CHARACTER ,COOK>
+ <SET L <LOC .OBJ>>
+ <MAKE ,COOK ,SEEN>
+ <COND (<NOT <VISIBLE? .OBJ>>)
+ (<EQUAL? .OBJ ,ONION>
+ <COND (<IS? .OBJ ,SEEN>
+ <TELL "\"It's yours. Roll it outa here.\"" CR>
+ <RTRUE>)
+ (<IS? ,BOTTLE ,IDENTIFIED>
+ <TELL "\"Yours for " THE ,BOTTLE>
+ <COND (<NOT <IS? ,BOTTLE ,TOUCHED>>
+ <TELL " downstairs">)>
+ <TELL ,PERQ>
+ <RTRUE>)>
+ <COOK-MENTIONS-ONION>
+ <RTRUE>)>
+ <AINT-GOT ,COOK .OBJ>
+ <RTRUE>>
+
+<ROUTINE COOK-MENTIONS-ONION ()
+ <COND (<NOT <IS? ,ONION ,TOUCHED>>
+ <MAKE ,ONION ,TOUCHED>
+ <MAKE ,COOK ,SEEN>
+ <DEQUEUE ,I-COOK>
+ <QUEUE ,I-ONION-OFFER>
+ <TELL CTHE ,COOK " gives " THE ,ONION
+ " an affectionate kick. ">)>
+ <TELL
+"\"Nice, eh? Won second place at the Borphee County Fair.\"" CR>
+ <RTRUE>>
+
+<ROUTINE STOP-ONION-OFFER ()
+ <MAKE ,BOTTLE ,IDENTIFIED>
+ <DEQUEUE ,I-ONION-OFFER>
+ <COND (<NOT <QUEUED? ,I-COOK>>
+ <QUEUE ,I-COOK>)>
+ <MAKE ,COOK ,SEEN>
+ <RFALSE>>
+
+<ROUTINE GIVE-TO-COOK (OBJ)
+ <SEE-CHARACTER ,COOK>
+ <MAKE ,COOK ,SEEN>
+ <COND (<GIVING-LOOT? .OBJ ,COOK>
+ <RTRUE>)>
+ <TELL CTHE ,COOK>
+ <COND (<EQUAL? .OBJ ,BOTTLE>
+ <VANISH .OBJ>
+ <MAKE ,ONION ,SEEN>
+ <TELL "'s eyes grow large as he takes " THE .OBJ
+". \"Been after this thing for years,\" he cries, turning it over and over in his hands before stowing it quickly out of sight. ">
+ <COND (<NOT <IS? ,BOTTLE ,IDENTIFIED>>
+ <TELL "\"I owe you a big favor, ">
+ <BOY-GIRL>
+ <TELL ". A ">
+ <ITALICIZE "very">
+ <TELL " big favor. Big as this here onion.\" ">)>
+ <STOP-ONION-OFFER>
+ <TELL "Your eyes follow his to " THE ,ONION
+" near the exit. \"All yours,\" he says, patting it affectionately." CR>
+ <RTRUE>)>
+ <TELL " refuses " THE .OBJ
+ " with a shake of his head. \"No, thanks.\"" CR>
+ <RTRUE>>
+
+<ROUTINE COOK-SEES-BOTTLE ()
+ <STOP-ONION-OFFER>
+ <MAKE ,BOTTLE ,MUNGED>
+ <TELL "\"The bottle!\" gasps " THE ,COOK
+ " when he sees it">
+ <COND (<IN? ,BOTTLE ,PLAYER>
+ <TELL " in your hands">)>
+ <PRINT ". \"You got it!\"|">
+ <RTRUE>>
+
+<ROUTINE SHOW-TO-COOK (OBJ)
+ <SEE-CHARACTER ,COOK>
+ <MAKE ,COOK ,SEEN>
+ <COND (<EQUAL? .OBJ ,BOTTLE>
+ <COND (<NOT <IS? .OBJ ,IDENTIFIED>>
+ <COOK-SEES-BOTTLE>
+ <RTRUE>)>
+ <STOP-ONION-OFFER>
+ <TELL "\"That's the one!\" he gasps">
+ <PRINT ". \"You got it!\"|">
+ <RTRUE>)>
+ <TELL "\"How interesting,\" yawns " THE ,COOK>
+ <COND (<VISIBLE? .OBJ>
+ <TELL ", glancing at " THE .OBJ>)>
+ <PRINT ,PERIOD>
+ <RTRUE>>
+
+"*** BAND ***"
+
+<OBJECT BANDITS
+ (LOC IN-PUB)
+ (DESC "group of bandits")
+ (FLAGS NODESC LIVING PERSON TRANSPARENT)
+ (SYNONYM BANDITS BANDIT PEOPLE GUYS FELLOWS GROUP)
+ (ACTION BANDITS-F)>
+
+<ROUTINE BANDITS-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? POINT-AT TOUCH-TO FIRE-AT>
+ <TELL "There are too many of them here." CR>
+ <RTRUE>)
+ (<VERB? THROW THROW-OVER>
+ <SUICIDE>
+ <RTRUE>)
+ (<VERB? GIVE SHOW GET-FOR FEED>
+ <HEEDLESS>
+ <RTRUE>)>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <HEEDLESS>
+ <RFATAL>)
+ (<VERB? EXAMINE LOOK-ON>
+ <NOSEY "starin' at">
+ <RTRUE>)
+ (<VERB? LISTEN>
+ <NOSEY "listenin' to">
+ <RTRUE>)
+ (<SET X <HURTING?>>
+ <SUICIDE>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE NOSEY (STR)
+ <MAKE ,PRSO ,SEEN>
+ <TELL "\"Who're you " .STR
+"?\" demands a very large bandit. You wisely decide to turn your attention elsewhere." CR>
+ <RTRUE>>
+
+<ROUTINE SUICIDE ()
+ <TELL "Suicide. Monsters are one thing; an armed " 'BANDITS
+ " is quite another." CR>
+ <RTRUE>>
+
+<ROUTINE HEEDLESS ()
+ <PCLEAR>
+ <TELL "The bandits glare at your interruption. \"Scram.\"" CR>
+ <RTRUE>>
+
+<OBJECT OWOMAN
+ (LAST-LOC 0)
+ (DESC "old woman")
+ (FLAGS VOWEL LIVING PERSON FEMALE TRANSPARENT)
+ (SYNONYM Y\'GAEL WOMAN LADY DAME FEMALE F)
+ (ADJECTIVE OLD)
+ (LIFE I-OWOMAN)
+ (DESCFCN OWOMAN-F)
+ (ACTION OWOMAN-F)>
+
+<ROUTINE OWOMAN-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL CA ,OWOMAN ,SIS <PICK-NEXT ,OWOMAN-EYES> C ,PER>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-WINNER>
+ <COND (<AND <VERB? TELL-ABOUT SSHOW>
+ <PRSO? ME>>
+ <ASK-OWOMAN-ABOUT ,PRSI>
+ <RFATAL>)
+ (<OR <VERB? EXAMINE REQUEST WHAT WHO WHERE>
+ <AND <VERB? SHOW>
+ <PRSI? ME>>>
+ <ASK-OWOMAN-ABOUT ,PRSO>
+ <RFATAL>)
+ (<AND <VERB? GIVE GET-FOR>
+ <PRSI? ME>>
+ <ASK-OWOMAN-FOR ,PRSO>
+ <RFATAL>)
+ (<AND <VERB? SGIVE SGET-FOR>
+ <PRSO? ME>>
+ <ASK-OWOMAN-FOR ,PRSI>
+ <RFATAL>)
+ (<AND <VERB? SELL-TO>
+ <PRSI? ME>>
+ <BUY-X-WITH-Y ,PRSO ,MONEY>
+ <RTRUE>)
+ (<AND <VERB? SSELL-TO>
+ <PRSO? ME>>
+ <BUY-X-WITH-Y ,PRSI ,MONEY>
+ <RTRUE>)
+ (<AND <VERB? HELLO GOODBYE>
+ <PRSO? ROOMS OWOMAN>>
+ <GREET-OWOMAN>
+ <RFATAL>)>
+ <TELL "\"I'm not used to being ordered about,\" observes "
+ THE ,OWOMAN " coldly." CR>
+ <RFATAL>)
+ (<T? .CONTEXT>
+ <RFALSE>)
+ (<NOUN-USED? ,W?Y\'GAEL>
+ <COND (<NOT <IS? ,OWOMAN ,MUNGED>>
+ <MAKE ,OWOMAN ,MUNGED>
+ <TELL ,CTHELADY>
+ <PRINT " raises an eyebrow">
+ <TELL " as you speak her Name." CR>
+ <RFATAL>)>)>
+ <COND (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <HARMLESS ,PRSI>
+ <RTRUE>)
+ (<VERB? GIVE GET-FOR>
+ <GIVE-TO-OWOMAN ,PRSO>
+ <RTRUE>)
+ (<VERB? SHOW>
+ <ASK-OWOMAN-ABOUT ,PRSO>
+ <RTRUE>)
+ (<VERB? SELL-TO>
+ <TRADE-FOR-LOOT ,PRSO>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <SET X <GETP ,PRSO ,P?LAST-LOC>>
+ <COND (<VISIBLE? .X>)
+ (<T? .X>
+ <TELL
+"That's odd. She looks just like the woman you met in " THE .X ,PERIOD>
+ <RTRUE>)>
+ <TELL CTHEO " regards you with equal interest." CR>
+ <RTRUE>)
+ (<VERB? ASK-FOR>
+ <ASK-OWOMAN-FOR ,PRSI>
+ <RTRUE>)
+ (<VERB? ASK-ABOUT>
+ <ASK-OWOMAN-ABOUT ,PRSI>
+ <RTRUE>)
+ (<VERB? TELL-ABOUT>
+ <COND (<IN? ,PRSI ,PLAYER>
+ <GIVE-TO-OWOMAN ,PRSI>
+ <RTRUE>)>
+ <ASK-OWOMAN-ABOUT ,PRSI>
+ <RTRUE>)
+ (<VERB? HELLO WAVE-AT GOODBYE>
+ <GREET-OWOMAN>
+ <RTRUE>)
+ (<SET X <HURTING?>>
+ <HARMLESS>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE GREET-OWOMAN ()
+ <MAKE ,OWOMAN ,SEEN>
+ <TELL ,CTHELADY " nods graciously." CR>
+ <RTRUE>>
+
+<CONSTANT OWOMAN-TABLE
+ <PLTABLE
+ <PTABLE SPADE "I've always been one to call a spade a spade">
+ <PTABLE LEAFLET "I don't look at other people's mail">
+ <PTABLE PARCEL "I don't look at other people's mail">
+ <PTABLE CROWN "Tidy little trinket, that">
+ <PTABLE DOUBLOON "Tidy little trinket, that">
+ <PTABLE DIAMOND "Tidy little trinket, that">
+ <PTABLE ORNAMENT "Aluminized plastic. Festive, though">
+ <PTABLE RELIQUARY "Standard clerical issue">
+ <PTABLE SADDLE "Smallish; must be for a pony">
+ <PTABLE SEXTANT "Antiques are big nowadays">
+ <PTABLE LANTERN "Antiques are big nowadays">
+ <PTABLE RUG "Phew! That thing wants a good airing">
+ <PTABLE TUSK "That'll make some piano awfully happy">
+ <PTABLE BOTTLE "A fair vintage">
+ <PTABLE BFLY "A fair specimen">
+ <PTABLE CARD "Not the handsomest of mages">
+ >>
+
+<ROUTINE ASK-OWOMAN-ABOUT (OBJ "AUX" TBL LEN X)
+ <SEE-CHARACTER ,OWOMAN>
+ <COND (<EQUAL? .OBJ ,MONEY ,INTNUM>
+ <TELL "\"My favorite subject.\"" CR>
+ <RTRUE>)
+ (<WHAT-TALK? ,OWOMAN .OBJ>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,KEY1 ,KEY2 ,KEY3>
+ <TELL "\"How tawdry.\"" CR>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,PARASOL>
+ <TELL ,CTHELADY>
+ <PRINT " raises an eyebrow">
+ <PRINT ", but says nothing.|">
+ <RTRUE>)
+ (<OR <EQUAL? .OBJ ,BOUTIQUE ,WEAPON-SHOP ,MSHOPPE>
+ <EQUAL? .OBJ ,BCASE ,MCASE ,WCASE>>
+ <TELL "\"Best selection in the Southlands.\"" CR>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,CURTAIN ,OWOMAN ,ME>
+ <TELL ,CTHELADY " smiles wryly">
+ <PRINT ", but says nothing.|">
+ <RTRUE>)
+ (<AND <HERE? IN-BOUTIQUE>
+ <BOUTIQUE-KNOWLEDGE? .OBJ>>
+ <RTRUE>)
+ (<AND <HERE? IN-WEAPON>
+ <WEAPON-KNOWLEDGE? .OBJ>>
+ <RTRUE>)
+ (<AND <HERE? IN-MAGICK>
+ <MAGICK-KNOWLEDGE? .OBJ>>
+ <RTRUE>)>
+
+ <SET LEN <GET ,OWOMAN-TABLE 0>>
+ <REPEAT ()
+ <SET TBL <GET ,OWOMAN-TABLE .LEN>>
+ <SET X <GET .TBL 0>>
+ <COND (<EQUAL? .X .OBJ>
+ <TELL "\"" <GET .TBL 1>>
+ <REVEAL-VALUE .X <GETP ,HERE ,P?THIS-CASE>>
+ <RTRUE>)
+ (<DLESS? LEN 1>
+ <RETURN>)>>
+
+ <COND (<AND <NOT <HERE? IN-MAGICK>>
+ <SET X <GET ,MAGIC-ITEMS 0>>
+ <SET X <INTBL? .OBJ <REST ,MAGIC-ITEMS 2> .X>>>
+ <ASK-IN .OBJ "Magick Shoppe in Gurth City">
+ <RTRUE>)>
+ <COND (<AND <NOT <HERE? IN-WEAPON>>
+ <SET X <GET ,WEAPON-ITEMS 0>>
+ <SET X <INTBL? .OBJ <REST ,WEAPON-ITEMS 2> .X>>>
+ <ASK-IN .OBJ "weapon shop in Accardi">
+ <RTRUE>)>
+ <COND (<AND <NOT <HERE? IN-BOUTIQUE>>
+ <SET X <GET ,ARMOR-ITEMS 0>>
+ <SET X <INTBL? .OBJ <REST ,ARMOR-ITEMS 2> .X>>>
+ <ASK-IN .OBJ "boutique in Mizniaport">
+ <RTRUE>)>
+
+ <TELL "\"I'm afraid I can't tell you very much about ">
+ <PRONOUN .OBJ>
+ <TELL ",\" apologizes " THE ,OWOMAN ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE ASK-IN (OBJ STR)
+ <TELL ,CTHELADY ,GLANCES-AT THE .OBJ
+". \"Can't tell you much about this here,\" she mutters. \"Bet the " .STR
+" would know something, though.\"" CR>
+ <RTRUE>>
+
+<ROUTINE BOUTIQUE-KNOWLEDGE? (OBJ)
+ <COND (<EQUAL? .OBJ ,PACK>
+ <TELL "\"Perfect for those long adventures">)
+
+ (<EQUAL? .OBJ ,CLOAK>
+ <TELL
+"\"A fine example of elvish tailoring. 'Tis said a potent virtue is woven into the cloth">)
+
+ (<EQUAL? .OBJ ,TUNIC>
+ <TELL "\"Oh, that. Last week's fashion, I'm afraid">)
+
+ (<EQUAL? .OBJ ,SCALE>
+ <TELL
+"\"Good basic protection. Not too bulky, not too expensive">)
+
+ (<EQUAL? .OBJ ,CHAIN>
+ <TELL
+"\"An effective design, if not particularly comfortable">)
+
+ (<EQUAL? .OBJ ,PLATE>
+ <TELL
+"\"The last word in protection,\" states " THE ,OWOMAN
+" flatly. \"That stuff'll turn aside anything short of a grue's fangs">)
+
+ (<EQUAL? .OBJ ,HELM ,SCABBARD>
+ <SECRET-VIRTUE .OBJ>
+ <RTRUE>)
+
+ (T
+ <RFALSE>)>
+
+ <REVEAL-VALUE .OBJ ,BCASE>
+ <RTRUE>>
+
+<ROUTINE WEAPON-KNOWLEDGE? (OBJ)
+ <COND (<EQUAL? .OBJ ,ARROW>
+ <TELL "\"A primitive design; high drag coefficient">)
+
+ (<EQUAL? .OBJ ,DAGGER>
+ <TELL "\"Suitable for cleaning fish, I suppose">)
+
+ (<EQUAL? .OBJ ,SWORD>
+ <TELL
+"\"Of ancient elvish workmanship, if I'm not mistaken">)
+
+ (<EQUAL? .OBJ ,SHILL>
+ <TELL
+"\"Many an orc's skull bears the mark of this " 'SHILL>)
+
+ (<EQUAL? .OBJ ,AXE>
+ <TELL "\"A real skull-cleaver, that one">)
+
+ (<EQUAL? .OBJ ,PHASE ,SCABBARD ,HELM>
+ <SECRET-VIRTUE .OBJ>
+ <RTRUE>)
+
+ (T
+ <RFALSE>)>
+
+ <REVEAL-VALUE .OBJ ,WCASE>
+ <RTRUE>>
+
+<ROUTINE MAGICK-KNOWLEDGE? (OBJ "AUX" VAL ACT FX)
+ <SETG IDING .OBJ>
+ <SET ACT <GETP .OBJ ,P?ACTION>>
+ <SET FX <GETP .OBJ ,P?EFFECT>>
+ <COND (<EQUAL? .ACT ,SLEEP-WAND-F>
+ <DO-ID>
+ <TELL "Aim this at a creature and watch it stagger">)
+ (<EQUAL? .ACT ,BLAST-WAND-F>
+ <DO-ID>
+ <TELL "Instant death, with few exceptions">)
+ (<EQUAL? .ACT ,TELE-WAND-F>
+ <DO-ID>
+ <TELL "Teleports trouble out of your way">)
+ (<EQUAL? .ACT ,IO-WAND-F>
+ <DO-ID>
+ <TELL "Makes things turn inside-out">)
+ (<EQUAL? .ACT ,LEV-WAND-F>
+ <DO-ID>
+ <TELL "Floats 'most anything that isn't nailed down">)
+ (<EQUAL? .ACT ,DISPEL-WAND-F>
+ <TELL ,CTHELADY " scowls. ">
+ <DO-ID>
+ <TELL "Neutralizes the effects of Magick">)
+
+ ; "Potions."
+
+ (<EQUAL? .ACT ,HEALING-POTION-F>
+ <DO-ID>
+ <TELL "Just the thing in the heat of battle">)
+ (<EQUAL? .ACT ,FORGET-POTION-F>
+ <DO-ID>
+ <TELL "Hmm,\" mutters " THE ,OWOMAN
+". \"Tried one of those once; can't recall what it does. Oh, well">)
+ (<EQUAL? .ACT ,DEATH-POTION-F>
+ <DO-ID>
+ <TELL "Don't understand why they mix these things">)
+ (<OR <EQUAL? .ACT ,MIGHT-POTION-F>
+ <EQUAL? .OBJ ,ROOT>>
+ <DO-ID>
+ <TELL "That'll put hair on your chest">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL ".\" " ,CTHELADY
+ " blushes. \"Well, you know what I mean">)>)
+ (<EQUAL? .ACT ,IQ-POTION-F>
+ <DO-ID>
+ <TELL "Four years faster than GUE Tech, and a lot cheaper">)
+
+ ; "Scrolls."
+
+ (<EQUAL? .FX ,DO-PARTAY>
+ <DO-ID>
+ <TELL "Big fun at parties">)
+ (<EQUAL? .FX ,DO-FILFRE>
+ <DO-ID>
+ <TELL "Essential reading">)
+ (<EQUAL? .FX ,DO-GOTO>
+ <DO-ID>
+ <TELL "Just the thing for emergencies">)
+ (<EQUAL? .FX ,DO-BLESS-ARMOR>
+ <DO-ID>
+ <TELL "Bestows a rich blessing upon your armor">)
+ (<EQUAL? .FX ,DO-BLESS-WEAPON>
+ <DO-ID>
+ <TELL "Adds a touch of enchantment to any weapon">)
+ (<EQUAL? .FX ,DO-RENEWAL>
+ <DO-ID>
+ <TELL "How refreshing">)
+ (<EQUAL? .FX ,DO-GATE>
+ <DO-ID>
+ <TELL "Not as robust as Dimension Door, but serviceable">)
+
+ (<EQUAL? .OBJ ,CAKE>
+ <TELL ,CTHELADY
+" grimaces. \"Bleah. My aunt used to make those. Good for your brain, but not much else">)
+
+ (<EQUAL? .OBJ ,CLOAK>
+ <DO-ID>
+ <TELL "Elvish, if the weave speaks true">)
+
+ (<EQUAL? .OBJ ,RING>
+ <TELL ,CTHELADY " smirks. ">
+ <DO-ID>
+ <TELL "Same as the Coal-Walkers of Egreth use">)
+
+ (<EQUAL? .OBJ ,HELM>
+ <DO-ID>
+ <MAKE .OBJ ,PROPER>
+ <TELL
+"A potent relic of the past 'Tis said the wearer commands the wisdom of kings, and can see the unseeable.\" She shudders visibly. \"Some things are better left unseen">)
+
+ (<EQUAL? .OBJ ,GOBLET>
+ <COND (<ZERO? ,GOBLET-WORD>
+ <SETUP-GOBLET>)>
+ <TELL ,CTHELADY
+" turns pale, and lowers her voice to a barely audible whisper. \"The ">
+ <PRINT-TABLE <GETP .OBJ ,P?NAME-TABLE>>
+ <TELL ",\" she hisses">
+ <COND (<NOT <IS? .OBJ ,NEUTRALIZED>>
+ <TELL ", and thunder rumbles outside">)>
+ <TELL
+". \"Beware! for its Name incurs the wrath of the Implementors">)
+
+ (<EQUAL? .OBJ ,UHEMI ,LHEMI>
+ <TELL "\"Hmm,\" mutters " THE ,OWOMAN
+ ". \"Some great potential lies within">)
+
+ (<EQUAL? .OBJ ,STONE>
+ <COND (<NOT <IS? ,STONE ,NAMED>>
+ <SETUP-STONE>)>
+ <TELL "\"Ah! The ">
+ <PRINT-TABLE <GETP .OBJ ,P?NAME-TABLE>>
+ <TELL
+"! Visions of things yet to be lie within its depths, for those with enough wit to see them">)
+
+ (<EQUAL? .OBJ ,RFOOT ,CLOVER ,SHOE>
+ <TELL "\"A charm to ward off ill luck">)
+
+ (<EQUAL? .OBJ ,SCABBARD>
+ <MAKE .OBJ ,IDENTIFIED>
+ <TELL ,CTHELADY
+"'s voice lowers to a respectful whisper. \"Behold " THE .OBJ
+", Blade of Entharion,\" she says. \"Though the Blade is long lost, the scabbard retains much virtue; for ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "s">)>
+ <TELL
+"he who wears it is blessed with wondrous powers of recuperation">)
+
+ (<EQUAL? .OBJ ,VIAL>
+ <TELL "\"Holy water,\" explains " THE ,OWOMAN
+" after a brief glance. \"Standard issue against vampires, wraiths, anything dead that moves">)
+
+ (<EQUAL? .OBJ ,GLASS>
+ <TELL "\"A relic of ancient Pheebor,\" explains " THE ,OWOMAN
+". \"Its purpose is lost in Time. Perhaps it is part of some greater Magick">)
+
+ (<EQUAL? .OBJ ,ROSE>
+ <TELL
+"\"A compass rose! Just the thing for an ill wind">)
+
+ (<EQUAL? .OBJ ,GURDY>
+ <TELL
+"\"A versatile instrument. Dangerous in the wrong hands">)
+
+ (<EQUAL? .OBJ ,WHISTLE>
+ <DO-ID>
+ <TELL "Wrought by a platypus, like most nowadays">)
+
+ (<EQUAL? .OBJ ,PHASE>
+ <TELL
+"\"Little more than a curiosity, at least on this Plane of existence">)
+
+ (<EQUAL? .OBJ ,CHEST>
+ <TELL ,CTHELADY
+" studies " THE .OBJ " closely. \"Careful with this,\" she warns. \"The plaque on the lid is well worth reading">)
+
+ (<EQUAL? .OBJ ,AMULET>
+ <TELL "\"A useful bit of Magick, this. ">
+ <COND (<ZERO? ,AMULET-STARS>
+ <TELL "Too bad it's all used up">)
+ (T
+ <TELL "Still got some life in it, too">)>)
+
+ (<EQUAL? .OBJ ,SPENSE ,SPENSE2>
+ <TELL
+"\"Spenseweed, of course. A wholesome treat">)
+
+ (<EQUAL? .OBJ ,BURIN>
+ <TELL "\"Diamond-tipped, I see. Top of the line">)
+
+ (<EQUAL? .OBJ ,JAR ,CIRCLET>
+ <TELL
+"\"A vain bit of Magick; yet not without its uses">)
+
+ (T
+ <RFALSE>)>
+
+ <COND (<IS? .OBJ ,NEUTRALIZED>
+ <PRINT ". Unfortunately, ">
+ <TELL "its Magick">
+ <PRINT " appears to have been neutralized">)>
+ <REVEAL-VALUE .OBJ ,MCASE>
+ <RTRUE>>
+
+<ROUTINE REVEAL-VALUE (OBJ CASE "AUX" VAL X)
+ <SET VAL <GETP .OBJ ,P?VALUE>>
+ <TELL C ,PER>
+ <COND (<ZERO? .VAL>
+ <TELL "\"" CR>
+ <RTRUE>)>
+ <TELL C ,SP>
+ <SET X ,OFFERS>
+ <COND (<NOT <IN? .OBJ .CASE>>
+ <SET X ,USED-OFFERS>)>
+ <TELL <PICK-NEXT .X> N .VAL " zorkmid">
+ <COND (<NOT <EQUAL? .VAL 1>>
+ <TELL "s">)>
+ <TELL ,PERQ>
+ <RTRUE>>
+
+<ROUTINE SECRET-VIRTUE (OBJ)
+ <TELL ,CTHELADY " scrutinizes " THE .OBJ
+" with care. \"Hmm,\" she mutters. \"There may be a virtue in this ">
+ <PRINTD .OBJ>
+ <TELL
+" beyond its simple face value. Perhaps you should bring it to the ">
+ <PRINT "Magick Shoppe in Gurth City">
+ <TELL ,PERQ>
+ <RTRUE>>
+
+<GLOBAL IDING:OBJECT <>>
+
+<ROUTINE DO-ID ()
+ <COND (<NOT <IS? ,IDING ,IDENTIFIED>>
+ <MAKE ,IDING ,IDENTIFIED>
+ <WINDOW ,SHOWING-ALL>)>
+ <TELL "\"" <PICK-NEXT ,AH-YESSES> D ,IDING ". ">
+ <RFALSE>>
+
+<ROUTINE ASK-OWOMAN-FOR (OBJ "AUX" X L)
+ <SEE-CHARACTER ,OWOMAN>
+ <SET L <LOC .OBJ>>
+ <COND (<NOT <EQUAL? .L ,OWOMAN>>
+ <COND (<VISIBLE? .OBJ>
+ <TELL "\"I see ">
+ <COND (<IS? .OBJ ,PLURAL>
+ <TELL B ,W?SOME>)
+ (T
+ <TELL B ,W?ONE>)>
+ <TELL " there ">
+ <SAY-WHERE .L>
+ <TELL ",\" smiles " THE ,OWOMAN ,PERIOD>
+ <RTRUE>)>
+ <TELL "\"I'm afraid I don't have " A .OBJ ,PERQ>
+ <RTRUE>)>
+ <NOT-SO-FAST ,OWOMAN>
+ <RTRUE>>
+
+<ROUTINE NOT-SO-FAST (OBJ)
+ <TELL "\"Not so fast!\" laughs " THE .OBJ
+ ", drawing away from you." CR>
+ <RTRUE>>
+
+<ROUTINE GIVE-TO-OWOMAN (OBJ "AUX" X)
+ <SEE-CHARACTER ,OWOMAN>
+ <COND (<GIVING-LOOT? .OBJ ,OWOMAN>
+ <RTRUE>)>
+ <SET X <GET ,MAGIC-ITEMS 0>>
+ <COND (<SET X <INTBL? .OBJ <REST ,MAGIC-ITEMS 2> .X>>
+ <COND (<NOT <HERE? IN-MAGICK>>
+ <CANT-USE-HERE .OBJ "Magick Shoppe in Gurth City">
+ <RTRUE>)>
+ <TRADE-FOR-LOOT .OBJ>
+ <RTRUE>)>
+ <SET X <GET ,ARMOR-ITEMS 0>>
+ <COND (<SET X <INTBL? .OBJ <REST ,ARMOR-ITEMS 2> .X>>
+ <COND (<NOT <HERE? IN-BOUTIQUE>>
+ <CANT-USE-HERE .OBJ "boutique in Mizniaport">
+ <RTRUE>)>
+ <TRADE-FOR-LOOT .OBJ>
+ <RTRUE>)>
+ <SET X <GET ,WEAPON-ITEMS 0>>
+ <COND (<SET X <INTBL? .OBJ <REST ,WEAPON-ITEMS 2> .X>>
+ <COND (<NOT <HERE? IN-WEAPON>>
+ <CANT-USE-HERE .OBJ "weapon shop in Accardi">
+ <RTRUE>)>
+ <TRADE-FOR-LOOT .OBJ>
+ <RTRUE>)>
+ <TRADE-FOR-LOOT .OBJ>
+ <RTRUE>>
+
+<ROUTINE CANT-USE-HERE (OBJ STR)
+ <TELL ,CTHELADY ,GLANCES-AT THE .OBJ
+ ". \"Can't use this here,\" she mutters. \"Maybe the "
+ .STR " would be interested.\"" CR>
+ <RTRUE>>
+
+"*** ORATOR ***"
+
+<OBJECT ORATOR
+ (DESC "orator")
+ (FLAGS LIVING PERSON VOWEL TRANSPARENT)
+ (LIFE 0)
+ (SYNONYM ORATOR SPEAKER MAN GUY FELLOW PERSON)
+ (DESCFCN ORATOR-F)
+ (ACTION ORATOR-F)>
+
+<ROUTINE ORATOR-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL CA ,ORATOR " stands nearby, addressing the crowd.">
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-WINNER>
+ <RFALSE>)
+ (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO " looks and acts very important." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT PCROWD
+ (DESC "throng")
+ (FLAGS NODESC LIVING PERSON PLURAL TRANSPARENT)
+ (SYNONYM THRONG CROWD PEOPLE)
+ ; (ACTION PCROWD-F)>
+
+"*** PRINCE ***"
+
+<OBJECT PRINCE
+ (LOC HORSE)
+ (DESC "prince")
+ (SDESC DESCRIBE-PRINCE)
+ (FLAGS NODESC LIVING PERSON TRYTAKE NOALL TRANSPARENT)
+ (SYNONYM PRINCE MAN GUY FELLOW RIDER ZZZP ZZZP ZZZP)
+ (ADJECTIVE PRINCE\'S ZZZP)
+ (CONTFCN PRINCE-F)
+ (ACTION PRINCE-F)>
+
+<ROUTINE DESCRIBE-PRINCE (OBJ)
+ <COND (<IS? .OBJ ,SLEEPING>
+ <TELL "dead ">)>
+ <TELL 'PRINCE>
+ <RTRUE>>
+
+<ROUTINE PRINCE-F ("OPT" (CONTEXT <>) "AUX" OBJ X)
+ <COND (<T? .CONTEXT>
+ <COND (<EQUAL? .CONTEXT ,M-CONT>
+ <SET OBJ ,PRSO>
+ <COND (<THIS-PRSI?>
+ <SET OBJ ,PRSI>)>
+ <COND (<ZERO? .OBJ>)
+ (<SET X <TOUCHING?>>
+ <TELL ,CANT "reach " THE .OBJ
+ ,AT-MOMENT>
+ <RTRUE>)>
+ <RFALSE>)>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <BATTLE-MISS>
+ <RTRUE>)>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <CONTEMPT>
+ <RFATAL>)
+ (<VERB? EXAMINE LOOK-ON>
+ <TELL "He's wearing " A ,HELM ,PERIOD>
+ <RTRUE>)
+ (<SET X <TOUCHING?>>
+ <ZING>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE CONTEMPT ()
+ <PCLEAR>
+ <TELL CTHEO
+" silences you with a gesture of contempt." CR>
+ <RTRUE>>
+
+<ROUTINE DEAD-PRINCE-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<NOUN-USED? ,W?HEAD>
+ <COND (<NOT <IN? ,HORSE ,TRENCH>>
+ <SAY-SLAY>
+ <RFATAL>)>
+ <TELL ,CANT "see it anymore." CR>
+ <RFATAL>)>
+ <COND (<SET X <TOUCHING?>>
+ <TELL "Ick! He's all bloody." CR>
+ <RTRUE>)
+ (<THIS-PRSI?>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <NOT-LIKELY>
+ <PRINT " would respond.|">
+ <RTRUE>)
+ (<VERB? EXAMINE LOOK-ON SEARCH>
+ <TELL "His head is missing. Yuk." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE SAY-SLAY ("AUX" X)
+ <TELL "As you ">
+ <COND (<SET X <SEEING?>>
+ <TELL "peer into ">)
+ (<SET X <TOUCHING?>>
+ <TELL "reach towards ">)
+ (T
+ <TELL "approach ">)>
+ <TELL THE ,TRENCH ", a ">
+ <SLAY-HORSE>
+ <RTRUE>>
+
+<OBJECT KNIGHT
+ (LOC BHORSE)
+ (DESC "knight")
+ (FLAGS LIVING PERSON TRANSPARENT)
+ (SYNONYM KNIGHT MAN GUY FELLOW RIDER)
+ (ACTION KNIGHT-F)>
+
+<ROUTINE KNIGHT-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <BATTLE-MISS>
+ <RTRUE>)>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <CONTEMPT>
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <TELL
+"His regal bearing does not disguise his youth." CR>
+ <RTRUE>)
+ (<SET X <TOUCHING?>>
+ <ZING>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** HUNTERS ***"
+
+<OBJECT HUNTERS
+ (DESC "hunters")
+ (FLAGS LIVING PERSON PLURAL TRANSPARENT)
+ (SYNONYM HUNTERS HUNTER PEASANTS PEASANT PEOPLE MEN GUYS)
+ (ADJECTIVE TRUFFLE)
+ (GENERIC GENERIC-HUNTERS-F)
+ (DESCFCN HUNTERS-F)
+ (ACTION HUNTERS-F)>
+
+<ROUTINE HUNTERS-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL "Hunters are foraging under the distant trees.">
+ <RTRUE>)
+ (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? SHOW GIVE FEED>
+ <DISTANT-HUNTERS>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? YELL WAVE-AT>
+ <TELL "A few of the distant " 'PRSO
+ " glance up at you, then return to work." CR>
+ <RTRUE>)
+ (<SET X <TALKING?>>
+ <PCLEAR>
+ <DISTANT-HUNTERS>
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <TELL CTHEO
+" trudge slowly among the oaks, peering at the ground." CR>
+ <RTRUE>)
+ (<VERB? WALK-TO FOLLOW>
+ <TELL CTHEO " are running around in every "
+ 'INTDIR ,PERIOD>
+ <RTRUE>)
+ (<OR <VERB? LISTEN SMELL>
+ <SET X <TOUCHING?>>>
+ <CANT-FROM-HERE>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE DISTANT-HUNTERS ()
+ <TELL "None of " THE ,HUNTERS
+ " respond. They're too far away to hear you." CR>
+ <RTRUE>>
+
+<ROUTINE GENERIC-HUNTERS-F (TBL "OPT" (LEN 0))
+ <RETURN ,HUNTER>>
+
+"*** HUNTER ***"
+
+<OBJECT HUNTER
+ (DESC "hunter")
+ (FLAGS LIVING PERSON TRANSPARENT)
+ (SYNONYM HUNTER PEASANT BOY LAD MAN GUY FELLOW)
+ (ADJECTIVE PEASANT TRUFFLE)
+ (LIFE 0)
+ (GENERIC GENERIC-HUNTERS-F)
+ (DESCFCN HUNTER-F)
+ (ACTION HUNTER-F)>
+
+<ROUTINE HUNTER-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL CA ,HUNTER " is standing nearby.">
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-CONT>
+ <COND (<SET X <TOUCHING?>>
+ <HANDS-OFF-HUNTER>
+ <RTRUE>)>
+ <RFALSE>)>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? GIVE GET-FOR>
+ <GIVE-TO-HUNTER ,PRSO>
+ <RTRUE>)
+ (<VERB? SHOW>
+ <SHOW-TO-HUNTER ,PRSO>
+ <RTRUE>)>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <PCLEAR>
+ <TELL CTHE ,HUNTER
+" frowns. \"Wha' say ye? Ye got a funny way o' talkin', ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "ma'am.\"" CR>
+ <RFATAL>)>
+ <TELL "mister.\"" CR>
+ <RFATAL>)
+ (<VERB? EXAMINE LOOK-ON>
+ <TELL CTHEO
+" is a lad of twelve or thirteen years, dressed in peasant garb. A burlap sack is slung over his narrow shoulders." CR>
+ <RTRUE>)
+ (<VERB? KISS RAPE TOUCH>
+ <HANDS-OFF-HUNTER>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE GIVE-TO-HUNTER (OBJ)
+ <COND (<GIVING-LOOT? .OBJ ,HUNTER>
+ <RTRUE>)>
+ <TELL "\"No, thanks,\" says " THE ,HUNTER
+ ", shaking his head.\"" CR>
+ <RTRUE>>
+
+<ROUTINE SHOW-TO-HUNTER (OBJ)
+ <TELL CTHE ,HUNTER ,GLANCES-AT THE .OBJ>
+ <COND (<EQUAL? .OBJ ,MINX>
+ <TELL ,PERIOD>
+ <HUNTER-SEES-MINX>
+ <RTRUE>)>
+ <PRINT ", but says nothing.|">
+ <RTRUE>>
+
+<ROUTINE HANDS-OFF-HUNTER ()
+ <TELL "\"Keep to yerself, ">
+ <MAAM-OR-MISTER>
+ <TELL "!\" cries " THE ,HUNTER ", drawing quickly away." CR>
+ <RTRUE>>
+
+<ROUTINE MAAM-OR-MISTER ()
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "ma'am">
+ <RTRUE>)>
+ <TELL "mister">
+ <RTRUE>>
+
+"*** MINX! ***"
+
+<OBJECT MINX
+ (DESC "minx")
+ (SDESC DESCRIBE-MINX)
+ (FLAGS TRYTAKE NOALL LIVING PERSON TRANSPARENT FEMALE NAMEABLE)
+ (LIFE 0)
+ (SIZE 7)
+ (SYNONYM MINX MINX ZZZP)
+ (ADJECTIVE AWAKE ZZZP)
+ (NAME-TABLE <ITABLE %<+ ,NAMES-LENGTH 1> (BYTE) 0>)
+ (DESCFCN MINX-F)
+ (ACTION MINX-F)>
+
+<ROUTINE DESCRIBE-MINX (OBJ)
+ <COND (<IS? .OBJ ,NAMED>
+ <PRINT-TABLE <GETP .OBJ ,P?NAME-TABLE>>
+ <COND (<ZERO? ,INV-PRINTING?>
+ <RTRUE>)>
+ <TELL ,STHE>)>
+ <PRINTD .OBJ>
+ <RTRUE>>
+
+<ROUTINE MINX-F ("OPT" (CONTEXT <>) "AUX" X)
+ <SETG P-IT-OBJECT ,MINX>
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <MAKE ,MINX ,SEEN>
+ <TELL CA ,MINX>
+ <COND (<SEE-ANYTHING-IN? ,MINX>
+ <TELL ,WITH>
+ <CONTENTS ,MINX>
+ <TELL " in its mouth">)>
+ <TELL " is playing at your feet.">
+ <RTRUE>)
+ (<T? .CONTEXT>
+ <RFALSE>)
+ (<AND <IN? ,MINX ,OAK>
+ <T? ,HSCRIPT>
+ <SET X <TOUCHING?>>>
+ <TELL "The thing behind " THE ,OAK
+ " shrinks out of reach." CR>
+ <RTRUE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <HARMLESS ,PRSI>
+ <RTRUE>)
+ (<VERB? SHOW>
+ <SHOW-TO-MINX>
+ <RTRUE>)
+ (<VERB? GIVE FEED>
+ <GIVE-TO-MINX>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? EXAMINE WHAT WHO>
+ <REFER-TO-PACKAGE>
+ <RFATAL>)
+ (<VERB? TELL ASK-ABOUT ASK-FOR TELL-ABOUT>
+ <PCLEAR>
+ <TELL CTHEO>
+ <COND (<PROB 50>
+ <TELL " looks at you incomprehendingly">)
+ (T
+ <TELL " gives you a blank look">)>
+ <TELL ". \"Minx?\"" CR>
+ <RFATAL>)
+ (<VERB? TOUCH>
+ <MAKE ,MINX ,SEEN>
+ <TELL CTHEO>
+ <COND (<PROB 50>
+ <TELL " purrs">)
+ (T
+ <TELL " thumps her tail">)>
+ <TELL " with pleasure. \"Minx.\"" CR>
+ <RTRUE>)
+ (<SET X <HURTING?>>
+ <HARMLESS>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE GIVE-TO-MINX ("OPT" (OBJ ,PRSO))
+ <MAKE ,MINX ,SEEN>
+ <COND (<EQUAL? .OBJ ,TRUFFLE>
+ <MINX-EATS-TRUFFLE>
+ <RTRUE>)>
+ <WRINKLES .OBJ>
+ <RTRUE>>
+
+<ROUTINE WRINKLES (OBJ)
+ <TELL CTHE ,MINX " sniffs " THE .OBJ
+ " and wrinkles her nose." CR>
+ <RTRUE>>
+
+<ROUTINE SHOW-TO-MINX ("OPT" (OBJ ,PRSO))
+ <MAKE ,MINX ,SEEN>
+ <COND (<EQUAL? .OBJ ,TRUFFLE>
+ <TELL CTHE ,MINX " eagerly thumps her tail. \"Minx!\"" CR>
+ <RTRUE>)>
+ <WRINKLES .OBJ>
+ <RTRUE>>
+
+<ROUTINE MINX-EATS-TRUFFLE ()
+ <WINDOW ,SHOWING-ALL>
+ <REMOVE ,TRUFFLE>
+ <MAKE ,MINX ,SEEN>
+ <SETG P-IT-OBJECT ,MINX>
+ <SETG P-HER-OBJECT ,MINX>
+ <TELL CTHE ,MINX>
+ <COND (<NOT <IS? ,TRUFFLE ,SEEN>>
+ <MAKE ,TRUFFLE ,SEEN>
+ <TELL " looks up at you as she sniffs the " B ,W?TRUFFLE
+". \"Minx?\" she mews, thumping her tail imploringly. When you don't object, she">)>
+ <TELL
+" pops the delicacy into her mouth, licks her paws clean and purrs with contentment." CR>
+ <RTRUE>>
+
+
+<ROUTINE KILL-MINX ()
+ <UNMAKE ,MINX ,LIVING>
+ <DEQUEUE ,I-MINX>
+ <PUTP ,MINX ,P?ACTION ,DEAD-MINX-F>
+ <REPLACE-ADJ? ,MINX ,W?AWAKE ,W?DEAD>
+ <REPLACE-ADJ? ,MINX ,W?SLEEPING ,W?DEAD>
+ <RFALSE>>
+
+<ROUTINE DEAD-MINX-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL CA ,MINX " lies nearby.">
+ <RTRUE>)>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <TELL CTHE ,MINX>
+ <PRINT " doesn't seem to hear you.|">
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <TELL CTHE ,MINX " is still as death." CR>
+ <RTRUE>)
+ (<SET X <HURTING?>>
+ <TELL "You're lucky your compassion didn't go down." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+"*** MAYOR ***"
+
+<OBJECT MAYOR
+ (DESC "Mayor")
+ (FLAGS LIVING PERSON TRANSPARENT)
+ (LIFE 0)
+ (SYNONYM MAYOR GROPE MIDGET DWARF MUNCHKIN MAN GUY FELLOW)
+ (ADJECTIVE LITTLE SMALL MAYOR)
+ (GENERIC GENERIC-MUNCHKIN-F)
+ (DESCFCN MAYOR-F)
+ (ACTION MAYOR-F)>
+
+<ROUTINE MAYOR-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL CTHE ,MAYOR " of " 'FROON ,SIS>
+ <COND (<SET X <FIRST? ,MAYOR>>
+ <TELL "standing next to you, holding ">
+ <CONTENTS ,MAYOR>)
+ (T
+ <TELL "grovelling at your feet">)>
+ <TELL ". A joyous " 'FCROWD
+ " is gathered around him.">
+ <RTRUE>)
+ (<INSULTED? ,MAYOR>
+ <RFATAL>)
+ (<EQUAL? .CONTEXT ,M-WINNER>
+ <COND (<AND <VERB? HELLO>
+ <PRSO? ROOMS MAYOR>>
+ <GREET-MAYOR>
+ <RTRUE>)
+ (<AND <VERB? GOODBYE>
+ <PRSO? ROOMS MAYOR>>
+ <BYE-MAYOR>
+ <RTRUE>)
+ (<AND <VERB? TELL-ABOUT SSHOW>
+ <PRSO? ME>>
+ <ASK-MAYOR-ABOUT ,PRSI>
+ <RFATAL>)
+ (<OR <VERB? EXAMINE WHAT WHO WHERE>
+ <AND <VERB? SHOW>
+ <PRSI? ME>>>
+ <ASK-MAYOR-ABOUT ,PRSO>
+ <RFATAL>)
+ (<AND <VERB? GIVE GET-FOR>
+ <PRSI? ME>>
+ <ASK-MAYOR-FOR ,PRSO>
+ <RFATAL>)
+ (<AND <VERB? SGIVE SGET-FOR>
+ <PRSO? ME>>
+ <ASK-MAYOR-FOR ,PRSI>
+ <RFATAL>)>
+ <TELL CTHE ,MAYOR " sighs." CR>
+ <RFATAL>)
+ (<THIS-PRSI?>
+ <COND (<VERB? GIVE GET-FOR>
+ <GIVE-TO-MAYOR ,PRSO>
+ <RTRUE>)
+ (<VERB? SHOW>
+ <SHOW-TO-MAYOR ,PRSO>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? HELLO WAVE-AT>
+ <GREET-MAYOR>
+ <RTRUE>)
+ (<VERB? GOODBYE>
+ <BYE-MAYOR>
+ <RTRUE>)
+ (<VERB? ASK-FOR>
+ <ASK-MAYOR-FOR ,PRSI>
+ <RTRUE>)
+ (<VERB? ASK-ABOUT>
+ <ASK-MAYOR-ABOUT ,PRSI>
+ <RTRUE>)
+ (<VERB? TELL-ABOUT>
+ <SHOW-TO-MAYOR ,PRSI>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE BYE-MAYOR ()
+ <TELL
+"\"Wait! Don't go yet,\" pleads " THE ,MAYOR ", holding you back." CR>
+ <RTRUE>>
+
+<ROUTINE GREET-MAYOR ()
+ <TELL "\"Greetings, O noble one.\"" CR>
+ <RTRUE>>
+
+<CONSTANT MAYOR-TABLE
+ <PLTABLE
+ <PTABLE MAYOR "My predecessor died suddenly">
+ <PTABLE FROON "Froon! A beautiful land, honorable to serve">
+ <PTABLE KEY1 "Ah, yes. Such a delicate shade of puce">
+ <PTABLE KEY2 "Mmm. Lovely mauve highlights">
+ <PTABLE KEY3 "Lavender! One of my favorite colors">>>
+
+<ROUTINE ASK-MAYOR-ABOUT (OBJ "AUX" TBL LEN X)
+ <SEE-CHARACTER ,MAYOR>
+ <COND (<NOT <VISIBLE? .OBJ>>
+ <PERPLEXED ,MAYOR>
+ <TELL "I'm uncertain as to">
+ <WHO-WHAT .OBJ>
+ <TELL "you are referring.\"" CR>
+ <RTRUE>)>
+ <SET LEN <GET ,MAYOR-TABLE 0>>
+ <REPEAT ()
+ <SET TBL <GET ,MAYOR-TABLE .LEN>>
+ <SET X <GET .TBL 0>>
+ <COND (<EQUAL? <GET .TBL 0> .OBJ>
+ <PRINTC %<ASCII !\">>
+ <TELL <GET .TBL 1> ,PERQ>
+ <RTRUE>)
+ (<DLESS? LEN 1>
+ <RETURN>)>>
+ <TELL CTHE ,MAYOR " looks at " THE ,GROUND " sheepishly">
+ <ALAS>
+ <TELL "I possess but little knowledge of ">
+ <PRONOUN .OBJ>
+ <TELL ,PERQ>
+ <RTRUE>>
+
+<ROUTINE ALAS ()
+ <TELL ". \"Alas, ">
+ <HONORED-ONE>
+ <TELL ". ">
+ <RTRUE>>
+
+<ROUTINE ASK-MAYOR-FOR (OBJ "AUX" X L)
+ <SET L <LOC .OBJ>>
+ <COND (<NOT <EQUAL? .L ,MAYOR>>
+ <COND (<VISIBLE? .OBJ>
+ <TELL "\"I notice ">
+ <COND (<IS? .OBJ ,PLURAL>
+ <TELL B ,W?SOME>)
+ (T
+ <TELL B ,W?ONE>)>
+ <TELL " there ">
+ <SAY-WHERE .L>
+ <TELL ",\" remarks " THE ,MAYOR ,PERIOD>
+ <RTRUE>)>
+ <MAYOR-SORRY>
+ <TELL "have none to offer at the moment.\"" CR>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,KEY1 ,KEY2 ,KEY3>
+ <AWARD-KEY .OBJ>
+ <RTRUE>)>
+ <MAYOR-SORRY>
+ <TELL "cannot give you ">
+ <PRONOUN .OBJ>
+ <TELL ,PERQ>
+ <RTRUE>>
+
+<ROUTINE MAYOR-SORRY ()
+ <TELL "\"My apologies, ">
+ <HONORED-ONE>
+ <TELL ",\" mumbles " THE ,MAYOR>
+ <COND (<PROB 50>
+ <TELL ", hanging his head">)>
+ <TELL ". \"I ">
+ <RTRUE>>
+
+<ROUTINE GIVE-TO-MAYOR (OBJ)
+ <COND (<GIVING-LOOT? .OBJ ,MAYOR>
+ <RTRUE>)>
+ <NO-THANKS ,MAYOR>
+ <RTRUE>>
+
+<ROUTINE HONORED-ONE ()
+ <TELL "Honored ">
+ <COND (<IS? ,PLAYER ,FEMALE>
+ <TELL "Ma'am">
+ <RTRUE>)>
+ <TELL "Sir">
+ <RTRUE>>
+
+<ROUTINE SHOW-TO-MAYOR (OBJ)
+ <TELL CTHE ,MAYOR>
+ <COND (<NOT <VISIBLE? .OBJ>>
+ <TELL " looks confused. \"What do you mean?\"" CR>
+ <RTRUE>)>
+ <TELL ,GLANCES-AT THE .OBJ
+ ", but shows only polite interest." CR>
+ <RTRUE>>
+
+<OBJECT LADY
+ (DESC "little lady")
+ (FLAGS LIVING PERSON FEMALE TRANSPARENT)
+ (SYNONYM LADY MIDGET MUNCHKIN WOMAN GIRL)
+ (ADJECTIVE LITTLE SMALL TINY MIDGET MUNCHKIN)
+ (LIFE 0)
+ (GENERIC GENERIC-MUNCHKIN-F)
+ (DESCFCN LADY-F)
+ (ACTION LADY-F)>
+
+<ROUTINE LADY-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL CA ,LADY " is standing near " THE ,FARMHOUSE C ,PER>
+ <RTRUE>)
+ (<IN? ,FCROWD ,HERE>
+ <TELL CTHE ,LADY " is lost in " THE ,FCROWD ,PERIOD>
+ <RFATAL>)
+ (<INSULTED? ,LADY>
+ <RFATAL>)
+ (<EQUAL? .CONTEXT ,M-WINNER>
+ <COND (<AND <VERB? HELLO>
+ <PRSO? ROOMS LADY>>
+ <GREET-LADY>
+ <RFATAL>)>
+ <SHY-LADY>
+ <RFATAL>)
+ (<THIS-PRSI?>
+ <COND (<VERB? GIVE GET-FOR SHOW>
+ <SHOW-TO-LADY ,PRSO>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? TELL>
+ <RFALSE>)
+ (<VERB? ASK-FOR ASK-ABOUT>
+ <SHY-LADY>
+ <RTRUE>)
+ (<VERB? TELL-ABOUT>
+ <SHOW-TO-LADY ,PRSI>
+ <RTRUE>)
+ (<VERB? HELLO WAVE-AT>
+ <GREET-LADY>
+ <RTRUE>)
+ (<VERB? EXAMINE>
+ <TELL
+"Her bright, colorful garb blends in with the flowers." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE SHOW-TO-LADY (OBJ)
+ <COND (<NOT <VISIBLE? .OBJ>>
+ <SHY-LADY>
+ <RTRUE>)>
+ <TELL CTHE ,LADY ,GLANCES-AT THE .OBJ
+ ", blushes, and says nothing." CR>
+ <RTRUE>>
+
+<ROUTINE SHY-LADY ()
+ <TELL CTHE ,LADY " blushes. She's too shy to respond." CR>
+ <RTRUE>>
+
+<ROUTINE GREET-LADY ()
+ <TELL CTHE ,LADY " nods at you shyly." CR>
+ <RTRUE>>
+
+<OBJECT FCROWD
+ (DESC "crowd")
+ (FLAGS LIVING PERSON TRANSPARENT)
+ (SYNONYM CROWD PEOPLE MUNCHKINS MUNCHKIN GATHERING)
+ (ADJECTIVE MUNCHKIN LITTLE)
+ (GENERIC GENERIC-MUNCHKIN-F)
+ (DESCFCN FCROWD-F)
+ (ACTION FCROWD-F)>
+
+<ROUTINE FCROWD-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL "A joyous " 'FCROWD
+" of little people is standing all around you.">
+ <RTRUE>)
+ (<INSULTED? ,FCROWD>
+ <RFATAL>)
+ (<EQUAL? .CONTEXT ,M-WINNER>
+ <COND (<AND <VERB? HELLO>
+ <PRSO? ROOMS FCROWD>>
+ <CROWD-GREET>
+ <RFATAL>)>
+ <LOUD-CROWD>
+ <RFATAL>)
+ (<THIS-PRSI?>
+ <COND (<VERB? GIVE GET-FOR SHOW>
+ <TELL "No one in " THEI
+ " shows any interest." CR>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? TELL>
+ <RFALSE>)
+ (<VERB? HELLO WAVE-AT>
+ <CROWD-GREET>
+ <RTRUE>)
+ (<VERB? ASK-FOR ASK-ABOUT TELL-ABOUT>
+ <LOUD-CROWD>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE CROWD-GREET ()
+ <TELL CTHE ,FCROWD " waves and cheers." CR>
+ <RTRUE>>
+
+<ROUTINE LOUD-CROWD ()
+ <TELL CTHE ,FCROWD
+" is cheering too loudly to hear you." CR>
+ <RTRUE>>
+
+<ROUTINE INSULTED? (OBJ)
+ <COND (<OR <NOUN-USED? ,W?MUNCHKIN ,W?MUNCHKINS>
+ <ADJ-USED? ,W?MUNCHKIN>>
+ <TELL CTHE .OBJ " covers ">
+ <HAND-PRONOUN .OBJ>
+ <TELL " ears with ">
+ <HAND-PRONOUN .OBJ>
+ <TELL " hands. \"Don't call ">
+ <COND (<EQUAL? .OBJ ,FCROWD>
+ <TELL B ,W?US>)
+ (T
+ <TELL B ,W?ME>)>
+ <TELL " that!\"" CR>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE HAND-PRONOUN (OBJ)
+ <COND (<EQUAL? .OBJ ,FCROWD>
+ <TELL "their">
+ <RTRUE>)
+ (<EQUAL? .OBJ ,MAYOR>
+ <TELL "his">
+ <RTRUE>)>
+ <TELL "her">
+ <RTRUE>>
+
+<ROUTINE GENERIC-MUNCHKIN-F (TBL "OPT" (LEN <GET .TBL 0>))
+ <COND (<IN? ,MAYOR ,HERE>
+ <RETURN ,MAYOR>)>
+ <RETURN ,FCROWD>>
+
+"*** IMPLEMENTORS ***"
+
+<OBJECT IMPS
+ (DESC "Implementors")
+ (FLAGS LIVING PERSON PLURAL TRANSPARENT)
+ (SYNONYM IMPLEMENTORS IMPS IMP PEOPLE MEN GROUP)
+ (LIFE I-IMPS)
+ (DESCFCN IMPS-F)
+ (CONTFCN IMPS-F)
+ (ACTION IMPS-F)>
+
+<ROUTINE IMPS-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL
+"A group of Implementors is seated around a food-laden table">
+ <COND (<IN? ,COCO ,IMPS>
+ <TELL ", playing catch with a coconut.">
+ <RTRUE>)
+ (<IN? ,GOBLET ,IMPS>
+ <TELL ". One of them is holding out a ">
+ <PRINT "goblet for you to take.|">
+ <RTRUE>)>
+ <TELL ", glaring at you angrily.">
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-CONT>
+ <COND (<EQUAL? ,GOBLET ,PRSO ,PRSI>
+ <RFALSE>)
+ (<SET X <TOUCHING?>>
+ <TELL CTHE ,IMPS " won't let you near." CR>
+ <RTRUE>)>
+ <RFALSE>)
+ (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <PCLEAR>
+ <TELL
+"\"I think I just heard something insignificant,\" remarks an Implementor"
+,PTAB "\"How dull,\" replies another, stifling a yawn." CR>
+ <RFATAL>)
+ (<VERB? EXAMINE WHAT WHO WHERE>
+ <REFER-TO-PACKAGE>
+ <RFATAL>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT CONGREG
+ (LOC IN-CHAPEL)
+ (DESC "congregation")
+ (FLAGS LIVING PERSON NODESC TRANSPARENT)
+ (SYNONYM CONGREGATION CROWD PEOPLE FOLKS)
+ (ACTION CONGREG-F)>
+
+<ROUTINE CONGREG-F ("OPT" (CONTEXT <>))
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <RFALSE>)
+ (<VERB? EXAMINE>
+ <TELL "Their heads are bowed in fervent prayer." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT CLERIC
+ (LOC IN-CHAPEL)
+ (DESC "Cardinal Toolbox")
+ (FLAGS NODESC NOARTICLE PERSON TRANSPARENT ; LIVING)
+ (SYNONYM TOOLBOX CARDINAL CLERIC PRIEST MAN FELLOW GUY SIR)
+ (ADJECTIVE CARDINAL)
+ (LIFE I-CLERIC)
+ (DESCFCN CLERIC-F)
+ (CONTFCN CLERIC-F)
+ (ACTION CLERIC-F)>
+
+<ROUTINE CLERIC-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL CTHE ,CLERIC
+" is here, surrounded by a grateful crowd of villagers. He's holding ">
+ <CONTENTS ,CLERIC>
+ <TELL C ,PER>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-CONT>
+ <COND (<SET X <TOUCHING?>>
+ <NOT-SO-FAST ,CLERIC>
+ <RTRUE>)>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-WINNER>
+ <COND (<AND <VERB? HELLO>
+ <PRSO? ROOMS CLERIC>>
+ <GREET-CLERIC>
+ <RFATAL>)
+ (<AND <VERB? TELL-ABOUT SSHOW>
+ <PRSO? ME>>
+ <ASK-CLERIC-ABOUT ,PRSI>
+ <RFATAL>)
+ (<OR <VERB? EXAMINE WHAT WHO WHERE>
+ <AND <VERB? SHOW>
+ <PRSI? ME>>>
+ <ASK-CLERIC-ABOUT ,PRSO>
+ <RFATAL>)
+ (<AND <VERB? GIVE GET-FOR>
+ <PRSI? ME>>
+ <ASK-CLERIC-FOR ,PRSO>
+ <RFATAL>)
+ (<AND <VERB? SGIVE SGET-FOR>
+ <PRSO? ME>>
+ <ASK-CLERIC-FOR ,PRSI>
+ <RFATAL>)>
+ <TELL "\"Your accent is strange. I don't understand.\"" CR>
+ <RFATAL>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <HARMLESS ,PRSI>
+ <RTRUE>)
+ (<VERB? GIVE GET-FOR>
+ <GIVE-TO-CLERIC ,PRSO>
+ <RTRUE>)
+ (<VERB? SHOW>
+ <DO-GLANCE ,CLERIC ,PRSO>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? TELL>
+ <COND (<T? ,P-CONT>
+ <RFALSE>)>
+ <NO-RESPONSE>
+ <RTRUE>)
+ (<VERB? EXAMINE>
+ <TELL "He">
+ <COND (<SEE-ANYTHING-IN?>
+ <TELL "'s holding ">
+ <CONTENTS>
+ <TELL ", and">)>
+ <TELL " looks as if he hasn't slept for days." CR>
+ <RTRUE>)
+ (<VERB? ASK-FOR>
+ <ASK-CLERIC-FOR ,PRSI>
+ <RTRUE>)
+ (<VERB? ASK-ABOUT>
+ <ASK-CLERIC-ABOUT ,PRSI>
+ <RTRUE>)
+ (<VERB? TELL-ABOUT>
+ <DO-GLANCE ,CLERIC ,PRSI>
+ <RTRUE>)
+ (<VERB? HELLO WAVE-AT>
+ <GREET-CLERIC>
+ <RTRUE>)
+ (<SET X <HURTING?>>
+ <HARMLESS>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE GREET-CLERIC ()
+ <TELL CTHE ,CLERIC " bows deeply." CR>
+ <RTRUE>>
+
+<CONSTANT CLERIC-TABLE
+ <PLTABLE
+ <PTABLE CLERIC "I preside over this humble diocese">
+ <PTABLE ORKAN "He disappeared a few weeks ago without trace">
+ <PTABLE THRIFF "I preside over this humble diocese">
+ <PTABLE XTREES "Woe is us! Woe">>>
+
+<ROUTINE ASK-CLERIC-ABOUT (OBJ "AUX" TBL LEN X)
+ <COND (<WHAT-TALK? ,CLERIC .OBJ>
+ <RTRUE>)>
+ <SET LEN <GET ,CLERIC-TABLE 0>>
+ <REPEAT ()
+ <SET TBL <GET ,CLERIC-TABLE .LEN>>
+ <SET X <GET .TBL 0>>
+ <COND (<EQUAL? <GET .TBL 0> .OBJ>
+ <PRINTC %<ASCII !\">>
+ <TELL <GET .TBL 1> ,PERQ>
+ <RTRUE>)
+ (<DLESS? LEN 1>
+ <RETURN>)>>
+ <TELL CTHE ,CLERIC " shrugs. \"I claim little knowledge of ">
+ <PRONOUN .OBJ>
+ <TELL ,PERQ>
+ <RTRUE>>
+
+<ROUTINE ASK-CLERIC-FOR (OBJ)
+ <MAKE ,CLERIC ,SEEN>
+ <COND (<AND <EQUAL? .OBJ ,RELIQUARY>
+ <IN? .OBJ ,CLERIC>>
+ <GET-RELIQUARY>
+ <RTRUE>)>
+ <TELL CTHE ,CLERIC
+" searches the pockets of his robes. \"Alas. I have none to offer.\"" CR>
+ <RTRUE>>
+
+<ROUTINE GET-RELIQUARY ()
+ <EXIT-CLERIC>
+ <MOVE ,RELIQUARY ,PLAYER>
+ <TELL CTHE ,CLERIC
+ " grudgingly surrenders " THE ,RELIQUARY " and">
+ <PRINT " disappears into the ">
+ <TELL "crowd, which soon wanders away." CR>
+ <RTRUE>>
+
+<ROUTINE GIVE-TO-CLERIC (OBJ)
+ <MAKE ,CLERIC ,SEEN>
+ <COND (<GIVING-LOOT? .OBJ ,CLERIC>
+ <RTRUE>)>
+ <NO-THANKS ,CLERIC>
+ <RTRUE>>
+
+"*** ORKAN ***"
+
+<OBJECT MSTAR
+ (LOC GLOBAL-OBJECTS)
+ (DESC "Morningstar")
+ (FLAGS NORARTICLE NODESC FEMALE)
+ (SYNONYM MORNINGSTAR MORNING\-STAR PRINCESS)
+ (ADJECTIVE PRINCESS)
+ (ACTION MISSING-F)>
+
+<OBJECT ORKAN
+ (LOC GLOBAL-OBJECTS)
+ (DESC "Orkan")
+ (FLAGS NOARTICLE NODESC VOWEL)
+ (SYNONYM ORKAN)
+ (ACTION MISSING-F)>
+
+<ROUTINE MISSING-F ("AUX" OBJ)
+ <SET OBJ ,PRSO>
+ <COND (<ZERO? ,PRSI>)
+ (<THIS-PRSI?>
+ <SET OBJ ,PRSI>)>
+ <PCLEAR>
+ <TELL "Alas. " CTHE .OBJ " isn't here" ,AT-MOMENT>
+ <RFATAL>>
+
+"*** QUEEN ***"
+
+<OBJECT QUEEN
+ (DESC "platypus")
+ (SDESC DESCRIBE-QUEEN)
+ (FLAGS NODESC LIVING PERSON FEMALE TRANSPARENT)
+ (LIFE I-QUEEN)
+ (SYNONYM PLATYPUS CREATURE QUEEN LADY WOMAN HIGHNESS ALEXIS)
+ (ADJECTIVE YOUR FURRY)
+ (DESCFCN QUEEN-F)
+ (CONTFCN QUEEN-F)
+ (ACTION QUEEN-F)>
+
+<ROUTINE DESCRIBE-QUEEN (OBJ)
+ <TELL "furry " B ,W?CREATURE>
+ <RTRUE>>
+
+<ROUTINE QUEEN-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-OBJDESC>
+ <TELL CA ,QUEEN " is preening herself nearby">
+ <COND (<SEE-ANYTHING-IN? ,QUEEN>
+ <TELL ". She's clutching ">
+ <CONTENTS ,QUEEN>
+ <TELL " in her paw">)>
+ <TELL C ,PER>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-CONT>
+ <COND (<SET X <TOUCHING?>>
+ <QUEEN-SEES-YOU>
+ <RTRUE>)>
+ <RFALSE>)
+ (<T? .CONTEXT>
+ <RFALSE>)
+ (<AND <NOUN-USED? ,W?PLATYPUS ,W?ALEXIS>
+ <GETP ,QUEEN ,P?SDESC>
+ <NOT <IS? ,QUEEN ,IDENTIFIED>>>
+ <MAKE ,QUEEN ,IDENTIFIED>
+ <TELL "[Good guess." ,BRACKET>)>
+ <COND (<THIS-PRSI?>
+ <COND (<VERB? GIVE SHOW FEED>
+ <APPROACH-QUEEN>
+ <RTRUE>)>
+ <RFALSE>)
+ (<VERB? HIT MUNG WALK-TO WAVE-AT FOLLOW RAPE UNDRESS>
+ <QUEEN-SEES-YOU>
+ <RTRUE>)
+ (<SET X <TALKING?>>
+ <APPROACH-QUEEN "at the sound of your voice">
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <TELL "Her red gown is a bit too snug">
+ <COND (<SEE-ANYTHING-IN?>
+ <TELL ". She's holding ">
+ <CONTENTS>
+ <TELL " in one of her paws">)>
+ <PRINT ,PERIOD>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE APPROACH-QUEEN ("OPT" (STR <>))
+ <COND (<NOT <IS? ,QUEEN ,TOUCHED>>
+ <MAKE ,QUEEN ,TOUCHED>
+ <MAKE ,QUEEN ,SEEN>
+ <TELL CTHE ,QUEEN
+" glances around her garden, listening intently. Anxious moments pass; then, hearing nothing further, she turns her back with a shrug." CR>
+ <RTRUE>)>
+ <QUEEN-SEES-YOU .STR>
+ <RTRUE>>
+
+<ROUTINE QUEEN-SEES-YOU ("OPT" (STR <>))
+ <TELL CTHE ,QUEEN " wheels around ">
+ <COND (<T? .STR>
+ <TELL .STR>)
+ (T
+ <TELL "as you step into view">)>
+ <TELL
+". \"A spy!\" she cries, blowing a shrill note on her whistle.|
+ Before you can think or move, twenty-seven heavily armed platypus guards materialize around you. After suffering exquisite torture at the skilled hands of the Queen, you're led away to twenty years of backbreaking labor in the granola mines of Antharia">
+ <JIGS-UP>
+ <RTRUE>>
+
+<OBJECT CONDUCTOR
+ (LOC GONDOLA)
+ (DESC "conductor")
+ (FLAGS LIVING PERSON NODESC TRANSPARENT)
+ (SYNONYM CONDUCTOR MAN GUY FELLOW)
+ (ADJECTIVE GONDOLA)
+ (ACTION CONDUCTOR-F)>
+
+<ROUTINE CONDUCTOR-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <TELL "Passengers block your target." CR>
+ <RTRUE>)
+ (<VERB? GIVE SHOW FEED>
+ <CONDUCTOR-BUSY>
+ <RTRUE>)>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <PCLEAR>
+ <CONDUCTOR-BUSY>
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <TELL "His face is sallow with boredom." CR>
+ <RTRUE>)
+ (<SET X <TOUCHING?>>
+ <TELL "A crowd of " 'PASSENGERS
+ " bars your approach." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE CONDUCTOR-BUSY ()
+ <TELL CTHE ,CONDUCTOR " is too busy ">
+ <COND (<HERE? AT-DOCK>
+ <TELL "herding " 'PASSENGERS>)
+ (T
+ <TELL "with his monologue">)>
+ <PRINT " to pay you much heed.|">
+ <RTRUE>>
+
+<OBJECT PASSENGERS
+ (LOC GONDOLA)
+ (DESC "passengers")
+ (FLAGS PLURAL NODESC PERSON LIVING TRANSPARENT)
+ (SYNONYM PASSENGER PEOPLE CROWD RIDERS)
+ (ACTION PASSENGERS-F)>
+
+<ROUTINE PASSENGERS-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<T? .CONTEXT>
+ <RFALSE>)
+ (<THIS-PRSI?>
+ <COND (<VERB? THROW THROW-OVER>
+ <TELL "You might hurt somebody." CR>
+ <RTRUE>)
+ (<VERB? GIVE SHOW FEED>
+ <PASSENGERS-BUSY>
+ <RTRUE>)>
+ <RFALSE>)
+ (<SET X <TALKING?>>
+ <PCLEAR>
+ <PASSENGERS-BUSY>
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <TELL "A suspicious passenger returns your stare." CR>
+ <RTRUE>)
+ (<SET X <TOUCHING?>>
+ <TELL
+"Suspicious " 'PASSENGERS " edge away from your approach." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE PASSENGERS-BUSY ()
+ <TELL CTHE ,PASSENGERS " are too busy ">
+ <COND (<HERE? AT-DOCK>
+ <TELL "crowding around " THE ,GONDOLA>)
+ (T
+ <TELL "gawking at the scenery">)>
+ <PRINT " to pay you much heed.|">
+ <RTRUE>>
+
+
+
+
+
+
+
+ \ No newline at end of file
diff --git a/places.zil b/places.zil
new file mode 100644
index 0000000..7a611dd
--- /dev/null
+++ b/places.zil
@@ -0,0 +1,6152 @@
+"PLACES for BEYOND ZORK:
+ Copyright (C)1987 Infocom, Inc. All rights reserved."
+
+<ROUTINE GET-OWOMAN-AND-CURTAIN ()
+ <MAKE ,CURTAIN ,NODESC>
+ <COND (<NOT <IN? ,CURTAIN ,HERE>>
+ <MOVE ,CURTAIN ,HERE>)>
+ <PUTP ,OWOMAN ,P?LAST-LOC ,HERE>
+ <COND (<NOT <IN? ,OWOMAN ,HERE>>
+ <MOVE ,OWOMAN ,HERE>)>
+ <REMOVE-ALL ,OWOMAN>
+ <SEE-CHARACTER ,OWOMAN>
+ <RFALSE>>
+
+<ROUTINE GET-DACT? ()
+ <COND (<AND <NOT <IS? ,DACT ,TOUCHED>>
+ <NOT <IS? ,HERE ,TOUCHED>>
+ <LAST-ROOM-IN? ,MOOR-ROOMS 2>>
+ <MAKE ,DACT ,TOUCHED>
+ <MOVE ,DACT ,HERE>
+ <QUEUE ,I-DACT>
+ <RTRUE>)>
+ <RFALSE>>
+
+<OBJECT HILLTOP
+ (LOC ROOMS)
+ (DESC "Hilltop")
+ (FLAGS LIGHTED LOCATION)
+ (EAST <SAY-TO COVESIDE "You amble down the hill.">)
+ (NW <TO ON-PIKE>)
+ (DOWN <PER EXIT-A-TREE>)
+ (UP <PER CLIMB-A-TREE>)
+ (OVERHEAD OAK2)
+ (EXIT-STR "The hillside is too steep that way.")
+ (GLOBAL GRUBBO)
+ (FNUM OGRUBBO)
+ (THINGS (<> HILL HERE-F)
+ (<> HILLTOP HERE-F)
+ (GREAT SEA USELESS)
+ (<> SHORE USELESS))
+ (ACTION HILLTOP-F)>
+
+"SEEN = seen morning."
+
+<ROUTINE HILLTOP-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"The horizon is lost in the glare of morning upon the Great Sea. You shield your eyes to sweep the shore below, where a village lies nestled beside a quiet cove." CR>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <SETG P-IT-OBJECT ,OAK2>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?DOWN>
+ <SETG P-WALK-DIR ,P?EAST>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT COVESIDE
+ (LOC ROOMS)
+ (DESC "Cove")
+ (FLAGS LIGHTED LOCATION)
+ (NE <TO AT-LEDGE 3>)
+ (EAST <TO ON-WHARF>)
+ (SOUTH <TO OUTSIDE-PUB>)
+ (WEST <TO HILLTOP>)
+ (UP <TO HILLTOP>)
+ (GLOBAL GRUBBO WHARF)
+ (FNUM OGRUBBO)
+ (THINGS (<> COVE HERE-F)
+ (<> GULLS USELESS)
+ (<> SHANTIES <>))
+ (ACTION COVESIDE-F)>
+
+<ROUTINE COVESIDE-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Gulls circle the far end of a wharf extending east across the cove. The street is dotted with shanties bleached by years of sun and salt." CR>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?UP>
+ <SETG P-WALK-DIR ,P?WEST>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT OUTSIDE-PUB
+ (LOC ROOMS)
+ (DESC "Outside Pub")
+ (FLAGS LIGHTED LOCATION)
+ (NORTH <TO COVESIDE>)
+ (SOUTH <TO N-MOOR>)
+ (WEST <THRU PUB-DOOR IN-PUB>)
+ (IN <THRU PUB-DOOR IN-PUB>)
+ (GLOBAL PUB-DOOR PUB GRUBBO)
+ (FNUM OGRUBBO)
+ (HEAR PUB)
+ (ODOR PUB)
+ (ACTION OUTSIDE-PUB-F)>
+
+<ROUTINE OUTSIDE-PUB-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL "Harsh laughter and mouthwatering aromas waft ">
+ <COND (<IS? ,PUB-DOOR ,OPENED>
+ <TELL "through the open ">)
+ (T
+ <TELL "out from under the ">)>
+ <TELL "door of a shanty on the street's west side. ">
+ <DESCRIBE-PUB-SIGN>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE DESCRIBE-PUB-SIGN ("AUX" X)
+ <TELL
+"The words \"Ye Rusty Lantern, A Publick House\" appear in fading script above ">
+ <COND (<SET X <FIRST? ,PUB-SIGN>>
+ <THIS-IS-IT .X>
+ <COND (<EQUAL? .X ,LANTERN>
+ <TELL "a real " D .X>)
+ (T
+ <TELL A .X>)>
+ <TELL ", dangling from a ">)
+ (T
+ <SETG P-IT-OBJECT ,PUB-SIGN>
+ <TELL "an empty ">)>
+ <TELL "hook." CR>
+ <RTRUE>>
+
+<OBJECT N-MOOR
+ (LOC ROOMS)
+ (DESC "Moor's Edge")
+ (FLAGS LIGHTED LOCATION)
+ (NORTH <TO OUTSIDE-PUB>)
+ (SOUTH <PER N-MOOR-S 1>)
+ (FNUM OGRUBBO)
+ (GLOBAL GRUBBO)
+ (ACTION N-MOOR-F)>
+
+<ROUTINE N-MOOR-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"A gray scrim of mist lies across the southern moors, obscuring the path only a few steps away. The outskirts of a village">
+ <PRINT " can be seen not far to the north.|">
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?NORTH>
+ <COND (<T? ,AUTO>
+ <BMODE-OFF>)>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT IN-GAS
+ (LOC ROOMS)
+ (DESC "Gasses")
+ (FLAGS LIGHTED LOCATION)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OMOOR)
+ (EXIT-STR "Tall reeds block your path.")
+ (GLOBAL SWAMP FOG)
+ (ACTION IN-GAS-F)>
+
+<ROUTINE IN-GAS-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Your feet make wet, sucking noises as you trudge across patches of rotting vegetable matter. An unwholesome miasma of gasses is making your head swim." CR>
+ <MENTION-MOOR-EXIT>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+; <ROUTINE DO-GAS-EXIT ("AUX" DIR CNT TBL)
+ <COND (<OR <EQUAL? ,P-WALK-DIR ,P?IN ,P?OUT>
+ <EQUAL? ,P-WALK-DIR ,P?UP ,P?DOWN>>
+ <RFALSE>)>
+ <SET DIR ,P?NW>
+ <SET CNT 1>
+ <REPEAT ()
+ <SET TBL <GETP ,HERE .DIR>>
+ <COND (<ZERO? .TBL>)
+ (<EQUAL? <MSB <GET .TBL ,XTYPE>> ,CONNECT>
+ <INC CNT>
+ <PUT ,GOOD-DIRS .CNT .DIR>)>
+ <COND (<IGRTR? DIR ,P?NORTH>
+ <RETURN>)>>
+ <COND (<EQUAL? .CNT 2>
+ <SET DIR <GET ,GOOD-DIRS 2>>)
+ (T
+ <PUT ,GOOD-DIRS 0 .CNT>
+ <PUT ,GOOD-DIRS 1 0>
+ <PROG ()
+ <SET DIR <PICK-ONE ,GOOD-DIRS>>
+ <COND (<EQUAL? .DIR ,PRSO>
+ <AGAIN>)>>)>
+ <COND (<PROB <- ,STATMAX <GET ,STATS ,LUCK>>>
+ <SETG PRSO .DIR>
+ <SETG P-WALK-DIR .DIR>
+ <TELL
+"You stumble uncertainly in the whirling gas." CR>
+ <COND (<T? ,VERBOSITY>
+ <CRLF>)>)>
+ <RFALSE>>
+
+<OBJECT MOOR2
+ (LOC ROOMS)
+ (DESC "Eyes")
+ (FLAGS LIGHTED LOCATION)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OMOOR)
+ (EXIT-STR "Tall reeds block your path.")
+ (GLOBAL SWAMP FOG)
+ (ACTION MOOR2-F)>
+
+<ROUTINE MOOR2-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Silent, unblinking eyes peer down at you from the fog-shrouded trees." CR>
+ <MENTION-MOOR-EXIT>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <GET-DACT?>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT MOOR3
+ (LOC ROOMS)
+ (DESC "Deep Mist")
+ (FLAGS LIGHTED LOCATION)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OMOOR)
+ (EXIT-STR "Tall reeds block your path.")
+ (GLOBAL SWAMP FOG)
+ (ACTION MOOR3-F)>
+
+<ROUTINE MOOR3-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Spooky fingers of mist swirl around your feet. It's hard to see more than a few yards in any " 'INTDIR ,PERIOD>
+ <MENTION-MOOR-EXIT>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <GET-DACT?>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT MOOR4
+ (LOC ROOMS)
+ (DESC "Noises")
+ (FLAGS LIGHTED LOCATION)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OMOOR)
+ (EXIT-STR "Tall reeds block your path.")
+ (GLOBAL SWAMP FOG)
+ (ACTION MOOR4-F)>
+
+<ROUTINE MOOR4-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"A cacophony of peeps, hoots and croaks sets your nerves on edge." CR>
+ <MENTION-MOOR-EXIT>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <GET-DACT?>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT MOOR5
+ (LOC ROOMS)
+ (DESC "Mud Flats")
+ (FLAGS LIGHTED LOCATION)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OMOOR)
+ (EXIT-STR "Tall reeds block your path.")
+ (GLOBAL SWAMP FOG)
+ (ACTION MOOR5-F)>
+
+<ROUTINE MOOR5-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Narrow paths wander off between pools of black, fetid mud. The damp chill in the air is making you shiver." CR>
+ <MENTION-MOOR-EXIT>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <GET-DACT?>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT MOOR6
+ (LOC ROOMS)
+ (DESC "Odors")
+ (FLAGS LIGHTED LOCATION)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OMOOR)
+ (EXIT-STR "Tall reeds block your path.")
+ (GLOBAL SWAMP FOG)
+ (ACTION MOOR6-F)>
+
+<ROUTINE MOOR6-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Gray wraiths of mist linger among the reeds, filling your nostrils with the odor of things long dead." CR>
+ <MENTION-MOOR-EXIT>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <GET-DACT?>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE MENTION-MOOR-EXIT ("AUX" (WRD 0) TBL)
+ <SET TBL <GETP ,HERE ,P?SW>>
+ <COND (<AND <T? .TBL>
+ <EQUAL? <GET .TBL ,XROOM> ,SW-MOOR>>
+ <SET WRD ,W?SOUTHWEST>)
+ (T
+ <SET TBL <GETP ,HERE ,P?NORTH>>
+ <COND (<AND <T? .TBL>
+ <EQUAL? <GET .TBL ,XROOM> ,N-MOOR>>
+ <SET WRD ,W?NORTH>)>)>
+ <COND (<ZERO? .WRD>
+ <RFALSE>)>
+ <TELL ,TAB "The mist thins out a bit to the " B .WRD ,PERIOD>
+ <RTRUE>>
+
+<OBJECT SW-MOOR
+ (LOC ROOMS)
+ (DESC "Bluffs")
+ (FLAGS LIGHTED LOCATION)
+ (NE <PER SW-MOOR-NE 5>)
+ (WEST <TO IN-PORT>)
+ (FNUM OMIZNIA)
+ (ACTION SW-MOOR-F)>
+
+<ROUTINE SW-MOOR-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Circling gulls and a forest of masts disclose a seaport not far to the west. The view to the northeast is obscured by a blanket of mist." CR>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?SW>
+ <COND (<T? ,AUTO>
+ <BMODE-OFF>)>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT IN-PORT
+ (LOC ROOMS)
+ (DESC "Mizniaport")
+ (FLAGS LIGHTED LOCATION)
+ (NORTH <THRU BOUTIQUE-DOOR IN-BOUTIQUE>)
+ (IN <THRU BOUTIQUE-DOOR IN-BOUTIQUE>)
+ (NE <TO IN-YARD>)
+ (EAST <TO SW-MOOR>)
+ (SE <SORRY "You'd fall in the bay if you went that way.">)
+ (SOUTH <SORRY "You'd fall in the bay if you went that way.">)
+ (SW <SORRY "You'd fall in the bay if you went that way.">)
+ (WEST <TO AT-DOCK>)
+ (NW <TO XROADS 11>)
+ (FNUM OMIZNIA)
+ (GLOBAL BOUTIQUE-DOOR BOUTIQUE STABLE)
+ (ACTION IN-PORT-F)>
+
+<ROUTINE IN-PORT-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Mizniaport is a magnet for the wealthy yipples of Borphee, who browse the colorful shops in search of next year's fashions" ,PTAB
+"An especially swank boutique stands just north of here. Beside it, a path marked \"Private Way\" bends northeast." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT IN-YARD
+ (LOC ROOMS)
+ (DESC "Private Way")
+ (FLAGS LIGHTED LOCATION)
+ (NORTH <TO IN-STABLE>)
+ (IN <TO IN-STABLE>)
+ (SW <TO IN-PORT>)
+ (FNUM OMIZNIA)
+ (GLOBAL STABLE)
+ (ACTION IN-YARD-F)>
+
+<ROUTINE IN-YARD-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"This shady nook obviously belongs to some well-to-do yipple. The arborvitaes are lush and neatly trimmed, with twin beds of flowers leading up to a little red " 'STABLE ,PERIOD>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT IN-STABLE
+ (LOC ROOMS)
+ (DESC "Stablehouse")
+ (FLAGS LIGHTED LOCATION INDOORS)
+ (SOUTH <TO IN-YARD>)
+ (OUT <PER EXIT-STABLE>)
+ (IN <PER STABLE-IN>)
+ (FNUM OMIZNIA)
+ (GLOBAL STABLE)
+ (ACTION IN-STABLE-F)>
+
+<ROUTINE STABLE-IN ()
+ <PERFORM ,V?ENTER ,STALL>
+ <RFALSE>>
+
+<ROUTINE EXIT-STABLE ()
+ <COND (<IN? ,PLAYER ,STALL>
+ <PERFORM ,V?EXIT ,STALL>
+ <RFALSE>)>
+ <RETURN ,IN-YARD>>
+
+<ROUTINE IN-STABLE-F ("OPT" (CONTEXT <>) "AUX" (U 0) ANY X)
+ <COND (<IN? ,UNICORN ,STALL>
+ <INC U>)>
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <COND (<IS? ,STALL ,MUNGED>
+ <TELL "The splintered ruins of " THE ,STALL
+ " look out of place in this otherwise">)
+ (T
+ <TELL "Not a straw is out of place in this">)>
+ <TELL " immaculate " 'STABLE>
+ <COND (<IN? ,PLAYER ,STALL>
+ <PRINT ,PERIOD>
+ <RTRUE>)>
+ <SET ANY <SEE-ANYTHING-IN? ,STALL>>
+ <COND (<IS? ,STALL ,MUNGED>
+ <COND (<T? .ANY>
+ <TELL ". ">
+ <PRINT "Peering inside, you see ">
+ <CONTENTS ,STALL>
+ <SETG P-IT-OBJECT ,STALL>)>
+ <TELL ,PERIOD>
+ <RTRUE>)>
+ <TELL ". The one">
+ <OPEN-CLOSED ,STALL>
+ <TELL ,SIS>
+ <COND (<T? .U>
+ <TELL "occupied by a snow-white " 'UNICORN
+", who gazes at you mournfully from between the slats">
+ <COND (<T? .ANY>
+ <TELL ". You can also ">)>)
+ (T
+ <TELL "unoccupied">
+ <COND (<T? .ANY>
+ <TELL "; you can ">)>)>
+ <COND (<T? .ANY>
+ <TELL "see ">
+ <CONTENTS ,STALL>
+ <TELL " inside">
+ <SETG P-IT-OBJECT ,STALL>)>
+ <PRINT ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <COND (<T? .U>
+ <SEE-CHARACTER ,UNICORN>
+ <MAKE ,UNICORN ,SEEN>
+ <QUEUE ,I-UNICORN>)>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<T? .U>
+ <DEQUEUE ,I-UNICORN>
+ <TELL CTHE ,UNICORN
+ " whinnies pitifully as you leave." CR>
+ <RTRUE>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+
+<OBJECT IN-BOUTIQUE
+ (LOC ROOMS)
+ (DESC "Boutique")
+ (FLAGS LIGHTED LOCATION INDOORS)
+ (SOUTH <THRU BOUTIQUE-DOOR IN-PORT>)
+ (OUT <THRU BOUTIQUE-DOOR IN-PORT>)
+ (EAST <PER ENTER-CURTAIN>)
+ (IN <PER ENTER-CURTAIN>)
+ (GLOBAL BOUTIQUE-DOOR BOUTIQUE)
+ (THIS-CASE BCASE)
+ (FNUM OMIZNIA)
+ (ACTION IN-BOUTIQUE-F)>
+
+<ROUTINE IN-BOUTIQUE-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"The sheer, flowing fabrics and gossamer pastels in this little shop create an atmosphere of taste and calm conducive to reckless spending.| A ">
+ <SHOP-DOOR ,BOUTIQUE-DOOR>
+ <TELL " offers the latest in travel fashions">
+ <LOOK-ON-CASE ,ON-BCASE>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <GET-OWOMAN-AND-CURTAIN>
+ <QUEUE ,I-OWOMAN>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <DEQUEUE ,I-OWOMAN>
+ <COND (<IN? ,OWOMAN ,IN-BOUTIQUE>
+ <TELL
+"\"See you later,\" calls " THE ,OWOMAN " as you leave." CR>
+ <RTRUE>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT IN-PUB
+ (LOC ROOMS)
+ (DESC "The Rusty Lantern")
+ (FLAGS LIGHTED LOCATION INDOORS)
+ (EAST <THRU PUB-DOOR OUTSIDE-PUB>)
+ (WEST <TO IN-KITCHEN>)
+ (OUT <THRU PUB-DOOR OUTSIDE-PUB>)
+ (IN <TO IN-KITCHEN>)
+ (HEAR PUB)
+ (ODOR PUB)
+ (FNUM OGRUBBO)
+ (GLOBAL PUB KITCHEN PUB-DOOR CELLAR GRUBBO)
+ (THINGS (<> FIREPLACE USELESS))
+ (ACTION IN-PUB-F)>
+
+<ROUTINE IN-PUB-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Loud voices and clattering dishes make this smarmy dive sound busier than it really is. Your eyes sting from the greasy smoke drifting in from "
+THE ,KITCHEN ,PTAB CA ,BANDITS " is hogging the fireplace." CR>
+ <COND (<SET X <FIRST? ,PUBWALL>>
+ <SETG P-IT-OBJECT .X>
+ <TELL ,TAB CA .X " is imbedded in the wall." CR>)>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <QUEUE ,I-BANDITS>
+ <RFALSE>)
+
+ (<EQUAL? .CONTEXT ,M-ENTERED>
+ <SETG P-THEM-OBJECT ,BANDITS>
+ <RFALSE>)
+
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<ZERO? ,P-WALK-DIR>)
+ (<IS? ,DAGGER ,NODESC>
+ <UNMAKE ,DAGGER ,NODESC>
+ <WINDOW ,SHOWING-ROOM>
+ <MOVE ,DAGGER ,PUBWALL>
+ <SETG P-IT-OBJECT ,DAGGER>
+ <MAKE ,BANDITS ,SEEN>
+ <TELL "You edge towards the ">
+ <COND (<EQUAL? ,P-WALK-DIR ,P?WEST ,P?IN>
+ <TELL 'KITCHEN>)
+ (T
+ <TELL B ,W?EXIT>)>
+ <TELL ,PTAB>
+ <ITALICIZE "Thwack">
+ <TELL
+"! A dagger streaks past your ear, imbedding itself deep into the wall.|
+ \"Har!\" chortles a bandit." CR>
+ <RFATAL>)>
+ <DEQUEUE ,I-BANDITS>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT IN-KITCHEN
+ (LOC ROOMS)
+ (DESC "Kitchen")
+ (FLAGS LIGHTED LOCATION INDOORS)
+ (BELOW CELLAR-DOOR)
+ (IN <THRU CELLAR-DOOR AT-BOTTOM>)
+ (OUT <TO IN-PUB>)
+ (EAST <TO IN-PUB>)
+ (DOWN <THRU CELLAR-DOOR AT-BOTTOM>)
+ (HEAR PUB)
+ (ODOR PUB)
+ (FNUM OGRUBBO)
+ (GLOBAL CELLAR-DOOR CELLAR-STAIR KITCHEN CELLAR PUB GRUBBO)
+ (ACTION IN-KITCHEN-F)>
+
+<ROUTINE IN-KITCHEN-F ("OPT" (CONTEXT <>) "AUX" (D 0) L)
+ <COND (<IS? ,CELLAR-DOOR ,OPENED>
+ <INC D>)>
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Coils of greasy steam rise from a cauldron bubbling over a roaring hearth. "
+CTHE ,CEILING " is hung with crusty pots and strips of old meat" ,PTAB "A">
+ <COND (<IS? ,CELLAR-DOOR ,MUNGED>
+ <TELL " gaping hole">)
+ (<T? .D>
+ <TELL "n open door">)
+ (T
+ <TELL " closed door">)>
+ <TELL ,SIN THE ,GCORNER>
+ <COND (<T? .D>
+ <TELL " reveals a stair leading downward." CR>
+ <RTRUE>)>
+ <TELL " bears the legend, \"Keepeth Out.\"" CR>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <COND (<NOT <IN? ,COOK ,IN-KITCHEN>>
+ <MOVE ,COOK ,IN-KITCHEN>)>
+ <UNMAKE ,COOK ,NODESC>
+ <SEE-CHARACTER ,COOK>
+ <MAKE ,COOK ,SEEN>
+ <QUEUE ,I-COOK>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-ENTERED>
+ <COND (<IS? ,BOTTLE ,MUNGED>
+ <RFALSE>)
+ (<IN? ,BOTTLE ,PLAYER>
+ <TELL ,TAB>
+ <COOK-SEES-BOTTLE>
+ <RTRUE>)>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<AND <T? ,P-WALK-DIR>
+ <IS? ,ONION ,TOUCHED>
+ <NOT <IS? ,BOTTLE ,IDENTIFIED>>>
+ <UNMAKE ,COOK ,SEEN>
+ <TELL "\"Wait a second.\"" CR>
+ <I-ONION-OFFER>
+ <RFATAL>)
+ (<EQUAL? ,P-WALK-DIR ,P?DOWN ,P?IN>
+ <COND (<ZERO? .D>
+ <ITS-CLOSED ,CELLAR-DOOR>
+ <RFATAL>)
+ (<NOT <IS? ,CELLAR-DOOR ,TOUCHED>>
+ <MAKE ,CELLAR-DOOR ,TOUCHED>
+ <COND (<NOT <SETUP-CELLAR?>>
+ <RFALSE>)>)>
+ <DEQUEUE ,I-COOK>
+ <TELL "You clump down "
+ THE ,CELLAR-STAIR ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? ,P-WALK-DIR ,P?EAST ,P?OUT>
+ <SETG P-WALK-DIR ,P?EAST>
+ <DEQUEUE ,I-COOK>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT KITCHEN-JUNK
+ (LOC IN-KITCHEN)
+ (DESC "that")
+ (FLAGS NOARTICLE NODESC TRYTAKE NOALL)
+ (SYNONYM MEAT CAULDRON STRIPS HEARTH POT POTS)
+ (ACTION USELESS)>
+
+<OBJECT ON-WHARF
+ (LOC ROOMS)
+ (DESC "Wharf")
+ (FLAGS LIGHTED LOCATION)
+ (COORDS MAP-RIGHT)
+ (WEST <TO COVESIDE>)
+ (DOWN <PER ON-WHARF-DOWN>)
+ (IN <PER ON-WHARF-DOWN>)
+ (HEAR COVE)
+ (ODOR WHARF)
+ (SEE-ALL COVE)
+ (BELOW COVE)
+ (GLOBAL GRUBBO WHARF)
+ (FNUM OGRUBBO)
+ (ACTION ON-WHARF-F)>
+
+<ROUTINE ON-WHARF-DOWN ()
+ <MAKE ,SALT ,SEEN>
+ <TELL "\"Careful!\" warns " THE ,SALT
+", holding you back. \"Water's mighty cool this time o' year.\"" CR>
+ <RFALSE>>
+
+<ROUTINE ON-WHARF-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <PRINT
+"Dank, fishy smells permeate this old wharf to its very bones.">
+ <TELL " Far below, you ">
+ <PRINT "hear the slurp of oily seawater against the piers">
+ <COND (<FIRST? ,COVE>
+ <TELL ,PTAB ,YOU-SEE>
+ <CONTENTS ,COVE>
+ <TELL " bobbing on the waves">)>
+ <PRINT ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <COND (<NOT <IS? ,SHILL ,BUOYANT>>
+ <MAKE ,SHILL ,BUOYANT>
+ <QUEUE ,I-SHILL>)>
+ <MAKE ,SALT ,SEEN>
+ <QUEUE ,I-SALT>
+ <SEE-CHARACTER ,SALT>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<NOT <IS? ,SHILL ,SEEN>>
+ <SEE-SHILL>
+ <RFATAL>)>
+ <DEQUEUE ,I-SALT>
+ <COND (<T? ,P-WALK-DIR>
+ <TELL
+"\"See y'later,\" chuckles the salt as you walk away." CR>
+ <RTRUE>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT NULL
+ (FLAGS NODESC)>
+
+<OBJECT AT-BOTTOM
+ (LOC ROOMS)
+ (DESC "Wine Cellar")
+ (FLAGS LIGHTED LOCATION INDOORS)
+ (UP <THRU CELLAR-DOOR IN-KITCHEN>)
+ (OUT <SORRY "Which way do you want to go out?">)
+ (OVERHEAD CELLAR-DOOR)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OGRUBBO)
+ (GLOBAL NULL CELLAR-STAIR CELLAR-DOOR CELLAR)
+ (ACTION AT-BOTTOM-F)>
+
+<ROUTINE LOCK-CELLAR-DOOR ()
+ <MAKE ,CELLAR-DOOR ,LOCKED>
+ <TELL ,YOU-HEAR ,LTHE>
+ <ITALICIZE "snap">
+ <TELL " of a substantial lock." CR>
+ <RTRUE>>
+
+<ROUTINE AT-BOTTOM-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"You're standing at the bottom of a short, rickety stairway, ankle-deep in refuse. ">
+ <COND (<IS? ,CELLAR-DOOR ,OPENED>
+ <TELL "Light streams down through a">
+ <COND (<IS? ,CELLAR-DOOR ,MUNGED>
+ <TELL " gaping hole">)
+ (T
+ <TELL "n open door">)>
+ <TELL " overhead." CR>
+ <RTRUE>)>
+ <TELL "The door overhead is closed." CR>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <COND (<NOT <IN? ,COOK ,AT-BOTTOM>>
+ <MOVE ,COOK ,AT-BOTTOM>
+ <MAKE ,COOK ,NODESC>)>
+ <SETG P-IT-OBJECT ,CELLAR-DOOR>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?UP>
+ <COND (<IS? ,CELLAR-DOOR ,MUNGED>
+ <COND (<T? ,AUTO>
+ <BMODE-OFF>)>
+ <YOU-CLIMB-UP T>
+ <RTRUE>)
+ (<IS? ,CELLAR-DOOR ,LOCKED>
+ <SETG P-IT-OBJECT ,CELLAR-DOOR>
+ <TELL CTHE ,P-IT-OBJECT " is locked." CR>
+ <RFATAL>)
+ (<IS? ,CELLAR-DOOR ,OPENED>
+ <WINDOW ,SHOWING-ROOM>
+ <SETG P-IT-OBJECT ,CELLAR-DOOR>
+ <UNMAKE ,CELLAR-DOOR ,OPENED>
+ <UNMAKE ,AT-BOTTOM ,LIGHTED>
+ <ITALICIZE "Bang">
+ <TELL "! An unseen hand slams "
+ THE ,CELLAR-DOOR " in your face." CR>
+ <SAY-IF-HERE-LIT>
+ <TELL ,TAB>
+ <LOCK-CELLAR-DOOR>
+ <RFATAL>)>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT WC1
+ (LOC ROOMS)
+ (DESC "Reeking Room")
+ (FLAGS LOCATION INDOORS)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OGRUBBO)
+ (GLOBAL NULL CELLAR)
+ (ACTION WC1-F)>
+
+<ROUTINE WC1-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Smashed bottles litter the floor, and the air reeks of sour wine." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT SKEL-ROOM
+ (LOC ROOMS)
+ (DESC "Shadowy Stacks")
+ (FLAGS LOCATION INDOORS)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OGRUBBO)
+ (GLOBAL NULL CELLAR)
+ (ACTION SKEL-ROOM-F)>
+
+<ROUTINE SKEL-ROOM-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Precarious stacks of barrels loom in the shadows on every side." CR>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-BEG>
+ <COND (<ZERO? ,CHOKE>
+ <RFALSE>)
+ (<VERB? SAVE UNDO>
+ <MUMBLAGE ,SKELETON>
+ <RTRUE>)
+ (<OR <VERB? WAIT LOOK>
+ <SET X <GAMEVERB?>>>
+ <RFALSE>)>
+ <SET X ,P-PRSA-WORD>
+ <COND (<VERB? WALK WALK-TO>
+ <SET X ,W?MOVE>)
+ (<SET X <TALKING?>>
+ <SET X ,W?SPEAK>)
+ (<SET X <SEEING?>>
+ <SET X ,W?SEE>)
+ (<EQUAL? ,SKELETON ,PRSO ,PRSI>
+ <RFALSE>)>
+ <TELL "It's not easy to ">
+ <COND (<ZERO? .X>
+ <TELL "do that">)
+ (T
+ <TELL B .X>)>
+ <TELL " while you're being strangled to death." CR>
+ <RFATAL>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT MOSS-ROOM
+ (LOC ROOMS)
+ (DESC "Musty Corridor")
+ (FLAGS LOCATION INDOORS)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OGRUBBO)
+ (THINGS (DAMP CORRIDOR HERE-F)
+ (DAMP HALL HERE-F)
+ (DAMP HALLWAY HERE-F))
+ (GLOBAL NULL CELLAR)
+ (ACTION MOSS-ROOM-F)>
+
+<ROUTINE MOSS-ROOM-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <SET X <LIGHT-SOURCE?>>
+ <COND (<ZERO? .X>
+ <TELL "The dim light">)
+ (T
+ <TELL CTHE .X "'s glow">)>
+ <TELL " reveals a gray patch of moss on the wall." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT AT-STACK
+ (LOC ROOMS)
+ (DESC "Bottom of Stack")
+ (FLAGS LOCATION INDOORS)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OGRUBBO)
+ (OVERHEAD CRATES)
+ (UP <PER UPSTACK 1>)
+ (DOWN <SORRY "You're already at the bottom of the stack.">)
+ (GLOBAL NULL CELLAR CRATES)
+ (ACTION AT-STACK-F)>
+
+<ROUTINE UPSTACK ("AUX" (BAD 0))
+ <COND (<ZERO? ,LIT?>
+ <TOO-DARK>
+ <RFALSE>)>
+ <TELL "You teeter ">
+ <COND (<L? <GET ,STATS ,DEXTERITY> 15>
+ <INC BAD>
+ <TELL "uncertainly">)
+ (T
+ <TELL "for a moment">)>
+ <TELL " on the lowest crates">
+ <COND (<T? .BAD>
+ <TELL
+", lose your balance, and sprawl to " THE ,GROUND>
+ <COND (<NOT <IS? ,CRATES ,SEEN>>
+ <MAKE ,CRATES ,SEEN>
+ <TELL ". Not very coordinated, are you?" CR>
+ <RFALSE>)>
+ <PRINT ,PERIOD>
+ <RFALSE>)>
+ <TELL ", then slowly edge your way upward." CR>
+ <COND (<T? ,VERBOSITY>
+ <CRLF>)>
+ <RETURN ,BARRELTOP>>
+
+<ROUTINE AT-STACK-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL "Empty wine crates are stacked to "
+ THE ,CEILING " in a stairlike spiral." CR>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT THRONE-ROOM
+ (LOC ROOMS)
+ (DESC "Throne Room")
+ (FLAGS LOCATION INDOORS)
+ (NORTH 0)
+ (NE 0)
+ (EAST 0)
+ (SE 0)
+ (SOUTH 0)
+ (SW 0)
+ (WEST 0)
+ (NW 0)
+ (DNUM 0)
+ (FNUM OGRUBBO)
+ (GLOBAL NULL CELLAR)
+ (ACTION THRONE-ROOM-F)>
+
+<ROUTINE THRONE-ROOM-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"A shallow nest of sea shells, coral and other bits of ocean debris lies in "
+THE ,GCORNER>
+ <COND (<SEE-ANYTHING-IN? ,THRONE>
+ <TELL ". Upon this pile you see ">
+ <CONTENTS ,THRONE>)>
+ <PRINT ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERED>
+ <COND (<NOT <IS? ,CRAB ,MONSTER>>
+ <MAKE ,CRAB ,MONSTER>
+ <WINDOW ,SHOWING-ROOM>
+ <QUEUE ,I-CRAB>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT BARRELTOP
+ (LOC ROOMS)
+ (DESC "Top of Stack")
+ (FLAGS LOCATION INDOORS)
+ (NORTH <SORRY "You'd fall off the barrel if you went that way.">)
+ (NE <SORRY "You'd fall off the barrel if you went that way.">)
+ (EAST <SORRY "You'd fall off the barrel if you went that way.">)
+ (SE <SORRY "You'd fall off the barrel if you went that way.">)
+ (SOUTH <SORRY "You'd fall off the barrel if you went that way.">)
+ (SW <SORRY "You'd fall off the barrel if you went that way.">)
+ (WEST <SORRY "You'd fall off the barrel if you went that way.">)
+ (NW <SORRY "You'd fall off the barrel if you went that way.">)
+ (DOWN <SAY-TO AT-STACK "You carefully descend the stack.">)
+ (UP <SORRY "You're up as high as you can go.">)
+ (FNUM OGRUBBO)
+ (GLOBAL CRATES CELLAR)
+ (ACTION BARRELTOP-F)>
+
+<ROUTINE BARRELTOP-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"You struggle to keep your balance as the stack sways back and forth in the darkness." CR>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?UP>
+ <COND (<T? ,AUTO>
+ <BMODE-OFF>)>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT IN-THRIFF
+ (LOC ROOMS)
+ (DESC "Thriff")
+ (FLAGS LIGHTED LOCATION)
+ (NE <TO AT-FALLS>)
+ (SOUTH <TO FOREST-EDGE>)
+ (UP <TO FOREST-EDGE>)
+ (NW <TO IN-PASTURE>)
+ (WEST <THRU CHAPEL-DOOR IN-CHAPEL>)
+ (IN <THRU CHAPEL-DOOR IN-CHAPEL>)
+ (FNUM OTHRIFF)
+ (GLOBAL CHAPEL-DOOR THRIFF CHAPEL)
+ (ACTION IN-THRIFF-F)>
+
+<ROUTINE IN-THRIFF-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Trim white cottages are clustered around a central grove of mountain firs, tall and lovingly tended. A little chapel graces the west side of the street">
+ <COND (<IS? ,CHAPEL-DOOR ,OPENED>
+ <TELL ", its front doors wide open">)>
+ <TELL ,PTAB "Turning south, you see a ">
+ <COND (<IS? ,FOREST-EDGE ,MUNGED>
+ <TELL "wall of " 'XTREES
+ " waiting to descend upon the village." CR>
+ <RTRUE>)>
+ <TELL "narrow trail winding up into the mountains">
+ <COND (<T? ,MAGMA-TIMER>
+ <TELL ", backlit by a ">
+ <GLOW-COLOR>
+ <TELL "glow of heat">)>
+ <TELL ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?IN>
+ <SETG P-WALK-DIR ,P?WEST>)
+ (<EQUAL? ,P-WALK-DIR ,P?UP ,P?SOUTH>
+ <SETG P-WALK-DIR ,P?SOUTH>
+ <COND (<T? ,MAGMA-TIMER>
+ <COND (<WEARING-MAGIC? ,RING>
+ <TELL
+"Your ring finger tingles as you draw closer to the blistering heat." CR>
+ <RTRUE>)>
+ <TELL
+"A blistering wall of heat forces you to turn back." CR>
+ <RFATAL>)
+ (<GLOBAL-IN? ,FOREST-EDGE ,SNOW>
+ <TELL
+"Your feet become dusted with snow as you ascend." CR>
+ <RTRUE>)>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT IN-CHAPEL
+ (LOC ROOMS)
+ (DESC "Chapel")
+ (FLAGS LIGHTED LOCATION INDOORS)
+ (FNUM OTHRIFF)
+ (EAST <THRU CHAPEL-DOOR IN-THRIFF>)
+ (OUT <THRU CHAPEL-DOOR IN-THRIFF>)
+ (UP <PER EXIT-PEW>)
+ (GLOBAL CHAPEL-DOOR CHAPEL)
+ (ACTION IN-CHAPEL-F)>
+
+<GLOBAL THRIFF-WON:FLAG <>>
+
+<ROUTINE IN-CHAPEL-F ("OPT" (CONTEXT <>) "AUX" X)
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <COND (<IN? ,CLERIC ,IN-CHAPEL>
+ <COND (<IN? ,RELIQUARY ,CLERIC>
+ <TELL CTHE ,CLERIC
+" stands beside " THE ,ALTAR ", holding ">
+ <CONTENTS ,CLERIC>)
+ (T
+ <TELL "An anxious " 'CONGREG
+" kneels in silent prayer before " THE ,CLERIC
+". On the altar beside him rests ">
+ <CONTENTS ,ALTAR>)>)
+ (T
+ <TELL "Rows of empty pews face a deserted altar">
+ <COND (<SEE-ANYTHING-IN? ,ALTAR>
+ <TELL ", upon which rests ">
+ <CONTENTS ,ALTAR>)>)>
+ <PRINT ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-BEG>
+ <COND (<NOT <IN? ,CLERIC ,IN-CHAPEL>>
+ <RFALSE>)
+ (<VERB? HIT MUNG KICK>
+ <TELL "This is no place for violence." CR>
+ <RFATAL>)
+ (<T? ,THRIFF-WON>)
+ (<SET X <TALKING?>>
+ <MAKE ,CLERIC ,SEEN>
+ <PCLEAR>
+ <TELL C ,QUOTATION>
+ <SET X <RANDOM 100>>
+ <COND (<L? .X 33>
+ <TELL "Shhh">)
+ (<L? .X 67>
+ <TELL "Quiet">)
+ (T
+ <TELL "Shush">)>
+<TELL "!\" whispers a member of " THE ,CONGREG ,PERIOD>
+ <RFATAL>)>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <COND (<NOT <IS? ,CLERIC ,LIVING>>
+ <MAKE ,CLERIC ,LIVING>
+ <UNMAKE ,CLERIC ,SEEN>
+ <SETG P-HIM-OBJECT ,CLERIC>
+ <SETG P-THEM-OBJECT ,CONGREG>
+ <SETG CLERIC-SCRIPT ,INIT-CLERIC-SCRIPT>
+ <QUEUE ,I-CLERIC>)>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?OUT>
+ <SETG P-WALK-DIR ,P?EAST>)>
+ <COND (<T? ,THRIFF-WON>)
+ (<IN? ,CLERIC ,IN-CHAPEL>
+ <DEQUEUE ,I-CLERIC>
+ <TELL C ,QUOTATION <PICK-NEXT ,CLERIC-WOES>
+ "!\" wails " THE ,CLERIC ,PERIOD>
+ <RTRUE>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT FOREST-EDGE
+ (LOC ROOMS)
+ (DESC "Lava Flow")
+ (SDESC DESCRIBE-FOREST-EDGE)
+ (FLAGS LIGHTED LOCATION)
+ (NORTH <TO IN-THRIFF>)
+ (DOWN <TO IN-THRIFF>)
+ (NE <SORRY "Rock walls block your path.">)
+ (NW <SORRY "Rock walls block your path.">)
+ (WEST <TO ON-TRAIL>)
+ (UP <TO ON-TRAIL>)
+ (EXIT-STR "Christmas trees block your path.")
+ (GLOBAL XTREES SNOW GLYPH TRAIL)
+ (FNUM OTHRIFF)
+ (ACTION FOREST-EDGE-F)>
+
+<ROUTINE DESCRIBE-FOREST-EDGE (OBJ)
+ <TELL "Snowy Clearing">
+ <RTRUE>>
+
+<ROUTINE FOREST-EDGE-F ("OPT" (CONTEXT <>) "AUX" (BHERE 0))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <COND (<GLOBAL-IN? ,FOREST-EDGE ,LAVA>
+ <TELL
+"An avalanche of lava has consumed the upward trail, ending here in a ">
+ <COND (<T? ,MAGMA-TIMER>
+ <GLOW-COLOR>
+ <TELL B ,W?POOL>)
+ (T
+ <TELL "dark, steaming crust">)>
+ <TELL ". Many of the surrounding ">
+ <SAY-TREES>
+ <TELL
+" are damaged; the survivors linger near the blackened edge of the clearing." CR>)
+ (T
+ <TELL
+"The upward trail bends sharply west here, winding out of sight between the ">
+ <SAY-TREES>
+ <TELL ,PERIOD>)>
+ <MENTION-GLYPH?>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <COND (<IS? ,XTREES ,SEEN>
+ <SETG P-THEM-OBJECT ,XTREES>)>
+ <COND (<GLOBAL-IN? ,FOREST-EDGE ,GLYPH>
+ <SETG P-IT-OBJECT ,GLYPH>)>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<NOT <IS? ,XTREES ,TOUCHED>>
+ <SEE-XTREES>
+ <RFATAL>)>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?UP>
+ <SETG P-WALK-DIR ,P?WEST>)>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?DOWN>
+ <SETG P-WALK-DIR ,P?NORTH>)>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?NORTH>
+ <COND (<T? ,LAVA-TIMER>
+ <TELL
+"Volcanic heat singes your eyebrows as you race down the mountainside." CR>
+ <RTRUE>)>
+ <TELL "You stride down into the village">
+ <BYE-BFLY>
+ <RTRUE>)
+ (<NOT <EQUAL? ,P-WALK-DIR ,P?WEST>>
+ <RFALSE>)
+ (<T? ,LAVA-TIMER>
+ <CASCADE "approach">
+ <RFATAL>)>
+ <TELL CTHE ,XTREES " shuffle ">
+ <COND (<T? ,MAGMA-TIMER>
+ <TELL "impotently at the lava's edge">)
+ (<AND <IN? ,BFLY ,PLAYER>
+ <IS? ,BFLY ,MUNGED>
+ <IS? ,BFLY ,LIVING>>
+ <TELL "nervously out of your way">)
+ (T
+ <MAKE ,XTREES ,SEEN>
+ <TELL
+"across the upward trail, blocking it completely." CR>
+ <RFATAL>)>
+ <TELL " as you ascend the slope">
+ <BYE-BFLY>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE BYE-BFLY ()
+ <COND (<AND <IN? ,BFLY ,HERE>
+ <IS? ,BFLY ,MUNGED>
+ <IS? ,BFLY ,LIVING>>
+ <REMOVE ,BFLY>
+ <DEQUEUE ,I-PILLAR>
+ <TELL "; behind you, " THE ,BFLY " crawls out of sight">)>
+ <PRINT ,PERIOD>
+ <RTRUE>>
+
+<ROUTINE SEE-XTREES ()
+ <MAKE ,XTREES ,TOUCHED>
+ <MAKE ,XTREES ,SEEN>
+ <WINDOW ,SHOWING-ROOM>
+ <SETG P-THEM-OBJECT ,XTREES>
+ <SETG P-WALK-DIR <>>
+ <SETG OLD-HERE <>>
+ <MOVE ,ORNAMENT ,HERE>
+ <SETG P-IT-OBJECT ,ORNAMENT>
+ <QUEUE ,I-XTREES>
+ <ITALICIZE "Bonk">
+ <TELL "! Something hard hits the back of " 'HEAD
+ " and rolls to your feet." CR>
+ <BMODE-ON>
+ <UPDATE-STAT -5 ,ENDURANCE>
+ <TELL ,TAB
+"A strange chorus of humming rises from the forest as you rub " 'HEAD
+". It takes a few moments for you to recall the familiar melody: \""
+<PICK-NEXT ,CAROLS> "!\"" CR>
+ <RFALSE>>
+
+<ROUTINE SAY-TREES ()
+ <COND (<IS? ,XTREES ,TOUCHED>
+ <TELL 'XTREES>)
+ (T
+ <TELL B ,W?TREES>)>
+ <RTRUE>>
+
+<ROUTINE MENTION-GLYPH? ("AUX" X)
+ <COND (<GLOBAL-IN? ,HERE ,GLYPH>
+ <TELL ,TAB CA ,GLYPH " is inscribed in the ">
+ <COND (<GLOBAL-IN? ,HERE ,SNOW>
+ <TELL B ,W?SNOW>)
+ (<ZERO? ,MAGMA-TIMER>
+ <TELL "hardened crust">)
+ (T
+ <GLOW-COLOR>
+ <TELL B ,W?LAVA>)>
+ <TELL " at your feet." CR>)>
+ <RTRUE>>
+
+<OBJECT ON-TRAIL
+ (LOC ROOMS)
+ (DESC "Mountain Trail")
+ (FLAGS LIGHTED LOCATION)
+ (EAST <TO FOREST-EDGE>)
+ (DOWN <TO FOREST-EDGE>)
+ (SOUTH <THRU CABIN-DOOR IN-CABIN>)
+ (IN <THRU CABIN-DOOR IN-CABIN>)
+ (WEST <TO ON-PEAK>)
+ (UP <TO ON-PEAK>)
+ (EXIT-STR "Steep rock walls block your path.")
+ (GLOBAL SNOW NULL TRAIL)
+ (FNUM OTHRIFF)
+ (ACTION ON-TRAIL-F)>
+
+<ROUTINE ON-TRAIL-F ("OPT" (CONTEXT <>) "AUX" (W 0) (LV 0))
+ <COND (<AND <IN? ,WIGHT ,ON-TRAIL>
+ <IS? ,WIGHT ,MONSTER>>
+ <INC W>)>
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <SET LV <GLOBAL-IN? ,ON-TRAIL ,LAVA>>
+ <TELL "This ">
+ <COND (<T? .LV>
+ <TELL
+"high trail has been consumed by an avalanche of ">
+ <COND (<T? ,MAGMA-TIMER>
+ <GLOW-COLOR>)>
+ <TELL 'LAVA>
+ <COND (<ZERO? ,MAGMA-TIMER>
+ <TELL ", still steaming in the frosty air">)>)
+ (T
+ <TELL
+"snowbound trail commands a superb view of the surrounding countryside. Maybe you could enjoy the sights if ">
+ <COND (<ZERO? ,LAVA-TIMER>
+ <TELL "your teeth would stop chatter">)
+ (T
+ <TELL THE ,GROUND " would stop shak">)>
+ <TELL "ing">)>
+ <COND (<IS? ,FOREST-EDGE ,MUNGED>
+ <TELL ". The downward path is hopelessly choked with "
+ 'XTREES>)>
+ <PRINT ,PERIOD>
+ <COND (<ZERO? .LV>
+ <TELL ,TAB CA ,CABIN
+ " hugs the south side of the trail">
+ <COND (<IS? ,CABIN-DOOR ,OPENED>
+ <TELL
+", its front door banging open and shut in the wind">)>
+ <TELL ". Before it stands a">
+ <COND (<IS? ,MAILBOX ,OPENED>
+ <TELL "n open ">)
+ (T
+ <TELL " closed ">)>
+ <TELL 'MAILBOX ,PERIOD>)>
+ <MENTION-GLYPH?>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <COND (<GLOBAL-IN? ,ON-TRAIL ,GLYPH>
+ <SETG P-IT-OBJECT ,GLYPH>)>
+ <COND (<T? .W>
+ <SETG P-IT-OBJECT ,WIGHT>
+ <SETG LAST-MONSTER ,WIGHT>
+ <SETG LAST-MONSTER-DIR ,P?EAST>
+ <QUEUE ,I-WIGHT>)>
+ <RFALSE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?DOWN>
+ <SETG P-WALK-DIR ,P?EAST>)
+ (<EQUAL? ,P-WALK-DIR ,P?UP>
+ <SETG P-WALK-DIR ,P?WEST>)
+ (<EQUAL? ,P-WALK-DIR ,P?IN>
+ <SETG P-WALK-DIR ,P?SOUTH>)>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?WEST>
+ <COND (<T? ,LAVA-TIMER>
+ <CASCADE "you approach">
+ <RFATAL>)
+ (<IN? ,WIGHT ,ON-TRAIL>
+ <COND (<NOT <IS? ,WIGHT ,MONSTER>>
+ <START-WIGHT>
+ <RFATAL>)>
+ <TELL CTHE ,WIGHT
+ " leaps into your path and snarls." CR>
+ <RFATAL>)>
+ <RFALSE>)
+ (<EQUAL? ,P-WALK-DIR ,P?SOUTH>
+ <COND (<NOT <IS? ,CABIN-DOOR ,OPENED>>
+ <RFALSE>)
+ (<AND <T? .W>
+ <NOT <IS? .W ,SLEEPING>>>
+ <SNARLS>)
+ (T
+ <TELL ,CYOU>)>
+ <DEQUEUE ,I-WIGHT>
+ <TELL "retreat into the shelter of "
+ THE ,CABIN>
+ <COND (<T? ,LAVA-TIMER>
+ <PRINT
+", a cascade of lava hot on your heels">)>
+ <PRINT ,PERIOD>
+ <RTRUE>)
+ (<NOT <EQUAL? ,P-WALK-DIR ,P?EAST>>
+ <RFALSE>)
+ (<AND <T? .W>
+ <NOT <IS? ,WIGHT ,SLEEPING>>>
+ <SNARLS>)
+ (T
+ <TELL ,CYOU>)>
+ <DEQUEUE ,I-WIGHT>
+ <TELL "stumble down " THE ,TRAIL>
+ <COND (<T? ,LAVA-TIMER>
+ <PRINT ", a cascade of lava hot on your heels">
+ <PRINT ,PERIOD>
+ <RTRUE>)>
+ <BYE-BFLY>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE SNARLS ()
+ <TELL CTHE ,WIGHT " snarls a threat as you ">
+ <RTRUE>>
+
+<OBJECT IN-CABIN
+ (LOC ROOMS)
+ (DESC "Laboratory")
+ (FLAGS LIGHTED LOCATION INDOORS)
+ (NORTH <THRU CABIN-DOOR ON-TRAIL>)
+ (OUT <THRU CABIN-DOOR ON-TRAIL>)
+ (IN <SORRY "You're in as far as you can go.">)
+ (GLOBAL CABIN CABIN-DOOR)
+ (FNUM OTHRIFF)
+ (ACTION IN-CABIN-F)>
+
+<ROUTINE IN-CABIN-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"Whoever works in this isolated cabin ought to consider the services of a maid nymph. Retorts, alembics and other dubious " 'CHEMS " are spilled across "
+THE ,BENCH " in the center of the room">
+ <MAKE ,CHEMS ,NODESC>
+ <COND (<SEE-ANYTHING-IN? ,BENCH>
+ <TELL ". You also see ">
+ <CONTENTS ,BENCH>
+ <TELL " lying amid the mess">)>
+ <UNMAKE ,CHEMS ,NODESC>
+ <PRINT ,PERIOD>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT ON-PEAK
+ (LOC ROOMS)
+ (DESC "Peak")
+ (FLAGS LIGHTED LOCATION)
+ (EAST <TO ON-TRAIL>)
+ (DOWN <TO ON-TRAIL>)
+ (UP <SORRY "You're up as high as you can go.">)
+ (EXIT-STR "You'd tumble off the peak if you went that way.")
+ (GLOBAL SNOW NULL TRAIL)
+ (FNUM OTHRIFF)
+ (ACTION ON-PEAK-F)>
+
+<ROUTINE ON-PEAK-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL ,XTHE>
+ <COND (<GLOBAL-IN? ,ON-PEAK ,LAVA>
+ <COND (<T? ,MAGMA-TIMER>
+ <GLOW-COLOR>)>
+ <TELL "flow of lava">)
+ (T
+ <TELL "upward trail">)>
+ <TELL
+" ends here, at the brink of " A ,CRATER ". ">
+ <COND (<IN? ,DOME ,ON-PEAK>
+ <TELL
+"Most of the opening is hidden beneath " A ,DOME
+" of light, at least a hundred yards across and almost as high." CR>)
+ (<T? ,LAVA-TIMER>
+ <TELL
+"Molten lava is spewing out of the opening in a spectacular plume." CR>)
+ (T
+ <SAY-STEAM>)>
+ <MENTION-GLYPH?>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-EXIT>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?DOWN>
+ <SETG P-WALK-DIR ,P?EAST>)>
+ <COND (<EQUAL? ,P-WALK-DIR ,P?EAST>
+ <COND (<T? ,LAVA-TIMER>
+ <TELL
+"An onrushing tide of red-hot magma encourages your descent." CR>
+ <RTRUE>)>
+ <TELL "You stumble down the steep trail">
+ <BYE-BFLY>
+ <RTRUE>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE SAY-STEAM ()
+ <TELL "Billowing clouds of steam obscure " THE ,CRATER
+ "'s interior." CR>
+ <RTRUE>>
+
+<OBJECT AT-LEDGE
+ (LOC ROOMS)
+ (DESC "Ledge")
+ (FLAGS LIGHTED LOCATION)
+ (SW <TO COVESIDE 3>)
+ (WEST <SORRY "Sheer cliff walls block your path.">)
+ (NW <TO AT-BRINE 3>)
+ (EXIT-STR "You'd plummet into the sea if you went that way.")
+ (THINGS (SHORE ROAD HERE-F)
+ (ROCKY LEDGE HERE-F))
+ (FNUM OSHORE)
+ (GLOBAL GREAT-SEA NULL)
+ (ACTION AT-LEDGE-F)>
+
+<ROUTINE AT-LEDGE-F ("OPT" (CONTEXT <>))
+ <COND (<EQUAL? .CONTEXT ,M-LOOK>
+ <TELL
+"This narrow path curves along a rocky ledge overlooking the sea. You ">
+ <COND (<IS? ,CREVICE ,NODESC>
+ <TELL "press your back against ">
+ <PRINT "the sheer cliff wall">
+ <TELL ", trying">)
+ (T
+ <TELL "try">)>
+ <TELL
+" not to hear the waves crashing on the rocks, far below">
+ <COND (<NOT <IS? ,CREVICE ,NODESC>>
+ <SETG P-IT-OBJECT ,CREVICE>
+ <TELL ,PTAB CA ,CREVICE " has been blasted into ">
+ <PRINT "the sheer cliff wall">)>
+ <PRINT ,PERIOD>
+ <RTRUE>)
+ (<EQUAL? .CONTEXT ,M-ENTERING>
+ <COND (<NOT <IS? ,CREVICE ,NODESC>>
+ <SETG P-IT-OBJECT ,CREVICE>)>
+ <RFALSE>)
+ (T
+ <RFALSE>)>>
+
+<OBJECT TOWER-BASE
+ (LOC ROOMS)
+ (DESC "Lighthouse")
+ (FLAGS LIGHTED LOCATION)
+ (EAST <SORRY "Sheer cliff walls block your path.">)
+ (EXIT-STR "Sheer cliff walls block your path.")
+ (UP <PER TOWER-BASE-UP 1>)
+ (FNUM OSHORE)
+ (GLOBAL TOWER TOWER-STEPS CREVICE)
+ (ACTION TOWER-BASE-F)>
+
+<ROUTINE TOWER-BASE-F ("OPT" (CONTEXT <>))
+ <COND (&