aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhistoricalsource <historicalsoftware@textfiles.com>2019-04-14 13:36:31 -0400
committerhistoricalsource <historicalsoftware@textfiles.com>2019-04-14 13:36:31 -0400
commit7dcf75bb7411f634ca393f37c4f3fed3d82b5691 (patch)
tree87065e99b5d51d6cc6dfc4d68a7ea5848dca00cc
downloadmoonmist-7dcf75bb7411f634ca393f37c4f3fed3d82b5691.tar.gz
moonmist-7dcf75bb7411f634ca393f37c4f3fed3d82b5691.tar.bz2
moonmist-7dcf75bb7411f634ca393f37c4f3fed3d82b5691.zip
Revision 9 (Original Source)
-rw-r--r--README.md1
-rw-r--r--colors.zil912
-rw-r--r--goal.zil2017
-rw-r--r--m5.errors28
-rw-r--r--m5.record1353
-rw-r--r--m5.zipbin0 -> 128866 bytes
-rw-r--r--macros.zil236
-rw-r--r--parser.zil3329
-rw-r--r--people.zil3210
-rw-r--r--syntax.zil863
-rw-r--r--verbs.zil4475
11 files changed, 16424 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..741e1e1
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# moonmist
diff --git a/colors.zil b/colors.zil
new file mode 100644
index 0000000..23377f5
--- /dev/null
+++ b/colors.zil
@@ -0,0 +1,912 @@
+"COLORS for MOONMIST
+Copyright (C) 1986 Infocom, Inc. All rights reserved."
+
+<GLOBAL HERE:OBJECT DRIVEWAY ;CAR>
+<GLOBAL OHERE:OBJECT 0>
+
+;<ROUTINE START-MOVEMENT ()
+ <QUEUE I-LIONEL-SPEAKS %<- ,LIONEL-TIME ,PRESENT-TIME-ATOM>>>
+
+<ROUTINE INTRO ()
+ <TELL "|
+You drove west from London all day in your new little British " 'CAR ". Now at
+last you've arrived in the storied land of Cornwall.|
+|
+Dusk has fallen as you pull up in front of " D ,CASTLE ". A ghostly "
+'MOON " is rising, and a tall iron gate between two pillars bars the way
+into the " 'COURTYARD ".|">>
+
+<OBJECT YOUR-COLOR
+ (DESC "your favorite color")
+ (IN GLOBAL-OBJECTS)
+ (ADJECTIVE MY FAVORITE F.C F.C)
+ (SYNONYM COLOR)
+ (FLAGS NARTICLEBIT)
+ (ACTION YOUR-COLOR-F)>
+
+<ROUTINE YOUR-COLOR-F ()
+ <COND (<REMOTE-VERB?>
+ <RFALSE>)
+ (<AND <NOT <EQUAL? ,HERE ,YOUR-ROOM>>
+ <NOT <VISIBLE? ,CAR>>
+ <NOT <VISIBLE? ,EXERCISE-OUTFIT>>
+ <NOT <VISIBLE? ,DINNER-OUTFIT>>
+ <NOT <VISIBLE? ,SLEEP-OUTFIT>>>
+ <NOT-HERE ,YOUR-COLOR>)
+ (T <TELL "It's " 'YOUR-COLOR "!" CR>)>>
+
+<ROUTINE GET-COLOR ("AUX" NUM N WD (SUM 0) X)
+ <PUTB ,P-INBUF 0 30> ;"for CoCo"
+ <REPEAT ()
+ <TELL !\>>
+ <READ ,P-INBUF ,P-LEXV>
+ <SET NUM <GETB ,P-LEXV ,P-LEXWORDS>>
+ <COND (<0? .NUM>
+ <TELL !\" ,BEG-PARDON "\" ">
+ <AGAIN>)>
+ <SET N ,P-LEXSTART>
+ <REPEAT ()
+ <SET WD <GET ,P-LEXV .N>>
+ ;<COND (<EQUAL? .WD ,W?PURPLE>
+ <SET WD ,W?VIOLET>)>
+ <COND (<SET X <ZMEMQ .WD ,COLOR-WORDS>>
+ <SETG VARIATION .X>
+ <RETURN>)
+ (<DLESS? NUM 1>
+ <RETURN>)
+ (T <SET N <+ .N ,P-LEXELEN>>)>>
+ <SET WD <+ ,P-LEXSTART
+ <* ,P-LEXELEN <- <GETB ,P-LEXV ,P-LEXWORDS> 1>>>>
+ <COND (<EQUAL? <GET ,P-LEXV .WD> ,W?PERIOD ,W?\! ,W??>
+ <SET WD <- .WD ,P-LEXELEN>>)>
+ <SET N <* 2 <+ .WD 1>>>
+ <SET WD <+ -1 <+ <GETB ,P-LEXV .N> <GETB ,P-LEXV <+ 1 .N>>>>>
+ ;<COND (<G? .WD ,NAME-LENGTH>
+ <SET WD ,NAME-LENGTH>)>
+ <NON-BLANK-STUFF ,FAVE-COLOR <REST ,P-INBUF 1> .WD>
+ <TELL "\"Did you say " 'YOUR-COLOR " is ">
+ <PRINT-COLOR T>
+ <TELL "?\"">
+ <COND (<YES?>
+ <COND (<0? ,VARIATION>
+ <SET SUM <GETB ,P-INBUF ;"1st char in 1st word"
+ <GETB ,P-LEXV <+ 3 <* 2 ,P-LEXSTART>>>>>
+ ;<SET NUM
+ <* 2 <+ ,P-LEXSTART
+ <* ,P-LEXELEN
+ <GETB ,P-LEXV ,P-LEXWORDS>>>>>
+ ;<SET NUM <+ <GETB ,P-LEXV <- .NUM 1>> ;"last+1 char"
+ <GETB ,P-LEXV <- .NUM 2>>>>
+ ;<REPEAT ()
+ <COND (<DLESS? NUM 1> <RETURN>)
+ (T <SET SUM <+ .SUM <GETB ,P-INBUF .NUM>>>)>>
+ <COND (<SET X <ZMEMQ .SUM ,COLOR-LETTERS>>
+ <SETG VARIATION .X>)
+ (T <SETG VARIATION <+ 1 <MOD .SUM ,MAX-VARS>>>)>
+ <SETG COLOR-FORCED <GET ,COLOR-WORDS ,VARIATION>>)>
+ <DO-VARIATION>
+ <PUTB ,P-INBUF 0 80>
+ <RETURN>)
+ (T
+ ;<PUTB ,FAVE-COLOR 1 0>
+ <TELL "\"What, then?\"" CR>
+ <SETG VARIATION 0>)>>>
+
+<GLOBAL VILLAIN-PER:OBJECT 0>
+<GLOBAL TREASURE:OBJECT 0>
+<GLOBAL HIDING-PLACE:OBJECT 0>
+<GLOBAL COLOR-FORCED:FLAG 0>
+<CONSTANT MAX-VARS 4>
+
+<GLOBAL COLOR-WORDS
+ <PLTABLE <VOC "YELLOW" ADJ> ;FRIEND-C
+ <VOC "RED" ADJ> ;LORD-C
+ <VOC "BLUE" ADJ> ;PAINTER-C
+ <VOC "GREEN" ADJ> ;DOCTOR-C
+ ;<VOC "VIOLET" BUZZ> ;OFFICER-C
+ ;<VOC "ORANGE" BUZZ> ;DEALER-C>>
+
+<GLOBAL COLOR-ADJS
+ <PLTABLE A?YELLOW ;FRIEND-C
+ A?RED ;LORD-C
+ A?BLUE ;PAINTER-C
+ A?GREEN ;DOCTOR-C
+ ;A?VIOLET ;OFFICER-C
+ ;A?ORANGE ;DEALER-C>>
+
+<GLOBAL COLOR-LETTERS
+ <PLTABLE %<ASCII !\y>
+ %<ASCII !\r>
+ %<ASCII !\b>
+ %<ASCII !\g>
+ ;%<ASCII !\v>
+ ;%<ASCII !\o>>>
+
+<ROUTINE FIX-COLOR-ADJ (OBJ "AUX" PT N)
+ <COND (<AND <SET PT <GETPT .OBJ ,P?ADJECTIVE>>
+ <SET N <ZMEMQB ,A?F.C .PT <RMGL-SIZE .PT>>>>
+ <PUTB .PT .N <GET ,COLOR-ADJS ,VARIATION>>)>>
+
+<ROUTINE DO-VARIATION ("AUX" C)
+ <FIX-COLOR-ADJ ,YOUR-COLOR>
+ <FIX-COLOR-ADJ ,YOUR-ROOM>
+ <FIX-COLOR-ADJ ,CAR>
+ <FIX-COLOR-ADJ ,SLEEP-OUTFIT>
+ <FIX-COLOR-ADJ ,EXERCISE-OUTFIT>
+ <FIX-COLOR-ADJ ,DINNER-OUTFIT>
+ <COND (<EQUAL? ,VARIATION ,LORD-C>
+ <SET C <LOC ,LOVER>>)
+ (<EQUAL? ,VARIATION ,FRIEND-C>
+ <SET C ,IRIS-CLOSET>)
+ (<EQUAL? ,VARIATION ,PAINTER-C>
+ <SET C ,VIVIEN-BOX>)
+ (T <SET C ,WENDISH-KIT>)>
+ <SETG HIDING-PLACE .C>
+ <MOVE ,COSTUME .C>
+ <MOVE ,BLOWGUN .C>
+ <COND (<EQUAL? ,VARIATION ,LORD-C> ;"RED"
+ <SETG VILLAIN-PER ,LOVER ;,LORD>
+ <MOVE ,NECKLACE-OF-D ,JACK-ROOM>
+ ;<FSET ,NECKLACE-OF-D ,SECRETBIT>
+ <MOVE ,JEWEL ,LOCAL-GLOBALS>
+ ;<MOVE ,JOURNAL ,DESK>
+ <SETG TREASURE ,WAR-CLUB>
+ <MOVE ,CLUE-2 ,PAINTER>
+ <FSET ,STAINED-WINDOW ,CONTBIT>
+ <MOVE ,CLUE-3 ,STAINED-WINDOW>
+ <MOVE ,CLUE-4 ,GARDEN>
+ <COND ;(<FSET? ,PLAYER ,FEMALE>
+ <MOVE ,CURTAIN-ROD ,JACK-ROOM>)
+ (T <MOVE ,CANE ,UMBRELLA-STAND>)>)
+ (<EQUAL? ,VARIATION ,FRIEND-C> ;"YELLOW"
+ <SETG VILLAIN-PER ,FRIEND>
+ <MOVE ,TAMARA-EVIDENCE ,TAMARA-BED ;,TAMARA-ROOM>
+ <PUT <GETPT ,FRIEND ,P?WEST> ,NEXITSTR "ignoring you">
+ <MOVE ,JOURNAL ,TAMARA-BED>
+ <FSET ,JOURNAL ,NDESCBIT>
+ <MOVE ,EARRING ,JEWELRY-CASE>
+ <MOVE ,JEWEL ,LOCAL-GLOBALS>
+ <SETG TREASURE ,NECKLACE>
+ <MOVE ,NECKLACE ,SKELETON>
+ <MOVE ,CLUE-4 ,COFFIN>
+ <FCLEAR ,CLUE-4 ,NDESCBIT>
+ <FSET ,CLUE-4 ,TAKEBIT>
+ <MOVE ,CLUE-3 ,BELL>
+ <MOVE ,BRICKS ,BASEMENT>
+ ;<COND ;(<FSET? ,PLAYER ,FEMALE>
+ <MOVE ,NECKLACE ,POND>)
+ (T
+ ;<FSET ,NECKLACE ,NDESCBIT>
+ <MOVE ,NECKLACE ,SKELETON>)>)
+ (<EQUAL? ,VARIATION ,DOCTOR-C> ;"GREEN"
+ <SETG VILLAIN-PER ,DOCTOR>
+ <MOVE ,WENDISH-BOOK ,BOOKCASE ;,LIBRARY>
+ <MOVE ,LENS-BOX ,WENDISH-KIT>
+ <FCLEAR ,LENS-BOX ,NDESCBIT>
+ <FSET ,LENS-BOX ,TAKEBIT>
+ <MOVE ,JOURNAL ,DESK>
+ <MOVE ,LETTER-DEE ,STUDY>
+ <SETG TREASURE ,MOONMIST>
+ <FSET ,MOONMIST ,SECRETBIT>
+ ;<REMOVE ,GAME>
+ ;<FSET ,RHINO-HEAD ,CONTBIT>
+ ;<FSET ,RHINO-HEAD ,OPENBIT>
+ <MOVE ,CLUE-3 ,RHINO-HEAD>
+ <MOVE ,CLUE-4 ,GALLERY-CORNER ;,FRONT-GATE>
+ <FCLEAR ,CLUE-4 ,NDESCBIT>
+ <FSET ,CLUE-4 ,TAKEBIT>
+ ;<PUTP ,CLUE-4 ,P?FDESC
+ "A shaft of light from the peephole lands on a fourth clue.">
+ <COND ;(<FSET? ,PLAYER ,FEMALE>
+ <MOVE ,MOONMIST ,BOTTLE>)
+ (T <MOVE ,MOONMIST ,INKWELL>)>)
+ (<EQUAL? ,VARIATION ,PAINTER-C> ;"BLUE"
+ <SETG VILLAIN-PER ,PAINTER>
+ <MOVE ,VIVIEN-DIARY ,VIVIEN-BOX>
+ <MOVE ,LENS-BOX ,VIVIEN-BOX>
+ <FCLEAR ,LENS-BOX ,NDESCBIT>
+ <FSET ,LENS-BOX ,TAKEBIT>
+ ;<REMOVE ,JOURNAL>
+ ;<MOVE ,MAGAZINE ,LUMBER-ROOM>
+ <SETG TREASURE ,SKULL>
+ <MOVE ,SKULL ,BELL>
+ <FSET ,MUSIC ,SECRETBIT>
+ <COND ;(<FSET? ,PLAYER ,FEMALE>
+ <MOVE ,SKULL ,COFFIN>)
+ (T <MOVE ,CLUE-3 ,ARMOR>)>)
+ ;(<EQUAL? ,VARIATION ,DEALER-C>
+ <SETG VILLAIN-PER ,DEALER>
+ <MOVE ,HYDE-IOU ,HYDE-ROOM>
+ <MOVE ,LENS-BOX ,HYDE-ROOM>
+ <SETG TREASURE ,HEADDRESS>
+ <COND ;(<FSET? ,PLAYER ,FEMALE>
+ <MOVE ,HEADDRESS ,BRITANNIA>)
+ (T <MOVE ,HEADDRESS ,ARMOR>)>)
+ ;(<EQUAL? ,VARIATION ,OFFICER-C>
+ <SETG VILLAIN-PER ,OFFICER>
+ <MOVE ,IAN-EVIDENCE ,IAN-ROOM>
+ <SETG TREASURE ,RUBY>
+ <COND (<FSET? ,PLAYER ,FEMALE>
+ <FSET ,STAINED-WINDOW ,CONTBIT>
+ <MOVE ,RUBY ,STAINED-WINDOW>)
+ (T
+ <FSET ,RHINO-HEAD ,CONTBIT>
+ <MOVE ,RUBY ,RHINO-HEAD>)>)>
+ <COND (<==? ,VILLAIN-PER ,LOVER>
+ <SETG SEARCHER ,LORD>)
+ (T <SETG SEARCHER ,VILLAIN-PER>)>
+ <COND (<FSET? ,VILLAIN-PER ,FEMALE>
+ <FSET ,GHOST-NEW ,FEMALE>)>
+ ;<SET C <GETP ,VILLAIN-PER ,P?CHARACTER>>
+ ;<PUTP ,GHOST-NEW ,P?CHARACTER .C> ;"in DRESS-GHOST">
+[
+<OBJECT CANE
+ ;(IN LOCAL-GLOBALS)
+ (DESC "cane")
+ (SYNONYM CANE HANDLE)
+ (FLAGS TAKEBIT NDESCBIT SURFACEBIT OPENBIT SEARCHBIT SECRETBIT)
+ (ACTION CANE-F)>
+
+<ROUTINE CANE-F ("AUX" P)
+ <COND (<ATTACK-VERB?>
+ <NO-VIOLENCE? ,CANE>
+ <RTRUE>)
+ (T <DISCOVER-WAR-CLUB ,CANE>)>>
+
+<OBJECT PAINT
+ (IN CANE)
+ (DESC "coat of paint")
+ (ADJECTIVE NEW)
+ (SYNONYM PAINT COAT)
+ (FLAGS NDESCBIT TRYTAKEBIT SEENBIT SECRETBIT)
+ (ACTION PAINT-F)>
+
+<ROUTINE PAINT-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL "It seems to be hiding something." CR>)
+ (<OR <VERB? BRUSH LOOK-UNDER REMOVE RUB TAKE-OFF>
+ <AND <VERB? TAKE> <T? ,PRSI>>>
+ <DISCOVER-WAR-CLUB ,CANE ;<LOC ,PAINT> T>
+ <RTRUE>)
+ (<DIVESTMENT? ,PAINT>
+ <HAR-HAR>)>>
+
+;<OBJECT CURTAIN-ROD
+ ;(IN LOCAL-GLOBALS)
+ (DESC "curtain rod")
+ (ADJECTIVE CURTAIN)
+ (SYNONYM ROD)
+ (FLAGS NDESCBIT)
+ (ACTION CURTAIN-ROD-F)>
+
+;<ROUTINE CURTAIN-ROD-F () <DISCOVER-WAR-CLUB ,CURTAIN-ROD>>
+
+<ROUTINE DISCOVER-WAR-CLUB (OBJ "OPTIONAL" (DO-IT <>) "AUX" PER)
+ <COND (<OR <VERB? BRUSH RUB> <T? .DO-IT>>
+ <COND (<FSET? ,WAR-CLUB ,SECRETBIT>
+ <DISCOVER ,WAR-CLUB ,PAINT>
+ <MOVE ,WAR-CLUB <LOC .OBJ>>
+ <ROB .OBJ <LOC .OBJ>>
+ <MOVE .OBJ ,LOCAL-GLOBALS>
+ <MOVE ,PAINT ,LOCAL-GLOBALS>
+ <RTRUE>)>)
+ (<VERB? EXAMINE SEARCH>
+ <COND (<FSET? ,WAR-CLUB ,SECRETBIT>
+ <FCLEAR ,PAINT ,SECRETBIT>
+ <TELL
+"There's something strange about this " D .OBJ ".
+It's shaped like a baseball bat, but with hard, faceted bumps all over it.
+It has a new " 'PAINT "." CR>)
+ ;(T <DESCRIBE-WAR-CLUB>)>)>>
+
+<ROUTINE ATTACK-VERB? ("OPT" (SHOOT <>))
+ <COND (<VERB? ATTACK KILL SLAP>
+ <COND (<FSET? ,PRSO ,PERSONBIT>
+ <RTRUE>)>)
+ (<VERB? SHOOT>
+ <COND (<AND <T? .SHOOT>
+ <FSET? ,PRSO ,PERSONBIT>>
+ <RTRUE>)>)
+ (<VERB? RING PUT>
+ <COND (<AND <T? .SHOOT>
+ <OR <ZERO? ,PRSI>
+ <FSET? ,PRSI ,PERSONBIT>>>
+ <RTRUE>)>)
+ (<VERB? USE>
+ <COND (<OR <ZERO? ,PRSI>
+ <FSET? ,PRSI ,PERSONBIT>>
+ <RTRUE>)>)>>
+
+<OBJECT WAR-CLUB
+ ;(IN LOCAL-GLOBALS)
+ (DESC "war club")
+ (ADJECTIVE WAR ;" ZULU DINGAAN KING\'S DIAMOND")
+ (SYNONYM CLUB HANDLE CANE ;KNOBKERRIE ;SCEPTER SCEPTRE)
+ (FLAGS NDESCBIT SECRETBIT SEENBIT)
+ (ACTION WAR-CLUB-F)>
+
+<ROUTINE WAR-CLUB-F ()
+ <COND (<VERB? COMPARE>
+ <COND (<EQUAL? ,JEWEL ,PRSO ,PRSI>
+ <TELL
+CTHE ,WAR-CLUB " has no " 'JEWEL " like this one." CR>)>)
+ (<VERB? EXAMINE>
+ <DESCRIBE-WAR-CLUB>)
+ (<ATTACK-VERB?>
+ <NO-VIOLENCE? ,WAR-CLUB>
+ <RTRUE>)
+ ;(T <SHOOTING ,WAR-CLUB>)>>
+
+<ROUTINE DESCRIBE-WAR-CLUB ()
+ <TELL
+"It's a " 'WAR-CLUB " that once belonged to the Zulu king
+Dingaan -- and it's studded with large diamonds!"
+;"the brilliant diamond-studded knobkerrie, or war club, of Dingaan the
+Vulture, the Zulu king who fought the Boers!" CR>>
+
+<OBJECT SKULL
+ ;(IN LOCAL-GLOBALS)
+ (DESC "fossil skull")
+ (ADJECTIVE FOSSIL)
+ (SYNONYM SKULL)
+ (FLAGS NDESCBIT SECRETBIT)
+ (SIZE 9)
+ (ACTION SKULL-F)>
+
+<ROUTINE SKULL-F ()
+ <COND (<VERB? EXAMINE LOOK-INSIDE SEARCH>
+ <TELL
+"This staring skull is frightfully old -- even older than the castle." CR>)>>
+
+<OBJECT NECKLACE
+ ;(IN SKELETON)
+ (DESC "black pearl necklace")
+ (ADJECTIVE BLACK PEARL)
+ (SYNONYM PEARLS NECKLACE STRING)
+ (FLAGS TAKEBIT NDESCBIT SECRETBIT WEARBIT ;WORNBIT)
+ (SIZE 5)
+ (TEXT
+"It's a strand of shiny black pearls, the rarest and most precious kind
+in the world!")>
+
+;<OBJECT GAME
+ (IN GLOBAL-OBJECTS)
+ (DESC "MOONMIST")
+ (ADJECTIVE MOON)
+ (SYNONYM GAME MOONMIST MIST)
+ (FLAGS NARTICLEBIT)
+ (ACTION GAME-F)>
+
+;<ROUTINE GAME-F ()
+ <COND (<VERB? EXAMINE FIND LAMP-ON PLAY READ THROUGH>
+ <SETG CLOCK-WAIT T>
+ <TELL "[You're playing it now!]" CR>)>>
+
+<OBJECT MOONMIST
+ (IN GLOBAL-OBJECTS)
+ (DESC "Moonmist")
+ (ADJECTIVE MOON GREEN)
+ (SYNONYM MOONMIST MIST INK ;DRUG LIQUID ;GAME)
+ (FLAGS NARTICLEBIT ;SECRETBIT)
+ (ACTION MOONMIST-F)>
+
+<ROUTINE MOONMIST-F ()
+ <COND (<OR <VERB? PLAY READ>
+ <AND <VERB? EXAMINE FIND>
+ <IN? ,MOONMIST ,GLOBAL-OBJECTS>>>
+ <SETG CLOCK-WAIT T>
+ <TELL "[You're playing it now!]" CR>)
+ (<REMOTE-VERB?>
+ <RFALSE>)
+ (<VERB? TAKE>
+ <COND (<AND <NOT <IN? ,MOONMIST ,GLOBAL-OBJECTS>>
+ <VISIBLE? ,MOONMIST>>
+ <PERFORM ,PRSA <LOC ,MOONMIST> ,PRSI>
+ <RTRUE>)
+ (T <YOU-CANT>)>)
+ (<NOT-HOLDING? ,PRSO>
+ <RTRUE>)
+ (<VERB? POUR PUT>
+ <COND (<AND <T? ,PRSI>
+ <FSET? ,PRSI ,PERSONBIT>
+ <SHOOTING ,MOONMIST>>
+ <RFATAL>)>
+ <MOVE ,MOONMIST ,LOCAL-GLOBALS ;,GLOBAL-OBJECTS>
+ <TELL CTHE ,MOONMIST " dribbles ">
+ <COND (<ZERO? ,PRSI> <TELL <GROUND-DESC>>)
+ (<NOT <FSET? ,PRSI ,SURFACEBIT>>
+ <TELL "into" THE ,PRSI>)
+ (T <TELL "on" THE ,PRSI>)>
+ <TELL ", sizzles, and evaporates." CR>)
+ (<AND <DIVESTMENT? ,MOONMIST>
+ ;<OR <NOT <VERB? PUT>>
+ <ZERO? ,PRSI>
+ <NOT <FSET? ,PRSI ,PERSONBIT>>>>
+ <PERFORM ,PRSA ,INKWELL ,PRSI>
+ <RTRUE>)
+ (<VERB? DRINK EAT>
+ <COND (<==? ,WINNER ,PLAYER>
+ <TELL
+"First it puts your tongue to sleep. Then your tummy. Then your brain.">
+ <FINISH>)>)
+ (<VERB? EXAMINE SMELL>
+ <TELL "It's a greenish liquid with a strong odor." CR>)
+ (T <SHOOTING ,MOONMIST>)>>
+][
+<OBJECT GENERIC-CLUE
+ (IN GLOBAL-OBJECTS)
+ (DESC "clue")>
+
+<OBJECT CLUE-1
+ (IN SIDEBOARD ;"BUTLER ;LOCAL-GLOBALS")
+ (DESC "first clue")
+ (ADJECTIVE FIRST 1ST ;IDENTITY CLUE PICTURE)
+ (SYNONYM CLUE CLUES CARD)
+ (GENERIC GENERIC-CLUE-FCN)
+ (FLAGS NDESCBIT ;TAKEBIT SEENBIT SECRETBIT READBIT)
+ (SIZE 1)
+ (ACTION CLUE-1-F)>
+
+;<GLOBAL CLUE-1-SHOWN:FLAG <>>
+<ROUTINE CLUE-1-F ()
+ <COND ;(<VERB? SHOW>
+ <COND (<FSET? ,PRSO ,PERSONBIT>
+ <PUT ,CLUE-1-KNOWN <GETP ,PRSO ,P?CHARACTER> T>
+ <RFALSE>)>)
+ (<VERB? COMPARE>
+ <COND (<EQUAL? ,TREASURE ,PRSO ,PRSI>
+ <TELL CTHE ,TREASURE>
+ <COND (<AND <EQUAL? ,VARIATION ,LORD-C>
+ <NOT <FSET? ,PLAYER ,FEMALE>>>
+ <TELL " looks just like the one on">)
+ (T <TELL " seems to match">)>
+ <TELL " the " 'CLUE-1 "!" CR>)>)
+ (<VERB? EXAMINE READ>
+ <COND (<NOT <FSET? ,CLUE-1 ,TOUCHBIT>>
+ <TELL "You can't see its face." CR>
+ <RTRUE>)>
+ <COND (<NOT-HOLDING? ,PRSO>
+ <RTRUE>)>
+ ;<PUT ,CLUE-1-KNOWN ,PLAYER-C T>
+ <TELL "The " D ,CLUE-1 " shows ">
+ <COND (<EQUAL? ,VARIATION ,LORD-C>
+ <TELL "the King of ">
+ <COND (<FSET? ,PLAYER ,FEMALE>
+ <TELL "Spades, holding a sceptre." CR>)
+ (T <TELL
+"Clubs in one corner, with a picture of an African
+chief holding a " 'WAR-CLUB "; in the other corner is the King of Diamonds,
+with a picture of a crowned vulture clutching a diamond." CR>)>)
+ (<EQUAL? ,VARIATION ,FRIEND-C>
+ <COND (<FSET? ,PLAYER ,FEMALE>
+ <TELL
+"a Polynesian diver, holding a knife and plunging
+through black water." CR>)
+ (T <TELL "a photo of singer Pearl Bailey." CR>)>)
+ (<EQUAL? ,VARIATION ,DOCTOR-C>
+ <COND (<FSET? ,PLAYER ,FEMALE>
+ <TELL
+D ,CASTLE ", with a cloud of mist hiding the " 'MOON "." CR>)
+ (T <TELL
+"an Amazon hunter, aiming a " 'BLOWGUN " at the tree tops." CR>)>)
+ ;(<EQUAL? ,VARIATION ,DEALER-C>
+ <COND (<FSET? ,PLAYER ,FEMALE>
+ <TELL
+"a coiled cobra weaving its head in time to a snake charmer's flute music."
+CR>)
+ (T <TELL
+"a woman with yellow headband standing in front of the Sphinx." CR>)>)
+ (<EQUAL? ,VARIATION ,PAINTER-C>
+ <COND ;(<FSET? ,PLAYER ,FEMALE>
+ <TELL
+"a man, who looks rather Chinese, peeking around a curtain." CR>)
+ (T <TELL
+"a " 'SKELETON " in Chinese mandarin costume." CR>)>)
+ ;(<EQUAL? ,VARIATION ,OFFICER-C>
+ <COND (<FSET? ,PLAYER ,FEMALE>
+ <TELL
+"a pigeon in flight, shot by an arrow and dripping blood." CR>)
+ (T <TELL
+"a wintry park scene, with a thinly clad mother holding her baby and
+shivering violently. A voice balloon from her mouth says, \"BR-R-R-R!\"
+A reddish pigeon is perched on a frozen fountain nearby." CR>)>)>)>>
+
+<OBJECT CLUE-2
+ (IN LORD ;LOCAL-GLOBALS)
+ (DESC "second clue")
+ (ADJECTIVE SECOND 2ND ;LOCATION JACK\'S ;JACK HIS VIV\'S ;VIVIEN HER)
+ (SYNONYM CLUE CLUES CARD POEM)
+ (GENERIC GENERIC-CLUE-FCN)
+ (FLAGS NDESCBIT TAKEBIT SEENBIT SECRETBIT READBIT)
+ (SIZE 1)
+ (ACTION CLUE-2-F)>
+
+<ROUTINE CLUE-2-F ()
+ <COND (<VERB? EXAMINE READ>
+ <COND (<NOT-HOLDING? ,PRSO>
+ <RTRUE>)>
+ <FSET ,CLUE-2 ,TOUCHBIT>
+ <TELL CHE ,CLUE-2 " says," CR>
+ <COND (<EQUAL? ,VARIATION ,LORD-C>
+ <COND ;(<FSET? ,PLAYER ,FEMALE>
+ <TELL
+"\"It's curtains for anyone whose head gets in the way of this!\"" CR>)
+ (T
+ <SETG CLUE-LOC ,CHAPEL>
+ <TELL
+"\"Forbidden fruit tempted the very first lass.|
+'Twas once in a garden but now in a glass.\""
+;"\"Look here, friend!\"
+on an inscribed photo of British Prime Minister Neville Chamberlain
+with his famous umbrella, returning from his meeting with Hitler at
+Munich. The last stroke of the pen points to the umbrella." CR>)>)
+ (<EQUAL? ,VARIATION ,PAINTER-C>
+ <COND (<NOT <FSET? ,MUSIC ,TOUCHBIT>>
+ <SETG CLUE-LOC ,SITTING-ROOM>)
+ (<NOT <FSET? ,BOTTLE ,TOUCHBIT>>
+ <SETG CLUE-LOC ,BASEMENT>)
+ (T <SETG CLUE-LOC ,DRAWING-ROOM>)>
+ <TELL
+"\"Three fellows argued about life:|
+1. 'Using this motto, no chap can go wrong:|
+ Leave the wench and the grape, but go with a ____!'|
+2. 'On the seas of my life sails a ship that is laden|
+ Not with bottles or tunes, but with innocent ______s!'|
+3. 'Women and singing are both very fine,|
+ But for me there is nothing to equal good ____!'\"" CR>
+ ;<COND (<FSET? ,PLAYER ,FEMALE>
+ <TELL
+"\"The Road to Mandalay is now underwater, and the only way
+to communicate is by submarine cable.\"" CR>)
+ (T <TELL "\"Get to the root of it!\"" CR>)>)
+ (<EQUAL? ,VARIATION ,DOCTOR-C>
+ <SETG CLUE-LOC ,GAME-ROOM>
+ <TELL
+"\"My first is an 'I,' but find an 'eye' that sees not.\"" CR>)
+ (T ;<EQUAL? ,VARIATION ,FRIEND-C>
+ <COND ;(<FSET? ,PLAYER ,FEMALE>
+ <TELL
+"\"A woman knows the secret, but to get inside her mind is difficult
+and often dangerous.\"" CR>)
+ (T
+ <SETG CLUE-LOC ,DECK>
+ <TELL
+"\"... Yet the ear distinctly tells,...|
+How the danger sinks and swells,|
+By the sinking or the swelling in the anger of the ____s...\"" CR>)>)
+ ;(<EQUAL? ,VARIATION ,DEALER-C>
+ <COND (<FSET? ,PLAYER ,FEMALE>
+ <TELL
+"\"If Cleopatra ruled the Nile, who ruled the waves -- and what did
+they have in common?\"" CR>)
+ (T <TELL
+"\"Know ye that a woman may proudly flaunt her
+crowning glory, but the wise man keeps his under his hat.\"" CR>)>)
+ ;(<EQUAL? ,VARIATION ,OFFICER-C>
+ <COND (<FSET? ,PLAYER ,FEMALE>
+ <TELL "[to be supplied]" CR>)
+ (T <TELL
+"\"Too much card-playing again!\"
+It's a " 'CARTOON " of a red-eyed woozy rhino, clad in rumpled evening
+clothes and holding both front hoofs painfully to its head, obviously
+\"coming to\" after a night's hard drinking with glasses and bottles
+nearby." CR>)>)>)>>
+
+<OBJECT CLUE-3
+ (DESC "third clue")
+ (ADJECTIVE THIRD 3RD)
+ (SYNONYM CLUE CLUES CARD POEM)
+ (GENERIC GENERIC-CLUE-FCN)
+ (FLAGS NDESCBIT SECRETBIT ;TAKEBIT READBIT)
+ (SIZE 1)
+ (ACTION CLUE-3-F)>
+
+<ROUTINE CLUE-3-F ()
+ <COND (<VERB? EXAMINE READ>
+ <COND (<NOT-HOLDING? ,PRSO>
+ <RTRUE>)>
+ <FSET ,CLUE-3 ,TOUCHBIT>
+ <FSET ,CLUE-3 ,TAKEBIT>
+ <TELL CHE ,CLUE-3 " says,|">
+ <COND (<EQUAL? ,VARIATION ,LORD-C>
+ <SETG CLUE-LOC ,GARDEN>
+ <TELL
+"\"Despite its appearance, the fruit was quite sour.|
+One bite of the apple drove Eve from her bower.\"" CR>)
+ (<EQUAL? ,VARIATION ,FRIEND-C>
+ <SETG CLUE-LOC 0>
+ <TELL
+"\"... And so, all the night-tide, I lie down by the side|
+Of my darling -- my darling -- my life and my bride,...|
+In her tomb by the sounding sea.\"" CR>)
+ (<EQUAL? ,VARIATION ,DOCTOR-C>
+ <SETG CLUE-LOC ,GALLERY>
+ <TELL
+"\"My second is in never but not in ever, and lies in a hidden 'end'.\""
+;"but find" CR>)
+ (T ;<EQUAL? ,VARIATION ,PAINTER-C>
+ <SETG CLUE-LOC ,DECK>
+ <TELL
+"\"My al___ has no glamour;|
+Its '____e' tones do clam___.|
+Can you find me?\"" CR>)>)>>
+
+<OBJECT CLUE-4
+ (DESC "fourth clue")
+ (ADJECTIVE FOURTH 4TH LAST)
+ (SYNONYM CLUE CLUES CARD POEM)
+ (GENERIC GENERIC-CLUE-FCN)
+ (FLAGS NDESCBIT SECRETBIT ;TAKEBIT READBIT)
+ (SIZE 1)
+ ;(FDESC 0)
+ (ACTION CLUE-4-F)>
+
+<ROUTINE CLUE-4-F ()
+ <COND (<VERB? EXAMINE READ>
+ <COND (<NOT-HOLDING? ,PRSO>
+ <RTRUE>)>
+ <FSET ,CLUE-4 ,TOUCHBIT>
+ <FSET ,CLUE-4 ,TAKEBIT>
+ <TELL CHE ,CLUE-4 " says,|">
+ <COND (<EQUAL? ,VARIATION ,LORD-C>
+ <SETG CLUE-LOC ,FOYER>
+ <TELL
+"\"Out of the sunshine, into the rain...|
+The end of the story is... Abel and CAIN.\"|
+The last word is underlined." CR>)
+ (<EQUAL? ,VARIATION ,FRIEND-C>
+ <SETG CLUE-LOC ,BASEMENT>
+ <TELL
+"\"If you search for 'A Cask of Amontillado,' don't get
+trapped!\"" CR>)
+ (T ;<EQUAL? ,VARIATION ,DOCTOR-C>
+ <SETG CLUE-LOC ,OFFICE>
+ <TELL
+"\"My third is the silent side of knight.|
+All together I am
+what you could use for poison-pen letters.\"" CR>)>)>>
+]
+
+<ROUTINE PRINT-COLOR ("OPTIONAL" (X <>))
+ <COND (<OR <NOT <0? ,VARIATION>> .X>
+ <WORD-PRINT <GETB ,FAVE-COLOR 0> 1 ,FAVE-COLOR>
+ <COND (<T? ,COLOR-FORCED>
+ <TELL " and ">
+ <PRINTB ,COLOR-FORCED>)>
+ <RTRUE>)>>
+
+;<CONSTANT NAME-LENGTH <SETG NAME-LENGTH 39>>
+<GLOBAL FAVE-COLOR <TABLE #BYTE 3 #BYTE 114 #BYTE 101 #BYTE 100
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0>> "red"
+<GLOBAL FIRST-NAME <TABLE #BYTE 0 #BYTE 120
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0>> "x"
+<GLOBAL LAST-NAME <TABLE #BYTE 0 #BYTE 116 #BYTE 101 #BYTE 115
+ #BYTE 116 #BYTE 101 #BYTE 114
+ 0 0 0 0 0 0 0 0 0 0 0 0>> "tester"
+
+<GLOBAL SUFFIX <TABLE #BYTE 0 #BYTE 0 0 0>>
+<CONSTANT JUNIOR-C 8>
+<CONSTANT SENIOR-C 9>
+<BUZZ JUNIOR JR SENIOR SR>
+
+<ROUTINE TELL-SUFFIX ("AUX" I (J 1))
+ <SET I <GETB ,SUFFIX 0>>
+ <COND (<0? .I>
+ <RFALSE>)>
+ <TELL ", ">
+ <COND (<==? ,JUNIOR-C .I>
+ <TELL "Junior">
+ <RTRUE>)
+ (<==? ,SENIOR-C .I>
+ <TELL "Senior">
+ <RTRUE>)>
+ <REPEAT ()
+ <PRINTC <GETB ,SUFFIX .J>>
+ <COND (<DLESS? I 1> <RTRUE>)>
+ <INC J>>>
+
+<ROUTINE TITLE-NAME ()
+ <TITLE>
+ <COND (<OR <EQUAL? ,TITLE-WORD ,W?MRS ,W?MS ,W?MISS>
+ <EQUAL? ,TITLE-WORD ,W?MISTER ,W?MR>
+ <EQUAL? ,TITLE-WORD ,W?DOCTOR ,W?DR>>
+ <TELL LN>)
+ (T <TELL FN>)>>
+
+<ROUTINE TITLE ()
+ <COND (<EQUAL? ,TITLE-WORD ,W?MRS> <TELL "Mrs. ">)
+ (<EQUAL? ,TITLE-WORD ,W?MS> <TELL "Ms. ">)
+ (<EQUAL? ,TITLE-WORD ,W?MISS> <TELL "Miss ">)
+ (<EQUAL? ,TITLE-WORD ,W?LADY> <TELL "Lady ">)
+ (<EQUAL? ,TITLE-WORD ,W?DAME> <TELL "Dame ">)
+ (<EQUAL? ,TITLE-WORD ,W?MADAME ,W?MADAM> <TELL "Madame ">)
+ (<EQUAL? ,TITLE-WORD ,W?DOCTOR ,W?DR> <TELL "Dr. ">)
+ (<EQUAL? ,TITLE-WORD ,W?LORD> <TELL "Lord ">)
+ (<EQUAL? ,TITLE-WORD ,W?SIR> <TELL "Sir ">)
+ (<EQUAL? ,TITLE-WORD ,W?MISTER ,W?MR> <TELL "Mr. ">)
+ (<EQUAL? ,TITLE-WORD ,W?MASTER> <TELL "Master ">)>>
+
+<ROUTINE NON-BLANK-STUFF (DEST SRC CNT "AUX" (ND 1) (NS 0) B (OB 32))
+ <DEC CNT>
+ <REPEAT ()
+ <SET B <GETB .SRC .NS>>
+ <COND (<NOT <AND <==? .B 32>
+ <OR <==? .NS .CNT> <==? .OB 32>>>>
+ <PUTB .DEST .ND .B>
+ <INC ND>
+ <SET OB .B>)>
+ <COND (<IGRTR? NS .CNT> <RETURN>)>>
+ <PUTB .DEST 0 <- .ND 1>>>
+
+<GLOBAL GENDER-KNOWN:FLAG <>>
+
+<ROUTINE FULL-NAME ("OPT" (NO-TELL <>))
+ <PUTB ,SUFFIX 0 0>
+ <PUTB ,LAST-NAME 0 0>
+ <SETG MIDDLE-WORD 0>
+ <SETG TITLE-WORD 0>
+ <COND (<ZERO? .NO-TELL>
+ <TELL "\"I said: Please state your full name.\"" CR>)>
+ <RTRUE>>
+
+<GLOBAL MIDDLE-WORD 0>
+
+<ROUTINE GET-NAME ("AUX" NUM N M I BEG END)
+ <PUTB ,P-INBUF 0 30> ;"for CoCo"
+ <REPEAT ()
+ <TELL !\>>
+ <READ ,P-INBUF ,P-LEXV>
+ <SET NUM <GETB ,P-LEXV ,P-LEXWORDS>>
+ <COND (<0? .NUM>
+ <TELL !\" ,BEG-PARDON "\" ">
+ <AGAIN>)>
+ <SET N ,P-LEXSTART>
+ <SET BEG <GET ,P-LEXV .N>>
+ <COND (<TITLE-NOUN? .BEG>
+ <DEC NUM> ;"We found a title!"
+ <SET N <+ .N ,P-LEXELEN>>
+ <SETG TITLE-WORD .BEG>
+ <COND (<AND ;<NOT <EQUAL? .BEG ,W?LT>>
+ <NOT <EQUAL? .BEG ,W?DOCTOR ,W?DR ,W?DETECT>>>
+ <SETG GENDER-KNOWN T>)> ;"And a gender!"
+ <COND (<OR <EQUAL? .BEG ,W?MR ,W?MISTER ,W?MASTER>
+ <EQUAL? .BEG ,W?LORD ,W?SIR>>
+ ;<TAILOR-OUTFITS ,P?EAST>
+ <FCLEAR ,PLAYER ,FEMALE>)
+ ;(T
+ <TAILOR-OUTFITS ,P?WEST>)>
+ <REPEAT () ;"Skip over period(s) after title."
+ <COND (<EQUAL? <GET ,P-LEXV .N> ,W?PERIOD>
+ <DEC NUM>
+ <SET N <+ .N ,P-LEXELEN>>)
+ (T <RETURN>)>>)>
+ <COND (<L? .NUM 2> ;"Too few words?"
+ <COND (<EQUAL? .BEG ,W?QUIT ,W?Q>
+ <V-QUIT>)
+ (<EQUAL? .BEG ,W?RESTART>
+ <V-RESTART>)
+ (<EQUAL? .BEG ,W?RESTORE>
+ <V-RESTORE>)>
+ <FULL-NAME>
+ <AGAIN>)>
+ ;%<DEBUG-CODE <COND (,DBUG <TELL !\{ N .NUM " tokens}" CR>)>>
+ <SET BEG .N> ;"1st word"
+ <SET END <+ .N <* ,P-LEXELEN <- .NUM 1>>>> ;"last word"
+ <REPEAT () ;"Ignore final punctuation."
+ <COND (<EQUAL? <GET ,P-LEXV .END> ,W?PERIOD ,W?\! ,W??>
+ ;<DEC NUM>
+ <SET END <- .END ,P-LEXELEN>>)
+ (T <RETURN>)>>
+ <COND (<G=? .BEG .END> ;"Too few words?"
+ <FULL-NAME>
+ <AGAIN>)>
+ <COND (<EQUAL? <GET ,P-LEXV .END> ,W?SR ,W?SENIOR>
+ <SET END <- .END ,P-LEXELEN>>
+ <PUTB ,SUFFIX 0 ,SENIOR-C>)
+ (<EQUAL? <GET ,P-LEXV .END> ,W?JR ,W?JUNIOR>
+ <SET END <- .END ,P-LEXELEN>>
+ <PUTB ,SUFFIX 0 ,JUNIOR-C>)
+ (<L? <SET NUM <GETB ,P-LEXV <SET N <* 2 <+ .END 1>>>>> 6>
+ ;"no. chars in last word"
+ <SET M <GETB ,P-LEXV <+ 1 .N>>> ;"start of last word"
+ <SET I 0>
+ <REPEAT ()
+ <COND (<NOT <DLESS? NUM 0>>
+ <COND (<NOT <EQUAL? <GETB ,P-INBUF .M>
+ %<ASCII !\i>
+ %<ASCII !\v>
+ %<ASCII !\x>>>
+ <RETURN>)>
+ <INC I>
+ <PUTB ,SUFFIX .I <- <GETB ,P-INBUF .M> 32>>
+ <INC M>)
+ (T
+ <PUTB ,SUFFIX 0 .I>
+ <SET END <- .END ,P-LEXELEN>> ;"back over suffix"
+ <RETURN>)>>)>
+ <REPEAT () ;"Ignore pre-suffix punctuation."
+ <COND (<EQUAL? <GET ,P-LEXV .END> ,W?PERIOD ,W?COMMA ,W?THE>
+ <SET END <- .END ,P-LEXELEN>>)
+ (T <RETURN>)>>
+ <COND (<G=? .BEG .END> ;"Too few words?"
+ <FULL-NAME>
+ <AGAIN>)>
+ <SET N <* 2 <+ .END 1>>>
+ <SET NUM <GETB ,P-LEXV .N>> ;"no. chars in last word"
+ <SET END <- .END ,P-LEXELEN>> ;"penultimate word"
+ <COND (<EQUAL? <GET ,P-LEXV .END> ,W?APOSTROPHE>
+ <SET END <- .END ,P-LEXELEN>> ;"antepenultimate word"
+ <SET N <* 2 <+ .END 1>>> ;"update"
+ <SET NUM <+ .NUM <GETB ,P-LEXV .N>>>
+ <INC NUM> ;"for apostrophe")>
+ <COND (<G? .BEG .END> ;"Too few words?"
+ <FULL-NAME>
+ <AGAIN>)>
+ <SET I <+ .BEG ,P-LEXELEN>> ;"second word"
+ <REPEAT ()
+ <COND (<G? .I .END>
+ <SETG MIDDLE-WORD 0>
+ <RETURN>)
+ (<NOT <EQUAL? <SET M <GET ,P-LEXV .I>>
+ ,W?THE ,W?OF ,W?COMMA>>
+ <SET I <+ .I ,P-LEXELEN>>)
+ (T
+ <SETG MIDDLE-WORD .M>
+ <SET M <* 2 <+ 1 <+ .I ,P-LEXELEN>>>>;"1st wd last name"
+ <SET NUM <+ .NUM <- <GETB ,P-LEXV <+ 1 .N>>
+ <GETB ,P-LEXV <+ 1 .M>>>>>
+ <SET N .M>
+ <RETURN>)>>
+ ;<COND (<G? .NUM ,NAME-LENGTH>
+ <SET NUM ,NAME-LENGTH>)>
+ <NON-BLANK-STUFF ,LAST-NAME ;"Copy last name"
+ <REST ,P-INBUF <GETB ,P-LEXV <+ 1 .N>>>
+ .NUM>
+ <SET N <- .N ,P-WORDLEN>> ;"last token in 1st name"
+ ;<SET END <- <GETB ,P-LEXV <+ 1 .N>> 2>>;"last char in 1st name"
+ <COND (<T? ,MIDDLE-WORD>
+ <SET N <- .N ,P-WORDLEN>>
+ ;<SET END <- .END <+ 1 <GETB ,P-LEXV <- .M ,P-WORDLEN>>>>>)>
+ <SET BEG <GETB ,P-LEXV <+ 3 <* 2 .BEG>>>>;"1st char in 1st name"
+ <SET END <+ -1 <+ <GETB ,P-LEXV .N> <GETB ,P-LEXV <+ 1 .N>>>>>
+ ;"last char in 1st name"
+ <SET N <+ 1 <- .END .BEG>>> ;"no. chars in 1st name"
+ ;<COND (<G? .N ,NAME-LENGTH>
+ <SET N ,NAME-LENGTH>)>
+ <NON-BLANK-STUFF ,FIRST-NAME ;"Copy 1st name"
+ <REST ,P-INBUF .BEG ;<GETB ,P-LEXV <- .N 1>>>
+ .N>
+ <TELL "\"Did you say your name is ">
+ <TELL-FULL-NAME>
+ <TELL "?\"">
+ <COND (<YES?>
+ <PUTB ,P-INBUF 0 80>
+ <RETURN>)
+ (T
+ <TELL "\"Then please speak up.\"|">
+ <FULL-NAME T>)>>>
+
+<BUZZ ;"DUKE DUCHESS" DAME MADAME ;MASTER>
+<GLOBAL TITLE-WORD 0>
+
+<ROUTINE PRINT-NAME (TBL "AUX" (PTR 0) LEN CH OCH (SP? T))
+ <SET LEN <GETB .TBL 0>>
+ <REPEAT ()
+ <COND (<IGRTR? PTR .LEN> <RETURN>)>
+ <SET OCH .CH>
+ <SET CH <GETB .TBL .PTR>>
+ <COND (<OR <L? .CH 97> <G? .CH 122>>
+ <PRINTC .CH>)
+ (<T? .SP?>
+ <PRINTC <- .CH 32>>)
+ (<OR <NOT <EQUAL? .OCH 39>> ;"'"
+ <EQUAL? .PTR .LEN>
+ <EQUAL? 32 <GETB .TBL <+ 1 .PTR>>>>
+ <PRINTC .CH>)
+ (T <PRINTC <- .CH 32>>)>
+ <COND (<OR <EQUAL? .CH 32 46> ;" ."
+ <EQUAL? .CH 45 38>> ;"-&"
+ <SET SP? T>)
+ (T <SET SP? <>>)>>
+ <COND (<EQUAL? .CH 46> <RFALSE>) ;"Don't TELL period next."
+ (T <RTRUE>)>>
diff --git a/goal.zil b/goal.zil
new file mode 100644
index 0000000..ae8b5f9
--- /dev/null
+++ b/goal.zil
@@ -0,0 +1,2017 @@
+"GOAL for MOONMIST
+Copyright (C) 1986 Infocom, Inc. All rights reserved."
+
+"Rapid Transit Line Definitions and Identifiers"
+
+<CONSTANT MAIN-LINE-C 1>
+<CONSTANT BED-LINE-C 2>
+<CONSTANT TOWER-LINE-C 3>
+<CONSTANT PASS-LINE-C 4>
+<CONSTANT GOAL-I-MULTIPLIER 8> "<* 2 ,NUMBER-OF-LINES>"
+
+<GLOBAL MAIN-LINE
+ <PTABLE 0 GARDEN P?OUT
+ P?IN MAZE P?OUT
+ P?EAST COURTYARD P?SOUTH
+ P?NORTH FOYER P?SOUTH
+ P?NORTH GREAT-HALL P?WEST
+ P?EAST CORR-1 P?NORTH
+ P?SOUTH DINING-ROOM P?IN
+ P?OUT BACKSTAIRS P?DOWN
+ P?UP KITCHEN 0>>
+
+<GLOBAL BED-LINE
+ <PTABLE 0 WEST-HALL P?SOUTH
+ P?NW GALLERY P?NE
+ P?SOUTH EAST-HALL 0>>
+
+<GLOBAL TOWER-LINE
+ <PTABLE 0 LOVER-PATH P?IN
+ P?NW DUNGEON P?EAST
+ P?WEST BASEMENT P?UP
+ P?DOWN JUNCTION P?WEST
+ P?EAST OLD-GREAT-HALL P?UP
+ P?DOWN CORR-2 P?UP
+ P?DOWN CORR-3 P?UP
+ P?DOWN DECK 0>>
+
+<GLOBAL PASS-LINE
+ <PTABLE 0 SECRET-LANDING-JACK P?DOWN
+ P?WEST PASSAGE-1 P?UP
+ P?DOWN SECRET-LANDING-TAM P?NORTH
+ P?SOUTH SECRET-LANDING-LIB P?EAST
+ P?WEST SECRET-IAN-PASSAGE P?EAST
+ P?WEST HYDE-CLOSET P?EAST
+ P?WEST MIDPOINT P?EAST
+ P?WEST WENDISH-CORNER P?EAST
+ P?NORTH IRIS-CLOSET P?SOUTH
+ P?NORTH YOUR-CLOSET P?DOWN
+ P?UP DRAWING-CLOSET 0>>
+
+<GLOBAL TRANSFER-TABLE
+ <PTABLE 0 0 ;"transfers from MAIN-LINE"
+ GREAT-HALL GALLERY
+ CORR-1 JUNCTION
+ GREAT-HALL GALLERY
+
+ GALLERY GREAT-HALL ;"transfers from BED-LINE"
+ 0 0
+ GALLERY GREAT-HALL
+ YOUR-ROOM YOUR-CLOSET
+
+ JUNCTION CORR-1 ;"transfers from TOWER-LINE"
+ JUNCTION CORR-1
+ 0 0
+ LIBRARY SECRET-LANDING-LIB
+
+ YOUR-CLOSET YOUR-ROOM ;"transfers from PASS-LINE"
+ YOUR-CLOSET YOUR-ROOM
+ SECRET-LANDING-LIB LIBRARY
+ 0 0>>
+
+"CODE"
+
+<ROUTINE FOLLOW-GOAL (PERSON
+ "AUX" (HEER <LOC .PERSON>) GT GOAL FLG (IGOAL <>) X)
+ <COND (<NOT <IN? .HEER ,ROOMS>>
+ <SET HEER <META-LOC .HEER>>
+ <MOVE .PERSON .HEER>)>
+ <SET GT <GT-O .PERSON>>
+ <COND (<==? .HEER <GET .GT ,GOAL-F>>
+ <RETURN <GOAL-REACHED .PERSON>>)
+ (<ZERO? <GET .GT ,GOAL-ENABLE>>
+ <RFALSE>)>
+ <SET IGOAL <GET .GT ,GOAL-I>>
+ <SET GOAL <GET ,TRANSFER-TABLE .IGOAL>>
+ <COND (<ZERO? .GOAL>
+ <SET IGOAL <>>
+ <SET GOAL <GET .GT ,GOAL-S>>)>
+ <SET X <GETP .HEER ,P?STATION>>
+ <COND (<NOT <EQUAL? .HEER .GOAL .X>>
+ %<DEBUG-CODE <COND (<ZERO? .X>
+ <SET X .HEER>
+ <TELL "{!! NO STATION AT " D .HEER "}|">)>>
+ <RETURN <MOVE-PERSON .PERSON .X>>)
+ (<NOT .GOAL>
+ <RFALSE>)
+ (<==? .HEER .GOAL>
+ <COND (.IGOAL
+ <SET FLG <GET ,TRANSFER-TABLE <+ .IGOAL 1>>>
+ %<DEBUG-CODE
+ <COND (<ZERO? .FLG>
+ <SET FLG .HEER>
+ <TELL "{!! NO TRANSFER #" N .IGOAL "}|">)>>
+ <SET FLG <MOVE-PERSON .PERSON .FLG>>
+ <ESTABLISH-GOAL .PERSON <GET .GT ,GOAL-F>>
+ <RETURN .FLG>)
+ (<NOT <==? .HEER <SET FLG <GET .GT ,GOAL-F>>>>
+ <RETURN <MOVE-PERSON .PERSON .FLG>>)
+ (T
+ <RETURN <GOAL-REACHED .PERSON>>)>)
+ (<==? .HEER <GETP .GOAL ,P?STATION>>
+ <RETURN <MOVE-PERSON .PERSON .GOAL>>)>
+ <SET FLG <FOLLOW-GOAL-NEXT .HEER .GOAL ;.PERSON>>
+ <MOVE-PERSON .PERSON .FLG>>
+
+<ROUTINE FOLLOW-GOAL-NEXT (HEER GOAL
+ "AUX" LINE (CNT 1) RM (GOAL-FLAG <>) LOC G)
+ <SET LINE <GET-LINE <GETP .GOAL ,P?LINE>>>
+ <SET G <GETP .GOAL ,P?STATION>>
+ <REPEAT ()
+ <SET RM <GET .LINE .CNT>>
+ <COND (<==? .RM .HEER>
+ <COND (.GOAL-FLAG
+ <SET LOC <GET .LINE <- .CNT 3>>>)
+ (T
+ <SET LOC <GET .LINE <+ .CNT 3>>>)>
+ <RETURN .LOC>)
+ (<==? .RM .G>
+ <SET GOAL-FLAG T>)>
+ <SET CNT <+ .CNT 3>>>>
+
+<ROUTINE GET-LINE (LN)
+ <COND (<==? .LN ,MAIN-LINE-C> ,MAIN-LINE)
+ (<==? .LN ,BED-LINE-C> ,BED-LINE)
+ (<==? .LN ,TOWER-LINE-C> ,TOWER-LINE)
+ (<==? .LN ,PASS-LINE-C> ,PASS-LINE)>>
+
+<ROUTINE IN-MOTION? (PERSON "OPTIONAL" (DISABLED-OK <>) "AUX" GT L F C)
+ <SET C <GETP .PERSON ,P?CHARACTER>>
+ <SET GT <GET ,GOAL-TABLES .C>>
+ <COND (<AND <EQUAL? .PERSON ,BUTLER>
+ <BTST ,PRESENT-TIME 1>
+ <ZERO? .DISABLED-OK>>
+ <RFALSE>)
+ (<AND <GET .GT ,GOAL-S>
+ <NOT <==? <SET L <LOC .PERSON>>
+ <SET F <GET .GT ,GOAL-F>>>>>
+ <COND (.DISABLED-OK <RTRUE>)
+ (<NOT <ZERO? <GET .GT ,GOAL-ENABLE>>>
+ <RTRUE>
+ ;<FOLLOW-GOAL-DIR .L .F .PERSON>)>)>>
+
+"Movement etc."
+
+<ROUTINE ESTABLISH-GOAL (PERSON GOAL "OPTIONAL" (SPEED 1) "AUX" LOCN GT)
+ ;%<DEBUG-CODE
+ <COND (<ZERO? .PERSON>
+ <TELL "{!! E-G: PERSON=0, GOAL=" D .GOAL ".}|">)>>
+ <SET LOCN <LOC .PERSON>>
+ <COND (<==? .LOCN .GOAL>
+ <RETURN <GOAL-REACHED .PERSON>>)>
+ <COND (<EQUAL? .PERSON ,CONFESSED ,CAPTOR>
+ <RETURN .LOCN>)>
+ ;%<DEBUG-CODE
+ <COND (<ZERO? <GETP .LOCN ,P?LINE>>
+ <TELL
+"{!! E-G: PERSON=" D .PERSON ", LOCN=" D .LOCN ", GOAL=" D .GOAL ".}|">)>>
+ ;%<DEBUG-CODE
+ <COND (<ZERO? <GETP .GOAL ,P?LINE>>
+ <TELL
+"{!! E-G: PERSON=" D .PERSON", GOAL=" D .GOAL ".}|">)>>
+ <SET GT <GT-O .PERSON>>
+ <PUT .GT ,GOAL-I <+ <* <- <GETP .LOCN ,P?LINE> 1> ,GOAL-I-MULTIPLIER>
+ <* <- <GETP .GOAL ,P?LINE> 1> 2>>>
+ <PUT .GT ,GOAL-S <GETP .GOAL ,P?STATION>>
+ <PUT .GT ,GOAL-F .GOAL>
+ <PUT .GT ,GOAL-ENABLE .SPEED>
+ .LOCN>
+
+<GLOBAL GOAL-PERSON:OBJECT <>>
+<ROUTINE GOAL-REACHED (PERSON "AUX" GT (VAL <>))
+ <SET GT <GT-O .PERSON>>
+ ;<COND (<ZERO? <GET .GT ,GOAL-S>> <RFALSE>)>
+ <PUT .GT ,GOAL-S <>>
+ <PUTP .PERSON ,P?LDESC 0> ;"default desc"
+ <COND (<NOT <CREEPY? <SET VAL <META-LOC .PERSON>>>>
+ <FSET .VAL ,ONBIT>)>
+ <SETG GOAL-PERSON .PERSON>
+ <SET VAL <D-APPLY "Reached" <GET .GT ,GOAL-FUNCTION> ,G-REACHED>>
+ <COND (<T? .VAL> <RETURN .VAL>)
+ (<AND <IN? .PERSON ,HERE>
+ <NOT <FSET? .PERSON ,TOUCHBIT>>>
+ <APPLY <GETP .PERSON ,P?DESCFCN> ,M-OBJDESC>)>>
+
+<ROUTINE ENTERS? (DIR WHERE)
+ <COND (<==? .DIR ,P?IN>
+ <RTRUE>)
+ (<FSET? .WHERE ,TOUCHBIT>
+ <RTRUE>)>>
+
+<ROUTINE TELL-OPEN-DOOR () <TELL " opens the door for a moment and">>
+
+<ROUTINE TELL-HIS-HER-BEDROOM (CHR WHERE)
+ <COND (<==? .CHR ,BUTLER-C>
+ <TELL THE .WHERE>
+ <RTRUE>)>
+ <INC CHR>
+ <COND (<NOT <EQUAL? .WHERE <GET ,CHAR-ROOM-TABLE .CHR>
+ <GET ,CHAR-CLOSET-TABLE .CHR>>>
+ <TELL THE .WHERE>
+ <RTRUE>)>
+ <TELL " h">
+ <COND (<FSET? <GET ,CHARACTER-TABLE <- .CHR 1>> ,FEMALE>
+ <TELL "er ">)
+ (T <TELL "is ">)>
+ <COND (<FSET? .WHERE ,SECRETBIT>
+ <TELL "entrance">)
+ (T <TELL "bedroom">)>>
+
+<ROUTINE TELL-LOCKING-THE-DOOR (DOOR)
+ <COND (<AND <T? .DOOR> <FSET? .DOOR ,LOCKED>>
+ <TELL ", locking the door">)>>
+
+<ROUTINE MOVE-PERSON (PERSON WHERE
+ "AUX" DIR EDIR (GT <>) OL COR PCOR CHR (DOOR <>) (VAL <>) X)
+ <COND (<FSET? .PERSON ,MUNGBIT>
+ <RFALSE>)
+ (<EQUAL? .PERSON ,CONFESSED ,CAPTOR ,FOLLOWER>
+ <RFALSE>)
+ (<AND <EQUAL? .PERSON ,BUTLER>
+ <OR <EQUAL? ,AWAITING-REPLY ,BUTLER-1-R ,BUTLER-2-R>
+ <EQUAL? ,AWAITING-REPLY ,BUTLER-3-R ,BUTLER-4-R>>>
+ <RFALSE>)>
+ <PUTP .PERSON ,P?LDESC 6 ;"walking along">
+ <COND (<AND <EQUAL? .PERSON ,BUTLER>
+ <BTST ,PRESENT-TIME 1>>
+ <RFALSE>)>
+ <SET CHR <GETP .PERSON ,P?CHARACTER>>
+ <SET GT <GET ,GOAL-TABLES .CHR>>
+ <SET OL <LOC .PERSON>>
+ <SET DIR <DIR-FROM .OL .WHERE>>
+ <SET EDIR <COMPASS-EQV .OL .DIR>>
+ <SETG GOAL-PERSON .PERSON>
+ <COND (<AND <NOT <ZERO? .DIR>>
+ <SET X <GETPT .OL .DIR>>
+ <==? <PTSIZE .X> ,DEXIT>>
+ <SET DOOR <GET-DOOR-OBJ .X>>)>
+ <SET PCOR <CORRIDOR-LOOK .PERSON>>
+ <COND (<==? ,M-FATAL <D-APPLY "Enroute" <GET .GT ,GOAL-FUNCTION>
+ ,G-ENROUTE>>
+ <THIS-IS-IT .PERSON>
+ <RFATAL>)
+ (<EQUAL? .PERSON ,PLAYER>
+ <COND (.DOOR
+ <FSET .DOOR ,SEENBIT>
+ <COND (<NOT <WALK-THRU-DOOR? .X>>
+ <RFATAL>)>)>)
+ (<AND <T? ,NOW-WEARING>
+ <OR <ZERO? ,LIT>
+ <FSET? .PERSON ,NDESCBIT>>>
+ T)
+ (<==? .OL ,HERE>
+ <SET VAL T>
+ <TELL CHE .PERSON>
+ <COND (<AND <T? .DOOR>
+ <NOT <FSET? .DOOR ,OPENBIT>>>
+ <FSET .DOOR ,TOUCHBIT ;,SEENBIT>
+ <TELL-OPEN-DOOR>)>
+ <COND (<==? .DIR ,P?OUT>
+ <TELL " leaves.|">)
+ (<ENTERS? .DIR .WHERE>
+ <TELL " enters">
+ <TELL-HIS-HER-BEDROOM .CHR .WHERE>
+ <TELL-LOCKING-THE-DOOR .DOOR>
+ <TELL ".|">)
+ (T
+ <TELL " walks ">
+ <COND (<EQUAL? .DIR ,P?UP ,P?DOWN>
+ <DIR-PRINT .DIR>)
+ (<FSET? .WHERE ,TOUCHBIT>
+ <TELL "to">
+ <TELL-HIS-HER-BEDROOM .CHR .WHERE>)
+ (T
+ <DIR-PRINT .EDIR>)>
+ <TELL-LOCKING-THE-DOOR .DOOR>
+ <TELL ".|">)>)
+ (<==? .WHERE ,HERE>
+ <COND (<ZERO? ,NOW-WEARING>
+ <TELL
+"When you hear the door begin to open, you" ,REMEMBER-NOT-DRESSED " and
+hop into " 'YOUR-BATHROOM ".|">
+ <GOTO ,YOUR-BATHROOM>
+ <SET VAL ,M-FATAL>)
+ (<OR <NOT .GT>
+ <NOT <==? ,HERE <GET .GT ,GOAL-F>>>>
+ <SET VAL T>
+ <START-SENTENCE .PERSON>
+ <COND (<AND <T? .DOOR>
+ <NOT <FSET? .DOOR ,OPENBIT>>>
+ <FSET .DOOR ,TOUCHBIT ;,SEENBIT>
+ <TELL-OPEN-DOOR>)>
+ <COND (<AND <VERB? WALK>
+ <==? .OL ,OHERE>>
+ <TELL " follows you">)
+ (T
+ <TELL " walks past you from">
+ <COND (<EQUAL? .DIR ,P?UP ,P?DOWN>
+ <TELL !\ >
+ <DIR-PRINT <OPP-DIR .DIR>>)
+ (T
+ <TELL-HIS-HER-BEDROOM .CHR .OL>)>)>
+ <TELL ".|">)>)
+ (<SET COR <GETP ,HERE ,P?CORRIDOR>>
+ <COND (<NOT <ZERO? .PCOR>>
+ <COND (<ZERO? <CORRIDOR-LOOK .WHERE>>
+ <SET VAL T>
+ <COND (<AND <EQUAL? .PERSON ,P-HER-OBJECT>
+ <FSET? ,HER ,TOUCHBIT>>
+ <TELL "She">)
+ (<AND <EQUAL? .PERSON ,P-HIM-OBJECT>
+ <FSET? ,HIM ,TOUCHBIT>>
+ <TELL "He">)
+ (T
+ <START-SENTENCE .PERSON>
+ <TELL !\,>
+ <WHERE? .PERSON .PCOR>
+ <TELL !\,>)>
+ <COND (<AND <T? .DOOR>
+ <NOT <FSET? .DOOR ,OPENBIT>>>
+ <FSET .DOOR ,TOUCHBIT ;,SEENBIT>
+ <TELL-OPEN-DOOR>)>
+ <COND (<ENTERS? .DIR .WHERE>
+ <TELL " enters">
+ <TELL-HIS-HER-BEDROOM .CHR .WHERE>)
+ (T
+ <TELL " disappears ">
+ <COND (<NOT <EQUAL? .DIR ,P?UP ,P?DOWN>>
+ <TELL "to the ">)>
+ <DIR-PRINT .EDIR>)>
+ <TELL-LOCKING-THE-DOOR .DOOR>
+ <TELL ".|">)
+ (T
+ <SET VAL T>
+ <START-SENTENCE .PERSON>
+ <TELL " is">
+ <WHERE? .PERSON .PCOR>
+ <TELL ", heading ">
+ <COND (<==? .PCOR .DIR>
+ <TELL "away from you">)
+ (<==? .PCOR <OPP-DIR .DIR>>
+ <TELL "toward you">)
+ (T
+ <COND (<NOT <EQUAL? .DIR ,P?UP ,P?DOWN>>
+ <TELL "toward the ">)>
+ <DIR-PRINT .EDIR>)>
+ <TELL ".|">)>)
+ (<T? <SET PCOR <CORRIDOR-LOOK .WHERE>>>
+ <SET VAL T>
+ <WHERE? .PERSON .PCOR T>
+ <TELL HE .PERSON appear>
+ <SET DIR <COMPASS-EQV ,HERE <DIR-FROM .WHERE .OL>>>
+ <COND (<NOT <EQUAL? .DIR ,P?IN>>
+ <TELL " from">
+ <TELL-HIS-HER-BEDROOM .CHR .OL>)>
+ <TELL ".|">)>)>
+ <COND (<AND .VAL
+ <IN? ,LUGGAGE .PERSON>
+ <T? ,NOW-WEARING>
+ ;<==? ,HERE .WHERE>>
+ <TELL CHE .PERSON is " carrying " D ,LUGGAGE ".|">)>
+ <COND (<T? .PERSON> <MOVE .PERSON .WHERE>)>
+ <COND (.GT
+ <COND (<==? <GET .GT ,GOAL-F> .WHERE>
+ <SET X <GOAL-REACHED .PERSON>>
+ <COND (<AND <ZERO? .X>
+ <==? ,HERE .WHERE>
+ <NOT <FSET? .PERSON ,NDESCBIT>>>
+ <SET VAL T>
+ <TELL CHE .PERSON " enters and nods to you." CR>)
+ (<AND <T? .X>
+ <NOT <==? .VAL ,M-FATAL>>>
+ <SET VAL .X>)>)
+ (T
+ <SET X <D-APPLY "Enroute" <GET .GT ,GOAL-FUNCTION>
+ ,G-ENROUTE>>
+ <COND (<AND <ZERO? .X>
+ <IN? .PERSON ,HERE>
+ <NOT <FSET? .PERSON ,TOUCHBIT>>>
+ <COND (<SET X <APPLY <GETP .PERSON ,P?DESCFCN>
+ ,M-OBJDESC>>
+ <SET VAL T>)>)
+ (<AND <T? .X>
+ <NOT <==? .VAL ,M-FATAL>>>
+ <SET VAL .X>)>)>)>
+ ;%<DEBUG-CODE <COND (,DBUG
+ <TELL !\{>
+ <TELL-$WHERE .PERSON .WHERE>
+ <TELL "}|">)>>
+ <COND (<T? .VAL>
+ <THIS-IS-IT .PERSON>
+ <COND (<NOT <==? .VAL ,M-FATAL>>
+ <FSET .WHERE ,SEENBIT> ;"so FOLLOW CHR works"
+ <PUT ,FOLLOW-LOC .CHR .WHERE>)>
+ <RETURN .VAL>)>>
+
+"? combine next two routines?"
+
+<ROUTINE COMPASS-EQV (RM DIR "AUX" DIRTBL DIRL P L TBL (VAL <>))
+ <COND ;(<ZERO? .DIR> <RFALSE>)
+ (<AND <NOT <EQUAL? .DIR ,P?UP ,P?DOWN>>
+ <NOT <EQUAL? .DIR ,P?IN ,P?OUT>>>
+ <RETURN .DIR>)>
+ <SET DIRTBL <GETPT .RM .DIR>>
+ <SET DIRL <PTSIZE .DIRTBL>>
+ <SET P 0>
+ <REPEAT ()
+ <COND (.VAL <RETURN .VAL>)
+ (<0? <SET P <NEXTP .RM .P>>> <RFALSE>)
+ (<NOT <L? .P ,LOW-DIRECTION>>
+ <SET TBL <GETPT .RM .P>>
+ <SET L <PTSIZE .TBL>>
+ <COND (<NOT <==? .L .DIRL>> <AGAIN>)>
+ <DEC L>
+ <REPEAT ()
+ <COND (<NOT <==? <GETB .TBL .L> <GETB .DIRTBL .L>>>
+ <RETURN>)
+ (<DLESS? L 0>
+ <SET VAL .P>
+ <RETURN>)>>)>>>
+
+<ROUTINE DIR-EQV? (RM DIR1 DIR2 "AUX" DIR1TBL DIR2TBL L)
+ <COND (<==? .DIR1 .DIR2>
+ <RTRUE>)
+ (<ZERO? <SET DIR1TBL <GETPT .RM .DIR1>>>
+ <RFALSE>)
+ (<ZERO? <SET DIR2TBL <GETPT .RM .DIR2>>>
+ <RFALSE>)>
+ <SET L <PTSIZE .DIR1TBL>>
+ <COND (<NOT <==? .L <PTSIZE .DIR2TBL>>>
+ <RFALSE>)>
+ <DEC L>
+ <REPEAT ()
+ <COND (<NOT <==? <GETB .DIR1TBL .L> <GETB .DIR2TBL .L>>>
+ <RFALSE>)
+ (<DLESS? L 0>
+ <RTRUE>)>>>
+
+<ROUTINE DIR-FROM (HERE THERE "AUX" (V <>) P D)
+ <COND (<DIR-FROM-TEST .HERE .THERE ,P?UP> <RETURN ,P?UP>)
+ (<DIR-FROM-TEST .HERE .THERE ,P?DOWN> <RETURN ,P?DOWN>)
+ (<DIR-FROM-TEST .HERE .THERE ,P?IN> <RETURN ,P?IN>)
+ (<DIR-FROM-TEST .HERE .THERE ,P?OUT> <RETURN ,P?OUT>)>
+ <SET P 0>
+ <REPEAT ()
+ <COND (<L? <SET P <NEXTP .HERE .P>> ,LOW-DIRECTION>
+ <RETURN .V>)
+ (<SET D <DIR-FROM-TEST .HERE .THERE .P>>
+ <COND (<AND <L? .D ,LOW-DIRECTION> <NOT .V>>
+ <SET V .P>)
+ (T <RETURN .P>)>)>>>
+
+<ROUTINE DIR-FROM-TEST (HERE THERE P "AUX" L TBL)
+ <COND (<ZERO? <SET TBL <GETPT .HERE .P>>>
+ <RFALSE>)>
+ <SET L <PTSIZE .TBL>>
+ <COND (<AND <EQUAL? .L ,DEXIT ,UEXIT ,CEXIT>
+ <==? <GET-REXIT-ROOM .TBL> .THERE>>
+ <RETURN .P>)>>
+
+"These routines were moved to low addresses in MISC: I-FOLLOW I-ATTENTION."
+
+<ROUTINE I-PLAYER (ARG "AUX" (VAL <>))
+ <SETG HERE <LOC ,PLAYER>>
+ <COND (<==? .ARG ,G-REACHED>
+ <MAKE-ALL-PEOPLE -12 ;"listening to you">
+ <RTRUE>)
+ (<==? .ARG ,G-ENROUTE>
+ %<DEBUG-CODE <COND (<T? ,DBUG> <RFALSE>)>>
+ <COND (<==? ,OHERE ,HERE>
+ <RFALSE>)
+ (<OR <ZERO? <LIT?>>
+ <EQUAL? ,HERE ,MAZE>
+ <AND <FSET? <SET VAL ,HERE> ,SECRETBIT>
+ <NOT <FSET? ,HERE ,SEENBIT>>>
+ <AND <PROB 50>
+ <SET VAL
+ <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,PLAYER>>>>
+ <COND ;(<DIR-FROM ,HERE ,OHERE>
+ <TELL "You have just started walking, when">)
+ (T
+ <TELL "But ">
+ <COND (<FSET? ,HERE ,SURFACEBIT> <TELL "on">)
+ (T <TELL "in">)>
+ <TELL THE ,HERE>)>
+ <COND (<ZERO? .VAL>
+ <TELL " you get lost in the dark">)
+ (<FSET? .VAL ,SECRETBIT>
+ <TELL " you realize that you don't know the way">)
+ (<EQUAL? .VAL ,GHOST-NEW>
+ <TELL " the ghost blocks your way">)
+ (T
+ <TELL HE .VAL <PICK-ONE-NEW ,PLAYER-OBSTACLES>>)>
+ <TELL ".|">
+ <MAKE-ALL-PEOPLE -12 ;"listening to you">
+ <RFATAL>)
+ (T <RFALSE>)>)>>
+
+<GLOBAL PLAYER-OBSTACLES
+ <LTABLE 0
+ " gets in your way"
+ " says hello">>
+
+<ROUTINE GOODNIGHT (RM PER "OPTIONAL" (CLOSET <>) "AUX" DR (VAL <>))
+ <COND (<EQUAL? .RM ,HERE>
+ <TELL D .PER>
+ <THIS-IS-IT .PER>
+ <TELL
+" shows you firmly to the door, saying" HE .PER is " going to bed." CR>
+ <SET VAL ,WINNER>
+ <SETG WINNER ,PLAYER>
+ <PUTP .PER ,P?LINE 0> ;"so s/he won't prevent your leaving"
+ <GOTO <GET-REXIT-ROOM <GETPT ,HERE ,P?OUT>>>
+ <SETG WINNER .VAL>)
+ (<AND <EQUAL? .CLOSET ,HERE>
+ <SET DR <FIND-FLAG-LG .CLOSET ,DOORBIT ,SECRETBIT>>
+ <NOT <EQUAL? .DR ,SECRET-HYDE-DOOR ,SECRET-IRIS-DOOR>>
+ <FSET? .DR ,OPENBIT>>
+ <FCLEAR .DR ,OPENBIT>
+ <PUT ,FOUND-PASSAGES <GETP .PER ,P?CHARACTER> T>
+ <SETG LIT <LIT?>>
+ <TELL D .PER " closes the " D .DR " without noticing you." CR>
+ <SET VAL T>)>
+ <FCLEAR .RM ,ONBIT>
+ <FSET .PER ,MUNGBIT>
+ <FCLEAR .RM ,OPENBIT>
+ <FSET .RM ,LOCKED>
+ <COND (<EQUAL? .PER ,FOLLOWER>
+ <SETG FOLLOWER 0>)>
+ <PUTP .PER ,P?LDESC 14 ;"asleep">
+ .VAL>
+
+<ROUTINE GRAB-ATTENTION (PERSON "OPTIONAL" (OBJ <>) "AUX" N GT ATT)
+ <COND (<FSET? .PERSON ,MUNGBIT>
+ <COND (<EQUAL? <GETP .PERSON ,P?LDESC> 14 ;"asleep">
+ <TOO-BAD-BUT .PERSON "asleep">
+ <RFALSE>)
+ (T
+ <TOO-BAD-BUT .PERSON "out cold">
+ <RFALSE>)>)
+ (<AND <==? <GET <SET GT <GET ,GOAL-TABLES
+ <GETP .PERSON ,P?CHARACTER>>>
+ ,GOAL-FUNCTION>
+ ,X-RETIRES>
+ <NOT <EQUAL? .PERSON ,GHOST-NEW ,CONFESSED ,CAPTOR>>
+ <NOT <EQUAL? ,VARIATION <GETP .PERSON ,P?CHARACTER>>>
+ <OR <ZERO? .OBJ>
+ <FSET? .OBJ ,PERSONBIT>
+ <NOT <FSET? .OBJ ,RMUNGBIT>> ;"evidence">>
+ <TOO-BAD-BUT .PERSON "too sleepy to listen">
+ <RFALSE>)
+ (<AND <==? .PERSON ,BUTLER>
+ <OR <VERB? ASK-FOR>
+ <T? <GET .GT ,GOAL-S>>>
+ <NOT <VERB? SORRY TAKE THANKS>>
+ <NOT <DOBJ? LUGGAGE DINNER>>>
+ <BUTLER-SORRY>
+ <RFALSE>)
+ (<SET N <ANGRY-REJECT? .PERSON .OBJ>>
+ <TOO-BAD-BUT .PERSON
+ <COND (<1? .N> "peeved")
+ (T "angry")>>
+ <RFALSE>)>
+ <COND (<GET .GT ,GOAL-S>
+ <SET ATT <GET .GT ,ATTENTION-SPAN>>
+ <PUT .GT ,ATTENTION .ATT>
+ <COND (<==? .ATT 0>
+ <PUT .GT ,GOAL-ENABLE 1>
+ <TOO-BAD-BUT .PERSON <GET ,LDESC-STRINGS 17>
+ ;"preparing to leave">
+ <RFALSE>)
+ (T
+ <PUT .GT ,GOAL-ENABLE 0>)>)>
+ <SETG QCONTEXT .PERSON>
+ <COND (<NOT <==? <GETP .PERSON ,P?LDESC> 21 ;"searching">>
+ <PUTP .PERSON ,P?LDESC 12 ;"listening to you">)>
+ <RTRUE>>
+
+<ROUTINE ANGRY-REJECT? (PERSON OBJ "AUX" N)
+ <COND (<==? .PERSON ,GHOST-NEW>
+ <RFALSE>)
+ (<0? <SET N <GETP .PERSON ,P?LINE>>>
+ <RFALSE>)
+ (<VERB? FORGIVE SORRY TELL ;"JACK,SORRY">
+ <RFALSE>)
+ (<AND <VERB? GIVE> <==? ,PRSI .PERSON>>
+ <RFALSE>)
+ (<EVIDENCE? .OBJ .PERSON>
+ <RFALSE>)
+ (T .N)>>
+
+<ROUTINE WHERE? (PER "OPTIONAL" (X 0) (CAP 0))
+ <COND (<NOT <IN? .PER ,HERE>>
+ <COND (<ZERO? .X>
+ <TELL !\,>
+ <SET X <CORRIDOR-LOOK .PER>>
+ ;<SET X <COR-DIR ,HERE <LOC .PER> <GETP .PER ,P?CAR>>>)>
+ <COND (<ZERO? .CAP> <PRINTC 32>)>
+ <COND (<EQUAL? .X ,P?DOWN>
+ <COND (<ZERO? .CAP> <TELL !\d>)
+ (T <TELL !\D>)>
+ <TELL "ownstairs">)
+ (<EQUAL? .X ,P?IN>
+ <COND (<ZERO? .CAP> <TELL "in">) (T <TELL "In">)>
+ <TELL-HIS-HER-BEDROOM <GETP .PER ,P?CHARACTER>
+ <LOC .PER>>)
+ (<EQUAL? .X ,P?OUT>
+ <COND (<ZERO? .CAP> <TELL !\j>)
+ (T <TELL !\J>)>
+ <TELL "ust outside">)
+ (T
+ <COND (<ZERO? .CAP> <TELL !\t>)
+ (T <TELL !\T>)>
+ <TELL "o the ">
+ <DIR-PRINT .X>)>
+ <RTRUE>)>>
+
+<ROUTINE DIR-PRINT (DIR "AUX" (CNT 0) TBL X)
+ <COND (<NOT .DIR>
+ <TELL "out of view">
+ <RTRUE>)>
+ <SET TBL ,DIR-STRINGS>
+ <REPEAT ()
+ <SET X <GET .TBL .CNT>>
+ <COND (<ZERO? .X>
+ <TELL "out of view">
+ <RTRUE>)
+ (<==? .X .DIR>
+ ;<COND (<NOT <EQUAL? .DIR ,P?UP ,P?DOWN>>
+ <TELL "the ">)>
+ <PRINT <GET .TBL <+ .CNT 1>>>
+ <RTRUE>)>
+ <SET CNT <+ .CNT 2>>>>
+
+<GLOBAL DIR-STRINGS
+ <PTABLE P?SOUTH "south" P?NORTH "north"
+ P?EAST "east" P?WEST "west"
+ P?UP "upstairs" P?DOWN "downstairs"
+ P?IN "inner" P?OUT "outer"
+ P?SE "southeast" P?NW "northwest"
+ P?SW "southwest" P?NE "northeast"
+ 0>>
+
+<ROUTINE OPP-DIR (DIR "AUX" (CNT 0) X)
+ <REPEAT ()
+ <SET X <GET ,DIR-STRINGS .CNT>>
+ <COND (<ZERO? .X> <RFALSE>)
+ (<==? .X .DIR>
+ <COND (<0? <MOD .CNT 4>>
+ <RETURN <GET ,DIR-STRINGS <+ .CNT 2>>>)
+ (T
+ <RETURN <GET ,DIR-STRINGS <- .CNT 2>>>)>)>
+ <SET CNT <+ .CNT 2>>>>
+
+"Goal tables for the characters, offset by a constant,
+which, for a given character, is the P?CHARACTER property of the object."
+
+<GLOBAL GOAL-TABLES
+ <PTABLE <TABLE <> <> <> 1 <> I-PLAYER 5 0>
+ <TABLE <> <> <> 1 <> X-WAITS 5 0>
+ <TABLE <> <> <> 1 <> X-WAITS 5 0>
+ <TABLE <> <> <> 1 <> X-WAITS 5 0>
+ <TABLE <> <> <> 1 <> X-WAITS 5 0>
+ <TABLE <> <> <> 1 <> X-WAITS 5 0>
+ <TABLE <> <> <> 1 <> X-WAITS 5 0>
+ <TABLE <> <> <> 1 <> X-WAITS 5 0>
+ <TABLE <> <> <> 1 <> BUTLER-APPEARS 1 0>
+ <TABLE <> <> <> 1 <> LOVER-XFER 5 0>
+ <TABLE <> <> <> 1 <> GHOST-LURKS 5 0>>>
+[
+"Offsets into GOAL-TABLEs"
+
+<CONSTANT GOAL-F 0> "final goal"
+<CONSTANT GOAL-S 1> "station of final goal"
+<CONSTANT GOAL-I 2> "intermediate goal (transfer point)"
+<CONSTANT GOAL-ENABLE 3> "character can move: 0=no 1=slow 2=fast"
+<CONSTANT GOAL-QUEUED 4> "queued goal to go to after interruption"
+<CONSTANT GOAL-FUNCTION 5> "routine to apply on arrival"
+<CONSTANT ATTENTION-SPAN 6> "how long character will wait when interrupted"
+<CONSTANT ATTENTION 7> "used to count down from ATTENTION-SPAN to 0"
+]
+
+"Goal-function constants, similar to M-xxx in MAIN"
+
+<CONSTANT G-REACHED 1>
+<CONSTANT G-ENROUTE 2>
+<CONSTANT G-IMPATIENT 3>
+<CONSTANT G-DEBUG 4>
+
+<GLOBAL TOUR-INDEX:NUMBER 0>
+<GLOBAL TOUR-PATH
+ <PTABLE FOYER DRAWING-ROOM GREAT-HALL GALLERY YOUR-ROOM 0>>
+
+<ROUTINE I-TOUR ("OPTIONAL" (GARG <>) "AUX" L)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-TOUR:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <SET L <GET ,TOUR-PATH ,TOUR-INDEX>>
+ <COND (<ZERO? .L>
+ <COND (<EQUAL? ,FOLLOWER ,FRIEND ,LORD>
+ <SETG FOLLOWER 0>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL "0]" CR>)>>
+ <RFALSE>)>
+ <COND (<AND <==? ,HERE ,GREAT-HALL>
+ <NOT <FSET? ,DOCTOR ,TOUCHBIT>>>
+ <QUEUE I-TOUR 3>
+ <MOVE ,DOCTOR ,HERE>
+ <SET L <DOCTOR-D>>
+ <SETG TOUR-FORCED <>>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .L "]" CR>)>>
+ <RETURN .L>)>
+ <INC TOUR-INDEX>
+ <SETG AWAITING-REPLY <>>
+ <MAKE-ALL-PEOPLE 0>
+ <COND (<AND <NOT <QUEUED? ,I-FOUND-IT>>
+ <ZERO? ,TOUR-FORCED>>
+ <CRLF>)>
+ <SETG FOUND-IT <>>
+ <QUEUE I-FOUND-IT 0>
+ <COND (<EQUAL? .L ,GALLERY>
+ <TELL
+"\"You two will have time to chat later,\" says " 'FRIEND ",
+\"but you must excuse us now, ">
+ <COND (<NOT <EQUAL? ,QCONTEXT <> ,FRIEND ,BUTLER>>
+ <PRINTD ,QCONTEXT>)
+ (T <PRINTD ,DOCTOR>)>
+ <TELL ", while I show "FN" up to ">
+ <COND (<ZERO? ,GENDER-KNOWN> <TELL "the "> <PRINT-COLOR>)
+ (<FSET? ,PLAYER ,FEMALE> <TELL "her">)
+ (T <TELL "his">)>
+ <TELL " bedroom. I'm sure ">
+ <COND (<ZERO? ,GENDER-KNOWN> <TELL "our guest">)
+ (<FSET? ,PLAYER ,FEMALE> <TELL "she">)
+ (T <TELL "he">)>
+ <TELL " wants to freshen up for dinner!\"" CR>)>
+ <TELL 'FRIEND " guides you ">
+ <COND (<EQUAL? .L ,GALLERY>
+ <PUTP ,LORD ,P?LDESC 13 ;"lounging and chatting">
+ <PUTP ,DEB ,P?LDESC 13 ;"lounging and chatting">
+ <PUTP ,OFFICER ,P?LDESC 13 ;"lounging and chatting">
+ <TELL "up to">)
+ (T <TELL "into">)>
+ <TELL THE .L ".||">
+ <FSET ,FRIEND ,RMUNGBIT> ;"to skip description"
+ <THIS-IS-IT ,FRIEND>
+ <MOVE ,FRIEND .L>
+ <COND (<EQUAL? .L ,GALLERY ,YOUR-ROOM>
+ <PUTP ,FRIEND ,P?LINE 0>
+ <TELL "She says, \"">
+ <COND (<EQUAL? .L ,GALLERY>
+ <TELL
+"I know it's confusing, but the British call this the
+'first' floor. We just left the 'ground' floor.\"" CR>)
+ (T <TELL
+"You'll be sleeping in the same room that Queen Victoria
+slept in!\"" CR>)>)>
+ <COND (<NOT <EQUAL? .L ,GALLERY ,YOUR-ROOM>>
+ <COND (<FSET? ,LORD ,TOUCHBIT>
+ <FSET ,LORD ,RMUNGBIT> ;"to skip description")>
+ <MOVE ,LORD .L>
+ <PUT ,FOLLOW-LOC ,LORD-C .L>)>
+ <SETG WINNER ,PLAYER>
+ <GOTO .L T <>>
+ <COND (<NOT <EQUAL? .L ,YOUR-ROOM>>
+ <QUEUE I-TOUR 3>)
+ (T
+ <COND (<EQUAL? ,FOLLOWER ,FRIEND ,LORD>
+ <SETG FOLLOWER 0>)>
+ <COND (<IN? ,BUTLER .L>
+ <ESTABLISH-GOAL ,FRIEND <LOC ,OFFICER>>
+ <TAMARA-LEAVES-YOU>)>)>
+ <SETG TOUR-FORCED <>>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL "2]" CR>)>>
+ <RFATAL>>
+
+<ROUTINE I-FRIEND-GREETS ("OPTIONAL" (GARG <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-FRIEND-GREETS:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <TELL "When a door opens in the castle">
+ <COND (<NOT <FSET? ,FRONT-GATE ,OPENBIT>>
+ <FSET ,FRONT-GATE ,OPENBIT>
+ <TELL " and the " 'FRONT-GATE " creaks open">)>
+ <TELL ", you decide to ">
+ <COND (<NOT <EQUAL? ,HERE ,COURTYARD>>
+ <MOVE ,CAR ,COURTYARD>
+ <TELL "drive through the gate and ">)>
+ <TELL "get out of the car." CR>
+ <GOTO ,COURTYARD>
+ <RTRUE>>
+
+<ROUTINE BUTLER-APPEARS ("OPTIONAL" (GARG <>) "AUX" LL L)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[BUTLER-APPEARS:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<==? .GARG ,G-REACHED>
+ ;<FCLEAR ,BUTLER ,NDESCBIT> ;"in BUTLER-D"
+ <PUT <GT-O ,BUTLER> ,GOAL-FUNCTION ,BUTLER-FETCHES>
+ <PUTP ,BUTLER ,P?LDESC 6 ;"walking along">
+ <COND (<NOT <FSET? ,COURTYARD ,TOUCHBIT>>
+ <ESTABLISH-GOAL ,BUTLER ,COURTYARD>)
+ (T
+ <SET L <LOC ,BUTLER>>
+ <SET LL <META-LOC ,LUGGAGE>>
+ <COND (<EQUAL? .LL ,YOUR-ROOM ,YOUR-BATHROOM>
+ <COND (<EQUAL? ,FOLLOWER ,FRIEND ,LORD>
+ <SETG FOLLOWER 0>)>
+ <ESTABLISH-GOAL ,BUTLER <LOC ,BUTLER>> ;"no-op")
+ (<EQUAL? .LL .L>
+ <BUTLER-FETCHES ,G-REACHED>)
+ (T
+ <ESTABLISH-GOAL ,BUTLER .LL>)>)>
+ <RFALSE>)>>
+
+<ROUTINE BUTLER-FETCHES ("OPTIONAL" (GARG <>) "AUX" (L <LOC ,BUTLER>) LL GT)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[BUTLER-FETCHES:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <SET LL <META-LOC ,LUGGAGE>>
+ <SET GT <GT-O ,BUTLER>>
+ <PUTP ,BUTLER ,P?LDESC 6 ;"walking along">
+ <COND (<EQUAL? .LL ,YOUR-ROOM ,YOUR-BATHROOM>
+ <COND (<EQUAL? ,FOLLOWER ,FRIEND ,LORD>
+ <SETG FOLLOWER 0>)>
+ <PUT .GT ,GOAL-FUNCTION ,BUTLER-CARRIES>
+ <ESTABLISH-GOAL ,BUTLER <LOC ,BUTLER>> ;"no-op"
+ <RFALSE>)
+ (<AND <EQUAL? .L .LL>
+ <NOT <IN? ,LUGGAGE ,BUTLER>>>
+ <PUT .GT ,GOAL-FUNCTION ,BUTLER-CARRIES>
+ <ESTABLISH-GOAL ,BUTLER ,YOUR-ROOM>
+ <FCLEAR ,LUGGAGE ,OPENBIT>
+ <MOVE ,LUGGAGE ,BUTLER>
+ <MOVE ,CAR ,COURTYARD>
+ <COND (<AND <EQUAL? .L ,HERE>
+ <NOT <FSET? ,BUTLER ,NDESCBIT>>>
+ <TELL CHE ,BUTLER " takes " 'LUGGAGE ".|">)>
+ ;<FCLEAR ,BUTLER ,NDESCBIT>
+ <RFALSE>)
+ (<==? .GARG ,G-REACHED>
+ <COND (<FSET? ,COURTYARD ,TOUCHBIT>
+ <ESTABLISH-GOAL ,BUTLER <META-LOC ,LUGGAGE>>)
+ (T
+ <ESTABLISH-GOAL ,BUTLER ,COURTYARD>)>
+ <RFALSE>)>>
+
+<ROUTINE TAMARA-LEAVES-YOU ()
+ <TELL
+CHE ,FRIEND " turns to leave, saying, \"Here's " 'BUTLER>
+ <COND (<IN? ,LUGGAGE ,BUTLER>
+ <TELL " with " D ,LUGGAGE>)>
+ <TELL ", so I'll leave you to rest or freshen up, ">
+ <COND (<PRINT-NAME ,FIRST-NAME> <TELL !\.>)>
+ <TELL
+" Dinner's at eight, by the way -- or whenever you hear the gong.\"" CR>>
+
+<ROUTINE BUTLER-CARRIES ("OPTIONAL" (GARG <>) "AUX" (L <LOC ,BUTLER>) (LL <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[BUTLER-CARRIES:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<==? .GARG ,G-ENROUTE>
+ <COND (<EQUAL? .L ,FOYER> <FCLEAR ,FRONT-DOOR ,OPENBIT>)>
+ <RFALSE>)
+ (<==? .GARG ,G-REACHED>
+ <PUT <GT-O ,BUTLER> ,GOAL-ENABLE 0>
+ <QUEUE I-BUTLER-HINTS 7>
+ <QUEUE I-BUTLER-COOKS 9>
+ <PUTP ,BUTLER ,P?LDESC 9 ;"waiting patiently">
+ <FCLEAR ,BUTLER ,NDESCBIT>
+ <COND (<IN? ,LUGGAGE ,BUTLER>
+ <SET LL T>
+ <MOVE ,LUGGAGE ,BED>)>
+ <COND (<AND <NOT <QUEUED? ,I-TOUR>>
+ <NOT <==? ,FRIEND ,FOLLOWER>>>
+ <ESTABLISH-GOAL ,FRIEND <LOC ,OFFICER>>)>
+ <COND (<EQUAL? .L ,HERE>
+ <COND (<AND <IN? ,FRIEND ,HERE>
+ <NOT <==? ,FRIEND ,FOLLOWER>>>
+ <TAMARA-LEAVES-YOU>)>
+ <TELL "The butler enters">
+ <COND (.LL<TELL " with " D ,LUGGAGE" and lays it on the bed">)>
+ <SETG QCONTEXT ,BUTLER>
+ <THIS-IS-IT ,BUTLER>
+ <FSET ,BUTLER ,TOUCHBIT>
+ <PUTP ,BUTLER ,P?LDESC 12 ;"listening to you">
+ <SETG AWAITING-REPLY ,BUTLER-1-R>
+ <QUEUE I-REPLY ,CLOCKER-RUNNING>
+ <TELL ".|
+\"I regret to say, "TN", that the maid will be unable to unpack for you,
+due to the arrangements for the
+late Lord Lionel's memorial birthday dinner,\" he apologizes.
+\"" <GET ,QUESTIONS ,AWAITING-REPLY> "\"|">
+ <RFATAL>)>)>>
+
+<GLOBAL BUTLER-HINTS-COUNTER:NUMBER 0>
+<ROUTINE I-BUTLER-HINTS ("OPTIONAL" (GARG <>) "AUX" (SAID <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-BUTLER-HINTS:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND ;(<FIND-FLAG-HERE ,PERSONBIT ,PLAYER ,BUTLER>
+ <QUEUE I-BUTLER-HINTS 1>)
+ (<OR <EQUAL? ,AWAITING-REPLY ,BUTLER-1-R ,BUTLER-2-R>
+ <EQUAL? ,AWAITING-REPLY ,BUTLER-3-R ,BUTLER-4-R>>
+ <QUEUE I-BUTLER-HINTS 1>)
+ (<L? 2 ,BUTLER-HINTS-COUNTER>
+ <QUEUE I-BUTLER-HINTS 0>
+ <RFALSE>)
+ (<AND <EQUAL? ,HERE <LOC ,BUTLER>>
+ <ZERO? <GETP ,BUTLER ,P?LINE>>>
+ <SET SAID T>
+ <PUT <GT-O ,BUTLER> ,ATTENTION 5>
+ <SETG BUTLER-HINTS-COUNTER <+ ,BUTLER-HINTS-COUNTER 1>>
+ <QUEUE I-BUTLER-HINTS 2>
+ <SETG QCONTEXT ,BUTLER>
+ <THIS-IS-IT ,BUTLER>
+ <PUTP ,BUTLER ,P?LDESC 12 ;"listening to you">
+ <COND (<==? 1 ,BUTLER-HINTS-COUNTER>
+ <SETG AWAITING-REPLY ,BUTLER-2-R>
+ <QUEUE I-REPLY ,CLOCKER-RUNNING>
+ <TELL
+'BUTLER " coughs diffidently and asks, \""TN"? "
+<GET ,QUESTIONS ,AWAITING-REPLY> "\"|">
+ <SET SAID ,M-FATAL>)
+ (<==? 2 ,BUTLER-HINTS-COUNTER>
+ <COND (<NOT <IN? ,MACE ,BUTLER>>
+ <RFALSE>)>
+ <SETG AWAITING-REPLY ,BUTLER-3-R>
+ <QUEUE I-REPLY ,CLOCKER-RUNNING>
+ <TELL
+"|\"" <GET ,QUESTIONS ,AWAITING-REPLY> "\" adds " 'BUTLER ".|">
+ <SET SAID ,M-FATAL>)
+ (<==? 3 ,BUTLER-HINTS-COUNTER>
+ <I-BUTLER-COOKS>
+ <COND (<NOT <FSET? ,SECRET-YOUR-DOOR ,OPENBIT>>
+ <TELL "\"Ah, by the way, "TN" -- s">
+ <BUTLER-MIRROR-STORY>
+ <TELL "Without explaining further, " 'BUTLER>
+ <COND (<EQUAL? ,HERE ,YOUR-ROOM>
+ <PUT ,FOLLOW-LOC ,BUTLER-C ,GALLERY>
+ <MOVE ,BUTLER ,GALLERY>
+ <PUTP ,BUTLER ,P?LDESC 6 ;"walking along">
+ <TELL " abruptly leaves the room." CR>)
+ (T
+ <PUTP ,BUTLER ,P?LDESC 20 ;"ignoring you">
+ <TELL " turns to his work." CR>)>)
+ (T
+ <TELL
+"\"I hope you have a pleasant stay with us, ">
+ <COND (<TITLE-NAME> <TELL !\.>)>
+ <TELL " Dinner is at eight.\"" CR>)>)>)
+ (<NOT <IN? ,BUTLER ,LOCAL-GLOBALS>>
+ <QUEUE I-BUTLER-HINTS 1>)
+ ;(<==? 3 ,BUTLER-HINTS-COUNTER>
+ <QUEUE I-BUTLER-HINTS 0>
+ ;<COND (<QUEUED? ,I-BUTLER-COOKS>
+ <I-BUTLER-COOKS>)>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .SAID !\] CR>)>>
+ <RETURN .SAID>>
+
+<ROUTINE I-BUTLER-COOKS ("OPTIONAL" (GARG <>) (VAL <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-BUTLER-COOKS:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<OR <EQUAL? ,AWAITING-REPLY ,BUTLER-1-R ,BUTLER-2-R>
+ <EQUAL? ,AWAITING-REPLY ,BUTLER-3-R ,BUTLER-4-R>
+ <AND <NOT <==? 3 ,BUTLER-HINTS-COUNTER>>
+ <SET VAL <I-BUTLER-HINTS>>>>
+ <QUEUE I-BUTLER-COOKS ;-HINTS 2>)
+ (<IN? ,DINNER ,KITCHEN>
+ <PUTP ,BUTLER ,P?LDESC 17 ;"preparing to leave">
+ <PUT <GT-O ,BUTLER> ,GOAL-FUNCTION ,BUTLER-COOKS>
+ <ESTABLISH-GOAL ,BUTLER ,KITCHEN>)
+ (T <BUTLER-COOKS ,G-REACHED>)>
+ <RETURN .VAL>>
+
+<ROUTINE BUTLER-COOKS ("OPTIONAL" (GARG <>) "AUX" N)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[BUTLER-COOKS:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<==? .GARG ,G-REACHED>
+ <PUTP ,BUTLER ,P?LDESC 11 ;"preparing dinner">
+ <SET N <- %<- ,DINNER-TIME 8> ,PRESENT-TIME>>
+ <COND (<NOT <G? .N 0>> <SET N 1>)>
+ <COND (<IN? ,DINNER ,KITCHEN>
+ <QUEUE I-BUTLER-SERVES .N>)
+ (T
+ <PUT <GT-O ,BUTLER> ,GOAL-FUNCTION ,BUTLER-LEAVES>
+ <PUTP ,BUTLER ,P?LDESC 17 ;"preparing to leave">
+ <ESTABLISH-GOAL ,BUTLER ,KITCHEN>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL "0]" CR>)>>
+ <RFALSE>)>>
+
+<ROUTINE I-BUTLER-SERVES ("OPTIONAL" (GARG <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-BUTLER-SERVES:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <MOVE ,DINNER ,BUTLER>
+ <PUTP ,BUTLER ,P?LDESC 17 ;"preparing to leave">
+ <PUT <GT-O ,BUTLER> ,GOAL-FUNCTION ,BUTLER-SERVES>
+ <ESTABLISH-GOAL ,BUTLER ,DINING-ROOM>
+ <COND (<IN? ,BUTLER ,HERE>
+ <TELL 'BUTLER " takes dinner." CR>)>>
+
+<ROUTINE BUTLER-SERVES ("OPTIONAL" (GARG <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[BUTLER-SERVES:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<==? .GARG ,G-REACHED>
+ <COND (<EQUAL? ,HERE ,DINING-ROOM>
+ <TELL CHE ,BUTLER " appears">)>
+ <COND (<IN? ,DINNER ,BUTLER>
+ <COND (<EQUAL? ,HERE ,DINING-ROOM>
+ <TELL ", puts dinner on the " 'SIDEBOARD>)>
+ <MOVE ,DINNER ,SIDEBOARD>)>
+ <COND (<IN? ,LETTER ,BUTLER>
+ <COND (<EQUAL? ,HERE ,DINING-ROOM>
+ <FCLEAR ,LETTER ,NDESCBIT>
+ <TELL ", leaves a note on Jack's napkin">)>
+ <MOVE ,LETTER ,TABLE-DINING>
+ <FSET ,LETTER ,TAKEBIT>)>
+ ;<COND (<IN? ,CLUE-1 ,BUTLER>
+ <COND (<EQUAL? ,HERE ,DINING-ROOM>
+ <FCLEAR ,CLUE-1 ,NDESCBIT>
+ <TELL ", puts a card on the " 'SIDEBOARD>)>
+ <MOVE ,CLUE-1 ,SIDEBOARD>)>
+ <FSET ,CLUE-1 ,TAKEBIT>
+ <PUTP ,BUTLER ,P?LDESC 17 ;"preparing to leave">
+ <PUT <GT-O ,BUTLER> ,GOAL-FUNCTION ,BUTLER-LEAVES>
+ <ESTABLISH-GOAL ,BUTLER ,KITCHEN>
+ <COND (<EQUAL? ,HERE ,DINING-ROOM>
+ <TELL ", and looks around the room." CR>)>)>>
+
+<ROUTINE X-WAITS ("OPTIONAL" (GARG <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[X-WAITS:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<==? .GARG ,G-REACHED>
+ <PUTP ,GOAL-PERSON ,P?LDESC 9 ;"waiting patiently">
+ <RFALSE>)>>
+
+<GLOBAL MASS-SAID:FLAG 0>
+<GLOBAL MASS-COUNTER:NUMBER 0>
+
+<ROUTINE I-DINNER ("OPTIONAL" (GARG <>) "AUX" N CH (SAID <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-DINNER:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <SET N ,MASS-COUNTER>
+ <REPEAT ()
+ <COND (<IGRTR? N ,DEB-C>
+ <SETG MASS-SAID <>>
+ <SETG MASS-COUNTER 0>
+ <COND (<NOT <QUEUED? ,I-DINNER-SIT>>
+ <QUEUE I-DINNER-SIT 5>)>
+ <RFALSE>)
+ (<AND <==? .N ,FRIEND-C>
+ <QUEUED? ,I-TOUR>>
+ <QUEUE I-TOUR 1>
+ <RFALSE>)>
+ <SET CH <GET ,CHARACTER-TABLE .N>>
+ <COND (<==? .CH ,FOLLOWER>
+ <SETG FOLLOWER 0>)>
+ <COND (<AND <NOT <==? .CH ,SHOOTER>>
+ <NOT <FSET? .CH ,MUNGBIT>>
+ <NOT <IN? .CH ,DINING-ROOM>>>
+ <RETURN>)>>
+ <QUEUE I-DINNER 1>
+ <SETG MASS-COUNTER .N>
+ <PUT <GET ,GOAL-TABLES .N> ,GOAL-FUNCTION ,X-WAITS>
+ <ESTABLISH-GOAL .CH ,DINING-ROOM>
+ <COND (<AND <EQUAL? <META-LOC .CH> ,HERE>
+ <NOT <EQUAL? ,HERE ,DINING-ROOM>>
+ <OR <ZERO? ,MASS-SAID>
+ <==? .CH ,FOLLOWER>>>
+ <SET SAID T>
+ <SETG MASS-SAID T>
+ <COND (<==? .CH ,FOLLOWER>
+ <SETG FOLLOWER 0>)>
+ <TELL CHE .CH " says, \"It's time for dinner now. ">
+ <COND (<OR <NOT <EQUAL? ,NOW-WEARING ,DINNER-OUTFIT>>
+ <ZERO? ,WASHED>>
+ <TELL "I'll see you in">)
+ (T <TELL "Let's go to">)>
+ <TELL " the " 'DINING-ROOM ".\"" CR>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .SAID "]|">)>>
+ <RETURN .SAID>>
+
+<GLOBAL BUTLER-RANG-BELL?:FLAG <>>
+<GLOBAL PLAYER-RANG-BELL?:FLAG <>>
+
+<ROUTINE BUTLER-RINGS-BELL? ("OPT" (FAKE <>) "AUX" P)
+ <COND (<OR <T? .FAKE>
+ <ZERO? ,BUTLER-RANG-BELL?>>
+ <SETG BUTLER-RANG-BELL? T>
+ <QUEUE I-DINNER 1> ;"in case someone's delayed"
+ <FSET ,CLUE-1 ,TAKEBIT>
+ <COND (<AND <ZERO? .FAKE>
+ <EQUAL? ,HERE ,KITCHEN>>
+ <TELL 'BUTLER>
+ <COND (<NOT <==? ,HERE <GET ,FOLLOW-LOC ,BUTLER-C>>>
+ <TELL " appears and">)>
+ <TELL " pushes a hidden button. ">)>
+ <TELL "Suddenly, the dinner bell sounds">
+ ;<COND (<FIRST? ,BELL>
+ <TELL ", but it doesn't ring true">
+ <COND (<SET P <FIND-FLAG-HERE-NOT ,PERSONBIT
+ ,MUNGBIT ,PLAYER>>
+ <TELL
+". \"That's a bit odd,\" " D .P " comments">)>)>
+ <TELL "." CR>)>>
+
+<ROUTINE BUTLER-LEAVES ("OPTIONAL" (GARG <>) "AUX" L (VAL <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[BUTLER-LEAVES:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<==? .GARG ,G-REACHED>
+ <SET VAL <BUTLER-RINGS-BELL?>>
+ <MOVE ,BUTLER ,LOCAL-GLOBALS>
+ <PUT ,FOLLOW-LOC ,BUTLER-C 0>
+ <COND (<EQUAL? ,HERE ,DINING-ROOM>
+ <QUEUE I-DINNER-SIT 1>)
+ (<EQUAL? ,HERE ,KITCHEN>
+ <TELL "Then he ">
+ <COND (<IN? ,MACE ,BUTLER>
+ <TELL "drops " A ,MACE ", ">)>
+ <TELL
+"bids you good night, ducks into the areaway, locks the door
+behind him, and leaves the castle." CR>
+ <SET VAL ,M-FATAL>)>
+ <COND (<IN? ,MACE ,BUTLER>
+ <FCLEAR ,MACE ,NDESCBIT>
+ <MOVE ,MACE ,KITCHEN>)>
+ .VAL)>>
+
+<GLOBAL DINNER-SIT-COUNTER:NUMBER 0>
+<GLOBAL DINNER-SAT:FLAG <>>
+
+<ROUTINE I-DINNER-SIT ("OPTIONAL" (GARG <>) "AUX" (SAID <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-DINNER-SIT:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<T? ,DINNER-SAT>
+ <RFALSE>)
+ (<OR <FSET? ,DINNER ,TAKEBIT>
+ <L? 1 <- ,DINNER-FOR <POPULATION ,DINING-ROOM ,PLAYER>>>>
+ <COND (<L? ,DINNER-SIT-COUNTER 20>
+ <SETG DINNER-SIT-COUNTER <+ 1 ,DINNER-SIT-COUNTER>>
+ <COND (<AND <ZERO? <MOD ,DINNER-SIT-COUNTER 8>>
+ <NOT <EQUAL? ,HERE ,KITCHEN>>>
+ <BUTLER-RINGS-BELL? T>
+ <RTRUE>)>)>
+ <QUEUE I-DINNER-SIT 1>
+ <RFALSE>)>
+ <SETG DINNER-SAT T>
+ ;<QUEUE I-DINNER-SIT 0>
+ <QUEUE I-LIONEL-SPEAKS <- ,LIONEL-TIME ,PRESENT-TIME>>
+ <MAKE-ALL-PEOPLE 10 ;"eating with relish" ,DINING-ROOM>
+ <FSET ,DINNER ,TAKEBIT>
+ <FCLEAR ,DINNER ,TRYTAKEBIT>
+ <MOVE ,DINNER-2 ,TABLE-DINING>
+ ;<MOVE ,DINNER-3 ,TABLE-DINING>
+ <BUTLER-RINGS-BELL?>
+ <COND (<EQUAL? ,DINING-ROOM ,HERE>
+ <SET SAID ,M-FATAL>
+ <MOVE ,DINNER ,TABLE-DINING>
+ <TELL 'DEB " playfully suggests">
+ <COND (<==? ,VARIATION ,FRIEND-C>
+ <THIS-IS-IT ,LORD>
+ <TELL " to " 'LORD>)>
+ <TELL
+" that everyone form a self-serve food line at the buffet.
+" CHE ,LORD " and the others good-naturedly accept her suggestion." CR>
+ <COND (<IN? ,LETTER ,TABLE-DINING>
+ <TELL
+"As " 'LORD " takes his place as host,
+he notices a note lying on his napkin. He picks it up and reads it
+with a troubled expression." CR>
+ ;<THIS-IS-IT ,LORD>)>
+ <DINNER-TALK 28>)
+ (T <SETG MISSED-DINNER T>)>
+ <COND (<IN? ,LETTER ,TABLE-DINING>
+ <MOVE ,LETTER ,LORD>
+ <FCLEAR ,LETTER ,NDESCBIT>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .SAID !\] CR>)>>
+ <RETURN .SAID>>
+
+<GLOBAL MISSED-DINNER:FLAG <>>
+<CONSTANT INIT-LIONEL-SPEAKS-COUNTER 6>
+<GLOBAL LIONEL-SPEAKS-COUNTER:NUMBER 6>
+<GLOBAL LIONEL-FORCED:FLAG <>>
+<GLOBAL LIONELS-VOICE "Lionel's voice">
+
+<ROUTINE I-LIONEL-SPEAKS ("OPTIONAL" (GARG <>) "AUX" (SAID <>) P)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-LIONEL-SPEAKS:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <SETG LIONEL-SPEAKS-COUNTER <- ,LIONEL-SPEAKS-COUNTER 1>>
+ <COND (<NOT <ZERO? ,LIONEL-SPEAKS-COUNTER>>
+ <QUEUE I-LIONEL-SPEAKS 2>)
+ (T
+ <QUEUE I-WITHDRAW 9>)>
+ <SET P ,SEARCHER>
+ <COND (<AND <T? .P>
+ <OR <NOT <IN? .P ,DINING-ROOM>>
+ <NOT <IN? ,CLUE-1 ,SIDEBOARD>>
+ <FSET? ,CLUE-1 ,TOUCHBIT>>>
+ <SET P <>>)>
+ <COND (<==? 5 ,LIONEL-SPEAKS-COUNTER>
+ <MOVE ,VOICE ,DINING-ROOM>
+ <MAKE-ALL-PEOPLE 16 ;"listening" ,DINING-ROOM>)
+ (<==? 1 ,LIONEL-SPEAKS-COUNTER>
+ <FCLEAR ,CLUE-2 ,NDESCBIT>
+ <FCLEAR ,CLUE-2 ,SECRETBIT>
+ <FCLEAR ,CLUE-1 ,SECRETBIT>)
+ (<==? 0 ,LIONEL-SPEAKS-COUNTER>
+ <COND (<T? .P>
+ <FSET ,CLUE-1 ,TAKEBIT>
+ <FCLEAR ,CLUE-1 ,NDESCBIT>
+ <MOVE ,CLUE-1 .P>)>
+ <MOVE ,VOICE ,LOCAL-GLOBALS>
+ <MAKE-ALL-PEOPLE 18 ;"deep in thought" ,DINING-ROOM>)>
+ <COND (<EQUAL? ,DINING-ROOM ,HERE>
+ <SET SAID ,M-FATAL>
+ <COND (<T? ,LIONEL-FORCED>
+ <SETG LIONEL-FORCED <>>)
+ (T <CRLF>)>
+ <COND (<==? 5 ,LIONEL-SPEAKS-COUNTER>
+ <THIS-IS-IT ,BUST>
+ <FSET ,BUST ,OPENBIT>
+ <TELL
+D ,LORD " and his guests are startled as an unexpected voice suddenly speaks!|
+\"Good evening, all,\" it says, then breaks into a low chuckle.|
+\"Good Lord!\" Jack gasps. \"That's Uncle " ,LIONELS-VOICE "!\"|
+" D ,DOCTOR " points to" THE ,BUST ". \"There's where it's coming
+from!\"" CR>)
+ (<==? 4 ,LIONEL-SPEAKS-COUNTER>
+ <TELL
+,LIONELS-VOICE " continues, \"You are all here, I trust, to honor the wish
+expressed in my will -- that the seven of you should dine together
+at " D ,CASTLE " on the evening of my birthday.\"" CR>)
+ (<==? 3 ,LIONEL-SPEAKS-COUNTER>
+ <THIS-IS-IT ,ARTIFACT>
+ <THIS-IS-IT ,LORD>
+ <TELL
+,LIONELS-VOICE " continues, \"As you know, I enjoyed adventuring to
+remote corners of the world. And doubtless you've all heard of the loss of that
+valuable artifact, which I brought back from one of my
+expeditions, have you not?\"|
+The guests nod or mumble vaguely. They all glance toward Jack,
+as if looking for an official response." CR>)
+ (<==? 2 ,LIONEL-SPEAKS-COUNTER>
+ <TELL ,LIONELS-VOICE " goes on, ">
+ <COND (<==? ,LORD-C ,VARIATION>
+ <THIS-IS-IT ,LORD>
+ <TELL
+"\"Jack, I'm sure, is only too eager for me to shuffle off this mortal coil
+so he can inherit the family title and estate. Thus he should be
+particularly interested in what I'm about to say...\" Once again
+" ,LIONELS-VOICE " chuckles slyly, then continues." CR>)>
+ <THIS-IS-IT ,PUNCHBOWL>
+ <TELL
+"\"The truth is that the artifact is not lost, but hidden.
+Although I am not yet ready to reveal what it is,
+I suggest you look under the " 'PUNCHBOWL ".\"" CR>)
+ (<==? 1 ,LIONEL-SPEAKS-COUNTER>
+ <THIS-IS-IT ,CLUE-2>
+ <TELL
+"\"This " 'CLUE-1 " is merely to sharpen your wits,\"
+" ,LIONELS-VOICE " goes on.|
+\"" 'LOVER ", my dear: your one goal in life, I believe, is to become
+Jack's wife, heaven knows why! Not being Cupid, there is little I can do
+to help. Knowing the others, I suspect each one has private reasons for
+wanting my " 'ARTIFACT ". So, for your amusement, I have given a
+" 'CLUE-2 " to my ">
+ <COND (<EQUAL? ,VARIATION ,LORD-C>
+ <TELL "dear friend">)
+ (T <TELL "heir">)>
+ <TELL
+", which may start you down the path to finding it.\"|
+With another sardonic chuckle, " ,LIONELS-VOICE " adds, \"Perhaps, ">
+ <COND (<EQUAL? ,VARIATION ,LORD-C>
+ <THIS-IS-IT ,PAINTER>
+ <TELL 'PAINTER>)
+ (T
+ <THIS-IS-IT ,LORD>
+ <TELL 'LORD>)>
+ <TELL ", you would
+care to SHARE your clue with all the others -- eh, what?\"" CR>)
+ (<==? 0 ,LIONEL-SPEAKS-COUNTER>
+ <TELL
+,LIONELS-VOICE " finishes, \"So now, my friends, let the game begin!\"" CR>
+ <COND (<T? .P>
+ <TELL
+D .P " says, \"Well, I for one want to see that " 'CLUE-1 ".\" ">
+ <THIS-IS-IT .P>
+ <TELL
+CHE .P " lifts the " 'PUNCHBOWL " and takes it." CR>)>)>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .SAID !\] CR>)>>
+ <RETURN .SAID>>
+
+<ROUTINE MAKE-ALL-PEOPLE (NUM "OPTIONAL" (RM 0) "AUX" P NNUM)
+ <COND (<ZERO? .RM>
+ <SET RM ,HERE>)>
+ <COND (<L? .NUM 0>
+ <SET NNUM <- 0 .NUM>>)>
+ <SET P <FIRST? .RM>>
+ <REPEAT ()
+ <COND (<ZERO? .P>
+ <RETURN>)
+ (<FSET? .P ,PERSONBIT>
+ <COND (<G? .NUM 0>
+ <PUTP .P ,P?LDESC .NUM>)
+ (<==? .NNUM <GETP .P ,P?LDESC>>
+ <PUTP .P ,P?LDESC 0>)>)>
+ <SET P <NEXT? .P>>>>
+
+<ROUTINE I-WITHDRAW ("OPTIONAL" (GARG <>) "AUX" OBJ NXT (SAID <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-WITHDRAW:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<ZERO? ,TREASURE-FOUND>
+ <QUEUE I-SEARCH 9>
+ <PUT <GT-O ,SEARCHER> ,GOAL-FUNCTION ,X-SEARCHES>)>
+ <QUEUE I-BEDTIME <- ,BED-TIME ,PRESENT-TIME>>
+ <COND (<EQUAL? ,HERE ,DINING-ROOM ,CORR-1 ,SITTING-ROOM>
+ <SETG P-HIM-OBJECT <>>
+ <SETG P-HER-OBJECT <>>
+ <SET SAID T>
+ <TELL "|
+Normally the gentlemen would remain at the table to enjoy
+cigars and port, while the ladies repair to the " 'DRAWING-ROOM ". But because
+of tonight's mysterious developments, everyone ">
+ <COND (<EQUAL? ,HERE ,DINING-ROOM>
+ <TELL "leaves the " 'DINING-ROOM>)
+ (T
+ <TELL "goes to the " 'SITTING-ROOM>)>
+ <TELL " by unspoken agreement." CR>)
+ (<OR <EQUAL? ,HERE ,JACK-ROOM ,TAMARA-ROOM ,IRIS-ROOM>
+ <EQUAL? ,HERE ,WENDISH-ROOM ,VIVIEN-ROOM ,IAN-ROOM>
+ <EQUAL? ,HERE ,HYDE-ROOM>>
+ <COND (<NOT <EQUAL? <LOC <GET ,CHARACTER-TABLE
+ <- <ZMEMQ ,HERE ,CHAR-ROOM-TABLE> 1>>>
+ ,HERE ,LOCAL-GLOBALS>>
+ <SETG DISCOVERED-HERE ,HERE>
+ <QUEUE I-DISCOVERED 1>)>)>
+ <COND (<FSET? <LOC ,DINNER > ,PERSONBIT>
+ <MOVE ,DINNER ,TABLE-DINING>)>
+ <COND (<FSET? <LOC ,DINNER-2> ,PERSONBIT>
+ <MOVE ,DINNER-2 ,TABLE-DINING>)>
+ ;<COND (<FSET? <LOC ,DINNER-3> ,PERSONBIT>
+ <MOVE ,DINNER-3 ,TABLE-DINING>)>
+ <SET OBJ <FIRST? ,DINING-ROOM>>
+ <SET NXT <NEXT? .OBJ>>
+ <REPEAT ()
+ <COND (<ZERO? .NXT>
+ <RETURN>)
+ (<FSET? .OBJ ,PERSONBIT>
+ <COND (<NOT <EQUAL? .OBJ ,PLAYER ,CONFESSED ,CAPTOR>>
+ <PUTP .OBJ ,P?LDESC 18 ;"deep in thought">
+ <PUT ,FOLLOW-LOC <GETP .OBJ ,P?CHARACTER>
+ ,SITTING-ROOM>
+ <MOVE .OBJ ,SITTING-ROOM>)>)>
+ <SET OBJ .NXT>
+ <SET NXT <NEXT? .OBJ>>>
+ <COND (<EQUAL? ,HERE ,DINING-ROOM>
+ <SETG WINNER ,PLAYER>
+ <GOTO ,SITTING-ROOM ;,CORR-1>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .SAID !\] CR>)>>
+ <RETURN .SAID>>
+
+<GLOBAL SEARCHER:OBJECT 0>
+<GLOBAL CLUE-LOC:OBJECT 0>
+
+<GLOBAL SEARCH-ROOMS
+ <PLTABLE
+ OLD-GREAT-HALL BASEMENT ;DUNGEON STUDY LIBRARY OFFICE
+ LUMBER-ROOM CHAPEL GAME-ROOM DECK COURTYARD MAZE GARDEN GALLERY
+ FOYER DRAWING-ROOM GREAT-HALL SITTING-ROOM DINING-ROOM KITCHEN>>
+
+<ROUTINE I-SEARCH ("OPTIONAL" (GARG <>)
+ "AUX" (SAID <>) GT L (X 0))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-SEARCH:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <SET L <LOC ,SEARCHER>>
+ <COND (<OR <==? .L ,DISCOVERED-HERE>
+ <QUEUED? ,I-LIONEL-SPEAKS>>
+ <QUEUE I-SEARCH 3>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .SAID !\] CR>)>>
+ <RFALSE>)>
+ <QUEUE I-SEARCH 19>
+ <SET X <GET ,CHARACTER-TABLE <+ 1 <RANDOM 6>>>>
+ <COND (<AND <IN? .X ,SITTING-ROOM>
+ <NOT <EQUAL? .X ,FOLLOWER ,CONFESSED ,CAPTOR>>
+ <NOT <==? <GETP .X ,P?LDESC> 22>>>
+ <PUTP .X ,P?LDESC 22 ;"playing the piano">
+ <COND (<==? ,HERE ,SITTING-ROOM>
+ <SET SAID T>
+ <THIS-IS-IT .X>
+ <TELL D .X " begins " <GET ,LDESC-STRINGS 22> ".">)>
+ <SET X <NEXT? .X>>
+ <COND (<AND <T? .X>
+ <FSET? .X ,PERSONBIT>
+ <NOT <==? .X ,PLAYER>>>
+ <COND (<AND <T? .SAID>
+ <==? <GETP .X ,P?LDESC>
+ 22 ;"playing the piano">>
+ <THIS-IS-IT .X>
+ <TELL " And " D .X " stops.">)>
+ <PUTP .X ,P?LDESC 13 ;"lounging and chatting">)>
+ <COND (<T? .SAID> <CRLF>)>)>
+ <SET X ,DEB-C>
+ <REPEAT ()
+ <SET GT <GET ,CHARACTER-TABLE .X>>
+ <COND (<AND <NOT <EQUAL? .GT ,FOLLOWER>>
+ <NOT <EQUAL? <META-LOC .GT> ,HERE ,SITTING-ROOM>>
+ <NOT <IN-MOTION? .GT>>
+ <NOT <==? <GETP .GT ,P?LDESC>7;"sobbing quietly">>
+ <NOT <EQUAL? <GET <GET ,GOAL-TABLES .X>
+ ,GOAL-FUNCTION>
+ ,X-RETIRES ,X-SEARCHES>>>
+ <PUT <GET ,GOAL-TABLES .X> ,GOAL-FUNCTION ,NULL-F>
+ <ESTABLISH-GOAL .GT ,SITTING-ROOM>)>
+ <COND (<DLESS? X 1> <RETURN>)>>
+ <COND (<T? ,CONFESSED>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .SAID !\] CR>)>>
+ <RFALSE>)>
+ <SET GT <GT-O ,SEARCHER>>
+ <COND (<EQUAL? <GET .GT ,GOAL-FUNCTION> ,X-SEARCHES>
+ <REPEAT ()
+ <COND (<AND <SET X ,CLUE-LOC>
+ <ZMEMQ .X ,SEARCH-ROOMS>>
+ <SETG CLUE-LOC 0>)
+ (T <SET X <PICK-ONE ,SEARCH-ROOMS>>)>
+ <COND (<NOT <==? .X .L>>
+ <RETURN>)>>
+ <ESTABLISH-GOAL ,SEARCHER .X>
+ <COND (<EQUAL? ,HERE .L>
+ <SET SAID T>
+ <TELL "|
+Suddenly" HE ,SEARCHER " heads for the ">
+ <COND (<EQUAL? ,HERE ,MAZE ,GARDEN>
+ <TELL "exit">)
+ (T <TELL "door">)>
+ <TELL ", mumbling, \"Please excuse me.\"" CR>)>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .SAID !\] CR>)>>
+ <RETURN .SAID>>
+
+<ROUTINE X-SEARCHES ("OPTIONAL" (GARG <>) "AUX" (VAL <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[X-SEARCHES:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<==? .GARG ,G-REACHED>
+ <PUTP ,GOAL-PERSON ,P?LDESC 21 ;"searching">)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .VAL !\] CR>)>>
+ <RETURN .VAL>>
+
+<ROUTINE I-DISCOVERED ("OPTIONAL" (GARG <>) "AUX" (VAL <>) L GT)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-DISCOVERED:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<AND <EQUAL? ,DISCOVERED-HERE ,HERE>
+ <OR ;<ZERO? ,BUTLER-RANG-BELL?> ;"before dinner"
+ <ZERO? ,LIONEL-SPEAKS-COUNTER> ;"after dinner">>
+ <SET L <- <ZMEMQ ,HERE ,CHAR-ROOM-TABLE> 1>>
+ <SET VAL <GET ,CHARACTER-TABLE .L>>
+ <COND (<ZERO? .GARG>
+ <COND (<IN? .VAL ,HERE>
+ <RFALSE>)
+ (<FSET? .VAL ,MUNGBIT>
+ <RFALSE>)
+ (<EQUAL? .VAL ,CONFESSED>
+ <RFALSE>)
+ (<EQUAL? <GET <GT-O .VAL> ,GOAL-FUNCTION> ,X-RETIRES>
+ <RFALSE>)>)>
+ <PUT ,FOLLOW-LOC .L ,HERE>
+ <QUEUE I-FOUND-IT 0>
+ <COND (<EQUAL? .VAL ,GHOST-NEW>
+ <MOVE ,GHOST-NEW ,HERE>
+ <GHOST-LURKS>
+ <RFATAL>)>
+ <TELL "You freeze as">
+ <COND (T ;<NOT <EQUAL? .VAL ,GHOST-NEW>>
+ <COND (<FSET? ,HERE ,LOCKED>
+ <FCLEAR ,HERE ,LOCKED>
+ <TELL " a key turns in the lock,">)>
+ <TELL " the door bursts open and">)>
+ <FCLEAR ,HERE ,OPENBIT>
+ <PUTP .VAL ,P?LINE <+ 1 <GETP .VAL ,P?LINE>>>
+ <PUTP .VAL ,P?LDESC 4 ;"looking at you with suspicion">
+ <TELL HE .VAL " appears. ">
+ <TELL CHE .VAL " stares at you with a shocked look. ">
+ <COND ;(<EQUAL? ,HERE ,WENDISH-ROOM>
+ <TELL
+"\"May I ask what you are doing here?\" he inquires gently.">)
+ ;(<EQUAL? ,HERE ,HYDE-ROOM>
+ <TELL
+"\"To what do I owe the honor of this... shall we say, uninvited
+visit?\" he inquires with a sarcastic smile.">)
+ ;(<EQUAL? ,HERE ,IAN-ROOM>
+ <TELL
+"Then a mocking smile quirks the handsome young guardsman's lips.
+\"Here now, what's all this then?\" he murmurs.">)
+ (T <TELL
+"\"Well! I didn't expect MY room to be searched!\"" HE .VAL" says
+angrily. ">)>
+ <SET L <LOC .VAL>>
+ <MOVE .VAL ,HERE>
+ <SET GT <GT-O .VAL>>
+ <COND (<ZERO? <GET .GT ,GOAL-S>>
+ <ESTABLISH-GOAL .VAL .L>)
+ (T
+ <ESTABLISH-GOAL .VAL <GET .GT ,GOAL-F>>)>
+ <PUT .GT ,GOAL-ENABLE 0>
+ <TELL
+CHE .VAL " enters the room and closes the door behind" HIM .VAL ".|">
+ <COND (<AND <IN? ,BLOWGUN .VAL>
+ <EQUAL? .VAL ,PAINTER ,DOCTOR>
+ <NOT <FIND-FLAG-HERE ,PERSONBIT ,PLAYER .VAL>>>
+ <SETUP-SHOT .VAL>
+ <TELL "Then" HE .VAL " pulls out" THE ,BLOWGUN "!" CR>)>
+ <SET VAL ,M-FATAL>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .VAL !\] CR>)>>
+ .VAL>
+
+<ROUTINE I-FOUND-PASSAGES ("OPTIONAL" (GARG <>) "AUX" (SAID <>) X)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-FOUND-PASSAGES:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <SET X <FIRST? ,HERE>>
+ <COND (<T? .X>
+ <SET SAID <FOUND-PASSAGES-REPEAT .X ,PASSAGE ,FOUND-PASSAGES>>)>
+ <COND (<AND <FSET? ,HERE ,SECRETBIT>
+ <SET X <FIND-FLAG-LG ,HERE ,DOORBIT>>
+ <SET X <DOOR-ROOM ,HERE .X>>>
+ <SET X <FIRST? .X>>
+ <COND (<AND <T? .X>
+ <FOUND-PASSAGES-REPEAT .X ,PASSAGE ,FOUND-PASSAGES>>
+ <SET SAID T>)>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .SAID !\] CR>)>>
+ <RETURN .SAID>>
+
+<ROUTINE FOUND-PASSAGES-REPEAT (PER OBJ GL "AUX" C (SAID <>))
+ <REPEAT ()
+ <COND (<ZERO? .PER> <RETURN>)>
+ <COND (<AND <FSET? .PER ,PERSONBIT>
+ <NOT <FSET? .PER ,MUNGBIT>>>
+ <PUTP .PER ,P?LDESC 3 ;"watching you">
+ <SET C <GETP .PER ,P?CHARACTER>>
+ <COND (<ZERO? <GET .GL .C>>
+ <PUT .GL .C T>
+ <COND (<NOT <==? .C ,VARIATION>>
+ <PUTP .PER ,P?LINE 0>
+ <COND (<ZERO? .SAID>
+ <SET SAID .PER>
+ <COND (<==? .OBJ ,PASSAGE>
+ <GOOD-SHOW .PER .OBJ>)>)>)>)>)>
+ <SET PER <NEXT? .PER>>>
+ .SAID>
+
+<ROUTINE I-BEDTIME ("OPTIONAL" (GARG <>) "AUX" N CH (VAL <>) L)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-BEDTIME:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <SET N ,MASS-COUNTER>
+ <COND (<IGRTR? N ,DEB-C>
+ <SETG MASS-SAID <>>
+ <SETG MASS-COUNTER 0>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .VAL !\] CR>)>>
+ <RFALSE>)>
+ <QUEUE I-BEDTIME 5>
+ <SETG MASS-COUNTER .N>
+ <SET CH <GET ,CHARACTER-TABLE .N>>
+ <COND (<EQUAL? .CH ,SEARCHER>
+ <QUEUE I-SEARCH 0>)>
+ <COND (<==? .CH ,CONFESSED ,CAPTOR>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .VAL !\] CR>)>>
+ <RFALSE>)
+ (<FSET? .CH ,MUNGBIT>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .VAL !\] CR>)>>
+ <RFALSE>)>
+ <PUT <GET ,GOAL-TABLES .N> ,GOAL-FUNCTION ,X-RETIRES>
+ <ESTABLISH-GOAL .CH <GET ,CHAR-ROOM-TABLE <+ 1 .N>>>
+ <SET L <META-LOC .CH>>
+ <COND (<AND <NOT <OUTSIDE? .L>>
+ <ZERO? <FIND-FLAG .L ,PERSONBIT .CH>>>
+ <FCLEAR .L ,ONBIT>)>
+ <COND (<AND <EQUAL? .L ,HERE>
+ <OR <ZERO? ,MASS-SAID>
+ <==? .CH ,FOLLOWER>>>
+ <SETG MASS-SAID T>
+ <SET VAL T>
+ <PUTP .CH ,P?LDESC 17 ;"preparing to leave">
+ <TELL
+D .CH " says, \"It's time for bed now.
+I'll see you in the morning.\"" CR>)>
+ <COND (<==? .CH ,FOLLOWER>
+ <SETG FOLLOWER 0>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .VAL "]|">)>>
+ <RETURN .VAL>>
+
+<GLOBAL FRIEND-FOUND-PASSAGES <>>
+<ROUTINE FRIEND-PASSAGE-STORY ()
+ <TELL "\"Guess what? I just
+discovered a " 'PASSAGE " in my room! But it's so late that I'm going
+to bed now. We'll explore in the morning.\"" CR>>
+
+<ROUTINE X-RETIRES ("OPTIONAL" (GARG <>)
+ "AUX" (L <LOC ,GOAL-PERSON>) RM C (VAL <>) OBJ GT)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[X-RETIRES:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<EQUAL? ,GOAL-PERSON ,CONFESSED ,CAPTOR>
+ <RFALSE>)
+ (<==? .GARG ,G-IMPATIENT>
+ <COND (<EQUAL? .L ,HERE>
+ <SET VAL T>
+ <TELL
+CHE ,GOAL-PERSON " says, \"I'm dead tired. Good night.\"" CR>)>)
+ (<==? .GARG ,G-REACHED>
+ <SET C <GETP ,GOAL-PERSON ,P?CHARACTER>>
+ <SET RM <GET ,CHAR-ROOM-TABLE <+ 1 .C>>>
+ <SET GT <GET ,GOAL-TABLES .C>>
+ <COND (<NOT <==? .L .RM>> ;"unmasked ghost is quitting"
+ <COND (<NOT <FSET? .L ,SECRETBIT>> ;"or you entered a bedroom"
+ <ESTABLISH-GOAL ,GOAL-PERSON .RM>
+ <RFALSE>)>
+ <SET OBJ <FIND-FLAG-LG .L ,DOORBIT>>
+ <COND (<T? .OBJ>
+ <FSET .OBJ ,OPENBIT>)>
+ <SET VAL <MOVE-PERSON ,GOAL-PERSON .RM>>
+ <COND (<T? .OBJ>
+ <FCLEAR .OBJ ,OPENBIT>)>)>
+ ;<COND (<AND <QUEUED? ,I-DISCOVERED>
+ <EQUAL? ,DISCOVERED-HERE ,HERE>
+ <EQUAL? ,DISCOVERED-HERE .RM>>
+ <QUEUE I-DISCOVERED 0>
+ <RETURN <I-DISCOVERED ,G-REACHED>>)>
+ <SET OBJ <FIND-FLAG .RM ,SURFACEBIT>>
+ <COND (<T? .OBJ>
+ <ROB ,GOAL-PERSON .OBJ>)
+ (T <ROB ,GOAL-PERSON .RM>)>
+ <FCLEAR .RM ,OPENBIT>
+ <FSET .RM ,LOCKED>
+ <COND (<EQUAL? ,VARIATION ,LORD-C>
+ <SET RM ,LIMBO>)>
+ <COND (<AND <EQUAL? ,GOAL-PERSON ,FRIEND>
+ <NOT <EQUAL? ,VARIATION ,FRIEND-C>>
+ <ZERO? <GET ,FOUND-PASSAGES ,PLAYER-C>>
+ <ZERO? ,FRIEND-FOUND-PASSAGES>
+ <T? <GETP ,HERE ,P?LINE>>
+ <T? ,NOW-WEARING>
+ <NOT <FSET? ,HERE ,SECRETBIT>>
+ <NOT <1? <GETP ,HERE ,P?CHARACTER>>> ;"Dee's path"
+ <NOT <EQUAL? ,HERE ,BACKSTAIRS>>>
+ <FCLEAR ,SECRET-TAMARA-DOOR ,SECRETBIT>
+ <SET VAL T ;,M-FATAL>
+ <COND (<NOT <VERB? SEARCH SEARCH-FOR>>
+ <CRLF>)>
+ <COND (<EQUAL? ,HERE ,TAMARA-ROOM>
+ <PUT .GT ,ATTENTION <GET .GT ,ATTENTION-SPAN>>
+ <SETG WINNER ,FRIEND>
+ <COND (<==? ,HERE <GET ,FOLLOW-LOC ,FRIEND-C>>
+ <TELL "Preparing for bed," 'FRIEND>)
+ (T <TELL 'FRIEND " enters and">)>
+ <TELL " accidentally touches the bedpost. ">
+ <THIS-IS-IT ,FRIEND>
+ <OPEN-SECRET "turn" " the bedpost" ,SECRET-TAMARA-DOOR>
+ <SETG WINNER ,PLAYER>)
+ (<NOT <QUEUED? ,I-SHOT>>
+ <FSET ,PASSAGE ,SEENBIT>
+ <FSET ,SECRET-TAMARA-DOOR ,OPENBIT>
+ <MOVE ,FRIEND ,HERE>
+ <PUT ,FOLLOW-LOC ,FRIEND-C ,HERE>
+ <PUT .GT ,GOAL-FUNCTION ,X-RETIRES>
+ <ESTABLISH-GOAL ,FRIEND ,TAMARA-ROOM>
+ <TELL "Suddenly " 'FRIEND " appears and says, ">
+ <FRIEND-PASSAGE-STORY>)>)
+ (<TIME-FOR-GHOST? .RM>
+ <QUEUE I-SEARCH 0>
+ <COND (<==? ,VILLAIN-PER ,LOVER>
+ <PUTP ,DEB ,P?LDESC 24 ;"brushing her hair">
+ <PUT .GT ,ATTENTION <GET .GT ,ATTENTION-SPAN>>
+ <DRESS-GHOST <LOC ,LOVER> ,LOVER-C>
+ <PUT <GET ,GOAL-TABLES ,GHOST-NEW-C>
+ ,GOAL-FUNCTION ,LOVER-XFER>
+ <ESTABLISH-GOAL ,GHOST-NEW ,BASEMENT>
+ <SET VAL <MOVE-PERSON ,GHOST-NEW ,LOVER-PATH>>)
+ (T
+ <DRESS-GHOST .RM .C>
+ <SET VAL <GHOST-INTO-PASSAGE .C>>
+ <ESTABLISH-GOAL ,GHOST-NEW ,YOUR-CLOSET>)>)
+ (T
+ <COND (<FSET? ,GOAL-PERSON ,FEMALE>
+ <PUTP ,GOAL-PERSON ,P?LDESC 24 ;"brushing her hair">)
+ (T
+ <PUTP ,GOAL-PERSON ,P?LDESC 25 ;"looking sleepy">)>
+ <PUT .GT ,ATTENTION-SPAN 5>
+ <PUT .GT ,ATTENTION 5>)>
+ <SETG FRIEND-FOUND-PASSAGES T>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .VAL !\] CR>)>>
+ <RETURN .VAL>>
+
+<ROUTINE GHOST-INTO-PASSAGE (C "AUX" RM)
+ <SET RM <GET ,CHAR-CLOSET-TABLE <+ 1 .C>>>
+ <MOVE ,GHOST-NEW .RM>
+ <COND (<EQUAL? .RM ,HERE>
+ <SET RM <FIND-FLAG-LG .RM ,DOORBIT ,SECRETBIT>>
+ <FSET .RM ,OPENBIT>
+ <TELL CR CTHE .RM " bursts open!|">
+ <RETURN ,M-FATAL>)>>
+
+<ROUTINE TIME-FOR-GHOST? (RM "AUX" X)
+ <COND (<EQUAL? ,VILLAIN-PER ,LOVER>
+ <COND (<NOT <EQUAL? ,GOAL-PERSON ,DEB>>
+ <RFALSE>)>)
+ (T
+ <COND (<NOT <EQUAL? ,GOAL-PERSON ,VILLAIN-PER>>
+ <RFALSE>)>)>
+ <COND (<IN? ,VILLAIN-PER ,LOCAL-GLOBALS>
+ <RFALSE>)
+ (<EQUAL? ,GOAL-PERSON ,FRIEND>
+ <RFALSE>)
+ (<T? <GET ,FOUND-COSTUME ,PLAYER-C>>
+ <RFALSE>)
+ (<FSET? ,BLOWGUN ,TOUCHBIT>
+ <RFALSE>)
+ (<AND <SET X <FIND-FLAG-LG .RM ,DOORBIT ,SECRETBIT>>
+ <FSET? .X ,OPENBIT>>
+ <RFALSE>)
+ (<T? <FIND-FLAG .RM ,PERSONBIT ,VILLAIN-PER>>
+ <RFALSE>)
+ (T <RTRUE>)>>
+
+<ROUTINE DRESS-GHOST (L C "AUX" ADJ PT)
+ <MOVE ,GHOST-NEW .L>
+ <MOVE ,VILLAIN-PER ,LOCAL-GLOBALS>
+ <PUT ,CHAR-CLOSET-TABLE <+ 1 ,GHOST-NEW-C>
+ <GET ,CHAR-CLOSET-TABLE <+ 1 .C>>>
+ <COND (<SET ADJ <GETP ,VILLAIN-PER ,P?STATION>>
+ <SET PT <GETPT ,HEAD ,P?ADJECTIVE>>
+ <COND (<SETG OTHER-POSS-POS <ZMEMQB .ADJ .PT <RMGL-SIZE .PT>>>
+ <PUTB .PT
+ ,OTHER-POSS-POS ,A?G\'S>
+ <PUTB <GETPT ,HANDS ,P?ADJECTIVE>
+ ,OTHER-POSS-POS ,A?G\'S>
+ <PUTB <GETPT ,EYE ,P?ADJECTIVE>
+ ,OTHER-POSS-POS ,A?G\'S>)>)>
+ <FSET ,COSTUME ,NDESCBIT>
+ <FCLEAR ,COSTUME ,TAKEBIT>
+ <FSET ,COSTUME ,WORNBIT>
+ <MOVE ,COSTUME ,GHOST-NEW>
+ <COND (<==? .C ,DOCTOR-C>
+ <MOVE ,MUSTACHE ,WENDISH-KIT>
+ <FCLEAR ,MUSTACHE ,NDESCBIT>
+ <FSET ,MUSTACHE ,TAKEBIT>)>
+ <COND (<NOT <EQUAL? ,VARIATION ,LORD-C>> ;"Dee is nonviolent."
+ <FSET ,BLOWGUN ,NDESCBIT>
+ <FCLEAR ,BLOWGUN ,TAKEBIT>
+ <MOVE ,BLOWGUN ,GHOST-NEW>)>
+ <PUT <GET ,GOAL-TABLES .C> ,GOAL-FUNCTION ,GHOST-LURKS>
+ <PUT <GET ,GOAL-TABLES .C> ,ATTENTION-SPAN 0 ;1>>
+
+<ROUTINE LOVER-XFER ("OPTIONAL" (GARG <>)
+ "AUX" (VAL <>) (L <LOC ,GOAL-PERSON>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[LOVER-XFER:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<==? .GARG ,G-ENROUTE>
+ <SET VAL <GHOST-LURKS .GARG>>)
+ (<==? .GARG ,G-REACHED>
+ <COND (<EQUAL? .L ,HERE>
+ <SET VAL <GHOST-LURKS .GARG>>)
+ (<EQUAL? .L ,BASEMENT>
+ <MOVE ,GOAL-PERSON ,KITCHEN>
+ <ESTABLISH-GOAL ,GOAL-PERSON ,BACKSTAIRS>
+ <SET VAL <GHOST-LURKS ,G-ENROUTE>>)
+ (<EQUAL? .L ,BACKSTAIRS>
+ <MOVE ,GOAL-PERSON ,DINING-PASSAGE>
+ <ESTABLISH-GOAL ,GOAL-PERSON ,YOUR-CLOSET>
+ <PUT <GT-O ,GOAL-PERSON> ,GOAL-FUNCTION ,GHOST-LURKS>
+ <SET VAL <GHOST-LURKS ,G-ENROUTE>>)>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .VAL !\] CR>)>>
+ <RETURN .VAL>>
+
+<ROUTINE I-COME-TO ("OPTIONAL" (GARG <>) "AUX" P (L <>) V)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-COME-TO:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<IN? ,GHOST-NEW ,LOCAL-GLOBALS>
+ <SET P ,VILLAIN-PER>
+ <PUTP .P ,P?LDESC 4 ;"looking at you with suspicion">
+ <COND (<NOT <==? .P ,LOVER>>
+ <PUT <GT-O .P> ,GOAL-FUNCTION ,X-RETIRES>
+ <SET L <+ 1 <GETP .P ,P?CHARACTER>>>
+ <COND (<FSET? <META-LOC .P> ,SECRETBIT>
+ <SET L <GET ,CHAR-CLOSET-TABLE .L>>)
+ (T <SET L <GET ,CHAR-ROOM-TABLE .L>>)>)>)
+ (T
+ <SET P ,GHOST-NEW>
+ <PUTP .P ,P?LDESC 0>
+ <FSET .P ,NDESCBIT>
+ <PUT <GT-O .P> ,GOAL-FUNCTION ,GHOST-LURKS>
+ <SET L ,YOUR-CLOSET>
+ <COND (<NOT <FSET? <LOC .P> ,SECRETBIT>>
+ <GHOST-INTO-PASSAGE <GETP ,VILLAIN-PER ,P?CHARACTER>>)>)>
+ <FCLEAR .P ,MUNGBIT>
+ <SET V <VISIBLE? .P>>
+ <COND (<T? .V>
+ <TELL CTHE .P>
+ <COND (<WHERE? .P> <TELL !\,>)>
+ <TELL " shakes" HIS .P " head and comes to." CR>
+ <COND (<AND <EQUAL? ,VILLAIN-PER ,LOVER>
+ <LOVER-SPEECH>>
+ <SET V ,M-FATAL>)
+ (<NOT <==? .P ,GHOST-NEW>>
+ <SET V ,M-FATAL>
+ <TELL
+CHE .P " says, \"I feel... sleepy. I think...\"" CR>)>)>
+ <COND (<T? .L>
+ <PUT <GT-O .P> ,GOAL-S T>
+ <ESTABLISH-GOAL .P .L>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .V !\] CR>)>>
+ .V>
+
+<ROUTINE LOVER-SPEECH ()
+ <COND (<IN? ,GHOST-NEW ,HERE>
+ <SETG LOVER-SAID T>
+ <TELL
+CHE ,GHOST-NEW " says, \"Please don't speak, just listen! I'm really
+" 'LOVER ", and I'm alive. Jack tried to murder me, and I think he murdered
+Lionel! He pushed me down the well, but an underground stream carried me
+quickly to sea, where I was rescued by a yacht.|
+I have come back to " 'CASTLE " in disguise -- both to frighten him and
+to find some proof of Lionel's murder. And to incriminate " 'LORD " for
+my own 'murder' by planting the " 'JEWEL " from my necklace in the
+clothes he wore that night -- but then I lost it in the " 'DRAWING-ROOM
+".\"|
+She goes on, \"But now that you're on the case, I can leave the country
+with the yacht captain. Find proof of Lionel's murder, and we both can
+rest easily!\"|
+She races off ">
+ <GHOST-FLEES T>
+ <CONGRATS ,COSTUME>
+ <FSET ,LOVER ,SEENBIT>)>
+ <MOVE ,GHOST-NEW ,LIMBO>
+ <FSET ,GHOST-NEW ,MUNGBIT>
+ <PUT ,FOLLOW-LOC ,GHOST-NEW-C 0>
+ ,LOVER-SAID>
+
+<ROUTINE GHOST-FLEES ("OPT" (PART <>))
+ <COND (<ZERO? .PART>
+ <MOVE ,GHOST-NEW ,LIMBO>
+ <FSET ,GHOST-NEW ,MUNGBIT>
+ <PUT ,FOLLOW-LOC ,GHOST-NEW-C 0>
+ <TELL CHE ,GHOST-NEW " dodges your attack and flees ">)>
+ <COND (<==? ,HERE ,LOVER-PATH>
+ <TELL "down the path">)
+ (T <TELL "toward the " 'PRIEST-DOOR>)>
+ <TELL "." CR>>
+
+;<ROUTINE NEXT-ROOM (RM DIR "AUX" PT PTS)
+ <COND (<SET PT <GETPT .RM .DIR>>
+ <COND (<==? <SET PTS <PTSIZE .PT>> ,UEXIT>
+ <GET-REXIT-ROOM .PT>)
+ (<==? .PTS ,NEXIT>
+ <RFALSE>)
+ (<==? .PTS ,FEXIT>
+ <APPLY <GET .PT ,FEXITFCN>>)
+ (<==? .PTS ,CEXIT>
+ <COND (<VALUE <GETB .PT ,CEXITFLAG>>
+ <GET-REXIT-ROOM .PT>)>)
+ (<==? .PTS ,DEXIT>
+ <COND (T ;<FSET? <GET-DOOR-OBJ .PT> ,OPENBIT>
+ <GET-REXIT-ROOM .PT>)>)>)>>
+
+<GLOBAL SHOOTER:OBJECT 0>
+<GLOBAL AIMED-HERE:OBJECT 0>
+
+;<GLOBAL TRIPPEE:OBJECT 0>
+;<ROUTINE FIND-TRIPPEE (RM "AUX" O)
+ <SET O <FIRST? .RM>>
+ <REPEAT ()
+ <COND (<ZERO? .O> <RETURN <>>)
+ (<AND <FSET? .O ,TAKEBIT>
+ <L? 3 <GETP .O ,P?SIZE>>
+ <NOT <FSET? .O ,INVISIBLE>>
+ <NOT <==? .O ,TRIPPEE>>>
+ <RETURN .O>)
+ (T <SET O <NEXT? .O>>)>>>
+
+<ROUTINE GHOST-LURKS ("OPTIONAL" (GARG <>)
+ "AUX" L OBJ (VAL <>) GT C)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[GHOST-LURKS:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <SET L <LOC ,GHOST-NEW>>
+ <SET C ,GHOST-NEW-C>
+ <SET GT <GET ,GOAL-TABLES .C>>
+ <COND ;(<AND <EQUAL? .GARG ,G-ENROUTE ,G-REACHED>
+ <SET OBJ <FIND-TRIPPEE .L>>>
+ <SETG TRIPPEE .OBJ>
+ <SETG SHOOTER <>>
+ <QUEUE I-SHOT 0>
+ <FCLEAR ,GHOST-NEW ,NDESCBIT>
+ <PUTP ,GOAL-PERSON ,P?LDESC 19 ;"out cold">
+ <QUEUE I-COME-TO <+ 9 <RANDOM 6>>>
+ <COND (<EQUAL? .L ,HERE>
+ <COND (<NOT <FSET? ,GHOST-NEW ,TOUCHBIT>>
+ <GHOST-NEW-D>)>
+ <SET VAL ,M-FATAL>
+ <TELL
+CHE ,GOAL-PERSON " trips over" THE .OBJ " and falls heavily "
+<GROUND-DESC> "!" CR>)>
+ <FSET ,GOAL-PERSON ,MUNGBIT>)
+ (<EQUAL? .L ,HERE>
+ <COND (<NOT <FSET? ,GHOST-NEW ,TOUCHBIT>>
+ <GHOST-NEW-D>)>
+ <SET VAL ,M-FATAL>
+ <SETG AIMED-HERE ,HERE>
+ <TELL "The ghost ">
+ <COND (<QUEUED? ,I-SHOT>
+ <TELL "follows">)
+ (T <TELL "approaches">)>
+ <THIS-IS-IT ,GHOST-NEW>
+ <TELL
+" you," HIS ,GHOST-NEW " cold eyes shining. In a moment," HE ,GHOST-NEW>
+ <COND ;(<EQUAL? ,VILLAIN-PER ,LOVER>
+ <MOVE ,GHOST-NEW ,LIMBO>
+ <FSET ,GHOST-NEW ,MUNGBIT>
+ <PUT ,FOLLOW-LOC .C 0>
+ <TELL " slips away." CR>)
+ (T ;<NOT <QUEUED? ,I-SHOT>>
+ <PUT .GT ,GOAL-ENABLE 0>
+ <FSET ,PLAYER ,SEENBIT>
+ <SETG SHOOTER ,GHOST-NEW>
+ <QUEUE I-SHOT ,CLOCKER-RUNNING>
+ <COND (<EQUAL? ,VILLAIN-PER ,LOVER>
+ <PUTP ,GHOST-NEW,P?LDESC 17;"preparing to leave">
+ <TELL " sees you and freezes." CR>)
+ (T
+ <PUTP ,GHOST-NEW ,P?LDESC 8 ;"poised to attack">
+ <TELL " poi">
+ <COND (<IN? ,BLOWGUN ,GHOST-NEW>
+ <SETG AIMED-HERE ,HERE>
+ <FCLEAR ,BLOWGUN ,NDESCBIT>
+ <TELL "nts" THE ,BLOWGUN " at">)
+ (T <TELL "ses to attack">)>
+ <TELL " you." CR>)>)>)
+ (<==? .GARG ,G-REACHED>
+ <COND (<NOT <EQUAL? .L ,YOUR-CLOSET>>
+ <ESTABLISH-GOAL ,GHOST-NEW ,YOUR-CLOSET>)
+ (T
+ <ESTABLISH-GOAL ,GHOST-NEW
+ <GET ,CHAR-CLOSET-TABLE <+ 1 .C>>>)>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .VAL "]|">)>>
+ <RETURN .VAL>>
+
+<ROUTINE I-SHOT ("OPTIONAL" (GARG <>) "AUX" (VAL <>) L (GT <GT-O ,SHOOTER>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-SHOT:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<EQUAL? ,VILLAIN-PER ,LOVER>
+ <COND (<IN? ,GHOST-NEW ,HERE>
+ <SET VAL T>
+ <TELL CHE ,GHOST-NEW " flees into the dark." CR>)>
+ <MOVE ,GHOST-NEW ,LIMBO>
+ <FSET ,GHOST-NEW ,MUNGBIT>
+ <PUT ,FOLLOW-LOC ,GHOST-NEW-C 0>)
+ (<EQUAL? ,AIMED-HERE ,HERE>
+ <COND (<NOT <IN? ,BLOWGUN ,SHOOTER>>
+ <TELL
+"You struggle to get free, but"
+THE ,SHOOTER "'s hands clench tighter around your throat! Soon
+the pain grows until the room begins to black out">
+ <COND (<==? ,SHOOTER ,GHOST-NEW>
+ <TELL
+". Your only consolation is that the ghost's wig falls off, and just as
+you take your last breath, you see
+that it's really " D ,VILLAIN-PER>)>
+ <TELL "! But">)
+ (T
+ <COND (<FSET? ,HERE ,ONBIT>
+ <TELL
+CHE ,SHOOTER " puts" THE ,BLOWGUN " to" HIS ,SHOOTER " lips and puffs"
+HIS ,SHOOTER " cheeks out and in. ">)>
+ <TELL
+"You feel a sharp pain in the chest. Your vision
+mists over, the room blacks out, and your legs give way beneath you.|
+The sad fact is, "FN", that you've been shot with a" ,POISON-DART ", and">)>
+ <TELL " for you, the game is over!|">
+ <FINISH>)
+ (<AND <T? ,SHOOTER>
+ <NOT <FSET? ,SHOOTER ,MUNGBIT>>>
+ <PUT .GT ,GOAL-ENABLE 2>
+ <COND (<FSET? ,HERE ,SECRETBIT>
+ <SET L ,HERE>)
+ (<EQUAL? ,SHOOTER ,GHOST-NEW>
+ <SET L <GET .GT ,GOAL-F>>)
+ (<ZERO? <SET L <GENERIC-CLOSET 0>>>
+ <SET L <GET ,CHAR-CLOSET-TABLE
+ <+ 1 <GETP ,VILLAIN-PER ,P?CHARACTER>>>>)>
+ <PUT .GT ,GOAL-S .L> ;"in case GOAL-REACHED called"
+ <ESTABLISH-GOAL ,SHOOTER .L>
+ <SETG SHOOTER <>>
+ <FSET ,BLOWGUN ,NDESCBIT>)>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL N .VAL !\] CR>)>>
+ .VAL>
diff --git a/m5.errors b/m5.errors
new file mode 100644
index 0000000..493b0cd
--- /dev/null
+++ b/m5.errors
@@ -0,0 +1,28 @@
+Assembling M5.XZAP.1 on Wednesday, October 22, 1986 09:45:48
+Release: 9
+
+ 64 Inserting M5FREQ.XZAP.1 (594 bytes)
+ 658 Inserting M5DAT.ZAP.9 (25035 bytes)
+ 25693 Inserting MACROS.ZAP.4 (0 bytes)
+ 25693 Inserting MISC.ZAP.4 (1236 bytes)
+ 26929 Inserting SYNTAX.ZAP.4 (0 bytes)
+ 26929 Inserting PARSER.ZAP.4 (13085 bytes)
+ 40014 Inserting VERBS.ZAP.5 (21161 bytes)
+ 61175 Inserting GOAL.ZAP.1 (11194 bytes)
+ 72369 Inserting PEOPLE.ZAP.1 (23137 bytes)
+ 95506 Inserting CASTLE.ZAP.1 (10616 bytes)
+106122 Inserting TOWER.ZAP.1 (8181 bytes)
+114303 Inserting THINGS.ZAP.1 (2553 bytes)
+116856 Inserting PLACES.ZAP.1 (848 bytes)
+117704 Inserting GLOBAL.ZAP.1 (3165 bytes)
+120869 Inserting COLORS.ZAP.1 (4243 bytes)
+125112 Inserting M5STR.ZAP.9 (3754 bytes)
+253 objects.
+230 globals.
+955 word vocabulary.
+
+128866 bytes (126K).
+ 24439 bytes of preload.
+ 13860 bytes of impure.
+
+Outputting symbol tables
diff --git a/m5.record b/m5.record
new file mode 100644
index 0000000..2e7c312
--- /dev/null
+++ b/m5.record
@@ -0,0 +1,1353 @@
+
+Combined ZIL Compiler Ver 2.0 (MIM)
+-----------------------------------
+Input file: SS:<MOONMIST>M5.ZIL.1
+Input file: SS:<MOONMIST>MACROS.ZIL.56
+Input file: SS:<MOONMIST>MISC.ZIL.24
+Compiling routine: GO
+Compiling routine: PRINTT
+Compiling routine: THE?
+Compiling routine: START-SENTENCE
+Compiling routine: PRINTA
+Compiling routine: THIS-IS-IT
+Compiling routine: NO-PRONOUN?
+Compiling routine: HE-SHE-IT
+Compiling routine: HIM-HER-IT
+Compiling routine: QUEUE
+Compiling routine: INT
+Compiling routine: QUEUED?
+Compiling routine: CLOCKER
+Compiling routine: I-FOLLOW
+Compiling routine: I-ATTENTION
+Input file: SS:<MOONMIST>SYNTAX.ZIL.224
+Input file: SS:<MOONMIST>PARSER.ZIL.460
+ ** Note: Unknown value - PLAYER
+ ** Note: Unknown value - FRIEND
+ ** Note: Unknown value - LORD
+Compiling routine: MAIN-LOOP
+Compiling routine: MAIN-LOOP-1
+Compiling routine: TELL-I-ASSUME
+Compiling routine: VERB-ALL-TEST
+Compiling routine: GAME-VERB?
+Compiling routine: QCONTEXT-CHECK
+Compiling routine: QCONTEXT-GOOD?
+Compiling routine: NOT-IT
+Compiling routine: NOT-HERE-OBJECT-F
+Compiling routine: PRSO-VERB?
+Compiling routine: PRSI-VERB?
+Compiling routine: GEN-TEST
+Compiling routine: NOT-SECRET-TEST
+Compiling routine: PRUNE
+Compiling routine: ELIMINATE
+Compiling routine: MOBY-FIND
+Compiling routine: FIND-NOT-HERE
+Compiling routine: NOT-HERE-PRINT
+Compiling routine: SEE-VERB?
+Compiling routine: FIX-HIM-HER-IT
+Compiling routine: FAKE-ORPHAN
+Compiling routine: PERFORM
+Compiling routine: D-APPLY
+Compiling routine: I-PROMPT
+Compiling routine: BUZZER-WORD?
+Compiling routine: QUESTION-WORD?
+Compiling routine: TO-DO-X-USE-Y
+Compiling routine: NUMBER-WORD?
+Compiling routine: NAUGHTY-WORD?
+Compiling routine: NOT-THAT-WAY
+Compiling routine: PARSER
+Compiling routine: CHANGE-LEXV
+Compiling routine: PRINT-LEXV
+Compiling routine: STUFF
+Compiling routine: INBUF-STUFF
+Compiling routine: INBUF-ADD
+Compiling routine: FIX-POSSESSIVES
+Compiling routine: NAME?
+Compiling routine: XNAME?
+Compiling routine: WT?
+Compiling routine: CLAUSE
+Compiling routine: VERB-DIR-ONLY?
+Compiling routine: NUMBER?
+Compiling routine: ORPHAN-MERGE
+Compiling routine: CLAUSE-WIN
+Compiling routine: WORD-PRINT
+Compiling routine: UNKNOWN-WORD
+Compiling routine: CANT-USE
+Compiling routine: SYNTAX-CHECK
+Compiling routine: DONT-UNDERSTAND
+Compiling routine: VERB-PRINT
+Compiling routine: ORPHAN
+Compiling routine: CLAUSE-PRINT
+Compiling routine: BUFFER-PRINT
+Compiling routine: TITLE-NOUN?
+Compiling routine: CAPITAL-NOUN?
+Compiling routine: CAPITALIZE
+Compiling routine: PREP-PRINT
+Compiling routine: CLAUSE-COPY
+Compiling routine: CLAUSE-ADD
+Compiling routine: PREP-FIND
+Compiling routine: SYNTAX-FOUND
+Compiling routine: GWIM
+Compiling routine: SNARF-OBJECTS
+Compiling routine: BUT-MERGE
+Compiling routine: ADJ-CHECK
+Compiling routine: SNARFEM
+Compiling routine: RESOLVE-YOUR-HER-HIS
+Compiling routine: GET-OBJECT
+Compiling routine: GENERIC-CLUE-FCN
+Compiling routine: CLUE-TEST
+Compiling routine: GENERIC-STAIRS
+Compiling routine: GENERIC-CLOTHES
+Compiling routine: GENERIC-CLOSET
+Compiling routine: GENERIC-DINNER
+Compiling routine: GENERIC-BEDROOM
+Compiling routine: GENERIC-GREAT-HALL
+Compiling routine: GENERIC-LENS
+Compiling routine: GENERIC-RECORDER
+Compiling routine: GENERIC-BOX
+Compiling routine: GENERIC-BOOK
+Compiling routine: GENERIC-WELL
+Compiling routine: GENERIC-SKELETON
+Compiling routine: GENERIC-ROOM
+Compiling routine: GENERIC-EYE
+Compiling routine: GENERIC-BELL
+Compiling routine: GENERIC-WINE
+Compiling routine: SPEAKING-VERB?
+Compiling routine: MISSING
+Compiling routine: WHICH-PRINT
+Compiling routine: GLOBAL-SEARCH
+Compiling routine: GLOBAL-CHECK
+Compiling routine: DO-SL
+Compiling routine: SEARCH-LIST
+Compiling routine: ROOM-SEARCH
+Compiling routine: THIS-IT?
+Compiling routine: OBJ-FOUND
+Compiling routine: TAKE-CHECK
+Compiling routine: ITAKE-CHECK
+Compiling routine: MANY-CHECK
+Compiling routine: ZMEMQ
+Compiling routine: ZMEMQB
+ ** Note: Unknown value - DRIVEWAY
+Compiling routine: LIT?
+Compiling routine: NOT-HERE
+Compiling routine: PUT-ADJ-NAM
+Compiling routine: NOUN-USED?
+Compiling routine: ADJ-USED?
+Input file: SS:<MOONMIST>VERBS.ZIL.827
+Compiling routine: TRANSCRIPT
+Compiling routine: V-SCRIPT
+Compiling routine: V-UNSCRIPT
+Compiling routine: V-$VERIFY
+Compiling routine: YOU-WILL-GET
+Compiling routine: V-SUPER-BRIEF
+Compiling routine: V-BRIEF
+Compiling routine: V-VERBOSE
+Compiling routine: V-INVENTORY
+Compiling routine: V-QUIT
+Compiling routine: V-RESTART
+Compiling routine: TELL-FAILED
+Compiling routine: V-SAVE
+Compiling routine: V-RESTORE
+Compiling routine: V-FIRST-LOOK
+Compiling routine: V-VERSION
+Compiling routine: V-SCORE
+Compiling routine: YES?
+Compiling routine: NO-NEED
+Compiling routine: YOU-CANT
+Compiling routine: YOU-SHOULDNT
+Compiling routine: TELL-BEING-WORN
+Compiling routine: PRINT-CONTENTS
+Compiling routine: DESCRIBE-OBJECTS
+Compiling routine: SEE-ANYTHING-IN?
+Compiling routine: DESCRIBE-ROOM
+Compiling routine: HAR-HAR
+Compiling routine: PICK-ONE-NEW
+Compiling routine: PICK-ONE
+Compiling routine: NOT-HOLDING?
+Compiling routine: NEW-FOLLOWER
+Compiling routine: FRIEND-FOLLOWS-YOU
+Compiling routine: NOT-INTO-PASSAGE
+Compiling routine: TOUR?
+Compiling routine: CREEPY?
+Compiling routine: GOTO
+Compiling routine: HACK-HACK
+Compiling routine: HELD?
+Compiling routine: IDROP
+Compiling routine: ITAKE
+Compiling routine: CCOUNT
+Compiling routine: CHECK-DOOR
+Compiling routine: ROOM-CHECK
+Compiling routine: SEE-INSIDE?
+Compiling routine: ARENT-TALKING
+Compiling routine: ALREADY
+Compiling routine: NOT-CLEAR-WHOM
+Compiling routine: OKAY
+Compiling routine: TOO-BAD-BUT
+Compiling routine: TOO-DARK
+Compiling routine: VISIBLE?
+Compiling routine: ACCESSIBLE?
+Compiling routine: META-LOC
+Compiling routine: WHO-CARES
+Compiling routine: PRE-SAIM
+Compiling routine: V-SAIM
+Compiling routine: V-AIM
+Compiling routine: PRE-SANALYZE
+Compiling routine: V-SANALYZE
+Compiling routine: PRE-ANALYZE
+Compiling routine: V-ANALYZE
+Compiling routine: V-ANSWER
+Compiling routine: V-REPLY
+Compiling routine: WAITING-FOR-YOU-TO-SPEAK
+Compiling routine: PRE-ARREST
+Compiling routine: TELL-BAD-FORM
+Compiling routine: V-ARREST
+Compiling routine: CONFESSION
+Compiling routine: WRAP-UP
+Compiling routine: V-ASK
+Compiling routine: PRE-ASK-ABOUT
+Compiling routine: V-ASK-ABOUT
+Compiling routine: WONT-HELP-TO-TALK-TO
+Compiling routine: PRE-ASK-CONTEXT-ABOUT
+Compiling routine: V-ASK-CONTEXT-ABOUT
+Compiling routine: V-ASK-FOR
+Compiling routine: PRE-ASK-CONTEXT-FOR
+Compiling routine: V-ASK-CONTEXT-FOR
+Compiling routine: V-ATTACK
+Compiling routine: V-BOW
+Compiling routine: PRE-BRUSH
+Compiling routine: V-BRUSH
+Compiling routine: UNCLEAN
+Compiling routine: REMOVE-CAREFULLY
+Compiling routine: V-$CALL
+Compiling routine: V-CHASTISE
+Compiling routine: V-BOARD
+Compiling routine: V-CLIMB-ON
+Compiling routine: V-CLIMB-UP
+Compiling routine: V-CLIMB-DOWN
+Compiling routine: V-CLOSE
+Compiling routine: PRE-COMPARE
+Compiling routine: V-COMPARE
+Compiling routine: V-CONFRONT
+Compiling routine: V-MUNG
+Compiling routine: V-DANCE
+Compiling routine: PRE-DESCRIBE
+Compiling routine: V-DESCRIBE
+Compiling routine: V-UNDRESS
+Compiling routine: V-DRESS
+Compiling routine: FIND-OUTFIT
+Compiling routine: FIND-OUTFIT-IN
+Compiling routine: V-CHANGE
+Compiling routine: PRE-DRIVE-TO
+Compiling routine: TELL-NOT-IN
+Compiling routine: V-DRIVE-TO
+Compiling routine: V-DRINK
+Compiling routine: V-DROP
+Compiling routine: GROUND-DESC
+Compiling routine: PRE-EAT
+Compiling routine: V-EAT
+Compiling routine: PRE-EMPTY
+Compiling routine: V-EMPTY
+Compiling routine: PRE-THROUGH
+Compiling routine: V-THROUGH
+Compiling routine: PRE-EXAMINE
+Compiling routine: V-EXAMINE
+Compiling routine: NOTHING-SPECIAL
+Compiling routine: GLOBAL-IN?
+Compiling routine: V-FAINT
+Compiling routine: V-FILL
+Compiling routine: PRE-FIND
+Compiling routine: BITE-YOU
+Compiling routine: FAR-AWAY?
+Compiling routine: V-FIND
+Compiling routine: NO-FUN
+Compiling routine: TELL-LOCATION
+Compiling routine: V-FIX
+Compiling routine: FOLLOW-LOC?
+Compiling routine: V-FOLLOW
+Compiling routine: V-FOO
+Compiling routine: V-FORGIVE
+Compiling routine: PRE-GIVE
+Compiling routine: V-GIVE
+Compiling routine: PRE-SGIVE
+Compiling routine: V-SGIVE
+Compiling routine: PRE-HELLO
+Compiling routine: V-HELLO
+Compiling routine: V-HELP
+Compiling routine: HELP-TEXT
+Compiling routine: V-KILL
+Compiling routine: IKILL
+Compiling routine: V-KISS
+Compiling routine: V-KNOCK
+Compiling routine: V-STAND
+Compiling routine: V-LEAP
+Compiling routine: V-SKIP
+Compiling routine: WHEE
+Compiling routine: V-LEAVE
+Compiling routine: PRE-LIE
+Compiling routine: V-LIE
+Compiling routine: PRE-LISTEN
+Compiling routine: V-LISTEN
+Compiling routine: V-LOCK
+Compiling routine: V-LOOK
+Compiling routine: V-LOOK-BEHIND
+Compiling routine: V-LOOK-DOWN
+Compiling routine: PRE-LOOK-INSIDE
+Compiling routine: V-LOOK-INSIDE
+Compiling routine: FIRST-YOU
+Compiling routine: V-LOOK-THROUGH
+Compiling routine: NO-BEYOND
+Compiling routine: ROOM-PEEK
+Compiling routine: SEE-INTO?
+Compiling routine: TELL-CANT-FIND
+Compiling routine: V-LOOK-ON
+Compiling routine: V-LOOK-OUTSIDE
+Compiling routine: PRE-LOOK-UNDER
+Compiling routine: V-LOOK-UNDER
+Compiling routine: V-LOOK-UP
+Compiling routine: PRE-MEET
+Compiling routine: V-MEET
+Compiling routine: PRE-MOVE
+Compiling routine: V-MOVE
+Compiling routine: PRE-MOVE-DIR
+Compiling routine: V-MOVE-DIR
+Compiling routine: V-NOD
+Compiling routine: V-OPEN
+Compiling routine: PRE-OPEN-WITH
+Compiling routine: V-OPEN-WITH
+Compiling routine: V-PLAY
+Compiling routine: V-POUR
+Compiling routine: V-PRAY
+Compiling routine: V-PUSH
+Compiling routine: WEAR-CHECK
+Compiling routine: PRE-PUT
+Compiling routine: V-PUT
+Compiling routine: TELL-FIND-NONE
+Compiling routine: PRE-PUT-IN
+Compiling routine: V-PUT-IN
+Compiling routine: PUT-ON-OR-IN
+Compiling routine: WEIGHT
+Compiling routine: V-PUT-UNDER
+Compiling routine: PRE-SREAD
+Compiling routine: V-SREAD
+Compiling routine: PRE-READ
+Compiling routine: V-READ
+Compiling routine: V-REMOVE
+Compiling routine: V-RING
+Compiling routine: V-RUB
+Compiling routine: V-SAY
+Compiling routine: PRE-SEARCH
+Compiling routine: V-SEARCH
+Compiling routine: DISCOVER
+Compiling routine: CONGRATS
+Compiling routine: PRE-SSEARCH-FOR
+Compiling routine: V-SSEARCH-FOR
+Compiling routine: PRE-SEARCH-FOR
+Compiling routine: V-SEARCH-FOR
+Compiling routine: V-SHAKE
+Compiling routine: V-SHOOT
+Compiling routine: PRE-SSHOOT
+Compiling routine: V-SSHOOT
+Compiling routine: V-SHOW
+Compiling routine: PRE-SSHOW
+Compiling routine: V-SSHOW
+Compiling routine: V-SIGN
+Compiling routine: PRE-SIT
+Compiling routine: V-SIT
+Compiling routine: WONT-HELP
+Compiling routine: V-SIT-AT
+Compiling routine: V-SLAP
+Compiling routine: IF-SPY
+Compiling routine: FACE-RED
+Compiling routine: V-SMELL
+Compiling routine: V-SMILE
+Compiling routine: V-SORRY
+Compiling routine: V-SOUND
+Compiling routine: V-STOP
+Compiling routine: V-SWIM
+Compiling routine: PRE-TAKE
+Compiling routine: PRE-TAKE-WITH
+Compiling routine: V-TAKE
+Compiling routine: V-TAKE-OFF
+Compiling routine: V-TAKE-TO
+Compiling routine: V-DISEMBARK
+Compiling routine: OWN-FEET
+Compiling routine: V-HOLD-UP
+Compiling routine: V-TELL
+Compiling routine: PRE-STELL-ABOUT
+Compiling routine: V-STELL-ABOUT
+Compiling routine: PRE-TELL-ABOUT
+Compiling routine: V-TELL-ABOUT
+Compiling routine: PRE-TALK-ABOUT
+Compiling routine: V-TALK-ABOUT
+Compiling routine: V-THANKS
+Compiling routine: V-THROW
+Compiling routine: V-THROW-AT
+Compiling routine: PRE-THROW-THROUGH
+Compiling routine: V-THROW-THROUGH
+Compiling routine: V-TIME
+Compiling routine: TIME-PRINT
+Compiling routine: V-TURN
+Compiling routine: V-LAMP-OFF
+Compiling routine: V-LAMP-ON
+Compiling routine: V-UNLOCK
+Compiling routine: MORE-SPECIFIC
+Compiling routine: V-USE
+Compiling routine: V-WAIT
+Compiling routine: V-WAIT-FOR
+Compiling routine: V-WAIT-UNTIL
+Compiling routine: V-ALARM
+Compiling routine: DO-WALK
+Compiling routine: V-WALK
+Compiling routine: UNLOCK-DOOR?
+Compiling routine: WALK-THRU-DOOR?
+Compiling routine: OPEN-DOOR-AND-CLOSE-IT-AGAIN
+Compiling routine: V-WALK-AROUND
+Compiling routine: WHO-KNOWS?
+Compiling routine: WALK-WITHIN-ROOM
+Compiling routine: V-WALK-TO
+Compiling routine: ENTER-ROOM
+Compiling routine: V-RUN-OVER
+Compiling routine: NO-CHANGING?
+Compiling routine: V-WEAR
+Compiling routine: V-YELL
+Compiling routine: V-YES
+Compiling routine: V-NO
+Compiling routine: FINISH
+Compiling routine: DIVESTMENT?
+Compiling routine: REMOTE-VERB?
+Input file: SS:<MOONMIST>GOAL.ZIL.601
+Compiling routine: FOLLOW-GOAL
+Compiling routine: FOLLOW-GOAL-NEXT
+Compiling routine: GET-LINE
+Compiling routine: IN-MOTION?
+Compiling routine: ESTABLISH-GOAL
+Compiling routine: GOAL-REACHED
+Compiling routine: ENTERS?
+Compiling routine: TELL-OPEN-DOOR
+Compiling routine: TELL-HIS-HER-BEDROOM
+Compiling routine: TELL-LOCKING-THE-DOOR
+Compiling routine: MOVE-PERSON
+Compiling routine: COMPASS-EQV
+Compiling routine: DIR-EQV?
+Compiling routine: DIR-FROM
+Compiling routine: DIR-FROM-TEST
+Compiling routine: I-PLAYER
+Compiling routine: GOODNIGHT
+Compiling routine: GRAB-ATTENTION
+Compiling routine: ANGRY-REJECT?
+Compiling routine: WHERE?
+Compiling routine: DIR-PRINT
+Compiling routine: OPP-DIR
+Compiling routine: I-TOUR
+Compiling routine: I-FRIEND-GREETS
+Compiling routine: BUTLER-APPEARS
+Compiling routine: BUTLER-FETCHES
+Compiling routine: TAMARA-LEAVES-YOU
+Compiling routine: BUTLER-CARRIES
+Compiling routine: I-BUTLER-HINTS
+Compiling routine: I-BUTLER-COOKS
+Compiling routine: BUTLER-COOKS
+Compiling routine: I-BUTLER-SERVES
+Compiling routine: BUTLER-SERVES
+Compiling routine: X-WAITS
+Compiling routine: I-DINNER
+Compiling routine: BUTLER-RINGS-BELL?
+Compiling routine: BUTLER-LEAVES
+Compiling routine: I-DINNER-SIT
+Compiling routine: I-LIONEL-SPEAKS
+Compiling routine: MAKE-ALL-PEOPLE
+Compiling routine: I-WITHDRAW
+Compiling routine: I-SEARCH
+Compiling routine: X-SEARCHES
+Compiling routine: I-DISCOVERED
+Compiling routine: I-FOUND-PASSAGES
+Compiling routine: FOUND-PASSAGES-REPEAT
+Compiling routine: I-BEDTIME
+Compiling routine: FRIEND-PASSAGE-STORY
+Compiling routine: X-RETIRES
+Compiling routine: GHOST-INTO-PASSAGE
+Compiling routine: TIME-FOR-GHOST?
+Compiling routine: DRESS-GHOST
+Compiling routine: LOVER-XFER
+Compiling routine: I-COME-TO
+Compiling routine: LOVER-SPEECH
+Compiling routine: GHOST-FLEES
+Compiling routine: GHOST-LURKS
+Compiling routine: I-SHOT
+Input file: SS:<MOONMIST>PEOPLE.ZIL.806
+Compiling routine: PLAYER-NAME-F
+Compiling routine: PLAYER-F
+Compiling routine: PLEASE-ANSWER
+Compiling routine: TOO-BAD-SIT-HIDE
+Compiling routine: FRIEND-D
+ ** Note: Unknown value - BUTLER
+ ** Note: Unknown value - BUTLER
+ ** Note: Unknown value - DOCTOR
+ ** Note: Unknown value - OFFICER
+ ** Note: Unknown value - BUTLER
+ ** Note: Unknown value - DEB
+ ** Note: Unknown value - OFFICER
+ ** Note: Unknown value - BUTLER
+Compiling routine: I-REPLY
+Compiling routine: FRIEND-F
+Compiling routine: TAMARA-EVIDENCE-F
+Compiling routine: ASKING-ABOUT?
+Compiling routine: LORD-INTRO
+Compiling routine: TELL-FULL-NAME
+Compiling routine: LORD-D
+Compiling routine: LORD-GHOST-STORY
+Compiling routine: LORD-F
+Compiling routine: CLUE-2-STORY
+Compiling routine: TELL-DUNNO
+Compiling routine: JACK-TAPE-F
+Compiling routine: LOVER-D
+Compiling routine: LOVER-F
+Compiling routine: DEB-D
+Compiling routine: DEB-F
+Compiling routine: WILLING?
+Compiling routine: OFFICER-D
+Compiling routine: I-JUST-LOVE-IT
+Compiling routine: WINNER-DEFAULT
+Compiling routine: OFFICER-F
+Compiling routine: IAN-CALLS-YOU
+Compiling routine: DOCTOR-D
+Compiling routine: DOCTOR-F
+Compiling routine: MUSTACHE-F
+Compiling routine: WENDISH-BOOK-F
+Compiling routine: DEALER-D
+Compiling routine: DEALER-F
+Compiling routine: PAINTER-D
+Compiling routine: PAINTER-F
+Compiling routine: VIVIEN-DIARY-F
+Compiling routine: COUSIN-F
+Compiling routine: BOLITHO-WILL
+Compiling routine: BUTLER-D
+Compiling routine: BUTLER-SORRY
+Compiling routine: BUTLER-F
+Compiling routine: IN-CASE-OF-BLACKOUT
+Compiling routine: BUTLER-GHOST-STORY
+Compiling routine: BUTLER-MIRROR-STORY
+Compiling routine: GHOST-NEW-D
+Compiling routine: GHOST-NEW-F
+Compiling routine: GHOST-NEW-VERBS
+Compiling routine: UNDRESS-GHOST
+Compiling routine: DESCRIBE-GOWN
+Compiling routine: COSTUME-F
+Compiling routine: WEAR-SCARE
+Compiling routine: WHY-ME
+Compiling routine: DESCRIBE-PERSON
+Compiling routine: ALL-TOGETHER-NOW?
+Compiling routine: TELL-ABOUT-OBJECT
+Compiling routine: PERSON-F
+Compiling routine: SECRET-PASSAGE-OR-DOOR?
+Compiling routine: CARRY-CHECK
+Compiling routine: WINNER-DESCRIBE
+Compiling routine: TRANSIT-TEST
+Compiling routine: COM-CHECK
+Compiling routine: EVIDENCE?
+Compiling routine: SETUP-SHOT
+Compiling routine: COMMON-ASK-ABOUT
+Compiling routine: SHOWING-CLUE?
+Compiling routine: TREASURE-FOUND?
+Compiling routine: TELL-STOP-SEARCHING?
+Compiling routine: GOOD-SHOW
+Compiling routine: COMMON-DESC
+Compiling routine: COMMON-OTHER
+Compiling routine: UNSNOOZE
+Compiling routine: FIX-MUSTACHE
+Compiling routine: OBJECT-PAIR-F
+Compiling routine: CREW-GLOBAL-F
+Input file: SS:<MOONMIST>CASTLE.ZIL.721
+Compiling routine: CASTLE-F
+Compiling routine: TOWER-F
+Compiling routine: MOON-F
+Compiling routine: OCEAN-F
+Compiling routine: CAR-DOOR-PSEUDO
+Compiling routine: DRIVING?
+Compiling routine: CAR-F
+Compiling routine: CAR-TO-COURTYARD
+Compiling routine: CAR-TO-DRIVEWAY
+Compiling routine: TELL-ABOUT-CAR
+Compiling routine: VOICE-F
+Compiling routine: HORN-F
+Compiling routine: DRIVEWAY-F
+Compiling routine: DRAGON-F
+Compiling routine: TELL-ABOUT-DRAGON
+Compiling routine: I-DRAGON-EYE
+Compiling routine: DRAGON-EYE-F
+Compiling routine: TELL-ABOUT-EYE
+Compiling routine: VOICE-SAYS
+Compiling routine: GATE-OPENS
+Compiling routine: FRONT-GATE-F
+Compiling routine: COURTYARD-F
+Compiling routine: TELL-LIKE-BROCHURE
+Compiling routine: MAZE-EXIT
+Compiling routine: MAZE-F
+Compiling routine: GARDEN-F
+Compiling routine: POND-F
+Compiling routine: FRONT-DOOR-F
+Compiling routine: FOYER-F
+Compiling routine: DESCRIBE-CONTENTS
+Compiling routine: UMBRELLA-STAND-F
+Compiling routine: DRAWING-ROOM-F
+Compiling routine: LOVER-PIC-F
+Compiling routine: TAPESTRY-F
+Compiling routine: GREAT-HALL-F
+Compiling routine: GREAT-HALL-IS-FLOORED
+Compiling routine: ARMOR-F
+Compiling routine: SECRET-SITTING-DOOR-F
+Compiling routine: SITTING-ROOM-F
+Compiling routine: WYVERN-F
+Compiling routine: WRITING-DESK-F
+Compiling routine: PIANO-F
+Compiling routine: MUSIC-F
+Compiling routine: CORR-1-F
+Compiling routine: DINING-ROOM-F
+Compiling routine: I-DINNER-TALK
+Compiling routine: DINNER-TALK
+Compiling routine: POPULATION
+Compiling routine: BUST-D
+Compiling routine: BUST-F
+Compiling routine: RECORDER-F
+Compiling routine: TABLE-DINING-F
+Compiling routine: PUNCHBOWL-F
+Compiling routine: DINNER-D
+Compiling routine: DINNER-F
+Compiling routine: BACKSTAIRS-F
+Compiling routine: KITCHEN-F
+Compiling routine: LANTERN
+Compiling routine: GALLERY-F
+Compiling routine: PICTURE-F
+Compiling routine: BATHROOM-F
+Compiling routine: FIREPLACE-F
+Compiling routine: BED-PSEUDO
+Compiling routine: NIGHTSTAND-LG-F
+Compiling routine: DRESSING-TABLE-LG-F
+Compiling routine: MIRROR-GLOBAL-F
+Compiling routine: OPEN-DOOR?
+Compiling routine: YOUR-ROOM-F
+Compiling routine: ENTER-PASSAGE
+Compiling routine: BED-F
+Compiling routine: NIGHTSTAND-F
+Compiling routine: TELL-AS-WELL-AS
+Compiling routine: DRESSING-MIRROR-F
+Compiling routine: YOUR-MIRROR-F
+Compiling routine: YOUR-SWITCH-F
+Compiling routine: YOUR-BATHROOM-F
+Compiling routine: TOILET-PSEUDO
+Compiling routine: BATH-PSEUDO
+Compiling routine: IRIS-ROOM-F
+Compiling routine: WENDISH-ROOM-F
+Compiling routine: CANDLE-F
+Compiling routine: WENDISH-STUFF-D
+Compiling routine: WENDISH-STUFF-F
+Compiling routine: WENDISH-KIT-F
+Compiling routine: SEARCH-KIT-BOX
+Compiling routine: VIVIEN-ROOM-F
+Compiling routine: VIVIEN-BOX-F
+Compiling routine: FIGURINE-F
+Compiling routine: IAN-ROOM-F
+Compiling routine: TELL-IAN-FIREPLACE
+Compiling routine: ANDIRON-F
+Compiling routine: HYDE-ROOM-F
+Input file: SS:<MOONMIST>TOWER.ZIL.528
+Compiling routine: TELL-IN-BROCHURE
+Compiling routine: BROCHURE-PSEUDO
+Compiling routine: MEMENTO-F
+Compiling routine: OLD-GREAT-HALL-F
+Compiling routine: JUNCTION-F
+Compiling routine: BASEMENT-ENTER
+Compiling routine: BASEMENT-F
+Compiling routine: WINE-RACK-F
+Compiling routine: BOTTLE-F
+Compiling routine: BRICKS-D
+Compiling routine: BRICKS-F
+Compiling routine: HOLE-IN-WALL-F
+Compiling routine: WELL-F
+Compiling routine: CRYPT-F
+Compiling routine: SKELETON-F
+Compiling routine: DUNGEON-F
+Compiling routine: IRON-MAIDEN-F
+Compiling routine: COFFIN-F
+Compiling routine: LOVER-PATH-LOSE-N
+Compiling routine: LOVER-PATH-LOSE
+Compiling routine: LOVER-PATH-F
+Compiling routine: CORR-2-F
+Compiling routine: CREST-F
+Compiling routine: TV-PSEUDO
+Compiling routine: JACK-ROOM-F
+Compiling routine: NOT-FOUND
+Compiling routine: FREE-VERB?
+Compiling routine: SECRET-CHECK
+Compiling routine: OPEN-SECRET
+Compiling routine: TELESCOPE-F
+Compiling routine: LIBRARY-F
+Compiling routine: BOOKS-GLOBAL-F
+Compiling routine: BOOKCASE-F
+Compiling routine: HISTORY-BOOK-F
+ ** Note: Non-predicate jump flushed MOVE
+Compiling routine: JOURNAL-F
+Compiling routine: OFFICE-F
+Compiling routine: INKWELL-F
+Compiling routine: COMPUTER-F
+Compiling routine: TAMARA-ROOM-F
+Compiling routine: DRESSING-TABLE-TAM
+Compiling routine: TAMARA-BED-F
+Compiling routine: JEWELRY-CASE-F
+Compiling routine: EARRING-F
+Compiling routine: CORR-3-F
+Compiling routine: CAGE-PSEUDO
+Compiling routine: LUMBER-ROOM-F
+Compiling routine: LUMBER-CHEST-F
+Compiling routine: LUMBER-RING-F
+Compiling routine: PEEPHOLE-2-F
+Compiling routine: MAGAZINE-F
+Compiling routine: CHAPEL-F
+Compiling routine: STAINED-WINDOW-F
+Compiling routine: BILLIARD-PSEUDO
+Compiling routine: BUFFALO-HEAD-F
+Compiling routine: RHINO-HEAD-F
+Compiling routine: GLASS-EYE-F
+Compiling routine: DECK-F
+Compiling routine: BELL-F
+Compiling routine: GO-TO-SOUND
+Compiling routine: X-TO-BELL
+Compiling routine: LADDER-F
+Compiling routine: LEVER-AND-DOOR
+Compiling routine: SECRET-LANDING-JACK-F
+Compiling routine: PASSAGE-1-F
+Compiling routine: SECRET-LANDING-TAM-F
+Compiling routine: SECRET-VIVIEN-PASSAGE-F
+Compiling routine: DINING-PASSAGE-F
+Compiling routine: SECRET-LANDING-LIB-F
+Compiling routine: SECRET-IAN-PASSAGE-F
+Compiling routine: SITTING-PASSAGE-F
+Compiling routine: SITTING-PASSAGE-LOSE
+Compiling routine: YOUR-CLOSET-F
+Compiling routine: PASSAGE-DESC?
+Compiling routine: IRIS-CLOSET-F
+Compiling routine: WENDISH-CORNER-F
+Compiling routine: MIDPOINT-F
+Compiling routine: DRAWING-CLOSET-F
+Compiling routine: GALLERY-CORNER-F
+Compiling routine: PEEPHOLE-F
+Compiling routine: HYDE-CLOSET-F
+Input file: SS:<MOONMIST>THINGS.ZIL.207
+Compiling routine: RANDOM-PSEUDO
+Compiling routine: LUGGAGE-F
+Compiling routine: BROCHURE-F
+Compiling routine: BLOWGUN-F
+Compiling routine: NO-VIOLENCE?
+Compiling routine: SHOOTING
+Compiling routine: MACE-F
+Compiling routine: NECKLACE-OF-D-F
+Compiling routine: LENS-2-F
+Compiling routine: LENS-BOX-F
+Compiling routine: LETTER-F
+Compiling routine: LETTER-MAID-F
+Compiling routine: LETTER-DEE-F
+Input file: SS:<MOONMIST>PLACES.ZIL.94
+Compiling routine: NULL-F
+Compiling routine: DOOR-ROOM
+Compiling routine: FIND-FLAG
+Compiling routine: FIND-FLAG-NOT
+Compiling routine: FIND-FLAG-LG
+Compiling routine: FIND-FLAG-HERE
+Compiling routine: FIND-FLAG-HERE-NOT
+Compiling routine: LEVER-F
+Compiling routine: OPEN-CLOSE
+Compiling routine: OUTSIDE?
+Compiling routine: WINDOW-F
+Compiling routine: CORRIDOR-LOOK
+Compiling routine: CORRIDOR-CHECK
+Input file: SS:<MOONMIST>GLOBAL.ZIL.354
+Compiling routine: LOCAL-GLOBALS-F
+Compiling routine: UPSTAIRS-DOWNSTAIRS
+Compiling routine: DO-INSTEAD-OF
+Compiling routine: TURN-F
+Compiling routine: IT-F
+Compiling routine: FLOOR-F
+Compiling routine: START-SEARCH
+Compiling routine: I-FOUND-IT
+Compiling routine: YOU-F
+Compiling routine: WALL-F
+Compiling routine: GLOBAL-HERE-F
+Compiling routine: CHAIR-F
+Compiling routine: CLOTHES-FCN
+Compiling routine: SLEEP-GLOBAL-F
+Compiling routine: ROB
+Compiling routine: LIGHT-GLOBAL-F
+Compiling routine: HAUNTING-F
+Compiling routine: KEYHOLE-F
+Compiling routine: HANDS-F
+Compiling routine: HEAD-F
+Compiling routine: EYE-F
+Compiling routine: FIND-BODY
+Compiling routine: PASSAGE-F
+Compiling routine: CORPSE-F
+Compiling routine: UNDRESSED-F
+Compiling routine: ARTIFACT-F
+Compiling routine: TIMES-UP
+Input file: SS:<MOONMIST>COLORS.ZIL.353
+Compiling routine: INTRO
+Compiling routine: YOUR-COLOR-F
+Compiling routine: GET-COLOR
+Compiling routine: FIX-COLOR-ADJ
+Compiling routine: DO-VARIATION
+Compiling routine: CANE-F
+Compiling routine: PAINT-F
+Compiling routine: DISCOVER-WAR-CLUB
+Compiling routine: ATTACK-VERB?
+Compiling routine: WAR-CLUB-F
+Compiling routine: DESCRIBE-WAR-CLUB
+Compiling routine: SKULL-F
+Compiling routine: MOONMIST-F
+Compiling routine: CLUE-1-F
+Compiling routine: CLUE-2-F
+Compiling routine: CLUE-3-F
+Compiling routine: CLUE-4-F
+Compiling routine: PRINT-COLOR
+Compiling routine: TELL-SUFFIX
+Compiling routine: TITLE-NAME
+Compiling routine: TITLE
+Compiling routine: NON-BLANK-STUFF
+Compiling routine: FULL-NAME
+Compiling routine: GET-NAME
+Compiling routine: PRINT-NAME
+ ** Warning: Never defined - A?GREEN
+ ** Warning: Never defined - A?BLUE
+ ** Warning: Never defined - A?RED
+ ** Warning: Never defined - A?YELLOW
+
+Warnings: 4
+ ** Note: OBJECT has no properties: ROOMS
+ ** Note: OBJECT has no properties: GENERIC-CLUE
+Vocabulary: 955
+Prepositions: 24
+ IN
+ UNTIL
+ AGAINST
+ BESIDE
+ AWAY
+ BEHIND
+ AROUND
+ ACROSS
+ RID
+ FROM
+ THROUGH
+ OVER
+ DOWN
+ UP
+ OFF
+ ABOUT
+ ON
+ UNDER
+ OUT
+ FOR
+ WITH
+ TO
+ AT
+Objects: 253
+ BUST
+ HORN
+ MEMENTO
+ WENDISH-CHAIR
+ PUNCHBOWL
+ LOVER-PIC
+ POND
+ WINDOW
+ COURTYARD
+ DRAWING-ROOM
+ TOMB
+ IRIS-CHAIR
+ DRIVEWAY
+ WENDISH-ROOM
+ SECRET-SITTING-DOOR
+ WELL
+ LIBRARY-CHAIR
+ DUNGEON
+ EARRING
+ CORR-3
+ LUMBER-ROOM
+ CHAPEL
+ GAME-ROOM
+ LUMBER-CHEST
+ LUMBER-RING
+ PEEPHOLE-2
+ MAGAZINE
+ STAINED-WINDOW
+ BUFFALO-HEAD
+ RHINO-HEAD
+ GLASS-EYE
+ DECK
+ LADDER
+ SECRET-LANDING-JACK
+ PASSAGE-1
+ SECRET-LANDING-TAM
+ SECRET-VIVIEN-PASSAGE
+ DINING-PASSAGE
+ SECRET-LANDING-LIB
+ SECRET-IAN-PASSAGE
+ SITTING-PASSAGE
+ YOUR-CLOSET
+ IRIS-CLOSET
+ WENDISH-CORNER
+ MIDPOINT
+ DRAWING-CLOSET
+ GALLERY-CORNER
+ HYDE-CLOSET
+ PSEUDO-OBJECT
+ LUGGAGE
+ BROCHURE
+ BLOWGUN
+ MACE
+ NECKLACE-OF-D
+ JEWEL
+ LENS
+ LENS-BOX
+ LENS-1
+ LENS-2
+ LETTER
+ LETTER-MAID
+ LETTER-DEE
+ TURN
+ IT
+ FLOOR
+ DANGER
+ INTNUM
+ YOU
+ WALL
+ GLOBAL-HERE
+ TWEED-OUTFIT
+ SLEEP-OUTFIT
+ EXERCISE-OUTFIT
+ DINNER-OUTFIT
+ SLEEP-GLOBAL
+ LIGHT-GLOBAL
+ HAUNTING
+ KEYHOLE
+ HANDS
+ HEAD
+ EYE
+ PASSAGE
+ ROMANCE
+ ACCIDENT
+ CORPSE
+ UNDRESSED
+ ARTIFACT
+ YOUR-COLOR
+ CANE
+ PAINT
+ WAR-CLUB
+ SKULL
+ NECKLACE
+ MOONMIST
+ GENERIC-CLUE
+ CLUE-1
+ CLUE-2
+ CLUE-3
+ CLUE-4
+ TABLE-LIBRARY
+ SECRET-HYDE-DOOR
+ GARDEN
+ JUNCTION
+ WENDISH-STUFF
+ VICTORIA-CHAIR
+ BACKSTAIRS
+ MAZE
+ COAT-RACK
+ OBJECT-PAIR
+ BASEMENT
+ ARMOR
+ FIGURINE
+ DINNER
+ OCEAN
+ SECRET-VIVIEN-DOOR
+ PIANO
+ FIREPLACE
+ BOOKCASE
+ CORR-2
+ VIVIEN-BOX
+ DRESSING-TABLE
+ JOURNAL
+ SECRET-IAN-DOOR
+ TAMARA-BED
+ DRESSING-BENCH
+ WENDISH-KIT
+ GHOST-NEW
+ SECRET-DRAWING-DOOR
+ HISTORY-BOOK
+ DEB
+ NIGHTSTAND-LG
+ TABLE-DINING
+ DINNER-2
+ SECRET-YOUR-DOOR
+ BATHROOM
+ CORR-1
+ YOUR-MIRROR
+ WARDROBE
+ DRAGON
+ NOT-HERE-OBJECT
+ WRITING-DESK
+ DRAGON-EYE
+ LOVER-PATH
+ SKELETON
+ COUSIN
+ STUDY
+ CASTLE
+ BOOKS-GLOBAL
+ FRIEND
+ COFFIN
+ STAIRS
+ CAR
+ WINE-RACK
+ GHOST-OLD
+ SIDEBOARD
+ NIGHTLAMP
+ LOVER
+ CHEST-OF-DRAWERS
+ IRIS-ROOM
+ TELESCOPE
+ LAMP
+ SECRET-TAMARA-DOOR
+ JACK-ROOM
+ HYDE-ROOM
+ NIGHTSTAND
+ VIVIEN-ROOM
+ VIVIEN-DIARY
+ LIBRARY
+ SECRET-IRIS-DOOR
+ HIM
+ BOTTLE
+ PRIEST-DOOR
+ PAINTING-GALLERY
+ OLD-GREAT-HALL
+ BED
+ TABLE-RANDOM
+ FOYER
+ GALLERY
+ YOUR-BATHROOM-DOOR
+ TOWER
+ TAMARA-ROOM
+ MAID
+ GREAT-HALL
+ LEVER
+ HOLE-IN-WALL
+ CRYPT
+ FRONT-DOOR
+ CREST
+ OFFICER
+ IAN-ROOM
+ UMBRELLA-STAND
+ WARDROBE-LG
+ COSTUME
+ LORD
+ VIVIEN-STUFF
+ IRON-MAIDEN
+ DEALER
+ PAINTER
+ SECRET-WENDISH-DOOR
+ YOUR-SWITCH
+ TAMARA-EVIDENCE
+ WENDISH-BOOK
+ COMPUTER
+ DRESSING-TABLE-LG
+ DESK
+ CREW-GLOBAL
+ MUSTACHE
+ WYVERN
+ BUTLER
+ SITTING-ROOM
+ VIVIEN-CHAIR
+ BELL
+ DOCTOR
+ MOON
+ IAN-CHAIR
+ INKWELL
+ CANDLE
+ SECRET-LIBRARY-DOOR
+ YOUR-CHAIR
+ PLAYER-NAME
+ BRICKS
+ WEST-HALL
+ GLOBAL-OBJECTS
+ SECRET-DINING-DOOR
+ JACK-TAPE
+ YOUR-BATHROOM
+ DRESSING-MIRROR
+ CHAIR-DINING
+ PEEPHOLE
+ OFFICE
+ HYDE-CHAIR
+ FRONT-GATE
+ VOICE
+ MUSIC
+ TAPESTRY
+ HER
+ CHAIR
+ LOCAL-GLOBALS
+ PLAYER
+ MIRROR-GLOBAL
+ EAST-HALL
+ LIMBO
+ ROOMS
+ INTDIR
+ ANDIRON
+ YOUR-ROOM
+ DINING-ROOM
+ KITCHEN
+ RECORDER
+ OIL-PAINTING
+ JEWELRY-CASE
+ SECRET-JACK-DOOR
+ MEMENTO-2
+Properties: 27
+ P?SW
+ P?SE
+ P?NE
+ P?NW
+ P?UP
+ P?DOWN
+ P?WEST
+ P?NORTH
+ P?SOUTH
+ P?EAST
+ P?IN
+ P?OUT
+ P?THINGS
+ P?GLOBAL
+ P?STATION
+ P?GENERIC
+ P?SIZE
+ P?CAPACITY
+ P?TEXT
+ P?DESCFCN
+ P?CHARACTER
+ P?LINE
+ P?LDESC
+ P?ADJECTIVE
+ P?SYNONYM
+ P?ACTION
+Globals: 223
+ P-ACLAUSE
+ WHICH-DIR
+ BUTLER-DUTY
+ INTO-DARKNESS
+ SECRET-TAM-LIB
+ PASSAGE-EAST-WEST
+ POISON-DART
+ CLASP-MUNGED
+ COR-1
+ COR-2
+ COR-4
+ WING-STAIRS
+ TOWER-STAIRS
+ FOUND-IT
+ FOUND-IT-PERM
+ FOUND-LOC
+ NOTHING-NEW
+ NOW-WEARING
+ OHERE
+ VILLAIN-PER
+ TREASURE
+ HIDING-PLACE
+ COLOR-FORCED
+ COLOR-WORDS
+ COLOR-ADJS
+ COLOR-LETTERS
+ FAVE-COLOR
+ FIRST-NAME
+ LAST-NAME
+ SUFFIX
+ GENDER-KNOWN
+ MIDDLE-WORD
+ TITLE-WORD
+ IM-SHOCKED
+ QUITE-WELCOME
+ MISSED-DINNER
+ FOUND-FABRIC
+ P-HER-OBJECT
+ P-NCN
+ PLAYER-RANG-BELL?
+ BED-LINE
+ I-ASSUME
+ WHITISH-GLIMPSE
+ CHAR-CLOSET-TABLE
+ QUESTION-WORD-COUNT
+ CHARACTER-TABLE
+ SEARCHER
+ DINNER-SIT-COUNTER
+ MAIN-LINE
+ DISCOVERED-HERE
+ NAUGHTY-WORD-TABLE
+ CAPTOR
+ TOLD-ABOUT-EVID
+ TOLD-ABOUT-GHOST
+ DARK-TURRETS
+ VILLAIN-KNOWN?
+ QWP2-TABLE
+ NUMBER-WORD-TABLE
+ CHAR-ROOM-TABLE
+ P-IT-OBJECT
+ RESERVE-INBUF
+ FOLLOWER
+ YAWNS
+ FUMBLE-PROB
+ FUMBLE-NUMBER
+ P-AND
+ LIONELS-VOICE
+ LIONEL-FORCED
+ P-BUTS
+ P-LEN
+ REMEMBER-NOT-DRESSED
+ STAIRS-UP-RIGHT
+ AIMED-HERE
+ SHOOTER
+ SEARCH-ROOMS
+ IDENTIFIED-THE-GHOST
+ ARRESTED-THE-VILLAIN
+ FOUND-PASSAGES
+ FOUND-COSTUME
+ TOUCHED-LDESCS
+ OPRSO
+ PRSO
+ P-OFLAG
+ P-ITBL
+ P-OCL1
+ P-OCL2
+ GHOST-CACKLES
+ BUTLER-GHOST-STORY-TOLD
+ FAMOUS-YOUNG-DETECTIVE
+ VERBOSITY
+ QUOTE-FLAG
+ P-OVTBL
+ TIMER-PREVENTS-IT
+ WASHED
+ P-MOBY-FOUND
+ HO-HUM
+ PLAYER-OBSTACLES
+ TRANSFER-TABLE
+ P-OTBL
+ CLUE-LOC
+ PRSA
+ PASS-LINE
+ OTHER-POSS-POS
+ NEVER-NOTICED-HER
+ P-LEXV
+ WINNER
+ AGAIN-LEXV
+ TRESYLLIAN
+ RHYMES-WITH-RICH
+ FAWNING
+ LDESC-STRINGS
+ GLASSES-FOR
+ MASS-SAID
+ BUTLER-HINTS-COUNTER
+ YUKS
+ WHO-CARES-TBL
+ P-OFW
+ P-ADJW
+ P-NAMW
+ TREASURE-FOUND
+ PIANO-PIECES
+ INTRODUCES
+ OOPS-INBUF
+ SHOT
+ P-PHR
+ P-CCTBL
+ P-TIME
+ OFFENDED
+ BEG-PARDON
+ P-INBUF
+ RESERVE-PTR
+ QCONTEXT
+ LIT
+ RESERVE-LEXV
+ P-TABLE
+ QUESTIONS
+ QUESTIONERS
+ GUEST-TABLE
+ SOMETHING
+ QUESTION-WORD-TABLE
+ TOWER-LINE
+ TOUR-PATH
+ MUSTACHE-STORY
+ LOVER-SAID
+ BUTLER-RANG-BELL?
+ BRICKS-DOWN
+ NO-CHANGING
+ TRAILS-ALONG
+ TOUR-FORCED
+ P-PRSI
+ P-IT-WORDS
+ AWAITING-REPLY
+ P-ADJ
+ P-MERGE
+ P-XADJ
+ P-PRSO
+ P-HIM-OBJECT
+ DIR-STRINGS
+ OU-STOP-SEARCHING
+ OOPS-TABLE
+ P-CONT
+ NOT-ENOUGH-ROOM
+ NO-VIOLENCE
+ YOU-DIDNT-SAY-W
+ AHHH
+ GOAL-TABLES
+ TOUR-INDEX
+ YES-INBUF
+ YES-LEXV
+ LAST-PSEUDO-LOC
+ VARIATION
+ GOAL-PERSON
+ DINING-DESC
+ WRONG-OUTFIT
+ CREEPIES
+ WHO-CARES-VERB
+ CASTLE-IS-SOUTH
+ CHAR-POSS-TABLE
+ FOLLOW-LOC
+ PRESENT-TIME
+ CLOCKER-RUNNING
+ C-TABLE
+ EVIDENCE-FOUND
+ C-INTS
+ CLOCK-WAIT
+ DINNER-SAT
+ TOO-SLIPPERY
+ DRAGON-EYE-COLOR
+ THATS-INTERESTING
+ ANCIENT-SECRETS
+ STAIRS-DOWN-LEFT
+ P-MOBY-FLAG
+ NOW-PRSI
+ P-PROMPT
+ QWP1-TABLE
+ MASS-COUNTER
+ JACK-THINKS-GLADYS
+ P-NUMBER
+ LIONEL-SPEAKS-COUNTER
+ PRSI
+ LONG-BLOND-HAIR
+ P-VTBL
+ CONFESSED
+ P-END-ON-PREP
+ P-MERGED
+ AGAIN-DIR
+ P-ADJN
+ FRIEND-FOUND-PASSAGES
+ P-GETFLAGS
+ P-WON
+ OOPS-PRINT
+ P-PRSA-WORD
+ P-AADJ
+ P-SYNTAX
+ P-GWIMBIT
+ P-XADJN
+ P-DIRECTION
+ KEEP-WAITING
+ P-ANAM
+ P-WALK-DIR
+ P-XNAM
+ P-NAM
+ P-SLOCBITS \ No newline at end of file
diff --git a/m5.zip b/m5.zip
new file mode 100644
index 0000000..0948e50
--- /dev/null
+++ b/m5.zip
Binary files differ
diff --git a/macros.zil b/macros.zil
new file mode 100644
index 0000000..1901359
--- /dev/null
+++ b/macros.zil
@@ -0,0 +1,236 @@
+"MACROS for MOONMIST
+Copyright (c) 1986 Infocom, Inc. All rights reserved."
+
+;<TELL-TOKENS CR <CRLF>
+ N * <PRINTN .X>
+ C * <PRINTC .X>
+ D * <PRINTD .X>
+ A * <PRINTA .X>
+ FN <PRINT-NAME ,FIRST-NAME>
+ LN <PRINT-NAME ,LAST-NAME>
+ TN <TITLE-NAME>
+ THE * <PRINTT .X>
+ CTHE * <START-SENTENCE .X>
+ CHE * *:ATOM <HE-SHE-IT .X 1 .Y>
+ CHE * <HE-SHE-IT .X 1>
+ HE * *:ATOM <HE-SHE-IT .X 0 .Y>
+ HE * <HE-SHE-IT .X>
+ V * * <HE-SHE-IT .X -1 .Y>
+ HIM * <HIM-HER-IT .X>
+ HIS * <HIM-HER-IT .X 0 T>
+ CHIS * <HIM-HER-IT .X 1 T>>
+
+<DEFMAC VERB? ("TUPLE" ATMS "AUX" (O ()) (L ()))
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS>
+ <RETURN!- <COND (<LENGTH? .O 1> <NTH .O 1>)
+ (ELSE <FORM OR !.O>)>>)>
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS> <RETURN!->)>
+ <SET ATM <NTH .ATMS 1>>
+ <SET L
+ (<CHTYPE <PARSE <STRING "V?"<SPNAME .ATM>>> GVAL>
+ !.L)>
+ <SET ATMS <REST .ATMS>>
+ <COND (<==? <LENGTH .L> 3> <RETURN!->)>>
+ <SET O (<FORM EQUAL? ',PRSA !.L> !.O)>
+ <SET L ()>>>
+
+<DEFMAC DOBJ? ("TUPLE" ATMS "AUX" (O ()) (L ()))
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS>
+ <RETURN!- <COND (<LENGTH? .O 1> <NTH .O 1>)
+ (ELSE <FORM OR !.O>)>>)>
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS> <RETURN!->)>
+ <SET ATM <NTH .ATMS 1>>
+ <SET L (<COND (<TYPE? .ATM ATOM>
+ <CHTYPE .ATM GVAL>)
+ (T .ATM)>
+ !.L)>
+ <SET ATMS <REST .ATMS>>
+ <COND (<==? <LENGTH .L> 3> <RETURN!->)>>
+ <SET O (<FORM EQUAL? ',PRSO !.L> !.O)>
+ <SET L ()>>>
+
+<DEFMAC IOBJ? ("TUPLE" ATMS "AUX" (O ()) (L ()))
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS>
+ <RETURN!- <COND (<LENGTH? .O 1> <NTH .O 1>)
+ (ELSE <FORM OR !.O>)>>)>
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS> <RETURN!->)>
+ <SET ATM <NTH .ATMS 1>>
+ <SET L (<COND (<TYPE? .ATM ATOM>
+ <CHTYPE .ATM GVAL>)
+ (T .ATM)>
+ !.L)>
+ <SET ATMS <REST .ATMS>>
+ <COND (<==? <LENGTH .L> 3> <RETURN!->)>>
+ <SET O (<FORM EQUAL? ',PRSI !.L> !.O)>
+ <SET L ()>>>
+
+<DEFMAC RFATAL ()
+ '<PROG () <PUSH 2> <RSTACK>>>
+
+<DEFMAC PROB ('BASE?)
+ <FORM NOT <FORM L? .BASE? '<RANDOM 100>>>>
+
+<DEFMAC TELL ("ARGS" A)
+ <FORM PROG ()
+ !<MAPF ,LIST
+ <FUNCTION ("AUX" E P O)
+ <COND (<EMPTY? .A> <MAPSTOP>)
+ (<SET E <NTH .A 1>>
+ <SET A <REST .A>>)>
+ <COND (<TYPE? .E ATOM>
+ <COND (<OR <=? <SET P <SPNAME .E>>
+ "CRLF">
+ <=? .P "CR">>
+ <MAPRET '<CRLF>>)
+ (<=? .P "FN">
+ <MAPRET '<PRINT-NAME ,FIRST-NAME>>)
+ (<=? .P "LN">
+ <MAPRET '<PRINT-NAME ,LAST-NAME>>)
+ (<=? .P "TN">
+ <MAPRET '<TITLE-NAME>>)
+ (<EMPTY? .A>
+ <ERROR INDICATOR-AT-END? .E>)
+ (ELSE
+ <SET O <NTH .A 1>>
+ <SET A <REST .A>>
+ <COND (<OR <=? <SET P <SPNAME .E>>
+ "DESC">
+ <=? .P "D">
+ <=? .P "OBJ">
+ <=? .P "O">>
+ <MAPRET <FORM PRINTD .O>>)
+ (<OR <=? .P "A">
+ <=? .P "AN">>
+ <MAPRET <FORM PRINTA .O>>)
+ (<OR ;<=? .P "T">
+ <=? .P "THE">>
+ <MAPRET <FORM PRINTT .O>>)
+ (<OR ;<=? .P "CT">
+ <=? .P "CTHE">>
+ <MAPRET <FORM START-SENTENCE .O>>)
+ (<=? .P "CHE">
+ <COND (<OR <EMPTY? .A>
+ <NOT <TYPE? <NTH .A 1> ATOM>>>
+ <MAPRET <FORM HE-SHE-IT .O T>>)
+ (T
+ <SET P <SPNAME <NTH .A 1>>>
+ <SET A <REST .A>>
+ <MAPRET <FORM HE-SHE-IT .O T .P>>)>)
+ (<=? .P "HE">
+ <COND (<OR <EMPTY? .A>
+ <NOT <TYPE? <NTH .A 1> ATOM>>>
+ <MAPRET <FORM HE-SHE-IT .O>>)
+ (T
+ <SET P <SPNAME <NTH .A 1>>>
+ <SET A <REST .A>>
+ <MAPRET <FORM HE-SHE-IT .O 0 .P>>)>)
+ (<=? .P "V">
+ <SET P <SPNAME <NTH .A 1>>>
+ <SET A <REST .A>>
+ <MAPRET <FORM HE-SHE-IT .O -1 .P>>)
+ (<=? .P "HIM">
+ <MAPRET <FORM HIM-HER-IT .O>>)
+ ;(<=? .P "CHIM">
+ <MAPRET <FORM HIM-HER-IT .O T>>)
+ (<=? .P "HIS">
+ <MAPRET <FORM HIM-HER-IT .O '<> T>>)
+ (<=? .P "CHIS">
+ <MAPRET <FORM HIM-HER-IT .O T T>>)
+ (<OR <=? .P "NUM">
+ <=? .P "N">>
+ <MAPRET <FORM PRINTN .O>>)
+ (<OR ;<=? .P "CHAR">
+ ;<=? .P "CHR">
+ <=? .P "C">>
+ <MAPRET <FORM PRINTC <ASCII .O>>>)
+ (ELSE
+ <MAPRET <FORM PRINT <FORM GETP .O .E>>>)>)>)
+ (<TYPE? .E CHARACTER>
+ <MAPRET <FORM PRINTC <ASCII .E>>>)
+ (<TYPE? .E STRING ZSTRING>
+ <MAPRET <FORM PRINTI .E>>)
+ (<AND <TYPE? .E FORM>
+ <==? <NTH .E 1> QUOTE>>
+ <MAPRET <FORM PRINTD <FORM GVAL <NTH .E 2>>>>)
+ (<TYPE? .E FORM LVAL GVAL>
+ <MAPRET <FORM PRINT .E>>)
+ (ELSE <ERROR UNKNOWN-TYPE .E>)>>>>>
+
+<DEFMAC ONE? ('TERM)
+ <FORM EQUAL? .TERM 1 T>>
+
+;<ROUTINE ONE? (NUM) <EQUAL? .NUM 1 T>>
+
+<SETG C-ENABLED? 0>
+<SETG C-ENABLED 1>
+<SETG C-DISABLED 0>
+
+<DEFMAC ENABLE ('INT) <FORM PUT .INT ,C-ENABLED? 1>>
+
+<DEFMAC DISABLE ('INT) <FORM PUT .INT ,C-ENABLED? 0>>
+
+;<DEFMAC FLAMING? ('OBJ)
+ <FORM AND <FORM FSET? .OBJ ',FLAMEBIT>
+ <FORM FSET? .OBJ ',ONBIT>>>
+
+<DEFMAC OPENABLE? ('OBJ)
+ <FORM OR <FORM FSET? .OBJ ',DOORBIT>
+ <FORM FSET? .OBJ ',CONTBIT>>>
+
+<DEFMAC ABS ('NUM)
+ <FORM COND (<FORM L? .NUM 0> <FORM - 0 .NUM>)
+ (T .NUM)>>
+
+<DEFMAC GET-REXIT-ROOM ('PT)
+ <COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ <FORM GET .PT ',REXIT>)
+ (T <FORM GETB .PT ',REXIT>)>>
+
+<DEFMAC GET-DOOR-OBJ ('PT)
+ <COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ <FORM GET .PT ',DEXITOBJ>)
+ (T <FORM GETB .PT ',DEXITOBJ>)>>
+
+<DEFMAC GET/B ('TBL 'PTR)
+ <COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ <FORM GET .TBL .PTR>)
+ (T <FORM GETB .TBL .PTR>)>>
+
+<DEFMAC PUT/B ('TBL 'PTR 'OBJ)
+ <COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ <FORM PUT .TBL .PTR .OBJ>)
+ (T <FORM PUTB .TBL .PTR .OBJ>)>>
+
+<DEFMAC ZMEMQ/B ('OBJ 'TBL)
+ <COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ <FORM ZMEMQ .OBJ .TBL>)
+ (T <FORM ZMEMQB .OBJ .TBL>)>>
+
+<DEFMAC RMGL-SIZE ('TBL)
+ <COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ <FORM - <FORM / <FORM PTSIZE .TBL> 2> 1>)
+ (T <FORM - <FORM PTSIZE .TBL> 1>)>>
+
+<DEFMAC GT-O ('OBJ)
+ <FORM GET ',GOAL-TABLES <FORM GETP .OBJ ',P?CHARACTER>>>
+
+<DEFMAC T? ('TERM)
+ <FORM NOT <FORM ZERO? .TERM>>>
+
+<DEFINE PSEUDO ("TUPLE" V)
+ <MAPF ,PLTABLE
+ <FUNCTION (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>>>
+ .V>>
diff --git a/parser.zil b/parser.zil
new file mode 100644
index 0000000..a8cf531
--- /dev/null
+++ b/parser.zil
@@ -0,0 +1,3329 @@
+"PARSER for MOONMIST
+Copyright (C) 1986 Infocom, Inc. All rights reserved."
+
+"Parser global variable convention: All parser globals will
+ begin with 'P-'. Local variables are not restricted in any
+ way."
+
+<SETG SIBREAKS ".,\"!?'">
+
+<GLOBAL PRSA:NUMBER 0>
+<GLOBAL PRSI:OBJECT 0>
+<GLOBAL PRSO:OBJECT 0>
+<GLOBAL OPRSO:OBJECT 0>
+
+<GLOBAL P-SYNTAX 0>
+
+<GLOBAL P-LEN:NUMBER 0>
+
+;<GLOBAL P-DIR 0>
+
+<GLOBAL WINNER:OBJECT PLAYER>
+
+<GLOBAL P-LEXV <ITABLE 79 (LEXV) 0 #BYTE 0 #BYTE 0>>
+<GLOBAL AGAIN-LEXV <ITABLE 79 (LEXV) 0 #BYTE 0 #BYTE 0>>
+<GLOBAL RESERVE-LEXV <ITABLE 79 (LEXV) 0 #BYTE 0 #BYTE 0>>
+<GLOBAL RESERVE-PTR:NUMBER <>>
+
+"INBUF - Input buffer for READ"
+<GLOBAL P-INBUF <ITABLE 80 (BYTE LENGTH) 0>>
+<GLOBAL OOPS-INBUF <ITABLE 80 (BYTE LENGTH) 0>>
+<GLOBAL RESERVE-INBUF <ITABLE 80 (BYTE LENGTH) 0>>
+
+<GLOBAL OOPS-TABLE <TABLE <> <> <> <>>>
+<CONSTANT O-PTR 0> "word pointer to unknown token in P-LEXV"
+<CONSTANT O-START 1> "word pointer to sentence start in P-LEXV"
+<CONSTANT O-LENGTH 2> "byte length of unparsed tokens in P-LEXV"
+<CONSTANT O-END 3> "byte pointer to first free byte in OOPS-INBUF"
+
+"Parse-cont variable"
+<GLOBAL P-CONT:NUMBER <>>
+
+<GLOBAL P-IT-OBJECT:OBJECT <>>
+<GLOBAL P-HER-OBJECT:OBJECT FRIEND>
+<GLOBAL P-HIM-OBJECT:OBJECT LORD>
+"<GLOBAL P-THEM-OBJECT:OBJECT <>>"
+
+"Orphan flag"
+<GLOBAL P-OFLAG:FLAG <>>
+
+<GLOBAL P-MERGED:FLAG <>>
+
+<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 %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE> 6) (T 4)>>
+
+"Offset to first part of speech"
+<CONSTANT P-P1OFF %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE> 7) (T 5)>>
+
+"First part of speech bit mask in PSOFF byte"
+<CONSTANT P-P1BITS 3>
+
+<CONSTANT P-ITBLLEN 9>
+
+<GLOBAL P-ITBL <TABLE 0 0 0 0 0 0 0 0 0 0>>
+
+<GLOBAL P-OTBL <TABLE 0 0 0 0 0 0 0 0 0 0>>
+
+<GLOBAL P-VTBL <TABLE 0 0 0 0>>
+
+<GLOBAL P-OVTBL <TABLE 0 0 0 0>>
+
+<GLOBAL P-NCN:NUMBER 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-ADVERB <>>
+<GLOBAL P-PRSA-WORD <>>
+<GLOBAL P-END-ON-PREP:FLAG <>>
+<GLOBAL P-WON <>>
+<CONSTANT M-FATAL 2>
+
+<CONSTANT M-BEG 1>
+<CONSTANT M-ENTER 2>
+<CONSTANT M-LOOK 3>
+<CONSTANT M-FLASH 4>
+<CONSTANT M-OBJDESC 5>
+<CONSTANT M-END 6>
+<CONSTANT M-CONT 7>
+<CONSTANT M-WINNER 8>
+<CONSTANT M-EXIT 9>
+<CONSTANT M-OTHER 69>
+
+<ROUTINE MAIN-LOOP ("AUX" X) <REPEAT () <SET X <MAIN-LOOP-1>>>>
+
+<ROUTINE MAIN-LOOP-1 ("AUX" ICNT OCNT NUM CNT OBJ ;TBL V PTBL OBJ1 TMP X GW)
+ <SET CNT 0>
+ <SET OBJ <>>
+ <SET PTBL T>
+ ;<COND (<NOT <==? ,QCONTEXT-ROOM ,HERE>>
+ <SETG QCONTEXT <>>)>
+ <COND (<SETG P-WON <PARSER>>
+ <SETG CLOCK-WAIT <>>
+ <SET ICNT <GET/B ,P-PRSI ,P-MATCHLEN>>
+ <SET OCNT <GET/B ,P-PRSO ,P-MATCHLEN>>
+ <COND (<AND <ZERO? .OCNT> <ZERO? .ICNT>>
+ T)
+ (<AND ,P-IT-OBJECT <ACCESSIBLE? ,P-IT-OBJECT>>
+ <SET TMP <>>
+ <REPEAT ()
+ <COND (<IGRTR? CNT .ICNT>
+ <RETURN>)>
+ <COND (<EQUAL? <GET/B ,P-PRSI .CNT> ,IT>
+ <PUT/B ,P-PRSI .CNT ,P-IT-OBJECT>
+ <TELL-I-ASSUME ,P-IT-OBJECT>
+ <SET TMP T>
+ <RETURN>)>>
+ <COND (T ;<ZERO? .TMP>
+ <SET CNT 0>
+ <REPEAT ()
+ <COND (<IGRTR? CNT .OCNT>
+ <RETURN>)>
+ <COND (<EQUAL? <GET/B ,P-PRSO .CNT> ,IT>
+ <PUT/B ,P-PRSO .CNT ,P-IT-OBJECT>
+ <TELL-I-ASSUME ,P-IT-OBJECT>
+ <RETURN>)>>)>
+ <SET CNT 0>)>
+ <SET NUM
+ <COND (<0? .OCNT> .OCNT)
+ (<G? .OCNT 1>
+ ;<SET TBL ,P-PRSO>
+ <COND (<0? .ICNT> <SET OBJ <>>)
+ (T <SET OBJ <GET/B ,P-PRSI 1>>)>
+ .OCNT)
+ (<G? .ICNT 1>
+ <SET PTBL <>>
+ ;<SET TBL ,P-PRSI>
+ <SET OBJ <GET/B ,P-PRSO 1>>
+ .ICNT)
+ (T 1)>>
+ <COND (<AND <NOT .OBJ> <1? .ICNT>>
+ <SET OBJ <GET/B ,P-PRSI 1>>)>
+ <COND (<EQUAL? ,PRSA ,V?WALK ;,V?FACE>
+ <COND ;(<ZERO? ,PRSO>
+ <SET V <PERFORM ,PRSA <GET/B ,P-PRSO 1>>>)
+ (T <SET V <PERFORM ,PRSA ,PRSO>>)>)
+ (<0? .NUM>
+ <COND (<0? <BAND <GETB ,P-SYNTAX ,P-SBITS> ,P-SONUMS>>
+ <SET V <PERFORM ,PRSA>>
+ <SETG PRSO <>>)
+ (<AND <ZERO? ,LIT> <SEE-VERB?>>
+ ;<AND <NOT ,LIT>
+ <NOT <VERB? WAIT-FOR WAIT-UNTIL>>
+ <NOT <SPEAKING-VERB?>>
+ <NOT <GAME-VERB?>>>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <TOO-DARK>)
+ (T
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <TELL "(There isn't any">
+ <COND (<OR <AND .PTBL
+ <==? <GETB ,P-SYNTAX ,P-SFWIM1>
+ ,PERSONBIT>>
+ <AND <NOT .PTBL>
+ <==? <GETB ,P-SYNTAX ,P-SFWIM2>
+ ,PERSONBIT>>>
+ <TELL "one">)
+ (T <TELL "thing">)>
+ <TELL " to ">
+ <SET TMP <GET ,P-ITBL ,P-VERBN>>
+ <COND (<VERB? TELL>
+ <TELL "talk to">)
+ (<OR ,P-MERGED ,P-OFLAG>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <SET V <WORD-PRINT <GETB .TMP 2>
+ <GETB .TMP 3>>>)>
+ <TELL "!)" CR>
+ <SET V <>>)>)
+ (<AND .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 0>
+ <SET GW <>>
+ <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>)
+ (<NOT .TMP>
+ <MORE-SPECIFIC ;REFERRING>)>
+ <RETURN>)
+ (T
+ <COND (.PTBL
+ <SET OBJ1 <GET/B ,P-PRSO .CNT>>)
+ (T <SET OBJ1 <GET/B ,P-PRSI .CNT>>)>
+ <COND (<OR <G? .NUM 1>
+ <EQUAL? <GET <GET ,P-ITBL ,P-NC1> 0>
+ ,W?ALL>>
+ <COND (<==? .OBJ1 ,NOT-HERE-OBJECT>
+ <SET X <+ .X 1>>
+ <AGAIN>)
+ (<AND <EQUAL? ,P-GETFLAGS ,P-ALL>
+ <NOT<VERB-ALL-TEST .OBJ1 .OBJ>>>
+ <AGAIN>)
+ (<NOT <ACCESSIBLE? .OBJ1>>
+ <AGAIN>)
+ (<==? .OBJ1 ,PLAYER> <AGAIN>)
+ ;(<FSET? .OBJ1 ,DUPLICATE> <AGAIN>)
+ (T
+ <COND (<==? .OBJ1 ,COSTUME>
+ <COND (<T? .GW>
+ <AGAIN>)
+ (T <SET GW T>)>)>
+ <COND (<EQUAL? .OBJ1 ,IT>
+ <PRINTD ,P-IT-OBJECT>)
+ (T <PRINTD .OBJ1>)>
+ <TELL ": ">)>)>
+ <SET TMP T>
+ <SET V <QCONTEXT-CHECK <COND (.PTBL .OBJ1)
+ (T .OBJ)>>>
+ <COND (.PTBL
+ <SETG PRSO .OBJ1>
+ <SETG PRSI .OBJ>)
+ (T
+ <SETG PRSO .OBJ>
+ <SETG PRSI .OBJ1>)>
+ <SET V <PERFORM ,PRSA ,PRSO ,PRSI>>
+ <COND (<==? .V ,M-FATAL> <RETURN>)>)>>)>
+ <SETG OPRSO ,PRSO>
+ <COND (<==? .V ,M-FATAL> <SETG P-CONT <>>)>)
+ (T
+ <SETG CLOCK-WAIT T>
+ <SETG P-CONT <>>)>
+ <COND (<AND <ZERO? ,CLOCK-WAIT> <T? ,P-WON>>
+ <COND (<OR ;<VERB? SAVE RESTORE>
+ <NOT <GAME-VERB?>>>
+ <SETG CLOCKER-RUNNING 1>
+ <SET V <CLOCKER>>
+ <SETG CLOCKER-RUNNING 2 ;0>)>)>
+ <SETG PRSA <>>
+ <SETG PRSO <>>
+ <SETG PRSI <>>>
+
+<ROUTINE TELL-I-ASSUME (OBJ "OPT" (STR 0))
+ <COND (<OR <T? .STR>
+ <AND <NOT <==? ,OPRSO .OBJ>>
+ <NOT <FSET? .OBJ ,SECRETBIT>>>>
+ <TELL ,I-ASSUME>
+ <COND (<T? .STR> <TELL .STR>)>
+ <TELL THE .OBJ ".]" CR>)>>
+
+<ROUTINE VERB-ALL-TEST (O I "AUX" L) ;"O=PRSO I=PRSI"
+ <SET L <LOC .O>>
+ <COND (<EQUAL? .O ,PAINT>
+ <RFALSE>)
+ (<VERB? DROP GIVE>
+ <COND (<EQUAL? .O ;,POCKET ,NOW-WEARING>
+ <RFALSE>)
+ (<OR <==? .L ,WINNER> ;<IN? ,P-IT-OBJECT ,WINNER>>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ (<VERB? PUT PUT-IN>
+ <COND (<EQUAL? .O .I ;,POCKET ,NOW-WEARING>
+ <RFALSE>)
+ (<NOT <IN? ;HELD? .O .I>>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ (<VERB? TAKE>
+ <COND (<FSET? .O ,SECRETBIT>
+ <RFALSE>)
+ (<AND <NOT <FSET? .O ,TAKEBIT>>
+ <NOT <FSET? .O ,TRYTAKEBIT>>>
+ <RFALSE>)>
+ <COND (<NOT <ZERO? .I>>
+ <COND (<NOT <==? .L .I>>
+ <RFALSE>)
+ ;(T
+ <SET L .I>)>)
+ (<EQUAL? .L ;,WINNER ,HERE>
+ <COND (<AND <==? .O ,CANDLE>
+ <NOT <EQUAL? ,P-PRSA-WORD ,W?RAISE ,W?LIFT>>>
+ <RFALSE>)
+ (T <RTRUE>)>)>
+ <COND (<OR <FSET? .L ,PERSONBIT>
+ <FSET? .L ,SURFACEBIT>>
+ <RTRUE>)
+ (<AND <FSET? .L ,CONTBIT>
+ <FSET? .L ,OPENBIT>>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ (<NOT <ZERO? .I>>
+ <COND (<NOT <==? .O .I>>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ (T <RTRUE>)>>
+
+<ROUTINE GAME-VERB? ()
+ %<DEBUG-CODE <COND (<VERB? $GENDER $GOAL $QUEUE
+ $RANDOM $COMMAND $RECORD $UNRECORD ;$WHERE DEBUG>
+ <RTRUE>)>>
+ <COND (<VERB? BRIEF QUIT RESTART RESTORE SAVE SCORE SCRIPT SUPER-BRIEF
+ TELL TIME UNSCRIPT VERBOSE VERSION $VERIFY>
+ <RTRUE>)>>
+
+<ROUTINE QCONTEXT-CHECK (PER "AUX" OTHER (WHO <>) (N 0))
+ <COND (<OR <VERB? ;FIND HELP ;WHAT>
+ <AND <VERB? SHOW TELL-ABOUT>
+ <==? .PER ,PLAYER>>> ;"? more?"
+ <SET OTHER <FIRST? ,HERE>>
+ <REPEAT ()
+ <COND (<NOT .OTHER> <RETURN>)
+ (<AND <FSET? .OTHER ,PERSONBIT>
+ <NOT <FSET? .OTHER ,INVISIBLE>>
+ <NOT <==? .OTHER ,PLAYER>>>
+ <SET N <+ 1 .N>>
+ <SET WHO .OTHER>)>
+ <SET OTHER <NEXT? .OTHER>>>
+ <COND (<AND <==? 1 .N> <ZERO? ,QCONTEXT>>
+ <SETG QCONTEXT .WHO>)>
+ <COND (<AND <QCONTEXT-GOOD?>
+ <==? ,WINNER ,PLAYER>> ;"? more?"
+ <SETG WINNER ,QCONTEXT>
+ <TELL "(said to " D ,QCONTEXT ")" CR>)>)>>
+
+<ROUTINE QCONTEXT-GOOD? ()
+ <COND (<AND <NOT <ZERO? ,QCONTEXT>>
+ <FSET? ,QCONTEXT ,PERSONBIT>
+ <NOT <FSET? ,QCONTEXT ,MUNGBIT ;,INVISIBLE>>
+ ;<==? ,HERE ,QCONTEXT-ROOM>
+ <==? ,HERE <META-LOC ,QCONTEXT>>>
+ <RETURN ,QCONTEXT>)>>
+
+<ROUTINE NOT-IT (WHO)
+ <COND (<EQUAL? .WHO ,P-HER-OBJECT>
+ <FCLEAR ,HER ,TOUCHBIT>)
+ (<EQUAL? .WHO ,P-HIM-OBJECT>
+ <FCLEAR ,HIM ,TOUCHBIT>)
+ ;(<EQUAL? .WHO ,P-THEM-OBJECT>
+ <FCLEAR ,THEM ,TOUCHBIT>)
+ (<EQUAL? .WHO ,P-IT-OBJECT>
+ <FCLEAR ,IT ,TOUCHBIT>)>>
+
+<OBJECT NOT-HERE-OBJECT
+ (DESC "that thing")
+ (FLAGS NARTICLEBIT)
+ (ACTION NOT-HERE-OBJECT-F)>
+
+<ROUTINE NOT-HERE-OBJECT-F ("AUX" TBL (PRSO? <>) (OBJ <>))
+ ;"Protocol: return ,M-FATAL if case was handled and msg TELLed,
+ <> if PRSO/PRSI ready to use"
+ <COND (<AND <EQUAL? ,PRSO ,NOT-HERE-OBJECT>
+ <EQUAL? ,PRSI ,NOT-HERE-OBJECT>>
+ <TELL "(Those things aren't here!)" CR>
+ <RFATAL>)
+ (<EQUAL? ,PRSO ,NOT-HERE-OBJECT>
+ <SET TBL ,P-PRSO>
+ <SET PRSO? T>)
+ (T
+ <SET TBL ,P-PRSI>)>
+ <COND (<EQUAL? ,P-XADJ ,A?MY>
+ <COND (<EQUAL? ,P-XNAM ,W?EYE ,W?EYES>
+ <SET OBJ ,EYE>)
+ (<EQUAL? ,P-XNAM ,W?HANDS ,W?HAND>
+ <SET OBJ ,HANDS>)
+ (<EQUAL? ,P-XNAM ,W?HEAD>
+ <SET OBJ ,HEAD>)>
+ <COND (<T? .OBJ>
+ <COND (<T? .PRSO?>
+ <SETG PRSO .OBJ>)
+ (T <SETG PRSI .OBJ>)>
+ <RFALSE>)>)>
+ ;<COND (<AND <VERB? ASK-ABOUT ASK-FOR SEARCH-FOR>
+ <FSET? ,PRSO ,PERSONBIT>
+ <IN? ,PRSO ,GLOBAL-OBJECTS>>
+ <NOT-HERE-PERSON ,PRSO>
+ <RFATAL>)>
+ <COND (<AND <EQUAL? ,P-ADJN ,W?YOUR ,W?HER ,W?HIS>
+ <T? ,P-NAM>>
+ <RESOLVE-YOUR-HER-HIS>)>
+ <COND (<OR <AND .PRSO? <PRSO-VERB?>>
+ <AND <NOT .PRSO?> <PRSI-VERB?>>>
+ <COND (<SET OBJ <FIND-NOT-HERE .TBL .PRSO?>>
+ <COND (<NOT <==? .OBJ ,NOT-HERE-OBJECT>>
+ <RFATAL>)>)
+ (T
+ <RFALSE>)>)>
+ ;"Here is the default 'cant see any' printer"
+ <TELL !\( CHE ,WINNER ;"You" " can't ">
+ <COND (<VERB? LISTEN> <TELL "hear">)
+ (T <TELL "see">)>
+ <COND (<NOT <CAPITAL-NOUN? ,P-XNAM>>
+ <TELL " any">)>
+ <NOT-HERE-PRINT>
+ <TELL " right here!)" CR>
+ <RFATAL>>
+
+<ROUTINE PRSO-VERB? ()
+ <COND (<VERB? ;ARREST ASK-CONTEXT-ABOUT ASK-CONTEXT-FOR
+ BOARD CLIMB-DOWN CLIMB-UP ;"GO DOWN/UP TO room"
+ DISEMBARK DRESS DESCRIBE ;EXAMINE
+ FIND FOLLOW LEAVE TALK-ABOUT TELL ;"YELL TO person"
+ THROUGH USE WAIT-FOR WALK-TO ;$WHERE>
+ <RTRUE>)
+ (<AND <NOT <==? ,WINNER ,PLAYER>>
+ <VERB? ;BRING GIVE TAKE SSHOW>>
+ <RTRUE>)>>
+
+<ROUTINE PRSI-VERB? ()
+ <COND (<VERB? ASK-ABOUT ASK-FOR SEARCH-FOR ;SSHOOT TAKE-TO TELL-ABOUT ;$WHERE>
+ <RTRUE>)
+ (<NOT <==? ,WINNER ,PLAYER>>
+ <COND (<VERB? ;SBRING SGIVE SHOW>
+ <RTRUE>)
+ (<VERB? SSHOW>
+ <COND (T ;<IN? ,PRSI ,ROOMS> ;"SHOW ME TO MY ROOM"
+ <RTRUE>)>)>)>>
+
+<ROUTINE GEN-TEST (OBJ)
+ <COND (<VISIBLE? .OBJ> ;<IN? .OBJ ,HERE>
+ <RTRUE>)
+ (<CORRIDOR-LOOK .OBJ>
+ <RTRUE>)
+ (<AND <OR <VERB? FOLLOW> <REMOTE-VERB?>>
+ <FSET? .OBJ ,PERSONBIT>
+ <FSET? .OBJ ,SEENBIT>>
+ <RTRUE>)>>
+
+<ROUTINE NOT-SECRET-TEST (OBJ)
+ <COND (<AND <FSET? .OBJ ,SECRETBIT>
+ <NOT <FSET? .OBJ ,SEENBIT>>>
+ <RFALSE>)
+ (T
+ <RTRUE>)>>
+
+<ROUTINE PRUNE (TBL LEN FCN "AUX" (CNT 1) OBJ)
+ <REPEAT ()
+ <SET OBJ <GET/B .TBL .CNT>>
+ <COND (<ZERO? <APPLY .FCN .OBJ>>
+ <DEC LEN>
+ <ELIMINATE .TBL .CNT .LEN>
+ <COND (<NOT <G? .CNT .LEN>> <AGAIN>)>)>
+ <COND (<IGRTR? CNT .LEN> <RETURN>)>>
+ <PUT/B .TBL ,P-MATCHLEN .LEN>
+ .LEN>
+
+<ROUTINE ELIMINATE (TBL CNT N)
+ ;<COND (<NOT <L? .CNT .N>> <RFALSE>)>
+ <REPEAT ()
+ <PUT/B .TBL .CNT <GET/B .TBL <+ 1 .CNT>>>
+ <COND (<IGRTR? CNT .N> <RETURN>)>>>
+
+<GLOBAL P-MOBY-FOUND:OBJECT <>>
+<GLOBAL P-MOBY-FLAG:FLAG <>> "Needed only for ZIL"
+<CONSTANT LAST-OBJECT 0> "ZILCH should stick the # of the last object here"
+
+<ROUTINE MOBY-FIND (TBL "AUX" (OBJ 1) LEN FOO)
+ <SETG P-NAM ,P-XNAM>
+ <SETG P-ADJ ,P-XADJ>
+ <PUT/B .TBL ,P-MATCHLEN 0>
+ %<COND (<GASSIGNED? PREDGEN> ;<NOT <ZERO? <GETB 0 18>>> ;"ZIP case"
+ '<PROG ()
+ <REPEAT ()
+ <COND (<AND <SET FOO <META-LOC .OBJ T>>
+ <SET FOO <THIS-IT? .OBJ>>>
+ <SET FOO <OBJ-FOUND .OBJ .TBL>>)>
+ <COND (<IGRTR? OBJ ,LAST-OBJECT>
+ <RETURN>)>>>)
+ (T ;"ZIL case"
+ '<PROG ()
+ <SETG P-MOBY-FLAG T>
+ <SETG P-TABLE .TBL>
+ <SETG P-SLOCBITS -1>
+ <SET FOO <FIRST? ,ROOMS>>
+ <REPEAT ()
+ <COND (<NOT .FOO> <RETURN>)
+ (T
+ <SEARCH-LIST .FOO .TBL ,P-SRCALL ;T>
+ <SET FOO <NEXT? .FOO>>)>>
+ <COND (T ;<EQUAL? <SET LEN <GET/B .TBL ,P-MATCHLEN>> 0>
+ <DO-SL ,LOCAL-GLOBALS 1 1 ;".TBL T">)>
+ <COND (T ;<EQUAL? <SET LEN <GET/B .TBL ,P-MATCHLEN>> 0>
+ <SEARCH-LIST ,ROOMS .TBL ,P-SRCTOP ;T>)>
+ <SETG P-MOBY-FLAG <>>>)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <SET LEN <GET/B .TBL ,P-MATCHLEN>>
+ <COND (<EQUAL? .LEN 1>
+ <SETG P-MOBY-FOUND <GET/B .TBL 1>>)>
+ .LEN>
+
+<ROUTINE FIND-NOT-HERE (TBL PRSO? "AUX" M-F OBJ LEN CNT (LOCAL 0))
+ ;"Protocol: return T if case was handled and msg TELLed,
+ ,NOT-HERE-OBJECT if 'can't see' msg TELLed,
+ <> if PRSO/PRSI ready to use"
+ ;"Here is where special-case code goes. <MOBY-FIND .TBL> returns
+ number of matches. If 1, then P-MOBY-FOUND is it. One may treat
+ the 0 and >1 cases alike or different. It doesn't matter. Always
+ return FALSE (not handled) if you have resolved the problem."
+ <SET M-F <MOBY-FIND .TBL>>
+ %<DEBUG-CODE
+ <COND (,DBUG
+ <TELL "{Found " N .M-F " objects}" CR>
+ <COND (<NOT <==? 1 .M-F>>
+ <TELL "{Namely: ">
+ <SET CNT 1>
+ <SET LEN <GET/B .TBL ,P-MATCHLEN>>
+ <REPEAT ()
+ <COND (<DLESS? LEN 0> <RETURN>)
+ (T <TELL D <GET/B .TBL .CNT> ", ">)>
+ <INC CNT>>
+ <TELL "}" CR>)>)>>
+ <COND (<G? .M-F 1>
+ <SET CNT 0>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> .M-F>
+ <RETURN>)>
+ <SET OBJ <GET/B .TBL .CNT>>
+ <COND (<GEN-TEST .OBJ>
+ <COND (<G? <SET LOCAL <+ .LOCAL 1>> 1>
+ <RETURN>)
+ (ELSE
+ <SETG P-MOBY-FOUND .OBJ>)>)>>
+ <COND (<EQUAL? .LOCAL 1>
+ <SET M-F 1>)>)>
+ <COND (<==? 1 .M-F>
+ %<DEBUG-CODE
+ <COND (,DBUG <TELL "{Namely: " D ,P-MOBY-FOUND "}" CR>)>>
+ <COND (<AND <NOT <REMOTE-VERB?>>
+ <FSET? ,P-MOBY-FOUND ,SECRETBIT>>
+ <NOT-FOUND ,P-MOBY-FOUND>
+ <RETURN T ;,NOT-HERE-OBJECT>)
+ (<AND <NOT <REMOTE-VERB?>>
+ <NOT <VERB? $CALL>>
+ <NOT <VISIBLE? ,P-MOBY-FOUND>>>
+ <NOT-HERE ,P-MOBY-FOUND>
+ <RETURN T ;,NOT-HERE-OBJECT>)
+ (<T? .PRSO?>
+ ;<SETG OPRSO ,PRSO>
+ <SETG PRSO ,P-MOBY-FOUND>)
+ (T
+ <SETG PRSI ,P-MOBY-FOUND>)>
+ ;<THIS-IS-IT ,P-MOBY-FOUND>
+ <RFALSE>)
+ (<AND <L? 1 .M-F>
+ <FSET? <SET OBJ <GET/B .TBL 1>> ,PERSONBIT>>
+ ;<SET FOUND 0>
+ <SET LEN <PRUNE .TBL <GET/B .TBL ,P-MATCHLEN> ,GEN-TEST>>
+ <COND (<0? .LEN>
+ <RETURN ,NOT-HERE-OBJECT>)
+ (<NOT <1? .LEN>>
+ <WHICH-PRINT 0 .LEN .TBL>
+ <COND (<==? .TBL ,P-PRSO> <SETG P-ACLAUSE ,P-NC1>)
+ (T <SETG P-ACLAUSE ,P-NC2>)>
+ <SETG P-AADJ ,P-ADJ>
+ <SETG P-ANAM ,P-NAM>
+ <ORPHAN <> <>>
+ <SETG P-OFLAG T>
+ <RTRUE>)>
+ %<DEBUG-CODE <COND (,DBUG <TELL "{Corridor: " D .OBJ "}" CR>)>>
+ <COND (<FSET? .OBJ ,SECRETBIT>
+ <NOT-FOUND .OBJ>
+ <RETURN T ;,NOT-HERE-OBJECT>)
+ (<T? .PRSO?>
+ ;<SETG OPRSO ,PRSO>
+ <SETG PRSO .OBJ>)
+ (T
+ <SETG PRSI .OBJ>)>
+ <RFALSE>)
+ (<AND <L? 1 .M-F>
+ <SET OBJ <APPLY <GETP <SET OBJ <GET/B .TBL 1>> ,P?GENERIC>
+ .TBL .M-F ;"?">>>
+ ;"Protocol: returns .OBJ if that's the one to use,
+ ,NOT-HERE-OBJECT if case was handled and msg TELLed,
+ <> if WHICH-PRINT should be called"
+ %<DEBUG-CODE <COND (,DBUG <TELL "{Generic: " D .OBJ "}" CR>)>>
+ <COND (<==? .OBJ ,NOT-HERE-OBJECT>
+ <RTRUE>)
+ (<FSET? .OBJ ,SECRETBIT>
+ <NOT-FOUND .OBJ>
+ <RETURN T ;,NOT-HERE-OBJECT>)
+ (.PRSO?
+ ;<SETG OPRSO ,PRSO>
+ <SETG PRSO .OBJ>)
+ (T
+ <SETG PRSI .OBJ>)>
+ ;<THIS-IS-IT .OBJ>
+ <RFALSE>)
+ (<OR <AND <NOT .PRSO?>
+ <IN? ,PRSO ,HERE>
+ <VERB? ASK-ABOUT ASK-FOR TELL-ABOUT>>
+ <AND .PRSO?
+ <QCONTEXT-GOOD?>
+ <VERB? ASK-CONTEXT-ABOUT ASK-CONTEXT-FOR>>
+ <AND <NOT <==? ,WINNER ,PLAYER>>
+ <VERB? FIND ;WHAT GIVE SGIVE>>>
+ <SET LEN <>>
+ <COND (<NOT <==? ,WINNER ,PLAYER>>
+ <SET LEN ,WINNER>)
+ (<VERB? ASK-ABOUT ASK-FOR TELL-ABOUT>
+ <SET LEN ,PRSO>)
+ (<QCONTEXT-GOOD?>
+ <SET LEN ,QCONTEXT>)
+ ;(<SET OBJ <FIND-FLAG ,HERE ,PERSONBIT ,WINNER ;,PLAYER>>
+ <SET LEN .OBJ>)
+ ;(<VISIBLE? ,FRIEND>
+ <SET LEN ,FRIEND>)
+ ;(T <SET LEN ,GAME>)>
+ <COND (<NOT <EQUAL? .LEN 0 ,PLAYER>>
+ <START-SENTENCE .LEN>
+ <TELL " looks confused. ">)>
+ <TELL "\"I don't know wh">
+ <COND (<0? .M-F>
+ <TELL "at you mean by">
+ <NOT-HERE-PRINT>)
+ (T
+ <TELL "ich">
+ <NOT-HERE-PRINT>
+ <TELL " you mean">)>
+ <TELL "!\"" CR>
+ <RTRUE>)
+ (<NOT .PRSO?>
+ <TELL CHE ,WINNER " wouldn't find">
+ <COND (<NOT <CAPITAL-NOUN? ,P-XNAM>>
+ <TELL " any">)>
+ <NOT-HERE-PRINT>
+ <TELL " there." CR>
+ <RTRUE>)
+ (T ,NOT-HERE-OBJECT)>>
+
+<ROUTINE NOT-HERE-PRINT ()
+ ;<TELL " any">
+ <COND (<OR ,P-OFLAG ,P-MERGED>
+ <COND (<T? ,P-XADJ>
+ <TELL !\ >
+ <PRINTB ,P-XADJN>)>
+ <COND (<T? ,P-XNAM>
+ <TELL !\ >
+ <PRINTB ,P-XNAM>)>)
+ (<EQUAL? ,PRSO ,NOT-HERE-OBJECT>
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L <>>
+ ;<BUFFER-PRINT <GET ,P-ITBL ,P-NC1> <GET ,P-ITBL ,P-NC1L> <>>)
+ (T
+ <CLAUSE-PRINT ,P-NC2 ,P-NC2L <>>
+ ;<BUFFER-PRINT <GET ,P-ITBL ,P-NC2> <GET ,P-ITBL ,P-NC2L> <>>)>>
+
+%<DEBUG-CODE
+<ROUTINE TELL-D-LOC (OBJ)
+ <TELL D .OBJ>
+ <COND (<IN? .OBJ ,GLOBAL-OBJECTS> <TELL "(gl)">)
+ (<IN? .OBJ ,LOCAL-GLOBALS> <TELL "(lg)">)
+ (<IN? .OBJ ,ROOMS> <TELL "(rm)">)>
+ <COND (<EQUAL? .OBJ ,TURN ,INTNUM>
+ <TELL !\( N ,P-NUMBER !\)>)>>>
+
+<ROUTINE SEE-VERB? ()
+ <VERB? ANALYZE SANALYZE CHASTISE ;COUNT EXAMINE FIND
+ ;INVENTORY LOOK LOOK-BEHIND LOOK-DOWN LOOK-INSIDE LOOK-ON
+ LOOK-OUTSIDE LOOK-THROUGH LOOK-UNDER LOOK-UP
+ READ SEARCH SEARCH-FOR SSEARCH-FOR>>
+
+<ROUTINE FIX-HIM-HER-IT (PRON OBJ)
+ <COND (<OR <ZERO? .OBJ>
+ <AND <NOT <ACCESSIBLE? .OBJ>>
+ <OR <AND <==? .PRON ,PRSI> <NOT <PRSI-VERB?>>>
+ <AND <==? .PRON ,PRSO> <NOT <PRSO-VERB?>>>>>>
+ <COND (<EQUAL? 0 .OBJ ,PRSI>
+ <FAKE-ORPHAN>)
+ (T <NOT-HERE .OBJ>)>
+ <RFALSE>)
+ (T
+ <COND (<==? ,PRSO .PRON>
+ <COND (<==? .PRON ,IT>
+ <PUT ,P-ADJW 0 <GET ,P-IT-WORDS 0>>
+ <PUT ,P-NAMW 0 <GET ,P-IT-WORDS 1>>)>
+ <SETG PRSO .OBJ>
+ <TELL-I-ASSUME .OBJ>)>
+ <COND (<==? ,PRSI .PRON>
+ <COND (<==? .PRON ,IT>
+ <PUT ,P-ADJW 1 <GET ,P-IT-WORDS 0>>
+ <PUT ,P-NAMW 1 <GET ,P-IT-WORDS 1>>)>
+ <SETG PRSI .OBJ>
+ <TELL-I-ASSUME .OBJ>)>
+ <RTRUE>)>>
+
+<ROUTINE FAKE-ORPHAN ("AUX" TMP)
+ <ORPHAN ,P-SYNTAX <>>
+ <TELL "[Please be specific: wh">
+ <COND ;(<VERB? WALK WALK-TO>
+ <TELL "ere">)
+ (<==? <GETB ,P-SYNTAX ,P-SFWIM1> ,PERSONBIT>
+ <TELL "om">)
+ (T <TELL "at">)>
+ <TELL " do you want to ">
+ <VERB-PRINT>
+ ;<SET TMP <GET ,P-OTBL ,P-VERBN>>
+ ;<COND (<==? .TMP 0> <TELL "tell">)
+ (<0? <GETB ,P-VTBL 2>>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>
+ <PUTB ,P-VTBL 2 0>)>
+ ;<PREP-PRINT <GETB ,P-SYNTAX ,P-SPREP2>>
+ <SETG P-OFLAG T>
+ <SETG P-WON <>>
+ ;<SETG CLOCK-WAIT T>
+ <TELL "?]" CR>>
+
+<GLOBAL NOW-PRSI:FLAG <>>
+
+<ROUTINE PERFORM (A "OPTIONAL" (O <>) (I <>) "AUX" V OA OO OI X)
+ %<DEBUG-CODE <COND (,DBUG
+ <TELL "{Perform: ">
+ %<COND (<GASSIGNED? PREDGEN> '<TELL N .A>)
+ (T '<PRINC <NTH ,ACTIONS <+ <* .A 2> 1>>>)>
+ <COND (.O
+ <TELL !\/>
+ <COND (<EQUAL? .A ,V?WALK ;,V?FACE> <TELL N .O>)
+ (T <TELL-D-LOC .O>)>)>
+ <COND (.I
+ <TELL !\/>
+ <TELL-D-LOC .I>)>
+ <TELL "}" CR>)>>
+ <SET OA ,PRSA>
+ <SET OO ,PRSO>
+ <SET OI ,PRSI>
+ <SETG PRSA .A>
+ <SETG PRSI .I>
+ <SETG PRSO .O>
+ <COND (<AND <ZERO? ,LIT>
+ <SEE-VERB?>
+ ;<NOT <DOBJ? GHOST-NEW COSTUME BLOWGUN>>
+ ;<NOT <IOBJ? GHOST-NEW COSTUME BLOWGUN>>>
+ <TOO-DARK>
+ <RFATAL>)
+ (<NOT <VERB? WALK ;FACE>>
+ <COND (<EQUAL? ,IT ,PRSI ,PRSO>
+ <COND (<NOT <FIX-HIM-HER-IT ,IT ,P-IT-OBJECT>>
+ <RFATAL>)>)>
+ <COND (<EQUAL? ,HER ,PRSI ,PRSO>
+ <COND (<NOT <FIX-HIM-HER-IT ,HER ,P-HER-OBJECT>>
+ <RFATAL>)>)>
+ <COND (<EQUAL? ,HIM ,PRSI ,PRSO>
+ <COND (<NOT <FIX-HIM-HER-IT ,HIM ,P-HIM-OBJECT>>
+ <RFATAL>)>)>)>
+ <SET V <>>
+ <COND (<AND <NOT <EQUAL? .A ,V?WALK ;,V?FACE>>
+ <EQUAL? ,NOT-HERE-OBJECT ,PRSO ,PRSI>>
+ <SET V <D-APPLY "Not Here" ,NOT-HERE-OBJECT-F>>
+ <COND (.V
+ <SETG P-WON <>>
+ ;<SETG CLOCK-WAIT T>)>)>
+ <THIS-IS-IT ,PRSI>
+ <THIS-IS-IT ,PRSO>
+ <COND (<NOT <EQUAL? ,WINNER ,PLAYER>>
+ <THIS-IS-IT ,WINNER>)>
+ <SET O ,PRSO>
+ <SET I ,PRSI>
+ %<DEBUG-CODE <COND (,DBUG
+ <TELL !\{ D ,WINNER "=}"> ;"extra output for next (...)")>>
+ <COND (<ZERO? .V>
+ <SET V <D-APPLY "Actor" <GETP ,WINNER ,P?ACTION>
+ ,M-WINNER>>)>
+ <COND (<ZERO? .V>
+ <SET V <D-APPLY "Room (M-BEG)"
+ <GETP <COND (<IN? ,WINNER ,CAR> ,CAR)
+ (T ,HERE)> ;<LOC ,WINNER>
+ ,P?ACTION>
+ ,M-BEG>>)>
+ <COND (<ZERO? .V>
+ <SET V <D-APPLY "Preaction" <GET ,PREACTIONS .A>>>)>
+ <SETG NOW-PRSI 1>
+ ;<COND (<AND <ZERO? .V>
+ .I ;"This new clause applies CONTFCN to PRSI, BM 2/85"
+ <NOT <EQUAL? .A ,V?WALK>>
+ <LOC .I>>
+ <SET V <GETP <LOC .I> ,P?CONTFCN>>
+ <COND (.V
+ <SET V <APPLY .V ,M-CONT>>)>)>
+ <COND (<AND <ZERO? .V>
+ .I>
+ <SET V <D-APPLY "PRSI" <GETP .I ,P?ACTION>>>)>
+ <SETG NOW-PRSI 0>
+ ;<COND (<AND <ZERO? .V>
+ .O
+ <NOT <EQUAL? .A ,V?WALK ;,V?FACE>>
+ <LOC .O>>
+ <SET V <GETP <LOC .O> ,P?CONTFCN>>
+ <COND (.V
+ <SET V <APPLY .V ,M-CONT>>)>)>
+ <COND (<AND <ZERO? .V>
+ .O
+ <NOT <EQUAL? .A ,V?WALK ;,V?FACE>>>
+ <SET V <D-APPLY "PRSO" <GETP .O ,P?ACTION>>>
+ ;<COND (.V <THIS-IS-IT .O>)>)>
+ <COND (<ZERO? .V>
+ <SET V <D-APPLY <> <GET ,ACTIONS .A>>>)>
+ ;<COND (<NOT <==? .V ,M-FATAL>>
+ <COND (<OR ;<VERB? SAVE RESTORE> <NOT <GAME-VERB?>>>
+ <SET V <D-APPLY "Room (M-END)"
+ <GETP ,HERE ;<LOC ,WINNER> ,P?ACTION>
+ ,M-END>>)>)>
+ <SETG PRSA .OA>
+ <SETG PRSO .OO>
+ <SETG PRSI .OI>
+ .V>
+
+<ROUTINE D-APPLY (STR FCN "OPTIONAL" (FOO <>) "AUX" RES)
+ <COND (<T? .FCN>
+ %<DEBUG-CODE <COND (,DBUG
+ <COND (<ZERO? .STR>
+ <TELL "{Action:}" CR>)
+ (T <TELL !\{ .STR ": ">)>)>>
+ <COND (<=? .STR "Container">
+ <SET FOO ,M-CONT>)>
+ <COND (.FOO <SET RES <APPLY .FCN .FOO>>)
+ (T <SET RES <APPLY .FCN>>)>
+ %<DEBUG-CODE <COND (<AND ,DBUG .STR>
+ <COND (<==? .RES ,M-FATAL>
+ <TELL "Fatal}" CR>)
+ (<ZERO? .RES>
+ <TELL "Not handled}" CR>)
+ (T <TELL "Handled}" CR>)>)>>
+ .RES)>>
+
+<CONSTANT P-PROMPT-START 4>
+<GLOBAL P-PROMPT:NUMBER 4>
+
+<ROUTINE I-PROMPT ("OPTIONAL" (GARG <>))
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "{I-PROMPT:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <SETG P-PROMPT <- ,P-PROMPT 1>>
+ %<DEBUG-CODE <COND (,IDEBUG <TELL "(0)}" CR>)>>
+ <RFALSE>>
+
+<ROUTINE BUZZER-WORD? (WRD PTR)
+ <COND (<OR <QUESTION-WORD? .WRD>
+ <NAUGHTY-WORD? .WRD>
+ <NUMBER-WORD? .WRD>>
+ <PUT ,OOPS-TABLE ,O-PTR .PTR>
+ <RTRUE>)>>
+
+<BUZZ WHAT WHEN WHERE WHO WHY \(SOME
+ ;"ANY WHAT\'S WHEN\'S WHERE\'S WHO\'S WHY\'S">
+
+;<GLOBAL QUESTION-WORD-PAIR-TABLE
+ <PLTABLE <PTABLE <VOC "AREN" BUZZ> <VOC "T" BUZZ>>
+ <PTABLE <VOC "COULDN" BUZZ> <VOC "T" <>>>
+ <PTABLE <VOC "DIDN" BUZZ> <VOC "T" <>>>
+ <PTABLE <VOC "DON" <>> <VOC "T" <>>>
+ <PTABLE <VOC "HASN" BUZZ> <VOC "T" <>>>
+ <PTABLE <VOC "HAVEN" BUZZ> <VOC "T" <>>>
+ <PTABLE <VOC "HE" BUZZ ;NOUN> <VOC "S" <>>>
+ <PTABLE <VOC "I" <>> <VOC "LL" BUZZ>>
+ <PTABLE <VOC "I" <>> <VOC "M" BUZZ>>
+ <PTABLE <VOC "I" <>> <VOC "VE" BUZZ>>
+ <PTABLE <VOC "ISN" BUZZ> <VOC "T" <>>>
+ <PTABLE <VOC "IT" <>> <VOC "S" <>>>
+ <PTABLE <VOC "LET" BUZZ> <VOC "S" <>>>
+ ;<PTABLE <VOC "SHAN" BUZZ> <VOC "T" <>>>
+ <PTABLE <VOC "SHE" BUZZ ;NOUN> <VOC "S" <>>>
+ <PTABLE <VOC "SHOULD" BUZZ> <VOC "T" <>>>
+ <PTABLE <VOC "THAT" BUZZ> <VOC "S" <>>>
+ <PTABLE <VOC "THEY" BUZZ> <VOC "RE" BUZZ>>
+ <PTABLE <VOC "WASN" BUZZ> <VOC "T" <>>>
+ <PTABLE <VOC "WE" <>> <VOC "RE" BUZZ>>
+ <PTABLE <VOC "WEREN" BUZZ> <VOC "T" <>>>
+ <PTABLE <VOC "WON" BUZZ> <VOC "T" <>>>
+ <PTABLE <VOC "WOULDN" BUZZ> <VOC "T" <>>>
+ <PTABLE <VOC "YOU" <>> <VOC "RE" BUZZ>>>>
+
+<GLOBAL QWP1-TABLE
+ <PLTABLE <VOC "AREN" BUZZ>
+ <VOC "COULDN" BUZZ>
+ <VOC "DIDN" BUZZ>
+ <VOC "DON" <>>
+ <VOC "HASN" BUZZ>
+ <VOC "HAVEN" BUZZ>
+ <VOC "HE" BUZZ ;NOUN>
+ <VOC "I" <>>
+ <VOC "I" <>>
+ <VOC "I" <>>
+ <VOC "I" <>>
+ <VOC "ISN" BUZZ>
+ <VOC "IT" <>>
+ <VOC "LET" BUZZ>
+ ;<VOC "SHAN" BUZZ>
+ <VOC "SHE" BUZZ ;NOUN>
+ <VOC "SHOULD" BUZZ>
+ <VOC "THAT" BUZZ>
+ <VOC "THEY" BUZZ>
+ <VOC "WASN" BUZZ>
+ <VOC "WE" <>>
+ <VOC "WE" <>>
+ <VOC "WEREN" BUZZ>
+ <VOC "WON" BUZZ>
+ <VOC "WOULDN" BUZZ>
+ <VOC "YOU" <>>>>
+
+<GLOBAL QWP2-TABLE
+ <PLTABLE <VOC "T" BUZZ>
+ <VOC "T" <>>
+ <VOC "T" <>>
+ <VOC "T" <>>
+ <VOC "T" <>>
+ <VOC "T" <>>
+ <VOC "S" <>>
+ <VOC "D" <>>
+ <VOC "LL" BUZZ>
+ <VOC "M" BUZZ>
+ <VOC "VE" BUZZ>
+ <VOC "T" <>>
+ <VOC "S" <>>
+ <VOC "S" <>>
+ ;<VOC "T" <>>
+ <VOC "S" <>>
+ <VOC "T" <>>
+ <VOC "S" <>>
+ <VOC "RE" BUZZ>
+ <VOC "T" <>>
+ <VOC "RE" BUZZ>
+ <VOC "LL" BUZZ>
+ <VOC "T" <>>
+ <VOC "T" <>>
+ <VOC "T" <>>
+ <VOC "RE" BUZZ>>>
+
+<GLOBAL QUESTION-WORD-TABLE
+ <PLTABLE <VOC "AM" BUZZ>
+ <VOC "ARE" BUZZ>
+ <VOC "CAN" BUZZ>
+ <VOC "COULD" BUZZ>
+ <VOC "DID" BUZZ>
+ <VOC "DO" BUZZ>
+ <VOC "HAS" BUZZ>
+ <VOC "HAVE" BUZZ>
+ <VOC "HOW" BUZZ>
+ <VOC "IS" BUZZ>
+ <VOC "LIKE" BUZZ>
+ <VOC "MAY" BUZZ>
+ <VOC "SHALL" BUZZ>
+ <VOC "SHOULD" BUZZ>
+ <VOC "WANT" BUZZ>
+ <VOC "WAS" BUZZ>
+ <VOC "WERE" BUZZ>
+ <VOC "WHEN" BUZZ>
+ <VOC "WHICH" BUZZ>
+ <VOC "WHY" BUZZ>
+ ;<VOC "WILL" BUZZ>
+ <VOC "WOULD" BUZZ>>>
+
+<GLOBAL SOMETHING " (something).]|">
+<GLOBAL QUESTION-WORD-COUNT:NUMBER 2>
+
+<ROUTINE QUESTION-WORD? (WORD "OPTIONAL" (DO-IT <>))
+ <COND (<EQUAL? .WORD ,W?\(SOME>
+ <TELL "[Type a real word instead of" ,SOMETHING>
+ <RTRUE>)
+ (<EQUAL? .WORD ,W?WHERE>
+ <TO-DO-X-USE-Y "locate" "FIND">
+ <RTRUE>)
+ (<OR <EQUAL? .WORD ,W?WHAT ,W?WHO ,W?WHEN>
+ <EQUAL? .WORD ,W?WHY>>
+ <TO-DO-X-USE-Y "ask about" "TELL ME ABOUT">
+ <RTRUE>)
+ (<OR <T? .DO-IT> <ZMEMQ .WORD ,QUESTION-WORD-TABLE>>
+ <TELL "[Please use commands">
+ <SETG QUESTION-WORD-COUNT <+ 1 ,QUESTION-WORD-COUNT>>
+ <COND (<ZERO? <MOD ,QUESTION-WORD-COUNT 4 ;9>>
+ <TELL
+" to tell the computer what you want to do in the story.
+Here are some commands:|
+ GO TO MY ROOM|
+ LOOK UNDER THE RUG|
+ MADAM, DESCRIBE THE GHOST|
+Now you can try again">)
+ (T <TELL ", not statements or questions">)>
+ <TELL ".]" CR>)>>
+
+<ROUTINE TO-DO-X-USE-Y (STR1 STR2)
+ <TELL
+"[To " .STR1 " something, use the command: " .STR2 ,SOMETHING>
+ <RTRUE>>
+
+<GLOBAL NUMBER-WORD-TABLE
+ <PLTABLE <VOC "ZERO" BUZZ>
+ <VOC "ONE" BUZZ>
+ <VOC "TWO" BUZZ>
+ <VOC "THREE" BUZZ>
+ <VOC "FOUR" BUZZ>
+ <VOC "FIVE" BUZZ>
+ <VOC "SIX" BUZZ>
+ <VOC "SEVEN" BUZZ>
+ <VOC "EIGHT" BUZZ>
+ <VOC "NINE" BUZZ>
+ <VOC "TEN" BUZZ>
+ <VOC "ELEVEN" BUZZ>
+ <VOC "TWELVE" BUZZ>
+ ;"<VOC 'THIRTEEN' BUZZ>
+ <VOC 'FOURTEEN' BUZZ>
+ <VOC 'FIFTEEN' BUZZ>
+ <VOC 'SIXTEEN' BUZZ>
+ <VOC 'SEVENT' BUZZ>
+ <VOC 'EIGHTEEN' BUZZ>
+ <VOC 'NINETEEN' BUZZ>"
+ <VOC "TWENTY" BUZZ>
+ <VOC "THIRTY" BUZZ>
+ <VOC "FORTY" BUZZ>
+ <VOC "FIFTY" BUZZ>
+ <VOC "SIXTY" BUZZ>
+ ;<VOC "EIGHTY" BUZZ>
+ ;<VOC "NINETY" BUZZ>
+ <VOC "HUNDRED" BUZZ>
+ <VOC "THOUSAND" BUZZ>
+ ;<VOC "MILLION" BUZZ>
+ ;<VOC "BILLION" BUZZ>>>
+
+<ROUTINE NUMBER-WORD? (WRD)
+ <COND (<ZMEMQ .WRD ,NUMBER-WORD-TABLE>
+ <TELL "[Use numerals for numbers, for example \"10.\"]" CR>
+ <RTRUE>)>>
+
+<GLOBAL NAUGHTY-WORD-TABLE
+ <PLTABLE <VOC "ASSHOLE" BUZZ>
+ <VOC "BASTARD" BUZZ>
+ <VOC "BITCH" BUZZ>
+ ;<VOC "CHOMP" BUZZ>
+ ;<VOC "CHOMPING" BUZZ>
+ <VOC "COCK" BUZZ>
+ <VOC "COCKSUCKER" BUZZ>
+ <VOC "CRAP" BUZZ>
+ <VOC "CUNT" BUZZ>
+ <VOC "CURSE" BUZZ>
+ ;<VOC "CURSES" BUZZ>
+ <VOC "CUSS" BUZZ>
+ <VOC "DAMN" BUZZ>
+ <VOC "DAMNED" BUZZ>
+ <VOC "DARN" BUZZ>
+ <VOC "FUCK" BUZZ>
+ <VOC "FUCKED" BUZZ>
+ <VOC "FUCKING" BUZZ>
+ <VOC "FUDGE" BUZZ>
+ <VOC "GODDAMN" BUZZ>
+ <VOC "HELL" BUZZ>
+ <VOC "PEE" BUZZ>
+ <VOC "PISS" BUZZ>
+ <VOC "SCREW" BUZZ>
+ <VOC "SHIT" BUZZ>
+ <VOC "SHITHEAD" BUZZ>
+ <VOC "SUCK" BUZZ>
+ <VOC "SUCKS" BUZZ>>>
+
+<ROUTINE NAUGHTY-WORD? (WORD)
+ <COND (<ZMEMQ .WORD ,NAUGHTY-WORD-TABLE>
+ <TELL !\[ <PICK-ONE-NEW ,OFFENDED> !\] CR>)>>
+
+<GLOBAL OFFENDED
+ <LTABLE 0
+ "What charming language!"
+ "Computers aren't impressed by naughty words!"
+ "You ought to be ashamed of yourself!"
+ "Hey, save that talk for the locker room!"
+ "Step outside and say that!"
+ "And so's your old man!">>
+
+" Grovel down the input finding the verb, prepositions, and noun phrases.
+ 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 phrase lookup."
+
+<BUZZ AGAIN G OOPS>
+<GLOBAL BEG-PARDON "I beg your pardon?">
+
+<ROUTINE NOT-THAT-WAY (STR)
+ <TELL "[You can't use " .STR " that way.]" CR>>
+
+<ROUTINE PARSER ("AUX" (PTR ,P-LEXSTART) WRD (VAL 0) (VERB <>) (OF-FLAG <>)
+ LEN (DIR <>) (NW 0) (LW 0) (CNT -1) OMERGED OWINNER
+ TMP)
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN> <RETURN>)
+ (T
+ <COND (<NOT ,P-OFLAG>
+ <PUT ,P-OTBL .CNT <GET ,P-ITBL .CNT>>)>
+ <PUT ,P-ITBL .CNT 0>)>>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>
+ <SETG P-XNAM <>>
+ <SETG P-XADJ <>>
+ <SETG P-XADJN <>>
+ ;<SETG P-ADVERB <>>
+ <COND (<ZERO? ,P-OFLAG>
+ <PUT ,P-NAMW 0 <>>
+ <PUT ,P-NAMW 1 <>>
+ <PUT ,P-ADJW 0 <>>
+ <PUT ,P-ADJW 1 <>>
+ <PUT ,P-OFW 0 <>>
+ <PUT ,P-OFW 1 <>>)>
+ <SETG P-PRSA-WORD <>>
+ <SET OMERGED ,P-MERGED>
+ <SETG P-MERGED <>>
+ <SETG P-END-ON-PREP <>>
+ <PUT/B ,P-PRSO ,P-MATCHLEN 0>
+ <PUT/B ,P-PRSI ,P-MATCHLEN 0>
+ <PUT/B ,P-BUTS ,P-MATCHLEN 0>
+ <SET OWINNER ,WINNER>
+ <COND (<AND <NOT ,QUOTE-FLAG> <N==? ,WINNER ,PLAYER>>
+ <SETG WINNER ,PLAYER>
+ <COND (<NOT <FSET? <LOC ,WINNER> ,VEHBIT>>
+ ;<SETG OHERE ,HERE>
+ <SETG HERE <LOC ,WINNER>>)>
+ <SETG LIT <LIT? ;,HERE>>)>
+ <COND (<NOT <ZERO? ,RESERVE-PTR>>
+ <SET PTR ,RESERVE-PTR>
+ <STUFF ,P-LEXV ,RESERVE-LEXV>
+ <INBUF-STUFF ,P-INBUF ,RESERVE-INBUF>
+ <COND (<AND <NOT <0? ,VERBOSITY>>
+ <==? ,PLAYER ,WINNER>>
+ <CRLF>)>
+ <SETG RESERVE-PTR <>>
+ ;<SETG P-CONT <>>)
+ (<NOT <ZERO? ,P-CONT>>
+ <SET PTR ,P-CONT>
+ ;<SETG P-CONT <>>
+ <COND (<AND <NOT <0? ,VERBOSITY>>
+ <==? ,PLAYER ,WINNER>>
+ <CRLF>)>
+ ;<COND (<NOT <VERB? ASK TELL SAY>> <CRLF>)>)
+ (T
+ <SETG WINNER ,PLAYER>
+ <SETG QUOTE-FLAG <>>
+ <COND (<ZERO? <GET ,OOPS-TABLE ,O-PTR>>
+ <PUT ,OOPS-TABLE ,O-END <>>)>
+ <COND (<NOT <FSET? <LOC ,WINNER> ,VEHBIT>>
+ ;<SETG OHERE ,HERE>
+ <SETG HERE <LOC ,WINNER>>)>
+ <SETG LIT <LIT? ;,HERE>>
+ <FCLEAR ,IT ,TOUCHBIT> ;"to prevent pronouns w/o referents"
+ <FCLEAR ,HER ,TOUCHBIT>
+ <FCLEAR ,HIM ,TOUCHBIT>
+ ;<FCLEAR,THEM ,TOUCHBIT>
+ <COND (<NOT <0? ,VERBOSITY>>
+ ;<NOT ,SUPER-BRIEF>
+ <CRLF>)>
+ <COND (<AND ,P-PROMPT <ZERO? ,P-OFLAG> <ZERO? ,AWAITING-REPLY>>
+ <COND (<EQUAL? ,P-PROMPT ,P-PROMPT-START>
+ <TELL "What would you like to do?">)
+ (<L? <SETG P-PROMPT <- ,P-PROMPT 1>> 1>
+ <TELL
+"[You won't see \"What next?\" any more.]|
+">)
+ (T <TELL "What next?">)>
+ <CRLF>)>
+ %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '<PROG ()
+ <USL>
+ <TELL !\>>>)
+ (T
+ '<TELL !\>>)>
+ <READ ,P-INBUF ,P-LEXV>)>
+ <SETG P-LEN <GETB ,P-LEXV ,P-LEXWORDS>>
+ ;<PUT ,P-LEXV <+ 1 <* ,P-LEN ,P-LEXELEN>> 0> ;"for NW in SNARFEM"
+ <COND (<AND <==? ,W?QUOTE <GET ,P-LEXV .PTR>>
+ <QCONTEXT-GOOD?>> ;"Is quote first input token?"
+ <SET PTR <+ .PTR ,P-LEXELEN>> ;"If so, ignore it."
+ <SETG P-LEN <- ,P-LEN 1>>)>
+ <COND (<==? ,W?THEN <GET ,P-LEXV .PTR>> ;"Is THEN first input word?"
+ <SET PTR <+ .PTR ,P-LEXELEN>> ;"If so, ignore it."
+ <SETG P-LEN <- ,P-LEN 1>>)>
+ <COND (<AND <L? 1 ,P-LEN>
+ <EQUAL? <GET ,P-LEXV .PTR>
+ ,W?YOU> ;"Is this the 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 (<AND <L? 1 ,P-LEN>
+ <EQUAL? <GET ,P-LEXV .PTR>
+ ,W?GO ,W?TO> ;"Is this the 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 (<0? ,P-LEN>
+ <TELL !\[ ,BEG-PARDON "]" CR>
+ <RFALSE>)
+ (<EQUAL? <GET ,P-LEXV .PTR> ,W?OOPS>
+ <COND (<EQUAL? <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>
+ ,W?PERIOD ,W?COMMA ,W?\!>
+ <SET PTR <+ .PTR ,P-LEXELEN>>
+ <SETG P-LEN <- ,P-LEN 1>>)>
+ <COND (<NOT <G? ,P-LEN 1>>
+ <NOT-THAT-WAY "OOPS">
+ <RFALSE>)
+ (<SET VAL <GET ,OOPS-TABLE ,O-PTR>>
+ <COND (<AND <G? ,P-LEN 2>
+ ;<NOT <FIX-POSSESSIVES .PTR
+ <+ .PTR
+ <* ,P-LEXELEN 3>>
+ ,P-LEXELEN>>>
+ <TELL
+"[Warning: only the first word after OOPS is used.]" CR>)>
+ <PUT ,AGAIN-LEXV .VAL <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>
+ ;<COND (<G? ,P-LEN 2>
+ )>
+ <SETG WINNER .OWINNER> ;"Fixes OOPS w/chars"
+ <SET PTR <+ <* .PTR ,P-LEXELEN> 6>>
+ <INBUF-ADD <GETB ,P-LEXV .PTR>
+ <GETB ,P-LEXV <+ .PTR 1>>
+ <+ <* .VAL ,P-LEXELEN> 3>>
+ ;<COND (<G? ,P-LEN 2>
+ )>
+ <STUFF ,P-LEXV ,AGAIN-LEXV>
+ <SETG P-LEN <GETB ,P-LEXV ,P-LEXWORDS>>
+ <SET PTR <GET ,OOPS-TABLE ,O-START>>
+ <INBUF-STUFF ,P-INBUF ,OOPS-INBUF>
+ <SETG OOPS-PRINT T>
+ <PRINT-LEXV .PTR>
+ <SETG OOPS-PRINT <>>)
+ (T
+ <PUT ,OOPS-TABLE ,O-END <>>
+ <TELL "[There was no word to replace!]" CR>
+ <RFALSE>)>)
+ (<ZERO? ,P-CONT>
+ <PUT ,OOPS-TABLE ,O-END <>>)>
+ <SETG P-CONT <>>
+ <COND (<EQUAL? <GET ,P-LEXV .PTR> ,W?AGAIN ,W?G>
+ <COND (<ZERO? <GETB ,OOPS-INBUF 1>>
+ <TELL "[What do you want to do again?]" CR>
+ <RFALSE>)
+ (<NOT <ZERO? ,P-OFLAG>>
+ <NOT-THAT-WAY "AGAIN">
+ <RFALSE>)
+ (<NOT ,P-WON> ;<T? ,CLOCK-WAIT>
+ <TELL "[That would just repeat a mistake!]" CR>
+ <RFALSE>)
+ (<G? ,P-LEN 1>
+ <COND (<OR <EQUAL? <SET CNT <GET ,P-LEXV
+ <+ .PTR ,P-LEXELEN>>>
+ ,W?PERIOD ,W?COMMA ,W?THEN>
+ <EQUAL? .CNT ,W?AND ,W?\! ,W??>>
+ <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>
+ <STUFF ,RESERVE-LEXV ,P-LEXV>
+ <INBUF-STUFF ,RESERVE-INBUF ,P-INBUF>
+ <SETG RESERVE-PTR .PTR>)
+ (T
+ <SETG RESERVE-PTR <>>)>
+ ;<SETG P-LEN <GETB ,AGAIN-LEXV ,P-LEXWORDS>>
+ <SETG WINNER .OWINNER>
+ <SETG P-MERGED .OMERGED>
+ <INBUF-STUFF ,P-INBUF ,OOPS-INBUF>
+ <STUFF ,P-LEXV ,AGAIN-LEXV>
+ <SET CNT -1>
+ <SET DIR ,AGAIN-DIR>
+ <REPEAT ()
+ <COND (<IGRTR? CNT ,P-ITBLLEN> <RETURN>)
+ (T <PUT ,P-ITBL .CNT <GET ,P-OTBL .CNT>>)>>)
+ (T
+ <SETG P-NUMBER -1>
+ <SET LEN <+ .PTR <* ,P-LEXELEN <GETB ,P-LEXV ,P-LEXWORDS>>>>
+ <COND (<==? T <FIX-POSSESSIVES .PTR .LEN>>
+ <RFALSE>)>
+ <STUFF ,AGAIN-LEXV ,P-LEXV>
+ <INBUF-STUFF ,OOPS-INBUF ,P-INBUF>
+ <PUT ,OOPS-TABLE ,O-START .PTR>
+ <PUT ,OOPS-TABLE ,O-LENGTH <* 4 ,P-LEN>>
+ <COND (<ZERO? <GET ,OOPS-TABLE ,O-END>>
+ <SET LEN <* 2 .LEN>>
+ <PUT ,OOPS-TABLE ,O-END <+ <GETB ,P-LEXV <- .LEN 1>>
+ <GETB ,P-LEXV <- .LEN 2>>>>)>
+ <SETG RESERVE-PTR <>>
+ <SET LEN ,P-LEN>
+ <SETG P-DIRECTION <>>
+ <SETG P-NCN 0>
+ <SETG P-GETFLAGS 0>
+ ;"3/25/83: Next statement added."
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <REPEAT ()
+ <COND (<L? <SETG P-LEN <- ,P-LEN 1>> 0>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)
+ (<AND <SET WRD <GET ,P-LEXV .PTR>>
+ <BUZZER-WORD? .WRD .PTR>>
+ <RFALSE>)
+ (<OR <T? .WRD>
+ <SET WRD <NUMBER? .PTR>>
+ <SET WRD <NAME? .PTR>>>
+ <COND (<0? ,P-LEN> <SET NW 0>)
+ (T <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>)>
+ <COND (<AND <==? .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>
+ <ZERO? .VERB>
+ <ZERO? ,QUOTE-FLAG>>
+ <PUT ,P-ITBL ,P-VERB ,ACT?TELL>
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <SET WRD ,W?QUOTE>)>
+ <COND (<AND <EQUAL? .WRD ,W?PERIOD>
+ <OR <EQUAL? .LW ,W?MRS ,W?MR ,W?MS>
+ <EQUAL? .LW ,W?DR ;,W?LT>>>
+ <SET LW 0>)
+ (<OR <EQUAL? .WRD ,W?THEN ,W?PERIOD ,W?QUOTE>
+ <EQUAL? .WRD ,W?\! ,W??>>
+ <COND (<EQUAL? .WRD ,W?QUOTE>
+ <COND (<NOT <ZERO? ,QUOTE-FLAG>>
+ <SETG QUOTE-FLAG <>>)
+ (T <SETG QUOTE-FLAG T>)>)>
+ <OR <0? ,P-LEN>
+ <SETG P-CONT <+ .PTR ,P-LEXELEN>>>
+ <PUTB ,P-LEXV ,P-LEXWORDS ,P-LEN>
+ <RETURN>)
+ (<AND <SET VAL
+ <WT? .WRD
+ ,PS?DIRECTION
+ ,P1?DIRECTION>>
+ <EQUAL? .VERB <> ,ACT?HEAD ;WALK>
+ <OR <==? .LEN 1>
+ <AND <==? .LEN 2>
+ <EQUAL? .VERB ,ACT?HEAD ;WALK>>
+ <AND <EQUAL? .NW
+ ,W?THEN ,W?PERIOD ,W?QUOTE>
+ <G? .LEN 1 ;2>>
+ <AND <EQUAL? .NW ,W?\! ,W??>
+ <G? .LEN 1 ;2>>
+ <AND ,QUOTE-FLAG
+ <==? .LEN 2>
+ <EQUAL? .NW ,W?QUOTE>>
+ <AND <G? .LEN 2>
+ <EQUAL? .NW ,W?COMMA ,W?AND>>>>
+ ;<COND (<ZERO? ,P-PRSA-WORD>
+ <SETG P-PRSA-WORD .WRD>)>
+ <SET DIR .VAL>
+ <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>
+ <SET VERB .VAL>
+ <PUT ,P-ITBL ,P-VERB .VAL>
+ <PUT ,P-ITBL ,P-VERBN ,P-VTBL>
+ <PUT ,P-VTBL 0 .WRD>
+ <PUTB ,P-VTBL 2 <GETB ,P-LEXV
+ <SET TMP
+ <+ <* .PTR 2> 2>>>>
+ <PUTB ,P-VTBL 3 <GETB ,P-LEXV <+ .TMP 1>>>)
+ (<OR <SET VAL <WT? .WRD ,PS?PREPOSITION 0>>
+ <AND <OR <EQUAL? .WRD ,W?ALL ,W?ONE ,W?A>
+ ;<EQUAL? .WRD ,W?BOTH>
+ <WT? .WRD ,PS?ADJECTIVE>
+ <WT? .WRD ,PS?OBJECT>>
+ <SET VAL 0>>>
+ <COND (<AND <G? ,P-LEN 1 ;0>
+ <==? .NW ,W?OF>
+ ;<NOT <EQUAL? .VERB
+ ,ACT?MAKE ,ACT?TAKE>>
+ <0? .VAL>
+ <NOT<EQUAL? .WRD ,W?ALL ,W?ONE ,W?A>>
+ ;<NOT <EQUAL? .WRD ,W?BOTH>>>
+ <PUT ,P-OFW ,P-NCN .WRD> ;"Save OF-word"
+ <SET OF-FLAG T>)
+ (<AND <NOT <0? .VAL>>
+ <OR <0? ,P-LEN>
+ <EQUAL? .NW ,W?THEN ,W?PERIOD>
+ <EQUAL? .NW ,W?\! ,W??>>>
+ <SETG P-END-ON-PREP T>
+ <COND (<L? ,P-NCN 2>
+ <PUT ,P-ITBL ,P-PREP1 .VAL>
+ <PUT ,P-ITBL ,P-PREP1N .WRD>)>)
+ (<==? ,P-NCN 2>
+ <TELL
+"[I found too many nouns in that sentence!]" CR>
+ <RFALSE>)
+ (T
+ <SETG P-NCN <+ ,P-NCN 1>>
+ <COND (<ZERO?
+ <SET PTR <CLAUSE .PTR .VAL .WRD>>>
+ <RFALSE>)>
+ <COND (<L? .PTR 0>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)>)>)
+ ;(<==? .WRD ,W?CLOSELY>
+ <SETG P-ADVERB ,W?CAREFULLY>)
+ ;(<OR <EQUAL? .WRD
+ ,W?CAREFULLY ,W?QUIETLY>
+ <EQUAL? .WRD
+ ,W?SLOWLY ,W?QUICKLY ,W?BRIEFLY>>
+ <SETG P-ADVERB .WRD>)
+ (<EQUAL? .WRD ,W?OF>
+ <COND (<OR <ZERO? .OF-FLAG>
+ <EQUAL? .NW ,W?PERIOD ,W?THEN>
+ <EQUAL? .NW ,W?\! ,W??>>
+ <CANT-USE .PTR>
+ <RFALSE>)
+ (T
+ <SET OF-FLAG <>>)>)
+ (<WT? .WRD ,PS?BUZZ-WORD>)
+ (<AND <EQUAL? .VERB ,ACT?TELL>
+ <WT? .WRD ,PS?VERB ;,P1?VERB>>
+ <TELL
+"[Please consult your manual on how to talk to people.]" CR>
+ <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 (<NOT <ZERO? .DIR>>
+ <SETG PRSA ,V?WALK>
+ <SETG P-WALK-DIR .DIR>
+ <SETG AGAIN-DIR .DIR>
+ <SETG PRSO .DIR>
+ <SETG P-OFLAG <>>
+ <RETURN T>)>
+ <SETG P-WALK-DIR <>>
+ <SETG AGAIN-DIR <>>
+ <COND (<AND ,P-OFLAG
+ <ORPHAN-MERGE>>
+ <SETG WINNER .OWINNER>)>
+ <COND (<==? <GET ,P-ITBL ,P-VERB> 0>
+ <SET PTR <- .PTR ,P-LEXELEN>>
+ <SET TMP <>>
+ <COND (<G? .PTR 0>
+ <SET TMP <GET ,P-LEXV .PTR>>)>
+ <COND (<EQUAL? .TMP ,W?PLEASE>
+ <PUT ,P-ITBL ,P-VERB ,ACT?YES>)
+ (<EQUAL? .TMP ,W?PERIOD>
+ <MISSING "verb">
+ <RFALSE>)
+ (T <PUT ,P-ITBL ,P-VERB ,ACT?$CALL>)>)>
+ <COND (<AND <SYNTAX-CHECK> <SNARF-OBJECTS> <MANY-CHECK> <TAKE-CHECK>>
+ T)>>
+
+<ROUTINE CHANGE-LEXV (PTR WRD)
+ <PUT ,P-LEXV .PTR .WRD>
+ <PUT ,AGAIN-LEXV .PTR .WRD>>
+
+<GLOBAL OOPS-PRINT <>>
+<ROUTINE PRINT-LEXV (PTR "AUX" X)
+ <TELL ,I-ASSUME>
+ <SET X <+ ,P-LEXV <* 2 .PTR>>>
+ <BUFFER-PRINT .X <+ .X <* ,P-WORDLEN ,P-LEN>> <>>
+ <TELL "]" CR>>
+
+<GLOBAL P-WALK-DIR <>>
+<GLOBAL AGAIN-DIR <>>
+
+"For AGAIN purposes, put contents of one LEXV table into another:"
+
+<ROUTINE STUFF (DEST SRC "OPTIONAL" (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 "OPTIONAL" (CNT 80))
+ <REPEAT ()
+ <COND (<DLESS? CNT 0> <RETURN>)
+ (T <PUTB .DEST .CNT <GETB .SRC .CNT>>)>>>
+
+"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)
+ <COND (<SET TMP <GET ,OOPS-TABLE ,O-END>>
+ <SET DBEG .TMP>)
+ (T
+ <SET TMP <GET ,OOPS-TABLE ,O-LENGTH>>
+ <SET DBEG <+ <GETB ,AGAIN-LEXV .TMP>
+ <GETB ,AGAIN-LEXV <+ .TMP 1>>>>)>
+ <PUT ,OOPS-TABLE ,O-END <+ .DBEG .LEN>>
+ <REPEAT ()
+ <PUTB ,OOPS-INBUF <+ .DBEG .CTR> <GETB ,P-INBUF <+ .BEG .CTR>>>
+ <SET CTR <+ .CTR 1>>
+ <COND (<EQUAL? .CTR .LEN> <RETURN>)>>
+ <PUTB ,AGAIN-LEXV .SLOT .DBEG>
+ <PUTB ,AGAIN-LEXV <- .SLOT 1> .LEN>>
+
+<ROUTINE FIX-POSSESSIVES (START END "OPTIONAL" (WHERE 0)
+ "AUX" PTR N PNAM PADJ (VAL <>) X)
+ <SET PNAM ,P-NAM>
+ <SET PADJ ,P-ADJ>
+ <SETG P-ADJ <>>
+ <SET PTR .END>
+ <REPEAT ()
+ <SET PTR <- .PTR ,P-LEXELEN>>
+ <COND (<==? .PTR .START> <RETURN>)
+ (<==? <GET ,P-LEXV .PTR> ,W?APOSTROPHE>
+ <SETG P-NAM <GET ,P-LEXV <- .PTR ,P-LEXELEN>>>
+ <SET N ,RHINO-HEAD-C ;,CHARACTER-MAX>
+ <REPEAT ()
+ <COND (<AND <T? ,P-NAM>
+ <THIS-IT? <GET ,CHARACTER-TABLE .N>>>
+ <THIS-IS-IT <GET ,CHARACTER-TABLE .N>>
+ <SET VAL <GET ,CHAR-POSS-TABLE <+ 1 .N>>>
+ <CHANGE-LEXV ;.PTR <- .PTR .WHERE> .VAL>
+ <RETURN>)
+ (<DLESS? N 0 ;1>
+ <RETURN>)>>
+ <COND (<NOT <L? .N 0 ;1>> <AGAIN>)>
+ <COND (<NAME? <- .PTR ,P-LEXELEN>>
+ <CHANGE-LEXV ;.PTR <- .PTR .WHERE> ,W?MY>
+ <AGAIN>)>
+ <SET N <GET ,QWP1-TABLE 0>>
+ <SET X <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>
+ <REPEAT ()
+ <COND (<AND <==? <GET ,QWP1-TABLE .N> ,P-NAM>
+ <==? <GET ,QWP2-TABLE .N> .X>>
+ <QUESTION-WORD? ,P-NAM T>
+ <RTRUE>)
+ (<DLESS? N 1> <RETURN>)>>
+ ;<UNKNOWN-WORD .PTR ,P-LEXELEN>)>>
+ ;%<DEBUG-CODE <COND (<T? .VAL> <PRINT-LEXV .PTR>)>>
+ <SETG P-NAM .PNAM>
+ <SETG P-ADJ .PADJ>
+ <RETURN .VAL>>
+
+<ROUTINE NAME? (PTR)
+ <OR <XNAME? .PTR ,FIRST-NAME>
+ <XNAME? .PTR ,LAST-NAME>
+ <XNAME? .PTR ,FAVE-COLOR>>>
+
+<ROUTINE XNAME? (PTR TBL "AUX" MAX CNT BPTR CHR (N? T) (NCNT 0))
+ <SET BPTR <REST ,P-LEXV <* .PTR 2>>>
+ <SET CNT <GETB .BPTR 2>>
+ <COND (<G? .CNT 6>
+ <SET CNT 6>)>
+ <SET BPTR <GETB .BPTR 3>>
+ <SET MAX <GETB .TBL 0>>
+ <COND (<NOT <L? .MAX 7>>
+ <SET MAX 6>)>
+ ;%<DEBUG-CODE <COND (,DBUG <TELL "{Namelen=" N .MAX "}" CR>)>>
+ <REPEAT ()
+ <COND (<IGRTR? NCNT .MAX>
+ ;%<DEBUG-CODE <COND (,DBUG
+ <TELL "{NCNT=" N .NCNT " CNT=" N .CNT "}" CR>)>>
+ <COND (<NOT <0? .CNT>> <SET N? <>>)>
+ <RETURN>)
+ (<DLESS? CNT 0>
+ ;%<DEBUG-CODE <COND (,DBUG
+ <TELL "{CNT=" N .CNT "}" CR>)>>
+ <SET N? <>>
+ <RETURN>)
+ (T
+ <SET CHR <GETB ,P-INBUF .BPTR>>
+ ;%<DEBUG-CODE <COND (,DBUG <TELL "{CHR=" N .CHR>)>>
+ <COND (<NOT <EQUAL? .CHR 45 39 38>>
+ <SET CHR <+ *140* <MOD .CHR 32>>>
+ ;%<DEBUG-CODE <COND (,DBUG
+ <TELL "->" N .CHR>)>>)>
+ ;%<DEBUG-CODE <COND (,DBUG
+ <TELL " Namechr=" N <GETB .TBL .NCNT> "}" CR>)>>
+ <COND (<NOT <==? .CHR <GETB .TBL .NCNT>>>
+ <SET N? <>>)>
+ <SET BPTR <+ .BPTR 1>>)>>
+ <COND (.N?
+ <COND (<==? .TBL ,FIRST-NAME>
+ <CHANGE-LEXV .PTR ,W?F.N>
+ ,W?F.N)
+ (<==? .TBL ,FAVE-COLOR>
+ <CHANGE-LEXV .PTR ,W?F.C>
+ ,W?F.C)
+ (T
+ <CHANGE-LEXV .PTR ,W?L.N>
+ ,W?L.N)>)>>
+
+"Check whether word pointed at by PTR is the correct part of speech.
+ The second argument is the part of speech (,PS?<part of speech>). The
+ 3rd argument (,P1?<part of speech>), if given, causes the value
+ for that part of speech to be returned."
+
+<ROUTINE WT? (PTR BIT "OPTIONAL" (B1 5) "AUX" (OFFS ,P-P1OFF) TYP)
+ <COND (<BTST <SET TYP <GETB .PTR ,P-PSOFF>> .BIT>
+ <COND (<G? .B1 4> <RTRUE>)
+ (<EQUAL? .BIT ,PS?OBJECT> 1) ;"NEW-VOC"
+ (T
+ <SET TYP <BAND .TYP ,P-P1BITS>>
+ <COND (<NOT <EQUAL? .TYP .B1>> <SET OFFS <+ .OFFS 1>>)>
+ <GETB .PTR .OFFS>)>)>>
+
+"Scan through a noun phrase, leaving a pointer to its starting location:"
+
+<ROUTINE CLAUSE (PTR VAL WRD "AUX" OFF NUM (ANDFLG <>) (FIRST?? T) NW (LW 0))
+ <SET OFF <* <- ,P-NCN 1> 2>>
+ <COND (<NOT <==? .VAL 0>>
+ <PUT ,P-ITBL <SET NUM <+ ,P-PREP1 .OFF>> .VAL>
+ <PUT ,P-ITBL <+ .NUM 1> .WRD>
+ <SET PTR <+ .PTR ,P-LEXELEN>>)
+ (T <SETG P-LEN <+ ,P-LEN 1>>)>
+ <COND (<0? ,P-LEN> <SETG P-NCN <- ,P-NCN 1>> <RETURN -1>)>
+ <PUT ,P-ITBL <SET NUM <+ ,P-NC1 .OFF>> <REST ,P-LEXV <* .PTR 2>>>
+ <COND (<EQUAL? <GET ,P-LEXV .PTR> ,W?THE ,W?A ,W?AN>
+ <PUT ,P-ITBL .NUM <REST <GET ,P-ITBL .NUM> 4>>)>
+ <REPEAT ()
+ <COND (<L? <SETG P-LEN <- ,P-LEN 1>> 0>
+ <PUT ,P-ITBL <+ .NUM 1> <REST ,P-LEXV <* .PTR 2>>>
+ <RETURN -1>)>
+ <COND (<AND <SET WRD <GET ,P-LEXV .PTR>>
+ <BUZZER-WORD? .WRD .PTR>>
+ <RFALSE>)
+ (<OR <T? .WRD>
+ <SET WRD <NUMBER? .PTR>>
+ <SET WRD <NAME? .PTR>>>
+ <COND (<0? ,P-LEN> <SET NW 0>)
+ (T <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>)>
+ ;<COND (<AND <==? .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?PERIOD>
+ <OR <EQUAL? .LW ,W?MRS ,W?MR ,W?MS>
+ <EQUAL? .LW ,W?DR ;,W?LT>>>
+ <SET LW 0>)
+ (<EQUAL? .WRD ,W?AND ,W?COMMA> <SET ANDFLG T>)
+ (<EQUAL? .WRD ,W?ALL ;,W?BOTH ,W?ONE>
+ <COND (<==? .NW ,W?OF>
+ <SETG P-LEN <- ,P-LEN 1>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>)>)
+ (<OR <EQUAL? .WRD ,W?THEN ,W?PERIOD>
+ <EQUAL? .WRD ,W?\! ,W??>
+ <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 .ANDFLG
+ <OR <EQUAL? <GET ,P-ITBL ,P-VERBN> 0>
+ <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>>>
+ <PUT ,P-OFW <- ,P-NCN 1> .WRD>)
+ (<AND <WT? .WRD ,PS?ADJECTIVE>
+ <T? .NW>
+ <NOT <WT? .NW ,PS?DIRECTION>>
+ ;"DRIVE CAR SOUTH"
+ <OR <WT? .NW ,PS?OBJECT>
+ <WT? .NW ,PS?ADJECTIVE>>>)
+ (<AND <NOT .ANDFLG>
+ <NOT <EQUAL? .NW ,W?BUT ,W?EXCEPT>>
+ <NOT <EQUAL? .NW ,W?AND ,W?COMMA>>>
+ <PUT ,P-ITBL
+ <+ .NUM 1>
+ <REST ,P-LEXV <* <+ .PTR 2> 2>>>
+ <RETURN .PTR>)
+ (T <SET ANDFLG <>>)>)
+ ;"Next clause replaced by following one to allow
+ ATTRACTIVE MAN, VERB - JW 2/15/85"
+ ;(<AND <OR ,P-MERGED
+ ,P-OFLAG
+ <NOT <EQUAL? <GET ,P-ITBL ,P-VERB> 0>>>
+ <OR <WT? .WRD ,PS?ADJECTIVE>
+ <WT? .WRD ,PS?BUZZ-WORD>>>)
+ (<OR <WT? .WRD ,PS?ADJECTIVE>
+ <WT? .WRD ,PS?BUZZ-WORD>>)
+ (<AND .ANDFLG
+ <EQUAL? <GET ,P-ITBL ,P-VERB> 0>>
+ <SET PTR <- .PTR 4>>
+ <CHANGE-LEXV <+ .PTR 2> ,W?THEN>
+ <SETG P-LEN <+ ,P-LEN 2>>)
+ (<WT? .WRD ,PS?PREPOSITION> T)
+ (T
+ <CANT-USE .PTR>
+ <RFALSE>)>)
+ (T <UNKNOWN-WORD .PTR> <RFALSE>)>
+ <SET LW .WRD>
+ <SET FIRST?? <>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>>>
+
+<ROUTINE VERB-DIR-ONLY? (WRD)
+ <AND <NOT <WT? .WRD ,PS?OBJECT>>
+ <NOT <WT? .WRD ,PS?ADJECTIVE>>
+ <OR <WT? .WRD ,PS?DIRECTION>
+ <WT? .WRD ,PS?VERB>>>>
+
+<ROUTINE NUMBER? (PTR "AUX" CNT BPTR CHR (SUM 0) (TIM <>) TMP)
+ <SET TMP <REST ,P-LEXV <* .PTR 2>>>
+ <SET CNT <GETB .TMP 2>>
+ <SET BPTR <GETB .TMP 3>>
+ <REPEAT ()
+ <COND (<L? <SET CNT <- .CNT 1>> 0> <RETURN>)
+ (T
+ <SET CHR <GETB ,P-INBUF .BPTR>>
+ <COND (<==? .CHR %<ASCII !\:>>
+ <SET TIM .SUM>
+ <SET SUM 0>)
+ (<G? .SUM 29999> <RFALSE>)
+ (<OR <G? .CHR %<ASCII !\9>>
+ <L? .CHR %<ASCII !\0>>>
+ <RFALSE>)
+ (T
+ <SET SUM <+ <* .SUM 10>
+ <- .CHR %<ASCII !\0>>>>)>
+ <SET BPTR <+ .BPTR 1>>)>>
+ <CHANGE-LEXV .PTR ,W?INT.NUM ;NUMBER>
+ <COND (<G? .SUM 9999> <RFALSE>)
+ (.TIM
+ <COND (<G? .TIM 23> <RFALSE>)>
+ <SET SUM <+ .SUM <* .TIM 60>>>)>
+ <SETG P-TIME .TIM>
+ <SETG P-NUMBER .SUM>
+ ,W?INT.NUM>
+
+<GLOBAL P-NUMBER:NUMBER -1>
+<GLOBAL P-TIME:FLAG <>>
+<GLOBAL P-DIRECTION 0>
+
+<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>)
+ (<AND <WT? .WRD ,PS?OBJECT ,P1?OBJECT>
+ <EQUAL? ,P-NCN 0>>
+ <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 <NOT <ZERO? <SET VERB <GET ,P-ITBL ,P-VERB>>>>
+ <NOT .ADJ>
+ <NOT <EQUAL? .VERB <GET ,P-OTBL ,P-VERB>>>>
+ <RFALSE>)
+ (<EQUAL? ,P-NCN 2> <RFALSE>)
+ (<EQUAL? <GET ,P-OTBL ,P-NC1> 1>
+ <COND (<OR <ZERO? <SET TEMP <GET ,P-ITBL ,P-PREP1>>>
+ <EQUAL? .TEMP <GET ,P-OTBL ,P-PREP1>>>
+ <COND (.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>>)>
+ <PUT ,P-OTBL ,P-NC1L <GET ,P-ITBL ,P-NC1L>>)
+ (T <RFALSE>)>)
+ (<EQUAL? <GET ,P-OTBL ,P-NC2> 1>
+ <COND (<OR <ZERO? <SET TEMP <GET ,P-ITBL ,P-PREP1>>>
+ <EQUAL? .TEMP <GET ,P-OTBL ,P-PREP2>>>
+ <COND (.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>)>)
+ (,P-ACLAUSE
+ <COND (<AND <NOT <EQUAL? ,P-NCN 1>> <NOT .ADJ>>
+ <SETG P-ACLAUSE <>>
+ <RFALSE>)
+ (T
+ <SET BEG <GET ,P-ITBL ,P-NC1>>
+ <COND (.ADJ <SET BEG <REST ,P-LEXV 2>> <SET ADJ <>>)>
+ <SET END <GET ,P-ITBL ,P-NC1L>>
+ <REPEAT ()
+ <SET WRD <GET .BEG 0>>
+ <COND (<EQUAL? .BEG .END>
+ <COND (.ADJ <CLAUSE-WIN .ADJ> <RETURN>)
+ (T <SETG P-ACLAUSE <>> <RFALSE>)>)
+ (<OR <EQUAL? .WRD ,W?ALL ;,W?EVERYT ,W?ONE>
+ <AND <BTST <GETB .WRD ,P-PSOFF>
+ ,PS?ADJECTIVE> ;"same as WT?"
+ <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? <+ .BEG ,P-WORDLEN> .END>>
+ <COND (<EQUAL? .WRD ,P-ANAM>
+ <CLAUSE-WIN .ADJ>)
+ (T
+ <CLAUSE-WIN>)>
+ <RETURN>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>
+ <COND (<EQUAL? .END 0>
+ <SET END .BEG>
+ <SETG P-NCN 1>
+ <PUT ,P-ITBL ,P-NC1 <BACK .BEG 4>>
+ <PUT ,P-ITBL ,P-NC1L .BEG>)>>)>)>
+ <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 (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN>
+ <SETG P-MERGED T>
+ <RTRUE>)
+ (T <PUT ,P-ITBL .CNT <GET ,P-OTBL .CNT>>)>>
+ T>
+
+<ROUTINE CLAUSE-WIN ("OPT" (ADJ <>))
+ <COND (.ADJ
+ <PUT ,P-ITBL ,P-VERB <GET ,P-OTBL ,P-VERB>>)
+ (ELSE <SET ADJ T>)>
+ <PUT ,P-CCTBL ,CC-SBPTR ,P-ACLAUSE>
+ <PUT ,P-CCTBL ,CC-SEPTR <+ ,P-ACLAUSE 1>>
+ <COND (<EQUAL? ,P-ACLAUSE ,P-NC1>
+ <PUT ,P-CCTBL ,CC-OCLAUSE ,P-OCL1>)
+ (ELSE
+ <PUT ,P-CCTBL ,CC-OCLAUSE ,P-OCL2>)>
+ <CLAUSE-COPY ,P-OTBL ,P-OTBL .ADJ>
+ <AND <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 "OPTIONAL" (TBL 0))
+ ;<COND (<G? .CNT 6> <SET CNT 6>)>
+ <COND (<ZERO? .TBL> <SET TBL ,P-INBUF>)>
+ <REPEAT ()
+ <COND (<DLESS? CNT 0> <RETURN>)
+ (ELSE
+ <PRINTC <GETB .TBL .BUF>>
+ <SET BUF <+ .BUF 1>>)>>>
+
+<ROUTINE UNKNOWN-WORD (PTR ;"OPT" ;(APOST 0) "AUX" BUF)
+ <PUT ,OOPS-TABLE ,O-PTR .PTR ;<- .PTR .APOST>>
+ <COND (<T? ,P-OFLAG>
+ <PUT ,OOPS-TABLE ,O-END 0>)>
+ <COND (T ;<EQUAL? ,WINNER ,PLAYER>
+ <TELL !\[>)
+ ;(T <TELL "\"I'm sorry, but ">)>
+ <TELL "I don't know the word ">
+ <COND (T ;<EQUAL? ,WINNER ,PLAYER>
+ <TELL !\">)
+ ;(T <TELL !\'>)>
+ <SET BUF <* 2 .PTR ;<- .PTR .APOST>>>
+ <WORD-PRINT <GETB <REST ,P-LEXV .BUF> 2>
+ <GETB <REST ,P-LEXV .BUF> 3>>
+ ;<COND (<T? .APOST>
+ <TELL !\'>
+ <SET BUF <* 2 <+ .PTR ,P-LEXELEN>>>
+ <WORD-PRINT <GETB <REST ,P-LEXV .BUF> 2>
+ <GETB <REST ,P-LEXV .BUF> 3>>)>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-OFLAG <>>
+ <COND (T ;<EQUAL? ,WINNER ,PLAYER>
+ <TELL ".\"]" CR>)
+ ;(T <TELL ".'\"" CR>)>>
+
+<ROUTINE CANT-USE (PTR "AUX" BUF)
+ ;#DECL ((PTR BUF) FIX)
+ <SETG QUOTE-FLAG <>>
+ <SETG P-OFLAG <>>
+ <COND (T ;<EQUAL? ,WINNER ,PLAYER>
+ <TELL "[Sorry, but I don't understand the word \"">
+ <WORD-PRINT <GETB <REST ,P-LEXV <SET BUF <* .PTR 2>>> 2>
+ <GETB <REST ,P-LEXV .BUF> 3>>
+ <TELL "\" when you use it that way.]" CR>)
+ ;(T <TELL "\"Please, to me simple English speak.\"" CR>)>>
+
+" Perform syntax matching operations, using P-ITBL as the source of
+ the verb and adjectives for this input. Returns false if no
+ syntax matches, and does it's own orphaning. If return is true,
+ the syntax is saved in P-SYNTAX."
+
+<GLOBAL P-SLOCBITS 0>
+
+<CONSTANT P-SYNLEN 8>
+
+<CONSTANT P-SBITS 0>
+<CONSTANT P-SPREP1 1>
+<CONSTANT P-SPREP2 2>
+<CONSTANT P-SFWIM1 3>
+<CONSTANT P-SFWIM2 4>
+<CONSTANT P-SLOC1 5>
+<CONSTANT P-SLOC2 6>
+<CONSTANT P-SACTION 7>
+
+<CONSTANT P-SONUMS 3>
+
+<ROUTINE SYNTAX-CHECK ("AUX" SYN LEN NUM OBJ (DRIVE1 <>) (DRIVE2 <>)
+ PREP VERB)
+ <COND (<0? <SET VERB <GET ,P-ITBL ,P-VERB>>>
+ <MISSING "verb">
+ <RFALSE>)>
+ <SET SYN <GET ,VERBS <- 255 .VERB>>>
+ <SET LEN <GETB .SYN 0>>
+ <SET SYN <REST .SYN>>
+ <REPEAT ()
+ <SET NUM <BAND <GETB .SYN ,P-SBITS> ,P-SONUMS>>
+ <COND (<G? ,P-NCN .NUM> T) ;"Added 4/27/83"
+ (<AND <NOT <L? .NUM 1>>
+ <0? ,P-NCN>
+ <OR <0? <SET PREP <GET ,P-ITBL ,P-PREP1>>>
+ <==? .PREP <GETB .SYN ,P-SPREP1>>>>
+ <SET DRIVE1 .SYN>)
+ (<==? <GETB .SYN ,P-SPREP1> <GET ,P-ITBL ,P-PREP1>>
+ <COND (<AND <==? .NUM 2> <==? ,P-NCN 1>>
+ <SET DRIVE2 .SYN>)
+ (<==? <GETB .SYN ,P-SPREP2>
+ <GET ,P-ITBL ,P-PREP2>>
+ <SYNTAX-FOUND .SYN>
+ <RTRUE>)>)>
+ <COND (<DLESS? LEN 1>
+ <COND (<OR <T? .DRIVE1> <T? .DRIVE2>>
+ <RETURN>)
+ (T
+ <DONT-UNDERSTAND>
+ <RFALSE>)>)
+ (T <SET SYN <REST .SYN ,P-SYNLEN>>)>>
+ <COND (<AND .DRIVE1
+ <SET OBJ
+ <GWIM <GETB .DRIVE1 ,P-SFWIM1>
+ <GETB .DRIVE1 ,P-SLOC1>
+ <GETB .DRIVE1 ,P-SPREP1>>>>
+ <PUT/B ,P-PRSO ,P-MATCHLEN 1>
+ <PUT/B ,P-PRSO 1 .OBJ>
+ <SYNTAX-FOUND .DRIVE1>)
+ (<AND .DRIVE2
+ <SET OBJ
+ <GWIM <GETB .DRIVE2 ,P-SFWIM2>
+ <GETB .DRIVE2 ,P-SLOC2>
+ <GETB .DRIVE2 ,P-SPREP2>>>>
+ <PUT/B ,P-PRSI ,P-MATCHLEN 1>
+ <PUT/B ,P-PRSI 1 .OBJ>
+ <SYNTAX-FOUND .DRIVE2>)
+ ;(<EQUAL? .VERB ,ACT?FIND ;,ACT?NAME>
+ <TELL "[Sorry, but I can't answer that question.]" CR>
+ <RFALSE>)
+ (T
+ <SET OBJ <>>
+ <COND (<AND <EQUAL? ,WINNER ,PLAYER>
+ <NOT <EQUAL? ,P-PRSA-WORD;"can't orphan DRIVE/SOUTH"
+ ,W?DRIVE ,W?PROCEED ,W?STEER>>>
+ <ORPHAN .DRIVE1 .DRIVE2>
+ <SET OBJ T>
+ <TELL "[Wh">)
+ (T
+ <TELL
+"[Your command was not complete. Next time, type wh">)>
+ <COND (<EQUAL? .VERB ,ACT?HEAD ;WALK>
+ <TELL "ere">)
+ (<OR <AND .DRIVE1
+ <==? <GETB .DRIVE1 ,P-SFWIM1> ,PERSONBIT>>
+ <AND .DRIVE2
+ <==? <GETB .DRIVE2 ,P-SFWIM2> ,PERSONBIT>>>
+ <TELL "om">)
+ (T <TELL "at">)>
+ <COND (<T? .OBJ> ;<EQUAL? ,WINNER ,PLAYER>
+ <TELL " do you want to ">)
+ (T
+ <TELL " you want" HIM ,WINNER " to ">)>
+ <VERB-PRINT>
+ ;<PREP-PRINT <COND (.DRIVE1 <GETB .DRIVE1 ,P-SPREP1 ;2>)
+ (T <GETB .DRIVE2 ,P-SPREP1>)>> ;"not in X1"
+ <COND (.DRIVE2
+ <SET PREP ,P-MERGED>
+ <SETG P-MERGED <>>
+ <SETG P-OFLAG <>>
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L>
+ <SETG P-MERGED .PREP>)>
+ <SETG P-END-ON-PREP <>>
+ <PREP-PRINT <COND (.DRIVE1 <GETB .DRIVE1 ,P-SPREP1 ;2>)
+ (T <GETB .DRIVE2 ,P-SPREP2>)>>
+ <COND (<T? .OBJ> ;<EQUAL? ,WINNER ,PLAYER>
+ <SETG P-OFLAG T>
+ <TELL "?]" CR>)
+ (T
+ ;<SETG P-OFLAG <>>
+ <TELL ".]" CR>)>
+ <RFALSE>)>>
+
+;<GLOBAL CANT-UNDERSTAND "[Sorry, but I don't understand that sentence.]"
+ ;"[I couldn't understand that sentence.]">
+<ROUTINE DONT-UNDERSTAND ()
+ <SETG CLOCK-WAIT T>
+ <TELL
+"[Sorry, but I don't understand. Please say that another way, or try
+something else.]" CR>>
+
+<ROUTINE VERB-PRINT ("OPTIONAL" (GERUND <>) "AUX" TMP)
+ <SET TMP <GET ,P-ITBL ,P-VERBN>> ;"? ,P-OTBL?"
+ <COND (<==? .TMP 0>
+ <COND (<ZERO? .GERUND> <TELL "tell"> <RTRUE>)
+ (T <TELL "walk">)>)
+ (<OR <T? .GERUND> <0? <GETB ,P-VTBL 2>>>
+ <SET TMP <GET .TMP 0>>
+ <COND (<==? .TMP ,W?L> <PRINTB ,W?LOOK>)
+ (<==? .TMP ,W?X> <PRINTB ,W?EXAMINE>)
+ (<==? .TMP ,W?Z> <PRINTB ,W?WAIT>)
+ (<T? .GERUND>
+ <COND (<==? .TMP ,W?BATHE> <PRINTB ,W?BATH>)
+ (<==? .TMP ,W?DIG> <PRINTI "digg">)
+ (<==? .TMP ,W?GET> <PRINTI "gett">)
+ (T <PRINTB .TMP>)>)
+ (T <PRINTB .TMP>)>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>
+ <PUTB ,P-VTBL 2 0>)>
+ <COND (<T? .GERUND> <TELL "ing?">)>>
+
+<ROUTINE ORPHAN (D1 D2 "AUX" (CNT -1))
+ <COND (<NOT ,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>>
+ <REPEAT ()
+ <COND (<IGRTR? CNT ,P-ITBLLEN> <RETURN>)
+ (T <PUT ,P-OTBL .CNT <GET ,P-ITBL .CNT>>)>>
+ <COND (<EQUAL? ,P-NCN 2>
+ <PUT ,P-CCTBL ,CC-SBPTR ,P-NC2>
+ <PUT ,P-CCTBL ,CC-SEPTR ,P-NC2L>
+ <PUT ,P-CCTBL ,CC-OCLAUSE ,P-OCL2>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL>)>
+ <COND (<NOT <L? ,P-NCN 1>>
+ <PUT ,P-CCTBL ,CC-SBPTR ,P-NC1>
+ <PUT ,P-CCTBL ,CC-SEPTR ,P-NC1L>
+ <PUT ,P-CCTBL ,CC-OCLAUSE ,P-OCL1>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL>)>
+ <COND (.D1
+ <PUT ,P-OTBL ,P-PREP1 <GETB .D1 ,P-SPREP1>>
+ <PUT ,P-OTBL ,P-NC1 1>)
+ (.D2
+ <PUT ,P-OTBL ,P-PREP2 <GETB .D2 ,P-SPREP2>>
+ <PUT ,P-OTBL ,P-NC2 1>)>>
+
+<ROUTINE CLAUSE-PRINT (BPTR EPTR "OPTIONAL" (THE? T))
+ <BUFFER-PRINT <GET ,P-ITBL .BPTR> <GET ,P-ITBL .EPTR> .THE?>>
+
+<ROUTINE BUFFER-PRINT (BEG END CP "AUX" (NOSP <>) WRD NW (FIRST?? T) (PN <>))
+ <REPEAT ()
+ <COND (<==? .BEG .END> <RETURN>)>
+ <COND (<OR <T? .NOSP>
+ <EQUAL? .WRD ,W?APOSTROPHE>
+ <EQUAL? .NW ,W?PERIOD ,W?COMMA ,W?APOSTROPHE>>
+ <SET NOSP <>>)
+ (T <TELL !\ >)>
+ <SET WRD <GET .BEG 0>>
+ ;<SET NW <GET .BEG ,P-LEXELEN>>
+ <COND (<==? .END <REST .BEG ,P-WORDLEN>>
+ <SET NW 0>)
+ (T <SET NW <GET .BEG ,P-LEXELEN>>)>
+ <COND (<AND <NOT <==? .WRD ,W?MY>>
+ <ZMEMQ .WRD ,CHAR-POSS-TABLE>>
+ <SET NOSP T>)
+ (<AND <NOT <==? .NW ,W?MY>>
+ <ZMEMQ .NW ,CHAR-POSS-TABLE>>
+ <SET NOSP T>)
+ (<AND <T? ,OOPS-PRINT>
+ <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>)>
+ <COND ;(<EQUAL? .WRD ,W?PERIOD ,W?\! ,W??>
+ <SET NOSP T>)
+ (<EQUAL? .WRD ,W?MY>
+ <COND (<ZERO? ,OOPS-PRINT>
+ <PRINTB ,W?YOUR>)
+ (T <PRINTB ,W?MY>)>
+ ;<SET NOSP T>)
+ (<ZMEMQ .WRD ,CHAR-POSS-TABLE>
+ <TELL !\'>)
+ (<AND <ZERO? ,OOPS-PRINT>
+ <NOT <EQUAL? .WRD ,W?ALL ,W?PERIOD ,W?APOSTROPHE>>
+ <OR <WT? .WRD ,PS?BUZZ-WORD>
+ <WT? .WRD ,PS?PREPOSITION>>
+ <NOT <WT? .WRD ,PS?ADJECTIVE>>
+ <NOT <WT? .WRD ,PS?OBJECT>>>
+ <SET NOSP T>)
+ (<AND <EQUAL? .WRD ,W?ME>
+ <ZERO? ,OOPS-PRINT>>
+ <PRINTD ,PLAYER>
+ <SET PN T>)
+ (<CAPITAL-NOUN? .WRD>
+ <CAPITALIZE .BEG>
+ <SET PN T>)
+ (T
+ <COND (<AND .FIRST?? <NOT .PN> .CP>
+ <COND (<NOT <EQUAL? .WRD ,W?HER ,W?HIM ,W?YOUR;,W?THEM>>
+ <TELL "the ">)>)>
+ <COND (<OR <T? ,P-OFLAG> <T? ,P-MERGED>>
+ <PRINTB .WRD>)
+ (<AND <==? .WRD ,W?IT>
+ <VISIBLE? ,P-IT-OBJECT>>
+ <PRINTD ,P-IT-OBJECT>)
+ (<AND <EQUAL? .WRD ,W?HER>
+ <NOT .PN> ;"VISIBLE check above"
+ ;<VISIBLE? ,P-HER-OBJECT>>
+ <PRINTD ,P-HER-OBJECT>)
+ ;(<AND <EQUAL? .WRD ,W?THEM>
+ <NOT .PN>
+ ;<VISIBLE? ,P-THEM-OBJECT>>
+ <PRINTD ,P-THEM-OBJECT>)
+ (<AND <EQUAL? .WRD ,W?HIM>
+ <NOT .PN>
+ ;<VISIBLE? ,P-HIM-OBJECT>>
+ <PRINTD ,P-HIM-OBJECT>)
+ (T
+ <WORD-PRINT <GETB .BEG 2> <GETB .BEG 3>>)>
+ <SET FIRST?? <>>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>>
+
+<ROUTINE TITLE-NOUN? (WRD)
+ <OR <EQUAL? .WRD ,W?MR ,W?MRS ,W?MS>
+ <EQUAL? .WRD ,W?MISTER ,W?MISS ,W?SIR>
+ <EQUAL? .WRD ,W?LADY ,W?DAME ,W?LORD>
+ <EQUAL? .WRD ,W?DR ,W?DOCTOR ,W?DETECT>
+ <EQUAL? .WRD ,W?MADAME ,W?MADAM ,W?MASTER>
+ ;<EQUAL? .WRD ,W?LT>>>
+
+<ROUTINE CAPITAL-NOUN? (WRD)
+ <OR <TITLE-NOUN? .WRD>
+ <EQUAL? .WRD ,W?BOLITHO ,W?DEE>
+ <EQUAL? .WRD ,W?DEIRDRE ,W?FORDYCE ,W?HALLAM>
+ <EQUAL? .WRD ,W?HYDE ,W?IAN ,W?INDIAN>
+ <EQUAL? .WRD ,W?IRIS ,W?JACK ,W?LIONEL>
+ <EQUAL? .WRD ,W?LYND ,W?MONTAGUE ,W?MOONMIST>
+ <EQUAL? .WRD ,W?NICHOLAS ,W?PENTREATH ,W?TAMARA>
+ <EQUAL? .WRD ,W?TAMMY ,W?TRESYLLIAN ,W?VIV>
+ <EQUAL? .WRD ,W?VIVIEN ,W?WENDISH>
+ ;<EQUAL? .WRD ,W?AMAZON ,W?DINGAAN ,W?EGYPTIAN ,W?LONDON ,W?MAYFAIR ,W?PORSCHE ,W?ZULU>>>
+
+<ROUTINE CAPITALIZE (PTR)
+ <COND (<OR <T? ,P-OFLAG> <T? ,P-MERGED>>
+ <PRINTB <GET .PTR 0>>)
+ (T
+ <PRINTC <- <GETB ,P-INBUF <GETB .PTR 3>> 32>>
+ <WORD-PRINT <- <GETB .PTR 2> 1> <+ <GETB .PTR 3> 1>>)>>
+
+<ROUTINE PREP-PRINT (PREP "OPTIONAL" (SP? T) "AUX" WRD VRB)
+ <COND (<0? .PREP>
+ <RFALSE>)>
+ <SET VRB <GET <GET ,P-ITBL ,P-VERBN> 0>>
+ <COND (<AND <T? ,P-END-ON-PREP>
+ <OR <NOT <EQUAL? .VRB ,W?LIE ,W?SIT>>
+ <NOT <==? .PREP ,PR?DOWN>>>>
+ <RFALSE>)
+ (T
+ <COND (.SP? <TELL !\ >)>
+ <SET WRD <PREP-FIND .PREP>>
+ <COND (<==? .WRD ,W?AGAINST> <TELL "against">)
+ (<==? .WRD ,W?THROUGH> <TELL "through">)
+ (T <PRINTB .WRD>)>
+ <COND (<AND <EQUAL? .VRB ,W?SIT ,W?LIE>
+ <EQUAL? .WRD ,W?DOWN>>
+ <TELL " on">)>
+ <COND (<AND <EQUAL? .VRB ,W?GET>
+ <EQUAL? .WRD ,W?OUT>>
+ <TELL " of">)>
+ <RTRUE>)>>
+
+"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 "OPT" (INSRT <>)
+ "AUX" OCL BEG END BB EE OBEG CNT B E)
+ <SET BB <GET ,P-CCTBL ,CC-SBPTR>>
+ <SET EE <GET ,P-CCTBL ,CC-SEPTR>>
+ <SET OCL <GET ,P-CCTBL ,CC-OCLAUSE>>
+ <SET BEG <GET .SRC .BB>>
+ <SET END <GET .SRC .EE>>
+ <SET OBEG <GET .OCL ,P-MATCHLEN>>
+ <REPEAT ()
+ <COND (<EQUAL? .BEG .END> <RETURN>)>
+ <COND (<AND .INSRT
+ <EQUAL? ,P-ANAM <GET .BEG 0>>>
+ <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>>
+ <SET B <REST .B ,P-WORDLEN>>>)
+ (ELSE
+ <COND (<NOT <EQUAL? .INSRT <GET .OCL 1>>>
+ <CLAUSE-ADD .INSRT>)>
+ <CLAUSE-ADD ,P-ANAM>)>)
+ (ELSE
+ <CLAUSE-ADD <GET .BEG 0>>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>
+ <COND (<AND <EQUAL? .SRC .DEST>
+ <G? .OBEG 0>
+ <L? 0 <SET CNT <- <GET .OCL ,P-MATCHLEN> .OBEG>>>>
+ <PUT .OCL ,P-MATCHLEN 0>
+ <SET OBEG <+ .OBEG 1>>
+ <REPEAT ()
+ <CLAUSE-ADD <GET .OCL .OBEG> T>
+ <COND (<ZERO? <SET CNT <- .CNT 2>>>
+ <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>>>>
+
+<ROUTINE CLAUSE-ADD (WRD "OPT" (CHECK? <>) "AUX" OCL PTR)
+ <SET OCL <GET ,P-CCTBL ,CC-OCLAUSE>>
+ <SET PTR <GET .OCL ,P-MATCHLEN>>
+ <COND (<AND .CHECK? <NOT <ZERO? .PTR>> <ZMEMQ .WRD .OCL>>
+ <RFALSE>)
+ (ELSE
+ <SET PTR <+ .PTR 2>>
+ <PUT .OCL <- .PTR 1> .WRD>
+ <PUT .OCL .PTR 0>
+ <PUT .OCL ,P-MATCHLEN .PTR>)>>
+
+<ROUTINE PREP-FIND (PREP "AUX" (CNT 0) SIZE)
+ ;#DECL ((PREP CNT SIZE) FIX)
+ <SET SIZE <* <GET ,PREPOSITIONS 0> 2>>
+ <REPEAT ()
+ <COND (<IGRTR? CNT .SIZE> <RFALSE>)
+ (<==? <GET ,PREPOSITIONS .CNT> .PREP>
+ <RETURN <GET ,PREPOSITIONS <- .CNT 1>>>)>>>
+
+<ROUTINE SYNTAX-FOUND (SYN)
+ ;#DECL ((SYN) <PRIMTYPE VECTOR>)
+ <SETG P-SYNTAX .SYN>
+ <SETG PRSA <GETB .SYN ,P-SACTION>>>
+
+<GLOBAL P-GWIMBIT 0>
+
+<ROUTINE GWIM (GBIT LBIT PREP "AUX" OBJ ;WPREP)
+ ;#DECL ((GBIT LBIT) FIX (OBJ) OBJECT)
+ <COND (<==? .GBIT ,RMUNGBIT>
+ <RETURN ,ROOMS>)>
+ <SETG P-GWIMBIT .GBIT>
+ <SETG P-SLOCBITS .LBIT>
+ <PUT/B ,P-MERGE ,P-MATCHLEN 0>
+ <COND (<GET-OBJECT ,P-MERGE <>>
+ <SETG P-GWIMBIT 0>
+ <COND (<==? <GET/B ,P-MERGE ,P-MATCHLEN> 1>
+ <SET OBJ <GET/B ,P-MERGE 1>>
+ <TELL !\(>
+ <COND (<PREP-PRINT .PREP <>>
+ <THE? .OBJ>
+ <TELL !\ >)>
+ <TELL D .OBJ !\) CR>
+ .OBJ)>)
+ (T <SETG P-GWIMBIT 0> <RFALSE>)>>
+
+<GLOBAL P-PHR:NUMBER 0> "Which noun phrase is being parsed?"
+<GLOBAL P-NAMW <TABLE 0 0>> "noun for PRSO & PRSI"
+<GLOBAL P-ADJW <TABLE 0 0>> "adjective for ditto"
+<GLOBAL P-OFW <TABLE 0 0>> "noun before OF for ditto"
+<VOC "FRONT" NOUN> "to make P-OFW work"
+
+<ROUTINE SNARF-OBJECTS ("AUX" PTR)
+ <COND (<NOT <==? <SET PTR <GET ,P-ITBL ,P-NC1>> 0>>
+ <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 (<T? <GET/B ,P-BUTS ,P-MATCHLEN>>
+ <SETG P-PRSO <BUT-MERGE ,P-PRSO>>)>)>
+ <COND (<NOT <==? <SET PTR <GET ,P-ITBL ,P-NC2>> 0>>
+ <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 (<NOT <0? <GET/B ,P-BUTS ,P-MATCHLEN>>>
+ <COND (<==? <GET/B ,P-PRSI ,P-MATCHLEN> 1>
+ <SETG P-PRSO <BUT-MERGE ,P-PRSO>>)
+ (T <SETG P-PRSI <BUT-MERGE ,P-PRSI>>)>)>)>
+ <RTRUE>>
+
+<ROUTINE BUT-MERGE (TBL "AUX" LEN BUTLEN (CNT 1) (MATCHES 0) OBJ NTBL)
+ <SET LEN <GET/B .TBL ,P-MATCHLEN>>
+ <PUT/B ,P-MERGE ,P-MATCHLEN 0>
+ ;<SET LB <GET/B ,P-BUTS ,P-MATCHLEN>>
+ <REPEAT ()
+ <COND (<DLESS? LEN 0> <RETURN>)
+ (<NOT <ZMEMQ/B <SET OBJ <GET/B .TBL .CNT>> ,P-BUTS>>
+ <SET MATCHES <+ .MATCHES 1>>
+ <PUT/B ,P-MERGE .MATCHES .OBJ>)>
+ <SET CNT <+ .CNT 1>>>
+ <PUT/B ,P-MERGE ,P-MATCHLEN .MATCHES>
+ <SET NTBL ,P-MERGE>
+ <SETG P-MERGE .TBL>
+ .NTBL>
+
+<GLOBAL P-NAM <>>
+<GLOBAL P-XNAM <>>
+
+<GLOBAL P-ADJ:NUMBER <>>
+<GLOBAL P-XADJ:NUMBER <>>
+
+<GLOBAL P-ADJN <>>
+<GLOBAL P-XADJN <>>
+
+"These three must be same length:"
+<GLOBAL P-MERGE <ITABLE 45 (BYTE) 0> ;<ITABLE NONE 23 ;45>>
+<GLOBAL P-PRSO <ITABLE 45 (BYTE) 0> ;<ITABLE NONE 23 ;45>>
+<GLOBAL P-PRSI <ITABLE 45 (BYTE) 0> ;<ITABLE NONE 23 ;45>>
+
+<GLOBAL P-BUTS <ITABLE 25 (BYTE) 0> ;<ITABLE NONE 12 ;25>>
+
+<GLOBAL P-OCL1 <ITABLE NONE 25>>
+<GLOBAL P-OCL2 <ITABLE NONE 25>>
+
+<CONSTANT P-MATCHLEN 0>
+
+<GLOBAL P-GETFLAGS 0>
+
+<CONSTANT P-ALL 1>
+<CONSTANT P-ONE 2>
+<CONSTANT P-INHIBIT 4>
+
+"<GLOBAL P-CSPTR <>>
+<GLOBAL P-CEPTR <>>"
+<GLOBAL P-AND:FLAG <>>
+
+"grabs the first adjective, unless it comes across a special-cased adjective:"
+<ROUTINE ADJ-CHECK (WRD ADJ "OPT" (NW <>))
+ <COND (<ZERO? .ADJ>
+ <RTRUE>)
+ (<EQUAL? .WRD ,W?RHINO ,W?BUFFALO> ;"STUFFED x HEAD"
+ <RTRUE>)
+ (<EQUAL? .WRD ,W?BLOND ,W?BLONDE> ;"TALL BLOND(E) MAN"
+ <RTRUE>)
+ (<EQUAL? .WRD ,W?FIRST ,W?SECOND>;"x CONTACT LENS (why needed?)"
+ <RTRUE>)
+ (<EQUAL? .NW ,W?OUTFIT> ;"MY x OUTFIT"
+ <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-NAM <>>
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>
+ <SETG P-AND <>>
+ <COND (<EQUAL? ,P-GETFLAGS ,P-ALL>
+ <SET WAS-ALL T>)>
+ <SETG P-GETFLAGS 0>
+ ;"<SETG P-CSPTR .PTR>
+ <SETG P-CEPTR .EPTR>"
+ <PUT/B ,P-BUTS ,P-MATCHLEN 0>
+ <PUT/B .TBL ,P-MATCHLEN 0>
+ <SET WRD <GET .PTR 0>>
+ <REPEAT ()
+ <COND (<==? .PTR .EPTR>
+ <SET WV <GET-OBJECT <OR .BUT .TBL>>>
+ <COND (.WAS-ALL <SETG P-GETFLAGS ,P-ALL>)>
+ <RETURN .WV>)
+ (T
+ <COND (<==? .EPTR <REST .PTR ,P-WORDLEN>>
+ <SET NW 0>)
+ (T <SET NW <GET .PTR ,P-LEXELEN>>)>
+ <COND (<EQUAL? .WRD ,W?ALL ;,W?BOTH>
+ <SETG P-GETFLAGS ,P-ALL>
+ <COND (<==? .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/B .BUT ,P-MATCHLEN 0>)
+ (<BUZZER-WORD? .WRD .PTR>
+ <RFALSE>)
+ (<EQUAL? .WRD ,W?A ,W?ONE>
+ <COND (<ZERO? ,P-ADJ>
+ <SETG P-GETFLAGS ,P-ONE>
+ <COND (<==? .NW ,W?OF>
+ <SET PTR <REST .PTR ,P-WORDLEN>>)>)
+ (T
+ <SETG P-NAM .ONEOBJ>
+ <COND (<NOT <GET-OBJECT <OR .BUT .TBL>>>
+ <RFALSE>)>
+ <AND <0? .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>)>
+ T)
+ (<WT? .WRD ,PS?BUZZ-WORD>)
+ (<EQUAL? .WRD ,W?AND ,W?COMMA>)
+ (<==? .WRD ,W?OF>
+ <COND (<0? ,P-GETFLAGS>
+ <SETG P-GETFLAGS ,P-INHIBIT>)>)
+ (<AND <SET WV <WT? .WRD ,PS?ADJECTIVE ,P1?ADJECTIVE>>
+ <ADJ-CHECK .WRD ,P-ADJ .NW ;,P-ADJN>
+ <NOT <EQUAL? .NW ,W?OF>>>
+ <SETG P-ADJ .WV>
+ <SETG P-ADJN .WRD>)
+ (<WT? .WRD ,PS?OBJECT ;,P1?OBJECT>
+ <SETG P-NAM .WRD>
+ <SET ONEOBJ .WRD>)>)>
+ <COND (<NOT <==? .PTR .EPTR>>
+ <SET PTR <REST .PTR ,P-WORDLEN>>
+ <SET WRD .NW>)>>>
+
+<CONSTANT SH 128>
+<CONSTANT SC 64>
+<CONSTANT SIR 32>
+<CONSTANT SOG 16>
+<CONSTANT STAKE 8>
+<CONSTANT SMANY 4>
+<CONSTANT SHAVE 2>
+
+<ROUTINE RESOLVE-YOUR-HER-HIS ("AUX" (OBJ 0))
+ <COND (<EQUAL? ,P-ADJN ,W?YOUR>
+ <COND (<NOT <==? ,WINNER ,PLAYER>>
+ <SET OBJ ,WINNER>)
+ ;(T <SET OBJ <QCONTEXT-GOOD?>>)>)
+ (<EQUAL? ,P-ADJN ,W?HER>
+ <SET OBJ ,P-HER-OBJECT>)
+ (<EQUAL? ,P-ADJN ,W?HIS>
+ <SET OBJ ,P-HIM-OBJECT>)>
+ <COND (<T? .OBJ>
+ <SETG P-ADJN <GET ,CHAR-POSS-TABLE
+ <+ 1 <GETP .OBJ ,P?CHARACTER>>>>
+ <SETG P-ADJ <WT? ,P-ADJN ,PS?ADJECTIVE ,P1?ADJECTIVE>>)>>
+
+<ROUTINE GET-OBJECT (TBL
+ "OPTIONAL" (VRB T)
+ "AUX" BTS LEN XBITS TLEN (GCHECK <>) (OLEN 0) (OBJ 0) (ADJ 0))
+ <SET XBITS ,P-SLOCBITS>
+ <SET TLEN <GET/B .TBL ,P-MATCHLEN>>
+ <COND (<BTST ,P-GETFLAGS ,P-INHIBIT> <RTRUE>)>
+ <COND (<AND <EQUAL? ,P-ADJN ,W?YOUR ,W?HER ,W?HIS>
+ <T? ,P-NAM>>
+ <RESOLVE-YOUR-HER-HIS>)>
+ <SET ADJ ,P-ADJN>
+ <COND (<AND <NOT ,P-NAM> ,P-ADJ>
+ <COND (<WT? ,P-ADJN ,PS?OBJECT>
+ <SETG P-NAM ,P-ADJN>
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>)
+ (<SET BTS <WT? ,P-ADJN ,PS?DIRECTION ,P1?DIRECTION>>
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>
+ <PUT/B .TBL ,P-MATCHLEN 1>
+ <PUT/B .TBL 1 ,INTDIR>
+ <SETG P-DIRECTION .BTS>
+ <RTRUE>)>)>
+ <COND (<AND <ZERO? ,P-NAM>
+ <ZERO? ,P-ADJ>
+ <NOT <==? ,P-GETFLAGS ,P-ALL>>
+ <0? ,P-GWIMBIT>>
+ <COND (.VRB <MISSING "noun" .ADJ>)>
+ <RFALSE>)>
+ <COND (<OR <NOT <==? ,P-GETFLAGS ,P-ALL>> <0? ,P-SLOCBITS>>
+ <SETG P-SLOCBITS -1>)>
+ <SETG P-TABLE .TBL>
+ <PROG ()
+ <COND (.GCHECK
+ <GLOBAL-CHECK .TBL>)
+ (T
+ <COND (<T? ,LIT>
+ ;<COND (<EQUAL? ,HERE ,CAR>
+ <DO-SL <GETP ,HERE ,P?STATION> ,SOG ,SIR ;.TBL>)>
+ ;<COND (<AND <EQUAL? ,HERE ,COURTYARD>
+ <FIRST? ,FRONT-GATE> ;"for CLUE-4">
+ <SEARCH-LIST ,FRONT-GATE .TBL ,P-SRCALL>)>
+ <FCLEAR ,WINNER ;,PLAYER ,OPENBIT ;,TRANSBIT>
+ <DO-SL ,HERE ,SOG ,SIR ;.TBL>
+ <FSET ,WINNER ;,PLAYER ,OPENBIT ;,TRANSBIT>)>
+ <DO-SL ,WINNER ,SH ,SC ;.TBL>)>
+ <SET LEN <- <GET/B .TBL ,P-MATCHLEN> .TLEN>>
+ <COND (<BTST ,P-GETFLAGS ,P-ALL>)
+ (<AND <BTST ,P-GETFLAGS ,P-ONE>
+ <NOT <0? .LEN>>>
+ <COND (<NOT <==? .LEN 1>>
+ <PUT/B .TBL 1 <GET/B .TBL <RANDOM .LEN>>>
+ <TELL-I-ASSUME <GET/B .TBL 1>>)>
+ <PUT/B .TBL ,P-MATCHLEN 1>)
+ (<AND <NOT <EQUAL? ,P-GETFLAGS ,P-ALL>>
+ <OR <G? .LEN 1>
+ <AND <0? .LEN> <NOT <==? ,P-SLOCBITS -1>>>>>
+ <COND (<==? ,P-SLOCBITS -1>
+ <SETG P-SLOCBITS .XBITS>
+ <SET OLEN .LEN>
+ <PUT/B .TBL ,P-MATCHLEN <- <GET/B .TBL ,P-MATCHLEN> .LEN>>
+ <AGAIN>)
+ (T
+ <PUT-ADJ-NAM>
+ <COND (<0? .LEN> <SET LEN .OLEN>)>
+ <COND (<AND <G? .LEN 1>
+ ;,P-NAM
+ ;<REMOTE-VERB?>
+ <AND <SET OBJ <GET/B .TBL .LEN>>
+ <SET OBJ <APPLY <GETP .OBJ ,P?GENERIC>
+ .TBL .LEN>>>>
+ <COND (<==? .OBJ ,NOT-HERE-OBJECT>
+ <RFALSE>)
+ (<==? .OBJ ,ROOMS> ;"SWG put it here 7/17/86"
+ <SET LEN <GET/B .TBL ,P-MATCHLEN>>)
+ (T
+ <PUT/B .TBL ,P-MATCHLEN <SET LEN <+ .TLEN 1>>>
+ <PUT/B .TBL .LEN .OBJ>
+ ;<PUT/B .TBL 1 .OBJ>
+ ;<PUT/B .TBL ,P-MATCHLEN 1>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>
+ <RTRUE>)>)
+ (<AND .VRB ;".VRB added 8/14/84 by JW"
+ <NOT <==? ,WINNER ,PLAYER>>>
+ <MORE-SPECIFIC> ;<CANT-ORPHAN>
+ <RFALSE>)>
+ <COND (<AND .VRB <OR ,P-NAM ;,P-ADJ>>
+ <COND (<WHICH-PRINT .TLEN .LEN ;<GET/B .TBL 0> .TBL>
+ <COND (<==? .TBL ,P-PRSO>
+ <SETG P-ACLAUSE ,P-NC1>)
+ (T <SETG P-ACLAUSE ,P-NC2>)>
+ <SETG P-AADJ ,P-ADJ>
+ <SETG P-ANAM ,P-NAM>
+ <ORPHAN <> <>>
+ <SETG P-OFLAG T>)>)
+ (.VRB
+ <MISSING "noun" .ADJ>)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>
+ <RFALSE>)>)>
+ <COND (<AND <0? .LEN> .GCHECK>
+ <PUT-ADJ-NAM>
+ <COND (.VRB
+ <SETG P-SLOCBITS .XBITS>
+ <COND (<OR <T? ,LIT> <NOT <SEE-VERB?>>>
+ ;<OR ,LIT
+ <VERB? WAIT-FOR WAIT-UNTIL>
+ <SPEAKING-VERB?>
+ <GAME-VERB?>>
+ <OBJ-FOUND ,NOT-HERE-OBJECT .TBL>
+ <SETG P-XNAM ,P-NAM>
+ <SETG P-NAM <>>
+ <SETG P-XADJ ,P-ADJ>
+ <SETG P-XADJN ,P-ADJN>
+ ;"<SETG P-ADJ <>>
+ <SETG P-ADJN <>>"
+ <RTRUE>)
+ (T <TOO-DARK>)>)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>
+ <RFALSE>)
+ (<0? .LEN>
+ <SET GCHECK T>
+ <AGAIN>)>
+ <COND (<AND ,P-ADJ <NOT ,P-NAM>>
+ <SET OBJ <GET/B .TBL <+ .TLEN 1>>>
+ <TELL-I-ASSUME .OBJ>
+ <THIS-IS-IT .OBJ>)>
+ <SETG P-SLOCBITS .XBITS>
+ <PUT-ADJ-NAM>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>
+ <RTRUE>>>
+
+<ROUTINE GENERIC-CLUE-FCN (TBL "OPTIONAL" (LEN 0))
+ <COND (<VERB? FIND ;SEARCH SEARCH-FOR>
+ ,GENERIC-CLUE)
+ (T
+ <COND (<0? .LEN> <SET LEN <GET/B .TBL 0>>)>
+ <COND (<1? <SET LEN <PRUNE .TBL .LEN ,CLUE-TEST>>>
+ <GET/B .TBL 1>)
+ ;(<0? .LEN>
+ <TELL CHE ,PRSI do "n't have" HIM ,PRSO "!" CR>
+ ,NOT-HERE-OBJECT)
+ (T <RETURN ,ROOMS ;<>>)>)>>
+
+<ROUTINE CLUE-TEST (OBJ)
+ <COND (<AND ;<NOT <==? ,WINNER ,PLAYER>>
+ <IN? .OBJ ,WINNER>>
+ <RTRUE>)
+ (<AND <T? ,PRSI> ;"TAKE CLUE FROM JACK"
+ <IN? .OBJ ,PRSI>>
+ <RTRUE>)
+ (<==? .OBJ ,P-IT-OBJECT>
+ <RTRUE>)
+ ;(<NOT <FSET? .OBJ ,NDESCBIT>>
+ <RTRUE>)>>
+
+<ROUTINE GENERIC-STAIRS (X "OPTIONAL" Y) ;"in KITCHEN"
+ <COND (<VERB? BOARD CLIMB-DOWN CLIMB-UP>
+ ,STAIRS)
+ (T ,BACKSTAIRS)>>
+
+;<ROUTINE GENERIC-STAIRS-F (X "OPTIONAL" Y)
+ <COND ;(<EQUAL? ,HERE ,JUNCTION ,BASEMENT> ,STAIRS-0)
+ ;(<EQUAL? ,HERE ,OLD-GREAT-HALL> ,STAIRS-1)
+ ;(<EQUAL? ,HERE ,CORR-2>
+ <COND (<VERB? BOARD CLIMB-UP> ,STAIRS-2)
+ (<VERB? CLIMB-DOWN> ,STAIRS-1)>)
+ ;(<EQUAL? ,HERE ,CORR-3>
+ <COND (<VERB? BOARD CLIMB-UP> ,STAIRS-3)
+ (<VERB? CLIMB-DOWN> ,STAIRS-2)>)
+ ;(<EQUAL? ,HERE ,DECK> ,STAIRS-3)
+ (<FSET? ,HERE ,WEARBIT> ;"WING-ROOMS" ,STAIRS-NEW)>>
+
+<ROUTINE GENERIC-CLOTHES (X "OPTIONAL" Y)
+ <COND (<VERB? CHANGE REMOVE ;TAKE TAKE-OFF>
+ ,NOW-WEARING)>>
+
+"use of WINDOW in CAR in COURTYARD:"
+;<ROUTINE GENERIC-WINDOW (X "OPTIONAL" Y)
+ <COND (<GLOBAL-IN? ,WINDOW ,HERE>
+ ,WINDOW)>>
+
+;<ROUTINE GENERIC-JACK-DOOR-F (X "OPTIONAL" Y)
+ <COND (<NOT <FSET? ,SECRET-JACK-DOOR ,TOUCHBIT>>
+ ,JACK-ROOM ;,JACK-DOOR)
+ (<VERB? OPEN CLOSE>
+ ,JACK-ROOM ;,JACK-DOOR)>>
+
+;<ROUTINE GENERIC-LIBRARY-DOOR-F (X "OPTIONAL" Y)
+ <COND (<NOT <FSET? ,SECRET-LIBRARY-DOOR ,TOUCHBIT>>
+ ,LIBRARY ;,LIBRARY-DOOR)
+ (<VERB? OPEN CLOSE>
+ ,LIBRARY ;,LIBRARY-DOOR)>>
+
+;<ROUTINE GENERIC-TAMARA-DOOR-F (X "OPTIONAL" Y)
+ <COND (<NOT <FSET? ,SECRET-TAMARA-DOOR ,TOUCHBIT>>
+ ,TAMARA-ROOM ;,TAMARA-DOOR)
+ (<VERB? OPEN CLOSE>
+ ,TAMARA-ROOM ;,TAMARA-DOOR)>>
+
+;<ROUTINE GENERIC-LUMBER-DOOR-F (X "OPTIONAL" Y)
+ <COND (<NOT <FSET? ,SECRET-LUMBER-DOOR ,TOUCHBIT>>
+ ,LUMBER-ROOM ;,LUMBER-DOOR)
+ (<VERB? OPEN CLOSE>
+ ,LUMBER-ROOM ;,LUMBER-DOOR)>>
+
+<ROUTINE GENERIC-CLOSET (TBL "OPTIONAL" (LEN 0) "AUX" N)
+ <COND (<SET N <ZMEMQ ,HERE ,CHAR-ROOM-TABLE ,CHARACTER-MAX>>
+ <RETURN <GET ,CHAR-CLOSET-TABLE .N>>)
+ (<0? .TBL>
+ <RFALSE>)>
+ <COND (<ZMEMQ/B ,HERE .TBL>
+ <RETURN ,HERE>)>
+ <COND (<0? .LEN>
+ <SET LEN <GET/B .TBL 0>>)>
+ <COND (<0? <SET LEN <PRUNE .TBL .LEN ,NOT-SECRET-TEST>>>
+ <TELL "(You haven't found a secret entrance yet!)" CR>
+ ,NOT-HERE-OBJECT)
+ (<1? .LEN>
+ <GET/B .TBL 1>)
+ (T <RETURN ,ROOMS ;<>>)>>
+
+<ROUTINE GENERIC-DINNER (X "OPTIONAL" Y)
+ <COND (<OR <REMOTE-VERB?>
+ <VERB? EXAMINE>>
+ ,DINNER)
+ (<AND <EQUAL? ,P-ADJ <> ,A?MY>
+ <EQUAL? ,P-XADJ <> ,A?MY>>
+ ,DINNER)
+ ;(<NOT <VISIBLE? ,DINNER>>
+ <NOT-HERE ,DINNER>
+ ,NOT-HERE-OBJECT)
+ (T
+ <SETG CLOCK-WAIT T>
+ <TELL "(That wouldn't be polite!)" CR>
+ ,NOT-HERE-OBJECT)>>
+
+<ROUTINE GENERIC-BEDROOM (TBL "OPTIONAL" (N 0) "AUX" RM)
+ <COND (<ZERO? .N>
+ <SET N <GET/B .TBL ,P-MATCHLEN>>)>
+ <COND (<ZMEMQ/B ,P-IT-OBJECT .TBL>
+ <RETURN ,P-IT-OBJECT>)
+ (<ZMEMQ/B ,HERE .TBL>
+ <RETURN ,HERE>)
+ (<AND <EQUAL? ,A?JACK\'S ,P-ADJ ,P-XADJ>
+ <EQUAL? ,W?DOOR ,P-NAM ,P-XNAM>>
+ <RETURN ,JACK-ROOM>)
+ (<REMOTE-VERB?>
+ <COND (<EQUAL? ,A?BATH ,P-ADJ ,P-XADJ>
+ <RETURN ,YOUR-BATHROOM>)
+ (<EQUAL? ,W?ROOM ,P-NAM ,P-XNAM>
+ <RETURN ,YOUR-ROOM>)>)
+ (<EQUAL? ,HERE ,GALLERY ,YOUR-BATHROOM>
+ <RETURN ,YOUR-ROOM>)
+ (<ZMEMQ ,HERE ,CHAR-ROOM-TABLE>
+ <RETURN ,HERE>)
+ (<SET RM <ZMEMQ ,HERE ,CHAR-CLOSET-TABLE>>
+ <COND (<EQUAL? ,W?DOOR ,P-NAM ,P-XNAM>
+ <RETURN <FIND-FLAG-LG ,HERE ,DOORBIT>>)
+ (T <RETURN <GET ,CHAR-ROOM-TABLE .RM>>)>)
+ (<VERB? CLIMB-DOWN CLIMB-UP WALK-TO>
+ <RETURN ,YOUR-ROOM>)
+ (T
+ <REPEAT ()
+ <COND (<EQUAL? ,HERE <GETP <SET RM <GET/B .TBL .N>>,P?STATION>>
+ <RETURN .RM>)
+ (<DLESS? N 1>
+ <RETURN>)>>)>
+ <COND (<EQUAL? ,WINNER ,FRIEND ,LORD>
+ <RETURN ,YOUR-ROOM>)
+ (T <RFALSE>)>>
+
+<ROUTINE GENERIC-GREAT-HALL (X "OPTIONAL" Y)
+ <COND (<EQUAL? ,W?ROOM ,P-NAM ,P-XNAM>
+ ,HERE) ;"kludge!"
+ (<FSET? ,HERE ,WEARBIT> ;"WING-ROOMS"
+ ,GREAT-HALL)
+ (T ,OLD-GREAT-HALL)>>
+
+;<ROUTINE GENERIC-CAR (X "OPTIONAL" Y) ,CAR>
+
+<ROUTINE GENERIC-LENS (X "OPTIONAL" Y)
+ <COND (<REMOTE-VERB?>
+ ,LENS)
+ (<NOT <FSET? ,LENS-2 ,SEENBIT>>
+ ,LENS-1)>>
+
+;<ROUTINE GENERIC-PAINTING (X "OPTIONAL" Y)
+ <COND (<FSET? ,HYDE-IOU ,TOUCHBIT>
+ ,OIL-PAINTING)>>
+
+<ROUTINE GENERIC-RECORDER (X "OPTIONAL" Y)
+ <COND (<NOT <FSET? ,JACK-TAPE ,SEENBIT>>
+ ,RECORDER)>>
+
+<ROUTINE GENERIC-BOX (X "OPTIONAL" Y)
+ <COND (<FSET? ,LENS-BOX ,SECRETBIT>
+ ,VIVIEN-BOX)>>
+
+<ROUTINE GENERIC-BOOK (X "OPTIONAL" Y)
+ <COND (<EQUAL? ,HERE ,LIBRARY>
+ ,BOOKS-GLOBAL)>>
+
+<ROUTINE GENERIC-WELL (X "OPTIONAL" Y)
+ <COND (<NOT <EQUAL? ,HERE ,BASEMENT>>
+ ,WELL)>>
+
+<ROUTINE GENERIC-SKELETON (X "OPTIONAL" Y)
+ <COND (<FSET? ,SKELETON ,SEENBIT>
+ ,SKELETON)>>
+
+<ROUTINE GENERIC-ROOM (X "OPTIONAL" Y) ,GLOBAL-HERE>
+
+<ROUTINE GENERIC-EYE (X "OPTIONAL" Y)
+ <COND (<EQUAL? ,W?EYE ,P-NAM ,P-XNAM>
+ ,GLASS-EYE)>>
+
+<ROUTINE GENERIC-BELL (X "OPTIONAL" Y)
+ <COND (<REMOTE-VERB?> ,BELL)>>
+
+<ROUTINE GENERIC-WINE (X "OPTIONAL" Y)
+ <COND (<VERB? TAKE> ,BOTTLE)>>
+
+<ROUTINE SPEAKING-VERB? ("OPTIONAL" (PER 0))
+ <COND (<VERB? ANSWER ASK ASK-ABOUT ASK-FOR FORGIVE
+ ;GOODBYE HELLO NO REPLY SORRY TELL TELL-ABOUT YES $CALL>
+ <COND (<EQUAL? .PER 0 ,PRSO>
+ <RTRUE>)>)
+ (<VERB? ASK-CONTEXT-ABOUT ASK-CONTEXT-FOR TALK-ABOUT>
+ <COND (<EQUAL? .PER 0>
+ <RTRUE>)>)>>
+
+;<ROUTINE CANT-ORPHAN ()
+ <TELL "[Please try saying that another way.]" CR>
+ <RFALSE>>
+
+<ROUTINE MISSING (NV "OPTIONAL" ADJ)
+ <COND ;(<EQUAL? .ADJ ,W?INT.NUM ;NUMBER>
+ <TELL "[Please use units with numbers.]" CR>)
+ (T <TELL
+"[I think there's a " .NV " missing in that sentence!]" CR>)>>
+
+<ROUTINE WHICH-PRINT (TLEN LEN TBL "AUX" OBJ RLEN)
+ ;%<DEBUG-CODE <TELL
+"{Note to Stu: TLEN=" N .TLEN " LEN=" N .LEN " TBL=" N .TBL "}" CR>>
+ <COND (<ZERO? .LEN>
+ <MORE-SPECIFIC ;REFERRING>
+ <RFALSE>)>
+ <SET RLEN .LEN>
+ <COND (<NOT <==? ,WINNER ,PLAYER>>
+ <TELL "\"I don't understand ">
+ <COND (<EQUAL? ,P-NAM ,W?DOOR>
+ <TELL "which door">)
+ ;(<EQUAL? ,P-NAM ,W?KEYHOLE>
+ <TELL "which " 'KEYHOLE>)
+ (T
+ <TELL "if">)>
+ <TELL " you mean">)
+ (T
+ <TELL "[Which">
+ <COND (<OR <T? ,P-OFLAG> <T? ,P-MERGED> <T? ,P-AND>>
+ <TELL !\ >
+ <PRINTB ,P-NAM>)
+ (<EQUAL? .TBL ,P-PRSO>
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L <>>)
+ (T
+ <CLAUSE-PRINT ,P-NC2 ,P-NC2L <>>)>
+ <TELL " do you mean">
+ <COND (<NOT <EQUAL? ,P-NAM ,W?DOOR ;,W?KEYHOLE>>
+ <TELL ",">)>)>
+ <COND (<NOT <EQUAL? ,P-NAM ,W?DOOR ;,W?KEYHOLE>>
+ <REPEAT ()
+ <SET TLEN <+ .TLEN 1>>
+ <SET OBJ <GET/B .TBL .TLEN>>
+ <TELL THE .OBJ>
+ <COND (<==? .LEN 2>
+ <COND (<NOT <==? .RLEN 2>> <TELL !\,>)>
+ <TELL " or">)
+ (<G? .LEN 2> <TELL !\,>)>
+ <COND (<L? <SET LEN <- .LEN 1>> 1>
+ <RETURN>)>>)>
+ <COND (<NOT <==? ,WINNER ,PLAYER>>
+ <TELL ".\"" CR>)
+ (T
+ <TELL "?]" CR>)>>
+
+<ROUTINE GLOBAL-SEARCH (TBL RMG "AUX" CNT OBJ)
+ <SET CNT <RMGL-SIZE .RMG>>
+ <REPEAT ()
+ <SET OBJ <GET/B .RMG .CNT>>
+ ;<COND (<AND <EQUAL? .OBJ ,FRONT-GATE> ;"for CLUE-4"
+ <FIRST? .OBJ>>
+ <SEARCH-LIST .OBJ .TBL ,P-SRCALL>)>
+ <COND (<THIS-IT? .OBJ>
+ <OBJ-FOUND .OBJ .TBL>)>
+ <COND (<DLESS? CNT 0> <RETURN>)>>>
+
+<ROUTINE GLOBAL-CHECK (TBL "AUX" LEN RMG RMGL (CNT 0) ;OBJ OBITS FOO)
+ <SET LEN <GET/B .TBL ,P-MATCHLEN>>
+ <SET OBITS ,P-SLOCBITS>
+ <COND (<SET RMG <GETPT ,HERE ,P?GLOBAL>>
+ <GLOBAL-SEARCH .TBL .RMG>)>
+ <COND (<NOT <EQUAL? ,P-NAM ,W?DOOR ;,W?KEYHOLE>>
+ <COND (<AND <THIS-IT? ,HERE>
+ <NOT <ZMEMQ/B ,HERE .TBL>>>
+ <OBJ-FOUND ,HERE .TBL>)>
+ <COND (<VERB? BOARD CLIMB-DOWN CLIMB-UP EXAMINE LOOK-INSIDE
+ ;"SEARCH SEARCH-FOR SMELL" THROUGH>
+ <ROOM-SEARCH .TBL>)>)>
+ <COND (<SET RMG <GETP ,HERE ,P?THINGS>>
+ <SET RMGL <GET .RMG 0>>
+ <SET CNT 0>
+ <REPEAT ()
+ <COND (<AND <EQUAL? ,P-NAM <GET .RMG <+ .CNT 1>>>
+ <OR <ZERO? ,P-ADJ>
+ <EQUAL? ,P-ADJN <GET .RMG <+ .CNT 2>>>>>
+ <SETG LAST-PSEUDO-LOC ,HERE>
+ <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 (<==? <GET/B .TBL ,P-MATCHLEN> .LEN>
+ <SETG P-SLOCBITS -1>
+ <SETG P-TABLE .TBL>
+ <DO-SL ,GLOBAL-OBJECTS 1 1 ;.TBL>
+ <SETG P-SLOCBITS .OBITS>
+ <COND (<0? <GET/B .TBL ,P-MATCHLEN>>
+ <COND (<VERB? ;$WHERE CLIMB-DOWN CLIMB-UP FIND
+ SHOW SSHOW TAKE-TO THROUGH WALK-TO>
+ <SEARCH-LIST ,ROOMS ,P-TABLE ,P-SRCTOP>
+ ;<DO-SL ,ROOMS 1 1 ;.TBL>)>)>)>>
+
+<ROUTINE DO-SL (OBJ BIT1 BIT2 "AUX" BITS)
+ <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>)>)>>
+
+<GLOBAL P-TABLE:TABLE 0>
+<CONSTANT P-SRCBOT 2>
+<CONSTANT P-SRCTOP 0>
+<CONSTANT P-SRCALL 1>
+
+<ROUTINE SEARCH-LIST (OBJ TBL LVL)
+ <COND (<SET OBJ <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<AND <NOT <==? .LVL ,P-SRCBOT>>
+ ;<GETPT .OBJ ,P?SYNONYM>
+ <THIS-IT? .OBJ>>
+ <OBJ-FOUND .OBJ .TBL>)>
+ <COND (<AND <OR <NOT <==? .LVL ,P-SRCTOP>>
+ <FSET? .OBJ ,SEARCHBIT>
+ <FSET? .OBJ ,SURFACEBIT>>
+ <FIRST? .OBJ>
+ ;<OR ,P-MOBY-FLAG
+ <SEE-INSIDE? .OBJ>>
+ <OR <FSET? .OBJ ,OPENBIT>
+ <FSET? .OBJ ,TRANSBIT>
+ ,P-MOBY-FLAG
+ <AND <FSET? .OBJ ,PERSONBIT>
+ <NOT <==? .OBJ ,WINNER ;,PLAYER>>>>
+ ;<NOT <EQUAL? .OBJ ,PLAYER ,LOCAL-GLOBALS>>>
+ <SEARCH-LIST .OBJ .TBL
+ <COND (<FSET? .OBJ ,SURFACEBIT> ,P-SRCALL)
+ (<FSET? .OBJ ,SEARCHBIT> ,P-SRCALL)
+ (T ,P-SRCTOP)>
+ ;,P-MOBY-FLAG>)>
+ <COND (<SET OBJ <NEXT? .OBJ>>) (T <RETURN>)>>)>>
+
+<ROUTINE ROOM-SEARCH (TTBL "AUX" (P 0) L TBL O)
+ <SET O <CORRIDOR-LOOK ,ROOMS>>
+ <COND (<T? .O>
+ <OBJ-FOUND .O .TTBL>)>
+ <REPEAT ()
+ <COND (<OR <0? <SET P <NEXTP ,HERE .P>>>
+ <L? .P ,LOW-DIRECTION>>
+ <RFALSE>)>
+ <SET TBL <GETPT ,HERE .P>>
+ <SET L <PTSIZE .TBL>>
+ <SET O <GET-REXIT-ROOM .TBL>>
+ <COND (<ZMEMQ/B .O .TTBL>
+ <AGAIN>)
+ (<==? .L ,UEXIT>
+ <COND (<THIS-IT? .O>
+ <OBJ-FOUND .O .TTBL>)>)
+ (<==? .L ,DEXIT>
+ <COND (<AND <FSET? <GET-DOOR-OBJ .TBL> ,OPENBIT>
+ <THIS-IT? .O>>
+ <OBJ-FOUND .O .TTBL>)>)
+ (<==? .L ,CEXIT>
+ <COND (<AND <VALUE <GETB .TBL ,CEXITFLAG>>
+ <THIS-IT? .O>>
+ <OBJ-FOUND .O .TTBL>)>)>>>
+
+<ROUTINE THIS-IT? (OBJ "AUX" SYNS)
+ <COND (<FSET? .OBJ ,INVISIBLE>
+ <RFALSE>)
+ (<AND <T? ,P-NAM>
+ <OR <NOT <SET SYNS <GETPT .OBJ ,P?SYNONYM>>>
+ <NOT <ZMEMQ ,P-NAM .SYNS <- </ <PTSIZE .SYNS> 2> 1>>>>>
+ <RFALSE>)
+ (<AND <T? ,P-ADJ>
+ <OR <NOT <SET SYNS <GETPT .OBJ ,P?ADJECTIVE>>>
+ <NOT %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '<ZMEMQ ,P-ADJ .SYNS <RMGL-SIZE .SYNS>>)
+ (T
+ '<ZMEMQB ,P-ADJ .SYNS <RMGL-SIZE .SYNS>>)>>>>
+ <RFALSE>)
+ (<AND <NOT <0? ,P-GWIMBIT>> <NOT <FSET? .OBJ ,P-GWIMBIT>>>
+ <RFALSE>)>
+ <RTRUE>>
+
+<ROUTINE OBJ-FOUND (OBJ TBL "AUX" PTR)
+ <COND (<AND <NOT <==? .OBJ ,NOT-HERE-OBJECT>>
+ <ZMEMQ/B .OBJ .TBL>>
+ <RFALSE>)>
+ <SET PTR <GET/B .TBL ,P-MATCHLEN>>
+ <INC PTR>
+ <PUT/B .TBL .PTR .OBJ>
+ <PUT/B .TBL ,P-MATCHLEN .PTR>>
+
+<ROUTINE TAKE-CHECK ()
+ <AND <ITAKE-CHECK ,P-PRSO <GETB ,P-SYNTAX ,P-SLOC1>>
+ <ITAKE-CHECK ,P-PRSI <GETB ,P-SYNTAX ,P-SLOC2>>>>
+
+<ROUTINE ITAKE-CHECK (TBL BITS "AUX" PTR OBJ TAKEN)
+ <COND (<AND <SET PTR <GET/B .TBL ,P-MATCHLEN>>
+ <OR <BTST .BITS ,SHAVE>
+ <BTST .BITS ,STAKE>>
+ ;<EQUAL? ,WINNER ,PLAYER>>
+ <REPEAT ()
+ <COND (<L? <SET PTR <- .PTR 1>> 0> <RETURN>)>
+ <SET OBJ <GET/B .TBL <+ .PTR 1>>>
+ <COND (<==? .OBJ ,IT>
+ <COND (<NOT <ACCESSIBLE? ,P-IT-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-IT-OBJECT>)>)
+ (<==? .OBJ ,HER>
+ <COND (<NOT <ACCESSIBLE? ,P-HER-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-HER-OBJECT>)>)
+ (<==? .OBJ ,HIM>
+ <COND (<NOT <ACCESSIBLE? ,P-HIM-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-HIM-OBJECT>)>)
+ ;(<==? .OBJ ,THEM>
+ <COND (<NOT <ACCESSIBLE? ,P-THEM-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-THEM-OBJECT>)>)>
+ <COND (<AND <NOT <HELD? .OBJ ,WINNER>>
+ <NOT <EQUAL? .OBJ ,HANDS ,ROOMS>>>
+ <SETG PRSO .OBJ>
+ <COND (<FSET? .OBJ ,TRYTAKEBIT>
+ <SET TAKEN T>)
+ (<NOT <==? ,WINNER ,PLAYER>>
+ <SET TAKEN <>>)
+ (<AND <BTST .BITS ,STAKE>
+ <==? <ITAKE <>> T>>
+ <SET TAKEN <>>)
+ (T <SET TAKEN T>)>
+ <COND (<AND .TAKEN <BTST .BITS ,SHAVE>>
+ <TELL !\(>
+ <TELL CHE ,WINNER is "n't holding">
+ <COND (<L? 1 <GET/B .TBL ,P-MATCHLEN>>
+ <TELL ;" all" " those things">)
+ (<EQUAL? .OBJ ,NOT-HERE-OBJECT>
+ <TELL " that">)
+ (T
+ <TELL THE .OBJ>
+ <THIS-IS-IT .OBJ>)>
+ <TELL "!)" CR>
+ <RFALSE>)
+ ;(<AND <NOT .TAKEN> <==? ,WINNER ,PLAYER>>
+ <FIRST-YOU "take" .OBJ ;,PRSO ,ITAKE-LOC>)>)>>)
+ (T)>>
+
+<ROUTINE MANY-CHECK ("AUX" (LOSS <>) TMP)
+ <COND (<AND <G? <GET/B ,P-PRSO ,P-MATCHLEN> 1>
+ <NOT <BTST <GETB ,P-SYNTAX ,P-SLOC1> ,SMANY>>>
+ <SET LOSS 1>)
+ (<AND <G? <GET/B ,P-PRSI ,P-MATCHLEN> 1>
+ <NOT <BTST <GETB ,P-SYNTAX ,P-SLOC2> ,SMANY>>>
+ <SET LOSS 2>)>
+ <COND (.LOSS
+ <COND ;(<NOT <EQUAL? ,WINNER ,PLAYER>>
+ <TELL "\"Please, to me simple English speak.\"" CR>
+ <RFALSE>)
+ (T
+ <TELL "[You can't use more than one ">
+ <COND (<==? .LOSS 2> <TELL "in">)>
+ <TELL "direct object with \"">
+ <SET TMP <GET ,P-ITBL ,P-VERBN>>
+ <COND (<0? .TMP> <TELL "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)>>
+
+<ROUTINE ZMEMQ (ITM TBL "OPTIONAL" (SIZE -1) "AUX" (CNT 1))
+ <COND (<NOT .TBL> <RFALSE>)>
+ <COND (<NOT <L? .SIZE 0>> <SET CNT 0>)
+ (ELSE
+ <SET SIZE <GET .TBL 0>>
+ <COND (<NOT <G? .SIZE 0>>
+ <RFALSE>)>)>
+ <REPEAT ()
+ <COND (<==? .ITM <GET .TBL .CNT>>
+ <COND (<0? .CNT> <RTRUE>)
+ (T <RETURN .CNT>)>)
+ (<IGRTR? CNT .SIZE> <RFALSE>)>>>
+
+<ROUTINE ZMEMQB (ITM TBL "OPTIONAL" (SIZE -1) "AUX" (CNT 1))
+ <COND (<NOT .TBL> <RFALSE>)>
+ <COND (<NOT <L? .SIZE 0>> <SET CNT 0>)
+ (ELSE
+ <SET SIZE <GETB .TBL 0>>
+ <COND (<NOT <G? .SIZE 0>>
+ <RFALSE>)>)>
+ <REPEAT ()
+ <COND (<==? .ITM <GETB .TBL .CNT>>
+ <COND (<0? .CNT> <RTRUE>)
+ (T <RETURN .CNT>)>)
+ (<IGRTR? CNT .SIZE> <RFALSE>)>>>
+
+;<ROUTINE ZMEMQB (ITM TBL SIZE "AUX" (CNT 0))
+ <REPEAT ()
+ <COND (<==? .ITM <GETB .TBL .CNT>>
+ <COND (<0? .CNT> <RTRUE>)
+ (T <RETURN .CNT>)>)
+ (<IGRTR? CNT .SIZE> <RFALSE>)>>>
+
+<GLOBAL LIT:OBJECT DRIVEWAY ;CAR> "source of light, 0=dark"
+ ;"2=light here, 1=light from next room, 0=dark"
+
+<ROUTINE LIT? ("OPTIONAL" (RM <>) (RMBIT <>) "AUX" OHERE (LIT <>) (P 0) TBL L)
+ <COND (<ZERO? .RM>
+ <SET RM ,HERE>)>
+ <COND (<T? .RMBIT>
+ <COND (<NOT <FSET? .RM ,ONBIT>>
+ <RETURN <>>)
+ (T <RETURN .RM>)>)>
+ <COND (<FSET? .RM ,ONBIT>
+ <SET LIT .RM>)
+ (T
+ <SETG P-GWIMBIT ,ONBIT>
+ <SET OHERE ,HERE>
+ <SETG HERE .RM>
+ <PUT/B ,P-MERGE ,P-MATCHLEN 0>
+ <SETG P-TABLE ,P-MERGE>
+ <SETG P-SLOCBITS -1>
+ ;<COND (<==? .OHERE .RM>
+ <DO-SL ,WINNER 1 1>
+ <COND (<AND <NOT <EQUAL? ,WINNER ,PLAYER>>
+ <IN? ,PLAYER .RM>>
+ <DO-SL ,PLAYER 1 1>)>)>
+ <SEARCH-LIST .RM ,P-TABLE ,P-SRCALL>
+ ;<DO-SL .RM 1 1>
+ <COND (<NOT <ZERO? <GET/B ,P-MERGE ,P-MATCHLEN>>>
+ <SET LIT <GET/B ,P-MERGE 1>>)>
+ <SETG HERE .OHERE>
+ <SETG P-GWIMBIT 0>)>
+ <COND (<T? .LIT> <RETURN .LIT>)
+ (<AND <==? .RM ,GALLERY-CORNER>
+ <FSET? ,GALLERY ,ONBIT>>
+ <RETURN ,GALLERY>)
+ (T
+ <REPEAT ()
+ <COND (<0? <SET P <NEXTP .RM .P>>>
+ <RETURN <>>)
+ (<EQUAL? .P ,P?UP ,P?DOWN>
+ <AGAIN>) ;"not up or down stairs"
+ (<NOT <L? .P ,LOW-DIRECTION>>
+ <SET TBL <GETPT .RM .P>>
+ <SET L <PTSIZE .TBL>>
+ <SET OHERE <GET-REXIT-ROOM .TBL>>
+ <COND (<AND <==? .L ,UEXIT>
+ <LIT? .OHERE T>>
+ <RETURN .OHERE>)
+ (<AND <==? .L ,DEXIT>
+ <FSET? <GET-DOOR-OBJ .TBL> ,OPENBIT>
+ <LIT? .OHERE T>>
+ <RETURN .OHERE>)
+ (<AND <==? .L ,CEXIT>
+ <VALUE <GETB .TBL ,CEXITFLAG>>
+ <LIT? .OHERE T>>
+ <RETURN .OHERE>)>)>>)>>
+
+;<ROUTINE VPRINT ("AUX" TMP)
+ <SET TMP <GET ,P-OTBL ,P-VERBN>>
+ <COND (<==? .TMP 0> <TELL "tell">)
+ (<0? <GETB ,P-VTBL 2>>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>)>>
+
+<ROUTINE NOT-HERE (OBJ "OPT" (CLOCK <>))
+ <COND (<ZERO? .CLOCK>
+ <SETG CLOCK-WAIT T>
+ <TELL !\(>)>
+ <TELL CTHE .OBJ " isn't ">
+ <COND (<VISIBLE? .OBJ>
+ <TELL "close enough">
+ <COND (<SPEAKING-VERB?> <TELL " to hear you">)>
+ <TELL !\.>)
+ (T <TELL "here!">)>
+ <THIS-IS-IT .OBJ>
+ <COND (<ZERO? .CLOCK>
+ <TELL !\)>)>
+ <CRLF>>
+
+;<ROUTINE NOT-HERE (OBJ "OPT" (CLOCK <>))
+ <COND (<ZERO? .CLOCK>
+ <SETG CLOCK-WAIT T>
+ <TELL !\(>)>
+ <TELL "You can't see ">
+ <COND (<NOT <FSET? .OBJ ,NARTICLEBIT>> <TELL "any ">)>
+ <THIS-IS-IT .OBJ>
+ <TELL D .OBJ " here.">
+ <COND (<ZERO? .CLOCK>
+ <TELL !\)>)>
+ <CRLF>>
+
+<OBJECT HER
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM ;SHE HER MADAM)
+ (DESC "her")
+ (FLAGS NARTICLEBIT)>
+
+<OBJECT HIM
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM ;HE HIM SIR)
+ (DESC "him")
+ (FLAGS NARTICLEBIT)>
+
+;<OBJECT THEM
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM THEY THEM)
+ (DESC "them")
+ (FLAGS NARTICLEBIT)>
+
+<GLOBAL QCONTEXT:OBJECT <>>
+;<GLOBAL QCONTEXT-ROOM:OBJECT <>>
+<GLOBAL LAST-PSEUDO-LOC:OBJECT <>>
+<GLOBAL I-ASSUME "[I assume you mean:">
+
+<OBJECT INTDIR
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM DIRECTION)
+ (ADJECTIVE NORTH EAST SOUTH WEST NE NW SE SW)
+ (DESC ;"compass " "direction")>
+
+<ROUTINE PUT-ADJ-NAM ()
+ <COND (<NOT <EQUAL? ,P-NAM ,W?IT ,W?HIM ,W?HER>>
+ <PUT ,P-NAMW ,P-PHR ,P-NAM>
+ <PUT ,P-ADJW ,P-PHR ,P-ADJN>)>>
+
+<ROUTINE NOUN-USED? (WORD1 "OPTIONAL" (WORD2 1) (WORD3 1))
+ <COND (<ZERO? ,NOW-PRSI>
+ <COND (<EQUAL? <GET ,P-NAMW 0> .WORD1 .WORD2 .WORD3>
+ <RTRUE>)
+ (<EQUAL? <GET ,P-OFW 0> .WORD1 .WORD2 .WORD3>
+ <RTRUE>)>)
+ (T
+ <COND (<EQUAL? <GET ,P-NAMW 1> .WORD1 .WORD2 .WORD3>
+ <RTRUE>)
+ (<EQUAL? <GET ,P-OFW 1> .WORD1 .WORD2 .WORD3>
+ <RTRUE>)>)>>
+
+<ROUTINE ADJ-USED? ("OPTIONAL" (WORD1 1) (WORD2 1) (WORD3 1))
+ <COND (<ZERO? ,NOW-PRSI>
+ <COND (<EQUAL? .WORD1 1>
+ <RETURN <GET ,P-ADJW 0>>)
+ (<EQUAL? <GET ,P-ADJW 0> .WORD1 .WORD2 .WORD3>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ (T
+ <COND (<EQUAL? .WORD1 1>
+ <RETURN <GET ,P-ADJW 1>>)
+ (<EQUAL? <GET ,P-ADJW 1> .WORD1 .WORD2 .WORD3>
+ <RTRUE>)
+ (T <RFALSE>)>)>>
diff --git a/people.zil b/people.zil
new file mode 100644
index 0000000..d3178a1
--- /dev/null
+++ b/people.zil
@@ -0,0 +1,3210 @@
+"PEOPLE for MOONMIST
+Copyright (C) 1986 Infocom, Inc. All rights reserved."
+
+"By Lan, Ros, Car, Pol, Tre, and Pen
+Ye may know the Cornishmen."
+
+"Constants used as table offsets for each character, including the player:"
+<CONSTANT PLAYER-C 0>
+<CONSTANT FRIEND-C 1>
+<CONSTANT LORD-C 2>
+<CONSTANT LOVER-C 9>
+<CONSTANT DEB-C 7>
+<CONSTANT OFFICER-C 5>
+<CONSTANT DOCTOR-C 4>
+<CONSTANT DEALER-C 6>
+<CONSTANT PAINTER-C 3>
+<CONSTANT COUSIN-C 11>
+<CONSTANT BUTLER-C 8>
+<CONSTANT MAID-C 12>
+<CONSTANT DRAGON-C 13>
+<CONSTANT BUFFALO-HEAD-C 14>
+<CONSTANT RHINO-HEAD-C 15>
+<CONSTANT GHOST-NEW-C 10>
+<CONSTANT GHOST-OLD-C 16>
+<CONSTANT CHARACTER-MAX 8 ;14>
+<CONSTANT DINNER-FOR 8>
+
+<OBJECT PLAYER
+ (DESC "yourself")
+ (IN CAR)
+ (SYNONYM ;"I" ME MYSELF)
+ (ACTION PLAYER-F)
+ (FLAGS NDESCBIT NARTICLEBIT SEARCHBIT PERSONBIT SEENBIT TOUCHBIT FEMALE
+ ;TRANSBIT OPENBIT ;"see GET-OBJECT")
+ (LDESC 0) ;"for generality"
+ (LINE 0) ;"for generality"
+ (CHARACTER 0)>
+
+<OBJECT PLAYER-NAME
+ (IN GLOBAL-OBJECTS)
+ (DESC "yourself")
+ (ADJECTIVE F.N L.N ;"for poss's")
+ (SYNONYM ;F.N L.N WE US)
+ (ACTION PLAYER-NAME-F)
+ (FLAGS NARTICLEBIT PERSONBIT SEENBIT TOUCHBIT)>
+
+<ROUTINE PLAYER-NAME-F ()
+ <DO-INSTEAD-OF ,PLAYER ,PLAYER-NAME>
+ <RTRUE>>
+
+;<GLOBAL PLAYER-SEATED:NUMBER <>> "negative => lying down"
+;<GLOBAL PLAYER-HIDING:OBJECT <>>
+
+;<ROUTINE NOISY? (RM) <RFALSE>>
+
+<ROUTINE PLAYER-F ("OPTIONAL" (ARG <>) "AUX" (L <>))
+ <COND (<NOT <==? .ARG ,M-WINNER>>
+ <COND (<DOBJ? PLAYER>
+ <COND (<VERB? ARREST DANCE ;GOODBYE HELLO SORRY THANKS>
+ <HAR-HAR>
+ <RTRUE>)
+ (<VERB? EXAMINE>
+ <TELL "You are wearing">
+ <COND (<ZERO? ,NOW-WEARING> <TELL " nothing">)
+ (T <TELL THE ,NOW-WEARING>)>
+ <SET L <FIRST? ,PLAYER>>
+ <REPEAT ()
+ <COND (<ZERO? .L>
+ <RETURN>)
+ (<AND <FSET? .L ,WORNBIT>
+ <NOT <==? .L ,NOW-WEARING>>>
+ <TELL " and" THE .L>)>
+ <SET L <NEXT? .L>>>
+ <TELL "." CR>
+ <RTRUE>)
+ (<VERB? SEARCH>
+ <PERFORM ,V?INVENTORY>
+ <RTRUE>)
+ (<VERB? SMELL>
+ <TELL "You smell ">
+ <COND (<T? ,WASHED> <TELL "clean and fresh." CR>)
+ (T <TELL "as if you need washing." CR>)>
+ <RTRUE>)>)
+ (T <RFALSE>)>)
+ (<DIVESTMENT? ,NOW-WEARING>
+ <COND (<NO-CHANGING?> <RTRUE>)
+ (T
+ <COND (<AND <NOT <ZERO? ,NOW-WEARING>>
+ <NOT <VERB? DISEMBARK REMOVE>>>
+ ;<MOVE ,NOW-WEARING ,WINNER>
+ <FIRST-YOU "remove" ,NOW-WEARING>
+ <FCLEAR ,NOW-WEARING ,WORNBIT>
+ <SETG NOW-WEARING <>>)>
+ <RFALSE>)>)
+ (<AND <T? ,PRSI>
+ <NOT <VERB? SEARCH-FOR>>
+ <FSET? ,PRSI ,SECRETBIT>
+ <NOT <FSET? ,PRSI ,SEENBIT>>>
+ <NOT-FOUND ,PRSI>
+ <RTRUE>)
+ (<AND <T? ,PRSO>
+ <NOT <VERB? FIND WALK ;$WHERE>>
+ <FSET? ,PRSO ,SECRETBIT>
+ <NOT <FSET? ,PRSO ,SEENBIT>>>
+ <NOT-FOUND ,PRSO>
+ <RTRUE>)
+ (<AND <T? ,AWAITING-REPLY>
+ <VERB? FOLLOW THROUGH WALK WALK-TO>>
+ <SETG CLOCK-WAIT T>
+ <PLEASE-ANSWER>
+ <RTRUE>)
+ (<AND <EQUAL? <SET L <LOC ,PLAYER>> ,HERE ,CAR>
+ ;<NOT ,PLAYER-SEATED>
+ ;<NOT ,PLAYER-HIDING>>
+ <RFALSE>)
+ (<T? ,P-WALK-DIR> <TOO-BAD-SIT-HIDE>)
+ (<EQUAL? ,PRSO <> ,ROOMS .L>
+ <RFALSE>)
+ ;(<EQUAL? ,PRSO ,PLAYER-SEATED <- 0 ,PLAYER-SEATED>>
+ <RFALSE>)
+ (<VERB? WALK-TO SEARCH SEARCH-FOR FIND>
+ <COND (<DOBJ? SLEEP-GLOBAL> <RFALSE>)
+ (T <TOO-BAD-SIT-HIDE>)>)
+ (<SPEAKING-VERB?> <RFALSE>)
+ (<GAME-VERB?> <RFALSE>)
+ (<REMOTE-VERB?> <RFALSE>)
+ (<VERB? AIM FAINT LISTEN LOOK-ON NOD SHOOT SMILE>
+ <RFALSE>)
+ (<HELD? ,PRSO> <RFALSE>)
+ (<HELD? ,PRSO ,GLOBAL-OBJECTS> <RFALSE>)
+ (<AND <EQUAL? .L ,CHAIR-DINING>
+ <IN? ,PRSO ,TABLE-DINING>>
+ <RFALSE>)
+ (<VERB? EXAMINE> <RFALSE>)
+ (<NOT <HELD? ,PRSO .L ;,PLAYER-SEATED>> <TOO-BAD-SIT-HIDE>)
+ (<NOT ,PRSI> <RFALSE>)
+ (<HELD? ,PRSI> <RFALSE>)
+ (<HELD? ,PRSI ,GLOBAL-OBJECTS> <RFALSE>)
+ (<NOT <HELD? ,PRSI .L ;,PLAYER-SEATED>> <TOO-BAD-SIT-HIDE>)>>
+
+<ROUTINE PLEASE-ANSWER ("AUX" (P <GETB ,QUESTIONERS ,AWAITING-REPLY>))
+ <TELL D .P " says, \"">
+ <COND (<EQUAL? .P ,BUTLER ,DOCTOR>
+ <TELL "Pardon me, "TN", but">)
+ (T <TELL "Wait a mo'.">)>
+ <TELL " I asked you a question.\"" CR>>
+
+<ROUTINE TOO-BAD-SIT-HIDE ()
+ <COND ;(<T? ,PLAYER-SEATED>
+ <COND (<AND <VERB? LIE> <G? 0 ,PLAYER-SEATED>>
+ <ALREADY ,WINNER "lying down">)
+ (<AND <VERB? SIT> <L? 0 ,PLAYER-SEATED>>
+ <ALREADY ,WINNER "sitting down">)
+ (T
+ <SETG PLAYER-SEATED <>>
+ <FIRST-YOU "stand up">
+ <RFALSE>)>)
+ (T
+ <MOVE ,WINNER ,HERE>
+ <FIRST-YOU "stand up">
+ <RFALSE>)
+ ;(,PLAYER-HIDING
+ <SETG CLOCK-WAIT T>
+ <COND (<AND <VERB? HIDE-BEHIND> <ZERO? ,PRSI>>
+ <ALREADY ,WINNER "hiding">
+ ;<TELL "(You're already hiding.)" CR>)
+ (T <TELL "(You can't do that while you're hiding.)" CR>)>)>>
+
+<OBJECT FRIEND
+ (DESC "Tamara")
+ (IN LIMBO ;COURTYARD)
+ (ADJECTIVE MS MISS
+ TAMARA TAMMY LYND WOMAN ;"for poss's")
+ (SYNONYM TAMARA TAMMY LYND WOMAN)
+ (ACTION FRIEND-F)
+ (DESCFCN FRIEND-D)
+ (LDESC 0)
+ (WEST "looking at you hopefully")
+ (TEXT
+"She's a beautiful red-haired young woman of average height.")
+ (FLAGS OPENBIT PERSONBIT SEARCHBIT FEMALE NARTICLEBIT NDESCBIT)
+ (CAPACITY 40)
+ (LINE 0) ;"unfriendliness"
+ (CHARACTER 1)>
+
+<ROUTINE FRIEND-D ("OPTIONAL" (ARG <>))
+ <COND (T ;<OR <FSET? ,FRIEND ,TOUCHBIT>
+ <T? ,CLOCK-WAIT>>
+ <DESCRIBE-PERSON ,FRIEND>
+ <RTRUE>)>>
+[
+<GLOBAL AWAITING-REPLY:NUMBER <>>
+
+"<CONSTANT FRIEND-R 1>
+<CONSTANT DEB-R 7>
+<CONSTANT DOCTOR-R 4>"
+<CONSTANT OFFICER-1-R 5>
+<CONSTANT OFFICER-2-R 8>
+<CONSTANT BUTLER-1-R 2>
+<CONSTANT BUTLER-2-R 3>
+<CONSTANT BUTLER-3-R 6>
+<CONSTANT BUTLER-4-R 9>
+;<CONSTANT BUTLER-5-R 10>
+
+<GLOBAL QUESTIONERS
+ <PLTABLE (BYTE) FRIEND BUTLER BUTLER DOCTOR OFFICER
+ BUTLER DEB OFFICER BUTLER>>
+
+<GLOBAL QUESTIONS
+ <LTABLE
+ "You did read my letter, and not just give it a hasty glance?"
+ "Do you wish me to do so before I leave?"
+ "Am I right in assuming that you are the well-known young American detective?"
+ "Is it a case that brings you to Cornwall?"
+ "Have you a theory about the castle ghost?"
+ "May I offer one last suggestion?"
+ "Are you one of those brutally fascinating American private eyes?"
+ "Are there more girl sleuths like you in the States, my dear?"
+ "You've seen that room, have you not?">>
+
+<ROUTINE I-REPLY ("OPTIONAL" (GARG <>) "AUX" P X)
+ %<DEBUG-CODE <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-REPLY:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>>
+ <COND (<ZERO? ,AWAITING-REPLY>
+ <RFALSE>)
+ (<OR <EQUAL? ,AWAITING-REPLY ,BUTLER-1-R ,BUTLER-2-R ,BUTLER-3-R>
+ <EQUAL? ,AWAITING-REPLY ,BUTLER-4-R ;,BUTLER-5-R>>
+ <COND (<QUEUED? ,I-BUTLER-HINTS>
+ <QUEUE I-BUTLER-HINTS ,CLOCKER-RUNNING>)>
+ <SET P ,BUTLER>)
+ (<AND <EQUAL? ,AWAITING-REPLY ,FRIEND-C>
+ <EQUAL? ,VARIATION ,FRIEND-C>>
+ <SET P ,FRIEND>)
+ ;(T
+ <SET P <GET ,CHARACTER-TABLE ,AWAITING-REPLY>>)
+ (<EQUAL? ,AWAITING-REPLY ,DEB-C>
+ <SET P ,DEB>)
+ (<EQUAL? ,AWAITING-REPLY ,OFFICER-1-R ,OFFICER-2-R>
+ <SET P ,OFFICER>)
+ (<EQUAL? ,AWAITING-REPLY ,DOCTOR-C>
+ <SET P ,DOCTOR>)
+ ;(T <SET P ,QCONTEXT>)>
+ <COND (<ZERO? .P>
+ <SETG AWAITING-REPLY <>>
+ <RFALSE>)
+ (T
+ <SET X <GETP .P ,P?LINE>>
+ <PUTP .P ,P?LINE <+ 1 .X>>
+ <COND (<0? .X>
+ <QUEUE I-REPLY ,CLOCKER-RUNNING>
+ <TELL
+D .P " repeats, \"I said: " <GET ,QUESTIONS ,AWAITING-REPLY> "\"|">)
+ (T
+ <SETG AWAITING-REPLY <>>
+ <PUTP .P ,P?LDESC 20 ;"ignoring you">
+ <COND (<AND <VISIBLE? .P>
+ ;<NOT <FSET? .P ,MUNGBIT>>>
+ <TELL CHE .P " mutters, \"I'd ">
+ <COND (<EQUAL? .P ,FRIEND>
+ <TELL "wondered if you">)
+ (T <TELL "heard that Americans">)>
+ <TELL " were rude, but really...!\"" CR>)>)>
+ <RFATAL>)>>
+]
+<ROUTINE FRIEND-F ("OPTIONAL" (ARG <>) "AUX" OBJ X ;(L <LOC ,FRIEND>))
+ <COND (<==? .ARG ,M-WINNER>
+ <COND (<AND <EQUAL? ,AWAITING-REPLY ,FRIEND-C>
+ <VERB? YES NO>>
+ <PUTP ,FRIEND ,P?LDESC 0>
+ <PUTP ,FRIEND ,P?LINE 0>
+ <SETG AWAITING-REPLY <>>
+ <TELL "\"Then you ">
+ <COND (<NOT <VERB? YES>>
+ <TELL "don't " ;"know yet">)>
+ <SETG P-IT-OBJECT ,GHOST-NEW>
+ <TELL
+"know about my engagement, and the " 'GHOST-OLD ", and the fact that...
+that someone is trying to kill me!\"" CR>)
+ (<NOT <GRAB-ATTENTION ,FRIEND>> <RFATAL>)
+ (<AND <VERB? DESCRIBE> <DOBJ? GHOST-NEW>>
+ <TELL
+"Tammy shakes her head. \"I just don't know if the ghost was
+" 'LOVER ". I never saw her, just that portrait by Vivien.
+The night I saw that ghastly face peering down at me...
+Well, I was too shaken to remember anything, except that horrible
+spider dropping down on me!\" She shudders at the memory." CR>)
+ (<AND <VERB? FOLLOW>
+ <DOBJ? PLAYER>>
+ <COND (<WILLING? ,FRIEND>
+ ;<NOT <EQUAL? ,VARIATION ,FRIEND-C>>
+ <TELL "\"I'll try my best, " FN "!\"" CR>
+ <NEW-FOLLOWER ,FRIEND>
+ <RTRUE>)
+ (T
+ <TELL "\"Not just now.\"" CR>
+ <RTRUE>)>)
+ (<VERB? YES>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?KISS ,FRIEND>
+ <RTRUE>)
+ (<SET X <COM-CHECK ,FRIEND>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>)
+ (<==? .X ,M-OTHER> <RFATAL>)
+ (T <RTRUE>)>)
+ (T <WHY-ME> <RFATAL>)>)
+ ;(<VERB? RUB>
+ <COND (<NOT <GRAB-ATTENTION ,FRIEND>>
+ <RFATAL>)
+ (T <TELL "\"But... I'm engaged!\"" CR>)>)
+ (<AND <VERB? ASK-ABOUT SHOW TELL-ABOUT>
+ <IOBJ? CAR TWEED-OUTFIT EXERCISE-OUTFIT
+ DINNER-OUTFIT SLEEP-OUTFIT>>
+ <COND (<NOT <GRAB-ATTENTION ,FRIEND>>
+ <RFATAL>)
+ (T
+ <TELL "\"It's super!">
+ <COND (<NOT <IOBJ? TWEED-OUTFIT>>
+ <TELL " And it's " 'YOUR-COLOR "!">)>
+ <TELL "\"" CR>)>)
+ (<SET OBJ <ASKING-ABOUT? ,FRIEND>>
+ <COND (<NOT <GRAB-ATTENTION ,FRIEND .OBJ>>
+ <RFATAL>)
+ (<EQUAL? .OBJ ,CASTLE>
+ <TELL
+"\"Oh, it's such a lovely place. If only I felt safe here!\"" CR>)
+ (<AND <OR <EQUAL? .OBJ ,SEARCHER>
+ <EVIDENCE? .OBJ>>
+ <OR <T? ,CONFESSED>
+ <T? <GET ,TOLD-ABOUT-EVID ,FRIEND-C>>>
+ <NOT <==? ,FRIEND ,SEARCHER>>>
+ <TELL ,IM-SHOCKED>)
+ (<EQUAL? .OBJ ,COUSIN ,BUST ;,RECORDER>
+ <TELL "\"Sorry, but I never met the man.\"" CR>)
+ (<AND <EQUAL? .OBJ ,DEB>
+ <==? ,VARIATION ,FRIEND-C>>
+ ;<DISCRETION ,FRIEND .OBJ>
+ <TELL ,RHYMES-WITH-RICH CR>)
+ (<EQUAL? .OBJ ,LENS ,LENS-1 ,LENS-2>
+ <TELL
+"\"You know I've never worn glasses, "FN", or " 'LENS "es, either.">
+ <COND (<AND <EQUAL? ,VARIATION ,DOCTOR-C ;,DEALER-C ,PAINTER-C>
+ <T? ,FOUND-IT-PERM>
+ ;<FSET? ,FOUND-IT-PERM ,SEENBIT>
+ ;<FSET? ,LENS ,TOUCHBIT>>
+ <TELL " I can't imagine who dropped it.">)>
+ <TELL "\"" CR>)
+ (<AND <EQUAL? .OBJ ,PASSAGE>
+ <T? ,FRIEND-FOUND-PASSAGES>>
+ <FRIEND-PASSAGE-STORY>)
+ (<OR <EQUAL? .OBJ ,PRIEST-DOOR>
+ <AND <EQUAL? .OBJ ,PASSAGE>
+ <ZERO? <GET ,FOUND-PASSAGES ,FRIEND-C>>>>
+ <TELL !\">
+ <COND (<EQUAL? .OBJ ,PASSAGE>
+ <TELL "You mean " 'PASSAGE "s like in horror movies? ">)>
+ <TELL "Golly, I don't know that much about the castle, ">
+ <COND (<PRINT-NAME ,FIRST-NAME> <TELL !\.>)>
+ <TELL " Maybe Jack could tell you.">
+ <COND (<EQUAL? ,VARIATION ,FRIEND-C>
+ <TELL " Or Iris, who's spent far too much time here.">)>
+ <TELL "\"" CR>)
+ (<AND <EQUAL? .OBJ ,LORD ,ROMANCE ,FRIEND>
+ <OR <NOT <EQUAL? .OBJ ,SEARCHER>>
+ <NOT <==? <GETP .OBJ ,P?LDESC> 21 ;"searching">>>>
+ <COND (<OR <EQUAL? .OBJ ,FRIEND>
+ <FSET? ,LORD ,TOUCHBIT>>
+ <TELL "\"Oh, "FN", I">
+ <COND (<EQUAL? ,VARIATION ,LORD-C>
+ <TELL " was">)
+ (T <TELL "'m">)>
+ <TELL
+" so happy!\" " 'FRIEND " gushes. \"The whole thing seem">
+ <COND (<EQUAL? ,VARIATION ,LORD-C>
+ <TELL "ed ">)
+ (T <TELL "s ">)>
+ <TELL
+"just like a fairy tale, or a paperback romance! But ">
+ <COND (<EQUAL? ,VARIATION ,LORD-C>
+ <TELL "lately,">
+ <COND (<EQUAL? <LOC ,LORD> ,HERE ,PSEUDO-OBJECT>
+ <TELL "\" she whispers, \"">)
+ (T <TELL !\ >)>
+ <TELL "Jack seems cool toward me">)
+ (T <TELL "I told you all about it in my letter">)>
+ <TELL ".\"" CR>)
+ (T
+ <MOVE ,LORD ,HERE>
+ <LORD-INTRO>
+ <RTRUE>)>)
+ (<EQUAL? .OBJ ,LOVER>
+ <TELL
+;"\"You may be reading between the lines -- perhaps too much.
+Oh, I know people hint the two of them had something going -- but if so,
+I'm sure it was just a passing fancy on Jack's part.\"|
+She adds, \"Mind you, 'LOVER may have been in love with HIM -- that
+wouldn't surprise me. " "\"She lived just down the beach, and from all
+accounts she spent most of her time hanging about the castle. If she'd
+stayed home a bit more, " 'ACCIDENT " never would've happened -- I mean,
+her falling in the well and drowning.\"" CR>)
+ (<EQUAL? .OBJ ,ACCIDENT>
+ <TELL
+"\"I can't tell you much,\" says " 'FRIEND ", \"because I wasn't here
+when it happened. But all the guests here tonight were also here that
+night. At dinner, they decided to have a wine tasting later in the
+evening. " 'LOVER " was to choose and pour the wine. But when the time
+came, she didn't show up, so they sent the butler down to the "
+'BASEMENT ", to find her and help carry up the bottles. He came back
+saying that she'd fallen down the well!\"" CR>)
+ (<EQUAL? .OBJ ,GHOST-OLD>
+ <TELL "\"I've told you all I know in my letter, ">
+ <COND (<PRINT-NAME ,FIRST-NAME> <TELL !\.>)>
+ <TELL
+" But come to think of it, there's an old " 'HISTORY-BOOK " in the "
+'LIBRARY " that tells about " 'CASTLE ". You might learn more from
+that.\"" CR>)
+ (<EQUAL? .OBJ ,GHOST-NEW ,DANGER ,HAUNTING>
+ <TELL
+"\"Since I wrote you, I've seen the ghost again, and this third time was
+the worst. After working late one night, I was " <GET ,LDESC-STRINGS 17>
+;"preparing to leave" " the office to go to my room. As I opened the
+door to the " 'CORR-2 ", I saw this ghostly figure with "
+,LONG-BLOND-HAIR " and a dead white face. It was holding a sword and
+about to attack me!\"|
+" 'FRIEND " gulps and her voice quavers as she concludes,
+\"I s-s-screamed and shrank back inside the office and slammed
+the door! That's about all I can tell you, "FN"...\"" CR>
+ <COND (<AND <EQUAL? <LOC ,LORD> ,HERE ,PSEUDO-OBJECT>
+ <ZERO? <GETP ,LORD ,P?LINE>>>
+ <TELL
+"\"I was just dozing off when Tammy's scream woke
+me,\" adds " 'LORD ". \"By the time I ran into the " 'CORR-2 ",
+the ghost ">
+ <COND (<EQUAL? ,VARIATION ,FRIEND-C>
+ <TELL "had disappeared.\"" CR>)
+ (T <TELL
+"was almost gone. I did catch" ,WHITISH-GLIMPSE " as it disappeared down
+the tower stairs -- but frankly I was more concerned about " 'FRIEND
+".\"" CR>)>)>
+ <TELL
+'FRIEND " fidgets nervously. \"I don't know whether this ghost is real,
+or someone just play-acting. It can sneak around anywhere it pleases in
+the whole castle. I just don't understand how a person dressed up like a
+spook can do that without being caught!\"" CR>
+ <RTRUE>)
+ (<AND <EQUAL? .OBJ ,COSTUME ,BLOWGUN ,TAMARA-EVIDENCE>
+ <EQUAL? ,VARIATION ,FRIEND-C>>
+ <TELL "\"I've, uh, never seen it before.\"" CR>)
+ (<SET X <COMMON-ASK-ABOUT ,FRIEND .OBJ>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>) (T <RTRUE>)>)
+ (<AND <FSET? .OBJ ,PERSONBIT>
+ <NOT <EQUAL? .OBJ ,MAID>>>
+ <SETG CLOCK-WAIT T>
+ <TELL
+"\"I already told you about" HIM .OBJ " in my letter.\"" CR>)
+ (T
+ <COND (<VERB? SHOW>
+ <TELL "\"It looks like " A .OBJ " to me.\"" CR>)
+ (T
+ <TELL "\"I just don't know, ">
+ <COND (<PRINT-NAME ,FIRST-NAME> <TELL !\.>)>
+ <TELL "\"" ;" That's why I wrote and asked you to come
+here after you landed in England and took delivery of your new 'CAR .\""
+CR>)>)>)
+ (<AND <VERB? FOLLOW>
+ <TOUR?>>
+ <RTRUE>)
+ (<VERB? KISS HELLO ;DANCE>
+ <UNSNOOZE ,FRIEND>
+ <PUTP ,FRIEND ,P?LINE 0>
+ <PUTP ,FRIEND ,P?LDESC 0>
+ ;<COND (<EQUAL? ,AWAITING-REPLY ,FRIEND-C>
+ <QUEUE I-REPLY 0>)>
+ <TELL
+CHE ,FRIEND hug " you with affection. \"I'm so glad you're here!\"" CR>)
+ (T <PERSON-F ,FRIEND .ARG>)>>
+
+<GLOBAL RHYMES-WITH-RICH
+"\"I won't say what I think of her, but it rhymes with 'rich.'\"">
+
+<OBJECT TAMARA-EVIDENCE
+ (DESC "Tamara's receipt")
+ (ADJECTIVE TAM\'S HER)
+ (SYNONYM EVIDENCE RECEIPT)
+ (FLAGS NDESCBIT READBIT NARTICLEBIT SECRETBIT RMUNGBIT ;"evidence")
+ (CHARACTER 1) ;"for this char"
+ (SIZE 2)
+ (ACTION TAMARA-EVIDENCE-F)>
+
+<ROUTINE TAMARA-EVIDENCE-F ()
+ <COND (<VERB? EXAMINE LOOK-INSIDE READ>
+ <COND (<NOT-HOLDING? ,PRSO>
+ <RTRUE>)>
+ <TELL
+"It's a receipt for the purchase of an adder from a pet shop in
+Frobzance. Someone has written the word \"Iris\" on it and then
+viciously crossed it out." CR>
+ <COND (<ZERO? ,EVIDENCE-FOUND>
+ <CONGRATS>)>
+ <SETG EVIDENCE-FOUND ,TAMARA-EVIDENCE>
+ <RTRUE>)>>
+
+<ROUTINE ASKING-ABOUT? (WHO "AUX" DR)
+ <COND (<VERB? ASK-ABOUT CONFRONT SHOW>
+ <COND (<AND <IOBJ? PASSAGE>
+ <SET DR <FIND-FLAG-LG ,HERE ,DOORBIT ,SECRETBIT>>
+ <FSET? .DR ,OPENBIT>> ;"SHOW [open] PASSAGE TO x"
+ <RFALSE>)
+ (<EQUAL? .WHO ,PRSO>
+ <RETURN ,PRSI>)>)
+ ;(<VERB? FIND ;WHAT>
+ <COND (<EQUAL? .WHO ,WINNER>
+ <RETURN ,PRSO>)>)
+ (T <RFALSE>)>>
+
+<ROUTINE LORD-INTRO ()
+ <SETG FOLLOWER ,LORD>
+ <FSET ,LORD ,TOUCHBIT>
+ <FSET ,LORD ,SEENBIT>
+ <FCLEAR ,LORD ,NDESCBIT>
+ <SETG QCONTEXT ,LORD>
+ <THIS-IS-IT ,LORD>
+ <TELL
+"\"Here comes Jack now!\" exclaims " 'FRIEND ", as he comes striding
+toward you. ">
+ <COMMON-DESC ,LORD>
+ <TELL "|
+\"My fiance, " 'LORD !\ ,TRESYLLIAN ",\" " 'FRIEND ,INTRODUCES "him.
+\"Jack, this is my friend from the States, ">
+ <TELL-FULL-NAME>
+ <TELL ".\"|
+\"So you're that famous young sleuth whom the Yanks call ">
+ <COND (<ZERO? ,GENDER-KNOWN> <TELL "Young ">)
+ (T <TITLE>)>
+ <TELL "Sherlock!\" says " 'LORD>
+ <COND (<OR <ZERO? ,GENDER-KNOWN>
+ <NOT <FSET? ,PLAYER ,FEMALE>>>
+ <TELL ", shaking hands">)
+ ;(<FSET? ,PLAYER ,FEMALE>
+ <TELL "\" says " 'LORD ". \"">)
+ ;(T <TELL !\ >)>
+ <TELL ". \"Tammy's told me about the mysteries you've solved">
+ <COND (<ZERO? ,GENDER-KNOWN>
+ <TELL
+". She seems to think you can unravel the mystery of " 'CASTLE ".\""
+CR>)
+ (<FSET? ,PLAYER ,FEMALE>
+ <TELL
+" -- but she never let on you looked so smashing! Welcome to
+Cornwall, "FN" luv!\"|
+Before you know it, he sweeps you into his arms
+and kisses you warmly! Let's hope " 'FRIEND " doesn't mind --
+but for the moment all you can see are " 'LORD "'s dazzling sapphire-blue
+eyes." CR>)
+ (T <TELL "!\"|
+His keen blue eyes size you up with a friendly twinkle. Yet his
+friendliness seems to be all on the surface --
+it may take time to figure out where His Lordship's really
+coming from." CR>)>>
+
+<ROUTINE TELL-FULL-NAME ()
+ <TITLE>
+ <TELL FN>
+ <COND (<T? ,MIDDLE-WORD>
+ <COND (<NOT <==? ,MIDDLE-WORD ,W?COMMA>>
+ <TELL !\ >)>
+ <PRINTB ,MIDDLE-WORD>)>
+ <TELL !\ LN>
+ <TELL-SUFFIX>>
+
+<OBJECT LORD
+ (DESC "Lord Jack")
+ (IN FOYER)
+ (ADJECTIVE TALL MY
+ LORD JACK TRESYLLIAN MAN ;"for poss's")
+ (SYNONYM LORD JACK TRESYLLIAN MAN)
+ (ACTION LORD-F)
+ (DESCFCN LORD-D)
+ (LDESC 0 ;"Lord Jack Tresyllian is here, looking just as you want.")
+ (WEST "surveying his domain")
+ (FLAGS OPENBIT PERSONBIT SEARCHBIT NARTICLEBIT NDESCBIT)
+ (CAPACITY 40)
+ (LINE 0)
+ (CHARACTER 2)>
+
+<GLOBAL TRESYLLIAN "Tresyllian">
+;<GLOBAL LORD-SAID-FOYER:FLAG <>>
+
+<ROUTINE LORD-D ("OPTIONAL" (ARG <>))
+ <COND ;(<AND <==? ,HERE ,FOYER>
+ ;<FSET? ,LORD ,TOUCHBIT> ;"delays speech till 2nd turn"
+ <ZERO? ,LORD-SAID-FOYER>
+ <QUEUED? ,I-TOUR>
+ <ZERO? <GETP ,LORD ,P?LINE>>>
+ <SETG LORD-SAID-FOYER T>
+ <TELL
+"\"This is the residential wing,\" says " 'LORD ". \"I'm told it was
+added on to the tower keep in the 1500's, when life here became more
+civilized. Of course there was more of the old castle standing then.\""
+CR>)
+ (T <DESCRIBE-PERSON ,LORD>)>
+ <RTRUE>>
+
+<GLOBAL WHITISH-GLIMPSE " a glimpse of a whitish figure from the rear">
+
+<ROUTINE LORD-GHOST-STORY ()
+ <TELL "\"No use asking ME, ">
+ <COND (<PRINT-NAME ,FIRST-NAME> <TELL !\.>)>
+ <TELL " All I caught was" ,WHITISH-GLIMPSE ". ">
+ <COND (<EQUAL? ,VARIATION ,DOCTOR-C ;,DEALER-C ,PAINTER-C>
+ <TELL "I couldn't even swear it was
+a woman; it might've been some bloke in drag.\"" CR>)
+ (T
+ <FSET ,GHOST-NEW ,PERSONBIT>
+ <TELL
+"She was blonde, definitely female, and about Dee's height...\"|
+" 'LORD "'s own face is pale as he adds,
+\"So, yes, it COULD have been her ghost... or Dee herself.\"" CR>)>>
+
+<ROUTINE LORD-F ("OPTIONAL" (ARG <>) "AUX" OBJ X)
+ <COND (<==? .ARG ,M-WINNER>
+ <COND (<NOT <GRAB-ATTENTION ,LORD>> <RFATAL>)
+ (<AND <VERB? DESCRIBE>
+ <DOBJ? GHOST-NEW>
+ <NOT <EQUAL? ,VARIATION ,FRIEND-C>>>
+ <LORD-GHOST-STORY>
+ <RTRUE>)
+ (<AND <VERB? ANSWER REPLY>
+ <==? 3 ,LIONEL-SPEAKS-COUNTER>>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?ASK-ABOUT ,LORD ,ARTIFACT>
+ <RTRUE>)
+ (<SET X <COM-CHECK ,LORD>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>)
+ (<==? .X ,M-OTHER> <RFATAL>)
+ (T <RTRUE>)>)
+ (T <WHY-ME> <RFATAL>)>)
+ (<SET OBJ <ASKING-ABOUT? ,LORD>>
+ <COND (<NOT <GRAB-ATTENTION ,LORD .OBJ>>
+ <RFATAL>)
+ (<EQUAL? .OBJ ,ACCIDENT>
+ <TELL
+"Jack takes a deep breath. \"You've heard the bare facts, I assume --
+she was in the " 'BASEMENT ", slipped and fell down the well.
+The evidence proves what happened: a tent pole she'd
+stumbled over; her one shoe that came off, with the slippery sole and
+the loose heel; and of course " 'NECKLACE-OF-D ". I even"
+,FOUND-FABRIC "\"|
+He adds, \"The police never found " 'CORPSE ". But
+the well is drawing tide water. No doubt she was swept out to sea.\"" CR>)
+ (<EQUAL? .OBJ ,ARTIFACT>
+ <TELL
+"Jack fidgets and replies, \"Well, ah, we've all HEARD of
+it, certainly. Uncle Lionel liked to drop teasing hints about how
+valuable it was. But he was frightfully secretive. He never identified
+it.">
+ <COND (<NOT <==? ,LIONEL-SPEAKS-COUNTER
+ ,INIT-LIONEL-SPEAKS-COUNTER>>
+ <TELL
+" He's probably playing the same silly game right now.">
+ <COND (<T? ,LIONEL-SPEAKS-COUNTER>
+ <TELL " Let's hear the old boy out.">)>)>
+ <TELL "\"" CR>)
+ (<EQUAL? .OBJ ,CASTLE ;,HAUNTING>
+ <TELL
+"\"Well, as I daresay you've heard, the castle's been infested lately
+with a spook. And it seems bent on harming " 'FRIEND
+". All in all, a very rum go.\"" CR>)
+ (<AND <EQUAL? .OBJ ,SEARCHER>
+ <OR <T? ,CONFESSED>
+ <T? <GET ,TOLD-ABOUT-EVID ,LORD-C>>>
+ <NOT <==? ,LORD ,SEARCHER>>>
+ <TELL ,IM-SHOCKED>)
+ (<EQUAL? .OBJ ,FRIEND ,ROMANCE>
+ <TELL "\"She's a darling girl, really first-rate.">
+ <COND (<EQUAL? ,VARIATION ,FRIEND-C>
+ <COND (<EQUAL? <LOC ,LORD> ,HERE ,PSEUDO-OBJECT>
+ <TELL "\" He whispers, \"">)
+ (T <TELL !\ >)>
+ <TELL "Although lately she's seemed cool toward me.">)>
+ <TELL "\"" CR>)
+ (<AND <EQUAL? .OBJ ,GHOST-NEW ,DANGER ,HAUNTING>
+ <NOT <EQUAL? ,VARIATION ,FRIEND-C>>>
+ <LORD-GHOST-STORY>
+ <RTRUE>)
+ (<AND <EQUAL? .OBJ ,CLUE-2>
+ <NOT <EQUAL? ,VARIATION ,LORD-C>>
+ <NOT <IN? .OBJ ,LORD>>>
+ <CLUE-2-STORY ,LORD>
+ <RTRUE>)
+ ;(<EQUAL? .OBJ ,IAN-EVIDENCE>
+ <TELL
+"\"Good Lord! But... I meant for him to woo her, not kill her!\"" CR>)
+ (<EQUAL? .OBJ ,LENS ,LENS-1 ,LENS-2>
+ <COND ;(<AND <EQUAL? ,VARIATION ,DOCTOR-C ;,DEALER-C ,PAINTER-C>
+ <T? ,FOUND-IT-PERM>
+ ;<FSET? ,FOUND-IT-PERM ,SEENBIT>
+ ;<FSET? ,LENS ,TOUCHBIT>>
+ <TELL
+"\"I've no idea where it came from. It's certainly not mine. ">)
+ (T <TELL
+CHE ,LORD " gives a puzzled shrug, saying, \"">)>
+ <TELL "There's nothing wrong with my eyesight.\"" CR>)
+ (<AND <EQUAL? .OBJ ,MAID>
+ <FSET? ,LETTER ,TOUCHBIT>>
+ <TELL ,JACK-THINKS-GLADYS "\"" CR>)
+ (<AND <EQUAL? .OBJ ,PASSAGE>
+ <ZERO? <GET ,FOUND-PASSAGES ,LORD-C>>>
+ <TELL
+"\"Hmm... good question. I know there are old tales about " 'CASTLE "
+being honeycombed with " 'PASSAGE "s, but I've never actually stumbled
+on any. Uncle Lionel would have known, but I never asked him before he
+died, worse luck.\"" CR>)
+ (<EQUAL? .OBJ ,PRIEST-DOOR>
+ <TELL
+"\"It's in the " 'DUNGEON ", close to the curtain wall. Dee used it
+because her cottage is just down the shore.\"|
+He adds, \"By the way, the name '" D ,PRIEST-DOOR "' dates back to when
+the Catholic Church was outlawed in England, and priests had to hide for
+fear of execution. Many British great houses have " 'PASSAGE "s,
+hiding places, and entrances.\"" CR>)
+ (<SET X <COMMON-ASK-ABOUT ,LORD .OBJ>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>) (T <RTRUE>)>)
+ (T <TELL-DUNNO ,LORD .OBJ>)>)
+ (<VERB? KISS RUB>
+ <COND (<IN? ,FRIEND ,HERE>
+ <PUTP ,FRIEND ,P?LINE <+ 1 <GETP ,FRIEND ,P?LINE>>>
+ <TELL CHE ,FRIEND " flashes you an angry look." CR>)>
+ <COND (<FSET? ,PLAYER ,FEMALE>
+ <UNSNOOZE ,LORD>
+ <PUTP ,LORD ,P?LINE 0>
+ <PUTP ,LORD ,P?LDESC 0>
+ <TELL
+"\"I say! You Americans are frightfully friendly!\" says " 'LORD "." CR>)>)
+ (T <PERSON-F ,LORD .ARG>)>>
+
+<ROUTINE CLUE-2-STORY (PER)
+ <TELL !\">
+ ;<COND (<NOT <FSET? ,CLUE-2 ,TOUCHBIT>>
+ <TELL
+"Well, er, Lionel did give me a card once,\" " D .PER " mumbles. \"Don't
+recall just what was on it -- some odd picture or jingle. ">)>
+ <TELL
+"I thought it was just one more of Lionel's weird jokes, or the effect
+of jungle rot on his brain -- that sort of thing.\"" CR>>
+
+<ROUTINE TELL-DUNNO (PER OBJ)
+ <COND (<FSET? .OBJ ,PERSONBIT>
+ <TELL "\"I don't indulge much in idle gossip, you know.\"" CR>)
+ (T
+ <TELL "\"You know as much as I do">
+ <COND (<EQUAL? .PER ,OFFICER>
+ <IAN-CALLS-YOU>
+ <TELL ".\"" CR>)
+ (T
+ <TELL ", ">
+ <COND (<PRINT-NAME ,FIRST-NAME> <TELL !\.>)>
+ <TELL "\"" CR>)>)>>
+
+<GLOBAL JACK-THINKS-GLADYS
+"\"Dashed if I'm going to have my digestion upset
+by Gladys's whining, the odious little twit!">
+
+<OBJECT JACK-TAPE
+ ;(IN LOCAL-GLOBALS)
+ (DESC "secret tape recorder" ;"instant camera")
+ (ADJECTIVE SECRET TAPE JACK\'S HIS ;INSTANT)
+ (SYNONYM TAPE RECORD EVIDENCE ;"CAMERA PHOTO")
+ (GENERIC GENERIC-RECORDER)
+ (FLAGS ;NDESCBIT SEENBIT SECRETBIT RMUNGBIT ;"evidence")
+ (CHARACTER 2) ;"for this char"
+ ;(TEXT "If you played it, you'd hear Jack smothering Lionel to death!")
+ ;(SIZE 2)
+ (ACTION JACK-TAPE-F)>
+
+<ROUTINE JACK-TAPE-F ("AUX" P)
+ <COND (<VERB? LAMP-ON LISTEN PLAY>
+ <TELL
+"First you hear Lionel: \"This " 'JACK-TAPE " should capture any sound in the "
+'JACK-ROOM " when I run it. Testing, testing,...\"|
+Then you hear Lionel tell
+" 'LOVER " that he suspects Jack of coveting the inheritance and wanting to
+kill him.|
+After a pause, Jack tells Lionel, with a cold-blooded chuckle,
+that his time has come. Then " ,LIONELS-VOICE " is urgent and muffled, as if
+he's being smothered! He calls out, \"Jack! Stop!\" and then...
+silence." CR>
+ <SET P <FIRST? ,HERE>>
+ <COND (<T? .P>
+ <FOUND-PASSAGES-REPEAT .P ,JACK-TAPE ,TOLD-ABOUT-EVID>)>
+ <COND (<AND <IN? ,FRIEND ,HERE>
+ <NOT <==? ,CAPTOR ,FRIEND>>>
+ <THIS-IS-IT ,FRIEND>
+ <MOVE ,FRIEND ,TAMARA-ROOM>
+ <PUT ,FOLLOW-LOC ,FRIEND-C ,TAMARA-ROOM>
+ <COND (<EQUAL? ,FOLLOWER ,FRIEND ,LORD>
+ <SETG FOLLOWER 0>)>
+ <PUT <GT-O ,FRIEND> ,GOAL-ENABLE 0>
+ <PUTP ,FRIEND ,P?LDESC 7 ;"sobbing quietly">
+ <TELL
+'FRIEND "'s eyes fill with tears, and she runs to her room." CR>)>
+ <COND (<ZERO? ,EVIDENCE-FOUND>
+ <CONGRATS>)>
+ <SETG EVIDENCE-FOUND ,JACK-TAPE>
+ <COND (<T? ,CONFESSED>
+ <RTRUE>)
+ (<IN? ,LORD ,HERE>
+ <CONFESSION ,LORD>)
+ (<SET P <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,WINNER>>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?ASK-ABOUT .P ,JACK-TAPE>)>
+ <RTRUE>)>>
+
+;<OBJECT LOVER-MISPELLED
+ (DESC "Deirdre")
+ (IN LIMBO ;LOCAL-GLOBALS)
+ (SYNONYM DEIDRE DEIDRA DIERDRE DIEDRE)
+ (ACTION LOVER-MISPELLED-F)
+ (LDESC 0)
+ (FLAGS OPENBIT PERSONBIT SEARCHBIT FEMALE NARTICLEBIT ;TOUCHBIT)
+ (LINE 0)
+ (CHARACTER 9)>
+
+<OBJECT LOVER
+ (DESC "Deirdre")
+ (IN LIMBO ;LOCAL-GLOBALS)
+ (ADJECTIVE BLOND BLONDE MS MISS
+ DEIRDRE DEE HALLAM WOMAN ;"for poss's")
+ (SYNONYM DEIRDRE DEE HALLAM WOMAN)
+ (ACTION LOVER-F)
+ (DESCFCN LOVER-D)
+ (LDESC 0)
+ ;(TEXT "She looks almost as lovely as her portrait.")
+ (FLAGS OPENBIT PERSONBIT SEARCHBIT FEMALE NARTICLEBIT ;TOUCHBIT)
+ (LINE 0)
+ (STATION A?DEE\'S)
+ (CHARACTER 9)>
+
+<ROUTINE LOVER-D ("OPTIONAL" (ARG <>))
+ <DESCRIBE-PERSON ,LOVER>
+ <RTRUE>>
+
+<GLOBAL LOVER-SAID:FLAG <>>
+<ROUTINE LOVER-F ("OPTIONAL" (ARG 0))
+ <COND ;(<AND <IN? ,LOVER ,HERE> ;"never happens"
+ <OR <VERB? ALARM SHAKE>
+ <SPEAKING-VERB?>>
+ <DOBJ? LOVER>>
+ ;<COND (<NOT <GRAB-ATTENTION ,LOVER>> <RFATAL>)>
+ <COND (<UNSNOOZE ,LOVER>
+ <RFATAL>)
+ (T <LOVER-SPEECH>)>)
+ (<AND <IN? ,LOVER-PIC ,HERE>
+ <NOT <REMOTE-VERB?>>>
+ <DO-INSTEAD-OF ,LOVER-PIC ,LOVER>
+ <RTRUE>)
+ (T <PERSON-F ,LOVER .ARG>)>>
+
+<OBJECT DEB
+ (DESC "Iris")
+ (IN GREAT-HALL)
+ (ADJECTIVE MS MISS
+ IRIS VANE WOMAN ;DEB ;"for poss's")
+ (SYNONYM IRIS VANE WOMAN ;DEB)
+ (ACTION DEB-F)
+ (DESCFCN DEB-D)
+ (LDESC 1 ;"dancing")
+ (WEST "looking coy")
+ (TEXT
+"The girl is a stylish London deb type.
+Her dark hair is cut boyishly short. Her height and figure would make
+her a perfect high-fashion model.")
+ (FLAGS OPENBIT PERSONBIT SEARCHBIT FEMALE NARTICLEBIT NDESCBIT)
+ (CAPACITY 40)
+ (LINE 0)
+ (CHARACTER 7)>
+
+<ROUTINE DEB-D ("OPTIONAL" (ARG 0))
+ <COND (T ;<OR <FSET? ,DEB ,TOUCHBIT>
+ <T? ,CLOCK-WAIT>>
+ <DESCRIBE-PERSON ,DEB>)>
+ <RTRUE>>
+
+<ROUTINE DEB-F ("OPTIONAL" (ARG <>) "AUX" OBJ X)
+ <COND (<==? .ARG ,M-WINNER>
+ <SETG FAWNING <>>
+ <COND (<AND <EQUAL? ,AWAITING-REPLY ,DEB-C>
+ <VERB? YES NO>>
+ <ESTABLISH-GOAL ,DOCTOR ,HERE>
+ <PUTP ,DEB ,P?LDESC 0>
+ <PUTP ,DEB ,P?LINE 0>
+ <SETG AWAITING-REPLY <>>
+ <COND (<VERB? YES> <TELL "\"Splendid!\"" CR>)
+ (T <TELL "\"What a pity!\"" CR>)>)
+ (<NOT <GRAB-ATTENTION ,DEB>> <RFATAL>)
+ (<AND <VERB? DESCRIBE> <DOBJ? GHOST-NEW>>
+ <FSET ,GHOST-NEW ,PERSONBIT>
+ <TELL
+"\"Well, it appeared to be a woman with " ,LONG-BLOND-HAIR " in a ">
+ <COND (<NOT<EQUAL? ,VARIATION,DOCTOR-C ;,DEALER-C ;,OFFICER-C>>
+ ;<EQUAL? ,VARIATION ,FRIEND-C ,PAINTER-C ,LORD-C>
+ <TELL "sleeveless, ">)>
+ <TELL
+"silvery white gown. But if you're asking me, 'Was it really poor Dee?'
+I'm just not sure. ">
+ <COND (<EQUAL? ,VARIATION ,FRIEND-C ,LORD-C>
+ <TELL
+"I didn't see the face that well.
+But I'd say the figure was average height, and moved in a very
+feminine way, just as she did -- so it COULD have been her ghost.\"" CR>)
+ (<EQUAL? ,VARIATION ,PAINTER-C>
+ <TELL
+"It seemed different from Dee in some way...\"|
+She snaps her fingers, and her eyes brighten maliciously.
+\"Now I know! The ghost was too tall! Definitely taller than she!\"" CR>)
+ (T
+ <TELL "It was ">
+ <COND ;(<EQUAL? ,VARIATION ,DEALER-C ,OFFICER-C>
+ <TELL "definitely taller than Dee, and">)
+ (T <TELL"about the right height, I suppose, but">)>
+ <TELL
+" its gown, with long sleeves and a high neck, seemed different from
+hers. It lacked her femininity. She was a very feminine woman, you know
+-- almost seductive, as I'm sure Jack can testify. The ghost was just a
+sexless spook, one might say.\"" CR>)>)
+ (<AND <VERB? FOLLOW>
+ <DOBJ? PLAYER>
+ <WILLING? ,DEB>>
+ <TELL "\"Ooo! I love an adventure, "FN"!\"" CR>
+ <NEW-FOLLOWER ,DEB>
+ <RTRUE>)
+ (<SET X <COM-CHECK ,DEB>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>)
+ (<==? .X ,M-OTHER> <RFATAL>)
+ (T <RTRUE>)>)
+ (T <WINNER-DEFAULT ,DEB>)>)
+ (<SET OBJ <ASKING-ABOUT? ,DEB>>
+ <COND (<NOT <GRAB-ATTENTION ,DEB .OBJ>>
+ <RFATAL>)
+ (<AND <EQUAL? .OBJ ,SEARCHER>
+ <OR <T? ,CONFESSED>
+ <T? <GET ,TOLD-ABOUT-EVID ,DEB-C>>>
+ ;<NOT <==? ,DEB ,SEARCHER>>>
+ <TELL ,IM-SHOCKED>)
+ (<EQUAL? .OBJ ,GHOST-NEW ,DANGER ,HAUNTING>
+ <TELL
+"\"It was quite dramatic, really. One night I couldn't
+sleep, so I got a poetic urge to go up on the " 'DECK " in the moonlight
+and commune with my soul.\"|"
+'DEB " goes on, \"As I started up the tower stairs, I saw this
+figure in white coming 'round the curve of the stairway. My dear, I
+absolutely FROZE! The ghost turned 'round and flitted
+back up the stairs, and by the time I recovered, it was
+gone!\"" CR>)
+ (<EQUAL? .OBJ ,TAMARA-EVIDENCE>
+ <TELL "\"My word! It looks as if someone dislikes me!\"" CR>)
+ (<SET X <COMMON-ASK-ABOUT ,DEB .OBJ>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>) (T <RTRUE>)>)
+ (T <TELL-DUNNO ,DEB .OBJ>)>)
+ (<VERB? RUB KISS DANCE>
+ <COND (<WILLING? ,DEB T>
+ <UNSNOOZE ,DEB>
+ <PUTP ,DEB ,P?LINE 0>
+ <PUTP ,DEB ,P?LDESC 0>
+ ;<COND (<EQUAL? ,AWAITING-REPLY ,DEB-C>
+ <QUEUE I-REPLY 0>)>
+ <TELL "\"Oooo">
+ <I-JUST-LOVE-IT>
+ <RTRUE>)>)
+ (T <PERSON-F ,DEB .ARG>)>>
+
+<ROUTINE WILLING? (PER "OPT" (KISS <>))
+ <COND (<ZERO? .KISS>
+ <COND (<L? ,BED-TIME ,PRESENT-TIME>
+ <RFALSE>)
+ (<QUEUED? ,I-TOUR>
+ <RFALSE>)
+ (<OR <EQUAL? ,HERE ,DINING-ROOM>
+ <QUEUED? ,I-DINNER-SIT> ;"not during dinner">
+ <RFALSE>)
+ (<EQUAL? .PER ,CONFESSED ,CAPTOR>
+ <RFALSE>)
+ (T <RTRUE>)>)
+ (<EQUAL? .PER ,FRIEND>
+ <COND (<NOT <EQUAL? ,VARIATION ,FRIEND-C>>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ (<EQUAL? .PER ,BUTLER>
+ <COND (<AND <VERB? EMPTY ;"UNPACK">
+ <NOT <==? ,HERE ,YOUR-ROOM>>>
+ <RFALSE>)
+ (<VERB? FOLLOW>
+ <RFALSE>)
+ (T <RTRUE>)>)
+ (<T? ,GENDER-KNOWN>
+ <COND (<==? .PER ,DEB>
+ <COND (<NOT <FSET? ,PLAYER ,FEMALE>>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ (<==? .PER ,OFFICER>
+ <COND (<FSET? ,PLAYER ,FEMALE>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ (T <RFALSE>)>)>>
+
+<OBJECT OFFICER
+ (DESC "Ian")
+ (IN GREAT-HALL)
+ (ADJECTIVE TALL BLOND ;LT MR MISTER
+ IAN FORDYCE OFFICE MAN ;"for poss's")
+ (SYNONYM IAN FORDYCE OFFICE MAN)
+ (ACTION OFFICER-F)
+ (DESCFCN OFFICER-D)
+ (LDESC 1 ;"dancing")
+ (WEST "looking debonair")
+ (FLAGS OPENBIT PERSONBIT SEARCHBIT NARTICLEBIT ;TOUCHBIT)
+ (CAPACITY 40)
+ (LINE 0)
+ (CHARACTER 5)>
+
+<ROUTINE OFFICER-D ("OPTIONAL" (ARG 0))
+ <COND (<FSET? ,OFFICER ,TOUCHBIT>
+ <DESCRIBE-PERSON ,OFFICER>)
+ (T
+ <FSET ,OFFICER ,TOUCHBIT>
+ <FSET ,OFFICER ,SEENBIT>)>
+ <RTRUE>>
+
+<ROUTINE I-JUST-LOVE-IT ()
+ <TELL "! I just love it when you do that, "FN"!\"" CR>>
+
+<ROUTINE WINNER-DEFAULT (PER)
+ <COND (<T? ,GENDER-KNOWN>
+ <TELL !\">
+ <COND (<T? ,FAWNING> <TELL "But ">)>
+ <TELL "I really can't help you with that">
+ <COND (<EQUAL? .PER ,OFFICER>
+ <IAN-CALLS-YOU>)>
+ <TELL ".\"" CR>)
+ (T <WHY-ME> <RFATAL>)>>
+
+<ROUTINE OFFICER-F ("OPTIONAL" (ARG 0) "AUX" P OBJ X)
+ <COND (<==? .ARG ,M-WINNER>
+ <SETG FAWNING <>>
+ <COND (<AND <EQUAL? ,AWAITING-REPLY ,OFFICER-1-R ,OFFICER-2-R>
+ <VERB? YES NO>>
+ <ESTABLISH-GOAL ,DOCTOR ,HERE>
+ <PUTP ,OFFICER ,P?LDESC 0>
+ <PUTP ,OFFICER ,P?LINE 0>
+ <TELL !\">
+ <COND (<VERB? YES>
+ <TELL "Jolly good">
+ <COND (<EQUAL? ,AWAITING-REPLY ,OFFICER-1-R>
+ <TELL "! You're certainly quick">)>)
+ (<EQUAL? ,AWAITING-REPLY ,OFFICER-1-R>
+ <TELL "I dare say you soon shall">)
+ (T <TELL "Pity">)>
+ <SETG AWAITING-REPLY <>>
+ <TELL "!\"" CR>
+ <RTRUE>)
+ (<NOT <GRAB-ATTENTION ,OFFICER>> <RFATAL>)
+ (<AND <VERB? DESCRIBE>
+ <DOBJ? GHOST-NEW>
+ <EQUAL? ,VARIATION ;,DEALER-C ,PAINTER-C>>
+ <TELL
+"\"Ghosts don't turn off lights, to my way of thinking.
+That alone makes me think our " 'GHOST-OLD "'s a fake. Somebody's sick idea
+of a joke, perhaps. ">
+ <COND ;(<EQUAL? ,VARIATION ,DEALER-C>
+ <TELL
+"Come to that, I'm not even sure it WAS a lady.
+It was too tall for Dee, and there was nothing feminine about its gown,
+which covered up everything but its face and hands. Just the sort of outfit
+a bloke might wear with a blonde wig to go flitting about in drag.\""
+CR>)
+ (T
+ <FSET ,GHOST-NEW ,PERSONBIT>
+ <TELL
+"Otherwise, the masquerade was highly effective.
+A female figure with " ,LONG-BLOND-HAIR ", wearing the same sort of gown
+Dee was wearing that awful night she died -- at first
+it left me breathless. The only flaw, I should say,
+was the spook's height: too tall for Dee.\"" CR>)>)
+ (<AND <VERB? FOLLOW>
+ <DOBJ? PLAYER>
+ <WILLING? ,OFFICER>>
+ <TELL "\"What ho! A bit of sleuthing, eh, "FN"?\"" CR>
+ <NEW-FOLLOWER ,OFFICER>
+ <RTRUE>)
+ (<SET X <COM-CHECK ,OFFICER>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>)
+ (<==? .X ,M-OTHER> <RFATAL>)
+ (T <RTRUE>)>)
+ (T <WINNER-DEFAULT ,OFFICER>)>)
+ (<SET OBJ <ASKING-ABOUT? ,OFFICER>>
+ <COND (<NOT <GRAB-ATTENTION ,OFFICER .OBJ>>
+ <RFATAL>)
+ (<AND <EQUAL? .OBJ ,SEARCHER>
+ <OR <T? ,CONFESSED>
+ <T? <GET ,TOLD-ABOUT-EVID ,OFFICER-C>>>
+ ;<NOT <==? ,OFFICER ,SEARCHER>>>
+ <TELL ,IM-SHOCKED>)
+ ;(<AND <EQUAL? .OBJ ,JEWEL>
+ <EQUAL? ,VARIATION ,OFFICER-C>
+ <SET P <FIND-JEWEL-EXPLAINER>>>
+ <SETG EXPLAINED-JEWEL .P>
+ <TELL
+"Suddenly" THE .P " exclaims, \"Why, Ian! Isn't this that " 'JEWEL "
+you wear in one ear? I seem to recall you had it on at dinner just last
+night!\"|
+Fordyce looks startled and a trifle embarrassed. \"By jove, perhaps you're
+right!\"|
+He fingers his left ear lobe and appears surprised to discover that the
+jewel is no longer there.|
+\"Must have dropped off just a few minutes ago. I put it on when I dressed
+for dinner. Thanks very much for finding it">
+ <IAN-CALLS-YOU>
+ <TELL ".\"" CR>)
+ (<EQUAL? .OBJ ,LENS ,LENS-1 ,LENS-2>
+ <TELL
+CHE ,OFFICER " grins, \"It's not mine. Her Majesty would hardly allow me
+to serve in her Coldstream Guards were my vision faulty!\"" CR>)
+ (<AND <EQUAL? .OBJ ,GHOST-NEW ,DANGER ,HAUNTING>
+ <EQUAL? ,VARIATION ;,DEALER-C ,PAINTER-C>>
+ <TELL
+"\"It was the last time I came down here to visit Jack. We had been up
+late, playing cards in the " 'GAME-ROOM ". Then Jack toddled off to bed,
+but I stayed up to read and finish my drink. I must have dozed off with
+my glass in my hand, for I woke with a start as it crashed to the floor.
+And the first thing I saw was this figure in white at the other end of
+the room.\"|
+He goes on, \"Blimey, I thought I was seeing things!
+For a moment I just gaped at it. Then the spook went haring off
+out the door, flicking off the light on the way.
+By the time I found the door, it was gone.\"" CR>)
+ (<SET X <COMMON-ASK-ABOUT ,OFFICER .OBJ>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>) (T <RTRUE>)>)
+ (T <TELL-DUNNO ,OFFICER .OBJ>)>)
+ (<VERB? RUB KISS DANCE>
+ <COND (<WILLING? ,OFFICER T>
+ <UNSNOOZE ,OFFICER>
+ <PUTP ,OFFICER ,P?LINE 0>
+ <PUTP ,OFFICER ,P?LDESC 0>
+ ;<COND (<EQUAL? ,AWAITING-REPLY ,OFFICER-1-R ,OFFICER-2-R>
+ <QUEUE I-REPLY 0>)>
+ <TELL"\"Hello">
+ <I-JUST-LOVE-IT>
+ <RTRUE>)>)
+ (T <PERSON-F ,OFFICER .ARG>)>>
+
+<ROUTINE IAN-CALLS-YOU ()
+ <COND (<ZERO? <GETB ,LAST-NAME 0>>
+ <RFALSE>)>
+ <TELL ", " FN>
+ <COND (<NOT <ZERO? ,GENDER-KNOWN>>
+ <COND (<FSET? ,PLAYER ,FEMALE> <TELL " luv">)
+ (T
+ <TELL " old ">
+ <COND (<BTST ,PRESENT-TIME 1> <TELL "chap">)
+ (T <TELL "son">)>)>)>
+ <RTRUE>>
+[
+<OBJECT DOCTOR
+ (DESC "Dr. Wendish")
+ (IN GALLERY ;STAIRS-NEW)
+ (ADJECTIVE DR ;DOC
+ DOCTOR NICHOLAS WENDISH MAN ;"for poss's")
+ (SYNONYM DOCTOR NICHOLAS WENDISH MAN) ;"DR here screws parsing"
+ (ACTION DOCTOR-F)
+ (DESCFCN DOCTOR-D)
+ (LDESC 0)
+ (WEST "looking muddled" ;"anxious")
+ (FLAGS OPENBIT PERSONBIT SEARCHBIT NARTICLEBIT ;RMUNGBIT)
+ (CAPACITY 40)
+ (LINE 0)
+ (STATION A?DOC\'S)
+ (CHARACTER 4)>
+
+<ROUTINE DOCTOR-D ("OPTIONAL" (ARG 0))
+ <COND ;(<OR <FSET? ,DOCTOR ,RMUNGBIT>
+ ;<T? ,CLOCK-WAIT>>
+ <FCLEAR ,DOCTOR ,RMUNGBIT>
+ <RTRUE>)
+ (<FSET? ,DOCTOR ,TOUCHBIT>
+ <DESCRIBE-PERSON ,DOCTOR>
+ <RTRUE>)
+ (T
+ <FSET ,DOCTOR ,TOUCHBIT>
+ ;<COND (<EQUAL? <LOC ,FRIEND> ,HERE ,PSEUDO-OBJECT>
+ <SET P ,FRIEND>)
+ (T <SET P ,DEB>)>
+ <COND (T ;<NOT <FSET? ,DOCTOR ,TOUCHBIT>>
+ ;<FSET ,DOCTOR ,TOUCHBIT>
+ <CRLF>
+ <COND (T ;<T? .P>
+ <TELL !\">
+ <COND (<T? ,TOUR-FORCED>
+ <TELL "Oh,">)
+ (T <TELL
+"Do excuse me for interrupting,\" " D ,FRIEND ;.P " breaks in, \"but">)>
+ <TELL " here comes
+" D ,DOCTOR "! I'm sure "FN" wants to meet such a distinguished
+scientist!\"|">)
+ ;(T <TELL "Your conversation is interrupted. ">)>
+ <TELL "A man is coming downstairs. ">
+ <COMMON-DESC ,DOCTOR>
+ ;<TELL <GETP ,DOCTOR ,P?TEXT> CR>
+ <SETG QCONTEXT ,DOCTOR>
+ <THIS-IS-IT ,DOCTOR>
+ <PUTP ,DOCTOR ,P?LDESC 12 ;"listening to you">
+ <SETG AWAITING-REPLY ,DOCTOR-C>
+ <QUEUE I-REPLY ,CLOCKER-RUNNING>
+ <TELL
+D ,FRIEND ;.P ,INTRODUCES "him as one of Lionel's
+oldest friends, Dr. Nicholas Wendish.|
+He's carelessly dressed in rumpled evening clothes, but his
+hawk eyes peering at you through gold-rimmed specs show ruthless intelligence.|
+\"I read about one of your mystery cases when I was in New York last year,
+"TN",\" he probes. \"" <GET ,QUESTIONS ,AWAITING-REPLY> "\"|">)>
+ <RFATAL>)>>
+
+<ROUTINE DOCTOR-F ("OPTIONAL" (ARG 0) "AUX" OBJ X)
+ <COND (<==? .ARG ,M-WINNER>
+ <COND (<AND <EQUAL? ,AWAITING-REPLY ,DOCTOR-C>
+ <VERB? YES NO>>
+ <PUTP ,DOCTOR ,P?LDESC 0>
+ <PUTP ,DOCTOR ,P?LINE 0>
+ <SETG AWAITING-REPLY <>>
+ <TELL "\"I see...\"" CR>)
+ (<NOT <GRAB-ATTENTION ,DOCTOR>> <RFATAL>)
+ (<AND <VERB? DESCRIBE>
+ <DOBJ? GHOST-NEW>
+ <EQUAL? ,VARIATION ,DOCTOR-C ;,OFFICER-C>>
+ <TELL
+'DOCTOR " shrugs, with a look of distaste, as if he'd like to forget
+the episode. \"">
+ <COND (T ;<EQUAL? ,VARIATION ,DOCTOR-C>
+ <TELL "I'm afraid I can't tell you any more, ">
+ <COND (<TITLE-NAME> <TELL !\.>)>
+ <TELL
+" I assumed the ghost was " 'LOVER ". It certainly looked like her: a blonde,
+attractive young woman. If it WASN'T " 'LOVER ", it was a
+convincing imposture.\"" CR>)
+ ;(T
+ <TELL "The truth is, ">
+ <TITLE-NAME>
+ <TELL
+", I'm afraid I over-reacted. Once I'd collected myself and was able to
+think normally, I had a strong feeling that I'd been the victim of a
+vulgar hoax. Whomever I saw bore only a superficial resemblance to poor
+" 'LOVER " Hallam. For one thing, it was definitely too tall. And aside
+from the " ,LONG-BLOND-HAIR ", which could easily have been a wig, there
+was really nothing very feminine about it. Judging by its posture and
+movements, it could have been a man. Even its
+gown was the kind a man would need to pass as a woman:
+long sleeves and high neck.\"" CR>)>)
+ (<DIVESTMENT? ,MUSTACHE>
+ <COND (<EQUAL? ,VARIATION ,DOCTOR-C>
+ <TELL ,MUSTACHE-STORY>
+ <RTRUE>)
+ (T <HAR-HAR>)>)
+ (<SET X <COM-CHECK ,DOCTOR>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>)
+ (<==? .X ,M-OTHER> <RFATAL>)
+ (T <RTRUE>)>)
+ (T <WHY-ME> <RFATAL>)>)
+ (<SET OBJ <ASKING-ABOUT? ,DOCTOR>>
+ <COND (<NOT <GRAB-ATTENTION ,DOCTOR .OBJ>>
+ <RFATAL>)
+ (<AND <EQUAL? .OBJ ,SEARCHER>
+ <OR <T? ,CONFESSED>
+ <T? <GET ,TOLD-ABOUT-EVID ,DOCTOR-C>>>
+ <NOT <==? ,DOCTOR ,SEARCHER>>>
+ <TELL ,IM-SHOCKED>)
+ (<EQUAL? .OBJ ,COUSIN ,BUST ;,RECORDER>
+ <TELL "\"He loved me as a brother.\"" CR>)
+ (<AND <EQUAL? .OBJ ,GHOST-NEW ,DANGER ,HAUNTING>
+ <EQUAL? ,VARIATION ,DOCTOR-C ;,OFFICER-C>>
+ <TELL
+"The doctor pauses, looking troubled, as if reluctant
+to speak, or perhaps marshaling his thoughts.|
+\"On the very night after " 'ACCIDENT ",\" he says at last,
+\"I couldn't sleep. I suppose the tragedy was on my mind. That and the
+medical cases I have in my London clinic for rare diseases. Anyhow, I
+took a stroll out in the " 'COURTYARD ". The fresh sea breeze was very
+soothing. When I went back inside, I felt ready for sleep. I went in
+through the " 'OLD-GREAT-HALL ;"tower door" ", you see.\"|
+He goes on, \"Then I saw this ghostly figure in white -- Good Lord, what
+a shock it gave me! I couldn't move for a moment; I thought " 'LOVER "
+had come back from the dead. As I stood there, staring, the ghost
+flitted off toward the " 'BASEMENT "... I felt no impulse to go after
+it, I might add.\"" CR>)
+ (<EQUAL? .OBJ ,LENS ,LENS-1 ,LENS-2>
+ <TELL !\">
+ <COND (<AND <EQUAL? ,VARIATION ,DOCTOR-C ;,DEALER-C ,PAINTER-C>
+ <T? ,FOUND-IT-PERM>
+ ;<FSET? ,FOUND-IT-PERM ,SEENBIT>
+ ;<FSET? ,LENS ,TOUCHBIT>>
+ <TELL "Not mine. ">)>
+ <TELL
+"As you see, I wear glasses at all times,\" he says." CR>)
+ (<AND <EQUAL? .OBJ ,MUSTACHE>
+ <EQUAL? ,VARIATION ,DOCTOR-C>>
+ <TELL ,MUSTACHE-STORY>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,WENDISH-STUFF>
+ <TELL "\"I always bring them along.\"" CR>)
+ (<SET X <COMMON-ASK-ABOUT ,DOCTOR .OBJ>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>) (T <RTRUE>)>)
+ (T <TELL-DUNNO ,DOCTOR .OBJ>)>)
+ (T <PERSON-F ,DOCTOR .ARG>)>>
+
+<OBJECT MUSTACHE
+ (DESC "Wendish's mustache")
+ (IN DOCTOR)
+ (ADJECTIVE DOC\'S HIS)
+ (SYNONYM MUSTACHE)
+ (FLAGS NDESCBIT TRYTAKEBIT NARTICLEBIT)
+ (ACTION MUSTACHE-F)>
+
+<ROUTINE MUSTACHE-F ()
+ <COND (<AND <OR <VERB? ASK-FOR MOVE TAKE>
+ <DIVESTMENT? ,MUSTACHE>>
+ <IN? ,MUSTACHE ,DOCTOR>>
+ <COND (<FSET? ,DOCTOR ,MUNGBIT>
+ <COND (<EQUAL? ,VARIATION ,DOCTOR-C>
+ <FSET ,MUSTACHE ,TAKEBIT>
+ <FCLEAR ,MUSTACHE ,TRYTAKEBIT>)>
+ <RFALSE>)
+ (<OR <NOT <EQUAL? ,VARIATION ,DOCTOR-C>>
+ <FSET? ,MUSTACHE ,TOUCHBIT>>
+ <FACE-RED ,DOCTOR>
+ <RTRUE>)
+ (T
+ <FSET ,MUSTACHE ,TOUCHBIT>
+ <TELL
+"It comes off, leaving " 'DOCTOR " blinking with embarrassment.
+He grabs it and puts it in place again. " ,MUSTACHE-STORY>
+ <RTRUE>)>)
+ (<OR <VERB? WEAR>
+ <AND <VERB? PUT> <FSET? ,PRSI ,PERSONBIT>>>
+ <WEAR-SCARE>)>>
+
+<GLOBAL MUSTACHE-STORY
+"\"Dear me,\" he giggles nervously, \"I'm afraid you've found out my little
+secret! A lady friend, you see, begged me to shave off my mustache.
+I did so just before coming to Cornwall. But then I felt so naked without
+it, that I bought a hair piece until I could grow back my own.\"|">
+
+<OBJECT WENDISH-BOOK
+ (DESC "lab notebook")
+ (ADJECTIVE DOC\'S HIS NOTE LAB LABORATORY)
+ (SYNONYM NOTEBOOK BOOK BOOKS EVIDENCE ;TEXT)
+ (GENERIC GENERIC-BOOK)
+ (FLAGS READBIT CONTBIT NDESCBIT SECRETBIT RMUNGBIT ;"evidence")
+ (CHARACTER 4) ;"for this char"
+ (CAPACITY 4)
+ (ACTION WENDISH-BOOK-F)>
+
+<ROUTINE WENDISH-BOOK-F ()
+ <COND (<VERB? EXAMINE LOOK-INSIDE READ>
+ <COND (<NOT-HOLDING? ,PRSO>
+ <RTRUE>)>
+ <TELL
+"The " 'WENDISH-BOOK " contains an incriminating record of " 'DOCTOR "'s
+fiendish experiments on patients at his clinic. Near the end you
+read:|
+\"Finally took care of Poldark's granddau. (comely wench), pity
+she disc'd facts of his end.\"">
+ ;<TELL
+" that he \"took care of\" " 'LOVER " after she discovered his fatal
+mistreatment of her grandfather.">
+ <CRLF>
+ <COND (<ZERO? ,EVIDENCE-FOUND>
+ <CONGRATS>)>
+ <SETG EVIDENCE-FOUND ,WENDISH-BOOK>)>>
+]
+<OBJECT DEALER
+ (DESC "Hyde")
+ (IN DRAWING-ROOM)
+ (ADJECTIVE TALL ART MR MISTER
+ MONTAGUE ;MONTY HYDE DEALER MAN ;"for poss's")
+ (SYNONYM MONTAGUE ;MONTY HYDE DEALER MAN)
+ (ACTION DEALER-F)
+ (DESCFCN DEALER-D)
+ (LDESC 2 ;"sipping sherry")
+ (WEST "examining objects")
+ (FLAGS OPENBIT PERSONBIT SEARCHBIT NARTICLEBIT NDESCBIT)
+ (CAPACITY 40)
+ (LINE 0)
+ (CHARACTER 6)>
+
+<ROUTINE DEALER-D ("OPTIONAL" (ARG 0) "AUX" PER)
+ <COND (T ;<FSET? ,DEALER ,TOUCHBIT>
+ <DESCRIBE-PERSON ,DEALER>)>
+ ;<THIS-IS-IT ,PAINTER>
+ ;<THIS-IS-IT ,DEALER>
+ <RTRUE>>
+
+<ROUTINE DEALER-F ("OPTIONAL" (ARG 0) "AUX" OBJ X)
+ <COND (<==? .ARG ,M-WINNER>
+ <COND (<NOT <GRAB-ATTENTION ,DEALER>> <RFATAL>)
+ (<AND <VERB? DESCRIBE>
+ <DOBJ? GHOST-NEW>
+ <NOT <EQUAL? ,VARIATION ,PAINTER-C ;,OFFICER-C>>>
+ <TELL
+"\"You're wondering, I presume, if it really was " 'LOVER " Hallam's
+ghost? Frankly, I don't put stock in ghosts, but my answer is... ">
+ <FSET ,GHOST-NEW ,PERSONBIT>
+ <COND (<EQUAL? ,VARIATION
+ ;,DEALER-C ,FRIEND-C ,PAINTER-C ,LORD-C>
+ <TELL
+"possibly. That's as far as I'd go.
+It was certainly a female figure, in a shimmering whitish gown,
+sleeveless and cut low. She had " ,LONG-BLOND-HAIR " like "
+'LOVER "'s and was about her size. But as for her face -- my
+view was too brief,\" Hyde shrugs." CR>)
+ (T <TELL
+"I'm not at all convinced. Somehow it didn't match
+my memories of " 'LOVER ".
+For one thing, the gown wasn't her style, at all. Her clothes were
+always quite revealing. The ghost seemed quite covered up
+at the throat and arms. You might say it totally lacked
+feminine sex appeal.\"" CR>)>)
+ (<SET X <COM-CHECK ,DEALER>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>)
+ (<==? .X ,M-OTHER> <RFATAL>)
+ (T <RTRUE>)>)
+ (T <WHY-ME> <RFATAL>)>)
+ (<SET OBJ <ASKING-ABOUT? ,DEALER>>
+ <COND (<NOT <GRAB-ATTENTION ,DEALER .OBJ>>
+ <RFATAL>)
+ (<AND <EQUAL? .OBJ ,SEARCHER>
+ <OR <T? ,CONFESSED>
+ <T? <GET ,TOLD-ABOUT-EVID ,DEALER-C>>>
+ ;<NOT <==? ,DEALER ,SEARCHER>>>
+ <TELL ,IM-SHOCKED>)
+ (<AND <EQUAL? .OBJ ,GHOST-NEW ,DANGER ,HAUNTING>
+ <NOT <EQUAL? ,VARIATION ,PAINTER-C ;,OFFICER-C>>>
+ <TELL
+"\"I came down late one night to get a book that I'd left in the "
+'SITTING-ROOM ". I had just turned 'round to go back upstairs when I saw
+a ghostly figure in the doorway. It fled as soon as I noticed it, in the
+" D ,INTDIR " of the tower.\"|
+He goes on, \"I was stunned, I must admit, so I dare say it took me a
+moment to collect my wits and go after it. I ran into the tower, but the
+spectre had vanished. This happened, by the way, a couple of weeks ago, on
+my last visit to the castle.\"" CR>)
+ (<EQUAL? .OBJ ,LENS ,LENS-1 ,LENS-2>
+ <TELL
+CHE ,DEALER " displays his monocle, saying, \"This is the only vision
+aid I require.\"" CR>)
+ (<OR <EQUAL? .OBJ ,ARMOR ,BUST ;,CARTOON>
+ <EQUAL? .OBJ ,FIGURINE ,LOVER-PIC ,OIL-PAINTING>
+ <EQUAL? .OBJ ,PAINTING-GALLERY ,WRITING-DESK>>
+ <TELL "\"I haven't formed my professional opinion as yet.\""CR>)
+ (<SET X <COMMON-ASK-ABOUT ,DEALER .OBJ>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>) (T <RTRUE>)>)
+ (T <TELL-DUNNO ,DEALER .OBJ>)>)
+ (T <PERSON-F ,DEALER .ARG>)>>
+
+<OBJECT PAINTER
+ (DESC "Vivien")
+ (IN DRAWING-ROOM)
+ (ADJECTIVE TALL MS MISS MRS
+ VIVIEN VIV PENTREATH WOMAN ;"for poss's")
+ (SYNONYM VIVIEN VIV PENTREATH WOMAN)
+ (ACTION PAINTER-F)
+ (DESCFCN PAINTER-D)
+ (LDESC 2 ;"sipping sherry")
+ (WEST "studying colors")
+ (TEXT
+"She is a tall, tawny-haired woman of vintage beauty and uncertain age.")
+ (FLAGS OPENBIT PERSONBIT SEARCHBIT FEMALE NARTICLEBIT ;TOUCHBIT)
+ (CAPACITY 40)
+ (LINE 0)
+ (STATION A?VIV\'S)
+ (CHARACTER 3)>
+
+<ROUTINE PAINTER-D ("OPTIONAL" (ARG 0))
+ <COND (<FSET? ,PAINTER ,TOUCHBIT>
+ <DESCRIBE-PERSON ,PAINTER>)
+ (T
+ <FSET ,PAINTER ,TOUCHBIT>
+ <FCLEAR ,DEALER ,NDESCBIT>
+ <COND (<AND <EQUAL? <LOC ,DEALER> ,HERE ,PSEUDO-OBJECT>
+ <=? <GETP ,DEALER ,P?LDESC> 2>>
+ <RFALSE>)>)>
+ <RTRUE>>
+
+<GLOBAL GLASSES-FOR " glasses for closeup art work">
+
+<ROUTINE PAINTER-F ("OPTIONAL" (ARG 0) "AUX" OBJ X)
+ <COND (<==? .ARG ,M-WINNER>
+ <COND (<NOT <GRAB-ATTENTION ,PAINTER>> <RFATAL>)
+ (<AND <VERB? DESCRIBE>
+ <DOBJ? GHOST-NEW>
+ <EQUAL? ,VARIATION ,PAINTER-C ;,OFFICER-C>>
+ <FSET ,GHOST-NEW ,PERSONBIT>
+ <COND (T ;<EQUAL? ,VARIATION ,PAINTER-C>
+ <TELL
+"\"It was " 'LOVER ", or her ghost. What more can I say? A female
+figure, her size, wearing the same sort of shimmering white gown she had
+on the night she died -- and unmistakably her face! The likeness was
+heart-stopping...\"|
+Vivien chokes up for a moment, then dabs her eyes. \"I'm sorry. I
+shouldn't let my feelings take over this way, but " 'LOVER " was such a
+lovely person!\"" CR>)
+ ;(T <TELL
+"\"Well, it was a figure with a white gown and " ,LONG-BLOND-HAIR ". But
+other than that, there was nothing very feminine about it. And it was
+taller than " 'LOVER ". I admit I didn't get a good look at its face,
+because it was dark and far away. All I can say is, if someone was
+posing as " 'LOVER "'s ghost, he or she didn't convince me.\"" CR>)>)
+ (<SET X <COM-CHECK ,PAINTER>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>)
+ (<==? .X ,M-OTHER> <RFATAL>)
+ (T <RTRUE>)>)
+ (T <WHY-ME> <RFATAL>)>)
+ (<SET OBJ <ASKING-ABOUT? ,PAINTER>>
+ <COND (<NOT <GRAB-ATTENTION ,PAINTER .OBJ>>
+ <RFATAL>)
+ (<EQUAL? .OBJ ,BUST ,FIGURINE ;,LOVER-PIC>
+ <TELL "\"Yes, that's one of my works.\"" CR>)
+ ;(<EQUAL? .OBJ ,CARTOON>
+ <TELL "\"I don't recall who drew that.\"" CR>)
+ (<AND <EQUAL? .OBJ ,SEARCHER>
+ <OR <T? ,CONFESSED>
+ <T? <GET ,TOLD-ABOUT-EVID ,PAINTER-C>>>
+ <NOT <==? ,PAINTER ,SEARCHER>>>
+ <TELL ,IM-SHOCKED>)
+ (<AND <EQUAL? .OBJ ,FRIEND>
+ <EQUAL? ,VARIATION ,PAINTER-C>
+ ;<T? ,CONFESSED>>
+ ;<DISCRETION ,PAINTER .OBJ>
+ <TELL ,RHYMES-WITH-RICH CR>)
+ (<AND <EQUAL? .OBJ ,GHOST-NEW ,DANGER ,HAUNTING>
+ <EQUAL? ,VARIATION ,PAINTER-C ;,OFFICER-C>>
+ <TELL
+CHE ,PAINTER " is somber as she replies, \"I dare say it was morbid of
+me, but one night I went to the " 'BASEMENT ", just to try to imagine
+the horrible scene when poor " 'LOVER " suffered her... tragic accident.
+Suddenly I heard someone calling my name softly. I turned 'round, and
+there was " 'LOVER " herself standing by the stairs">
+ <COND (T ;<EQUAL? ,VARIATION ,PAINTER-C>
+ <TELL
+"! I went absolutely numb! She smiled faintly, then fled up the stairs.
+I started to follow, but then I knew it was no use. " 'LOVER " is dead
+and gone, and chasing her ghost won't bring her back to me!\"" CR>)
+ ;(T <TELL
+". Or so I thought at first. But then I realized it WASN'T " 'LOVER ",
+that it COULDN'T be she.
+My disbelief must have been obvious. The imposter suddenly turned and fled.
+And that was the last I saw of it.\"" CR>)>)
+ (<AND <EQUAL? .OBJ ,CLUE-2>
+ <EQUAL? ,VARIATION ,LORD-C>
+ <NOT <IN? .OBJ ,PAINTER>>>
+ <CLUE-2-STORY ,PAINTER>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,LENS ,LENS-1 ,LENS-2>
+ <TELL CHE ,PAINTER>
+ <COND (<EQUAL? ,VARIATION ,PAINTER-C>
+ <TELL
+" says she wears" ,GLASSES-FOR ", as everyone
+knows; then she shudders, \"But " 'LENS "es -- ugh! --
+I could never tolerate them!\"" CR>)
+ (T
+ <TELL
+" admits to wearing " 'LENS "es at all times, and" ,GLASSES-FOR>
+ <COND (<AND <EQUAL? ,VARIATION
+ ,DOCTOR-C ;,DEALER-C ,PAINTER-C>
+ <T? ,FOUND-IT-PERM>
+ ;<FSET? ,FOUND-IT-PERM ,SEENBIT>
+ ;<FSET? ,LENS ,TOUCHBIT>>
+ <TELL
+", but she says the lens you found isn't hers.
+With a cynical smile, she pops out both lenses, one at a time, to show you."
+;"-- and murmurs, \"Satisfied?\"" CR>)
+ (T <TELL "." CR>)>)>)
+ (<EQUAL? .OBJ ,LOVER>
+ <PUTP ,PAINTER ,P?LDESC 7 ;"sobbing quietly">
+ <TELL
+"The artist shrugs with a sad, wistful smile. \"What can I say?
+" 'LOVER " was a most unusual girl... utterly unworldly... almost fey.
+She grew up in a cottage not far from here, you know. Her drowning was
+a terrible tragedy... and yet... sometimes I'm not sure she WANTED
+to go on living.\" She turns her face away to hide a tear."
+;"You feel Vivien knows much more about 'LOVER , but she's too discreet
+to tell." CR>)
+ (<EQUAL? .OBJ ,LOVER-PIC>
+ <TELL
+"\"Oh, you mean my portrait of dear " 'LOVER ". I don't believe I ever saw
+such skin as hers... or such hair.\" She stops speaking and bites her lip."
+CR>)
+ (<EQUAL? .OBJ ,OIL-PAINTING>
+ <TELL "\"I don't admire the heroic style at all.\"" CR>)
+ (<EQUAL? .OBJ ;,VIVIEN-DIARY ;"pass to I-SHOT" ,VIVIEN-STUFF>
+ <TELL
+"\"That's private property. It's no business of yours.\"" CR>)
+ (<SET X <COMMON-ASK-ABOUT ,PAINTER .OBJ>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>) (T <RTRUE>)>)
+ (T <TELL-DUNNO ,PAINTER .OBJ>)>)
+ (<AND <VERB? KISS>
+ <==? <GETP ,PAINTER ,P?LDESC> 7 ;"sobbing quietly">>
+ <PUTP ,PAINTER ,P?LINE 0>
+ <TELL "\"You're sweet.\"" CR>)
+ (T <PERSON-F ,PAINTER .ARG>)>>
+
+<OBJECT VIVIEN-DIARY
+ (DESC "Vivien's diary")
+ (ADJECTIVE VIV\'S HER ;VIVIEN)
+ (SYNONYM EVIDENCE DIARY BOOK BOOKS)
+ (GENERIC GENERIC-BOOK)
+ (FLAGS TAKEBIT NARTICLEBIT READBIT CONTBIT SECRETBIT RMUNGBIT ;"evidence")
+ (CHARACTER 3) ;"for this char"
+ (CAPACITY 4)
+ (ACTION VIVIEN-DIARY-F)>
+
+<ROUTINE VIVIEN-DIARY-F ()
+ <COND (<VERB? EXAMINE LOOK-INSIDE OPEN READ>
+ <COND (<NOT-HOLDING? ,PRSO>
+ <RTRUE>)>
+ <TELL
+'VIVIEN-DIARY " falls open to a tear-stained page, and you read:|
+\"O " 'LOVER ", sweet " 'LOVER "! Jack will pay dearly
+for your cruel death by losing his new sweetheart...\"" CR>
+ ;<TELL
+'VIVIEN-DIARY " reveals her intense attachment to " 'LOVER ", her
+obsessive belief that " 'LORD " drove " 'LOVER " to suicide, and her
+plot for revenge." CR>
+ <COND (<ZERO? ,EVIDENCE-FOUND>
+ <CONGRATS>)>
+ <SETG EVIDENCE-FOUND ,VIVIEN-DIARY>)>>
+
+<OBJECT COUSIN
+ (DESC "Lionel Tresyllian")
+ (IN GLOBAL-OBJECTS ;"LOCAL-GLOBALS produces [Which Lionel ...]")
+ (ADJECTIVE JACK\'S HIS
+ LIONEL ;TRESYLLIAN UNCLE ;"for poss's")
+ (SYNONYM LIONEL ;TRESYLLIAN UNCLE)
+ (FLAGS PERSONBIT NARTICLEBIT NDESCBIT)
+ (CHARACTER 11)
+ (ACTION COUSIN-F)>
+
+<ROUTINE COUSIN-F ()
+ <COND (<AND <EQUAL? ,HERE ,DINING-ROOM>
+ <NOT <REMOTE-VERB?>>>
+ <DO-INSTEAD-OF ,BUST ,COUSIN>
+ <RTRUE>)>>
+[
+<OBJECT BUTLER
+ (DESC "Bolitho")
+ (IN CORR-1 ;KITCHEN)
+ (ADJECTIVE WHITE
+ BOLITHO BUTLER MAN ;"for poss's")
+ (SYNONYM BOLITHO BUTLER MAN)
+ (ACTION BUTLER-F)
+ (DESCFCN BUTLER-D)
+ (LDESC 0)
+ (WEST "awaiting orders")
+ (TEXT
+"He's a short white-haired gentle man, impeccably dressed tonight in
+white gloves and tails.")
+ (FLAGS OPENBIT PERSONBIT SEARCHBIT NARTICLEBIT NDESCBIT)
+ (CAPACITY 40)
+ (LINE 0)
+ (CHARACTER 8)>
+
+<ROUTINE BOLITHO-WILL ()
+ <TELL !\ 'BUTLER " will see to the car and bring " 'LUGGAGE>>
+
+<ROUTINE BUTLER-D ("OPTIONAL" (ARG <>) "AUX" GT (SAID <>) (LL <>) L)
+ <COND (<FSET? ,BUTLER ,TOUCHBIT>
+ <DESCRIBE-PERSON ,BUTLER>
+ <RTRUE>)>
+ <FCLEAR ,BUTLER ,NDESCBIT>
+ <FSET ,BUTLER ,TOUCHBIT>
+ <COND (<AND <EQUAL? ,HERE ,COURTYARD ,FOYER>
+ <EQUAL? <LOC ,LORD> ,HERE ,PSEUDO-OBJECT>
+ <ZERO? <GETP ,LORD ,P?LINE>>>
+ <SET LL T>)>
+ <COND (<AND <EQUAL? ,HERE ,COURTYARD ,FOYER>
+ <EQUAL? <LOC ,FRIEND> ,HERE ,PSEUDO-OBJECT>>
+ <SET SAID T>
+ <TELL
+"|
+\"We can talk more later, "FN",\" says " 'FRIEND ", taking your arm,
+\"but let's go in now, so you can meet the other guests.">)>
+ <COND (.LL
+ <COND (.SAID
+ <TELL !\" CR "\"Yes, d">)
+ (T
+ <SET SAID T>
+ <TELL "\"D">)>
+ <TELL "o come in.">
+ <BOLITHO-WILL>
+ <TELL ",\" says " 'LORD " as a">)
+ (.SAID
+ <BOLITHO-WILL>
+ <TELL ".\"" CR !\A>)
+ (T <TELL !\A>)>
+ <THIS-IS-IT ,BUTLER>
+ <TELL "n elderly butler appears.">
+ <COND (<ZERO? .SAID>
+ <TELL " He bows slightly to you.">)>
+ <SET GT <GT-O ,BUTLER>>
+ <COND ;(<NOT <EQUAL? <GET .GT ,GOAL-FUNCTION>
+ ,BUTLER-FETCHES ,BUTLER-CARRIES>>
+ T)
+ (<AND <NOT <EQUAL? <SET L <META-LOC ,LUGGAGE>>
+ ,YOUR-ROOM ,YOUR-BATHROOM>>
+ <T? <GETP .L ,P?LINE>>>
+ <COND (<IN? ,LUGGAGE ,BUTLER>
+ <TELL " He has " D ,LUGGAGE ".">)
+ (<==? <LOC ,BUTLER> .L>
+ <PUT .GT ,GOAL-FUNCTION ,BUTLER-CARRIES>
+ <ESTABLISH-GOAL ,BUTLER ,YOUR-ROOM>
+ <FCLEAR ,LUGGAGE ,OPENBIT>
+ <MOVE ,LUGGAGE ,BUTLER>
+ <TELL " He takes " D ,LUGGAGE ".">)
+ (T
+ <PUT .GT ,GOAL-FUNCTION ,BUTLER-FETCHES>
+ <ESTABLISH-GOAL ,BUTLER .L>)>
+ <COND (<ZERO? .SAID>
+ <TELL
+" \"I'll carry " D ,LUGGAGE " to " 'YOUR-ROOM ".\"">)>)>
+ <CRLF>
+ <RFATAL>>
+
+<GLOBAL FOUND-FABRIC
+" discovered a strand of fabric from her gown, snagged on a jagged bit
+of brickwork.">
+
+<ROUTINE BUTLER-SORRY ()
+ ;<TELL "\"I'm afraid I can't do that now, ">
+ <TELL "\"Sorry, but I have duties to perform, ">
+ <COND (<TITLE-NAME> <TELL !\.>)>
+ <TELL "\"" CR>>
+
+<ROUTINE BUTLER-F ("OPTIONAL" (ARG <>) "AUX" OBJ X)
+ <COND (<==? .ARG ,M-WINNER>
+ <COND (<AND <OR <EQUAL? ,AWAITING-REPLY ,BUTLER-1-R ,BUTLER-2-R>
+ <EQUAL? ,AWAITING-REPLY ,BUTLER-3-R ,BUTLER-4-R>>
+ <VERB? YES NO>>
+ <PUTP ,BUTLER ,P?LDESC 0>
+ <PUTP ,BUTLER ,P?LINE 0>
+ <COND (<EQUAL? ,AWAITING-REPLY ,BUTLER-1-R>
+ <SETG AWAITING-REPLY <>>
+ <COND (<VERB? YES>
+ <ROB ,LUGGAGE ,CHEST-OF-DRAWERS>)>
+ <TELL
+'BUTLER " responds politely, like the well-trained butler he is. But he
+seems to have something important on his mind." CR>)
+ (<EQUAL? ,AWAITING-REPLY ,BUTLER-2-R>
+ <SETG AWAITING-REPLY <>>
+ <COND (<NOT <VERB? YES>>
+ <TELL "\"Oh!... Please pardon me.\"" CR>)
+ (T
+ <TELL
+"\"Then no doubt you are here to investigate the spectral figure which
+has recently been seen about the castle.">
+ <COND (<ZERO? ,BUTLER-GHOST-STORY-TOLD>
+ <TELL !\ >
+ <BUTLER-GHOST-STORY>)
+ (T <TELL "\"" CR>)>)>)
+ (<EQUAL? ,AWAITING-REPLY ,BUTLER-3-R>
+ <SETG AWAITING-REPLY <>>
+ <COND (<VERB? YES>
+ <MOVE ,MACE ,PLAYER>
+ <FSET ,MACE ,SEENBIT>
+ <FCLEAR ,MACE ,NDESCBIT>
+ <THIS-IS-IT ,MACE>
+ <TELL
+"\"Should you find " 'PLAYER " in any danger from our " 'GHOST-NEW ",
+perhaps you could use this.\"|
+" 'BUTLER " gives you a small " D ,MACE ".||">)
+ (T <TELL "\"As you wish,\" he sniffs." CR>)>)
+ (T ;<EQUAL? ,AWAITING-REPLY ,BUTLER-4-R>
+ <SETG AWAITING-REPLY <>>
+ <COND (<NOT <VERB? YES>>
+ <TELL "\"No doubt you soon shall. ">)
+ (T <TELL !\">)>
+ <COND (<EQUAL? ,VARIATION ,LORD-C ,FRIEND-C ;,OFFICER-C>
+ <TELL
+"To be precise, the ghost was just beyond the archway. It was bending
+over, groping for something on the " 'DRAWING-ROOM " carpet.">)
+ (T
+ <TELL
+"If I may express an opinion, our " 'GHOST-NEW " must need reading
+glasses. The hall was ablaze with lights, yet it was bending down,
+groping blindly for something on the marble floor.">
+ <COND (<EQUAL? ,VARIATION ,DOCTOR-C ;,DEALER-C>
+ <TELL
+" And, I might add, it must also be left-handed. You see, "TN", while
+bending over, the figure was using its left hand to grope with. I tried
+it myself, as did other servants, and we agree that such behavior
+indicates left-handedness.">)>)>
+ <COND (T ;<NOT <EQUAL? ,VARIATION ,DEALER-C>>
+ <TELL "\"|
+He continues, \"The ghost must have heard my footsteps, for">)
+ ;(T <TELL
+"To be frank, "TN", I was quite taken aback when I saw the ghost.
+I'm afraid I just stood there for a moment, gaping at it stupidly.
+Then when it found whatever it was looking for,">)>
+ <TELL
+" it stood up, flashed me a startled glance, and fled into the darkness
+of the " 'DRAWING-ROOM ". I pursued, turning on the lights, but the
+thing had disappeared. I went into the foyer, but it was not there
+either, and the " 'FRONT-DOOR " was still locked -- from the inside.\"" CR>)>
+ <RTRUE>)
+ (<NOT <GRAB-ATTENTION ,BUTLER>> <RFATAL>)
+ (<AND <VERB? DESCRIBE> <DOBJ? GHOST-NEW>>
+ <FSET ,GHOST-NEW ,PERSONBIT>
+ <TELL
+"\"Frankly, I found it unconvincing. I don't see why a ghost would grope
+about on the floor to find something -- especially in a spot that wasn't
+even built when the " 'GHOST-OLD " was walled up in the tower. Besides,
+why should a ghost be scared away by a human being? It's usually the
+opposite, is it not?... No, "TN", in my opinion that figure just didn't
+behave like a proper ghost. It had " ,LONG-BLOND-HAIR " and was clad in
+a silvery-white ">
+ <COND (<EQUAL? ,VARIATION ,DOCTOR-C ;,DEALER-C ;,OFFICER-C>
+ <TELL "long-sleeved">)
+ (T <TELL "sleeveless">)>
+ <TELL " gown.
+I caught only a brief glimpse of its face, deadly white.
+As to height, it was too bent over for me to make out.
+If someone was masquerading as a ghost, of course, the imposter
+might well have been a man. However, as for the figure I saw -- ">
+ <COND (<EQUAL? ,VARIATION ,DOCTOR-C ;,DEALER-C ;,OFFICER-C>
+ <TELL "I cannot be sure of its sex.\"" CR>)
+ (T <TELL "it seemed to me quite feminine.\"" CR>)>)
+ (<AND <VERB? CLOSE DISEMBARK EMPTY LEAVE OPEN SIT SIT-AT STAND
+ THROUGH WALK WALK-TO>
+ <WILLING? ,BUTLER>>
+ <COND (<AND <NOT <VERB? LEAVE>>
+ <OR <NOT <VERB? THROUGH WALK-TO>>
+ <NOT <DOBJ? DINNER PASSAGE>>>>
+ <TELL "\"As you wish, ">
+ <COND (<TITLE-NAME> <TELL !\.>)>
+ <TELL "\"|">)>
+ <RFALSE>)
+ ;(<VERB? WALK-TO>
+ <COND (<DOBJ? HERE GLOBAL-HERE>
+ <TELL "\"I am here, "TN"!\"" CR>)>)
+ (<SET X <COM-CHECK ,BUTLER>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>)
+ (<==? .X ,M-OTHER> <RFATAL>)
+ (T <RTRUE>)>)
+ (T
+ <BUTLER-SORRY>
+ <RFATAL>)>)
+ (<SET OBJ <ASKING-ABOUT? ,BUTLER>>
+ <COND ;(<T? <GET <GET ,GOAL-TABLES ,BUTLER-C> ,GOAL-S>>
+ <BUTLER-SORRY>
+ <RFATAL>)
+ (<NOT <GRAB-ATTENTION ,BUTLER .OBJ>>
+ <RFATAL>)
+ (<EQUAL? .OBJ ,ACCIDENT ,LOVER>
+ <TELL
+"\"Perhaps you've heard how I was sent to the " 'BASEMENT " to find her.
+I found a tent pole and a shoe in front of the well, near one end of the
+" 'WINE-RACK ". The pole belonged to Lord Lionel. The shoe's spike heel
+was wrenched loose. I knew at once there had been an accident.
+Apparently Miss " 'LOVER ", in her cups, had stumbled over the pole and
+grabbed at the well for support. But as she was nowhere in sight, and
+her red necklace was lying beside the well, I assumed she had toppled
+down the well. When " 'LORD " arrived, he shone an electric torch down
+the well and" ,FOUND-FABRIC " Evidently it was ripped off as
+she fell. At any rate, the police concluded that she had drowned. They
+lowered a diver into the well, but " 'CORPSE " was never found.\"" CR>)
+ (<EQUAL? .OBJ ,BUTLER>
+ <TELL
+"\"There's not much to tell. I've served the family all my life.
+Should you require anything, feel free to ask.\"" CR>)
+ (<AND <EQUAL? .OBJ ,SEARCHER>
+ <OR <T? ,CONFESSED>
+ <T? <GET ,TOLD-ABOUT-EVID ,BUTLER-C>>>
+ ;<NOT <==? ,BUTLER ,SEARCHER>>>
+ <TELL ,IM-SHOCKED>)
+ (<EQUAL? .OBJ ,GHOST-NEW ,DANGER ,HAUNTING>
+ <TELL !\">
+ <BUTLER-GHOST-STORY>)
+ (<EQUAL? .OBJ ,GHOST-OLD>
+ <TELL
+"\"They do say " 'CASTLE " is haunted.\"" ;"in the past, before that, er,
+unfortunate lady's bones were exhumed and reburied.\"" CR>)
+ (<EQUAL? .OBJ ,LAMP>
+ <TELL "\"Yes, we keep">
+ <IN-CASE-OF-BLACKOUT>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,YOUR-MIRROR ,DRESSING-MIRROR>
+ <TELL "\"S">
+ <BUTLER-MIRROR-STORY>)
+ (<OR <EQUAL? .OBJ ,PRIEST-DOOR>
+ <AND <EQUAL? .OBJ ,PASSAGE>
+ <ZERO? <GET ,FOUND-PASSAGES ,BUTLER-C>>>>
+ <TELL
+"The butler hesitates, looking thoughtful.
+\"I daresay that sort of thing would be better known to his lordship
+than to any of the staff, "TN".\"" CR>)
+ (<SET X <COMMON-ASK-ABOUT ,BUTLER .OBJ>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>) (T <RTRUE>)>)
+ (T
+ <TELL "\"I'm afraid it's not my place to say, ">
+ <COND (<TITLE-NAME> <TELL !\.>)>
+ <TELL "\"" CR>)>)
+ (T <PERSON-F ,BUTLER .ARG>)>>
+
+<ROUTINE IN-CASE-OF-BLACKOUT ()
+ <TELL " that in case of a power outage.\"" CR>>
+
+<GLOBAL BUTLER-GHOST-STORY-TOLD:FLAG <>>
+<ROUTINE BUTLER-GHOST-STORY ()
+ <SETG BUTLER-GHOST-STORY-TOLD T>
+ <SETG QCONTEXT ,BUTLER>
+ <THIS-IS-IT ,BUTLER>
+ <PUTP ,BUTLER ,P?LDESC 12 ;"listening to you">
+ <SETG AWAITING-REPLY ,BUTLER-4-R>
+ <SETG CLOCK-WAIT T>
+ <COND (<==? ,HERE ,GREAT-HALL>
+ <PUT ,QUESTIONS ,AWAITING-REPLY "Can you see where I mean?">)>
+ <TELL
+"I myself glimpsed the ghost just last night. " 'LORD " and some guests
+were sitting up late, " <GET ,LDESC-STRINGS 13> ;"lounging and chatting"
+" in the " 'GREAT-HALL ".
+After they retired, I came upstairs to clean up and turn off the lights.
+As I entered the " 'GREAT-HALL " from the west, I saw the ghost on the
+far side of the room. " <GET ,QUESTIONS ,AWAITING-REPLY> "\"" CR>
+ <RFATAL>>
+
+<ROUTINE BUTLER-MIRROR-STORY ()
+ <TELL
+"hould you wish to view " 'PLAYER " from all angles while dressing,
+you can do so by adjusting the " 'YOUR-MIRROR " and the hinged "
+'DRESSING-MIRROR " of the " 'DRESSING-TABLE ".\"" CR>>
+]
+<OBJECT MAID
+ (DESC "upstairs maid")
+ (IN LOCAL-GLOBALS)
+ (ADJECTIVE UPSTAIRS
+ GLADYS MAID ;"for poss's")
+ (SYNONYM GLADYS MAID)
+ (FLAGS PERSONBIT FEMALE SEENBIT VOWELBIT)
+ ;(LDESC 0)
+ (CHARACTER 12)>
+
+<OBJECT GHOST-OLD
+ (DESC "White Lady" ;"old ghost spirit")
+ (IN LOCAL-GLOBALS)
+ (ADJECTIVE OLD ;ORIGINAL WHITE)
+ (SYNONYM SPIRIT PHANTOM LADY LEGEND ;WIFE)
+ ;(GHOST GHOSTS SPOOK SPECTER SPECTRE)
+ (FLAGS PERSONBIT FEMALE SEENBIT)
+ (CHARACTER 16)>
+[
+<OBJECT GHOST-NEW
+ (DESC ;"new " "ghost")
+ (IN LOCAL-GLOBALS)
+ (ADJECTIVE BLOND BLONDE NEW DEE\'S HER CASTLE
+ GHOST ;"for poss's")
+ (SYNONYM GHOST
+ ;"GHOSTS SPECTER SPECTRE SPOOK MURDER")
+ ;(SPIRIT PHANTOM)
+ (FLAGS SEENBIT OPENBIT ;PERSONBIT SEARCHBIT NDESCBIT ;ONBIT)
+ (LDESC 0)
+ (WEST "lurking in the shadows")
+ (CAPACITY 40)
+ (LINE 0)
+ (CHARACTER 10 ;0)
+ (DESCFCN GHOST-NEW-D)
+ (ACTION GHOST-NEW-F)>
+
+<ROUTINE GHOST-NEW-D ("OPTIONAL" (ARG <>))
+ <COND (<FSET? ,GHOST-NEW ,TOUCHBIT>
+ <DESCRIBE-PERSON ,GHOST-NEW>)
+ (T
+ <FCLEAR ,GHOST-NEW ,NDESCBIT>
+ <FSET ,GHOST-NEW ,PERSONBIT>
+ <FSET ,GHOST-NEW ,TOUCHBIT>
+ <FSET ,GHOST-NEW ,SEENBIT>
+ <FSET ,COSTUME ,SEENBIT>
+ <CRLF>
+ <COND (<FSET? ,GHOST-NEW ,MUNGBIT>
+ <TELL "Lying " <GROUND-DESC> " i">)
+ (T <TELL "Out of the dark come">)>
+ <TELL
+"s a figure with " ,LONG-BLOND-HAIR ", dressed all in
+silvery white and glowing with an almost unearthly light." CR>)>
+ <RTRUE>>
+
+<GLOBAL GHOST-CACKLES "The ghost only cackles in response.|">
+
+<ROUTINE GHOST-NEW-F ("OPTIONAL" (ARG <>) "AUX" OBJ ;X)
+ <COND (<==? .ARG ,M-WINNER>
+ <COND (<NOT <GRAB-ATTENTION ,GHOST-NEW>> <RFATAL>)
+ ;(<SET X <COM-CHECK ,GHOST-NEW>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>)
+ (<==? .X ,M-OTHER> <RFATAL>)
+ (T <RTRUE>)>)
+ (T
+ <TELL ,GHOST-CACKLES>
+ <RFATAL>)>)
+ (<SET OBJ <ASKING-ABOUT? ,GHOST-NEW>>
+ <COND (<GRAB-ATTENTION ,GHOST-NEW .OBJ>
+ <COND (<NOT <EQUAL? ,VARIATION ,LORD-C>>
+ <TELL ,GHOST-CACKLES>)
+ (<NOT <LOVER-SPEECH>>
+ <GHOST-FLEES>)>)>
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <TELL
+CHE ,GHOST-NEW " is wearing heavy white makeup with black eyes and lips. ">
+ <DESCRIBE-GOWN>
+ <CRLF>
+ <COMMON-OTHER ,GHOST-NEW>)
+ (<OR <VERB? BRUSH SEARCH UNDRESS>
+ <AND <VERB? SEARCH-FOR> <IOBJ? COSTUME>>>
+ <COND (<NOT <FSET? ,GHOST-NEW ,MUNGBIT>>
+ <TELL ,GHOST-CACKLES>
+ <RTRUE>)
+ (<AND <IN? ,COSTUME ,GHOST-NEW> ;<FSET? ,GHOST-NEW ,MUNGBIT>>
+ <UNDRESS-GHOST>
+ <RTRUE>)>)
+ (<SET OBJ <GHOST-NEW-VERBS>>
+ <COND (<GRAB-ATTENTION ,GHOST-NEW>
+ <COND (<NOT <EQUAL? ,VARIATION ,LORD-C>>
+ <TELL ,GHOST-CACKLES>)
+ (<OR <==? .OBJ 2>
+ <NOT <LOVER-SPEECH>>>
+ <GHOST-FLEES>)>)>
+ <RFATAL>)
+ (T <PERSON-F ,GHOST-NEW .ARG>)>>
+
+<ROUTINE GHOST-NEW-VERBS ()
+ <COND (<VERB? BOW GIVE SGIVE> ;"friendly"
+ <RTRUE>)
+ (<VERB? KISS LISTEN RUB> ;"friendly"
+ <RTRUE>)
+ (<VERB? SMILE> ;"friendly"
+ <RTRUE>)
+ (<SPEAKING-VERB? ,GHOST-NEW> ;"friendly"
+ <RTRUE>)
+ (<VERB? ARREST MUNG PUSH SLAP STOP TAKE YELL> ;"unfriendly"
+ <RETURN 2>)>>
+
+<GLOBAL VILLAIN-KNOWN?:FLAG <>>
+
+<ROUTINE UNDRESS-GHOST ("AUX" (L <LOC ,GHOST-NEW>) ADJ
+ ;(C <GETP ,GHOST-NEW ,P?CHARACTER>))
+ ;<FSET ,GHOST-NEW ,PERSONBIT>
+ <MOVE ,COSTUME ,WINNER>
+ <FCLEAR ,COSTUME ,NDESCBIT>
+ <FCLEAR ,COSTUME ,WORNBIT>
+ <FSET ,COSTUME ,TOUCHBIT>
+ <FSET ,COSTUME ,TAKEBIT>
+ <MOVE ,GHOST-NEW ,LOCAL-GLOBALS>
+ <MOVE ,VILLAIN-PER .L>
+ ;<SETG OTHER-CHAR ,GHOST-NEW>
+ ;<PUT ,CHARACTER-TABLE .C ,VILLAIN-PER>
+ ;<PUT ,CHAR-POSS-TABLE <+ 1 .C> ,OTHER-POSS>
+ ;<SETG OTHER-POSS ,W?G\'S>
+ <COND (<SET ADJ <GETP ,VILLAIN-PER ,P?STATION>>
+ <COND (<T? ,OTHER-POSS-POS>
+ <PUTB <GETPT ,HEAD ,P?ADJECTIVE>
+ ,OTHER-POSS-POS .ADJ>
+ <PUTB <GETPT ,HANDS ,P?ADJECTIVE>
+ ,OTHER-POSS-POS .ADJ>
+ <PUTB <GETPT ,EYE ,P?ADJECTIVE>
+ ,OTHER-POSS-POS .ADJ>)>)>
+ <THIS-IS-IT ,VILLAIN-PER>
+ <FSET ,VILLAIN-PER ,MUNGBIT>
+ <PUTP ,VILLAIN-PER ,P?LDESC 19 ;"out cold" ;<GETP ,GHOST-NEW ,P?LDESC>>
+ <SETG VILLAIN-KNOWN? T>
+ <TELL
+"When you remove the " D ,COSTUME ", you discover " D ,VILLAIN-PER
+" underneath!" CR>
+ <CONGRATS ,COSTUME>
+ ;<COND (<==? ,VILLAIN-PER ,LOVER ;,LORD>
+ <UNSNOOZE ,LOVER> ;"because no body parts!")>>
+
+<ROUTINE DESCRIBE-GOWN ()
+ <FSET ,GHOST-NEW ,PERSONBIT>
+ <TELL "The gown ">
+ <COND (<NOT <==? ,LIT ,HERE>>
+ <TELL "seems to fluoresce in the dark. It ">)>
+ <TELL "has a ">
+ <COND (<EQUAL? ,VARIATION ,DOCTOR-C ;,DEALER-C ;,OFFICER-C>
+ <TELL "high">)
+ (T <TELL "low">)>
+ <TELL " neckline and ">
+ <COND (<EQUAL? ,VARIATION ,DOCTOR-C ;,DEALER-C ;,OFFICER-C>
+ <TELL "long">)
+ (T <TELL "no">)>
+ <TELL " sleeves.">>
+
+<OBJECT COSTUME
+ (DESC "ghost costume")
+ (ADJECTIVE GHOST G\'S HER HIS WHITE BLOND BLONDE PALE)
+ (SYNONYM COSTUME DISGUISE GOWN WIG ;SHEET)
+ ;(GENERIC GENERIC-CLOTHES)
+ (FLAGS WEARBIT TAKEBIT SECRETBIT ONBIT)
+ (SIZE 20)
+ (ACTION COSTUME-F)>
+
+<ROUTINE COSTUME-F ()
+ <COND (<VERB? TELL-ABOUT>
+ <COND (<FSET? ,PRSO ,PERSONBIT>
+ <COND (<==? ,VARIATION <GETP ,PRSO ,P?CHARACTER>>
+ <SETG PRSA ,V?ASK-ABOUT>
+ <RFALSE>)
+ (T <TELL-ABOUT-OBJECT ,PRSO ,COSTUME ,FOUND-COSTUME>)>)>)
+ (<REMOTE-VERB?>
+ <RFALSE>)
+ (<AND <NOUN-USED? ,W?WIG>
+ <EQUAL? ,VARIATION ,LORD-C>>
+ <SETG CLOCK-WAIT T>
+ <TELL "(There is no wig!)" CR>)
+ (<VERB? EXAMINE LOOK-INSIDE>
+ <COND (<AND <NOT <NOUN-USED? ,W?GOWN>>
+ <NOT <EQUAL? ,VARIATION ,LORD-C>>>
+ <TELL
+"It's obvious that the wig was designed to resemble " 'LOVER "'s long, flowing
+hair.">
+ <COND (<NOT <EQUAL? <LOC ,COSTUME> ,GHOST-NEW ,VILLAIN-PER>>
+ <TELL " Inside, you notice several individual ">
+ <COND (<EQUAL? ,VARIATION ,FRIEND-C> <TELL "red">)
+ (<EQUAL? ,VARIATION ,DOCTOR-C> <TELL "grayish">)
+ ;(<EQUAL?,VARIATION ,DEALER-C><TELL "sandy-brown">)
+ (T ;<EQUAL? ,VARIATION ,PAINTER-C> <TELL "tawny">)
+ ;(<EQUAL?,VARIATION,OFFICER-C><TELL "dark blond">)>
+ <TELL " hairs, the same color as ">
+ <COND ;(<EQUAL? ,VARIATION ,LORD-C> <TELL 'LOVER>)
+ (T <TELL D <GET ,CHARACTER-TABLE ,VARIATION>>)>
+ <TELL "'s hair.">)>
+ <CRLF>)>
+ <COND (<NOT <NOUN-USED? ,W?WIG>>
+ <DESCRIBE-GOWN>
+ <COND (<EQUAL? <LOC ,COSTUME> ,GHOST-NEW ,VILLAIN-PER>
+ <TELL " It's on a ">)
+ (T <TELL
+" When you hold it up, you can see it would fit a ">)>
+ <COND (<EQUAL? ,VARIATION ,LORD-C ,FRIEND-C ,DOCTOR-C>
+ <TELL "person of average height." CR>)
+ (T ;<EQUAL? ,VARIATION ;,DEALER-C ,PAINTER-C ;,OFFICER-C>
+ <TELL "tall person." CR>)>)>
+ <CONGRATS ,COSTUME>
+ <RTRUE>)
+ ;(<VERB? FIND>
+ <COND (<IN? ,COSTUME ,HERE>
+ <COND (<FSET? ,COSTUME ,NDESCBIT>
+ <DISCOVER ,COSTUME>)
+ (T <TELL "It's right here!" CR>)>)
+ (T <TELL "Results are negative." CR>)>)
+ (<VERB? LOOK-UNDER TAKE TAKE-OFF>
+ <COND (<IN? ,COSTUME ,GHOST-NEW>
+ <PERFORM ,V?UNDRESS ,GHOST-NEW>
+ <RTRUE>)>)
+ (<OR <VERB? WEAR>
+ <AND <VERB? PUT> <FSET? ,PRSI ,PERSONBIT>>>
+ <WEAR-SCARE>)>>
+
+<ROUTINE WEAR-SCARE ()
+ <TELL "You start to put" THE ,PRSO " on">
+ <COND (<T? ,PRSI> <TELL !\ 'PRSI>)>
+ <TELL ", but">
+ <COND (<DOBJ? NECKLACE-OF-D>
+ <TELL ,CLASP-MUNGED "." CR>)
+ (T <TELL " then decide it might scare the other guests." CR>)>>
+
+<GLOBAL LONG-BLOND-HAIR "long blonde hair">
+
+;<OBJECT WIG
+ (DESC "blonde wig")
+ (ADJECTIVE BLOND BLONDE PALE GHOST)
+ (SYNONYM WIG)
+ (FLAGS WEARBIT NDESCBIT)
+ (SIZE 8)
+ (ACTION WIG-F)>
+]
+<GLOBAL CHARACTER-TABLE
+ <PTABLE PLAYER FRIEND LORD PAINTER DOCTOR OFFICER ;5
+ DEALER DEB BUTLER LOVER GHOST-NEW ;10
+ COUSIN MAID DRAGON BUFFALO-HEAD RHINO-HEAD GHOST-OLD ;16>>
+
+<GLOBAL GUEST-TABLE
+ <PLTABLE FRIEND DEB OFFICER DOCTOR DEALER PAINTER>>
+
+<GLOBAL CHAR-ROOM-TABLE
+ <PLTABLE YOUR-ROOM TAMARA-ROOM JACK-ROOM
+ VIVIEN-ROOM WENDISH-ROOM IAN-ROOM
+ HYDE-ROOM IRIS-ROOM KITCHEN LIMBO LIMBO ;10
+ ;"just for convenience:"
+ DRAWING-ROOM LIBRARY ;LUMBER-ROOM
+ SITTING-ROOM BACKSTAIRS>>
+
+<GLOBAL CHAR-CLOSET-TABLE
+ <LTABLE YOUR-CLOSET SECRET-LANDING-TAM SECRET-LANDING-JACK
+ SECRET-VIVIEN-PASSAGE WENDISH-CORNER SECRET-IAN-PASSAGE
+ HYDE-CLOSET IRIS-CLOSET KITCHEN SECRET-LANDING-JACK 0
+ ;"just for convenience:"
+ DRAWING-CLOSET SECRET-LANDING-LIB ;SECRET-LANDING-2
+ SITTING-PASSAGE DINING-PASSAGE>>
+
+;<GLOBAL OTHER-CHAR:OBJECT GHOST-NEW>
+;<GLOBAL OTHER-POSS <VOC "G'S" ADJECTIVE>>
+<GLOBAL OTHER-POSS-POS:NUMBER 0>
+
+<GLOBAL CHAR-POSS-TABLE
+ <LTABLE <VOC "MY" ADJECTIVE>
+ <VOC "TAM'S" ADJECTIVE>
+ <VOC "JACK'S" ADJECTIVE>
+ <VOC "VIV'S" ADJECTIVE>
+ <VOC "DOC'S" ADJECTIVE>
+ <VOC "IAN'S" ADJECTIVE>
+ <VOC "HYDE'S" ADJECTIVE>
+ <VOC "IRIS'S" ADJECTIVE>
+ <VOC "B'S" ADJECTIVE>
+ <VOC "DEE'S" ADJECTIVE>
+ <VOC "G'S" ADJECTIVE>
+ <VOC "LI'S" ADJECTIVE>
+ <VOC "MAID'S" ADJECTIVE>
+ <VOC "WORM'S" ADJECTIVE>
+ <VOC "BUF'S" ADJECTIVE>
+ <VOC "RH'S" ADJECTIVE>>>
+
+<GLOBAL FOLLOW-LOC <TABLE 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ;16>>
+
+<GLOBAL TOUCHED-LDESCS <TABLE 0 0 0 0 0 0 0 0 0 0 0>>
+
+<GLOBAL FOUND-COSTUME <TABLE 0 0 0 0 0 0 0 0 0 0>>
+<GLOBAL FOUND-PASSAGES <TABLE 0 0 0 0 0 0 0 0 0 0>>
+<GLOBAL TOLD-ABOUT-GHOST<TABLE 0 0 0 0 0 0 0 0 0 0>>
+<GLOBAL TOLD-ABOUT-EVID <TABLE 0 0 0 0 0 0 0 0 0 0>>
+<GLOBAL SHOT <TABLE 0 0 0 0 0 0 0 0 0 0 0>>
+
+<ROUTINE WHY-ME ()
+ <COND (<BTST ,PRESENT-TIME 1>
+ <TELL "\"You could do that " 'PLAYER ", you know.\"" CR>
+ ;<TELL "\"If you think that will help, do it!\"" CR>)
+ (T <TELL "\"I think you can do that better " 'PLAYER ".\"" CR>)>>
+
+<ROUTINE DESCRIBE-PERSON (PER "AUX" (STR <>))
+ <SET STR <GETP .PER ,P?LDESC>>
+ <COND (<AND <NOT <EQUAL? .PER ,BUTLER ,LOVER>>
+ <ALL-TOGETHER-NOW?>>
+ <COND (<==? .PER ,LORD>
+ <SETG P-HIM-OBJECT <>>
+ <SETG P-HER-OBJECT <>>
+ <TELL D .PER " and all his guests are here.">
+ ;<COND (<AND .STR ;<NOT <==? .STR 6 ;"walking along">>>
+ <TELL <GET ,LDESC-STRINGS .STR>>)
+ (<AND <SET STR <GETPT .PER ,P?WEST>>
+ <SET STR <GET .STR ,NEXITSTR>>>
+ <TELL .STR>)
+ (T <TELL <GET ,LDESC-STRINGS 13>
+ ;"lounging and chatting">)>
+ <COND (<AND <ZERO? ,CONFESSED>
+ <NOT <QUEUED? ,I-LIONEL-SPEAKS>>>
+ <TELL
+" They smile pleasantly but, with typical British reserve, seem
+willing to leave you to your own devices."
+;"probably think you're no match for a ghost.">)>
+ <CRLF>)>
+ <RTRUE>)>
+ <COND (<AND .STR ;<NOT <==? .STR 6 ;"walking along">>>
+ <PUT ,TOUCHED-LDESCS <GETP .PER ,P?CHARACTER> .STR>
+ ;<TELL <GET ,LDESC-STRINGS .STR>>
+ <RFALSE>)>
+ <TELL CTHE .PER " is ">
+ <COND (<AND <SET STR <GETPT .PER ,P?WEST>>
+ <SET STR <GET .STR ,NEXITSTR>>>
+ <TELL .STR>)
+ ;(T
+ <TELL "looking just as you want">)>
+ <TELL ".">
+ <COND (<==? .STR 6 ;"walking along"> <PRINTC 32>)
+ (T <CRLF>)>
+ <RTRUE>>
+
+<ROUTINE ALL-TOGETHER-NOW? ()
+ <COND (<AND <EQUAL? <LOC ,LORD> ,HERE ,PSEUDO-OBJECT>
+ <EQUAL? <LOC ,FRIEND> ,HERE ,PSEUDO-OBJECT>
+ <EQUAL? <LOC ,DEB> ,HERE ,PSEUDO-OBJECT>
+ <EQUAL? <LOC ,OFFICER> ,HERE ,PSEUDO-OBJECT>
+ <EQUAL? <LOC ,DOCTOR> ,HERE ,PSEUDO-OBJECT>
+ <EQUAL? <LOC ,DEALER> ,HERE ,PSEUDO-OBJECT>
+ <EQUAL? <LOC ,PAINTER> ,HERE ,PSEUDO-OBJECT>>
+ ;<MOVE ,CREW ,HERE>
+ ;<PUTP ,LORD ,P?LDESC 13>
+ <RTRUE>)
+ (T
+ ;<REMOVE ,CREW>
+ ;<PUTP ,LORD ,P?LDESC 0>
+ <RFALSE>)>>
+
+<GLOBAL LDESC-STRINGS
+ <PLTABLE "dancing"
+ "sipping sherry"
+ ;3 "watching you" ;"talking quietly"
+ "looking at you with suspicion"
+ 0 ;"gazing out the window"
+ ;6 "walking along"
+ "sobbing quietly"
+ "poised to attack"
+ ;9 "waiting patiently"
+ "eating with relish"
+ "preparing dinner"
+ ;12 "listening to you"
+ "lounging and chatting"
+ "asleep"
+ ;15 0 ;"reading a note"
+ "listening"
+ "preparing to leave"
+ ;18 "deep in thought"
+ "out cold"
+ "ignoring you"
+ ;21 "searching"
+ "playing the piano"
+ "following you"
+ ;24 "brushing her hair"
+ "looking sleepy">>
+
+<ROUTINE TELL-ABOUT-OBJECT (PER OBJ GL "AUX" C)
+ <COND (<T? <GET .GL ,PLAYER-C>>
+ <SET C <GETP .PER ,P?CHARACTER>>
+ <COND (<ZERO? <GET .GL .C>>
+ <PUT .GL .C T>
+ <COND (<NOT <==? .C ,VARIATION>>
+ <PUTP .PER ,P?LINE 0>)>
+ ;<TELL "\"You mean you found a " D .OBJ "? ">
+ <RETURN <GOOD-SHOW .PER .OBJ>>)
+ (T <TELL"\"I know that you found a " D .OBJ ".\"" CR>)>)>>
+
+<ROUTINE PERSON-F (PER ARG "AUX" OBJ X L C N)
+ <SET L <LOC .PER>>
+ <SET C <GETP .PER ,P?CHARACTER>>
+ <COND ;(<==? .ARG ,M-WINNER>
+ <COND (<NOT <GRAB-ATTENTION .PER>> <RFATAL>)
+ (<SET X <COM-CHECK .PER>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>)
+ (<==? .X ,M-OTHER> <RFATAL>)
+ (T <RTRUE>)>)
+ (T <WHY-ME> <RFATAL>)>)
+ (<VERB? ALARM SHAKE>
+ <COND (<==? ,PRSO .PER>
+ <COND (<AND <QUEUED? ,I-COME-TO>
+ <EQUAL? .PER ,VILLAIN-PER ,GHOST-NEW>>
+ <QUEUE I-COME-TO 1> ;"will respond"
+ <RTRUE>)
+ (<UNSNOOZE .PER T>
+ <TELL CHE .PER " gasps to see you so close!" CR>
+ <RTRUE>)
+ (T ;<VERB? SHAKE>
+ <TELL CHE .PER is " still ">
+ <COND (<SET X <GETP .PER ,P?LDESC>>
+ <TELL <GET ,LDESC-STRINGS .X>>)
+ (<SET X <GETPT .PER ,P?WEST>>
+ <TELL <GET .X ,NEXITSTR>>)>
+ <TELL "." CR>)>)>)
+ (<VERB? FORGIVE>
+ <COND (<NOT <GRAB-ATTENTION .PER>> <RFATAL>)>
+ <TELL "\"Thank you so much. I didn't realize I'd offended you.\"" CR>)
+ (<VERB? GIVE>
+ <COND (<AND <EQUAL? ,PRSI .PER> <HELD? ,PRSO>>
+ <COND (<NOT <GRAB-ATTENTION .PER>> <RFATAL>)>
+ <RFALSE>)>)
+ ;(<VERB? LISTEN> ;"moved to PRE-LISTEN"
+ <COND (<==? <GETP .PER ,P?LDESC> 22 ;"playing the piano">
+ <TELL "The music sounds lovely." CR>
+ <RTRUE>)>)
+ (<VERB? LAMP-OFF>
+ <COND (<T? <GETP .PER ,P?LINE>>
+ <TELL "Seems you've already done that." CR>)
+ (T <WONT-HELP>)>)
+ (<VERB? MUNG SEARCH SEARCH-FOR>
+ <COND (<AND <==? .PER ,PRSO>
+ ;<OR <NOT <==? .PER ,FRIEND>>
+ <EQUAL? ,VARIATION ,FRIEND-C>>
+ <FSET? .PER ,PERSONBIT>
+ <NOT <FSET? .PER ,MUNGBIT>>>
+ <PUTP .PER ,P?LINE <+ 1 <GETP .PER ,P?LINE>>>
+ <COND (<NOT <EQUAL? <GETP .PER ,P?LDESC>
+ 4 ;"looking at you with suspicion">>
+ ;<EQUAL? .PER ,FRIEND>
+ <PUTP .PER ,P?LDESC 20 ;"ignoring you">)>
+ <TELL
+CHE .PER " pushes you away and mutters, \"I don't think that's
+called for.\"" CR>
+ <RTRUE>)>)
+ (<VERB? SHOW>
+ <COND (<==? .PER ,PRSO>
+ <COND (<AND ;<NOT <EQUAL? ,PRSI ,PASSAGE>>
+ <NOT <GRAB-ATTENTION .PER>>>
+ <RFATAL>)
+ ;(<EQUAL? ,PRSI ,LOVER>
+ <TELL "\"She's alive! That's incredible!\"" CR>
+ <RTRUE>)
+ (T
+ <PERFORM ,V?TELL-ABOUT ,PRSO ,PRSI>
+ <RTRUE>)>)>)
+ (<VERB? SMILE>
+ <COND (<==? .PER ,PRSO>
+ <COND (<NOT <GRAB-ATTENTION .PER>>
+ <RFATAL>)
+ (T
+ <TELL CHE ,PRSO smile " back at you." CR>
+ <RTRUE>)>)>)
+ (<VERB? TELL-ABOUT>
+ <COND (<==? .PER ,PRSO>
+ <COND (<NOT <GRAB-ATTENTION .PER>>
+ <RFATAL>)>
+ <PUTP .PER ,P?LDESC 12 ;"listening to you">
+ <COND ;(<EQUAL? ,PRSI ,BELL>
+ <COND (<==? <GET <GT-O .PER> ,GOAL-FUNCTION> ,X-TO-BELL>
+ ;"GOAL-FUNCTION is already changed by now."
+ <TELL "\"Oh, I see. You rang the bell.\"" CR>
+ <RTRUE>)>)
+ (<AND <FSET? ,PRSI ,RMUNGBIT>
+ <FSET? ,PRSI ,SEENBIT>
+ <NOT <FSET? ,PRSI ,PERSONBIT>>>
+ <PUT ,TOLD-ABOUT-EVID <GETP .PER ,P?CHARACTER> T>
+ <TELL ,THATS-INTERESTING>
+ <RTRUE>)
+ (<AND <EQUAL? ,PRSI ,CLUE-1>
+ ;<T? <GET ,CLUE-1-KNOWN ,PLAYER-C>>>
+ ;<PUT ,CLUE-1-KNOWN <GETP .PER ,P?CHARACTER> T>
+ <TELL ,THATS-INTERESTING>
+ <RTRUE>)
+ (<EQUAL? ,PRSI ,CONFESSED>
+ <COND (<NOT <==? .PER ,CONFESSED>>
+ <TELL ,IM-SHOCKED>
+ <RTRUE>)>)
+ (<EQUAL? ,PRSI ,GHOST-NEW>
+ <COND (<AND <FSET? ,GHOST-NEW ,TOUCHBIT>
+ <NOT <==? .PER ,GHOST-NEW>>>
+ <PUT ,TOLD-ABOUT-GHOST <GETP .PER ,P?CHARACTER> T>
+ <TELL
+"\"You saw the ghost? Tell me, how can I help?\"" CR>
+ <RTRUE>)>)
+ (<SECRET-PASSAGE-OR-DOOR? ,PRSI>
+ <TELL-ABOUT-OBJECT ,PRSO ,PASSAGE ,FOUND-PASSAGES>
+ <RTRUE>)>
+ <TELL "\"I don't know what you mean.\"" CR>)>)
+ (<VERB? THROW-AT>
+ <COND (<AND <==? .PER ,PRSI>
+ <FSET? .PER ,PERSONBIT>
+ <NOT <FSET? .PER ,MUNGBIT>>>
+ <MOVE ,PRSO ,PRSI>
+ <TELL CHE .PER " catches" THE ,PRSO " with" HIS .PER !\ >
+ <COND (<EQUAL? .PER ,DEB ,DOCTOR ;,DEALER> <TELL "lef">)
+ (T <TELL "righ">)>
+ <TELL "t hand." CR>
+ <RTRUE>)>)
+ ;(<SET OBJ <ASKING-ABOUT? .PER>>
+ <COND (<NOT <GRAB-ATTENTION .PER>>
+ <RFATAL>)
+ ;(<SET X <COMMON-ASK-ABOUT .PER .OBJ>>
+ <COND (<==? .X ,M-FATAL> <RFALSE>) (T <RTRUE>)>)
+ (T <DONT-KNOW .PER .OBJ>)>)
+ (T <COMMON-OTHER .PER>)>>
+
+<ROUTINE SECRET-PASSAGE-OR-DOOR? (OBJ)
+ <COND (<EQUAL? .OBJ ,PASSAGE ,SECRET-JACK-DOOR ,SECRET-TAMARA-DOOR
+ ,SECRET-LIBRARY-DOOR ,SECRET-DRAWING-DOOR
+ ,SECRET-SITTING-DOOR ,SECRET-DINING-DOOR
+ ,SECRET-YOUR-DOOR ,SECRET-IRIS-DOOR
+ ,SECRET-WENDISH-DOOR ,SECRET-VIVIEN-DOOR
+ ,SECRET-IAN-DOOR ,SECRET-HYDE-DOOR>
+ <RTRUE>)>>
+
+"People Functions"
+
+<ROUTINE CARRY-CHECK (PER)
+ <COND (<FIRST? .PER>
+ <TELL CHE .PER is " holding">
+ <PRINT-CONTENTS .PER>
+ <TELL "." CR>)>>
+
+<ROUTINE WINNER-DESCRIBE (OBJ RM)
+ <TELL "\"You can see " D .OBJ>
+ <COND (<==? ,HERE .RM>
+ <TELL " right over there">)
+ (T <TELL " in the " D .RM>)>
+ <TELL ".\"" CR>>
+
+<ROUTINE TRANSIT-TEST (PER)
+ <COND (<OR <VERB? DISEMBARK LEAVE TAKE-TO THROUGH WALK WALK-TO>
+ ;<AND <VERB? FOLLOW>
+ <DOBJ? PLAYER>>>
+ <WILLING? .PER>)>>
+
+<GLOBAL FAWNING:FLAG <>>
+<ROUTINE COM-CHECK (PER "AUX" N TAG)
+ <SET N <GETP .PER ,P?LINE>>
+ <SET TAG <GET ,TOLD-ABOUT-GHOST <GETP .PER ,P?CHARACTER>>>
+;"First section is w/o fawning."
+ <COND (<VERB? $CALL> ;"e.g. TAMARA, LOVE ME"
+ <DONT-UNDERSTAND>
+ <RETURN ,M-OTHER>)
+ (<TRANSIT-TEST .PER>
+ ;<COND (<OR <EQUAL? ,HERE ,DINING-ROOM>
+ <QUEUED? ,I-TOUR>>
+ <TELL "\"Not just now.\"" CR>
+ <RTRUE>)>
+ <RFATAL>)
+ (<VERB? ALARM HELLO SORRY>
+ <COND (<OR <DOBJ? ROOMS> <==? ,PRSO .PER>>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,PRSA .PER>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ ;(<AND <L? 0 .N>
+ ;<OR <NOT <==? .PER ,FRIEND>>
+ <EQUAL? ,VARIATION ,FRIEND-C>>>
+ <TELL "\"I'm too ">
+ <COND (<1? .N> <TELL "peeved">) (T <TELL "angry">)>
+ <TELL " with you now.\"" CR>
+ <RTRUE>)
+ (<VERB? ARREST NO THANKS YES>
+ <RFATAL> ;"let thru to next handler")
+ (<VERB? DESCRIBE>
+ <COND (<DOBJ? GHOST-NEW>
+ <TELL
+"\"I'm sorry, but I didn't see" HIM ,GHOST-NEW ".\"" CR>
+ <RTRUE>)
+ (<DOBJ? MAID>
+ <TELL ,NEVER-NOTICED-HER>
+ ;<TELL "\"I've never really noticed" HIM ,PRSO ".\"" CR>
+ <RTRUE>)
+ (<DOBJ? COUSIN BUST ;RECORDER>
+ <WINNER-DESCRIBE ,BUST ,DINING-ROOM>
+ <RTRUE>)
+ (<DOBJ? LOVER>
+ <WINNER-DESCRIBE ,LOVER-PIC ,DRAWING-ROOM>
+ <RTRUE>)
+ ;(<DOBJ? TREASURE>
+ <RFALSE>)
+ (T
+ <TELL "\"You could ">
+ <COND (<NOT <EQUAL? <META-LOC ,PRSO> ,HERE>>
+ <TELL "go ">)>
+ <TELL "have a look for " 'PLAYER ", you know.\"" CR>
+ <RTRUE>)>)
+ (<VERB? FOLLOW WALK-TO>
+ <COND (<==? .PER ,BUTLER>
+ <RFALSE>)
+ (<AND <VERB? WALK-TO>
+ <OR <T? .TAG>
+ <DOBJ? SLEEP-GLOBAL BED TAMARA-BED>>>
+ <RFATAL>)
+ (T
+ <TELL
+"\"I will go where I please, thank you very much.\"" CR>
+ <RTRUE>)>)
+ (<VERB? INVENTORY>
+ <COND (<NOT <CARRY-CHECK .PER>>
+ <TELL CHE .PER is "n't holding anything." CR>)>
+ <RTRUE>)
+ (<VERB? LISTEN>
+ <COND (<OR <DOBJ? PLAYER PLAYER-NAME>
+ <NOT <IN? ,PRSO ,GLOBAL-OBJECTS>>>
+ <TELL "\"I'm trying to, " FN "!\"" CR>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ (<VERB? RUB>
+ <FACE-RED>
+ <RTRUE>)>
+ <COND (<AND <1? <RANDOM 3>>
+ <WILLING? .PER T>>
+ <COND (<EQUAL? .PER ,DEB>
+ <SETG FAWNING T>
+ <TELL
+"\"My dear "FN", how could I refuse someone
+as handsome as you?\" Iris murmurs, batting her eyelashes. ">)
+ (<EQUAL? .PER ,OFFICER>
+ <SETG FAWNING T>
+ <TELL
+"\"Delighted to help you if I can, "FN" luv! One feels those
+great luminous eyes of yours can see right through a chap!\" says the
+handsome young guardsman. ">)>)>
+ <COND (<AND <VERB? DANCE> <DOBJ? PLAYER>>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,PRSA .PER>
+ <RTRUE>)
+ (<OR <VERB? DANCE ;GOODBYE>
+ <AND <VERB? WALK>
+ <OR <DOBJ? P?OUT>
+ <T? .TAG>>>>
+ <COND ;(<==? .PER ,GHOST-NEW>
+ <TELL "\"Don't be silly.\"" CR>
+ <RTRUE>)
+ (T
+ ;<TELL "\"As you wish.\"" CR>
+ <RFATAL> ;"let thru to next handler")>)
+ (<VERB? SIGN>
+ <TELL "You notice that" HE .PER " is ">
+ <COND (<EQUAL? .PER ,DEB ,DOCTOR ;,DEALER> <TELL "lef">)
+ (T <TELL "righ">)>
+ <TELL "t-handed." CR>)
+ (<VERB? KISS>
+ <UNSNOOZE .PER>
+ <TELL
+"\"I really don't think this is the proper time or place.\"" CR>)
+ ;(<VERB? WALK-TO>
+ <COND (<DOBJ? HERE GLOBAL-HERE>
+ <TELL "\"I am here, "TN"!\"" CR>)>)
+ (<VERB? TAKE ;"GET SEND SEND-TO BRING">
+ <COND (<IN? ,PRSO ,PLAYER>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?GIVE ,PRSO .PER>
+ <RTRUE>)>)
+ (<VERB? EXAMINE LOOK-INSIDE READ>
+ <COND (<IN? ,PRSO ,PLAYER>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?SHOW .PER ,PRSO>
+ <RTRUE>)>)
+ (<VERB? FORGIVE>
+ <SETG WINNER ,PRSO>
+ <PERFORM ,V?SORRY .PER>
+ <RTRUE>)
+ (<AND <VERB? GIVE THROW-AT> <FSET? ,PRSI ,PERSONBIT>>
+ <SETG WINNER ,PRSI>
+ <PERFORM ,V?ASK-FOR .PER ,PRSO>
+ <RTRUE>)
+ (<AND <VERB? SGIVE> <FSET? ,PRSO ,PERSONBIT>>
+ <SETG WINNER ,PRSO>
+ <PERFORM ,V?ASK-FOR .PER ,PRSI>
+ <RTRUE>)
+ (<VERB? HELP>
+ <COND (<EQUAL? ,PRSO <> ,PLAYER ,PLAYER-NAME>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?ASK .PER>
+ <RTRUE>)
+ (T <RFATAL>)>)
+ (<VERB? FIND SHOW SSHOW>
+ <COND (<VERB? SHOW>
+ <SETG PRSA ,V?SSHOW>
+ <SET N ,PRSI>
+ <SETG PRSI ,PRSO>
+ <SETG PRSO .N>)>
+ <COND (<IN? ,PRSO ,ROOMS> ;"SHOW ME MY ROOM"
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?WALK-TO ,PRSO>
+ <RTRUE>)
+ (<IN? ,PRSO .PER>
+ <COND (<==? <ITAKE> T>
+ <TELL
+CHE .PER " fumbles in" HIS .PER " pocket and produces" HIM ,PRSO "." CR>)>
+ <RTRUE>)
+ (<VERB? FIND>
+ ;<SETG WINNER ,PLAYER>
+ ;<PERFORM ,PRSA ,PRSO>
+ <RFATAL>)>)
+ (<VERB? PLAY>
+ <COND (<DOBJ? PIANO>
+ <TELL
+"\"I'm not very good at this sort of thing, but...\"|">
+ <RFATAL>)
+ (T <RFALSE>)>)
+ (<VERB? TELL>
+ <COND (<DOBJ? PLAYER PLAYER-NAME>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?ASK .PER>
+ <RTRUE>)>)
+ (<VERB? TELL-ABOUT>
+ <COND (<FSET? ,PRSO ,PERSONBIT>
+ ;<DOBJ? PLAYER PLAYER-NAME>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?ASK-ABOUT .PER ,PRSI>
+ <RTRUE>)>)
+ (<VERB? STOP WAIT-FOR>
+ <COND (<DOBJ? HERE GLOBAL-HERE PLAYER PLAYER-NAME ROOMS>
+ <COND (<==? .PER ,FOLLOWER>
+ <SETG FOLLOWER 0>
+ <TELL "\"As you wish, ">
+ <COND (<PRINT-NAME ,FIRST-NAME> <TELL !\.>)>
+ <TELL "\"" CR>)
+ (T
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?$CALL .PER>
+ <RTRUE>)>)>)
+ (<VERB? ;WHAT TALK-ABOUT>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?ASK-ABOUT .PER ,PRSO>
+ <RTRUE>)>>
+
+<GLOBAL NEVER-NOTICED-HER "\"I can't say that I ever noticed her much.\"|">
+
+<ROUTINE EVIDENCE? (OBJ "OPTIONAL" (PER 0))
+ <COND (<AND <T? .PER>
+ <NOT <EQUAL? ,VARIATION <GETP .PER ,P?CHARACTER>>>>
+ <RFALSE>)
+ (<EQUAL? .OBJ ,LETTER-MAID ,PASSAGE ,JEWEL>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,LENS ,LENS-1 ,LENS-2>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,COSTUME ,LENS-BOX ,EARRING>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,BLOWGUN>
+ <RTRUE>)
+ (<AND <T? .OBJ>
+ <NOT <FSET? .OBJ ,PERSONBIT>>
+ <FSET? .OBJ ,RMUNGBIT> ;"evidence">
+ <RTRUE>)>>
+
+<GLOBAL IM-SHOCKED "\"I'm shocked!\"|">
+<GLOBAL THATS-INTERESTING "\"Hmm... That certainly is interesting.\"|">
+<GLOBAL ANCIENT-SECRETS
+"\"Yes, the oldest parts of the castle hold ancient secrets,
+some fascinating and some not.\"">
+
+<ROUTINE SETUP-SHOT (PER)
+ <SETG VILLAIN-KNOWN? T>
+ <MOVE ,BLOWGUN .PER>
+ <FCLEAR ,BLOWGUN ,NDESCBIT>
+ <FCLEAR ,BLOWGUN ,TAKEBIT>
+ <PUTP .PER ,P?LINE 2>
+ <PUTP .PER ,P?LDESC 8 ;"poised to attack">
+ <SETG AIMED-HERE ,HERE>
+ <SETG SHOOTER .PER>
+ <QUEUE I-SHOT ,CLOCKER-RUNNING ;2>>
+
+<ROUTINE COMMON-ASK-ABOUT (PER OBJ)
+ %<DEBUG-CODE <COND (,DBUG <TELL "{CAB: " D .PER !\/ D .OBJ "}|">)>>
+ <COND (<EVIDENCE? .OBJ .PER>
+ <TELL CHE .PER " flinches a little before answering.|">)
+ (<EVIDENCE? .OBJ>
+ <COND (<T? ,CONFESSED>
+ <TELL ,IM-SHOCKED>
+ <RTRUE>)
+ (T
+ <TELL CHE .PER " says, \"">
+ <COND (<1? <RANDOM 2>>
+ <TELL "Good Lord">)
+ (T <TELL "I say">)>
+ <TELL "! I think you're onto something here.\"" CR>
+ <RTRUE>)>)>
+ <COND (<AND <FSET? .OBJ ,RMUNGBIT> ;"evidence"
+ <VERB? CONFRONT SHOW>
+ <NOT <FSET? .OBJ ,PERSONBIT>>>
+ <PUT ,TOLD-ABOUT-EVID <GETP .PER ,P?CHARACTER> T>)>
+ <COND (<AND <EQUAL? .OBJ ,SEARCHER>
+ <==? <GETP .OBJ ,P?LDESC> 21 ;"searching">>
+ <COND (<EQUAL? .PER ,SEARCHER>
+ <TELL
+"\"You mean, why am I searching? I'm sure you can guess.\"" CR>)
+ (T
+ <TELL "\"I imagine that " D .OBJ " is searching because">
+ <THIS-IS-IT .OBJ>
+ <TELL
+HE .OBJ " got a bright idea. I prefer to let our" ,FAMOUS-YOUNG-DETECTIVE
+" do the work.\"" CR>)>)
+ (<EQUAL? .OBJ .PER>
+ <TELL "\"I have no secrets. Anyone can see what I am.\"" CR>)
+ (<EQUAL? .OBJ ,PLAYER ,PLAYER-NAME>
+ <TELL "\"You're ">
+ <TELL-FULL-NAME>
+ <TELL ", the" ,FAMOUS-YOUNG-DETECTIVE ".\"" CR>)
+ (<EQUAL? .OBJ ,BUTLER>
+ <TELL "\"He's served the family all his life.\"" CR>)
+ (<EQUAL? .OBJ ,LOVER>
+ <TELL "\"Poor thing, her life came to a sad ending.">
+ <COND (<==? .PER ,DOCTOR>
+ <TELL " As did her grandfather, whom I treated at my clinic.">)>
+ <TELL "\"" CR>)
+ (<EQUAL? .OBJ ,COUSIN ,BUST ;,RECORDER>
+ <COND (T ;<NOT <EQUAL? .PER ,BUTLER ,PAINTER>>
+ <TELL "\"He was a bit of a strange bird, was Lionel.\"" CR>)>)
+ (<EQUAL? .OBJ ,GHOST-NEW ,DANGER ,HAUNTING>
+ <TELL "\"I myself haven't seen" HIM ,GHOST-NEW ".\"" CR>)
+ (<EQUAL? .OBJ ,GHOST-OLD>
+ <TELL
+"\"Oh, she has haunted " 'CASTLE " for centuries -- a lovely phantom in
+a white gown, with long pale hair. She was said to be the unfaithful
+wife of an early Lord " ,TRESYLLIAN ", who had her walled up alive in
+the tower.\""
+;" Her spirit was sometimes seen at night, until poor "
+;"they finally un-walled her bones and gave them decent burial. After
+that, the haunting stopped -- until a couple of months ago, when poor
+'LOVER Hallam drowned in the castle well.\""
+;" That was just before 'LORD hired me to catalog the castle library." CR>)
+ (<EQUAL? .OBJ ,MAID>
+ <TELL ,NEVER-NOTICED-HER>
+ <RTRUE>)
+ (<FSET? .OBJ ,PERSONBIT>
+ <RFALSE>)
+ (<AND <EQUAL? ,VARIATION <GETP .PER ,P?CHARACTER>>
+ <OR <FSET? .OBJ ,RMUNGBIT> ;"evidence"
+ <EQUAL? .OBJ ,BLOWGUN ;,COSTUME>>>
+ ;<PUT ,TOLD-ABOUT-EVID <GETP .PER ,P?CHARACTER> T> ;"done above"
+ <PUTP .PER ,P?LINE 2> ;"angry"
+ <TELL
+"\"What can I say?\"" HE .PER " shrugs. \"It's a fair cop. You've caught
+me with damning evidence.">
+ <COND (<OR <EQUAL? ,VARIATION ,FRIEND-C ,LORD-C>
+ <NOT <EQUAL? ,HERE <GET ,CHAR-ROOM-TABLE
+ <+ 1 <GETP .PER ,P?CHARACTER>>>>>
+ <FIND-FLAG-HERE ,PERSONBIT ,PLAYER .PER>>
+ <TELL "\"" CR>
+ <RTRUE>)>
+ <COND (<IN? ,BLOWGUN .PER>
+ <TELL "\" " CHE .PER>)
+ (T
+ <TELL " But there's something you don't know yet">
+ <IAN-CALLS-YOU>
+ <TELL
+", which may put the matter in a different light.\"|
+Still smiling," HE .PER " puts" HIS .PER " hand into" THE ,HIDING-PLACE
+", and">)>
+ <COND (<EQUAL? <LOC ,BLOWGUN> .PER ,HIDING-PLACE>
+ <SETG DISCOVERED-HERE ,HERE>
+ <SETUP-SHOT .PER>
+ <COND (<NOT <FSET? ,BLOWGUN ,NDESCBIT>>
+ ;<VERB? GIVE SGIVE>
+ <TELL " takes">)
+ (T
+ <FCLEAR ,BLOWGUN ,NDESCBIT>
+ <TELL " suddenly extracts">)>
+ <TELL THE ,BLOWGUN " and aims it at you!" CR>
+ <RTRUE>)
+ (T
+ ;<FSET? ,BLOWGUN ,TOUCHBIT>
+ <TELL
+HIS .PER " jaw drops as" HIS .PER " hand comes out, empty." CR>
+ <RTRUE>)>)
+ (<EQUAL? .OBJ ,ACCIDENT>
+ <TELL "\"You'd best ask Jack about that, or " 'BUTLER ".\"" CR>)
+ (<EQUAL? .OBJ ,BELL>
+ <TELL
+"\"It's actually a ship's bell off an old British man-o'-war.\""
+;" that was part of Nelson's fleet at Trafalgar.\"" CR>)
+ (<AND <EQUAL? .PER ,SEARCHER>
+ <ZERO? ,LIONEL-SPEAKS-COUNTER>
+ <SHOWING-CLUE? .OBJ>
+ <NOT <VERB? ASK-ABOUT>>>
+ <QUEUE I-SEARCH 1>
+ <TELL ,THATS-INTERESTING>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,CORPSE>
+ <TELL
+!\" 'CORPSE " was never recovered from the well. They think it
+was carried out to sea by an underground tidal stream.\"" CR>)
+ (<AND <EQUAL? .OBJ ,COSTUME ,BLOWGUN ,LENS-BOX>
+ <OR <AND <EQUAL? .PER ,PAINTER ,DOCTOR> ;"lie"
+ <EQUAL? ,VARIATION <GETP .PER ,P?CHARACTER>>>
+ <AND <EQUAL? .PER ,DEB> ;"truth"
+ <EQUAL? ,VARIATION ,FRIEND-C>>>
+ ;<EQUAL? ,VARIATION <GETP .PER ,P?CHARACTER>>>
+ <SET OBJ <GET ,CHAR-ROOM-TABLE <+ 1 <GETP .PER ,P?CHARACTER>>>>
+ <TELL D .PER "'s look changes to a puzzled and angry frown. ">
+ <COND (<NOT <EQUAL? .PER ,LORD ,FRIEND>>
+ <TELL "\"You mean you found that ">
+ <COND (<EQUAL? ,HERE .OBJ> <TELL "here ">)>
+ <TELL "in my room?\"" HE .PER " gasps. ">)>
+ <TELL
+"\"How can I explain it when it doesn't belong to me? If you didn't
+bring it ">
+ <COND (<NOT <EQUAL? ,HERE .OBJ>> <TELL !\t>)>
+ <TELL
+"here " 'PLAYER ", then someone else planted it, trying to frame me as
+the maniac who's been posing as " 'LOVER "'s ghost!\"" CR>)
+ (<EQUAL? .OBJ ,COSTUME>
+ <COND (<T? <GET ,FOUND-COSTUME ,PLAYER-C>>
+ <TELL "\"So that's how ">
+ <COND (<ZERO? ,CONFESSED>
+ <TELL "somebody">)
+ (T <TELL 'VILLAIN-PER>)>
+ <TELL " posed as a ghost!\"" CR>)>)
+ (<EQUAL? .OBJ ,DINNER ,DINNER-2 ;,DINNER-3>
+ <COND (<L? ,PRESENT-TIME ,DINNER-TIME>
+ <TELL "\"Tonight's a dinner in honor of ">
+ <COND (<==? .PER ,BUTLER>
+ <TELL "the late Lord ">)>
+ <TELL
+"Lionel's birthday. In his will, he asked for these particular guests --
+except ">
+ <COND (<==? .PER ,FRIEND> <TELL "me">)
+ (T <PRINTD ,FRIEND>)>
+ <TELL ", of course. It's at eight o'clock">
+ <COND (<NOT <==? .PER ,BUTLER>>
+ <TELL " -- or whenever " 'BUTLER " gets 'round to it">)>
+ <TELL ".\"" CR>)
+ (<EQUAL? <META-LOC ,DINNER> ,HERE>
+ <TELL "\"It looks delicious!\"" CR>)
+ (T
+ <COND (<==? <GETP .PER ,P?LDESC> 10 ;"eating with relish">
+ <TELL "\"I'm enjoying">)
+ (T <TELL "\"I enjoyed">)>
+ <TELL " it immensely.">
+ <COND (<T? ,MISSED-DINNER>
+ <TELL
+" We started without you, as we assumed you were sleuthing.">)>
+ <TELL "\"" CR>)>)
+ (<OR <EQUAL? .OBJ ,BRICKS ,COFFIN ,CRYPT>
+ <EQUAL? .OBJ ,DUNGEON ,IRON-MAIDEN ,TOMB>
+ <EQUAL? .OBJ ,WELL>>
+ <TELL ,ANCIENT-SECRETS CR>)
+ (<EQUAL? .OBJ ,JEWEL>
+ <TELL CHE .PER>
+ <COND (<AND <==? .PER ,FRIEND>
+ <FSET? ,EARRING ,LOCKED>> ;"matched to stone"
+ <TELL
+" says, \"Oh, thank you for finding it! I've looked everywhere!\"" CR>
+ <RTRUE>)
+ (<==? ,HERE <META-LOC ,JEWEL>>
+ <TELL " looks at it with interest">
+ <COND (<EQUAL? .PER ,DEALER>
+ <TELL ", putting a monocle in one eye to see better">)>)
+ (T
+ <TELL " listens to your description of it">)>
+ <TELL ". But" HE .PER " says" HE .PER " can't identify it." CR>)
+ (<EQUAL? .OBJ ,LAMP>
+ <TELL "\"I think " 'BUTLER " keeps">
+ <IN-CASE-OF-BLACKOUT>
+ <RTRUE>)
+ (<AND <EQUAL? .OBJ ,LUGGAGE>
+ <IN? ,LUGGAGE ,BUTLER>>
+ <TELL "\"Don't panic.">
+ <BOLITHO-WILL>
+ <TELL ".\"" CR>)
+ (<EQUAL? .OBJ ,MACE>
+ <TELL "\"That is a long story, ">
+ <COND (<TITLE-NAME> <TELL !\.>)>
+ <TELL
+" When Lord Lionel was alive, he had a pit bulldog to protect the
+castle. A right vicious brute it was, too! Several
+times it attacked the servants, so the master gave out
+these " 'MACE "s. Just press the button on the side, and it sprays
+something foul. It always
+worked a treat on that wretched dog, and I daresay it could stop a
+ghost just as well.\"" CR>)
+ (<EQUAL? .OBJ ,NECKLACE-OF-D>
+ <TELL "\"The police returned it to ">
+ <COND (<==? .PER ,LORD> <TELL "me">) (T <TELL 'LORD>)>
+ <TELL " after the inquest.\"" CR>)
+ (<SECRET-PASSAGE-OR-DOOR? .OBJ>
+ <TELL-ABOUT-OBJECT .PER ,PASSAGE ,FOUND-PASSAGES>)
+ ;(<EQUAL? .OBJ ,SERVANTS-QUARTERS>
+ <COND (<IN? ,LETTER .PER>
+ <MOVE ,LETTER ,WINNER>
+ <TELL
+"\"Just read this.\" " CHE .PER " hands you" THE ,LETTER "." CR>)
+ (T <TELL "\"Just read the " 'LETTER ".\"" CR>)>)
+ (<EQUAL? .OBJ ,SKELETON>
+ <TELL
+"\"Ugh! Those must be the bones of the " 'GHOST-OLD "!\""
+;"very first Lady Tresyllian. I suppose Lionel was morbid indeed if he
+moved her bones here from the village.\"" CR>)
+ (<TREASURE-FOUND? .OBJ .PER>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,YOUR-ROOM>
+ <TELL
+"\"It's fortunate that one bedroom was available for you.\"" CR>)
+ (<OR <EQUAL? .OBJ ,CASTLE>
+ <IN? .OBJ ,ROOMS>>
+ <TELL "\"Oh, it is a lovely piece of real estate, ">
+ <COND (<EQUAL? .PER ,FRIEND>
+ <TELL "isn't it">)
+ (T <TELL "what">)>
+ <TELL !\?>
+ <COND (<EQUAL? .PER ,DOCTOR ,PAINTER ,DEALER>
+ <TELL " Almost a shame to admit riffraff on weekends.">)>
+ <TELL "\"" CR>)
+ (<IN? .OBJ .PER>
+ <TELL "\"I have it right here, ">
+ <COND (<TITLE-NAME> <TELL !\.>)>
+ <TELL "\"" CR>)>>
+
+<ROUTINE SHOWING-CLUE? (OBJ)
+ <COND (<EQUAL? .OBJ ,CLUE-1 ,CLUE-2>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,CLUE-3 ,CLUE-4>
+ <RTRUE>)
+ (<AND <==? .OBJ ,MAGAZINE>
+ <EQUAL? ,VARIATION ,PAINTER-C>>
+ <RTRUE>)>>
+
+<ROUTINE TREASURE-FOUND? (OBJ PER "AUX" X)
+ <COND (<AND ;<T? ,CLUE-1-KNOWN>
+ <OR <==? .OBJ ,TREASURE>
+ ;<AND <==? .OBJ ,BOTTLE> <IN? ,MOONMIST ,BOTTLE>>
+ <AND <==? .OBJ ,INKWELL> <IN? ,MOONMIST ,INKWELL>>>>
+ ;<SETG TREASURE-FOUND .OBJ>
+ <FCLEAR .OBJ ,SECRETBIT>
+ <TELL "\"That must be the " 'ARTIFACT "!">
+ <SET X <TELL-STOP-SEARCHING? .PER>>
+ <TELL "\"|">
+ <COND (<OR <IN? <SET PER ,FRIEND> ,HERE>
+ <IN? <SET PER ,LORD> ,HERE>>
+ <COND (<NOT <==? .PER ,CONFESSED>>
+ ;<SET OBJ <GT-O .PER>>
+ <PUTP .PER ,P?LINE 0>
+ <THIS-IS-IT .PER>
+ <TELL
+"\"That's super!\" adds " D .PER ". \"We can't thank you enough!">
+ <COND (<ZERO? .X>
+ <SET X <TELL-STOP-SEARCHING? .PER>>)>
+ <TELL "\"|">)>)>
+ <COND (<AND <IN? ,SEARCHER ,HERE>
+ <ZERO? .X>
+ <TELL-STOP-SEARCHING? ,SEARCHER T T>>
+ <TELL "\" says " D ,SEARCHER ".|">)>
+ <COND (<AND ;<T? ,CLUE-1-KNOWN>
+ <ZERO? ,TREASURE-FOUND>>
+ <CONGRATS ,ARTIFACT>)>
+ <RTRUE>)>>
+
+<ROUTINE TELL-STOP-SEARCHING? (PER "OPT" (COMMA <>) (NOSP <>) "AUX" OBJ)
+ <COND (<AND <EQUAL? .PER ,SEARCHER>
+ <==? <GET <SET OBJ <GT-O .PER>> ,GOAL-FUNCTION>
+ ,X-SEARCHES>>
+ <PUT .OBJ ,GOAL-FUNCTION ,NULL-F>
+ ;<SETG SEARCHER <>>
+ ;<QUEUE I-SEARCH 0>
+ <COND (<ZERO? .NOSP> <TELL !\ >)
+ (T <TELL !\">)>
+ <TELL "Then that's the end of my searching">
+ <COND (<T? .COMMA> <TELL !\,>)
+ (T <TELL !\.>)>
+ <COND (<OR <NOT <SET OBJ <ZMEMQ ,HERE ,CHAR-ROOM-TABLE>>>
+ <NOT <==? .PER <GET ,CHARACTER-TABLE <- .OBJ 1>>>>>
+ <ESTABLISH-GOAL .PER ,SITTING-ROOM>)>
+ <RTRUE>)>>
+
+<ROUTINE GOOD-SHOW (PER OBJ)
+ <COND (<EQUAL? .PER ,GHOST-NEW ,CONFESSED>
+ <RFALSE>)>
+ <TELL !\">
+ <COND (<==? ,VARIATION <GETP .PER ,P?CHARACTER>>
+ <TELL "How nice">)
+ (<==? .PER ,FRIEND>
+ <TELL "That's keen">)
+ (<1? <RANDOM 2>>
+ <TELL "Well done">)
+ (T <TELL "Good show">)>
+ <TELL "! You found " A .OBJ !\!>
+ <COND (<==? .OBJ ,TREASURE>
+ <TELL-STOP-SEARCHING? .PER T>)>
+ <TELL "\" says " D .PER "." CR>>
+
+;<ROUTINE DISCRETION (P1 P2 ;"OPTIONAL" ;(P3 <>) "AUX" L2 ;L3)
+ <SET L2 <META-LOC .P2>>
+ ;<COND (<T? .P3> <SET L3 <META-LOC .P3>>)>
+ <COND (<NOT <==? ,HERE .L2>>
+ <COND ;(<AND .P3 <==? ,HERE .L3>>
+ <SET P2 .P3>
+ <SET P3 <>>)
+ (T <RFALSE>)>)>
+ <TELL CHE .P1 " looks briefly toward" HIM .P2>
+ ;<COND (<AND .P3 <==? ,HERE .L3>>
+ <TELL " and" HIM .P3>)>
+ <TELL " and then speaks in a whisper." CR>>
+
+<ROUTINE COMMON-DESC (PER)
+ <TELL "He's a ">
+ <COND (<==? .PER ,DOCTOR>
+ <TELL "middle-sized man in his fifties">
+ <COND (<IN? ,MUSTACHE ,DOCTOR> ;<ZERO? ,WENDISH-BARE>
+ <TELL ", with spectacles and a grizzled mustache">)>
+ <TELL "." CR>
+ <RTRUE>)>
+ <TELL "tall">
+ <COND (<==? .PER ,LORD>
+ <TELL ", handsome, dark-browed young man">
+ <COND (<G? ,BED-TIME ,PRESENT-TIME>
+ <TELL " in dinner jacket and black tie">)>)
+ (<==? .PER ,OFFICER>
+ <TELL " blond">
+ <COND (<G? ,BED-TIME ,PRESENT-TIME>
+ <TELL
+", sporting a white dinner jacket and
+scarlet cummerbund. He moves with the elegant swagger of a
+Guards officer and young-man-about-Mayfair, both of which he is">)>)
+ (<==? .PER ,DEALER>
+ <TELL ", foppish art and antiques dealer">
+ <COND (<NOT <FSET? .PER ,MUNGBIT>>
+ <TELL
+". Despite his languid
+manner, you're aware of his penetrating glance. If you were
+buying a used car from this man, you'd want to check it out carefully">)>)>
+ <TELL "." CR>>
+
+<ROUTINE COMMON-OTHER (PER "AUX" (X <>) N)
+ <COND (<VERB? ASK> <RFALSE>)
+ (<VERB? EXAMINE>
+ <COND (<OR <EQUAL? .PER ,DOCTOR>
+ <EQUAL? .PER ,LORD ,OFFICER ,DEALER>>
+ <COMMON-DESC .PER>)
+ (<NOT <==? .PER ,GHOST-NEW>>
+ <TELL <GETP .PER ,P?TEXT> CR>)>
+ ;<THIS-IS-IT .PER>
+ <COND (<AND <IN? .PER ,HERE>
+ <SET N <FIRST? .PER>>
+ <NOT <FSET? .N ,NDESCBIT>>>
+ <COND (<CARRY-CHECK .PER>
+ <SET X T>)>)>
+ <COND (<FSET? .PER ,MUNGBIT>
+ <COND (<NOT <ZERO? .X>> <TELL "And">)>
+ <HE-SHE-IT .PER <NOT .X> "is">
+ ;<SET X T>
+ <PRINTC 32>
+ <TELL <GET ,LDESC-STRINGS <GETP .PER ,P?LDESC>> "." CR>)
+ ;(<NOT <FSET? .PER ,PERSONBIT>>
+ <COND (<NOT <ZERO? .X>> <TELL "And">)>
+ <FSET .PER ,PERSONBIT>
+ <HE-SHE-IT .PER <NOT .X> "is">
+ <FCLEAR .PER ,PERSONBIT>
+ <SET X T>
+ <TELL " dead." CR>)>
+ <COND (<EQUAL? .PER ,DEALER>
+ <COND (<AND <EQUAL? <LOC ,LORD> ,HERE ,PSEUDO-OBJECT>
+ <=? <GETP ,DEALER ,P?LDESC> 2>
+ <ZERO? <GETP ,LORD ,P?LINE>>>
+ <TELL
+"\"Montague began appraising the art works in the castle for Uncle
+Lionel before he died,\" explains " 'LORD ". \"I've asked him to continue
+and make up a catalog.\"" CR>)>)
+ (<EQUAL? .PER ,PAINTER>
+ <COND (<EQUAL? <LOC ,FRIEND> ,HERE ,PSEUDO-OBJECT>
+ <SET X ,FRIEND>)
+ (T <SET X <FIND-FLAG-HERE ,PERSONBIT ,PLAYER ,PAINTER>>)>
+ <COND (<AND <T? .X>
+ <==? <LOC ,PAINTER> ,DRAWING-ROOM>>
+ <TELL
+"\"Vivien painted that portrait of " 'LOVER " Hallam, the girl who drowned
+in the castle well,\" says " D .X ". She gestures to a framed picture
+hanging by the " 'FIREPLACE "." CR>)>)>
+ <RTRUE>)
+ (<AND <EQUAL? ,PRSO .PER> <VERB? SHOW>>
+ <PERFORM ,V?ASK-ABOUT ,PRSO ,PRSI>
+ <RTRUE>)>>
+
+<ROUTINE UNSNOOZE (PER "OPTIONAL" (NO-TELL? <>)
+ "AUX" RM GT (C <GETP .PER ,P?LDESC>))
+ <COND (<EQUAL? .C 14 ;"asleep">
+ <FIX-MUSTACHE .PER>
+ <SET C <GETP .PER ,P?CHARACTER>>
+ <SET GT <GET ,GOAL-TABLES .C>>
+ <PUT .GT ,ATTENTION <GET .GT ,ATTENTION-SPAN>>
+ <PUT .GT ,GOAL-ENABLE 0>
+ <PUT .GT ,GOAL-FUNCTION ,X-RETIRES>
+ <PUT .GT ,GOAL-S T> ;"so GOAL-REACHED will work"
+ <SET RM <GET ,CHAR-ROOM-TABLE <+ 1 .C>>>
+ <COND (<NOT <IN? .PER .RM>>
+ <ESTABLISH-GOAL .PER .RM>)>
+ <COND ;(<EQUAL? .PER ,GHOST-NEW>
+ <PUTP .PER ,P?LDESC 0>)
+ (<EQUAL? ,VARIATION .C>
+ <PUTP .PER ,P?LDESC 4 ;"looking at you with suspicion">)
+ (T <PUTP .PER ,P?LDESC 25 ;"looking sleepy">)>
+ <FCLEAR .PER ,MUNGBIT>
+ <SET RM <META-LOC .PER>>
+ <COND (<AND <IN? .PER ,HERE> <ZERO? .NO-TELL?>>
+ <TELL CHE .PER " wakes up first. ">
+ ;<THIS-IS-IT .PER>
+ <COND (<NOT <FSET? .RM ,ONBIT>>
+ <TELL CHE .PER " turns on the light. ">)>)>
+ <FSET .RM ,ONBIT>
+ <RTRUE>)
+ (<AND <EQUAL? .C 19 ;"out cold">
+ <ZERO? <GET ,SHOT <GETP .PER ,P?CHARACTER>>>>
+ <FIX-MUSTACHE .PER>
+ <QUEUE I-COME-TO 0>
+ <I-COME-TO>
+ <RTRUE>)>>
+
+<ROUTINE FIX-MUSTACHE (PER)
+ <COND (<AND <==? .PER ,DOCTOR>
+ <EQUAL? ,VARIATION ,DOCTOR-C>>
+ <FCLEAR ,MUSTACHE ,TAKEBIT>
+ <FSET ,MUSTACHE ,TRYTAKEBIT>)>>
+
+<OBJECT OBJECT-PAIR
+ (DESC "such things")
+ (ACTION OBJECT-PAIR-F)>
+
+<ROUTINE OBJECT-PAIR-F ("AUX" P1 P2)
+ <COND (<L? 2 <GET/B ,P-PRSO ,P-MATCHLEN>>
+ <SETG CLOCK-WAIT T>
+ <TELL
+"(That's too many things to compare all at once!)" CR>
+ <RTRUE>)
+ (T
+ <PERFORM ,PRSA <GET/B ,P-PRSO 1> <GET/B ,P-PRSO 2>>
+ <RTRUE>)>>
+
+<OBJECT CREW-GLOBAL
+ (IN GLOBAL-OBJECTS)
+ (DESC "bunch of guests")
+ (SYNONYM BUNCH GUESTS)
+ (FLAGS SEENBIT)
+ (ACTION CREW-GLOBAL-F)>
+
+<ROUTINE CREW-GLOBAL-F ("AUX" L)
+ <COND (<AND <QUEUED? ,I-TOUR>
+ <VERB? WALK-TO>>
+ <PERFORM ,PRSA <GET ,TOUR-PATH ,TOUR-INDEX>>
+ <RTRUE>)
+ (<NOT <ALL-TOGETHER-NOW?>>
+ <SETG CLOCK-WAIT T>
+ <TELL "(The guests aren't all together!)" CR>
+ <RFATAL>)
+ (<VERB? EXAMINE>
+ <TELL "There are seven people, not counting you." CR>)
+ (<VERB? ;GOODBYE HELLO>
+ <TELL CTHE ,PRSO " nods at you." CR>)
+ (T ;<SPEAKING-VERB? ,CREW-GLOBAL>
+ <TELL "You'd better stick to one guest at a time." CR>
+ <RFATAL>)>>
diff --git a/syntax.zil b/syntax.zil
new file mode 100644
index 0000000..96da819
--- /dev/null
+++ b/syntax.zil
@@ -0,0 +1,863 @@
+"SYNTAX for MOONMIST
+Copyright (C) 1986 Infocom, Inc. All rights reserved."
+
+<PREP-SYNONYM WITH USING ;BY>
+<PREP-SYNONYM THROUGH THRU>
+<PREP-SYNONYM ON ONTO>
+<PREP-SYNONYM UNDER BELOW UNDERNEATH BENEATH>
+<PREP-SYNONYM UNTIL TILL>
+<PREP-SYNONYM TO TOWARD>
+
+<SYNONYM IN INSIDE INTO>
+<SYNONYM OUT OUTSIDE>
+
+<SYNONYM NORTH N>
+<SYNONYM EAST E>
+<SYNONYM SOUTH S>
+<SYNONYM WEST W>
+<SYNONYM DOWN D DOWNSTAIRS>
+<SYNONYM UP U>
+<DIR-SYNONYM UP UPSTAIRS>
+<SYNONYM NW NORTHWEST>
+<SYNONYM NE NORTHEAST>
+<SYNONYM SW SOUTHWEST>
+<SYNONYM SE SOUTHEAST>
+
+<BUZZ A AN THE AND OF THEN \. \, \" \! \? \'
+ NOW SOON ;WELL THERE PLEASE ;MAYBE BACK ANYWAY OH
+ ALL ;BOTH SOME BUT EXCEPT>
+
+<SYNTAX $VERIFY = V-$VERIFY>
+<SYNTAX $VERIFY OBJECT = V-$VERIFY>
+%<DEBUG-CODE
+[ <SYNTAX $CHEAT OBJECT = V-$CHEAT>
+ <SYNTAX $GENDER OBJECT (FIND RMUNGBIT) = V-$GENDER>
+ <SYNTAX \#GOAL = V-$GOAL>
+ <SYNTAX \#QUEUE = V-$QUEUE>
+ <SYNTAX \#VARIATION OBJECT (FIND RMUNGBIT) = V-$VARIATION>
+ <SYNTAX \#RANDOM OBJECT = V-$RANDOM>
+ <SYNTAX \#COMMAND = V-$COMMAND>
+ <SYNTAX \#RECORD = V-$RECORD>
+ <SYNTAX \#UNRECORD = V-$UNRECORD>
+
+ <SYNTAX \#DBG = V-DEBUG>
+ "<SYNTAX \#WHERE = V-$WHERE>
+ <SYNTAX \#WHERE OBJECT = V-$WHERE>
+ <SYNTAX \#WHERE OBJECT OBJECT = V-$WHERE>"]>
+
+<VERB-SYNONYM POINT AIM>
+<SYNTAX POINT OBJECT AT OBJECT = V-AIM ;PRE-AIM>
+<SYNTAX POINT OBJECT TO OBJECT = V-AIM ;PRE-AIM>
+<SYNTAX POINT OBJECT OBJECT = V-AIM ;PRE-AIM>
+<SYNTAX POINT AT OBJECT = V-SSHOW PRE-SSHOW>
+<SYNTAX POINT AT OBJECT WITH OBJECT = V-SAIM PRE-SAIM>
+<SYNTAX POINT TO OBJECT = V-SSHOW PRE-SSHOW>
+
+<VERB-SYNONYM CHECK TEST ANALYSE ANALYZE>
+<SYNTAX CHECK OBJECT = V-ANALYZE PRE-ANALYZE>
+<SYNTAX CHECK OBJECT FOR OBJECT = V-ANALYZE PRE-ANALYZE>
+<SYNTAX CHECK OUT OBJECT = V-ANALYZE PRE-ANALYZE>
+<SYNTAX CHECK UNDER OBJECT = V-LOOK-UNDER PRE-LOOK-UNDER>
+<SYNTAX CHECK OBJECT IN OBJECT = V-LOOK-UP>
+<SYNTAX CHECK OBJECT ON OBJECT = V-SANALYZE PRE-SANALYZE>
+
+<VERB-SYNONYM ANSWER REPLY RESPOND>
+<SYNTAX ANSWER = V-ANSWER>
+<SYNTAX ANSWER OBJECT = V-REPLY>
+<SYNTAX ANSWER TO OBJECT = V-REPLY>
+
+<VERB-SYNONYM ARREST ACCUSE CAPTURE ;CONVICT ;SUBDUE>
+<SYNTAX ARREST OBJECT (FIND PERSONBIT) = V-ARREST PRE-ARREST>
+<SYNTAX ARREST OBJECT FOR OBJECT = V-ARREST PRE-ARREST>
+
+<VERB-SYNONYM ASK QUESTION INQUIRE CONSULT>
+<SYNTAX ASK OBJECT (FIND PERSONBIT) = V-ASK PRE-ASK-ABOUT>
+<SYNTAX ASK ABOUT OBJECT = V-ASK-CONTEXT-ABOUT PRE-ASK-CONTEXT-ABOUT>
+<SYNTAX ASK FOR OBJECT = V-ASK-CONTEXT-FOR PRE-ASK-CONTEXT-FOR>
+<SYNTAX ASK OBJECT ABOUT OBJECT ;(MANY) = V-ASK-ABOUT PRE-ASK-ABOUT>
+<SYNTAX ASK OBJECT FOR OBJECT = V-ASK-FOR PRE-ASK-ABOUT>
+
+<VERB-SYNONYM ATTACK FIGHT RAPE MOLEST ASSAULT REPEL>
+<SYNTAX ATTACK OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM) = V-ATTACK>
+<SYNTAX ATTACK OFF OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM) = V-ATTACK>
+<SYNTAX ATTACK OBJECT (ON-GROUND IN-ROOM)
+ WITH OBJECT ;(FIND WEAPONBIT) (HELD ;CARRIED HAVE TAKE)
+ = V-ATTACK>
+
+;<SYNTAX BACK UP OBJECT (FIND RMUNGBIT) = V-BACK-UP>
+
+;<SYNTAX BLAST OBJECT = V-RING>
+
+<VERB-SYNONYM BOW CURTSY CURTSEY>
+<SYNTAX BOW TO OBJECT (FIND PERSONBIT) = V-BOW>
+
+<SYNTAX BRIEF = V-BRIEF>
+
+;<SYNTAX BRIBE OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ WITH OBJECT (MANY HELD HAVE TAKE)
+ = V-SGIVE PRE-SGIVE>
+
+"<VERB-SYNONYM BRING FETCH>
+<SYNTAX BRING OBJECT = V-BRING PRE-BRING>
+<SYNTAX BRING OBJECT OBJECT = V-SBRING PRE-SBRING>
+<SYNTAX BRING OBJECT TO OBJECT = V-BRING PRE-BRING>"
+
+<VERB-SYNONYM ;BRUSH CLEAN WIPE WASH SCRAPE SCRATCH FRESHEN>
+<SYNTAX CLEAN OBJECT (FIND RMUNGBIT) (ON-GROUND IN-ROOM MANY)
+ = V-BRUSH PRE-BRUSH>
+<SYNTAX CLEAN IN OBJECT (ON-GROUND IN-ROOM) = V-BOARD> "WASH IN OBJECT"
+<SYNTAX CLEAN OBJECT
+ OFF ;OF OBJECT (ON-GROUND IN-ROOM ;MANY)
+ = V-BRUSH PRE-BRUSH>
+<SYNTAX CLEAN OBJECT (ON-GROUND IN-ROOM MANY)
+ WITH OBJECT (HELD CARRIED TAKE HAVE)
+ = V-BRUSH PRE-BRUSH>
+<SYNTAX CLEAN OFF OBJECT (FIND RMUNGBIT) (ON-GROUND IN-ROOM MANY)
+ = V-BRUSH PRE-BRUSH>
+<SYNTAX CLEAN UP OBJECT (FIND RMUNGBIT) (ON-GROUND IN-ROOM MANY)
+ = V-BRUSH PRE-BRUSH>
+
+<VERB-SYNONYM CALL SUMMON>
+<SYNTAX $CALL OBJECT (FIND PERSONBIT) = V-$CALL PRE-ASK-ABOUT>
+<SYNTAX CALL OBJECT (FIND PERSONBIT) = V-$CALL PRE-ASK-ABOUT>
+<SYNTAX CALL TO OBJECT (FIND PERSONBIT) = V-$CALL PRE-ASK-ABOUT>
+
+<SYNTAX CHANGE OBJECT (FIND RMUNGBIT) = V-CHANGE>
+<SYNTAX CHANGE IN OBJECT (FIND WEARBIT) (HAVE TAKE) = V-WEAR>
+<SYNTAX CHANGE FOR OBJECT = V-DRESS>
+<SYNTAX CHANGE TO OBJECT (FIND WEARBIT) (HAVE TAKE) = V-WEAR>
+
+<VERB-SYNONYM CLIMB BOARD>
+<SYNTAX CLIMB OBJECT (ON-GROUND IN-ROOM) = V-BOARD>
+<SYNTAX CLIMB DOWN OBJECT (ON-GROUND IN-ROOM) = V-CLIMB-DOWN>
+<SYNTAX CLIMB IN OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-BOARD>
+<SYNTAX CLIMB OFF OBJECT (FIND RMUNGBIT) (ON-GROUND IN-ROOM) = V-DISEMBARK>
+<SYNTAX CLIMB ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
+<SYNTAX CLIMB OUT OBJECT (FIND RMUNGBIT) (ON-GROUND IN-ROOM) = V-DISEMBARK>
+<SYNTAX CLIMB OVER OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
+<SYNTAX CLIMB THROUGH OBJECT = V-THROUGH PRE-THROUGH>
+<SYNTAX CLIMB UP OBJECT (ON-GROUND IN-ROOM) = V-CLIMB-UP>
+
+<VERB-SYNONYM CLOSE ;DRAW>
+<SYNTAX CLOSE OBJECT ;(FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-CLOSE>
+<SYNTAX CLOSE OBJECT ;(FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT
+ = V-CLOSE>
+
+<VERB-SYNONYM COMPARE MATCH>
+<SYNTAX COMPARE OBJECT (MANY) = V-COMPARE PRE-COMPARE>
+<SYNTAX COMPARE OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ TO OBJECT (HELD CARRIED ON-GROUND IN-ROOM) = V-COMPARE>
+<SYNTAX COMPARE OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT (HELD CARRIED ON-GROUND IN-ROOM) = V-COMPARE>
+
+<SYNTAX CONFRONT OBJECT (FIND PERSONBIT) WITH OBJECT = V-CONFRONT>
+
+<VERB-SYNONYM DAMAGE DESTROY BREAK SMASH CRUSH ;CRUMBLE HURT ;KICK>
+<SYNTAX DAMAGE OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ = V-MUNG>
+<SYNTAX DAMAGE UP OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ = V-MUNG>
+<SYNTAX DAMAGE OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ WITH OBJECT (HELD CARRIED HAVE TAKE)
+ = V-MUNG>
+<SYNTAX DAMAGE OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ DOWN ;WITH OBJECT (HELD CARRIED HAVE TAKE)
+ = V-MUNG>
+<SYNTAX DAMAGE DOWN OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ WITH OBJECT (HELD CARRIED HAVE TAKE)
+ = V-MUNG>
+
+;<SYNTAX DANCE = V-DANCE>
+<SYNTAX DANCE WITH OBJECT (FIND PERSONBIT) = V-DANCE>
+
+<SYNTAX DESCRIBE OBJECT TO OBJECT (FIND RMUNGBIT) = V-DESCRIBE PRE-DESCRIBE>
+"<SYNTAX DESCRIBE OBJECT TO OBJECT = V-STELL-ABOUT PRE-STELL-ABOUT>"
+
+;<SYNTAX DIAGNOSE = V-DIAGNOSE>
+;<SYNTAX DIAGNOSE OBJECT = V-DIAGNOSE>
+
+<SYNTAX DINE ON OBJECT (FIND RMUNGBIT)
+ (HELD CARRIED ON-GROUND IN-ROOM HAVE TAKE ;MANY)
+ = V-EAT PRE-EAT>
+
+;<SYNTAX DISCUSS OBJECT = V-DISCUSS PRE-DISCUSS>
+;<SYNTAX DISCUSS OBJECT WITH OBJECT = V-DISCUSS PRE-DISCUSS>
+
+<SYNTAX DRESS FOR OBJECT (FIND RMUNGBIT) = V-DRESS>
+;<SYNTAX DRESS FOR OBJECT = V-DRESS-FOR>
+<SYNTAX DRESS IN OBJECT (FIND WEARBIT) (HAVE TAKE) = V-WEAR>
+
+<VERB-SYNONYM DRINK SWALLOW SIP>
+<SYNTAX DRINK OBJECT ;(FIND DRINKBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-DRINK>
+
+<SYNTAX DROP OBJECT (HELD MANY ;HAVE) = V-DROP>
+<SYNTAX DROP OBJECT (HELD ;CARRIED MANY HAVE TAKE) DOWN ;ON OBJECT
+ = V-PUT PRE-PUT>
+<SYNTAX DROP OBJECT (HELD ;CARRIED MANY HAVE TAKE) IN OBJECT
+ = V-PUT-IN PRE-PUT-IN>
+<SYNTAX DROP OBJECT (HELD ;CARRIED MANY HAVE TAKE) ON OBJECT
+ = V-PUT PRE-PUT>
+<SYNTAX DROP OBJECT (HELD ;CARRIED MANY HAVE TAKE)
+ THROUGH OBJECT (ON-GROUND IN-ROOM)
+ = V-THROW-THROUGH PRE-THROW-THROUGH>
+
+<VERB-SYNONYM EAT TASTE ;CONSUME>
+<SYNTAX EAT OBJECT (FIND RMUNGBIT)
+ (HELD ;CARRIED ON-GROUND IN-ROOM HAVE TAKE ;MANY)
+ = V-EAT PRE-EAT>
+
+<VERB-SYNONYM EMPTY DRAIN UNPACK>
+<SYNTAX EMPTY OBJECT (FIND RMUNGBIT) = V-EMPTY PRE-EMPTY>
+<SYNTAX EMPTY OBJECT (FIND CONTBIT) IN ;TO OBJECT = V-EMPTY PRE-EMPTY>
+
+<SYNTAX ENTER OBJECT (FIND RMUNGBIT) = V-THROUGH PRE-THROUGH>
+
+<VERB-SYNONYM EXAMINE X INSPECT ;"SCRUTINIZE STUDY" OBSERVE EXPLORE>
+<SYNTAX EXAMINE OBJECT ;(FIND READBIT) ;(HELD CARRIED IN-ROOM ON-GROUND ;MANY)
+ = V-EXAMINE PRE-EXAMINE>
+<SYNTAX EXAMINE OBJECT ;(FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ THROUGH OBJECT (ON-GROUND IN-ROOM HELD CARRIED HAVE TAKE)
+ = V-READ PRE-READ>
+<SYNTAX EXAMINE OBJECT ;(FIND READBIT) ;(HELD CARRIED IN-ROOM ON-GROUND ;MANY)
+ WITH OBJECT (ON-GROUND IN-ROOM HELD CARRIED HAVE TAKE)
+ = V-READ PRE-READ>
+<SYNTAX EXAMINE UNDER OBJECT = V-LOOK-UNDER PRE-LOOK-UNDER>
+
+<SYNTAX EXPLAIN OBJECT = V-TALK-ABOUT PRE-TALK-ABOUT>
+<SYNTAX EXPLAIN OBJECT TO OBJECT = V-STELL-ABOUT PRE-STELL-ABOUT>
+<SYNTAX EXPLAIN ABOUT OBJECT = V-TALK-ABOUT PRE-TALK-ABOUT>
+<SYNTAX EXPLAIN TO OBJECT (IN-ROOM) ABOUT OBJECT
+ = V-TELL-ABOUT PRE-TELL-ABOUT>
+
+<VERB-SYNONYM SLEEP FAINT ;NAP SNOOZE>
+<SYNTAX SLEEP = V-FAINT>
+<SYNTAX SLEEP IN OBJECT (ON-GROUND IN-ROOM) = V-FAINT>
+<SYNTAX SLEEP ON OBJECT (ON-GROUND IN-ROOM) = V-FAINT>
+
+<SYNTAX FIDDLE WITH OBJECT = V-RUB>
+
+<VERB-SYNONYM FILL FLOOD>
+<SYNTAX FILL OBJECT (FIND CONTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-FILL ;PRE-FILL>
+<SYNTAX FILL OBJECT ;(FIND CONTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT
+ = V-FILL ;PRE-FILL>
+
+<VERB-SYNONYM FIND DETECT DISCOVER LOCATE>
+<SYNTAX FIND OBJECT ;(MANY) = V-FIND PRE-FIND>
+"<SYNTAX FIND OBJECT ;(MANY) WITH OBJECT = V-FIND-WITH>"
+<SYNTAX FIND OBJECT IN OBJECT = V-SSEARCH-FOR PRE-SSEARCH-FOR>
+<SYNTAX FIND OBJECT ON OBJECT = V-SSEARCH-FOR PRE-SSEARCH-FOR>
+<SYNTAX FIND OUT OBJECT = V-ASK-CONTEXT-ABOUT PRE-ASK-CONTEXT-ABOUT>
+
+;<SYNTAX FINGER OBJECT (HELD CARRIED IN-ROOM ON-GROUND)
+ = V-FINGERPRINT>
+
+<VERB-SYNONYM FIX REPAIR ADJUST>
+<SYNTAX FIX OBJECT = V-FIX>
+<SYNTAX FIX OBJECT WITH OBJECT ;(FIND TOOLBIT) = V-FIX>
+
+<VERB-SYNONYM FOLLOW PURSUE CHASE STALK ;TRACE>
+<SYNTAX FOLLOW OBJECT (FIND PERSONBIT) = V-FOLLOW>
+<SYNTAX FOLLOW OBJECT (FIND PERSONBIT) OBJECT = V-FOLLOW> "Follow me north."
+<SYNTAX FOLLOW OBJECT (FIND PERSONBIT) TO OBJECT = V-FOLLOW> "F. me to office."
+
+<VERB-SYNONYM FORGIVE PARDON EXCUSE>
+<SYNTAX FORGIVE OBJECT (FIND PERSONBIT) = V-FORGIVE>
+
+<SYNTAX GET OBJECT (FIND TAKEBIT) (ON-GROUND IN-ROOM MANY)
+ = V-TAKE PRE-TAKE>
+<SYNTAX GET OBJECT ;(FIND TAKEBIT) (IN-ROOM CARRIED MANY)
+ FROM OBJECT
+ = V-TAKE PRE-TAKE>
+<SYNTAX GET OBJECT ;(FIND TAKEBIT) (IN-ROOM CARRIED MANY)
+ IN OBJECT
+ = V-TAKE PRE-TAKE>
+<SYNTAX GET OBJECT ;(FIND TAKEBIT) (CARRIED IN-ROOM MANY)
+ OFF OBJECT
+ = V-TAKE PRE-TAKE>
+<SYNTAX GET OBJECT ;(FIND TAKEBIT) (CARRIED IN-ROOM MANY)
+ OUT ;OF OBJECT ;(FIND CONTBIT)
+ = V-TAKE PRE-TAKE>
+<SYNTAX GET OBJECT ;(FIND TAKEBIT) (MANY TAKE) TO OBJECT = V-TAKE-TO>
+;<SYNTAX GET OBJECT ;(FIND TAKEBIT) (ON-GROUND MANY)
+ WITH OBJECT = V-TAKE-WITH PRE-TAKE-WITH>
+<SYNTAX GET IN OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-BOARD>
+<SYNTAX GET OFF OBJECT (FIND RMUNGBIT) (ON-GROUND IN-ROOM) = V-DISEMBARK>
+<SYNTAX GET ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
+<SYNTAX GET OUT ;OF OBJECT (FIND RMUNGBIT) (ON-GROUND IN-ROOM) = V-DISEMBARK>
+<SYNTAX GET RID ;OF OBJECT = V-DROP>
+<SYNTAX GET UP OBJECT (FIND RMUNGBIT) = V-STAND>
+
+<VERB-SYNONYM GIVE OFFER PASS ;" HAND DONATE ASSIGN FEED">
+<SYNTAX GIVE OBJECT (MANY HELD HAVE ;" TAKE CARRIED ON-GROUND IN-ROOM")
+ TO OBJECT (FIND PERSONBIT) (ON-GROUND)
+ = V-GIVE PRE-GIVE>
+<SYNTAX GIVE OBJECT ;(FIND PERSONBIT) (ON-GROUND)
+ OBJECT (MANY HELD HAVE ;TAKE)
+ = V-SGIVE PRE-SGIVE>
+<SYNTAX GIVE OUT OBJECT (FIND RMUNGBIT) = V-FAINT>
+<SYNTAX GIVE UP OBJECT (FIND RMUNGBIT) = V-QUIT>
+
+"<VERB-SYNONYM GOODBYE GOOD-BYE BYE>
+;<SYNTAX GOODBYE = V-GOODBYE PRE-GOODBYE>
+<SYNTAX GOODBYE OBJECT (FIND RMUNGBIT) = V-GOODBYE PRE-GOODBYE>"
+
+<SYNTAX HANG ;UP OBJECT (HELD ;CARRIED MANY HAVE TAKE) IN OBJECT
+ = V-PUT-IN PRE-PUT-IN>
+
+;<SYNTAX HEAT OBJECT (HELD CARRIED ON-GROUND IN-ROOM TAKE HAVE)
+ WITH OBJECT ;(FIND FLAMEBIT) (HELD CARRIED TAKE HAVE)
+ = V-HEAT PRE-HEAT>
+
+<VERB-SYNONYM HELLO HI GREET GREETINGS ; HOWDY>
+;<SYNTAX HELLO = V-HELLO PRE-HELLO>
+<SYNTAX HELLO OBJECT (FIND RMUNGBIT) = V-HELLO PRE-HELLO>
+
+<SYNTAX HELP = V-HELP>
+<SYNTAX HELP OBJECT (FIND PERSONBIT) = V-HELP>
+
+<VERB-SYNONYM HIDE CONCEAL ;CROUCH>
+"<SYNTAX HIDE = V-HIDE>
+<SYNTAX HIDE BEHIND OBJECT = V-HIDE-BEHIND>"
+<SYNTAX HIDE IN OBJECT = V-THROUGH PRE-THROUGH>
+<SYNTAX HIDE ON OBJECT = V-THROUGH PRE-THROUGH>
+"<SYNTAX HIDE UNDER OBJECT = V-THROUGH PRE-THROUGH>"
+<SYNTAX HIDE OBJECT (HELD ;CARRIED MANY HAVE TAKE) UNDER OBJECT
+ = V-PUT-UNDER>
+<SYNTAX HIDE OBJECT (HELD ;CARRIED MANY HAVE TAKE) IN OBJECT
+ = V-PUT-IN PRE-PUT-IN>
+
+<SYNTAX HOLD OBJECT (FIND TAKEBIT) (ON-GROUND IN-ROOM MANY)
+ = V-TAKE PRE-TAKE>
+<SYNTAX HOLD OBJECT (IN-ROOM CARRIED TAKE HAVE) TO OBJECT = V-HOLD-UP>
+<SYNTAX HOLD OBJECT (IN-ROOM CARRIED TAKE HAVE) UP ;TO OBJECT = V-HOLD-UP>
+<SYNTAX HOLD UP OBJECT (IN-ROOM CARRIED TAKE HAVE) = V-HOLD-UP>
+
+<VERB-SYNONYM I INVENT>
+<SYNTAX I = V-INVENTORY>
+
+<VERB-SYNONYM JUMP LEAP>
+<SYNTAX JUMP = V-LEAP>
+<SYNTAX JUMP ACROSS OBJECT (ON-GROUND IN-ROOM) = V-LEAP>
+<SYNTAX JUMP FROM OBJECT (FIND RMUNGBIT) (ON-GROUND IN-ROOM) = V-DISEMBARK>
+<SYNTAX JUMP IN OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-BOARD ;V-LEAP>
+<SYNTAX JUMP OUT ;OF OBJECT (FIND RMUNGBIT) (ON-GROUND IN-ROOM) = V-DISEMBARK>
+<SYNTAX JUMP OFF OBJECT (FIND RMUNGBIT) (ON-GROUND IN-ROOM) = V-DISEMBARK>
+<SYNTAX JUMP OVER OBJECT (ON-GROUND IN-ROOM) = V-LEAP>
+
+<VERB-SYNONYM MURDER KILL STAB WASTE ;STRANGLE>
+<SYNTAX MURDER OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE ;TAKE)
+ = V-KILL>
+
+<VERB-SYNONYM CONSOLE KISS HUG COMFORT FLIRT>
+<SYNTAX CONSOLE OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM) = V-KISS>
+<SYNTAX CONSOLE WITH OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM) = V-KISS>
+
+<VERB-SYNONYM KNOCK RAP BANG>
+<SYNTAX KNOCK ON OBJECT = V-KNOCK>
+<SYNTAX KNOCK AT OBJECT = V-KNOCK>
+<SYNTAX KNOCK DOWN OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM) = V-ATTACK>
+<SYNTAX KNOCK OFF OBJECT (FIND PERSONBIT) (IN-ROOM ON-GROUND) = V-PUSH>
+<SYNTAX KNOCK OUT OBJECT (FIND PERSONBIT) (IN-ROOM ON-GROUND) = V-SLAP>
+<SYNTAX KNOCK OBJECT (IN-ROOM ON-GROUND MANY) OFF ;OF OBJECT (FIND RMUNGBIT)
+ = V-PUSH>
+<SYNTAX KNOCK OBJECT ;(FIND PERSONBIT) (IN-ROOM ON-GROUND) ON OBJECT = V-SLAP>
+
+<VERB-SYNONYM LEAVE EXIT ;" EMERGE ABANDON EVACUATE DEBARK DISEMBARK SCRAM">
+<SYNTAX LEAVE = V-LEAVE>
+<SYNTAX LEAVE OBJECT = V-LEAVE>
+<SYNTAX LEAVE FROM OBJECT = V-LEAVE>
+
+<SYNTAX LIE DOWN ;ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-LIE PRE-LIE>
+<SYNTAX LIE IN OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-LIE PRE-LIE>
+<SYNTAX LIE ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-LIE PRE-LIE>
+
+<SYNTAX LIGHT OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-LAMP-ON>
+;<SYNTAX LIGHT OBJECT (FIND LIGHTBIT)(HELD CARRIED ON-GROUND IN-ROOM TAKE HAVE)
+ WITH OBJECT ;(FIND FLAMEBIT) (HELD CARRIED TAKE HAVE)
+ = V-BURN PRE-BURN>
+
+<SYNTAX LISTEN TO OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-LISTEN PRE-LISTEN>
+
+;<SYNTAX LOAD OBJECT (HELD HAVE TAKE) WITH OBJECT (CARRIED HELD HAVE TAKE)
+ = V-SPUT-IN PRE-SPUT-IN>
+
+<SYNTAX LOCK OBJECT (ON-GROUND IN-ROOM) = V-LOCK>
+
+<VERB-SYNONYM PEEP LOOK L STARE GAZE PEEK PEER SEE ;REACH>
+<SYNTAX PEEP = V-LOOK>
+<SYNTAX PEEP OBJECT = V-CHASTISE>
+<SYNTAX PEEP AROUND OBJECT (FIND RMUNGBIT) = V-LOOK>
+<SYNTAX PEEP AT OBJECT ;(HELD CARRIED ON-GROUND IN-ROOM ;MANY)
+ = V-EXAMINE PRE-EXAMINE>
+"<SYNTAX PEEP AT OBJECT (HELD ;CARRIED MANY)
+ THROUGH OBJECT (ON-GROUND IN-ROOM HELD CARRIED HAVE TAKE)
+ = V-READ PRE-READ>
+;<SYNTAX PEEP AT OBJECT (HELD ;CARRIED MANY)
+ WITH OBJECT (ON-GROUND IN-ROOM HELD CARRIED HAVE TAKE)
+ = V-READ PRE-READ>"
+<SYNTAX PEEP BEHIND OBJECT = V-LOOK-BEHIND>
+<SYNTAX PEEP DOWN OBJECT (FIND RMUNGBIT) = V-LOOK-DOWN>
+<SYNTAX PEEP FOR OBJECT ;(MANY) = V-FIND PRE-FIND>
+<SYNTAX PEEP IN OBJECT (HELD CARRIED ON-GROUND IN-ROOM) (FIND RMUNGBIT)
+ = V-LOOK-INSIDE PRE-LOOK-INSIDE>
+<SYNTAX PEEP IN OBJECT (HELD CARRIED ON-GROUND IN-ROOM) FOR OBJECT
+ = V-SEARCH-FOR PRE-SEARCH-FOR>
+<SYNTAX PEEP ON OBJECT (ON-GROUND IN-ROOM) = V-LOOK-ON>
+<SYNTAX PEEP OUT OBJECT (FIND RMUNGBIT) = V-LOOK-OUTSIDE>
+<SYNTAX PEEP OVER OBJECT ;(HELD CARRIED ON-GROUND IN-ROOM)
+ = V-EXAMINE PRE-EXAMINE>
+<SYNTAX PEEP UNDER OBJECT = V-LOOK-UNDER PRE-LOOK-UNDER>
+<SYNTAX PEEP UP OBJECT (FIND RMUNGBIT) = V-LOOK-UP>
+<SYNTAX PEEP UP OBJECT IN OBJECT = V-LOOK-UP>
+<SYNTAX PEEP THROUGH OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-LOOK-THROUGH>
+
+<SYNTAX MEET OBJECT (ON-GROUND IN-ROOM) (FIND PERSONBIT) = V-MEET PRE-MEET>
+
+<SYNTAX MOVE OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+<SYNTAX MOVE OBJECT (ON-GROUND IN-ROOM) OBJECT = V-MOVE-DIR PRE-MOVE-DIR>
+
+<VERB-SYNONYM NO NOPE ;" NAY NEGATIVE N">
+<SYNTAX NO = V-NO>
+
+<SYNTAX NOD OBJECT (FIND RMUNGBIT) = V-NOD>
+<SYNTAX NOD AT OBJECT = V-HELLO PRE-HELLO>
+<SYNTAX NOD TO OBJECT = V-HELLO PRE-HELLO>
+
+<SYNTAX OPEN OBJECT ;(FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-OPEN>
+<SYNTAX OPEN UP OBJECT ;(FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-OPEN>
+<SYNTAX OPEN OBJECT ;(FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT ;(FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED HAVE TAKE)
+ = V-OPEN-WITH PRE-OPEN-WITH>
+
+<SYNTAX PICK OBJECT (FIND TAKEBIT) (ON-GROUND MANY)
+ = V-TAKE PRE-TAKE>
+;<SYNTAX PICK OBJECT ;(FIND TAKEBIT) (ON-GROUND MANY) WITH OBJECT
+ = V-TAKE-WITH PRE-TAKE-WITH>
+<SYNTAX PICK UP OBJECT (FIND TAKEBIT) (ON-GROUND MANY)
+ = V-TAKE PRE-TAKE>
+;<SYNTAX PICK UP OBJECT ;(FIND TAKEBIT) (ON-GROUND MANY) WITH OBJECT
+ = V-TAKE-WITH PRE-TAKE-WITH>
+
+<SYNTAX PLAY OBJECT = V-PLAY>
+<SYNTAX PLAY WITH OBJECT = V-PLAY>
+<SYNTAX PLAY OBJECT WITH OBJECT (FIND PERSONBIT) = V-PLAY>
+
+"<SYNTAX POCKET OBJECT (HELD CARRIED HAVE TAKE) = V-POCKET PRE-POCKET>"
+
+<VERB-SYNONYM POUR SPILL>
+<SYNTAX POUR OBJECT (HELD CARRIED HAVE TAKE) = V-POUR ;V-DROP>
+<SYNTAX POUR OBJECT (HELD CARRIED HAVE TAKE) FROM OBJECT = V-POUR ;V-DROP>
+<SYNTAX POUR OBJECT (HELD ;CARRIED ;MANY HAVE TAKE) IN OBJECT
+ = V-PUT-IN PRE-PUT-IN>
+<SYNTAX POUR OBJECT (HELD ;CARRIED ;MANY HAVE TAKE) ON OBJECT = V-PUT PRE-PUT>
+<SYNTAX POUR OBJECT(HELD ;CARRIED ;MANY HAVE TAKE) OVER OBJECT = V-PUT PRE-PUT>
+
+;<SYNTAX PRAY = V-PRAY>
+<SYNTAX PRAY FOR OBJECT (FIND RMUNGBIT) = V-PRAY>
+
+<VERB-SYNONYM PULL TUG>
+<SYNTAX PULL OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+<SYNTAX PULL OBJECT (ON-GROUND IN-ROOM) OBJECT = V-MOVE-DIR PRE-MOVE-DIR>
+<SYNTAX PULL OBJECT ;(FIND TAKEBIT) (CARRIED IN-ROOM MANY)
+ OFF OBJECT = V-TAKE PRE-TAKE>
+<SYNTAX PULL ON OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+
+<VERB-SYNONYM PUSH PRESS SHOVE>
+<SYNTAX PUSH OBJECT (IN-ROOM ON-GROUND ;MANY) = V-PUSH>
+<SYNTAX PUSH OBJECT (IN-ROOM ON-GROUND ;MANY) OBJECT
+ = V-MOVE-DIR PRE-MOVE-DIR>
+<SYNTAX PUSH OBJECT (HELD ;CARRIED MANY HAVE TAKE) IN OBJECT ;(FIND CONTBIT)
+ = V-PUT-IN PRE-PUT-IN>
+<SYNTAX PUSH OBJECT (IN-ROOM ON-GROUND MANY) OFF ;OF OBJECT (FIND RMUNGBIT)
+ = V-PUSH>
+<SYNTAX PUSH OBJECT (IN-ROOM ON-GROUND MANY) TO OBJECT
+ = V-MOVE-DIR PRE-MOVE-DIR>
+<SYNTAX PUSH OBJECT (HELD ;CARRIED MANY HAVE TAKE) UNDER OBJECT = V-PUT-UNDER>
+<SYNTAX PUSH ON OBJECT (IN-ROOM ON-GROUND MANY) = V-PUSH>
+
+<VERB-SYNONYM PLACE PUT LAY INSERT SET ;" INSTALL DEPOSIT DIP STUFF">
+<SYNTAX PLACE OBJECT (HELD ;CARRIED MANY HAVE TAKE)
+ ON OBJECT (FIND SURFACEBIT)
+ = V-PUT PRE-PUT>
+<SYNTAX PLACE OBJECT (HELD ;CARRIED MANY HAVE TAKE)
+ DOWN ;ON OBJECT (FIND SURFACEBIT)
+ = V-PUT PRE-PUT>
+<SYNTAX PLACE OBJECT (HELD ;CARRIED MANY HAVE TAKE) IN OBJECT ;(FIND CONTBIT)
+ = V-PUT-IN PRE-PUT-IN>
+<SYNTAX PLACE OBJECT (HELD MANY HAVE TAKE) THROUGH OBJECT (ON-GROUND IN-ROOM)
+ = V-THROW-THROUGH PRE-THROW-THROUGH>
+<SYNTAX PLACE OBJECT (HELD ;CARRIED MANY HAVE TAKE) UNDER OBJECT
+ = V-PUT-UNDER>
+<SYNTAX PLACE AWAY OBJECT (HELD ;CARRIED MANY HAVE TAKE) IN OBJECT
+ = V-PUT-IN PRE-PUT-IN>
+<SYNTAX PLACE DOWN OBJECT (HELD MANY HAVE TAKE) = V-DROP>
+<SYNTAX PLACE IN OBJECT (FIND WEARBIT) (HAVE TAKE) = V-WEAR> "PUT IN LENS"
+<SYNTAX PLACE ON OBJECT (FIND WEARBIT) (HAVE TAKE) = V-WEAR> "PUT ON OBJ"
+
+<VERB-SYNONYM QUIT Q LOGOUT LOGOFF>
+<SYNTAX QUIT = V-QUIT>
+
+<VERB-SYNONYM READ SKIM ;PERUSE> ;"Must TAKE HISTORY BOOK explicitly."
+<SYNTAX READ OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM ;TAKE HAVE)
+ = V-READ PRE-READ>
+<SYNTAX READ OBJECT ;(FIND PERSONBIT)
+ OBJECT ;(FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM ;TAKE HAVE)
+ = V-SREAD PRE-SREAD>
+<SYNTAX READ OBJECT ;(FIND READBIT)(HELD CARRIED ON-GROUND IN-ROOM ;TAKE HAVE)
+ TO OBJECT ;(FIND PERSONBIT)
+ = V-READ PRE-READ>
+<SYNTAX READ ABOUT OBJECT
+ IN OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM ;TAKE HAVE)
+ = V-LOOK-UP>
+
+<VERB-SYNONYM REMOVE DOFF ;SHED>
+<SYNTAX REMOVE OBJECT (FIND WORNBIT) = V-REMOVE>
+<SYNTAX REMOVE OBJECT ;(FIND TAKEBIT) (IN-ROOM CARRIED MANY)
+ FROM OBJECT = V-TAKE PRE-TAKE>
+
+<SYNTAX REQUEST OBJECT = V-ASK-CONTEXT-FOR PRE-ASK-CONTEXT-FOR>
+
+<SYNTAX RESTART = V-RESTART>
+
+<VERB-SYNONYM RESTORE ;CONTINUE RESUME>
+<SYNTAX RESTORE = V-RESTORE>
+
+
+<VERB-SYNONYM RING ;PEAL BLOW BLAST HONK TOOT BEEP>
+<SYNTAX RING OBJECT ;(FIND RMUNGBIT) = V-RING>
+<SYNTAX RING ON OBJECT = V-RING>
+<SYNTAX RING OBJECT (HELD CARRIED HAVE TAKE) AT OBJECT
+ = V-SSHOOT PRE-SSHOOT> "BLOW BLOWGUN AT person"
+<SYNTAX RING OBJECT WITH OBJECT = V-RING>
+
+"<VERB-SYNONYM RIP TEAR>
+<SYNTAX RIP OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ = V-RIP>
+<SYNTAX RIP UP OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ = V-RIP>"
+
+"<VERB-SYNONYM RISE ASCEND>
+<SYNTAX RISE = V-RISE>
+<SYNTAX RISE OBJECT = V-CLIMB-UP>
+<SYNTAX RISE WITH ;BY OBJECT = V-CLIMB-UP>
+<SYNTAX RISE TO OBJECT = V-RISE>"
+
+<VERB-SYNONYM RUB TOUCH FEEL ;" PAT PET SHADE">
+<SYNTAX RUB OBJECT = V-RUB>
+<SYNTAX RUB OBJECT WITH OBJECT (TAKE HAVE) = V-RUB>
+
+<SYNTAX SAVE = V-SAVE>
+<SYNTAX SAVE OBJECT ;(FIND PERSONBIT) = V-HELP>
+
+<VERB-SYNONYM SAY TALK SPEAK WHISPER STATE CHAT GAB>
+<SYNTAX SAY = V-SAY>
+<SYNTAX SAY ABOUT OBJECT = V-TALK-ABOUT PRE-TALK-ABOUT>
+<SYNTAX SAY TO OBJECT (IN-ROOM) = V-TELL PRE-ASK-ABOUT>
+<SYNTAX SAY TO OBJECT (IN-ROOM) ABOUT OBJECT
+ = V-TELL-ABOUT PRE-TELL-ABOUT>
+<SYNTAX SAY WITH OBJECT (IN-ROOM) = V-TELL PRE-ASK-ABOUT>
+<SYNTAX SAY WITH OBJECT (IN-ROOM) ABOUT OBJECT
+ = V-ASK-ABOUT PRE-ASK-ABOUT>
+
+<SYNTAX SCORE = V-SCORE>
+
+<SYNTAX SCRIPT = V-SCRIPT>
+
+<VERB-SYNONYM SEARCH DIG>
+<SYNTAX SEARCH OBJECT = V-SEARCH PRE-SEARCH>
+<SYNTAX SEARCH OBJECT FOR OBJECT ;(HELD CARRIED HAVE)
+ = V-SEARCH-FOR PRE-SEARCH-FOR>
+<SYNTAX SEARCH FOR OBJECT ;(MANY) = V-FIND PRE-FIND>
+<SYNTAX SEARCH IN OBJECT = V-SEARCH PRE-SEARCH>
+<SYNTAX SEARCH UNDER OBJECT = V-LOOK-UNDER PRE-LOOK-UNDER>
+<SYNTAX SEARCH UP OBJECT = V-SEARCH PRE-SEARCH>
+
+"<SYNTAX SEND OBJECT = V-SEND>
+;<SYNTAX SEND FOR OBJECT = V-SEND-FOR>
+<SYNTAX SEND OUT OBJECT = V-SEND-OUT>
+<SYNTAX SEND OBJECT OBJECT = V-SSEND PRE-SSEND>
+<SYNTAX SEND OBJECT TO OBJECT = V-SEND-TO PRE-SEND-TO>"
+
+;<SYNTAX SET OBJECT (HELD ;CARRIED MANY HAVE TAKE) ON OBJECT (FIND RMUNGBIT)
+ = V-PUT PRE-PUT>
+
+<VERB-SYNONYM SHAKE RATTLE>
+<SYNTAX SHAKE OBJECT = V-SHAKE>
+<SYNTAX SHAKE OBJECT WITH OBJECT (FIND PERSONBIT) = V-SHAKE> ;"SHAKE HANDS"
+
+<VERB-SYNONYM FIRE SHOOT SPRAY>
+<SYNTAX FIRE OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ = V-SHOOT>
+<SYNTAX FIRE AT OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ = V-SHOOT>
+<SYNTAX FIRE OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ WITH OBJECT ;(FIND WEAPONBIT) (HELD CARRIED HAVE ;TAKE)
+ = V-SHOOT>
+<SYNTAX FIRE OBJECT ;(FIND WEAPONBIT) (HELD CARRIED HAVE ;TAKE)
+ AT OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ = V-SSHOOT PRE-SSHOOT>
+<SYNTAX FIRE OBJECT ;(FIND WEAPONBIT) (HELD CARRIED HAVE ;TAKE)
+ ON OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ = V-SSHOOT PRE-SSHOOT>
+
+<VERB-SYNONYM SHOW DISPLAY>
+<SYNTAX SHOW OBJECT ;(TAKE HAVE HELD CARRIED)
+ = V-SSHOW PRE-SSHOW>
+<SYNTAX SHOW OBJECT ;(TAKE HAVE HELD CARRIED) TO OBJECT ;(FIND PERSONBIT)
+ = V-SSHOW PRE-SSHOW>
+<SYNTAX SHARE OBJECT ;(TAKE HAVE HELD CARRIED)
+ = V-SSHOW PRE-SSHOW>
+<SYNTAX SHARE OBJECT ;(TAKE HAVE HELD CARRIED) WITH OBJECT (FIND PERSONBIT)
+ = V-SSHOW PRE-SSHOW>
+<SYNTAX SHOW OBJECT ;(FIND PERSONBIT) OBJECT ;(TAKE HAVE HELD CARRIED)
+ = V-SHOW ;PRE-SHOW>
+
+<SYNTAX SHUT OBJECT ;(FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-CLOSE>
+<SYNTAX SHUT OBJECT ;(FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT
+ = V-CLOSE>
+<SYNTAX SHUT OFF OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-LAMP-OFF>
+;<SYNTAX SHUT OFF OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT
+ = V-LAMP-OFF>
+
+<SYNTAX SIGN OBJECT (TAKE HAVE HELD CARRIED) = V-SIGN>
+
+<VERB-SYNONYM SIT ;" CROUCH HUNKER SQUAT STOOP">
+<SYNTAX SIT ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-SIT PRE-SIT>
+<SYNTAX SIT AT OBJECT (ON-GROUND IN-ROOM) = V-SIT-AT>
+<SYNTAX SIT BESIDE OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM) = V-SIT-AT>
+<SYNTAX SIT DOWN ;ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-SIT PRE-SIT>
+<SYNTAX SIT IN OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-SIT PRE-SIT>
+
+<VERB-SYNONYM PUNCH SLAP HIT KICK ;" HURT INJURE STRIKE BITE BEAT">
+<SYNTAX PUNCH OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM) = V-SLAP>
+<SYNTAX PUNCH OBJECT (ON-GROUND IN-ROOM) AROUND OBJECT (FIND RMUNGBIT)= V-SLAP>
+<SYNTAX PUNCH OBJECT (ON-GROUND IN-ROOM)
+ WITH OBJECT (HELD CARRIED ON-GROUND IN-ROOM HAVE TAKE) = V-SLAP>
+
+;<SYNTAX SLIDE OBJECT = V-SLIDE>
+<SYNTAX SLIDE OBJECT (HELD ;CARRIED MANY HAVE TAKE) UNDER OBJECT
+ = V-PUT-UNDER>
+<SYNTAX SLIDE OBJECT (HELD ;CARRIED MANY HAVE TAKE) IN OBJECT
+ = V-PUT-IN PRE-PUT-IN>
+
+<VERB-SYNONYM SMELL SNIFF>
+<SYNTAX SMELL OBJECT = V-SMELL>
+
+<VERB-SYNONYM SMILE GRIN WINK>
+<SYNTAX SMILE AT OBJECT (FIND PERSONBIT) = V-SMILE>
+
+;<SYNTAX SMOKE OBJECT (HELD CARRIED TAKE HAVE) = V-SMOKE>
+
+<VERB-SYNONYM SORRY APOLOGIZE>
+<SYNTAX SORRY OBJECT ;(MANY) (FIND RMUNGBIT) = V-SORRY PRE-HELLO>
+<SYNTAX SORRY TO OBJECT ;(MANY) (FIND RMUNGBIT) = V-SORRY PRE-HELLO>
+
+<SYNTAX SOUND OBJECT = V-RING>
+<SYNTAX SOUND OBJECT ON OBJECT = V-SOUND>
+
+<SYNTAX STAND = V-STAND>
+<SYNTAX STAND ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
+<SYNTAX STAND UP OBJECT (FIND RMUNGBIT) = V-STAND>
+
+<VERB-SYNONYM START ;" ACTIVATE ENGAGE">
+<SYNTAX START OBJECT (HELD CARRIED ON-GROUND IN-ROOM) = V-LAMP-ON>
+<SYNTAX START OVER OBJECT (FIND RMUNGBIT) = V-RESTART>
+
+<VERB-SYNONYM STOP PARK>
+<SYNTAX STOP OBJECT (FIND RMUNGBIT) = V-STOP>
+
+<SYNTAX SUPERBRIEF = V-SUPER-BRIEF>
+
+<VERB-SYNONYM SWIM WADE BATHE>
+"<SYNTAX SWIM = V-SWIM>"
+<SYNTAX SWIM IN OBJECT = V-SWIM>
+
+<VERB-SYNONYM TAKE CARRY STEAL SEIZE GRAB ;CONFISCATE PRY RAISE LIFT>
+<SYNTAX TAKE OBJECT (FIND TAKEBIT) (ON-GROUND IN-ROOM MANY)
+ = V-TAKE PRE-TAKE>
+<SYNTAX TAKE OBJECT ;(FIND TAKEBIT) (ON-GROUND IN-ROOM MANY)
+ FROM OBJECT = V-TAKE PRE-TAKE>
+<SYNTAX TAKE OBJECT ;(FIND TAKEBIT) (ON-GROUND IN-ROOM MANY)
+ IN OBJECT = V-TAKE PRE-TAKE>
+<SYNTAX TAKE OBJECT ;(FIND TAKEBIT) (ON-GROUND IN-ROOM MANY)
+ OFF OBJECT = V-TAKE PRE-TAKE>
+<SYNTAX TAKE OBJECT ;(FIND TAKEBIT) (ON-GROUND IN-ROOM MANY)
+ ON OBJECT = V-TAKE PRE-TAKE>
+<SYNTAX TAKE OBJECT ;(FIND TAKEBIT) (ON-GROUND IN-ROOM MANY)
+ OUT ;OF OBJECT ;(FIND CONTBIT) = V-TAKE PRE-TAKE>
+<SYNTAX TAKE OBJECT ;(FIND TAKEBIT) (MANY TAKE) TO OBJECT = V-TAKE-TO>
+<SYNTAX TAKE OBJECT (IN-ROOM CARRIED TAKE HAVE) UP ;TO OBJECT = V-HOLD-UP>
+;<SYNTAX TAKE OBJECT ;(FIND TAKEBIT) (ON-GROUND MANY)
+ WITH OBJECT = V-TAKE-WITH PRE-TAKE-WITH>
+<SYNTAX TAKE OFF OBJECT (FIND WORNBIT) ;(HAVE) = V-TAKE-OFF>
+<SYNTAX TAKE OUT OBJECT ;(FIND TAKEBIT) (CARRIED IN-ROOM MANY)
+ = V-TAKE PRE-TAKE>
+<SYNTAX TAKE UP OBJECT (FIND TAKEBIT) (ON-GROUND IN-ROOM MANY)
+ = V-TAKE PRE-TAKE>
+
+<SYNTAX TELL OBJECT (FIND PERSONBIT) (IN-ROOM) = V-TELL PRE-ASK-ABOUT>
+<SYNTAX TELL OBJECT (IN-ROOM) OBJECT = V-TELL-ABOUT PRE-TELL-ABOUT>
+<SYNTAX TELL ABOUT OBJECT ;(MANY) = V-TALK-ABOUT PRE-TALK-ABOUT>
+<SYNTAX TELL OBJECT (IN-ROOM) ABOUT OBJECT ;(MANY)
+ = V-TELL-ABOUT PRE-TELL-ABOUT>
+
+<VERB-SYNONYM THANKS THANK>
+<SYNTAX THANKS = V-THANKS>
+<SYNTAX THANKS OBJECT = V-THANKS>
+
+<VERB-SYNONYM THROW ;HURL ;CHUCK TOSS>
+<SYNTAX THROW AWAY OBJECT (HELD CARRIED HAVE) = V-DROP>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE TAKE)
+ AGAINST OBJECT (ON-GROUND IN-ROOM)
+ = V-THROW-AT>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE TAKE)
+ AT OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ = V-THROW-AT>
+<SYNTAX THROW OBJECT (HELD ;CARRIED MANY HAVE TAKE) IN OBJECT
+ = V-PUT-IN PRE-PUT-IN>
+<SYNTAX THROW OBJECT (HELD ;CARRIED MANY HAVE TAKE)
+ ON OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-PUT PRE-PUT>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE TAKE)
+ OUT ;OF OBJECT (ON-GROUND IN-ROOM)
+ = V-THROW-THROUGH PRE-THROW-THROUGH>
+<SYNTAX THROW OBJECT (HELD ;CARRIED MANY HAVE TAKE)
+ OVER OBJECT (ON-GROUND IN-ROOM)
+ = V-PUT PRE-PUT>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE TAKE)
+ THROUGH OBJECT (ON-GROUND IN-ROOM)
+ = V-THROW-THROUGH PRE-THROW-THROUGH>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE TAKE)
+ TO OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ = V-THROW-AT>
+
+"<VERB-SYNONYM TIE FASTEN SECURE ATTACH>
+<SYNTAX TIE OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ TO OBJECT ;(FIND FURNITURE) (ON-GROUND IN-ROOM)
+ = V-TIE-TO PRE-TIE-TO>
+<SYNTAX TIE UP OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ TO OBJECT ;(FIND FURNITURE) (ON-GROUND IN-ROOM)
+ = V-TIE-TO PRE-TIE-TO>
+<SYNTAX TIE OBJECT ;(FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED HAVE TAKE)
+ = V-TIE-WITH PRE-TIE-WITH>
+<SYNTAX TIE UP OBJECT ;(FIND PERSONBIT) (ON-GROUND IN-ROOM)
+ WITH OBJECT (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED HAVE TAKE)
+ = V-TIE-WITH PRE-TIE-WITH>"
+
+<VERB-SYNONYM TIME ;T>
+<SYNTAX TIME = V-TIME>
+
+<SYNTAX TRY ON OBJECT (FIND WEARBIT) (HAVE TAKE) = V-WEAR>
+
+<VERB-SYNONYM SWITCH TURN FLIP SWING>
+<SYNTAX SWITCH OBJECT (HELD CARRIED ON-GROUND IN-ROOM) = V-TURN>
+"<SYNTAX SWITCH OBJECT IN ;FOR OBJECT (FIND RMUNGBIT) = V-ARREST PRE-ARREST>"
+<SYNTAX SWITCH OFF OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-LAMP-OFF>
+;<SYNTAX SWITCH OFF OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT
+ = V-LAMP-OFF>
+<SYNTAX SWITCH ON OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-LAMP-ON>
+;<SYNTAX SWITCH ON OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ WITH OBJECT
+ = V-LAMP-ON>
+;<SYNTAX SWITCH TO OBJECT (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-TURN>
+<SYNTAX SWITCH OBJECT TO OBJECT = V-AIM ;PRE-AIM>
+
+<VERB-SYNONYM UNDRESS UNMASK STRIP>
+<SYNTAX UNDRESS OBJECT (FIND RMUNGBIT) = V-UNDRESS>
+
+<SYNTAX UNLOCK OBJECT (ON-GROUND IN-ROOM) = V-UNLOCK>
+<SYNTAX UNLOCK OBJECT (ON-GROUND IN-ROOM) WITH OBJECT = V-UNLOCK>
+
+<SYNTAX UNSCRIPT = V-UNSCRIPT>
+
+"<VERB-SYNONYM UNTIE FREE UNFASTEN UNATTACH UNHOOK UNCUFF>
+<SYNTAX UNTIE OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ = V-UNTIE>
+<SYNTAX UNTIE OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ FROM OBJECT
+ = V-UNTIE>"
+
+<SYNTAX USE OBJECT = V-USE>
+<SYNTAX USE OBJECT AGAINST OBJECT = V-USE>
+<SYNTAX USE OBJECT ON OBJECT = V-USE>
+
+<SYNTAX VERBOSE = V-VERBOSE>
+
+<VERB-SYNONYM RELEASE REVISION VERSION ;EDITION VARIATION>
+<SYNTAX RELEASE = V-VERSION>
+;<SYNTAX RELEASE OBJECT = V-UNTIE>
+
+<VERB-SYNONYM WAIT Z STAY MEDITATE RELAX REST PAUSE>
+"<SYNTAX WAIT = V-WAIT>"
+<SYNTAX WAIT OBJECT (FIND RMUNGBIT) = V-WAIT-FOR>
+<SYNTAX WAIT FOR OBJECT (FIND RMUNGBIT) = V-WAIT-FOR>
+<SYNTAX WAIT UNTIL OBJECT = V-WAIT-UNTIL>
+
+<VERB-SYNONYM WAKE AWAKE SURPRISE STARTLE>
+<SYNTAX WAKE OBJECT (FIND PERSONBIT) (ON-GROUND IN-ROOM) = V-ALARM>
+<SYNTAX WAKE UP OBJECT (FIND RMUNGBIT ;PERSONBIT) (ON-GROUND IN-ROOM)
+ = V-ALARM>
+
+<VERB-SYNONYM HEAD WALK GO COME RUN PROCEED STEER DRIVE RETURN STEP>
+<SYNTAX HEAD OBJECT = V-WALK>
+<SYNTAX HEAD AFTER OBJECT = V-FOLLOW>
+<SYNTAX HEAD AROUND OBJECT = V-WALK-AROUND>
+<SYNTAX HEAD AWAY ;FROM OBJECT (FIND RMUNGBIT) = V-LEAVE>
+<SYNTAX HEAD BEHIND OBJECT = V-THROUGH PRE-THROUGH>
+<SYNTAX HEAD DOWN OBJECT ;(ON-GROUND IN-ROOM) = V-CLIMB-DOWN>
+<SYNTAX HEAD IN OBJECT = V-THROUGH PRE-THROUGH>
+<SYNTAX HEAD OFF ;TO OBJECT = V-WALK-TO>
+<SYNTAX HEAD OUT ;OF OBJECT = V-LEAVE>
+<SYNTAX HEAD THROUGH OBJECT = V-THROUGH PRE-THROUGH>
+<SYNTAX HEAD TO OBJECT = V-WALK-TO>
+"<SYNTAX HEAD UNDER OBJECT = V-WALK-UNDER>"
+<SYNTAX HEAD UP OBJECT ;(ON-GROUND IN-ROOM) = V-CLIMB-UP>
+<SYNTAX HEAD WITH OBJECT = V-FOLLOW>
+<SYNTAX HEAD OBJECT OBJECT = V-DRIVE-TO PRE-DRIVE-TO>
+<SYNTAX HEAD OBJECT OVER OBJECT = V-RUN-OVER>
+<SYNTAX HEAD OBJECT THROUGH OBJECT = V-THROUGH PRE-THROUGH>
+<SYNTAX HEAD OBJECT TO OBJECT = V-DRIVE-TO PRE-DRIVE-TO>
+
+<SYNTAX WATCH OBJECT = V-EXAMINE>
+
+<VERB-SYNONYM WEAR DON>
+<SYNTAX WEAR OBJECT (FIND WEARBIT) (HAVE TAKE) = V-WEAR>
+
+"<VERB-SYNONYM WIND COCK ADVANCE>
+<SYNTAX WIND OBJECT (TAKE HAVE HELD CARRIED) = V-WIND>"
+
+;<VERB-SYNONYM NAME IDENTITY>
+"<SYNTAX NAME OBJECT ;(HELD CARRIED HAVE) = V-WHAT>"
+
+<SYNTAX WRITE OBJECT (TAKE HAVE HELD CARRIED) = V-SIGN>
+<SYNTAX WRITE ON OBJECT (TAKE HAVE HELD CARRIED) = V-SIGN>
+
+<VERB-SYNONYM YELL SCREAM SHOUT>
+<SYNTAX YELL = V-YELL>
+<SYNTAX YELL AT OBJECT (ON-GROUND IN-ROOM) = V-TELL PRE-ASK-ABOUT>
+"<SYNTAX YELL FOR OBJECT = V-YELL-FOR>"
+<SYNTAX YELL IN OBJECT = V-YELL>
+<SYNTAX YELL TO OBJECT (ON-GROUND IN-ROOM) = V-TELL PRE-ASK-ABOUT>
+
+<VERB-SYNONYM YES Y OK OKAY SURE YUP YEP YEAH AYE INDEED>
+<SYNTAX YES = V-YES>
diff --git a/verbs.zil b/verbs.zil
new file mode 100644
index 0000000..39a8950
--- /dev/null
+++ b/verbs.zil
@@ -0,0 +1,4475 @@
+"VERBS for MOONMIST
+Copyright (C) 1986 Infocom, Inc. All rights reserved."
+
+<ROUTINE TRANSCRIPT (STR)
+ <TELL "Here " .STR "s a transcript of interaction with" CR>>
+
+<ROUTINE V-SCRIPT ()
+ <PUT 0 8 <BOR <GET 0 8> 1>>
+ <TRANSCRIPT "begin">
+ <V-VERSION>
+ <RTRUE>>
+
+<ROUTINE V-UNSCRIPT ()
+ <TRANSCRIPT "end">
+ <V-VERSION>
+ <PUT 0 8 <BAND <GET 0 8> -2>>
+ <RTRUE>>
+
+<ROUTINE V-$VERIFY ()
+ <COND (<T? ,PRSO>
+ <COND (<AND <EQUAL? ,PRSO ,INTNUM>
+ <EQUAL? ,P-NUMBER 105>>
+ <TELL N ,SERIAL CR>)
+ (T <DONT-UNDERSTAND>)>)
+ (T
+ <TELL "Verifying disk..." CR>
+ <COND (<VERIFY> <TELL "The disk is correct." CR>)
+ (T <TELL
+"Oh, oh! The disk seems to have a defect. Try verifying again. (If
+you've already done that, the disk surely has a defect.)" CR>)>)>>
+
+<GLOBAL VARIATION:NUMBER 0>
+
+%<DEBUG-CODE [
+<ROUTINE V-$CHEAT ("AUX" (N 0) CH)
+ <COND (<OR <NOT <DOBJ? INTNUM>>
+ <NOT <EQUAL? ,P-NUMBER 1 2 3>>>
+ <SETG CLOCK-WAIT T>
+ <TELL "{Try $CHEAT 1, 2 or 3.}" CR>
+ <RTRUE>)>
+ <COND (<NOT <EQUAL? ,PRESENT-TIME %,PRESENT-TIME-ATOM>>
+ <TELL "Don't you want to restart first?">
+ <COND (<YES?> <RESTART>)
+ (T <TELL "Okay, but this may not work!" CR>)>)>
+ <COND (<ZERO? <GETB ,LAST-NAME 0>>
+ <REPEAT ()
+ <COND (<IGRTR? N 8> <RETURN>)
+ (<ZERO? <SET CH <GETB 0 <+ .N 55>>>> <RETURN>)
+ (T <PUTB ,FIRST-NAME .N <+ .CH *40*>>)>>
+ <COND (<1? .N> <SET N 2>)>
+ <PUTB ,FIRST-NAME 0 <- .N 1>>
+ <PUTB ,LAST-NAME 0 6>
+ ;<TELL "Full name? ">
+ ;<GET-NAME>
+ <TELL "Favorite color? ">
+ <GET-COLOR>
+ <TELL CR>)>
+ <FSET ,DRIVEWAY ,TOUCHBIT>
+ <FSET ,FRONT-GATE ,LOCKED>
+ <QUEUE I-DRAGON-EYE 0>
+ <COND (<EQUAL? ,P-NUMBER 1>
+ <GATE-OPENS>
+ <GOTO ,COURTYARD>)
+ (<EQUAL? ,P-NUMBER 2 3>
+ <QUEUE I-FRIEND-GREETS 0>
+ <SET N ,CHARACTER-MAX>
+ <REPEAT ()
+ <SET CH <GET ,CHARACTER-TABLE .N>>
+ <FSET .CH ,TOUCHBIT>
+ <FCLEAR .CH ,NDESCBIT>
+ <COND (<DLESS? N 1> <RETURN>)>>
+ <PUT <GT-O ,BUTLER> ,GOAL-ENABLE 0>
+ <MOVE ,LUGGAGE ,BED>
+ <MOVE ,BUTLER ,YOUR-ROOM>
+ <COND (<EQUAL? ,P-NUMBER 2>
+ ;<SETG BUTLER-HINTS-COUNTER 1>
+ <QUEUE I-BUTLER-HINTS 2 ;-1>
+ <QUEUE I-BUTLER-COOKS 9>
+ <FCLEAR ,BUTLER ,NDESCBIT>
+ <GOTO ,YOUR-ROOM>)
+ (T
+ ;<QUEUE I-PRE-DINNER 0>
+ <QUEUE I-DINNER 0>
+ <SETG SCORE 0>
+ <SETG PRESENT-TIME ,BED-TIME>
+ <QUEUE I-BEDTIME 1>
+ <MOVE ,BUTLER ,LOCAL-GLOBALS>
+ <MOVE ,LAMP ,PLAYER>
+ <MOVE ,MACE ,PLAYER>
+ <FCLEAR ,MACE ,NDESCBIT>
+ <GOTO ,GREAT-HALL>)>)>>
+
+<ROUTINE V-$GENDER ()
+ <TELL "{Your gender is ">
+ <COND (<OR <NOT <DOBJ? INTNUM>>
+ <NOT <EQUAL? ,P-NUMBER 1 2 3>>>
+ <COND (<ZERO? ,GENDER-KNOWN> <TELL "neuter">)
+ (<FSET? ,PLAYER ,FEMALE> <TELL "female">)
+ (T <TELL "male">)>)
+ (T
+ <TELL "now ">
+ <COND (<EQUAL? ,P-NUMBER 1>
+ <SETG GENDER-KNOWN T>
+ <FSET ,PLAYER ,FEMALE>
+ <TELL "female (1)">)
+ (<EQUAL? ,P-NUMBER 2>
+ <SETG GENDER-KNOWN T>
+ <FCLEAR ,PLAYER ,FEMALE>
+ <TELL "male (2)">)
+ (T
+ <SETG GENDER-KNOWN <>>
+ <TELL "neuter (3)">)>)>
+ <TELL ".}" CR>>
+
+<GLOBAL IDEBUG:FLAG <>>
+<ROUTINE V-$GOAL ("AUX" (CNT 0) O L C S)
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,GHOST-NEW-C ;,CHARACTER-MAX>
+ <RETURN>)>
+ <SET C <GET ,CHARACTER-TABLE .CNT>>
+ <SET O <GET ,GOAL-TABLES .CNT>>
+ <SET S <GET .O ,GOAL-S>>
+ <COND (<AND <SET L <LOC .C>> <NOT <ZERO? .S>>>
+ <TELL D .C " (in " D .L "): " D .S>
+ <SET L <GET .O ,GOAL-F>>
+ <COND (<NOT <EQUAL? .S .L>>
+ <TELL " F:" D .L>)>
+ <SET L <GET .O ,GOAL-I>>
+ <COND (<NOT <ZERO? .L>>
+ <SET L <GET ,TRANSFER-TABLE .L>>
+ <COND (<ZERO? .L> <TELL " I:0">)
+ (T
+ <TELL " I:" D .L>)>)>
+ <COND (<ZERO? <GET .O ,GOAL-ENABLE>>
+ <TELL " (DISABLED)">)>
+ <PRINTC 32>
+ <APPLY <GET .O ,GOAL-FUNCTION> ,G-DEBUG>
+ <CRLF>)>>>
+
+<ROUTINE V-$QUEUE ("AUX" C E TICK)
+ <SET C <REST ,C-TABLE ,C-INTS>>
+ <SET E <REST ,C-TABLE ,C-TABLELEN>>
+ <REPEAT ()
+ <COND (<==? .C .E> <RETURN>)
+ (<AND <NOT <ZERO? <GET .C ,C-ENABLED?>>>
+ <NOT <ZERO? <SET TICK <GET .C ,C-TICK>>>>>
+ <APPLY <GET .C ,C-RTN> ,G-DEBUG>
+ <PRINTC 9>
+ <TELL N .TICK CR>)>
+ <SET C <REST .C ,C-INTLEN>>>>
+
+<ROUTINE V-$VARIATION ()
+ <SETG CLOCK-WAIT T>
+ <COND (<AND <EQUAL? ,PRSO ,INTNUM>
+ <L? ,P-NUMBER 5>
+ <G? ,P-NUMBER 0>>
+ <SETG VARIATION ,P-NUMBER>
+ <DO-VARIATION>
+ <PRINTB <GET ,COLOR-WORDS ,VARIATION>>
+ <TELL " variation" CR>)
+ (<EQUAL? ,PRSO ,ROOMS>
+ <PRINTB <GET ,COLOR-WORDS ,VARIATION>>
+ <TELL " variation" CR>)
+ (T
+ <TELL "Wrong object!" CR>)>>
+
+<ROUTINE V-$COMMAND ()
+ <DIRIN 1>
+ <RTRUE>>
+
+<ROUTINE V-$RANDOM ()
+ <COND (<NOT <DOBJ? INTNUM>>
+ <TELL "Illegal." CR>)
+ (T
+ <RANDOM <- 0 ,P-NUMBER>>
+ <RTRUE>)>>
+
+<CONSTANT D-RECORD-ON 4>
+<CONSTANT D-RECORD-OFF -4>
+
+<ROUTINE V-$RECORD ()
+ <DIROUT ,D-RECORD-ON> ;"all READS and INPUTS get sent to command file"
+ <RTRUE>>
+
+<ROUTINE V-$UNRECORD ()
+ <DIROUT ,D-RECORD-OFF>
+ <RTRUE>>
+
+<GLOBAL DBUG:FLAG <>>
+<ROUTINE V-DEBUG ()
+ %<DEBUG-CODE <COND (<T? ,PRSO>
+ <SETG IDEBUG <NOT ,IDEBUG>>
+ <TELL !\{ N ,IDEBUG "}" CR>
+ <RTRUE>)>>
+ <COND (<SETG DBUG <NOT ,DBUG>>
+ <TELL "Find them bugs, boss!" CR>)
+ (T <TELL "No bugs left, eh?" CR>)>>
+]>
+
+;<ROUTINE V-$WHERE ("AUX" (CNT 0) O L MSG)
+ <COND ;(<ZERO? ,DBUG>
+ <SET MSG <PICK-ONE ,UNKNOWN-MSGS>>
+ <TELL <GET .MSG 0> "#wher" <GET .MSG 1> CR>)
+ (<T? ,PRSI>
+ <COND (<==? ,PRSI ,PLAYER>
+ <FSET ,PRSO ,TOUCHBIT>
+ <FCLEAR ,PRSO ,NDESCBIT>
+ <FCLEAR ,PRSO ,INVISIBLE>)>
+ <MOVE ,PRSO ,PRSI>)
+ (<T? ,PRSO>
+ <TELL-$WHERE ,PRSO>)
+ (T
+ <REPEAT ()
+ <COND (<SET O <GET ,CHARACTER-TABLE .CNT>>
+ ;<SET L <LOC .O>>
+ <TELL-$WHERE .O>)>
+ <COND (<G? <SET CNT <+ .CNT 1>> ,GHOST-NEW-C ;,CHARACTER-MAX>
+ <RETURN>)>>)>>
+
+;<ROUTINE TELL-$WHERE (O "OPTIONAL" (L 0))
+ <TELL D .O " is ">
+ <COND (<ZERO? .L> <SET L <LOC .O>>)>
+ <COND (.L
+ <TELL "in">
+ <TELL THE .L>
+ <TELL "." CR>)
+ (T <TELL "nowhere." CR>)>>
+
+"ZORK game commands"
+
+"SUBTITLE SETTINGS FOR VARIOUS LEVELS OF DESCRIPTION"
+
+<GLOBAL VERBOSITY:NUMBER 1> "0=SUPERB 1=BRIEF 2=VERBOS"
+
+<ROUTINE YOU-WILL-GET (STR)
+ <TELL "[Okay, you will get " .STR " descriptions.]" CR>>
+
+<ROUTINE V-SUPER-BRIEF ()
+ <SETG VERBOSITY 0>
+ <YOU-WILL-GET "superbrief">>
+
+<ROUTINE V-BRIEF ()
+ <SETG VERBOSITY 1>
+ <YOU-WILL-GET "brief">>
+
+<ROUTINE V-VERBOSE ()
+ <SETG VERBOSITY 2>
+ <YOU-WILL-GET "verbose">
+ <V-LOOK>>
+
+<ROUTINE V-INVENTORY ()
+ ;<COND (<ZERO? ,LIT>
+ <TOO-DARK>
+ <RFATAL>)>
+ <TELL CHE ,WINNER is " holding">
+ <COND (<ZERO? <PRINT-CONTENTS ,WINNER>> ;"was PRINT-CONT"
+ <TELL " nothing">)>
+ <TELL !\.>
+ <COND ;(<AND <==? ,WINNER ,PLAYER>
+ <T? ,NOW-WEARING>>
+ <TELL !\ >
+ <PERFORM ,V?LOOK-INSIDE ,POCKET>)
+ (T <CRLF>)>>
+
+<ROUTINE V-QUIT ("OPTIONAL" (ASK? T))
+ <V-SCORE>
+ <COND (<NOT .ASK?> <QUIT>)>
+ <TELL
+"[If you want to continue from this point at another time, you must
+\"SAVE\" first. Do you want to stop the story now?]">
+ <COND (<YES?> <QUIT>)
+ (T <TELL "Okay." CR>)>>
+
+<ROUTINE V-RESTART ()
+ <V-SCORE>
+ <TELL "[Do you want to start over from the beginning?]">
+ <COND (<YES?>
+ <RESTART>
+ <TELL-FAILED>)
+ (T <TELL "Okay." CR>)>>
+
+<ROUTINE TELL-FAILED ()
+ <TELL
+"[Sorry, but it didn't work. Maybe your instruction manual or Reference
+Card can tell you why.]" CR>>
+
+<ROUTINE V-SAVE ("AUX" X)
+ <PUTB ,OOPS-INBUF 1 0>
+ <SETG CLOCK-WAIT T>
+ <COND (<SET X <SAVE>>
+ <TELL "[Okay.]" CR>
+ %<DEBUG-CODE <PROG ()
+ <TELL "{" ;"Note to Stu: ">
+ <TIME-PRINT ,PRESENT-TIME>
+ <TELL "}|">>>
+ <V-FIRST-LOOK>)
+ (T
+ <TELL-FAILED>)>
+ <RTRUE>>
+
+<ROUTINE V-RESTORE ()
+ ;<TELL
+"[Do you want to go back to a position you saved?]">
+ <COND ;(<NOT <YES?>>
+ <TELL "Okay." CR>)
+ (<NOT <RESTORE>>
+ <TELL-FAILED>
+ <RFALSE>)>>
+
+<ROUTINE V-FIRST-LOOK ()
+ <COND (<DESCRIBE-ROOM>
+ <COND (<NOT <0? ,VERBOSITY>>
+ <DESCRIBE-OBJECTS>)>)>>
+
+<ROUTINE V-VERSION ("AUX" (CNT 17) V)
+ <SET V <BAND <GET 0 1> *3777*>>
+ <TELL D ,MOONMIST "|
+Infocom interactive fiction - a mystery story|
+Copyright (c) 1986 by Infocom, Inc. All rights reserved." CR>
+ ;<COND (<NOT <==? <BAND <GETB 0 1> 8> 0>>
+ <TELL
+"Licensed to Tandy Corporation. Version 00.00." N .V CR>)>
+ <TELL
+D ,MOONMIST " is a trademark of Infocom, Inc.|
+Release number " N .V " / Serial number ">
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> 23>
+ <RETURN>)
+ (T
+ <PRINTC <GETB 0 .CNT>>)>>
+ <COND (<NOT <0? ,VARIATION>>
+ <TELL " / ">
+ <PRINTB <GET ,COLOR-WORDS ,VARIATION>>
+ <TELL " variation">)>
+ <CRLF>
+ ;<PROG ()
+ <TELL "{This fine game was made just for you, ">
+ <SET CNT 55>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> 63>
+ <RETURN>)
+ (<ZERO? <SET V <GETB 0 .CNT>>>
+ <RETURN>)
+ (T <PRINTC .V>)>>
+ <TELL "!}" CR>>>
+
+<GLOBAL TREASURE-FOUND:OBJECT <>>
+<GLOBAL ARRESTED-THE-VILLAIN "arrested the villain">
+<GLOBAL IDENTIFIED-THE-GHOST "identified the ghost">
+
+<ROUTINE V-SCORE ("AUX" (N 0) I (FC <GET ,FOUND-COSTUME ,PLAYER-C>))
+ <COND (<AND <T? ,CONFESSED>
+ <T? ,TREASURE-FOUND>
+ <T? .FC>>
+ <TELL "[Congratulations, "TN"! You've won the game!]" CR>
+ <RTRUE>)>
+ <TELL "[Well, so far you've ">
+ <COND (<ZERO? <GETB ,LAST-NAME 0>>
+ <TELL "just gotten started.]" CR>
+ <RTRUE>)>
+ <TELL "met ">
+ <COND (<FSET? ,LORD ,TOUCHBIT>
+ <TELL 'LORD " and ">)>
+ <SET I <GET ,GUEST-TABLE 0>>
+ <REPEAT ()
+ <COND (<FSET? <GET ,GUEST-TABLE .I> ,TOUCHBIT>
+ <INC N>)>
+ <COND (<DLESS? I 1> <RETURN>)>>
+ <COND (<==? .N <GET ,GUEST-TABLE 0>> <TELL "all">)
+ (<0? .N> <TELL "none">)
+ (<1? .N> <TELL "one">)
+ (T <TELL "some">)>
+ <TELL " of the guests">
+ <COND (<T? ,WASHED>
+ <TELL ", washed up from your trip">)>
+ <COND (<T? ,WRONG-OUTFIT>
+ <TELL ", worn the ">
+ <COND (<1? ,WRONG-OUTFIT> <TELL "proper">) (T <TELL "wrong">)>
+ <TELL " outfit to dinner">)>
+ <COND (<T? <GET ,FOUND-PASSAGES ,PLAYER-C>>
+ <TELL ", discovered " 'PASSAGE "s">)>
+ ;<COND (<OR <NOT <FSET? ,COSTUME ,SEENBIT>>
+ <EQUAL? ,VARIATION ,PAINTER-C ,DOCTOR-C>>
+ <SET I "found ">)
+ (<EQUAL? ,VARIATION ,LORD-C>
+ <SET I "detected ">)
+ (T ;<EQUAL? ,VARIATION ,FRIEND-C>
+ <SET I "examined ">)>
+ ;<COND (<T? .FC>
+ <TELL ", " .I "a " ,COSTUME>)>
+ <COND (<FSET? ,GHOST-NEW ,TOUCHBIT>
+ <TELL ", seen the ghost">)>
+ <COND (<T? .FC>
+ <TELL ", " ,IDENTIFIED-THE-GHOST>)>
+ ;<COND (<T? ,VILLAIN-KNOWN?>
+ <TELL ", unmasked the ghost">)>
+ <COND (<T? ,EVIDENCE-FOUND>
+ <TELL ", discovered evidence">)>
+ <COND (<T? ,CONFESSED>
+ <TELL ", " ,ARRESTED-THE-VILLAIN>)>
+ <COND (<T? ,TREASURE-FOUND>
+ <TELL ", discovered the " 'ARTIFACT>)>
+ <TELL "... ">
+ <COND (<0? .N> <TELL "and">) (T <TELL "but">)>
+ <TELL " you haven't ">
+ <COND (<ZERO? ,TREASURE-FOUND>
+ <TELL "found the " 'ARTIFACT>)>
+ <COND (<ZERO? ,EVIDENCE-FOUND>
+ <COND (<ZERO? ,TREASURE-FOUND>
+ <TELL " nor ">)>
+ <TELL "enough evidence">
+ <COND (<OR <T? ,VILLAIN-KNOWN?>
+ <T? .FC>>
+ <TELL " of why ">
+ <COND (<AND <==? ,VILLAIN-PER ,LOVER>
+ <T? ,LOVER-SAID>>
+ <TELL 'LORD " killed " 'COUSIN>)
+ (T <TELL 'VILLAIN-PER " haunted " 'CASTLE>)>)>)
+ (<ZERO? ,CONFESSED>
+ <COND (<ZERO? ,TREASURE-FOUND>
+ <TELL " nor ">)>
+ <TELL ,ARRESTED-THE-VILLAIN>)>
+ <COND (<ZERO? .FC>
+ <COND (<OR <ZERO? ,TREASURE-FOUND>
+ <ZERO? ,EVIDENCE-FOUND>
+ <ZERO? ,CONFESSED>>
+ <TELL " nor ">)>
+ ;<TELL .I "a " D ,COSTUME>
+ <TELL ,IDENTIFIED-THE-GHOST>)>
+ <TELL "!]" CR>>
+
+<GLOBAL YES-INBUF <ITABLE 19 (BYTE LENGTH) 0>
+ ;<TABLE #BYTE 19 #BYTE 0 0 0 0 0 0 0 0 0 0>>
+<GLOBAL YES-LEXV <ITABLE 3 (LEXV) 0 0>
+ ;<TABLE #BYTE 3 #BYTE 0 0 0 0 0 0 0>>
+
+<ROUTINE YES? ("AUX" WORD VAL)
+ <REPEAT ()
+ <PRINTI "|>">
+ <READ ,YES-INBUF ,YES-LEXV>
+ <COND (<AND <NOT <0? <GETB ,YES-LEXV ,P-LEXWORDS>>>
+ <SET WORD <GET ,YES-LEXV ,P-LEXSTART>>>
+ <SET VAL <WT? .WORD ,PS?VERB ,P1?VERB>>
+ <COND (<EQUAL? .VAL ,ACT?YES>
+ <SET VAL T>
+ <RETURN>)
+ (<OR <EQUAL? .VAL ,ACT?NO>
+ <EQUAL? .WORD ,W?N>>
+ <SET VAL <>>
+ <RETURN>)
+ (<EQUAL? .VAL ,ACT?RESTART>
+ <V-RESTART>)
+ (<EQUAL? .VAL ,ACT?RESTORE>
+ <V-RESTORE>)
+ (<EQUAL? .VAL ,ACT?QUIT>
+ <V-QUIT>)>)>
+ <TELL "[Please type YES or NO.]">>
+ .VAL>
+
+<ROUTINE NO-NEED ("OPTIONAL" (STR <>) (OBJ <>))
+ <SETG CLOCK-WAIT T>
+ <TELL !\( CHE ,WINNER do "n't need to ">
+ <COND (.STR <TELL .STR>) (T <VERB-PRINT>)>
+ <COND (<EQUAL? .STR "go" "drive">
+ <TELL " in that " D ,INTDIR>)
+ (<T? .OBJ>
+ <TELL THE .OBJ>)
+ (T <TELL THE ,PRSO>)>
+ <TELL ".)" CR>>
+
+<ROUTINE YOU-CANT ("OPTIONAL" (STR <>) (WHILE <>) (STR1 <>))
+ <SETG CLOCK-WAIT T>
+ <TELL !\( CHE ,WINNER " can't ">
+ <COND (<ZERO? .STR>
+ <VERB-PRINT>)
+ (T <TELL .STR>)>
+ <COND (<EQUAL? .STR "go" "drive">
+ <TELL " in that " D ,INTDIR>)
+ (T
+ <COND (<==? ,PRSO ,PSEUDO-OBJECT>
+ <TELL " it">)
+ (<AND <DOBJ? BUST>
+ <NOUN-USED? ,W?TAPE>
+ <OR <EQUAL? .STR "wait until" ;"throw off">
+ <EQUAL? .STR "pick up" "turn off" "turn on">>>
+ <TELL " the tape">)
+ (<AND <DOBJ? FLOOR>
+ <OUTSIDE? ,HERE>
+ <NOT <EQUAL? <LOC ,WINNER> ;,HERE ,CAR>>>
+ <TELL " the ground">)
+ (T <TELL THE ,PRSO>)>
+ <COND (.STR1
+ <TELL " while">
+ <COND (.WHILE
+ <TELL HE .WHILE is>
+ ;<THIS-IS-IT .WHILE>)
+ (T <TELL HE ,PRSO is>)>
+ <TELL !\ .STR1>)
+ ;(T <TELL " now">)>)>
+ <TELL ".)" CR>>
+
+<ROUTINE YOU-SHOULDNT ("OPT" (PREP <>))
+ <SETG CLOCK-WAIT T>
+ <TELL !\( CHE ,WINNER " shouldn't ">
+ <VERB-PRINT>
+ <TELL THE ;HIM ,PRSO>
+ <COND (<T? .PREP>
+ <TELL .PREP THE ,PRSI>)>
+ <TELL ".)" CR>>
+
+" "
+
+"SUBTITLE - GENERALLY USEFUL ROUTINES & CONSTANTS"
+
+<ROUTINE TELL-BEING-WORN (OBJ)
+ <COND (<FSET? .OBJ ,WORNBIT>
+ <TELL " (actually, wearing it)">)
+ ;(<AND <FSET? .OBJ ,ONBIT>
+ <NOT <EQUAL? ,LIT ,HERE ;1>>>
+ <TELL " (providing light)">)>>
+
+<GLOBAL YAWNS <LTABLE 0 "unusual" "interesting" "extraordinary" "special">>
+
+<ROUTINE PRINT-CONTENTS (THING "AUX" OBJ NXT (1ST? T) (VAL <>))
+ <SET OBJ <FIRST? .THING>>
+ <REPEAT ()
+ <COND (.OBJ
+ <SET NXT <NEXT? .OBJ>>
+ <COND (<OR <FSET? .OBJ ,INVISIBLE>
+ <FSET? .OBJ ,NDESCBIT> ;"was semied"
+ <EQUAL? .OBJ ,WINNER ;,NOW-WEARING>>
+ <MOVE .OBJ ,INTDIR>)>
+ <SET OBJ .NXT>)
+ (T
+ <RETURN>)>>
+ <SET OBJ <FIRST? .THING>>
+ <COND (<NOT .OBJ>
+ <COND (<NOT <==? .THING ,PLAYER>>
+ <TELL " nothing " <PICK-ONE-NEW ,YAWNS>>)>)
+ (T
+ <REPEAT ()
+ <COND (.OBJ
+ <SET NXT <NEXT? .OBJ>>
+ <COND (.1ST?
+ <SET VAL T>
+ <SET 1ST? <>>)
+ (T
+ <COND (.NXT <TELL !\,>)
+ (T <TELL " and">)>)>
+ <TELL THE .OBJ>
+ <TELL-BEING-WORN .OBJ>
+ <THIS-IS-IT .OBJ>
+ <FCLEAR .OBJ ,SECRETBIT>
+ <FSET .OBJ ,SEENBIT>
+ <SET OBJ .NXT>)
+ (T
+ <RETURN>)>>)>
+ <ROB ,INTDIR .THING>
+ .VAL>
+
+<ROUTINE DESCRIBE-OBJECTS ("OPTIONAL" (THING <>)
+ "AUX" OBJ NXT STR (VAL <>) (HE 0) (SHE 0)
+ (FIRST T) (TWO? <>) (IT? <>) (ANY? <>))
+ <COND (<ZERO? .THING>
+ <SET THING ,HERE>)>
+ <COND (<ZERO? ,LIT>
+ <TOO-DARK>
+ <RTRUE>)>
+ ;"Hide invisible objects"
+ <SET OBJ <FIRST? .THING>>
+ <COND (<ZERO? .OBJ>
+ <RFALSE>)>
+ <REPEAT ()
+ <COND (.OBJ
+ <SET NXT <NEXT? .OBJ>>
+ <COND (<OR <FSET? .OBJ ,INVISIBLE>
+ <FSET? .OBJ ,NDESCBIT>
+ <EQUAL? .OBJ ,WINNER>
+ <AND <FSET? .OBJ ,PERSONBIT>
+ <OR <FSET? .OBJ ,RMUNGBIT>;"not desc'd"
+ ;<IN-MOTION? .OBJ>>>
+ <EQUAL? .OBJ <LOC ,PLAYER>>>
+ <FCLEAR .OBJ ,RMUNGBIT>
+ <MOVE .OBJ ,PSEUDO-OBJECT>)>
+ <SET OBJ .NXT>)
+ (T
+ <RETURN>)>>
+ <COND (<EQUAL? .THING ,HERE>
+ ;"Describe people in proper order:"
+ <SET NXT ,GHOST-NEW-C ;,CHARACTER-MAX>
+ <REPEAT ()
+ <PUT ,TOUCHED-LDESCS .NXT 0>
+ <COND (<DLESS? NXT 1> <RETURN>)>>
+ <SET NXT 0>
+ <REPEAT ()
+ <COND (<IGRTR? NXT ,GHOST-NEW-C ;,CHARACTER-MAX>
+ <RETURN>)
+ (<IN? <SET OBJ <GET ,CHARACTER-TABLE .NXT>> ,HERE>
+ <PUT ,FOLLOW-LOC .NXT ,HERE>
+ <SET VAL <APPLY <GETP .OBJ ,P?DESCFCN> ,M-OBJDESC>>
+ <FSET .OBJ ,SEENBIT>
+ <COND (<OR <==? .VAL ,M-FATAL>
+ <ZERO? .ANY?>>
+ <SET ANY? .VAL>)>
+ <COND (<FSET? .OBJ ,FEMALE>
+ <COND (<0? .SHE> <SET SHE .OBJ>)
+ (T <SET SHE 1>)>)
+ (T
+ <COND (<0? .HE> <SET HE .OBJ>)
+ (T <SET HE 1>)>)>
+ <MOVE .OBJ ,PSEUDO-OBJECT>)>>
+ <SET NXT 0>
+ <REPEAT ()
+ <COND (<IGRTR? NXT ,GHOST-NEW-C ;,CHARACTER-MAX>
+ <RETURN>)
+ (<T? <SET OBJ <GET ,TOUCHED-LDESCS .NXT>>>
+ ;<PUT ,TOUCHED-LDESCS .NXT 0>
+ <SET FIRST T>
+ <SET STR <GET ,CHARACTER-TABLE .NXT>>
+ <TELL CTHE .STR>
+ <SET STR .NXT>
+ <REPEAT ()
+ <COND (<IGRTR? STR ,GHOST-NEW-C ;,CHARACTER-MAX>
+ <COND (.FIRST <TELL " is ">)
+ (T <TELL " are ">)>
+ <TELL <GET ,LDESC-STRINGS .OBJ> !\. CR>
+ <RETURN>)
+ (<==? .OBJ <GET ,TOUCHED-LDESCS .STR>>
+ <PUT ,TOUCHED-LDESCS .STR 0>
+ <SET FIRST <>>
+ <TELL " and" THE
+ <GET ,CHARACTER-TABLE .STR>>)>>)>>
+ <COND (<NOT <EQUAL? .SHE 0 1>>
+ <THIS-IS-IT .SHE>)
+ (<EQUAL? .SHE 1>
+ <SETG P-HER-OBJECT <>>)>
+ <COND (<NOT <EQUAL? .HE 0 1>>
+ <THIS-IS-IT .HE>)
+ (<EQUAL? .HE 1>
+ <SETG P-HIM-OBJECT <>>)>
+ <SET FIRST T>
+ ; "Apply all DESCFCNs and hide those objects"
+ <SET OBJ <FIRST? .THING>>
+ <REPEAT ()
+ <COND (.OBJ
+ <SET NXT <NEXT? .OBJ>>
+ <SET STR <GETP .OBJ ,P?DESCFCN>>
+ <COND (.STR
+ ;<CRLF>
+ <SET VAL <APPLY .STR ,M-OBJDESC>>
+ <COND (<OR <==? .VAL ,M-FATAL>
+ <ZERO? .ANY?>>
+ <SET ANY? .VAL>)>
+ <THIS-IS-IT .OBJ>
+ <FSET .OBJ ,SEENBIT>
+ ;<CRLF>
+ <MOVE .OBJ ,PSEUDO-OBJECT>)>
+ <SET OBJ .NXT>)
+ (T
+ <RETURN>)>>
+ ;"Apply all FDESCs and eliminate those objects"
+ ;<SET OBJ <FIRST? .THING>>
+ ;<REPEAT ()
+ <COND (<AND .OBJ
+ <NOT <FSET? .OBJ ,TOUCHBIT>>>
+ <SET NXT <NEXT? .OBJ>>
+ <SET STR <GETP .OBJ ,P?FDESC>>
+ <COND (.STR
+ ;<SET VAL T>
+ <COND (<ZERO? .ANY?> <SET ANY? T>)>
+ <TELL ;CR .STR CR>
+ <FCLEAR .OBJ ,SECRETBIT>
+ <FSET .OBJ ,SEENBIT>
+ <THIS-IS-IT .OBJ>
+ <MOVE .OBJ ,PSEUDO-OBJECT>)>
+ <SET OBJ .NXT>)
+ (T
+ <RETURN>)>>
+ ;"Apply all LDESC's and eliminate those objects"
+ <SET OBJ <FIRST? .THING>>
+ <REPEAT ()
+ <COND (.OBJ
+ <SET NXT <NEXT? .OBJ>>
+ <SET STR <GETP .OBJ ,P?LDESC>>
+ <COND (.STR
+ ;<SET VAL T>
+ <COND (<ZERO? .ANY?> <SET ANY? T>)>
+ <TELL ;CR .STR CR>
+ <FCLEAR .OBJ ,SECRETBIT>
+ <FSET .OBJ ,SEENBIT>
+ <THIS-IS-IT .OBJ>
+ <MOVE .OBJ ,PSEUDO-OBJECT>)>
+ <SET OBJ .NXT>)
+ (T
+ <RETURN>)>>)>
+ ;"Print whatever's left in a nice sentence"
+ <SET OBJ <FIRST? ,HERE>>
+ <SET VAL <>>
+ <COND (.OBJ
+ <REPEAT ()
+ <COND (.OBJ
+ <SET NXT <NEXT? .OBJ>>
+ <SET VAL T>
+ <COND (.FIRST
+ <SET FIRST <>>
+ ;<CRLF>
+ <COND (<EQUAL? .THING ,HERE>
+ <CRLF>
+ <COND (<FSET? ,HERE ,ONBIT>
+ <TELL "You see">)
+ ;(<OR <FIND-FLAG ,WINNER ,ONBIT>
+ <FIND-FLAG ,HERE ,ONBIT>>
+ <TELL
+CHIS ,WINNER " light reveals">)
+ (T <TELL
+"The light reveals" ;" from the next room">)>)>)
+ (T
+ <COND (.NXT <TELL !\,>)
+ (T <TELL " and">)>)>
+ <TELL THE .OBJ>
+ <FCLEAR .OBJ ,SECRETBIT>
+ <FSET .OBJ ,SEENBIT>
+ <THIS-IS-IT .OBJ>
+ <TELL-BEING-WORN .OBJ>
+ <COND (<AND <SEE-INSIDE? .OBJ>
+ <SEE-ANYTHING-IN? .OBJ>>
+ <MOVE .OBJ ,INTNUM>)>
+ <COND (<AND <NOT .IT?>
+ <NOT .TWO?>>
+ <SET IT? .OBJ>)
+ (T
+ <SET TWO? T>
+ <SET IT? <>>)>
+ <SET OBJ .NXT>)
+ (T
+ <COND (<AND .IT?
+ <NOT .TWO?>>
+ <SETG P-IT-OBJECT .IT?>)>
+ <COND (<EQUAL? .THING ,HERE>
+ <TELL " here">)>
+ <TELL !\.>
+ <COND (<ZERO? .ANY?> <SET ANY? T>)>
+ <RETURN>)>>)>
+ <SET OBJ <FIRST? ,INTNUM>>
+ <REPEAT ()
+ <COND (<ZERO? .OBJ>
+ <RETURN>)>
+ <COND (<FSET? .OBJ ,SURFACEBIT>
+ <TELL ;CR CR "On">)
+ (T
+ <TELL ;CR CR "Inside">)>
+ <SET VAL T>
+ <TELL THE .OBJ>
+ <TELL " you see">
+ <PRINT-CONTENTS .OBJ>
+ <TELL !\.>
+ <SET OBJ <NEXT? .OBJ>>>
+ <COND (<T? .VAL ;.ANY?> <CRLF>)>
+ <ROB ,INTNUM .THING>
+ <ROB ,PSEUDO-OBJECT .THING>
+ .ANY? ;.VAL>
+
+<ROUTINE SEE-ANYTHING-IN? (THING "AUX" OBJ NXT (ANY? <>))
+ <SET OBJ <FIRST? .THING>>
+ <REPEAT ()
+ <COND (.OBJ
+ <COND (<AND <NOT <FSET? .OBJ ,INVISIBLE>>
+ <NOT <FSET? .OBJ ,NDESCBIT>>
+ <NOT <EQUAL? .OBJ ,WINNER>>>
+ <SET ANY? T>
+ <RETURN>)>
+ <SET OBJ <NEXT? .OBJ>>)
+ (T
+ <RETURN>)>>
+ <RETURN .ANY?>>
+
+<ROUTINE DESCRIBE-ROOM ("OPTIONAL" (LOOK? <>) "AUX" V? STR L)
+ <COND (<T? .LOOK?> <SET V? T>)
+ (<==? 2 ,VERBOSITY> <SET V? T>)
+ (<==? 0 ,VERBOSITY> <SET V? <>>)
+ (<NOT <FSET? ,HERE ,TOUCHBIT>>
+ <SET V? T>)>
+ <COND (T ;<IN? ,HERE ,ROOMS>
+ <TELL !\(>
+ <COND (<ZERO? ,VERBOSITY>
+ <TELL D ,HERE>)
+ (T
+ <TELL "You are">
+ <COND (<NOT <FSET? ,HERE ,TOUCHBIT>>
+ <TELL " now">)>
+ <COND (<FSET? ,HERE ,SURFACEBIT>
+ <TELL " on">)
+ (<NOT <==? ,HERE ,BACKSTAIRS>>
+ <TELL " in">)>
+ <TELL THE ,HERE !\.>)>
+ <TELL ")|">)>
+ <COND (<ZERO? ,LIT>
+ <TOO-DARK>
+ ;<TELL "It is pitch black." CR>
+ <RETURN <>>)
+ (<NOT <EQUAL? ,LIT ,HERE>>
+ ;<1? ,LIT> ;<NOT <FSET? ,HERE ,ONBIT>>
+ <TELL "Light comes from" THE ,LIT ;" the next room" "." CR>)>
+ <COND (.V?
+ <COND (<FSET? <SET L <LOC ,WINNER>> ,VEHBIT>
+ <TELL "(You're ">
+ <COND (<EQUAL? .L ,COFFIN> <TELL "ly">)
+ (T <TELL "sitt">)>
+ <TELL "ing ">
+ <COND (<EQUAL? .L ,CAR ,COFFIN>
+ <TELL "in">)
+ (T ;<FSET? .L ,SURFACEBIT>
+ <TELL "on">)
+ ;(T <TELL "standing in">)>
+ <THIS-IS-IT .L>
+ <TELL THE .L ".)" CR>)>
+ <COND (<AND .V? <APPLY <GETP ,HERE ,P?ACTION> ,M-LOOK>>
+ T)
+ ;(<AND .V? <SET STR <GETP ,HERE ,P?FDESC>>>
+ <TELL .STR CR>)
+ (<AND .V? <SET STR <GETP ,HERE ,P?LDESC>>>
+ <TELL .STR CR>)
+ (T <APPLY <GETP ,HERE ,P?ACTION> ,M-FLASH>)>
+ ;<COND (<NOT <==? ,HERE .L>>
+ <APPLY <GETP .L ,P?ACTION> ,M-LOOK>)>)>
+ <COND (<GETP ,HERE ,P?CORRIDOR>
+ <CORRIDOR-LOOK>)>
+ <FSET ,HERE ,SEENBIT>
+ <FSET ,HERE ,TOUCHBIT>
+ T>
+
+"Lengths:"
+<CONSTANT REXIT 0>
+<CONSTANT UEXIT %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE> 2) (T 1)>>
+ "Uncondl EXIT: (dir TO rm) = rm"
+<CONSTANT NEXIT %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE> 3) (T 2)>>
+ "Non EXIT: (dir ;SORRY string) = str-ing"
+<CONSTANT FEXIT %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE> 4) (T 3)>>
+ "Fcnl EXIT: (dir PER rtn) = rou-tine, 0"
+<CONSTANT CEXIT %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE> 5) (T 4)>>
+ "Condl EXIT: (dir TO rm IF f) = rm, f, str-ing"
+<CONSTANT DEXIT %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE> 6) (T 5)>>
+ "Door EXIT: (dir TO rm IF dr IS OPEN)= rm, dr, str-ing, 0"
+
+<CONSTANT NEXITSTR 0>
+<CONSTANT FEXITFCN 0>
+<CONSTANT CEXITFLAG %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE> 4) (T 1)>> "GET/B"
+<CONSTANT CEXITSTR 1> "GET"
+<CONSTANT DEXITOBJ 1> "GET/B"
+<CONSTANT DEXITSTR %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE> 2) (T 1)>> "GET"
+
+<ROUTINE HAR-HAR ()
+ <SETG CLOCK-WAIT T>
+ <TELL !\( <PICK-ONE-NEW ,YUKS> !\) CR>>
+
+<ROUTINE PICK-ONE-NEW (FROB "AUX" L CNT RND MSG RFROB)
+ <SET L <- <GET .FROB 0> 1>>
+ <SET CNT <GET .FROB 1>>
+ <SET FROB <REST .FROB 2>>
+ <SET RFROB <REST .FROB <* .CNT 2>>>
+ <SET RND <- .L .CNT>>
+ <SET RND <RANDOM .RND>>
+ %<DEBUG-CODE
+ <COND (<NOT <G? .RND 0>>
+ <TELL
+"{PICK-ONE-NEW: L=" N .L " CNT=" N .CNT " RND=" N .RND " FROB="N .FROB"}"CR>)>>
+ <SET MSG <GET .RFROB .RND>>
+ <PUT .RFROB .RND <GET .RFROB 1>>
+ <PUT .RFROB 1 .MSG>
+ <SET CNT <+ .CNT 1>>
+ <COND (<==? .CNT .L> <SET CNT 0>)>
+ <PUT .FROB 0 .CNT>
+ .MSG>
+
+<ROUTINE PICK-ONE (FROB) <GET .FROB <RANDOM <GET .FROB 0>>>>
+
+<ROUTINE NOT-HOLDING? (OBJ)
+ <COND (<AND <NOT <IN? .OBJ ,WINNER>>
+ <NOT <IN? <LOC .OBJ> ,WINNER>>>
+ <SETG CLOCK-WAIT T>
+ <TELL !\( CHE ,WINNER is " not holding" HIM .OBJ ".)" CR>)>>
+
+;<ROUTINE LKP (ITM TBL "AUX" (CNT 0) (LEN <GET .TBL 0>))
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> .LEN>
+ <RFALSE>)
+ (<EQUAL? <GET .TBL .CNT> .ITM>
+ <COND (<EQUAL? .CNT .LEN> <RFALSE>)
+ (T
+ <RETURN <GET .TBL <+ .CNT 1>>>)>)>>>
+
+<GLOBAL FOLLOWER:OBJECT 0> "LORD=Tamara+Jack"
+
+<ROUTINE NEW-FOLLOWER (PER)
+ <COND (<NOT <EQUAL? ,FOLLOWER <> .PER>>
+ <PUTP ,FOLLOWER ,P?LDESC 0>
+ <TELL
+"\"I'll leave you two alone, then,\" says " D ,FOLLOWER ".|">)>
+ <SETG FOLLOWER .PER>
+ <PUT <GT-O .PER> ,GOAL-ENABLE 0>>
+
+<ROUTINE FRIEND-FOLLOWS-YOU (RM "AUX" C)
+ <COND (<EQUAL? .RM ,CAR ,YOUR-BATHROOM>
+ <RFALSE>)
+ (<OR <FSET? .RM ,SECRETBIT>
+ <EQUAL? .RM ,CRYPT>>
+ <NOT-INTO-PASSAGE ,FOLLOWER T>
+ <PUTP ,FOLLOWER ,P?LDESC 9 ;"waiting patiently">
+ <SETG FOLLOWER 0>
+ <RFALSE>)
+ (<ZERO? <GETP .RM ,P?LINE>>
+ <RFALSE>)
+ (<IN? ,FOLLOWER .RM>
+ <RFALSE>)
+ (T ;<NOT <==? ,OHERE .RM>>
+ ;<SETG OHERE .RM>
+ ;<COND (<NOT <EQUAL? .RM ;,SUB <LOC ,FOLLOWER>>>
+ <FCLEAR ,FOLLOWER ,TOUCHBIT>)>
+ <MOVE ,FOLLOWER .RM>
+ <PUTP ,FOLLOWER ,P?LDESC 23 ;"following you">
+ <COND (<==? ,FOLLOWER ,LORD>
+ <TELL D ,FRIEND>)
+ (T <TELL D ,FOLLOWER>)>
+ <TELL <PICK-ONE ,TRAILS-ALONG>>
+ <COND (<AND <==? ,FOLLOWER ,LORD>
+ <NOT <EQUAL? .RM ,YOUR-ROOM ,YOUR-BATHROOM>>>
+ <MOVE ,LORD .RM>
+ <PUTP ,LORD ,P?LDESC 23 ;"following you">
+ <TELL " So does " D ,LORD !\.>)>
+ ;<SET C <GETP ,FOLLOWER ,P?CHARACTER>>
+ ;<COND (<AND <FSET? ,HERE ,SECRETBIT>
+ <ZERO? <GET ,FOUND-PASSAGES .C>>>
+ <PUT ,FOUND-PASSAGES .C T>
+ <COND (<NOT <==? .C ,VARIATION>>
+ <PUTP ,FOLLOWER ,P?LINE 0>)>
+ <TELL " She gasps, \"Wow! You found a " D ,PASSAGE "!\"">)>
+ <CRLF>)>>
+
+<ROUTINE NOT-INTO-PASSAGE (PER "OPT" (FOLLOW <>) (PASS T))
+ <COND (<T? .PASS>
+ <PUT ,FOUND-PASSAGES <GETP .PER ,P?CHARACTER> T>)>
+ <THIS-IS-IT .PER>
+ <TELL "\"I'm not ">
+ <COND (<T? .FOLLOW>
+ <TELL <GET ,LDESC-STRINGS 23> ;"following you">)
+ (T <TELL "going">)>
+ <TELL " into that ">
+ <COND (<T? .PASS>
+ <COND (<EQUAL? .PER ,OFFICER ,BUTLER>
+ <TELL "dirty">)
+ (T <TELL "spooky">)>
+ <TELL !\ >)>
+ <TELL "place!\" says " D .PER>
+ <COND (<T? .FOLLOW>
+ <TELL " as" HE .PER " stays behind">)>
+ <TELL "." CR>>
+
+<GLOBAL TRAILS-ALONG
+ <PLTABLE " walks a few steps behind."
+ " trails along."
+ " stays at your side."
+ " walks along with you.">>
+
+<GLOBAL TOUR-FORCED:FLAG <>>
+<ROUTINE TOUR? ("AUX" RM)
+ <COND (<QUEUED? ,I-TOUR>
+ <QUEUE I-TOUR 1>
+ <SETG TOUR-FORCED T>
+ <COND (<QUEUED? ,I-REPLY> <QUEUE I-REPLY 1>)>
+ <COND (<OR <NOT <EQUAL? ,HERE ,GREAT-HALL>>
+ <FSET? ,DOCTOR ,TOUCHBIT>>
+ <SET RM <GET ,TOUR-PATH ,TOUR-INDEX>>
+ <COND (<VERB? FOLLOW>
+ <COND (<DOBJ? FRIEND>
+ <RTRUE>)>)
+ (<VERB? WALK>
+ <COND (<DIR-EQV? ,HERE ,PRSO <DIR-FROM ,HERE .RM>>
+ <RTRUE>)>)
+ (<VERB? WALK-TO THROUGH>
+ <COND (<==? <META-LOC ,PRSO> .RM>
+ <RTRUE>)>)>)>
+ <TELL
+'FRIEND " says, \"Please don't wander off yet. I want you to ">
+ <COND (<FSET? ,DOCTOR ,TOUCHBIT>
+ <TELL "see " 'YOUR-ROOM ".\"" CR>)
+ (T <TELL "meet the other guests.\"" CR>)>
+ <RTRUE>)>>
+
+<ROUTINE CREEPY? (RM)
+ <COND (<FSET? .RM ,SECRETBIT>
+ <RTRUE>)
+ (<EQUAL? .RM ,TOMB ,DUNGEON ,CRYPT>
+ <RTRUE>)
+ ;(<EQUAL? .RM ,BASEMENT>
+ <RTRUE>)>>
+
+<ROUTINE GOTO (RM "OPTIONAL" (TEST T) (FOLLOW? T) "AUX" X)
+ <COND (<IN? ,WINNER .RM>
+ <WALK-WITHIN-ROOM>
+ <RFALSE>)>
+ <COND (<APPLY <GETP ,HERE ,P?ACTION> ,M-EXIT>
+ <RFALSE>)
+ (<==? ,WINNER ,PLAYER>
+ <COND (<TOUR?>
+ <RFALSE>)>
+ <COND (<AND .FOLLOW?
+ <T? ,FOLLOWER>>
+ <FRIEND-FOLLOWS-YOU .RM>)>
+ <COND (<AND <1? <RANDOM 2 ;3>>
+ <ZERO? ,FOLLOWER>
+ <CREEPY? ,HERE>
+ <CREEPY? .RM>>
+ <TELL "You " <PICK-ONE-NEW ,CREEPIES> CR>)>)
+ ;(<FSET? ,WINNER ,MUNGBIT>
+ <TELL "\"I wish I could!\"" CR>
+ <RFALSE>)
+ (<FSET? .RM ,SECRETBIT>
+ <NOT-INTO-PASSAGE ,WINNER>
+ <RFALSE>)
+ (<EQUAL? .RM ,YOUR-BATHROOM>
+ <NOT-INTO-PASSAGE ,WINNER <> <>>
+ <RFALSE>)>
+ <COND (<AND <T? .TEST>
+ <==? ,WINNER ,PLAYER>>
+ <SET X <DIR-FROM ,HERE .RM>>
+ <COND (<T? .X>
+ <COND (<==? ,M-FATAL <APPLY <GETP ,HERE ,P?ACTION> .X>>
+ <RFALSE>)>)>)>
+ <PUT ,FOLLOW-LOC <GETP ,WINNER ,P?CHARACTER> .RM>
+ <COND (<AND <IN? ,WINNER ,CAR>
+ <EQUAL? .RM ,COURTYARD>>
+ <MOVE ,CAR .RM>)>
+ <MOVE ,WINNER .RM>
+ <COND (<==? ,WINNER ,PLAYER>
+ <SETG OHERE ,HERE>
+ <SETG HERE .RM>
+ <MAKE-ALL-PEOPLE -12 ;"listening to you">
+ <ENTER-ROOM>
+ <RTRUE>)
+ (T <RTRUE>)>>
+
+<GLOBAL CREEPIES
+ <LTABLE 0
+ "feel a cold shiver run down your back."
+ "hear footsteps behind you, but no one is there."
+ "hear a door creak open... or was it the wind?"
+ ;"almost trip over a protruding stone."
+ "feel a cobweb brush your face."
+ "hear a scurrying sound underfoot.">>
+
+<ROUTINE HACK-HACK (STR)
+ <TELL .STR HIM ,PRSO <PICK-ONE ,HO-HUM> CR>>
+
+<GLOBAL HO-HUM
+ <PLTABLE
+ " won't help any."
+ " is a waste of time.">>
+
+<ROUTINE HELD? (OBJ "OPTIONAL" (CONT <>) "AUX" L)
+ <COND (<ZERO? .CONT> <SET CONT ,PLAYER ;,WINNER>)>
+ <COND (<AND <EQUAL? .OBJ ,ARTIFACT>
+ <T? ,TREASURE-FOUND>>
+ <SET OBJ ,TREASURE>)>
+ <REPEAT ()
+ <SET L <LOC .OBJ>>
+ <COND (<NOT .L> <RFALSE>)
+ (<EQUAL? .L .CONT> <RTRUE>)
+ (<EQUAL? .CONT ,PLAYER ,WINNER>
+ <COND (<EQUAL? .OBJ ,HANDS ,HEAD ,EYE>
+ <RTRUE>)
+ (<EQUAL? .OBJ ,NOW-WEARING ;,POCKET>
+ <RTRUE>)
+ ;(<AND <EQUAL? .OBJ ,ARTIFACT>
+ <EQUAL? ,WINNER .L <LOC .L>>>
+ <RTRUE>)
+ (<AND <EQUAL? .OBJ ,CAR>
+ <VERB? MUNG>>
+ <RTRUE>)
+ (T <SET OBJ .L>)>)
+ (<EQUAL? .L ,ROOMS ,GLOBAL-OBJECTS> <RFALSE>)
+ (T <SET OBJ .L>)>>>
+
+<ROUTINE IDROP ()
+ <COND ;(<FSET? ,PRSO ,PERSONBIT>
+ <TELL CTHE ,PRSO " wouldn't enjoy that." CR>
+ <RFALSE>)
+ (<NOT-HOLDING? ,PRSO>
+ <RFALSE>)
+ (<AND <NOT <IN? ,PRSO ,WINNER>>
+ <NOT <FSET? <LOC ,PRSO> ,OPENBIT>>>
+ <TOO-BAD-BUT <LOC ,PRSO> "closed">
+ <RFALSE>)
+ (T
+ <MOVE ,PRSO ,HERE ;"<LOC ,WINNER>">
+ <FCLEAR ,PRSO ,WORNBIT>
+ <FCLEAR ,PRSO ,NDESCBIT>
+ <FCLEAR ,PRSO ,INVISIBLE>
+ <RTRUE>)>>
+
+;<GLOBAL INDENTS
+ <PTABLE ""
+ " "
+ " "
+ " "
+ " "
+ " ">>
+
+<GLOBAL FUMBLE-NUMBER:NUMBER 7>
+<GLOBAL FUMBLE-PROB:NUMBER 8>
+;<GLOBAL ITAKE-LOC:OBJECT <>>
+
+<ROUTINE ITAKE ("OPTIONAL" (VB T) "AUX" CNT OBJ L)
+ <SET L <LOC ,PRSO>>
+ <COND (<AND .L <FSET? .L ,PERSONBIT>>
+ <COND (<AND <NOT <FSET? ,PRSO ,TAKEBIT>>
+ <NOT <FSET? .L ,MUNGBIT>>>
+ <COND (.VB <YOU-CANT "take">)>
+ <RFALSE>)
+ (T <FSET ,PRSO ,TAKEBIT>)>)>
+ <COND (<NOT <FSET? ,PRSO ,TAKEBIT>>
+ <COND (.VB <YOU-CANT "take">)>
+ <RFALSE>)
+ (<AND <G? <SET CNT <CCOUNT ,WINNER>> ,FUMBLE-NUMBER>
+ <PROB <* .CNT ,FUMBLE-PROB>>
+ <SET OBJ <FIND-FLAG-NOT ,WINNER ,WORNBIT>>>
+ <TOO-BAD-BUT>
+ <TELL
+THE .OBJ " slips from" HIS ,WINNER " arms while" HE ,WINNER is " taking"
+HIM ,PRSO ", and both tumble " <GROUND-DESC> ". " CHE ,WINNER is
+" carrying too many things.|">
+ <MOVE .OBJ ,HERE> ;<PERFORM ,V?DROP .OBJ>
+ <MOVE ;-FROM ,PRSO ,HERE>
+ <RFATAL>)
+ (T
+ <MOVE ;-FROM ,PRSO ,WINNER>
+ <FSET ,PRSO ,SEENBIT>
+ <FSET ,PRSO ,TOUCHBIT>
+ <FCLEAR ,PRSO ,NDESCBIT>
+ <FCLEAR ,PRSO ,INVISIBLE>
+ <FCLEAR ,PRSO ,SECRETBIT>
+ ;<COND (<==? ,WINNER ,PLAYER> <SCORE-OBJ ,PRSO>)>
+ ;<SETG ITAKE-LOC <>>
+ <COND (<AND <NOT <VERB? TAKE>>
+ <NOT <==? .L ,WINNER>>
+ <OR <FSET? .L ,PERSONBIT>
+ <EQUAL? .L ,SIDEBOARD>>>
+ <FIRST-YOU "take" ,PRSO .L>
+ ;<COND (<NOT .VB> <SETG ITAKE-LOC .L>)>)>
+ <RTRUE>)>>
+
+<ROUTINE CCOUNT (OBJ "AUX" (CNT 0) X)
+ <COND (<SET X <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<NOT <FSET? .X ,WORNBIT>>
+ <SET CNT <+ .CNT 1>>)>
+ <COND (<NOT <SET X <NEXT? .X>>>
+ <RETURN>)>>)>
+ .CNT>
+
+<ROUTINE CHECK-DOOR (DR)
+ <TELL CTHE .DR " is ">
+ <THIS-IS-IT .DR>
+ <COND (<FSET? .DR ,OPENBIT> <TELL "open">)
+ (T
+ <TELL "closed and ">
+ <COND (<NOT <FSET? .DR ,LOCKED>> <TELL "un">)>
+ <TELL "locked">)>
+ <TELL "." CR>>
+
+<ROUTINE ROOM-CHECK ("AUX" P PA)
+ <SET P ,PRSO>
+ <COND (<EQUAL? .P ,ROOMS>
+ <RFALSE>)
+ (<IN? .P ,ROOMS>
+ <COND (<EQUAL? ,HERE .P>
+ <RFALSE>)
+ (<OR <EQUAL? ,HERE <GETP .P ,P?STATION>>
+ <GLOBAL-IN? .P ,HERE>>
+ <COND (<AND <VERB? LIE SIT SEARCH SEARCH-FOR>
+ <NOT <==? <SET P <META-LOC .P>> ,HERE>>>
+ <FIRST-YOU "try to enter" .P>
+ <SET PA ,PRSA>
+ <SET P <PERFORM ,V?THROUGH .P>>
+ <SETG PRSA .PA>
+ <COND (<==? ,M-FATAL .P>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ (T <RFALSE>)>)
+ (<NOT <SEE-INTO? .P>>
+ <RTRUE>)
+ (T <RFALSE>)>)
+ (<OR ;<==? .P ,PSEUDO-OBJECT>
+ <EQUAL? <META-LOC .P>
+ ,HERE ,GLOBAL-OBJECTS ,LOCAL-GLOBALS>>
+ <RFALSE>)
+ (<NOT <VISIBLE? .P>>
+ <NOT-HERE .P>)>>
+
+<ROUTINE SEE-INSIDE? (OBJ "OPTIONAL" (ONLY-IN <>))
+ <COND ;(<FSET? .OBJ ,INVISIBLE> <RFALSE>) ;"for LIT? - PLAYER"
+ (<FSET? .OBJ ,TRANSBIT> <RTRUE>)
+ (<FSET? .OBJ ,OPENBIT> <RTRUE>)
+ (.ONLY-IN <RFALSE>)
+ (<FSET? .OBJ ,SURFACEBIT> <RTRUE>)>>
+
+<ROUTINE ARENT-TALKING ()
+ <SETG CLOCK-WAIT T>
+ <TELL "(You aren't talking to anyone!)" CR>>
+
+<ROUTINE ALREADY (OBJ "OPTIONAL" (STR <>))
+ <SETG CLOCK-WAIT T>
+ <TELL !\(>
+ <COND ;(<NOUN-USED? ,W?DOOR> ;"confusing in secret passage"
+ <TELL "The door">)
+ (T <TELL CTHE .OBJ>)>
+ <COND (<EQUAL? .OBJ ,PLAYER> <TELL " are">)
+ (T <TELL " is">)>
+ <TELL " already ">
+ <COND (.STR <TELL .STR "!)" CR>)>
+ <RTRUE>>
+
+<ROUTINE NOT-CLEAR-WHOM ()
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <TELL "[It's not clear whom you're talking to.]"
+;"[To talk to someone, type their name, then a comma, then what you want
+them to do.]" CR>>
+
+<ROUTINE OKAY ("OPTIONAL" (OBJ <>) (STR <>))
+ <COND (<EQUAL? ,WINNER ,PLAYER ,BUTLER>
+ <COND (<VERB? THROUGH WALK WALK-TO>
+ <RTRUE>)>)
+ (T <TELL "\"">)>
+ <TELL "Okay">
+ <COND (.OBJ
+ <TELL !\, HE .OBJ>
+ <COND (.STR <TELL " is now " .STR>)>
+ <COND (<=? .STR "on"> <FSET .OBJ ,ONBIT>)
+ (<=? .STR "off"> <FCLEAR .OBJ ,ONBIT>)
+ (<=? .STR "open"> <FSET .OBJ ,OPENBIT>)
+ (<=? .STR "closed"> <FCLEAR .OBJ ,OPENBIT>)
+ (<=? .STR "locked"> <FSET .OBJ ,LOCKED>)
+ (<=? .STR "unlocked"> <FCLEAR .OBJ ,LOCKED>)>)>
+ <COND (<OR .STR <NOT .OBJ>>
+ <COND (<NOT <==? ,WINNER ,PLAYER>>
+ <TELL ",\" says " 'WINNER ". " CHE ,WINNER " does so."CR>
+ <RTRUE>)>
+ <TELL "." CR>)>
+ <COND (<AND <ZERO? ,LIT>
+ <T? <SETG LIT <LIT? ;,HERE>>>>
+ <CRLF>
+ <V-LOOK>)>
+ <RTRUE>>
+
+<ROUTINE TOO-BAD-BUT ("OPTIONAL" (OBJ <>) (STR <>))
+ <TELL "Too bad, but">
+ <COND (.OBJ
+ <TELL HE .OBJ>)>
+ ;<THIS-IS-IT .OBJ>
+ <COND (.STR
+ <TELL " is " .STR>
+ <COND (<EQUAL? .STR "angry" "peeved">
+ <TELL " with you">)>
+ <TELL "." CR>)>
+ <RTRUE>>
+
+<ROUTINE TOO-DARK () ;("OPTIONAL" (OBJ 0)) <TELL "(It's too dark to see!)" CR>>
+
+"<ROUTINE NOT-ACCESSIBLE? (OBJ)
+ <COND (<EQUAL? <META-LOC .OBJ> ,WINNER ,HERE ,GLOBAL-OBJECTS> <RFALSE>)
+ (<VISIBLE? .OBJ> <RFALSE>)
+ (T <RTRUE>)>>"
+
+<ROUTINE VISIBLE? ;"can player SEE object?"
+ (OBJ "AUX" H L (X <>))
+ <COND (<NOT .OBJ> <RFALSE>)
+ (<ACCESSIBLE? .OBJ> <RTRUE>)>
+ <SET X <CORRIDOR-LOOK .OBJ>>
+ <COND (<NOT <ZERO? .X>>
+ <RETURN T ;.X>)>
+ <SET L <LOC .OBJ>>
+ <COND (<SEE-INSIDE? .L>
+ <VISIBLE? .L>)>>
+
+<ROUTINE ACCESSIBLE? (OBJ "AUX" L) ;"can player TOUCH object?"
+ <COND (<NOT .OBJ> <RFALSE>)
+ (T <SET L <LOC .OBJ>>)>
+ <COND (<FSET? .OBJ ,INVISIBLE>
+ <RFALSE>)
+ (<EQUAL? .OBJ ,PSEUDO-OBJECT>
+ <COND (<EQUAL? ,LAST-PSEUDO-LOC ,HERE>
+ <RTRUE>)
+ (T
+ <RFALSE>)>)
+ ;(<EQUAL? .OBJ ,CAR>
+ <COND (<EQUAL? <GETP ,CAR ,P?STATION> ,HERE>
+ <RTRUE>)
+ (T
+ <RFALSE>)>)
+ (<NOT .L>
+ <RFALSE>)
+ (<EQUAL? .L ,GLOBAL-OBJECTS>
+ <RTRUE>)
+ ;(<EQUAL? .L ,ROOMS>
+ <RETURN <SEE-INTO? .OBJ <>>>)
+ (<EQUAL? .L ,LOCAL-GLOBALS>
+ <RETURN <GLOBAL-IN? .OBJ ,HERE>>)
+ (<NOT <EQUAL? <META-LOC .OBJ> ,HERE>>
+ <RFALSE>)
+ (<EQUAL? .L ,WINNER ,HERE>
+ <RTRUE>)
+ (<OR <FSET? .L ,OPENBIT>
+ <FSET? .L ,SURFACEBIT>
+ <FSET? .L ,PERSONBIT>>
+ <ACCESSIBLE? .L>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE META-LOC (OBJ "OPTIONAL" (INV <>) "AUX" L)
+ <SET L <LOC .OBJ>>
+ <REPEAT ()
+ <COND (<NOT .L>
+ <RFALSE>)
+ (<EQUAL? .L ;,POCKET ,NOW-WEARING>
+ <RETURN ,HERE>)
+ (<EQUAL? .L ,LOCAL-GLOBALS ,GLOBAL-OBJECTS>
+ <RETURN .L>)
+ (<IN? .OBJ ,ROOMS>
+ <RETURN .OBJ>)
+ (T
+ <COND (<AND .INV <FSET? .OBJ ,INVISIBLE>>
+ <RFALSE>)>
+ <SET OBJ .L>
+ <SET L <LOC .OBJ>>)>>>
+
+<CONSTANT WHO-CARES-LENGTH 4>
+
+<GLOBAL WHO-CARES-VERB
+ <PLTABLE "do" "do" "let" "seem">>
+
+<GLOBAL WHO-CARES-TBL
+ <PLTABLE "n't appear interested"
+ "n't care"
+ " out a loud yawn"
+ " impatient">>
+
+<ROUTINE WHO-CARES ("AUX" N)
+ <SET N <RANDOM ,WHO-CARES-LENGTH>>
+ <HE-SHE-IT ,PRSO T <GET ,WHO-CARES-VERB .N>>
+ <TELL <GET ,WHO-CARES-TBL .N> "." CR>>
+
+<GLOBAL YUKS
+ <LTABLE 0
+ "That's ridiculous!"
+ "Surely you jest."
+ ;"Not a chance."
+ "Don't be silly."
+ "Not bloody likely."
+ ;"What a fruitcake!"
+ "What a concept!"
+ ;"What a screwball!"
+ "Like, totally grody, for sure."
+ "You can't be serious!">>
+" "
+"SUBTITLE REAL VERBS"
+
+<ROUTINE PRE-SAIM () <PERFORM ,V?AIM ,PRSI ,PRSO> <RTRUE>>
+<ROUTINE V-SAIM () <V-FOO>>
+
+<ROUTINE V-AIM () <YOU-CANT ;"aim">>
+
+<ROUTINE PRE-SANALYZE () <PERFORM ,V?ANALYZE ,PRSI ,PRSO> <RTRUE>>
+<ROUTINE V-SANALYZE () <V-FOO>>
+
+<ROUTINE PRE-ANALYZE ()
+ <COND (<ROOM-CHECK>
+ <RTRUE>)
+ (<OR <FSET? ,PRSO ,PERSONBIT> ;<EQUAL? ,PRSO ,YOU ,ME>>
+ <SETG CLOCK-WAIT T>
+ <TELL "(Leave that to the police.)" CR>)
+ ;(<AND <EQUAL? ,PRSI ,FINGERPRINTS>
+ <NOT <EQUAL? <META-LOC ,PRINT-KIT> ,HERE>>>
+ <NOT-HERE ,PRINT-KIT>
+ <RTRUE>)>>
+
+<ROUTINE V-ANALYZE ()
+ <COND ;(<EQUAL? ,PRSI ,FINGERPRINTS>
+ <TELL "You don't find any interesting prints." CR>
+ <RTRUE>)
+ (<FSET? ,PRSO ,PERSONBIT> <TELL "How?" CR>)
+ ;(<FSET? ,PRSO ,LIGHTBIT> <CHECK-ON-OFF>)
+ (<FSET? ,PRSO ,DOORBIT> <CHECK-DOOR ,PRSO>)
+ (T <TELL CHE ,PRSO look " normal." CR> ;<YOU-CANT "check">)>>
+
+<ROUTINE V-ANSWER ()
+ <COND (<T? ,AWAITING-REPLY>
+ <COND (<EQUAL? <GET ,P-LEXV ,P-CONT> ,W?YES>
+ <PERFORM ,V?YES>)
+ (T ;<EQUAL? <GET ,P-LEXV ,P-CONT> ,W?NO>
+ <PERFORM ,V?NO>)>)
+ (T <NOT-CLEAR-WHOM>
+ ;<TELL "Nobody is waiting for an answer." CR>)>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>>
+
+<ROUTINE V-REPLY ()
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <COND (<AND <FSET? ,PRSO ,PERSONBIT>
+ <NOT <FSET? ,PRSO ,MUNGBIT>>>
+ <WAITING-FOR-YOU-TO-SPEAK>)
+ (T <YOU-CANT ;"answer">)>>
+
+<ROUTINE WAITING-FOR-YOU-TO-SPEAK ()
+ <TELL CHE ,PRSO seem " to be waiting for you to speak." CR>>
+
+<GLOBAL EVIDENCE-FOUND:OBJECT <>>
+<ROUTINE PRE-ARREST ()
+ <COND (<EQUAL? ,PRSI ,ROOMS>
+ <SETG PRSI <>>)>
+ <COND (<OR <NOT <FSET? ,PRSO ,PERSONBIT>>
+ ;,PRSI>
+ <SETG CLOCK-WAIT T>
+ <TELL
+"(Are you sure you're a" ,FAMOUS-YOUNG-DETECTIVE "? Arresting " A ,PRSO "?!)"
+CR>)
+ (<T? ,CONFESSED>
+ <ALREADY ,CONFESSED "arrested">)
+ (<NOT <ZERO? ,LIONEL-SPEAKS-COUNTER>>
+ <TELL-BAD-FORM>
+ <RTRUE>)
+ (<NOT <DOBJ? GHOST-NEW>>
+ <UNSNOOZE ,PRSO>
+ <RFALSE>)>>
+
+<ROUTINE TELL-BAD-FORM ()
+ <SETG CLOCK-WAIT T>
+ <TELL "(Bad form">
+ <IAN-CALLS-YOU>
+ <TELL ". Wait until after dinner.)" CR>>
+
+<GLOBAL FAMOUS-YOUNG-DETECTIVE " famous young detective">
+<GLOBAL CONFESSED:OBJECT <>>
+<GLOBAL CAPTOR:OBJECT <>>
+
+<ROUTINE V-ARREST ()
+ <COND (<1? <QUEUED? ,I-SHOT>>
+ <RTRUE>) ;"I-SHOT will respond"
+ (<AND <==? ,VARIATION <GETP ,PRSO ,P?CHARACTER>>
+ ;<T? <GET ,FOUND-COSTUME ,PLAYER-C>>
+ <T? ,EVIDENCE-FOUND>>
+ <CONFESSION ,PRSO>)
+ (T
+ <SETG CLOCK-WAIT T>
+ <TELL
+"(It would be difficult to convict" HIM ,PRSO " with the evidence you've found.
+If you hope
+to put the culprit behind bars, you'll need more convincing proof.)"
+;" to solve this case so conclusively that the police will be able"
+CR>)>>
+
+<ROUTINE CONFESSION (PER "AUX" P (DEAD <>))
+ <SETG CONFESSED .PER>
+ <PUTP .PER ,P?LINE 2> ;"angry"
+ ;<QUEUE I-SEARCH 0>
+ <COND (<AND <T? ,TREASURE-FOUND>
+ <T? <GET ,FOUND-COSTUME ,PLAYER-C>>>
+ <SET P ,BUTLER>)
+ (<==? ,VARIATION ,LORD-C>
+ <SET P ,DOCTOR>)
+ (T <SET P ,LORD>)>
+ <SETG CAPTOR .P>
+ <UNSNOOZE .P T>
+ <PUTP .P ,P?LDESC 9 ;"waiting patiently">
+ <COND (<AND <FSET? .PER ,MUNGBIT>
+ <ZERO? <UNSNOOZE .PER>>>
+ <SET DEAD T>)
+ (T
+ <COND (<OR <ZERO? <GET ,TOLD-ABOUT-EVID
+ <GETP .PER ,P?CHARACTER>>>
+ <FIND-FLAG-HERE ,PERSONBIT ,PLAYER .PER>>
+ <TELL
+"At first" HE .PER " denies everything, but when you tell about" THE
+,EVIDENCE-FOUND "," HE .PER>)
+ (T <TELL CHE .PER>)>
+ <TELL " rushes at you! ">
+ <PUT <GT-O .PER> ,GOAL-FUNCTION ,NULL-F>)>
+ <TELL "Suddenly ">
+ <TELL D .P>
+ <COND (<NOT <IN? .P ,HERE>>
+ <MOVE .P ,HERE>
+ <PUT <GT-O .P> ,GOAL-ENABLE 0>
+ <TELL " appears and">)>
+ <COND (<ZERO? .DEAD>
+ <TELL
+" grabs" HIM .PER " from behind, saying, \"I'll guard this villain for
+you.\" Then " D .PER " glares at you and confesses to ">)
+ (T <TELL
+" agrees that" THE ,EVIDENCE-FOUND " proves " D .PER " guilty of ">)>
+ <COND (<EQUAL? .PER ,FRIEND>
+ <TELL "fraud.|">)
+ (T
+ <COND ;(<EQUAL? .PER ,LORD>
+ <TELL "double ">)
+ (<EQUAL? .PER ,PAINTER>
+ <TELL "attempted ">)>
+ <TELL "murder.|">)>
+ <COND (<ZERO? .DEAD>
+ <PUTP .PER ,P?LDESC 20 ;"ignoring you">)>
+ <COND (<AND <T? ,TREASURE-FOUND>
+ <T? <GET ,FOUND-COSTUME ,PLAYER-C>>>
+ <WRAP-UP>
+ <FINISH>)>
+ <RTRUE>>
+
+<ROUTINE WRAP-UP ()
+ <TELL "|
+(Congratulations, "TN"! Would you like to read the authors' version of
+the crime?)">
+ <COND (<NOT <YES?>>
+ <TELL "Okay." CR>)
+ (<EQUAL? ,VARIATION ,LORD-C>
+ <TELL
+'LORD " murdered Lionel in order to inherit the title and castle.|"
+'LOVER " was blackmailing " 'LORD " to marry her, because she knew he
+was plotting to kill Lionel. So Jack tried to do away with her, too, by
+dumping her down the well.|
+But Jack was wrong in thinking he killed " 'LOVER ". She survived and
+came back to the castle at night -- to play on " 'FRIEND "'s nerves,
+since her arrival seemed to be part of Jack's plot; to hunt for proof
+that Jack murdered Lionel; and to try to frame him for her own
+\"murder\" by planting" THE ,JEWEL " in his trouser cuff, until she lost
+it in the " 'DRAWING-ROOM "." CR>)
+ (<EQUAL? ,VARIATION ,FRIEND-C>
+ <TELL
+'FRIEND " doubted that she could hold " 'LORD "'s love. She was both
+jealous and fearful of " 'DEB " as a rival who might someday take Jack
+away from her. So she tried to defame " 'DEB " by making it appear "
+'DEB " was a vengeful ghost bent on killing Jack's new love, " 'FRIEND
+". " 'LOVER "'s death was purely an accident." CR>)
+ (<EQUAL? ,VARIATION ,DOCTOR-C>
+ <TELL
+'LOVER " strongly suspected that her grandfather died because of " 'DOCTOR
+"'s fiendish experiments on his patients. So she wrote a letter to
+Lionel, begging him to use his influence to investigate " 'DOCTOR ", which
+he did. However, " 'DOCTOR " found out what they were up to, and silenced
+both of them.|
+He has masqueraded as a ghost to cover his midnight searches for the "
+'ARTIFACT ". He intended the attacks on " 'FRIEND " to create the belief that
+" 'LOVER " might still be alive." CR>)
+ (T ;<EQUAL? ,VARIATION ,PAINTER-C>
+ <TELL
+'PAINTER " was intensely attached to " 'LOVER ", and
+she jealously hated " 'LORD " for coming between them. When " 'LOVER "
+accidentally fell down the well, " 'PAINTER " was convinced that she had
+committed suicide because she felt abandoned by Jack.|
+So " 'PAINTER " began her vengeful ghostly masquerade -- to find proof
+that Jack was responsible for " 'LOVER "'s death, to prick his guilty
+conscience and make him confess, and to terrorize " 'FRIEND ", who
+replaced " 'LOVER " in Jack's affections." CR>)>>
+
+;<ROUTINE PRE-ASK () <PRE-ASK-ABOUT>>
+
+<ROUTINE V-ASK ()
+ <COND (<AND <T? ,P-CONT>
+ <FSET? ,PRSO ,PERSONBIT>
+ <NOT <FSET? ,PRSO ,MUNGBIT>>>
+ <SETG WINNER ,PRSO>
+ <SETG QCONTEXT ,PRSO>)
+ (T <V-ASK-ABOUT>)>>
+
+<ROUTINE PRE-ASK-ABOUT ()
+ <COND (<DOBJ? BUST CREW-GLOBAL JACK-TAPE MUSIC OCEAN PIANO
+ PLAYER-NAME RECORDER VOICE>
+ <RFALSE>)
+ (<AND <DOBJ? COUSIN>
+ <IN? ,BUST ,HERE>>
+ <RETURN <DO-INSTEAD-OF ,BUST ,COUSIN>>)
+ (<AND <NOT <EQUAL? <META-LOC ,PRSO> ,HERE>>
+ <NOT <GLOBAL-IN? ,PRSO ,HERE>>>
+ <NOT-HERE ;-PERSON ,PRSO>
+ <RFATAL>)
+ (<OR <DOBJ? PLAYER>
+ ;<DOBJ? COUSIN MAID GHOST-OLD>
+ <NOT <FSET? ,PRSO ,PERSONBIT>>
+ ;<FSET? ,PRSO ,MUNGBIT>>
+ <COND (<AND <VERB? $CALL> <ZERO? ,P-CONT>>
+ <MISSING "verb">
+ <RFATAL>)
+ (<NOT <VERB? LISTEN>>
+ <WONT-HELP-TO-TALK-TO ,PRSO>
+ <RFATAL>)>)
+ (<NOT <GRAB-ATTENTION ,PRSO ,PRSI>>
+ <RFATAL>)>>
+
+;<ROUTINE NOT-HERE-PERSON (PER "AUX" L)
+ <SETG CLOCK-WAIT T>
+ <TELL !\( CTHE .PER " isn't ">
+ <COND (<VISIBLE? .PER>
+ <TELL "close enough">
+ <COND (<SPEAKING-VERB?> <TELL " to hear you">)>
+ <TELL !\.>)
+ (T <TELL "here!">)>
+ <TELL ")" CR>>
+
+<ROUTINE V-ASK-ABOUT ()
+ <COND (<OR <NOT <FSET? ,PRSO ,PERSONBIT>>
+ <FSET? ,PRSO ,MUNGBIT>>
+ <WONT-HELP-TO-TALK-TO ,PRSO>
+ <RFATAL>)
+ (<AND <VERB? ASK> <NOT <==? ,PRSO ,PLAYER>>>
+ <TELL "\"Ask me about something in particular.\"" CR>)
+ (T
+ <TELL CHE ,PRSO do "n't know anything interesting about">
+ <COND (<ZERO? ,PRSI> <TELL " that">)
+ (T <TELL THE ,PRSI>)>
+ <TELL "." CR>)>>
+
+<ROUTINE WONT-HELP-TO-TALK-TO (OBJ)
+ ;<VERB-PRINT>
+ <TELL
+"You talk to" THE .OBJ " for a minute before you realize that" HE .OBJ
+" won't respond." CR>>
+
+<ROUTINE PRE-ASK-CONTEXT-ABOUT ("OPTIONAL" (V 0) "AUX" P)
+ <COND (<ZERO? .V> <SET V ,V?ASK-ABOUT>)>
+ <COND (<QCONTEXT-GOOD?>
+ <PERFORM .V ,QCONTEXT ,PRSO>
+ <RTRUE>)
+ (<SET P <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,WINNER>>
+ <TELL-I-ASSUME .P " Ask">
+ <PERFORM .V .P ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-ASK-CONTEXT-ABOUT () <ARENT-TALKING>>
+
+;<ROUTINE PRE-ASK-FOR () <PRE-ASK-ABOUT>>
+
+<ROUTINE V-ASK-FOR ()
+ <COND (<AND <FSET? ,PRSO ,PERSONBIT>
+ <NOT <FSET? ,PRSO ,MUNGBIT>>
+ <NOT <==? ,PRSO ,PLAYER>>>
+ <TELL CTHE ,PRSO>
+ <COND (<IN? ,PRSI ,PRSO>
+ <MOVE ,PRSI ,WINNER>
+ <FSET ,PRSI ,TAKEBIT>
+ <FSET ,PRSI ,TOUCHBIT>
+ <FCLEAR ,PRSI ,NDESCBIT>
+ <FCLEAR ,PRSI ,SECRETBIT>
+ <TELL " hands you" THE ,PRSI>
+ <FSET ,PRSI ,SEENBIT>
+ <TELL "." CR>)
+ (T <TELL " doesn't have" THE ,PRSI "." CR>)>)
+ (T <HAR-HAR>)>>
+
+<ROUTINE PRE-ASK-CONTEXT-FOR ("AUX" P)
+ <COND (<FSET? <SET P <LOC ,PRSO>> ,PERSONBIT>
+ <PERFORM ,V?ASK-FOR .P ,PRSO>
+ <RTRUE>)
+ (T <PRE-ASK-CONTEXT-ABOUT ,V?ASK-FOR>)>>
+
+<ROUTINE V-ASK-CONTEXT-FOR () <ARENT-TALKING>>
+
+<ROUTINE V-ATTACK () <IKILL "attack">>
+
+<ROUTINE V-BOW ("AUX" P)
+ <SET P ,PRSO>
+ <COND (<ZERO? .P>
+ <SET P <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,WINNER>>
+ <COND (<ZERO? .P>
+ <TELL "No one notices." CR>
+ <RTRUE>)>)>
+ <COND (<OR <NOT <FSET? .P ,PERSONBIT>>
+ <EQUAL? .P ,PLAYER>>
+ <HAR-HAR>)
+ (<NOT <GRAB-ATTENTION .P>>
+ <RTRUE>)
+ (T
+ <TELL CHE .P !\ >
+ <COND (<FSET? .P ,FEMALE> <TELL "curtsey">) (T <TELL "bow">)>
+ <TELL "s back to you." CR>)>>
+
+;<ROUTINE PRE-BRING ()
+ <COND (<AND <NOT <EQUAL? ,PRSI <> ,PLAYER ,GLOBAL-HERE>>
+ <NOT <EQUAL? ,PRSI ,PLAYER-NAME>>>
+ <DONT-UNDERSTAND>)>>
+
+;<ROUTINE V-BRING () <V-TAKE> ;<YOU-CANT ;"bring">>
+
+;<ROUTINE PRE-SBRING () <PERFORM ,V?BRING ,PRSI ,PRSO> <RTRUE>>
+;<ROUTINE V-SBRING () <V-FOO>>
+
+<ROUTINE PRE-BRUSH ()
+ <COND (<AND <DOBJ? ROOMS>
+ <NOT <EQUAL? ,P-PRSA-WORD ,W?SCRAPE ,W?SCRATCH>>>
+ <SETG PRSO ,WINNER>
+ <RFALSE>)>>
+
+<GLOBAL AHHH "Ahhh! How refreshing!|">
+
+<ROUTINE V-BRUSH ()
+ <COND (<OR <NOT <EQUAL? ,P-PRSA-WORD ,W?SCRAPE ,W?SCRATCH>>
+ <FSET? ,PRSO ,PERSONBIT>>
+ <COND (<EQUAL? ,HERE ,YOUR-BATHROOM ,KITCHEN>
+ <COND (<DOBJ? HANDS HEAD PLAYER ;ROOMS>
+ <SETG WASHED T>
+ <TELL ,AHHH>)
+ (<FSET? ,PRSO ,PERSONBIT>
+ <FACE-RED>)
+ (T <UNCLEAN>)>)
+ (T <TELL-FIND-NONE "a sink">)>)
+ (T <UNCLEAN>)>>
+
+<ROUTINE UNCLEAN ()
+ <TELL
+"You try for a minute and then decide it's an endless task." CR>>
+
+;<ROUTINE PRE-BURN ()
+ <COND (<ZERO? ,PRSI>
+ <TELL-NO-PRSI>)
+ ;(<EQUAL? ,PRSI ,LIGHTER>
+ <RFALSE>)
+ (T
+ <SETG CLOCK-WAIT T>
+ <TELL "(With a " D ,PRSI "??!?)" CR>)>>
+
+;<ROUTINE V-BURN () <YOU-CANT>>
+
+<ROUTINE REMOVE-CAREFULLY ("OPTIONAL" (OBJ <>) "AUX" OLIT)
+ <SET OLIT ,LIT>
+ <COND (<T? .OBJ>
+ <NOT-IT .OBJ>
+ <MOVE .OBJ ,LOCAL-GLOBALS>)>
+ <SETG LIT <LIT? ;,HERE>>
+ <COND (<AND <T? .OLIT> <ZERO? ,LIT>>
+ <TELL "You are left in the dark..." CR>)>
+ T>
+
+;<ROUTINE PRE-$CALL () <PRE-ASK-ABOUT>>
+
+<ROUTINE V-$CALL () ;("AUX" (MOT <>))
+ <UNSNOOZE ,PRSO>
+ <COND (<FSET? ,PRSO ,PERSONBIT>
+ <COND (<==? <META-LOC ,PRSO> ,HERE>
+ <COND (<GRAB-ATTENTION ,PRSO>
+ ;<FCLEAR ,PRSO ,TOUCHBIT>
+ <PUTP ,PRSO ,P?LDESC 12 ;"listening to you">
+ <TELL CTHE ,PRSO>
+ <COND ;(.MOT
+ <TELL
+V ,PRSO stop " and" V ,PRSO turn " toward you." CR>)
+ (T <TELL
+" is " <GET ,LDESC-STRINGS 12> ;"listening to you" "." CR>)>)
+ (T
+ ;<TELL " ignores you." CR>
+ <RFATAL>)>)
+ (<CORRIDOR-LOOK ,PRSO>
+ <COND ;(<COR-GRAB-ATTENTION ;,PRSO>
+ <RTRUE>)
+ (T
+ <TELL CTHE ,PRSO " ignores you." CR>)>)
+ (T <NOT-HERE ,PRSO>)>)
+ (T <SETG CLOCK-WAIT T> <MISSING "verb">)>>
+
+<ROUTINE V-CHASTISE ()
+ <COND (<NOT <EQUAL? ,PRSO ,INTDIR>>
+ <TELL
+,I-ASSUME " Look at" HIM ,PRSO ", not look in" HIM ,PRSO " nor look for"
+HIM ,PRSO " nor any other preposition.]" CR>)>
+ <PERFORM ,V?EXAMINE ,PRSO>
+ <RTRUE>>
+
+<ROUTINE V-BOARD ()
+ <COND (<OR <IN? ,PRSO ,ROOMS> <FSET? ,PRSO ,DOORBIT>>
+ <V-THROUGH>)
+ (<AND <FSET? ,PRSO ,VEHBIT>
+ ;<FSET? ,PRSO ,CONTBIT>>
+ ;<V-SIT T>
+ <COND (<IN? ,WINNER ,PRSO>
+ <ALREADY ,PLAYER>
+ <TELL "in" THE ,PRSO ".)" CR>)
+ (T
+ <MOVE ,WINNER ,PRSO>
+ <TELL "You are now ">
+ <COND (<FSET? ,PRSO ,SURFACEBIT>
+ <TELL "on">)
+ (T <TELL "in">)>
+ <TELL THE ,PRSO "." CR>
+ ;<APPLY <GETP ,PRSO ,P?ACTION> ,M-ENTER>
+ <RTRUE>)>)
+ (T <YOU-CANT "get in">)>>
+
+<ROUTINE V-CLIMB-ON ()
+ <PERFORM ,V?SIT ,PRSO>
+ <RTRUE>>
+
+<ROUTINE V-CLIMB-UP ("OPTIONAL" (DIR ,P?UP) (OBJ <>) "AUX" X)
+ <COND (<IN? ,PRSO ,ROOMS> ;"GO UP TO room"
+ <PERFORM ,V?WALK-TO ,PRSO>
+ <RTRUE>)
+ (<GETPT ,HERE .DIR>
+ <DO-WALK .DIR>
+ <RTRUE>)
+ (<NOT .OBJ>
+ <YOU-CANT "go">)
+ (ELSE <HAR-HAR>)>>
+
+<ROUTINE V-CLIMB-DOWN () <V-CLIMB-UP ,P?DOWN>>
+
+<ROUTINE V-CLOSE ()
+ <COND (<NOT <OR <FSET? ,PRSO ,CONTBIT>
+ <FSET? ,PRSO ,DOORBIT>
+ <EQUAL? ,PRSO ,WINDOW>>>
+ <YOU-CANT ;"close">)
+ (<OR <FSET? ,PRSO ,DOORBIT>
+ <EQUAL? ,PRSO ,WINDOW>>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <COND ;(<FSET? ,PRSO ,MUNGBIT>
+ <TELL
+"It won't stay closed. The latch is broken." CR>)
+ (T
+ <OKAY ,PRSO "closed">)>)
+ (T <ALREADY ,PRSO "closed">)>)
+ (<AND <NOT <FSET? ,PRSO ,SURFACEBIT>>
+ <NOT <0? <GETP ,PRSO ,P?CAPACITY>>>>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <OKAY ,PRSO "closed">)
+ (T <ALREADY ,PRSO "closed">)>)
+ (T <YOU-CANT ;"close">)>>
+
+<ROUTINE PRE-COMPARE ()
+ <COND (<AND <ZERO? ,PRSI>
+ <==? 1 <GET/B ,P-PRSO ,P-MATCHLEN>>>
+ <SETG CLOCK-WAIT T>
+ <TELL "[Oops! Try: COMPARE IT TO" ,SOMETHING>
+ <RTRUE>)
+ (<==? 2 <GET/B ,P-PRSO ,P-MATCHLEN>>
+ <PUT/B ,P-PRSO ,P-MATCHLEN 1>
+ <PERFORM ,PRSA <GET/B ,P-PRSO 1> <GET/B ,P-PRSO 2>>
+ <RTRUE>)>>
+
+<ROUTINE V-COMPARE ()
+ <COND (<==? ,PRSO ,PRSI> <TELL "They're the same thing!" CR>)
+ (T
+ <COND (<EQUAL? ,PLAYER ,PRSO ,PRSI>
+ <TELL "You">)
+ (T <TELL "They">)>
+ <TELL "'re not a bit alike." CR>)>>
+
+<ROUTINE V-CONFRONT ()
+ <COND (<==? ,PRSO ,PLAYER>
+ <ARENT-TALKING>)
+ (<NOT <FSET? ,PRSO ,PERSONBIT>>
+ <TELL "Wow! That ought to put a scare into" HIM ,PRSO "!" CR>)
+ (T <WHO-CARES>)>>
+
+;<ROUTINE V-COUNT () <TELL "Uhhh... ONE!" CR>>
+
+;<ROUTINE V-CUT () <YOU-CANT ;"cut">>
+
+<ROUTINE V-MUNG ()
+ <COND (<AND <FSET? ,PRSO ,DOORBIT> <ZERO? ,PRSI>>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <TELL
+"You'd fly through the open door if you tried." CR>)
+ (<UNLOCK-DOOR? ,PRSO>
+ <TELL "Why don't you just open it instead?" CR>)
+ (T <IF-SPY>)>)
+ (<NOT <FSET? ,PRSO ,PERSONBIT>>
+ <IF-SPY>)
+ (T <IKILL "hurt">)>>
+
+<ROUTINE V-DANCE ("AUX" OW)
+ <COND (<AND <NOT <EQUAL? ,WINNER ,PLAYER>>
+ <EQUAL? ,PRSO ;<> ,PLAYER>>
+ <SET OW ,WINNER>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?DANCE .OW>
+ <SETG WINNER .OW>
+ <RTRUE>)
+ ;(<ZERO? ,PRSO>
+ <TELL "You dance by " 'PLAYER " for a minute." CR>)
+ (<NOT <FSET? ,PRSO ,PERSONBIT>>
+ <HAR-HAR>)
+ (<IN-MOTION? ,PRSO>
+ <TOO-BAD-BUT ,PRSO "too busy">
+ ;<TELL CHE ,PRSO " seems too busy to dance right now." CR>)
+ (<OR <AND <ZERO? ,GENDER-KNOWN>
+ <EQUAL? ,WINNER ,PLAYER>>
+ <AND <NOT <FSET? ,WINNER ,FEMALE>>
+ <FSET? ,PRSO ,FEMALE>>
+ <AND <FSET? ,WINNER ,FEMALE>
+ <NOT <FSET? ,PRSO ,FEMALE>>>>
+ <TELL CHE ,WINNER dance " with" HIM ,PRSO " for a minute." CR>)
+ (T <TELL CHE ,PRSO " doesn't fancy a dance with you." CR>)>>
+
+<ROUTINE PRE-DESCRIBE ()
+ <COND (<==? ,WINNER ,PLAYER>
+ <COND (<EQUAL? ,PRSI <> ,ROOMS>
+ <COND (<QCONTEXT-GOOD?>
+ <SETG WINNER ,QCONTEXT>
+ <PERFORM ,PRSA ,PRSO>
+ <RTRUE>)
+ (T <ARENT-TALKING>)>)
+ (T
+ <PERFORM ,V?TELL-ABOUT ,PRSI ,PRSO>
+ <RTRUE>)>)>>
+
+<ROUTINE V-DESCRIBE () <V-FOO>>
+
+;<ROUTINE V-DIAGNOSE ()
+ <COND (<T? ,PRSO> <YOU-CANT ;"diagnose">)
+ (T <TELL CHE ,WINNER is " wide awake and in good health." CR>)>>
+
+;<ROUTINE PRE-DISCUSS ()
+ <COND (<ZERO? ,PRSI> <SETG PRSI ,PLAYER>)>
+ <PERFORM ,V?TELL-ABOUT ,PRSI ,PRSO>
+ <RTRUE>>
+
+;<ROUTINE V-DISCUSS () <V-FOO>>
+
+<ROUTINE V-UNDRESS ()
+ <COND (<EQUAL? ,PRSO ,ROOMS ,PLAYER>
+ <COND (<ZERO? ,NOW-WEARING>
+ <ALREADY ,PLAYER "undressed">)
+ (T
+ <SETG PRSO <>>
+ <V-WEAR>)>)
+ (<FSET? ,PRSO ,PERSONBIT>
+ <COND (<FSET? ,PRSO ,MUNGBIT>
+ <SETG CLOCK-WAIT T>
+ <TELL "(Not in a family story!)" CR>)
+ (T <FACE-RED>)>)
+ (T <HAR-HAR>)>>
+
+<ROUTINE V-DRESS ("AUX" X)
+ <COND (<DOBJ? ROOMS PLAYER>
+ <COND (<AND <ZERO? ,NOW-WEARING>
+ <EQUAL? ,PLAYER ,WINNER ,PRSO>>
+ <COND (<OR <SET X <FIND-FLAG ,WINNER ,WEARBIT>>
+ <SET X <FIND-FLAG ,HERE ,WEARBIT>>>
+ <TELL-I-ASSUME .X " Wear">
+ <PERFORM ,V?WEAR .X>
+ <RTRUE>)
+ (T
+ <SETG CLOCK-WAIT T>
+ <TELL "(You didn't say what to wear!)" CR>)>)
+ (T <ALREADY ,WINNER "dressed">)>)
+ (<FSET? ,PRSO ,PERSONBIT>
+ <ALREADY ,WINNER "dressed">)
+ (<FSET? ,PRSO ,WEARBIT>
+ <V-WEAR>
+ <RTRUE>)
+ (<SET X <FIND-OUTFIT>>
+ <TELL-I-ASSUME .X>
+ <SETG PRSO .X>
+ <V-WEAR>
+ <RTRUE>)
+ (T <HAR-HAR>)>>
+
+<ROUTINE FIND-OUTFIT ("AUX" X)
+ <OR <FIND-FLAG ,WINNER ,WEARBIT ,NOW-WEARING>
+ <FIND-FLAG-HERE ,WEARBIT>
+ <FIND-OUTFIT-IN ,LUGGAGE>
+ <FIND-OUTFIT-IN ,BED>
+ <FIND-OUTFIT-IN ,CHEST-OF-DRAWERS>
+ <FIND-OUTFIT-IN ,WARDROBE>>>
+
+<ROUTINE FIND-OUTFIT-IN (OBJ "AUX" X)
+ <COND (<AND <==? <META-LOC .OBJ> ,HERE>
+ <SET X <FIND-FLAG .OBJ ,WEARBIT>>>
+ <COND (<NOT <FSET? .OBJ ,OPENBIT>>
+ <FSET .OBJ ,OPENBIT>
+ <FIRST-YOU "open" .OBJ>)>
+ .X)>>
+
+<ROUTINE V-CHANGE ("AUX" X)
+ <COND (<DOBJ? SLEEP-OUTFIT DINNER-OUTFIT
+ EXERCISE-OUTFIT TWEED-OUTFIT ROOMS ;CLOTHES>
+ <COND (<SET X <FIND-OUTFIT>>
+ <PERFORM ,V?WEAR .X>
+ <RTRUE>)
+ (<NOT <EQUAL? <META-LOC ,LUGGAGE> ,HERE>>
+ <TELL
+"You look around for " D ,LUGGAGE " but don't find it." CR>)
+ (<SET X <FIND-FLAG ,LUGGAGE ,WEARBIT>>
+ <FSET ,LUGGAGE ,OPENBIT>
+ <PERFORM ,V?WEAR .X>
+ <RTRUE>)
+ (T <TELL "You can't find anything to change into."CR>)>)
+ (T <YOU-CANT ;"change">)>>
+
+<ROUTINE PRE-DRIVE-TO ()
+ <COND (<NOT <DOBJ? CAR>>
+ <DONT-UNDERSTAND>)
+ (<NOT <EQUAL? <LOC ,WINNER> ;,HERE ,CAR>>
+ <TELL-NOT-IN ,CAR>
+ <RTRUE>)
+ (<IOBJ? INTDIR>
+ <DO-WALK ,P-DIRECTION>
+ <RTRUE>)
+ (T
+ <PERFORM ,V?WALK-TO ,PRSI>
+ <RTRUE>)>>
+
+<ROUTINE TELL-NOT-IN (OBJ)
+ <SETG CLOCK-WAIT T>
+ <TELL !\( CHE ,WINNER is " not in" HIM .OBJ "!)" CR>>
+
+<ROUTINE V-DRIVE-TO () <V-FOO>>
+
+<ROUTINE V-DRINK () <YOU-CANT ;"drink">>
+
+<ROUTINE V-DROP ("AUX" L)
+ <COND (<IDROP>
+ <COND (<OR <IN? <SET L ,TABLE-DINING> ,HERE>
+ <SET L <FIND-FLAG-HERE ,VEHBIT;,SURFACEBIT ,PRSO>>>
+ <MOVE ,PRSO .L>
+ <OKAY ,PRSO>
+ <TELL " is now on" THE .L "." CR>)
+ (T
+ <OKAY ,PRSO <GROUND-DESC>>)>)>>
+
+<ROUTINE GROUND-DESC ()
+ <COND (<OR <NOT <OUTSIDE? ,HERE>>
+ <EQUAL? <LOC ,WINNER> ;,HERE ,CAR>>
+ "on the floor")
+ (T "on the ground")>>
+
+<ROUTINE PRE-EAT ()
+ <COND (<EQUAL? ,PRSO <> ,ROOMS>
+ <COND (<EQUAL? <META-LOC ,DINNER> ,HERE>
+ ;<SETG PRSO ,DINNER>
+ <PERFORM ,PRSA ,DINNER>
+ <RTRUE>)
+ (T
+ <NOT-HERE ,DINNER>
+ <RTRUE>)>)>>
+
+<ROUTINE V-EAT () <TELL "It's hard to believe you're that hungry." CR>>
+
+<ROUTINE PRE-EMPTY ()
+ <COND (<DOBJ? ROOMS>
+ <COND (<==? ,HERE <META-LOC ,LUGGAGE>>
+ <SETG PRSO ,LUGGAGE>) ;"works if LUGGAGE-F passes"
+ (T <NOT-HERE ,LUGGAGE> <RTRUE>)>)>
+ <COND (<DOBJ? POND>
+ <WONT-HELP>)
+ (<DOBJ? VIVIEN-BOX WENDISH-KIT>
+ <YOU-SHOULDNT>)
+ (<AND <NOT <DOBJ? BOTTLE>>
+ <NOT <FIRST? ,PRSO>>>
+ <ALREADY ,PRSO "empty">)
+ (<AND <T? ,PRSI>
+ <NOT <IN? ,PRSI ,ROOMS>>
+ <NOT <FSET? ,PRSI ,CONTBIT>>>
+ <TELL-FIND-NONE "an opening in" ,PRSI>
+ <RFATAL>)
+ (<AND <DOBJ? CAR>
+ <ZERO? ,PRSI>>
+ <PERFORM ,PRSA ,PRSO <LOC ,CAR>>
+ <RTRUE>)>>
+
+<ROUTINE V-EMPTY ()
+ <COND ;(<AND <DOBJ? LUGGAGE>
+ <NOT <==? ,HERE ,YOUR-ROOM>>>
+ <TELL-FIND-NONE "a place for your stuff">)
+ (<FSET? ,PRSO ,CONTBIT>
+ <TELL CHE ,WINNER empti THE ,PRSO>
+ <COND (<ZERO? ,PRSI>
+ <COND (<AND <NOT <DOBJ? COFFIN>>
+ <SETG PRSI <FIND-FLAG-HERE ,CONTBIT ,PRSO>>>
+ <FSET ,PRSI ,OPENBIT>
+ <TELL " into" THE ,PRSI>)
+ (T
+ <SETG PRSI ,HERE>
+ <TELL !\ <GROUND-DESC>>)>)>
+ <TELL "." CR>
+ <COND (<AND <NOT <==? ,PRSI ,HERE>>
+ <G? <+ <WEIGHT ,PRSI> <WEIGHT ,PRSO>>
+ <GETP ,PRSI ,P?CAPACITY>>>
+ <TELL ,NOT-ENOUGH-ROOM>)
+ (T
+ <ROB ,PRSO ,PRSI>
+ <RTRUE>)>)
+ (T <YOU-CANT>)>>
+
+<ROUTINE PRE-THROUGH ()
+ <COND (<DOBJ? ROOMS GLOBAL-HERE>
+ <DO-WALK ,P?IN>
+ <RTRUE>)
+ (<T? ,PRSI> ;"DRIVE CAR THRU object"
+ <COND (<DOBJ? CAR>
+ <COND (<EQUAL? <LOC ,WINNER> ;,HERE ,CAR>
+ <SETG PRSO ,PRSI>
+ <RFALSE>)
+ (T
+ <TELL-NOT-IN ,CAR>
+ <RTRUE>)>)
+ (T <DONT-UNDERSTAND>)>)>>
+
+<ROUTINE V-THROUGH ;("OPTIONAL" (OBJ <>)) ("AUX" RM DIR)
+ <COND (<AND <OR <NOUN-USED? ,W?DOOR ,W?GATE ,W?HOLE>
+ <NOUN-USED? ,W?PANEL>>
+ ;<FSET? ,PRSO ,DOORBIT>
+ <OR <FSET? ,PRSO ,OPENBIT>
+ <WALK-THRU-DOOR? <> ,PRSO <>>>>
+ <COND (<AND <SET RM <DOOR-ROOM ,HERE ,PRSO>>
+ <GOTO .RM>>
+ ;<OKAY>
+ T)
+ (T
+ <V-FOO>
+ ;<TELL
+"(Sorry, but" THE ,PRSO " must be somewhere else.)" CR>)>)
+ (<IN? ,PRSO ,ROOMS>
+ <COND (<==? ,PRSO ,HERE>
+ <WALK-WITHIN-ROOM>)
+ (<SEE-INTO? ,PRSO <>>
+ <GOTO ,PRSO>)
+ (T <PERFORM ,V?WALK-TO ,PRSO>)>
+ <RTRUE>)
+ (<AND <FSET? ,PRSO ,VEHBIT>
+ ;<FSET? ,PRSO ,CONTBIT>>
+ <PERFORM ,V?BOARD ,PRSO>
+ ;<V-SIT T>)
+ (<FSET? ,PRSO ,PERSONBIT>
+ <HAR-HAR>)
+ (<AND ;<NOT .OBJ> <NOT <FSET? ,PRSO ,TAKEBIT>>>
+ <TELL CHE ,WINNER bang " into" THE ,PRSO>
+ <THIS-IS-IT ,PRSO>
+ <TELL " trying to go through" HIM ,PRSO "." CR>)
+ ;(.OBJ <TELL "You can't do that!" CR>)
+ ;(<IN? ,PRSO ,WINNER>
+ <TELL "You must think you're a contortionist!" CR>)
+ (ELSE <HAR-HAR>)>>
+
+<ROUTINE PRE-EXAMINE () <ROOM-CHECK>>
+
+<ROUTINE V-EXAMINE ("AUX" (TXT <>))
+ <COND (<OR <==? ,PRSO ,PSEUDO-OBJECT>
+ <AND <NOUN-USED? ,W?DOOR ;,W?DOORS ,W?PANEL ;,W?KEYHOLE>
+ <GLOBAL-IN? ,PRSO ,HERE>>>
+ <SET TXT T>)>
+ <COND (<DOBJ? INTDIR>
+ <SETG CLOCK-WAIT T>
+ <TELL "(If you want to see what's there, go there!)" CR>)
+ (<DOBJ? CASTLE HANDS HEAD ;POCKET TOWER WALL LIGHT-GLOBAL>
+ <NOTHING-SPECIAL>)
+ ;(<DOBJ? NOW-WEARING>
+ <TELL <GETP ,PRSO ,P?TEXT> CR>)
+ (<IN? ,PRSO ,GLOBAL-OBJECTS>
+ <NOT-HERE ,PRSO>
+ <RTRUE>)
+ (<AND <IN? ,PRSO ,ROOMS> ;<FSET? ,PRSO ,RLANDBIT>
+ <ZERO? .TXT>>
+ <ROOM-PEEK ,PRSO>)
+ (<AND <NOT <EQUAL? <META-LOC ,PRSO> ,HERE>>
+ <NOT <GLOBAL-IN? ,PRSO ,HERE>>
+ <ZERO? .TXT>>
+ <TOO-BAD-BUT ,PRSO "too far away">)
+ (<SET TXT <GETP ,PRSO ,P?TEXT>>
+ <TELL .TXT CR>)
+ (<FSET? ,PRSO ,DOORBIT>
+ <CHECK-DOOR ,PRSO>)
+ (<OR <FSET? ,PRSO ,CONTBIT>
+ <FSET? ,PRSO ,SURFACEBIT>
+ ;<NOUN-USED? ,W?KEYHOLE>>
+ <V-LOOK-INSIDE>)
+ (T <NOTHING-SPECIAL>)>>
+
+<ROUTINE NOTHING-SPECIAL ()
+ <TELL
+"You look over" THE ,PRSO " for a minute and find nothing suspicious
+-- for now." CR>>
+
+<ROUTINE GLOBAL-IN? (OBJ1 OBJ2 "AUX" TBL (VAL <>))
+ <COND (<SET TBL <GETPT .OBJ2 ,P?GLOBAL>>
+ %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '<SET VAL <ZMEMQ .OBJ1 .TBL <RMGL-SIZE .TBL>>>)
+ (T
+ '<SET VAL <ZMEMQB .OBJ1 .TBL <RMGL-SIZE .TBL>>>)>)>
+ <COND (<AND <ZERO? .VAL> <EQUAL? .OBJ1 .OBJ2>>
+ <SET VAL T>)>
+ .VAL>
+
+<ROUTINE V-FAINT ()
+ <TELL
+CHE ,WINNER tri HIS ,WINNER " best, but" HE ,WINNER is " too excited." CR>>
+
+;<ROUTINE PRE-FILL ()
+ <COND (<AND ,PRSI ;<NOT <EQUAL? ,PRSI ,GLOBAL-WATER>>>
+ <HAR-HAR>)>>
+
+<ROUTINE V-FILL ()
+ <YOU-CANT>
+ ;<TELL "You may know how to do that, but this story doesn't." CR>>
+
+<ROUTINE PRE-FIND ()
+ <COND (<DOBJ? PLAYER PLAYER-NAME>
+ <RFALSE>)
+ (<AND <FSET? ,PRSO ,SECRETBIT>
+ <NOT <FSET? ,PRSO ,SEENBIT>>>
+ <NO-FUN>)
+ (<IN? ,PRSO ,ROOMS>
+ <COND (<==? ,PRSO ,HERE>
+ <ALREADY ,WINNER "here">)
+ (T
+ <PERFORM ,V?WALK-TO ,PRSO>
+ <RTRUE>)>)
+ (<AND <FSET? ,PRSO ,PERSONBIT>
+ ;<NOT <==? ,PRSO ,OTHER-CHAR>>>
+ <COND (<AND <==? <META-LOC ,WINNER> <META-LOC ,PRSO>>
+ <NOT <FSET? ,PRSO ,NDESCBIT>>>
+ <BITE-YOU>
+ <RTRUE>)
+ (<NOT <FOLLOW-LOC?>>
+ <WHO-KNOWS? ,PRSO>
+ <RFATAL>)>
+ <RTRUE>)>>
+
+<ROUTINE BITE-YOU ()
+ <TELL "If" HE ,PRSO " were any closer," HE ,PRSO "'d bite you!" CR>>
+
+<ROUTINE FAR-AWAY? (L)
+ <COND (<ZERO? <GETP ,HERE ,P?LINE>>
+ <RTRUE>)
+ (<EQUAL? .L ,GLOBAL-OBJECTS>
+ <RTRUE>)
+ (<AND <FSET? .L ,SECRETBIT>
+ <NOT <FSET? .L ,SEENBIT>>>
+ <RTRUE>)
+ (<AND <EQUAL? .L ,YOUR-ROOM>
+ <EQUAL? ,HERE ,YOUR-BATHROOM>>
+ <RFALSE>)
+ (<AND <EQUAL? .L ,YOUR-BATHROOM>
+ <EQUAL? ,HERE ,YOUR-ROOM>>
+ <RFALSE>)
+ (<ZERO? <GETP .L ,P?LINE>>
+ <RTRUE>)
+ (<AND <NOT <FSET? ,FRIEND ,TOUCHBIT>>
+ <NOT <EQUAL? .L ,CAR ,DRIVEWAY ,COURTYARD>>>
+ <RTRUE>)
+ (<EQUAL? ,HERE ;,CAR ,DRIVEWAY>
+ <COND (<EQUAL? .L ,CAR ,DRIVEWAY>
+ <RFALSE>)
+ (<ZERO? <GETB ,LAST-NAME 0>>
+ <RTRUE>)>)>
+ <COND (<OR <AND <FSET? ,HERE ,SECRETBIT>
+ <NOT <FSET? .L ,SECRETBIT>>>
+ <AND <NOT <FSET? ,HERE ,SECRETBIT>>
+ <FSET? .L ,SECRETBIT>>>
+ <RETURN <NOT <SEE-INTO? .L <> ;T> ;<GLOBAL-IN? .L ,HERE>>>)>
+ <RFALSE>>
+
+<ROUTINE V-FIND ("AUX" (L <LOC ,PRSO>))
+ <COND (<==? ,PRSO ,PLAYER>
+ <TELL "You're right here, ">
+ <TELL-LOCATION>
+ <CRLF>)
+ (<DOBJ? ;EYE HEAD HANDS>
+ <BITE-YOU>)
+ (<HELD? ,PRSO>
+ <TELL "You have it." CR>)
+ (<OR <FSET? ,PRSO ,SECRETBIT>
+ <==? ,PRSO ,ARTIFACT>>
+ <NO-FUN>)
+ (<VISIBLE? ,PRSO>
+ ;<OR <GLOBAL-IN? ,PRSO ,HERE>
+ ;<EQUAL? <META-LOC ,PRSO> ,HERE>
+ <IN? ,PRSO ,HERE>
+ <==? ,PRSO ,PSEUDO-OBJECT>>
+ <COND (<FSET? ,PRSO ,SECRETBIT>
+ <DISCOVER ,PRSO>)
+ (T <TELL "It's right here." CR>)>)
+ (<AND ;<NOT <FSET? ,PRSO ,TOUCHBIT>>
+ <NOT <FSET? ,PRSO ,SEENBIT>>
+ ;<OR <IN? ,PRSO ,ROOMS>
+ ;<FSET? ,PRSO ,PERSONBIT>
+ <FSET? ,PRSO ,SECRETBIT>>>
+ <NOT-HERE ,PRSO T>)
+ (<OR <EQUAL? .L ,GLOBAL-OBJECTS ,LOCAL-GLOBALS>
+ ;<EQUAL? ,PRSO ,DRAPES>>
+ <TELL "It's around somewhere." CR>)
+ (<FAR-AWAY? <META-LOC ,PRSO>>
+ <TELL "It's far away from here." CR>)
+ (<FSET? .L ,PERSONBIT>
+ <THIS-IS-IT .L>
+ <TELL CTHE .L " probably has it." CR>)
+ (<OR <FSET? .L ,SURFACEBIT>
+ <FSET? .L ,CONTBIT>
+ <IN? .L ,ROOMS>>
+ <THIS-IS-IT .L>
+ <TELL "It's probably ">
+ <COND (<FSET? .L ,SURFACEBIT> <TELL "on">) (T <TELL "in">)>
+ <TELL THE .L "." CR>)
+ (ELSE
+ <TELL "It's nowhere in particular." CR>)>>
+
+<ROUTINE NO-FUN ()
+ <SETG CLOCK-WAIT T>
+ <TELL "(If it's that easy, it spoils the fun!)" CR>>
+
+<ROUTINE TELL-LOCATION ("AUX" DIR)
+ ;<COND (<EQUAL? ,HERE ,UNCONSCIOUS>
+ <TELL "unconscious.">
+ <RTRUE>)>
+ <COND (<NOT <IN? ,PLAYER ,HERE>>
+ <TELL "sitting ">)>
+ ;<COND (<ZERO? ,PLAYER-SEATED> T)
+ (<L? 0 ,PLAYER-SEATED> <TELL "sitting ">)
+ (T <TELL "lying ">)>
+ <COND (<FSET? ,HERE ,SURFACEBIT>
+ <TELL "on">)
+ (T
+ <TELL "in">)>
+ <TELL THE ,HERE ".">>
+
+;<ROUTINE V-FIND-WITH () <V-FIND>>
+
+<ROUTINE V-FIX () <MORE-SPECIFIC>>
+
+<ROUTINE FOLLOW-LOC? ("AUX" L)
+ <SET L <GETP ,PRSO ,P?CHARACTER>>
+ <COND ;(<L? ,GHOST-NEW-C .L>
+ <RFALSE>)
+ (<SET L <GET ,FOLLOW-LOC .L>>
+ <TELL "The last you knew," HE ,PRSO " was ">
+ <COND (<FSET? .L ,SURFACEBIT>
+ <TELL "on">)
+ (T <TELL "in">)>
+ <TELL-HIS-HER-BEDROOM <GETP ,PRSO ,P?CHARACTER> .L>
+ <TELL ".|">
+ .L)>>
+
+<ROUTINE V-FOLLOW ("AUX" L)
+ <COND (<==? ,PRSO ,WINNER>
+ <YOU-CANT>
+ ;<NOT-CLEAR-WHOM>)
+ (<AND <NOT <DOBJ? GHOST-NEW>>
+ <NOT <FSET? ,PRSO ,PERSONBIT>>>
+ <TELL
+"How tragic to see you, a" ,FAMOUS-YOUNG-DETECTIVE", stalking " A ,PRSO "!"CR>)
+ (<==? ,HERE <SET L <META-LOC ,PRSO>>>
+ <TELL "You're in the same place as" HE ,PRSO "!" CR>)
+ (<SET L <GET ,FOLLOW-LOC <GETP ,PRSO ,P?CHARACTER>>
+ ;<FOLLOW-LOC?>>
+ <PERFORM ,V?WALK-TO .L>)
+ ;(<EQUAL? .L <> ,LOCAL-GLOBALS>
+ <TELL CTHE ,PRSO " has left the story." CR>)
+ (T
+ <WHO-KNOWS? ,PRSO>
+ ;<PERFORM ,V?WALK-TO ,PRSO>
+ <RFATAL>)>>
+
+<ROUTINE V-FOO () <TELL "[Foo!! This is a bug!!]" CR>>
+
+<ROUTINE V-FORGIVE () <YOU-CANT>>
+
+;<ROUTINE PRE-GIVE ()
+ <COND (<AND <NOT <HELD? ,PRSO>>
+ <NOT <EQUAL? ,PRSI ,PLAYER ,PLAYER-NAME>>>
+ <TELL
+"That's easy for you to say, since " HE ,WINNER is "n't holding" HIM ,PRSO "."
+CR>)>>
+
+<ROUTINE PRE-GIVE ()
+ <COND (<AND <NOT <EQUAL? ,PRSI ,PLAYER ,PLAYER-NAME>>
+ <NOT-HOLDING? ,PRSO>>
+ <RTRUE>)>>
+
+<ROUTINE V-GIVE ()
+ <COND (<ZERO? ,PRSI> <YOU-CANT ;"give">)
+ (<NOT <FSET? ,PRSI ,PERSONBIT>>
+ <TELL
+CHE ,WINNER " can't give " A ,PRSO " to " A ,PRSI "!" CR>)
+ ;(<FSET? ,PRSI ,MUNGBIT>
+ <TELL CHE ,PRSI do "n't respond." CR>)
+ (<IOBJ? PLAYER>
+ <PERFORM ,V?TAKE ,PRSO>
+ <RTRUE>)
+ (<AND <DOBJ? LUGGAGE>
+ <FIRST? ,PRSO>
+ <FSET? ,YOUR-ROOM ,TOUCHBIT>>
+ <TELL CHE ,PRSI refuse " your gift." CR>)
+ (T
+ <MOVE ,PRSO ,PRSI>
+ <TELL CHE ,PRSI accept " your gift." CR>
+ <TREASURE-FOUND? ,PRSO ,PRSI>
+ <COND (<AND <EQUAL? ,VARIATION <GETP ,PRSI ,P?CHARACTER>>
+ <OR <FSET? ,PRSO ,RMUNGBIT> ;"evidence"
+ <EQUAL? ,PRSO ,BLOWGUN ,COSTUME>>>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?ASK-ABOUT ,PRSI ,PRSO>)>
+ <RTRUE>)>>
+
+<ROUTINE PRE-SGIVE ("AUX" X)
+ <SET X <GET ,P-NAMW 0>>
+ <PUT ,P-NAMW 0 <GET ,P-NAMW 1>>
+ <PUT ,P-NAMW 1 .X>
+ <PERFORM ,V?GIVE ,PRSI ,PRSO>
+ <RTRUE>>
+
+<ROUTINE V-SGIVE () <V-FOO>>
+
+"<ROUTINE PRE-GOODBYE () <PRE-HELLO>>
+<ROUTINE V-GOODBYE () <V-HELLO <>>>"
+
+;<ROUTINE PRE-HEAT () <PRE-BURN>>
+
+;<ROUTINE V-HEAT () <TELL CHE ,PRSO " gets a little bit hotter." CR>>
+
+<ROUTINE PRE-HELLO (;"OPTIONAL" ;(STR 0) "AUX" P (WORD <>))
+ <COND (<EQUAL? ,P-PRSA-WORD ,W?HELLO ,W?HI>
+ <SET WORD " Greet">)
+ (<EQUAL? ,P-PRSA-WORD ,W?SORRY>
+ <SET WORD " Apologize to">)>
+ <COND (<NOT <DOBJ? ROOMS>>
+ <COND (<AND <NOT <FSET? ,PRSO ,PERSONBIT>>
+ <NOT <DOBJ? CREW-GLOBAL>>>
+ <WONT-HELP-TO-TALK-TO ,PRSO>
+ <RTRUE>)
+ (<FSET? ,PRSO ,MUNGBIT>
+ <PERFORM ,V?ALARM ,PRSO>
+ <RTRUE>)
+ (<T? .WORD>
+ <TELL ,I-ASSUME .WORD HIM ,PRSO ".]" CR>
+ <RFALSE>)>
+ ;<UNSNOOZE ,PRSO>
+ <COND ;(<NOT <GRAB-ATTENTION ,PRSO>>
+ <RFATAL>)
+ (T <RFALSE>)>)
+ (<QCONTEXT-GOOD?>
+ <TELL ,I-ASSUME>
+ ;<COND (<T? .WORD>
+ <TELL .WORD>)>
+ <TELL !\ D ,QCONTEXT ".]" CR>
+ <PERFORM ,PRSA ,QCONTEXT>
+ <RTRUE>)
+ (<AND <EQUAL? ,WINNER ,PLAYER>
+ <SET P <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,WINNER>>>
+ <TELL ,I-ASSUME>
+ ;<COND (<T? .WORD>
+ <TELL .WORD>)>
+ <TELL !\ D .P ".]" CR>
+ <PERFORM ,PRSA .P>
+ <RTRUE>)
+ (T <NOT-CLEAR-WHOM>)>>
+
+<ROUTINE V-HELLO () ;("OPTIONAL" (HELL T))
+ <COND (<FSET? ,PRSO ,PERSONBIT> ;<GETP ,PRSO ,P?CHARACTER>
+ <COND (<NOT <FSET? ,PRSO ,MUNGBIT>>
+ <COND (<ZERO? ,LIT>
+ <TELL "\"Hello.\"" CR>)
+ (T <TELL CHE ,PRSO nod " at you." CR>)>)
+ (T <WONT-HELP-TO-TALK-TO ,PRSO>)>)
+ ;(<NOT <DOBJ? ROOMS>>
+ <TELL "Only nuts say \""
+ <COND (.HELL "Hello") (T "Good-bye")>
+ "\" to " A ,PRSO "." CR>)
+ (T <NOT-CLEAR-WHOM>)>>
+
+<ROUTINE V-HELP ()
+ <COND (<EQUAL? ,PRSO <> ,PLAYER>
+ <HELP-TEXT>)
+ (T <MORE-SPECIFIC>)>>
+
+<ROUTINE HELP-TEXT ()
+ <SETG CLOCK-WAIT T>
+ <TELL
+"[You'll find plenty of help in your " D ,MOONMIST " package.|
+If you're really stuck, you can order an InvisiClues (TM) hint booklet and map
+from your dealer or via mail with the form in your package.]" CR>>
+
+<ROUTINE V-KILL () <IKILL "kill">>
+
+<GLOBAL YOU-DIDNT-SAY-W "[You didn't say w">
+
+<ROUTINE IKILL ("OPTIONAL" (STR <>))
+ <COND (<ZERO? ,PRSO>
+ <SETG CLOCK-WAIT T>
+ <TELL "(There's nothing here to " .STR ".)" CR>)
+ (<ZERO? ,PRSI>
+ <SETG CLOCK-WAIT T>
+ <TELL ,YOU-DIDNT-SAY-W "hat to " .STR THE ,PRSO>
+ <COND (<FSET? ,PRSO ,WEAPONBIT>
+ <TELL " at">)
+ (T ;<FSET? ,PRSO ,PERSONBIT>
+ <TELL " with">)>
+ <TELL ".]" CR>)
+ (<NOT <FSET? ,PRSO ,PERSONBIT>>
+ <HAR-HAR>)
+ (T <TELL ,NO-VIOLENCE> <RTRUE>)>>
+
+<GLOBAL NO-VIOLENCE "You think it over. There's no need to get violent.|">
+
+<ROUTINE V-KISS ("AUX" X)
+ <COND (<EQUAL? ,PRSO ,PLAYER>
+ <TELL "You kiss " 'PLAYER " for a minute. Yuk!" CR>)
+ (<AND <FSET? ,PRSO ,PERSONBIT>
+ <NOT <FSET? ,PRSO ,MUNGBIT>>>
+ <FACE-RED>)
+ (T <TELL "What a (ahem!) strange idea!" CR>)>>
+
+<ROUTINE V-KNOCK ("AUX" P)
+ <COND (<OR <FSET? ,PRSO ,DOORBIT>
+ ;<EQUAL? ,PRSO ,WINDOW>>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <TELL "It's open!" CR>)
+ (<AND <SET P <DOOR-ROOM ,HERE ,PRSO>>
+ <SET P <FIND-FLAG .P ,PERSONBIT ,PLAYER>>>
+ <FCLEAR ,PRSO ,LOCKED>
+ <FSET ,PRSO ,OPENBIT>
+ <FSET ,PRSO ,ONBIT>
+ <UNSNOOZE .P>
+ <THIS-IS-IT .P>
+ <TELL CHE .P " opens the door, then retreats into the room."
+ ;"Someone shouts \"Come!\"" CR>)
+ (T <TELL "There's no answer." CR>)>)
+ (ELSE
+ <SETG CLOCK-WAIT T>
+ <TELL "(Why knock on " A ,PRSO "?)" CR>)>>
+
+<ROUTINE V-STAND ("AUX" P)
+ <COND (<AND <==? ,WINNER ,PLAYER>
+ <NOT <IN? ,PLAYER ,HERE>>
+ ;<T? ,PLAYER-SEATED>>
+ <OWN-FEET>)
+ (T
+ <ALREADY ,WINNER "standing up">)>>
+
+<ROUTINE V-LEAP ()
+ <COND (<AND ,PRSO
+ <NOT <DOBJ? INTDIR>>>
+ <YOU-CANT>
+ ;<PERFORM ,V?BOARD ,PRSO>
+ <RTRUE>)
+ (<EQUAL? ,HERE ,DECK ,LOVER-PATH> ;<GETPT ,HERE ,P?DOWN>
+ <TELL "This was not a very safe place to try jumping.">
+ <FINISH>)
+ (T <V-SKIP>)>>
+
+<ROUTINE V-SKIP ()
+ <COND ;(<FSET? <LOC ,PLAYER> ,VEHBIT>
+ <TELL "That would be tough from your current position." CR>)
+ (T <WHEE>)>>
+
+<ROUTINE WHEE ("AUX" X)
+ <SET X <RANDOM 5>>
+ <COND (<==? 1 .X>
+ <TELL "Very good. Now you can go to the second grade." CR>)
+ (<==? 2 .X>
+ <TELL "I hope you enjoyed that more than I did." CR>)
+ (<==? 3 .X>
+ <TELL "Are you enjoying " 'PLAYER "?" CR>)
+ (<==? 4 .X>
+ <TELL "Wheeeeeeeeee!!!!!" CR>)
+ (T <TELL "Do you expect someone to applaud?" CR>)>>
+
+<ROUTINE V-LEAVE ("AUX" GT)
+ <COND (<==? ,WINNER ,FOLLOWER>
+ <SETG FOLLOWER 0>)>
+ <COND (<EQUAL? ,PRSO <> ,ROOMS ,HERE>
+ <DO-WALK ,P?OUT>
+ <PUTP ,WINNER ,P?LDESC 9 ;"waiting patiently">
+ <COND (<AND <EQUAL? ,WINNER ,FRIEND>
+ <NOT <EQUAL? ,VARIATION ,FRIEND-C>>>
+ <SET GT <GET ,GOAL-TABLES ,FRIEND-C>>
+ <COND (<L? ,BED-TIME ,PRESENT-TIME>
+ <COND (<NOT <EQUAL? ,HERE ,TAMARA-ROOM>>
+ <PUT .GT ,GOAL-FUNCTION ,X-RETIRES>
+ <ESTABLISH-GOAL ,FRIEND ,TAMARA-ROOM>)>)
+ (T
+ <PUT .GT ,GOAL-FUNCTION ,NULL-F>
+ <COND (<NOT <IN? ,LORD ,HERE>>
+ <ESTABLISH-GOAL ,FRIEND <LOC ,LORD>>)>)>)>
+ <RTRUE>)
+ (<EQUAL? <LOC ,PRSO> ,PLAYER ;,POCKET>
+ <PERFORM ,V?DROP ,PRSO>
+ <RTRUE>)
+ (<NOT <==? <LOC ,WINNER> ,PRSO>>
+ <TELL-NOT-IN ,PRSO>
+ <RFATAL>)
+ (T
+ <DO-WALK ,P?OUT>
+ <RTRUE>)>>
+
+<ROUTINE PRE-LIE () <ROOM-CHECK>>
+
+<ROUTINE V-LIE () <V-SIT T>>
+
+<ROUTINE PRE-LISTEN ()
+ <COND (<AND <FSET? ,PRSO ,PERSONBIT>
+ <==? <GETP ,PRSO ,P?LDESC> 22 ;"playing the piano">>
+ <PERFORM ,V?LISTEN ,PIANO>
+ <RTRUE>)
+ (T <PRE-ASK-ABOUT>)>>
+
+<ROUTINE V-LISTEN ()
+ <COND (<AND <FSET? ,PRSO ,PERSONBIT>
+ <NOT <FSET? ,PRSO ,MUNGBIT>>>
+ <WAITING-FOR-YOU-TO-SPEAK>
+ <RTRUE>)
+ (T
+ <TOO-BAD-BUT ,PRSO>
+ <TELL " makes no sound." CR>)>>
+
+<ROUTINE V-LOCK ()
+ <COND (<FSET? ,PRSO ,DOORBIT>
+ <COND (<EQUAL? ,PRSO ,HERE>
+ <OKAY ,PRSO "locked">)
+ (T <TELL-FIND-NONE "a way to lock" ,PRSO>)>)
+ (T <YOU-CANT>)>>
+
+<ROUTINE V-LOOK ()
+ <COND (<DESCRIBE-ROOM T>
+ <DESCRIBE-OBJECTS ;T>
+ ;<CRLF>)>>
+
+<ROUTINE V-LOOK-BEHIND ()
+ <COND (<AND <FSET? ,PRSO ,DOORBIT> <NOT <FSET? ,PRSO ,OPENBIT>>>
+ <TOO-BAD-BUT ,PRSO "closed">)
+ (T <TELL "There's nothing behind" HIM ,PRSO "." CR>)>>
+
+<ROUTINE V-LOOK-DOWN ()
+ <COND (<==? ,PRSO ,ROOMS>
+ <TELL
+"You see nothing suspicious " <GROUND-DESC> "." CR>)
+ (T <HAR-HAR>)>>
+
+<ROUTINE PRE-LOOK-INSIDE () <ROOM-CHECK>>
+
+<ROUTINE V-LOOK-INSIDE ("OPTIONAL" (DIR ,P?IN) "AUX" RM)
+ <COND (<DOBJ? ROOMS>
+ <COND (<==? .DIR ,P?OUT>
+ <COND (<GLOBAL-IN? ,WINDOW ,HERE>
+ <PERFORM ,PRSA ,WINDOW ,PRSI>
+ <RTRUE>)>)
+ (T
+ <COND (<OR <FSET? <SET RM ,P-IT-OBJECT> ,CONTBIT>
+ <SET RM <FIND-FLAG-LG ,HERE ,CONTBIT>>
+ <GLOBAL-IN? <SET RM ,WINDOW> ,HERE>
+ <SET RM <FIND-FLAG-LG ,HERE ,DOORBIT>>>
+ <TELL-I-ASSUME .RM>
+ <PERFORM ,PRSA .RM ,PRSI>
+ <RTRUE>)>)>)>
+ <COND (<DOBJ? GLOBAL-HERE>
+ <PERFORM ,V?LOOK>
+ <RTRUE>)
+ (<AND <IN? ,PRSO ,ROOMS> ;<FSET? ,PRSO ,RLANDBIT>
+ <NOT <NOUN-USED? ,W?DOOR>>
+ <OR <GLOBAL-IN? ,PRSO ,HERE>
+ <SEE-INTO? ,PRSO <>>
+ ;<VISIBLE? ,PRSO>>>
+ <ROOM-PEEK ,PRSO>)
+ (<V-LOOK-THROUGH T> <RTRUE>) ;"SWG swapped this & next 5/21/86"
+ (<OR <FSET? ,PRSO ,CONTBIT>
+ <FSET? ,PRSO ,SURFACEBIT>>
+ <COND (<NOT <SEE-INSIDE? ,PRSO T>>
+ <FIRST-YOU "open" ,PRSO>)>
+ <COND (<FIRST? ,PRSO>
+ <TELL "You can see">
+ <PRINT-CONTENTS ,PRSO>
+ ;<PRINT-CONT ,PRSO>
+ <COND (<FSET? ,PRSO ,SURFACEBIT> <TELL " on">)
+ (T <TELL " inside">)>
+ <TELL HIM ,PRSO "." CR>
+ <RTRUE>)
+ (<DOBJ? VICTORIA-CHAIR WRITING-DESK COAT-RACK WYVERN
+ PIANO TABLE-DINING CHAIR-DINING SIDEBOARD>
+ <TELL-LIKE-BROCHURE>)
+ (<FSET? ,PRSO ,SURFACEBIT>
+ <TELL "There's nothing on" HIM ,PRSO>
+ <COND (<IN? ,PLAYER ,PRSO>
+ ;<EQUAL? ,PLAYER-SEATED ,PRSO <- 0 ,PRSO>>
+ <TELL " except you">)>
+ <TELL "." CR>)
+ (T <TOO-BAD-BUT ,PRSO "empty">)>)
+ (<==? .DIR ,P?IN> <YOU-CANT "look inside">)
+ (T ;<==? .DIR ,P?OUT> <YOU-CANT "look outside">)>>
+
+<ROUTINE FIRST-YOU (STR "OPTIONAL" (OBJ 0) (OBJ2 0))
+ <TELL !\(>
+ <HE-SHE-IT ,WINNER T .STR>
+ <COND (<T? .OBJ>
+ <TELL THE ;HIM .OBJ>
+ <COND (<=? .STR "open">
+ <FSET .OBJ ,OPENBIT>)>
+ <COND (<T? .OBJ2>
+ <TELL " from" THE ;HIM .OBJ2>)>)>
+ <TELL " first.)" CR>>
+
+<ROUTINE V-LOOK-THROUGH ("OPTIONAL" (INSIDE <>) "AUX" RM)
+ <COND (<FSET? ,PRSO ,DOORBIT>
+ <COND (<OR <FSET? ,PRSO ,OPENBIT>
+ <FSET? ,PRSO ,TRANSBIT>
+ ;<NOUN-USED? ,W?KEYHOLE>>
+ <COND (<SET RM <DOOR-ROOM ,HERE ,PRSO>>
+ <ROOM-PEEK .RM T>)
+ (T <NO-BEYOND>)>)
+ (<ZMEMQ ,PRSO ,CHAR-ROOM-TABLE>
+ <PERFORM ,PRSA ,KEYHOLE>
+ <RTRUE>)
+ (T
+ <TOO-BAD-BUT ,PRSO "closed">)>)
+ (<EQUAL? ,PRSO ,WINDOW>
+ <COND ;(<SET RM <WINDOW-ROOM ,HERE ,PRSO>>
+ <ROOM-PEEK .RM T>)
+ (T <NO-BEYOND>)>)
+ (<FSET? ,PRSO ,PERSONBIT>
+ <TELL "You forgot to bring your X-ray glasses." CR>)
+ (.INSIDE <RFALSE>)
+ (<FSET? ,PRSO ,TRANSBIT>
+ <TELL "Everything looks bigger." CR>)
+ (T <YOU-CANT "look through">)>>
+
+<ROUTINE NO-BEYOND () <TELL "You can't tell what's beyond" HIM ,PRSO "." CR>>
+
+<ROUTINE ROOM-PEEK (RM "OPTIONAL" (SAFE <>) "AUX" (X <>) OHERE OLIT TXT)
+ <COND (<EQUAL? .RM ,HERE>
+ <V-LOOK>
+ <RTRUE>)
+ (<OR .SAFE <SEE-INTO? .RM>>
+ <SET OHERE ,HERE>
+ <SET OLIT ,LIT>
+ <SETG HERE .RM>
+ <MAKE-ALL-PEOPLE -12 ;"listening to you">
+ <SETG LIT <LIT? ;,HERE>>
+ <TELL "You peer ">
+ <COND (<FSET? .RM ,SURFACEBIT> <TELL "at">) (T <TELL "into">)>
+ <TELL HIM .RM !\: CR>
+ <COND (<DESCRIBE-OBJECTS ;T> <SET X T>)
+ (<SET TXT <GETP .RM ,P?LDESC>>
+ <SET X T>
+ <TELL .TXT CR>)>
+ ;<COND (<CORRIDOR-LOOK> <SET X T>)>
+ <COND (<ZERO? .X>
+ <TELL "You can't see anything suspicious." CR>)>
+ <SETG HERE .OHERE>
+ <SETG LIT .OLIT>
+ <RTRUE>)>>
+
+<ROUTINE SEE-INTO? (THERE "OPTIONAL" (TELL? T) (IGNORE-DOOR <>)"AUX" P L TBL O)
+ ;<COND (<AND <EQUAL? ,CAR ,HERE .THERE>
+ <EQUAL? <GETP ,CAR ,P?STATION> ,HERE .THERE>>
+ <RTRUE>)>
+ <COND (<CORRIDOR-LOOK .THERE>
+ <RTRUE>)>
+ <SET P 0>
+ <REPEAT ()
+ <COND (<OR <0? <SET P <NEXTP ,HERE .P>>>
+ <L? .P ,LOW-DIRECTION>>
+ <COND (.TELL? <TELL-CANT-FIND>)>
+ <RFALSE>)>
+ <SET TBL <GETPT ,HERE .P>>
+ <SET L <PTSIZE .TBL>>
+ <COND (<==? .L ,UEXIT>
+ <COND (<==? <GET-REXIT-ROOM .TBL> .THERE>
+ <RTRUE>)>)
+ (<==? .L ,DEXIT>
+ <COND (<==? <GET-REXIT-ROOM .TBL> .THERE>
+ <COND (<FSET? <GET-DOOR-OBJ .TBL> ,OPENBIT>
+ <RTRUE>)
+ (<WALK-THRU-DOOR? .TBL <GET-DOOR-OBJ .TBL> <>
+ ;.TELL?>
+ <RTRUE>)
+ (<T? .IGNORE-DOOR>
+ <RTRUE>)
+ (T
+ <COND (.TELL?
+ <SETG CLOCK-WAIT T>
+ <TELL
+"(The door to that room is closed.)" CR>)>
+ <RFALSE ;RTRUE>)>)>)
+ (<==? .L ,CEXIT>
+ <COND (<==? <GET-REXIT-ROOM .TBL> .THERE>
+ <COND (<VALUE <GETB .TBL ,CEXITFLAG>>
+ <RTRUE>)
+ (T
+ <COND (.TELL? <TELL-CANT-FIND>)>
+ <RFALSE>)>)>)>>>
+
+<ROUTINE TELL-CANT-FIND ()
+ <SETG CLOCK-WAIT T>
+ <TELL "(That place isn't close enough.)"
+ ;"You can't seem to find that room." CR>>
+
+<ROUTINE V-LOOK-ON ()
+ <COND (<FSET? ,PRSO ,SURFACEBIT>
+ <V-LOOK-INSIDE>)
+ (T <TELL "There's no good surface on" HIM ,PRSO "." CR>)>>
+
+<ROUTINE V-LOOK-OUTSIDE () <V-LOOK-INSIDE ,P?OUT>>
+
+<ROUTINE PRE-LOOK-UNDER () <ROOM-CHECK>>
+
+<ROUTINE V-LOOK-UNDER ()
+ <COND (<DOBJ? EYE HANDS HEAD>
+ <WONT-HELP>)
+ (<HELD? ,PRSO>
+ <TELL "You're ">
+ <COND (<FSET? ,PRSO ,WORNBIT>
+ <TELL "wear">)
+ (T <TELL "hold">)>
+ <TELL "ing" THE ,PRSO "!" CR>)
+ (<FSET? ,PRSO ,PERSONBIT>
+ <TELL "Nope. Nothing hiding under" HIM ,PRSO "." CR>)
+ (<AND ;<EQUAL? ,PRSO ,COSTUME ,BLOWGUN>
+ <EQUAL? <LOC ,PRSO> ,VIVIEN-BOX ,WENDISH-KIT>>
+ <TELL "There's more stuff there." CR>)
+ (<EQUAL? <LOC ,PRSO> ,HERE ,LOCAL-GLOBALS ;,GLOBAL-OBJECTS>
+ <TELL "There's nothing there but dust." CR>)
+ (T
+ <TELL "That's not a bit useful." CR>)>>
+
+<ROUTINE V-LOOK-UP ("AUX" HR)
+ <COND (<T? ,PRSI>
+ <TELL
+"There's no information in" THE ,PRSI " about" THE ,PRSO "." CR>)
+ (<DOBJ? ROOMS>
+ <COND (<OUTSIDE? ,HERE>
+ <PERFORM ,V?EXAMINE ,MOON>
+ <RTRUE>)
+ (<CREEPY? ,HERE>
+ <TELL "Shadows play on the stone ceiling">
+ <COND (<EQUAL? ,HERE ,SITTING-PASSAGE>
+ <TELL " and" THE ,SECRET-SITTING-DOOR>)>
+ <TELL "." CR>)
+ (T
+ <TELL
+"The ceiling is decorated with swirly lines and patterns.">
+ <COND (<AND <==? ,HERE ,TAMARA-ROOM>
+ <T? <GETP ,LUMBER-ROOM ,P?CORRIDOR>>>
+ <TELL " There's a hole directly over the bed.">)>
+ <CRLF>)>)
+ (T <YOU-CANT "look up">)>>
+
+;<ROUTINE V-MAKE () <YOU-CANT>>
+
+<ROUTINE PRE-MEET ()
+ <COND (<IN? ,PRSO ,HERE>
+ <PERFORM ,V?HELLO ,PRSO>
+ <RTRUE>)
+ (T
+ <PERFORM ,V?WALK-TO ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-MEET () <V-FOO>>
+
+<ROUTINE PRE-MOVE ()
+ <COND (<HELD? ,PRSO>
+ <TELL "Juggling isn't one of your talents." CR>)>>
+
+<ROUTINE V-MOVE ()
+ <COND (<FSET? ,PRSO ,TAKEBIT>
+ <TELL "Moving" HIM ,PRSO " reveals nothing." CR>)
+ (T <YOU-CANT ;"move">)>>
+
+<ROUTINE PRE-MOVE-DIR ()
+ <COND (<NOT <IOBJ? INTDIR>>
+ <DONT-UNDERSTAND>
+ <RTRUE>)>>
+
+<ROUTINE V-MOVE-DIR ()
+ <TELL
+"You can't move" HIM ,PRSO " in any particular " D ,INTDIR "." CR>>
+
+<ROUTINE V-NOD ()
+ <COND (<NOT <DOBJ? ROOMS>>
+ <YOU-CANT>)
+ (<T? ,AWAITING-REPLY>
+ <PERFORM ,V?YES>
+ <RTRUE>)
+ (T
+ <PERFORM ,V?HELLO ,ROOMS>
+ <RTRUE>)>>
+
+<ROUTINE V-OPEN ("AUX" F STR)
+ <COND (<NOT <OR <FSET? ,PRSO ,CONTBIT>
+ <FSET? ,PRSO ,DOORBIT>
+ <EQUAL? ,PRSO ,WINDOW>>>
+ <YOU-CANT ;"open">)
+ (<OR <FSET? ,PRSO ,DOORBIT>
+ <EQUAL? ,PRSO ,WINDOW>
+ <NOT <==? <GETP ,PRSO ,P?CAPACITY> 0>>>
+ ;<COND (<AND <FSET? ,PRSO ,SECRETBIT>
+ <NOT <FSET? ,PRSO ,SEENBIT>>>
+ <NOT-FOUND ,PRSO>
+ <RTRUE>)> ;"in PLAYER-F"
+ <COND (<FSET? ,PRSO ,LOCKED>
+ <COND (<UNLOCK-DOOR? ,PRSO>
+ <FCLEAR ,PRSO ,LOCKED>
+ <FIRST-YOU "unlock" ,PRSO>)
+ (T <TOO-BAD-BUT ,PRSO "locked"> <RTRUE>)>)>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <ALREADY ,PRSO "open">)
+ ;(<FSET? ,PRSO ,MUNGBIT>
+ <TELL
+"You can't open it. The latch is broken." CR>)
+ (T
+ <FSET ,PRSO ,OPENBIT>
+ <COND (<OR <FSET? ,PRSO ,DOORBIT>
+ <EQUAL? ,PRSO ,WINDOW>
+ <NOT <FIRST? ,PRSO>>
+ <FSET? ,PRSO ,TRANSBIT>>
+ <OKAY ,PRSO "open">)
+ ;(<AND <SET F <FIRST? ,PRSO>>
+ <NOT <NEXT? .F>>
+ <SET STR <GETP .F ,P?FDESC>>>
+ <TELL "You open" HIM ,PRSO !\. CR>
+ <TELL .STR CR>)
+ (T
+ <TELL "You open" HIM ,PRSO " and see">
+ <PRINT-CONTENTS ,PRSO>
+ <TELL "." CR>)>)>)
+ (T <YOU-CANT ;"open">)>>
+
+<ROUTINE PRE-OPEN-WITH ()
+ <COND (<NOT-HOLDING? ,PRSI> <RTRUE>)>>
+
+<ROUTINE V-OPEN-WITH () <PERFORM ,V?OPEN ,PRSO> <RTRUE>>
+
+;<ROUTINE V-PASS () <PERFORM ,V?WALK-TO ,PRSO> <RTRUE>>
+
+<ROUTINE V-PLAY ()
+ <SETG CLOCK-WAIT T>
+ <TELL
+"[Speaking of playing, you'd enjoy Infocom's other fictions, too!]" CR>>
+
+"<ROUTINE PRE-POCKET () <PERFORM ,V?PUT-IN ,PRSO ,POCKET> <RTRUE>>
+<ROUTINE V-POCKET () <V-FOO>>"
+
+<ROUTINE V-POUR () <YOU-CANT>>
+
+<ROUTINE V-PRAY ()
+ <TELL
+"\"From ghoulies and ghosties and long-leggety beasties|
+And things that go bump in the night, Good Lord, deliver us!\"" CR>>
+
+<ROUTINE V-PUSH () <HACK-HACK "Pushing">>
+
+<ROUTINE WEAR-CHECK ("AUX" X)
+ <COND (<EQUAL? ,NOW-WEARING ,PRSO>
+ <COND (<AND <NOUN-USED? ,W?CLOTHES>
+ <SET X <FIND-OUTFIT>>>
+ <TELL-I-ASSUME .X>
+ <SETG PRSO .X>
+ <RFALSE>)
+ (T
+ <YOU-CANT <> <> "being worn">
+ <RTRUE>)>)>>
+
+<ROUTINE PRE-PUT ()
+ <COND (<WEAR-CHECK> <RTRUE>)>
+ <FCLEAR ,PRSO ,WORNBIT>
+ <COND ;(<HELD? ,PRSO> ;"SYNTAX says HAVE"
+ <RFALSE>)
+ ;(<NOT <FSET? ,PRSO ,TAKEBIT>> ;"SYNTAX says TAKE"
+ <YOU-CANT "pick up">
+ <RTRUE>)
+ (<DOBJ? HEAD HANDS>
+ <WONT-HELP>
+ <RTRUE>)
+ (<IN? ,PRSO ,GLOBAL-OBJECTS>
+ <NOT-HERE ,PRSO>
+ <RTRUE>)
+ (<IOBJ? FLOOR GLOBAL-HERE ;POCKET>
+ <RFALSE>)
+ (<IN? ,PRSI ,GLOBAL-OBJECTS>
+ <NOT-HERE ,PRSI>
+ <RTRUE>)>>
+
+<ROUTINE V-PUT ()
+ <COND (<FSET? ,PRSI ,PERSONBIT>
+ <SETG WINNER ,PRSI>
+ <PERFORM ,V?WEAR ,PRSO>
+ <RTRUE>)
+ (<AND <NOT <FSET? ,PRSI ,SURFACEBIT>>
+ <NOT <IOBJ? BOOKCASE>>
+ <NOT <FSET? ,PRSI ,VEHBIT>>>
+ <COND (T ;<NOT <FSET? ,PRSI ,SURFACEBIT>>
+ <TELL "There's no good surface on" HIM ,PRSI "." CR>)>
+ <RTRUE>)>
+ <PUT-ON-OR-IN>>
+
+<ROUTINE TELL-FIND-NONE (STR "OPTIONAL" (OBJ <>))
+ <TELL "You search for " .STR>
+ <COND (<T? .OBJ> <TELL THE .OBJ>)>
+ <TELL " but find none." CR>>
+
+<ROUTINE PRE-PUT-IN ()
+ <COND (<EQUAL? <GET ,P-OFW 1> ,W?FRONT>
+ <PERFORM ,V?DROP ,PRSO>
+ <RTRUE>)
+ (<IOBJ? CHAIR EARRING FIREPLACE PSEUDO-OBJECT>
+ <RETURN <PRE-PUT>>)
+ (<IOBJ? INKWELL MOONMIST>
+ <YOU-SHOULDNT " in">
+ <RFATAL>)
+ (<IOBJ? EYE HANDS HOLE-IN-WALL OCEAN PEEPHOLE PEEPHOLE-2>
+ <WONT-HELP>
+ <RFATAL>)
+ (<FSET? ,PRSI ,READBIT>
+ <WONT-HELP>
+ <RFATAL>)
+ (<NOT <FSET? ,PRSI ,CONTBIT>>
+ <TELL-FIND-NONE "an opening in" ,PRSI>
+ <RFATAL>)>
+ <COND (<NOT <FSET? ,PRSI ,OPENBIT>>
+ <FIRST-YOU "open" ,PRSI>
+ ;<TOO-BAD-BUT ,PRSI "closed">)>
+ <PRE-PUT>>
+
+<ROUTINE V-PUT-IN ()
+ <COND (<AND <NOT <FSET? ,PRSI ,OPENBIT>>
+ <NOT <FSET? ,PRSI ,VEHBIT>>>
+ <COND (<OPENABLE? ,PRSI>
+ <TOO-BAD-BUT ,PRSI "closed">)
+ (T <TELL "You can't open" HIM ,PRSI "." CR>)>
+ <RTRUE>)>
+ <PUT-ON-OR-IN>>
+
+<GLOBAL NOT-ENOUGH-ROOM "There's not enough room.|">
+
+<ROUTINE PUT-ON-OR-IN ()
+ <COND (<ZERO? ,PRSI> <YOU-CANT ;"put">)
+ (<==? ,PRSI ,PRSO>
+ <HAR-HAR>)
+ (<IN? ,PRSO ,PRSI>
+ <TOO-BAD-BUT ,PRSO>
+ <TELL " is already "
+ <COND (<FSET? ,PRSI ,SURFACEBIT> "on") (T "in")>
+ HIM ,PRSI "!" CR>)
+ ;(<AND <NOT <FSET? ,PRSI ,SURFACEBIT>>
+ <NOT <FSET? ,PRSI ,OPENBIT>>>
+ <TOO-BAD-BUT ,PRSI "closed">)
+ (<G? <+ <WEIGHT ,PRSI> <GETP ,PRSO ,P?SIZE>>
+ ;<- * <GETP ,PRSI ,P?SIZE>>
+ <GETP ,PRSI ,P?CAPACITY>>
+ <TELL ,NOT-ENOUGH-ROOM>
+ <RTRUE>)
+ (<AND <NOT <HELD? ,PRSO>>
+ <NOT <ITAKE>>>
+ <RTRUE>)
+ (T
+ <MOVE ,PRSO ,PRSI>
+ <FSET ,PRSO ,TOUCHBIT>
+ <COND (<AND <FSET? ,PRSI ,PERSONBIT>
+ <FSET? ,PRSO ,WEARBIT>>
+ <FSET ,PRSO ,WORNBIT>)>
+ <TELL "Okay." CR>)>>
+
+"WEIGHT: Get sum of SIZEs of supplied object," ;" recursing to the nth level."
+
+<ROUTINE WEIGHT (OBJ "AUX" CONT (WT 0))
+ <COND (<SET CONT <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND ;(<AND <EQUAL? .OBJ ,PLAYER>
+ <FSET? .CONT ,WORNBIT>>
+ <SET WT <+ .WT 1>>)
+ ;"worn things shouldn't count"
+ ;(<AND <EQUAL? .OBJ ,PLAYER>
+ <FSET? <LOC .CONT> ,WORNBIT>>
+ <SET WT <+ .WT 1>>)
+ ;"things in worn things shouldn't count"
+ (T
+ <SET WT <+ .WT <GETP .CONT ,P?SIZE>>>)>
+ <COND (<NOT <SET CONT <NEXT? .CONT>>> <RETURN>)>>)>
+ .WT ;<+ .WT <GETP .OBJ ,P?SIZE>>>
+
+<ROUTINE V-PUT-UNDER () <TELL ,NOT-ENOUGH-ROOM>>
+
+<ROUTINE PRE-SREAD () <PERFORM ,V?READ ,PRSI ,PRSO> <RTRUE>>
+<ROUTINE V-SREAD () <V-FOO>>
+
+<ROUTINE PRE-READ ("AUX" VAL)
+ <COND ;(<ZERO? ,LIT> <TOO-DARK> <RTRUE>)
+ (<IN? ,PRSO ,GLOBAL-OBJECTS>
+ <NOT-HERE ,PRSO>)>>
+
+<ROUTINE V-READ ()
+ <COND (<NOT <FSET? ,PRSO ,READBIT>> <YOU-CANT ;"read">)
+ (ELSE <TELL <GETP ,PRSO ,P?TEXT> CR>)>>
+
+<ROUTINE V-REMOVE ()
+ <COND (<FSET? ,PRSO ,WORNBIT>
+ <PERFORM ,V?TAKE-OFF ,PRSO>
+ <RTRUE>)
+ (T
+ <PERFORM ,V?TAKE ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-RING () <YOU-CANT>>
+
+<ROUTINE V-RUB ()
+ <COND (<AND <FSET? ,PRSO ,PERSONBIT>
+ <NOT <FSET? ,PRSO ,MUNGBIT>>
+ <NOT <EQUAL? ,PRSO ,PLAYER>>>
+ <FACE-RED>)
+ (T <HACK-HACK "Rubbing" ;"Fiddling with">)>>
+
+<ROUTINE V-SAY ("AUX" P)
+ <COND (<QCONTEXT-GOOD?>
+ <PERFORM ,V?TELL ,QCONTEXT>
+ <RTRUE>)
+ (<SET P <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,WINNER>>
+ <TELL-I-ASSUME .P " Say to">
+ <PERFORM ,V?TELL .P>
+ <RTRUE>)
+ (T
+ <NOT-CLEAR-WHOM>)>>
+
+;<ROUTINE PRE-SAY-INTO ()
+ <COND (<NOT <FSET? ,PRSO ,ONBIT>>
+ <TELL "Sorry, but" HE ,PRSO is "n't on!" CR>)>>
+
+;<ROUTINE V-SAY-INTO () <YOU-CANT "talk into">>
+
+<ROUTINE PRE-SEARCH () <ROOM-CHECK>>
+
+<ROUTINE V-SEARCH ("AUX" OBJ)
+ <COND (<IN? ,PRSO ,ROOMS>
+ <PERFORM ,PRSA ,GLOBAL-HERE>
+ <RTRUE>
+ ;<START-SEARCH>)
+ (<AND <FSET? ,PRSO ,PERSONBIT>
+ <SET OBJ <FIRST? ,PRSO>>>
+ <FSET .OBJ ,TAKEBIT>
+ <FCLEAR .OBJ ,NDESCBIT>
+ <FCLEAR .OBJ ,WORNBIT>
+ <FCLEAR .OBJ ,SECRETBIT>
+ <THIS-IS-IT .OBJ>
+ <MOVE .OBJ ,PLAYER>
+ ;<COND (<EQUAL? .OBJ ,MUSTACHE>
+ <SETG WENDISH-BARE T>)>
+ <TELL
+"You find " A .OBJ " and take it. " !\Y ,OU-STOP-SEARCHING "." CR>)
+ (<AND <SET OBJ <FIND-FLAG ,PRSO ,SECRETBIT>>
+ ;<FSET? .OBJ ,NDESCBIT>>
+ <DISCOVER .OBJ ,PRSO>)
+ (<FSET? ,PRSO ,DOORBIT>
+ <NOTHING-SPECIAL>)
+ (<OR <FSET? ,PRSO ,CONTBIT>
+ <FSET? ,PRSO ,SURFACEBIT>>
+ <PERFORM ,V?LOOK-INSIDE ,PRSO>
+ <RTRUE>)
+ (T <NOTHING-SPECIAL>
+ ;<TELL "You find nothing suspicious." CR>)>>
+
+<GLOBAL OU-STOP-SEARCHING "ou stop searching">
+
+<ROUTINE DISCOVER (OBJ "OPTIONAL" (WHERE 0))
+ <COND (<NOT <EQUAL? .OBJ ,YOUR-SWITCH>>
+ <FCLEAR .OBJ ,NDESCBIT>)>
+ <FCLEAR .OBJ ,SECRETBIT>
+ <FCLEAR .OBJ ,WORNBIT>
+ <COND (<ZERO? .WHERE>
+ <SET WHERE <LOC .OBJ>>)>
+ <COND (<NOT <EQUAL? .OBJ ,MOONMIST ,YOUR-SWITCH>>
+ <FSET .OBJ ,TAKEBIT>)>
+ <COND (<OR <EQUAL? .WHERE ,COFFIN ,INKWELL ,JEWELRY-CASE>
+ ;<EQUAL? .WHERE ,BOTTLE ,WELL>>
+ <TELL "Inside the " D .WHERE>)
+ (<EQUAL? .WHERE ,PAINT>
+ <TELL "Under the " D .WHERE>)
+ (<EQUAL? ,HERE ,GARDEN ;,DRIVEWAY>
+ <COND ;(<==? .WHERE ,POND>
+ <TELL "Projecting above the water">)
+ (T <TELL "Buried in the dirt">)>)
+ (<EQUAL? ,HERE ,CRYPT>
+ <TELL "Hanging on the neck of the " D .WHERE>)
+ ;(<EQUAL? ,HERE ,LIBRARY>
+ <TELL "Sitting in the " D ,BOOKCASE>)
+ (<EQUAL? ,HERE ,YOUR-ROOM>
+ <TELL "Behind the " D ,YOUR-MIRROR>)
+ ;(<EQUAL? ,HERE ,COURTYARD>
+ <TELL "Resting on the " D ,FRONT-GATE>)
+ (<EQUAL? ,HERE ,GREAT-HALL>
+ <TELL "Inside the helmet of the " D ,ARMOR>)
+ (<EQUAL? ,HERE ,CHAPEL>
+ <TELL "Stuck on the apple of the " D ,STAINED-WINDOW>)
+ (<EQUAL? ,HERE ,GAME-ROOM>
+ <TELL "Hidden behind the " 'GLASS-EYE " of the " D ,RHINO-HEAD>)
+ (<EQUAL? ,HERE ,WENDISH-ROOM>
+ <TELL "Underneath some items in the " 'WENDISH-KIT>)
+ ;(<EQUAL? ,HERE ,HYDE-ROOM>
+ <COND (<EQUAL? .OBJ ,COSTUME>
+ <TELL ,HIDDEN-UNDER-PILLOWS>)
+ (T <TELL "Inside Hyde's zip leather toilet kit">)>)
+ (<EQUAL? ,HERE ,TAMARA-ROOM>
+ <TELL "Neatly hidden under the bed">)
+ (<EQUAL? ,HERE ,JACK-ROOM>
+ <TELL "Inside a drawer of the tallboy"
+ ;"Hidden on a high shelf; Inside the 'CREST">)
+ (<EQUAL? ,HERE ,STUDY ,LUMBER-ROOM>
+ <TELL "Among some papers">)
+ (<EQUAL? ,HERE ,VIVIEN-ROOM>
+ <COND ;(<EQUAL? .OBJ ,COSTUME ,BLOWGUN>
+ <TELL
+"Snugly stashed inside a wraparound batik cotton skirt in a drawer">)
+ (T <TELL "Inside" THE ,VIVIEN-BOX>)>)
+ ;(<EQUAL? ,HERE ,IAN-ROOM>
+ <TELL "Tightly stuffed into his riding boots">)
+ ;(<EQUAL? ,HERE ,BASEMENT>
+ <TELL "Inside the " 'WELL>)
+ (T ;<T? .WHERE>
+ <COND (<OR <FSET? .WHERE ,SURFACEBIT>
+ <FSET? .WHERE ,PERSONBIT>>
+ <TELL "On">)
+ (T <TELL "In">)>
+ <TELL THE .WHERE>)
+ ;(T <TELL "Here">)>
+ <COND (<EQUAL? .OBJ ,COSTUME>
+ <TELL " are a shimmering white gown and blonde wig">)
+ (T <TELL " is " A .OBJ>)>
+ <THIS-IS-IT .OBJ>
+ <FSET .OBJ ,SEENBIT>
+ <COND (<VERB? SEARCH SEARCH-FOR>
+ <TELL ", so y" ,OU-STOP-SEARCHING>)>
+ <COND (<EQUAL? ,HERE ,TAMARA-ROOM>
+ ;<NOT <EQUAL? .OBJ ,MOONMIST>>
+ <MOVE .OBJ ,PLAYER>
+ <COND (<VERB? SEARCH SEARCH-FOR>
+ <TELL " and ">)
+ (T <TELL ", so you ">)>
+ <TELL "take it">)>
+ <TELL ".|">
+ <COND (<AND <EQUAL? .OBJ ,COSTUME>
+ <ZERO? <GET ,FOUND-COSTUME ,PLAYER-C>>>
+ <CONGRATS ,COSTUME>)
+ (<AND <SET WHERE <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT,PLAYER>>
+ <NOT <EVIDENCE? .OBJ .WHERE>>>
+ <GOOD-SHOW .WHERE .OBJ>)>
+ <COND (<AND ;<T? ,CLUE-1-KNOWN>
+ <==? .OBJ ,TREASURE>>
+ <CONGRATS ,ARTIFACT>)>
+ <RTRUE>>
+
+<ROUTINE CONGRATS ("OPT" (FOUND <>))
+ <TELL "|
+(Congratulations, "TN"! You've ">
+ <COND (<==? .FOUND ,COSTUME>
+ <TELL ,IDENTIFIED-THE-GHOST>)
+ (T
+ <TELL "found">
+ <COND (<ZERO? .FOUND>
+ <TELL " evidence of the crime">)
+ (T <TELL THE .FOUND>)>)>
+ <TELL "!)" CR>
+ <COND (<==? .FOUND ,ARTIFACT>
+ <SETG TREASURE-FOUND ,TREASURE>
+ <COND (<AND <T? <GET ,FOUND-COSTUME ,PLAYER-C>>
+ <T? ,CONFESSED>>
+ <WRAP-UP>
+ <FINISH>)>)
+ (<==? .FOUND ,COSTUME>
+ <PUT ,FOUND-COSTUME ,PLAYER-C T>
+ <COND (<AND <T? ,TREASURE-FOUND>
+ <T? ,CONFESSED>>
+ <WRAP-UP>
+ <FINISH>)>)>
+ <RTRUE>>
+
+<ROUTINE PRE-SSEARCH-FOR () <PERFORM ,V?SEARCH-FOR ,PRSI ,PRSO> <RTRUE>>
+<ROUTINE V-SSEARCH-FOR () <V-FOO>>
+
+<ROUTINE PRE-SEARCH-FOR ("AUX" OBJ)
+ <COND (<ROOM-CHECK> <RTRUE>)
+ ;(<AND <IN? ,PRSI ,PLAYER>
+ ;<GETP ,PRSI ,P?GENERIC>
+ <SET OBJ <APPLY <GETP ,PRSI ,P?GENERIC> ,PRSI>>>
+ <SETG PRSI .OBJ>)>
+ ;<COND (<DOBJ? ;GLOBAL-ROOM GLOBAL-HERE>
+ <PERFORM ,PRSA ,HERE>
+ <RTRUE>)>
+ <RFALSE>>
+
+<ROUTINE V-SEARCH-FOR ()
+ <COND (<IN? ,PRSO ,ROOMS>
+ <PERFORM ,PRSA ,GLOBAL-HERE ,PRSI>
+ <RTRUE>
+ ;<START-SEARCH>)
+ (<FSET? ,PRSO ,PERSONBIT>
+ <COND (<IN? ,PRSI ,PRSO>
+ <TELL "Indeed," HE ,PRSO has HIM ,PRSI "." CR>)
+ (T
+ <TELL CTHE ,PRSO " doesn't have">
+ <COND (<IN? ,PRSI ,GLOBAL-OBJECTS>
+ <TELL THE ,PRSI "." CR>)
+ (<ZERO? ,PRSI>
+ <TELL " that." CR>)
+ (T
+ <TELL
+THE ,PRSI " hidden on" HIS ,PRSO " person." CR>)>)>
+ <RTRUE>)
+ (<AND <FSET? ,PRSO ,CONTBIT> <NOT <FSET? ,PRSO ,OPENBIT>>>
+ <TELL "You'll have to open" HIM ,PRSO " first." CR>)
+ (<IN? ,PRSI ,PRSO>
+ <COND (<FSET? ,PRSI ,SECRETBIT>
+ <DISCOVER ,PRSI>)
+ (T <TELL
+"How observant you are! There" HE ,PRSI is "!" CR>)>)
+ (<ZERO? ,PRSI> <YOU-CANT ;"search">)
+ (T
+ <TELL "You don't find">
+ <COND (<FSET? ,PRSI ,SECRETBIT>
+ ;<==? <GET ,P-NAMW 1> ,W?EVIDENCE>
+ <TELL " it" ;" any evidence">)
+ (T <TELL HIM ,PRSI>)>
+ <TELL " there." CR>)>>
+
+;<ROUTINE V-SEND () <YOU-CANT ;"send">>
+
+;<ROUTINE PRE-SSEND () <PERFORM ,V?SEND ,PRSI ,PRSO> <RTRUE>>
+;<ROUTINE V-SSEND () <V-FOO>>
+
+;<ROUTINE V-SEND-OUT () <V-SEND>>
+
+;<ROUTINE PRE-SEND-TO ()
+ <COND (<OR <EQUAL? ,PRSI <> ,PLAYER ,GLOBAL-HERE>
+ <EQUAL? ,PRSI ,PLAYER-NAME>>
+ <RFALSE>)
+ (<FSET? ,PRSO ,PERSONBIT>
+ <PERFORM ,V?$CALL ,PRSO>
+ <COND (<NOT <EQUAL? ,WINNER ,PLAYER>>
+ <PERFORM ,V?WALK-TO ,PRSI>)>
+ <RTRUE>)
+ (T
+ <DONT-UNDERSTAND>)>>
+
+;<ROUTINE V-SEND-TO () <V-SEND>>
+
+<ROUTINE V-SHAKE ("AUX" X)
+ <COND (<NOT <FSET? ,PRSO ,TAKEBIT>>
+ <SETG CLOCK-WAIT T>
+ <TELL "(You can't shake it if you can't take it!)" CR>)
+ (<AND <NOT <FSET? ,PRSO ,OPENBIT>>
+ <FIRST? ,PRSO>>
+ <TELL
+"It sounds as if there is something inside" HIM ,PRSO "." CR>)
+ (<AND <FSET? ,PRSO ,OPENBIT> <SET X <FIRST? ,PRSO>>>
+ <TELL "Right " <GROUND-DESC> ;"Onto the ">
+ ;<COND (<OUTSIDE? ,HERE> <TELL "ground">)
+ (T <TELL "floor">)>
+ <TELL " spill">
+ <COND (<ZERO? <NEXT? .X>> <TELL !\s>)>
+ <ROB ,PRSO ,HERE T>
+ <CRLF>)
+ (T <TELL "You hear nothing inside" HIM ,PRSO "." CR>)>>
+
+<ROUTINE V-SHOOT ()
+ <COND (<AND <OR <ZERO? ,PRSI>
+ <NOT <EQUAL? <LOC ,PRSI> ,WINNER ;,POCKET>>>
+ <NOT <FIND-FLAG ,WINNER ,WEAPONBIT>>
+ ;<NOT <FIND-FLAG ,POCKET ,WEAPONBIT>>>
+ <TELL "You're not holding anything to shoot with." CR>)
+ (T <IKILL "shoot">)>>
+
+<ROUTINE PRE-SSHOOT () <PERFORM ,V?SHOOT ,PRSI ,PRSO> <RTRUE>>
+<ROUTINE V-SSHOOT () <V-FOO>>
+
+;<ROUTINE PRE-SHOW ()
+ <COND (<IN? ,PRSO ,ROOMS> ;"SHOW ME TO MY ROOM"
+ <PERFORM ,V?TAKE-TO ,PRSI ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-SHOW ()
+ <COND (<==? ,PRSO ,PLAYER>
+ <SETG WINNER ,PLAYER>
+ <COND (<VISIBLE? ,PRSO> <PERFORM ,V?EXAMINE ,PRSI>)
+ (T <PERFORM ,V?FIND ,PRSI>)>
+ <RTRUE>)
+ (<OR <NOT <FSET? ,PRSO ,PERSONBIT>>
+ <FSET? ,PRSO ,MUNGBIT>>
+ <TELL "Don't wait for" HIM ,PRSO " to applaud." CR>)
+ (T <WHO-CARES>)>>
+
+<ROUTINE PRE-SSHOW ("AUX" P)
+ <COND (<T? ,PRSI>
+ <SETG P-MERGED T>
+ <COND (<IN? ,PRSI ,ROOMS> ;"SHOW ME TO MY ROOM"
+ <PERFORM ,V?TAKE-TO ,PRSO ,PRSI>
+ <RTRUE>)>
+ <PERFORM ,V?SHOW ,PRSI ,PRSO>
+ <RTRUE>)
+ (<NOT <HELD? ,PRSO>>
+ <COND (<FSET? <LOC ,PRSO> ,PERSONBIT>
+ <PERFORM ,V?TAKE ,PRSO>)
+ (T
+ <TELL-I-ASSUME ,PRSO " Ask about">
+ <PERFORM ,V?ASK-CONTEXT-ABOUT ,PRSO>)>
+ <RTRUE>)
+ (<QCONTEXT-GOOD?>
+ <PERFORM ,V?SHOW ,QCONTEXT ,PRSO>
+ <RTRUE>)
+ (<SET P <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,WINNER>>
+ <TELL-I-ASSUME .P " Show">
+ <PERFORM ,V?SHOW .P ,PRSO>
+ <RTRUE>)
+ (T
+ <TELL-I-ASSUME ,PLAYER " Show">
+ <PERFORM ,V?SHOW ,PLAYER ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-SSHOW () <V-FOO>>
+
+<ROUTINE V-SIGN () <TELL "You would use your usual hand." CR>
+ ;<YOU-CANT "write on">>
+
+<ROUTINE PRE-SIT () <ROOM-CHECK>>
+
+<ROUTINE V-SIT ("OPTIONAL" (LIE? <>))
+ <COND (<AND <==? ,WINNER ,PLAYER>
+ <OR <FSET? ,PRSO ,VEHBIT>
+ <AND <DOBJ? GLOBAL-HERE HERE FLOOR>
+ ;<FSET? ,HERE ,SURFACEBIT>>>>
+ <TELL "You're now ">
+ <COND (<ZERO? .LIE?>
+ ;<SETG PLAYER-SEATED ,PRSO>
+ <TELL "sitt">)
+ (T
+ ;<SETG PLAYER-SEATED <- 0 ,PRSO>>
+ <TELL "ly">)>
+ <COND (<FSET? ,PRSO ,VEHBIT>
+ <MOVE ,PLAYER ,PRSO>)>
+ <TELL "ing ">
+ <COND (<FSET? ,PRSO ,SURFACEBIT> <TELL "on">) (T <TELL "in">)>
+ <TELL THE ;HIM ,PRSO "." CR>)
+ (T <WONT-HELP>)>>
+
+<ROUTINE WONT-HELP ()
+ <SETG CLOCK-WAIT T>
+ <TELL "(That won't help solve this case!)" CR>>
+
+<ROUTINE V-SIT-AT () <V-SIT>>
+
+<ROUTINE V-SLAP ()
+ <COND (<IOBJ? ROOMS> <SETG PRSI <>>)>
+ <COND ;(<AND ,PRSI <NOT-HOLDING? ,PRSI>>
+ <RTRUE>)
+ (<DOBJ? PLAYER>
+ <TELL
+"That sounds like a sign you could wear on your back." CR>)
+ (<NOT <FSET? ,PRSO ,PERSONBIT>>
+ <IF-SPY>)
+ (<FSET? ,PRSO ,MUNGBIT>
+ <TELL
+"If" HE ,PRSO " could," HE ,PRSO " would slap you right back." CR>)
+ (T <FACE-RED>)>>
+
+<ROUTINE IF-SPY ()
+ ;<COND (<NOT <FSET? ,PRSO ,PERSONBIT>> <TELL "break">)
+ (T <TELL "drop">)>
+ <COND (<ZERO? ,PRSI>
+ <TELL "You give" HIM ,PRSO " a swift ">
+ <COND (<==? ,P-PRSA-WORD ,W?KICK>
+ <TELL "kick">)
+ (T <TELL "hand chop">)>)
+ (T <TELL "You swing" HIM ,PRSI " at" HIM ,PRSO>)>
+ ;<THIS-IS-IT ,PRSO>
+ <TELL ", but" HE ,PRSO " seems indestructible." CR>>
+
+<ROUTINE FACE-RED ("OPTIONAL" (P 0) "AUX" X)
+ <COND (<ZERO? .P> <SET P ,PRSO>)>
+ <UNSNOOZE .P>
+ <SET X <GETP .P ,P?LINE>>
+ <PUTP .P ,P?LINE <+ 1 .X>>
+ <COND (<EQUAL? ,FOLLOWER .P>
+ <SETG FOLLOWER <>>)>
+ <COND (<NOT <EQUAL? <GETP .P ,P?LDESC>
+ 4 ;"looking at you with suspicion">>
+ ;<EQUAL? .P ,FRIEND>
+ <PUTP .P ,P?LDESC 20 ;"ignoring you">)>
+ <TELL CHE .P>
+ <COND (<ZERO? .X>
+ <TELL " looks at you as if you were insane." CR>)
+ (T <TELL " gives you a good slap. It hurts, too!"
+ ;" slaps you right back. Wow, is your face red!" CR>)>>
+
+;<ROUTINE V-SLIDE () <YOU-CANT>>
+
+<ROUTINE V-SMELL ()
+ <TELL CHE ,PRSO smell " just like " A ,PRSO "!" CR>>
+
+<ROUTINE V-SMILE () <HAR-HAR>>
+
+;<ROUTINE V-SMOKE () <YOU-CANT ;"burn">>
+
+;<ROUTINE PRE-SORRY () <PRE-HELLO ;" sorry ">>
+
+<ROUTINE V-SORRY ()
+ <COND (<OR ;<NOT <FSET? ,PRSO ,PERSONBIT>>
+ <==? ,PRSO ,CONFESSED>>
+ <WONT-HELP-TO-TALK-TO ,PRSO>)
+ (<NOT <GRAB-ATTENTION ,PRSO>>
+ <RFATAL>)
+ (<NOT <L? 0 <GETP ,PRSO ,P?LINE>>>
+ <TELL "\"I'm not angry with" HIM ,WINNER " now.\"" CR>)
+ (T
+ ;<SETG DISCOVERED-HERE <>> ;"leave info for SECRET-CHECK"
+ <PUTP ,PRSO ,P?LINE 0 ;<- <GETP ,PRSO ,P?LINE> 1>>
+ <COND (T ;<EQUAL? ,PRSO ,FRIEND>
+ <PUTP ,PRSO ,P?LDESC 3 ;"watching you">)>
+ <TELL "\"Apology accepted.\"" CR>)>>
+
+<ROUTINE V-SOUND () <YOU-CANT>>
+
+<ROUTINE V-STOP ()
+ <COND (<EQUAL? ,PRSO <> ,GLOBAL-HERE>
+ <TELL "Hey, no problem." CR>)
+ (<FSET? ,PRSO ,PERSONBIT>
+ <PERFORM ,V?$CALL ,PRSO>
+ <RTRUE>)
+ (T
+ <PERFORM ,V?LAMP-OFF ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-SWIM ()
+ <SETG CLOCK-WAIT T>
+ <TELL "(" CHE ,WINNER " can't swim ">
+ <COND (<T? ,PRSO>
+ <TELL "in" HIM ,PRSO>)
+ (T
+ <TELL <GROUND-DESC>>)>
+ <TELL ".)" CR>>
+
+<ROUTINE PRE-TAKE ("AUX" L)
+ <SET L <LOC ,PRSO>>
+ <COND (<AND <DOBJ? MOONMIST>
+ <EQUAL? ,VARIATION ,DOCTOR-C>
+ <IN? ,MOONMIST ,INKWELL>
+ <T? ,TREASURE-FOUND>>
+ <SET L <LOC ,INKWELL>>)>
+ <COND (<DOBJ? CASTLE MOON OCEAN
+ NOW-WEARING ;POCKET TOWER FLOOR
+ WALL KEYHOLE>
+ <HAR-HAR>)
+ (<DOBJ? ARTIFACT HANDS PASSAGE TREASURE YOU>
+ <RFALSE>)
+ (<DOBJ? LIGHT-GLOBAL NIGHTLAMP>
+ <COND (<CREEPY? ,HERE>
+ <NOT-HERE ,PRSO>)
+ (T <TELL "The cord isn't long enough." CR>)>)
+ (<DOBJ? MIRROR-GLOBAL>
+ <YOU-CANT>)
+ (<DOBJ? UNDRESSED>
+ <COND (<NOUN-USED? ,W?DRESSE>
+ <COND (<T? ,PRSI>
+ <PERFORM ,V?WEAR ,PRSI>
+ <RTRUE>)
+ (T
+ <PERFORM ,V?DRESS ,WINNER>
+ <RTRUE>)>)
+ (T ;<NOUN-USED? ,W?UNDRESS>
+ <PERFORM ,V?UNDRESS ,WINNER>
+ <RTRUE>)
+ ;(T <NOT-HERE ,PRSO>)>)
+ (<IN? ,PRSO ,GLOBAL-OBJECTS>
+ <NOT-HERE ,PRSO>)
+ (<AND .L
+ <FSET? .L ,CONTBIT>
+ <NOT <FSET? .L ,OPENBIT>>>
+ <TOO-BAD-BUT .L "closed">
+ <RTRUE>)
+ (<T? ,PRSI>
+ <COND (<EQUAL? ,PRSI ,WALL ;,POCKET .L>
+ <SETG PRSI <>>
+ <RFALSE>)
+ ;(<EQUAL? ,PRSI ,WALL>
+ <TOO-BAD-BUT ,PRSO "stuck tight">
+ <RTRUE>)
+ (<AND <NOT <FSET? ,PRSI ,SURFACEBIT>>
+ <NOT <FSET? ,PRSI ,OPENBIT>>
+ <NOT <FSET? ,PRSI ,PERSONBIT>>>
+ <TOO-BAD-BUT ,PRSI "closed">
+ <RTRUE>)
+ (<NOT <==? ,PRSI .L>>
+ <COND (<NOT <FSET? ,PRSI ,PERSONBIT>>
+ <TELL CHE ,PRSO is "n't in" THE ,PRSI "!" CR>)
+ (T <TELL
+CHE ,PRSI do "n't have" THE ,PRSO "!" CR>)>)>)
+ (T <PRE-TAKE-WITH>)>>
+
+<ROUTINE PRE-TAKE-WITH ("AUX" X)
+ <COND (<DOBJ? YOU>
+ <RFALSE>)
+ (<AND <FSET? ,PRSO ,PERSONBIT>
+ <NOT <DOBJ? GHOST-NEW>>
+ <EQUAL? ,P-PRSA-WORD ,W?SEIZE ,W?GRAB>> ;"SEIZE villain"
+ <PERFORM ,V?ARREST ,PRSO>
+ <RTRUE>)
+ (<EQUAL? <META-LOC ,PRSO> ,GLOBAL-OBJECTS>
+ <COND (<AND <NOT <HELD? ,PRSO>>
+ <NOT <FSET? ,PRSO ,PERSONBIT>>>
+ <NOT-HERE ,PRSO>)>)
+ (<IN? ,PRSO ,WINNER>
+ <ALREADY ,PLAYER>
+ <TELL "holding" THE ,PRSO "!)" CR>)
+ (<AND <FSET? <LOC ,PRSO> ,CONTBIT>
+ <NOT <FSET? <LOC ,PRSO> ,OPENBIT>>>
+ <YOU-CANT "reach">)
+ (<AND <IN? ,WINNER ,PRSO>
+ <NOT <NOUN-USED? ,W?DOOR ,W?KEYHOLE>>>
+ <SETG CLOCK-WAIT T>
+ <TELL !\( CHE ,WINNER is " in" HIM ,PRSO ", nitwit!)" CR>)>>
+
+<ROUTINE V-TAKE ()
+ <COND (<==? <ITAKE> T>
+ <TELL CHE ,WINNER is " now holding" THE ;HIM ,PRSO "." CR>)>>
+
+<ROUTINE V-TAKE-OFF ()
+ <COND (<DOBJ? NOW-WEARING>
+ <SETG PRSO <>>
+ <V-WEAR>
+ <RTRUE>)
+ ;(<WEAR-CHECK>
+ <RTRUE>)
+ (<FSET? ,PRSO ,WORNBIT>
+ <FCLEAR ,PRSO ,WORNBIT>
+ <TELL "Okay," HE <LOC ,PRSO> is " no longer wearing">
+ <MOVE ,PRSO ,WINNER>
+ <TELL HIM ,PRSO "." CR>)
+ (T
+ <TELL CHE <LOC ,PRSO> is "n't wearing" HIM ,PRSO "!" CR>)>>
+
+<ROUTINE V-TAKE-TO () ;"Parser should have ITAKEn PRSO."
+ <PERFORM ,V?WALK-TO ,PRSI>
+ <RTRUE>>
+
+;<ROUTINE V-TAKE-WITH ()
+ <TELL "You can't remove" HIM ,PRSO " with" HIM ,PRSI "!" CR>>
+
+<ROUTINE V-DISEMBARK ()
+ <COND (<ROOM-CHECK>
+ <RTRUE>)
+ (<DOBJ? ROOMS HERE GLOBAL-HERE ;GLOBAL-WATER>
+ <COND (<AND <==? ,WINNER ,PLAYER>
+ <NOT <IN? ,PLAYER ,HERE>>
+ ;<T? ,PLAYER-SEATED>>
+ <OWN-FEET>)
+ (T
+ <DO-WALK ,P?OUT>
+ <RTRUE>)>)
+ (<DOBJ? NOW-WEARING>
+ <V-TAKE-OFF>
+ <RTRUE>)
+ (<==? <LOC ,PRSO> ,WINNER>
+ <TELL
+"You don't need to take" HIM ,PRSO " out to use" HIM ,PRSO "." CR>)
+ ;(<==? <LOC ,PRSO> ,POCKET>
+ <MOVE ,PRSO ,WINNER>
+ <TELL CHE ,WINNER is " now holding" HIM ,PRSO "." CR>)
+ (<AND <NOT <==? <LOC ,WINNER> ,PRSO>>
+ <NOT <IN? ,PLAYER ,PRSO>>
+ ;<NOT <EQUAL? ,PLAYER-SEATED ,PRSO <- 0 ,PRSO>>>>
+ <TELL "You're not ">
+ <COND (<FSET? ,PRSO ,SURFACEBIT> <TELL "on">) (T <TELL "in">)>
+ <TELL HIM ,PRSO "!|">
+ <RFATAL>)
+ (T
+ <OWN-FEET>)>>
+
+<ROUTINE OWN-FEET ()
+ <MOVE ,WINNER ,HERE>
+ ;<COND (<==? ,WINNER ,PLAYER>
+ <SETG PLAYER-SEATED <>>)>
+ <TELL CHE ,WINNER is " on" HIS ,WINNER " own feet again." CR>
+ <COND (<EQUAL? ,DRIVEWAY ,HERE>
+ <ENTER-ROOM>)> ;"to conform with manual"
+ <RTRUE>>
+
+<ROUTINE V-HOLD-UP ()
+ <COND (<DOBJ? ROOMS>
+ <PERFORM ,V?STAND>
+ <RTRUE>)
+ (T
+ <WONT-HELP>
+ ;<TELL "That doesn't seem to help at all." CR>)>>
+
+;<ROUTINE PRE-TELL () <PRE-ASK-ABOUT>>
+
+<ROUTINE V-TELL ("AUX" P)
+ <COND (<==? ,PRSO ,PLAYER>
+ <COND (<NOT <==? ,WINNER ,PLAYER>>
+ <SET P ,WINNER>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?ASK .P>
+ <RTRUE>)
+ (<T? ,QCONTEXT>
+ <SETG QCONTEXT <>>
+ <COND (<T? ,P-CONT>
+ <SETG WINNER ,PLAYER>)
+ (T <TELL
+"Okay, you're not talking to anyone else." CR>)>)
+ (T
+ <WONT-HELP-TO-TALK-TO ,PLAYER>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <RFATAL>)>)
+ (<AND <FSET? ,PRSO ,PERSONBIT>
+ <NOT <FSET? ,PRSO ,MUNGBIT>>>
+ <UNSNOOZE ,PRSO>
+ <SETG QCONTEXT ,PRSO>
+ <COND (<T? ,P-CONT>
+ <SETG CLOCK-WAIT T>
+ <SETG WINNER ,PRSO>)
+ (T
+ <TELL
+CHE ,PRSO is !\ <GET ,LDESC-STRINGS 12> ;"listening to you" "." CR>)>)
+ (T
+ <WONT-HELP-TO-TALK-TO ,PRSO>
+ ;<YOU-CANT "talk to">
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <RFATAL>)>>
+
+<ROUTINE PRE-STELL-ABOUT () <PERFORM ,V?TELL-ABOUT ,PRSI ,PRSO> <RTRUE>>
+<ROUTINE V-STELL-ABOUT () <V-FOO>>
+
+<ROUTINE PRE-TELL-ABOUT ("AUX" P)
+ <COND (<DOBJ? PLAYER PLAYER-NAME>
+ <COND (<QCONTEXT-GOOD?>
+ <PERFORM ,V?ASK-ABOUT ,QCONTEXT ,PRSI>)
+ (<AND <SET P <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,WINNER>>>
+ <TELL-I-ASSUME .P " Ask">
+ <PERFORM ,V?ASK-ABOUT .P ,PRSI>)
+ (T <ARENT-TALKING>)>
+ <RTRUE>)
+ (<AND <NOT <FSET? ,PRSI ,SEENBIT>>
+ <NOT <FSET? ,PRSI ,TOUCHBIT>>>
+ <NOT-FOUND ,PRSI>
+ <RTRUE>)
+ (<OR <EQUAL? ,PRSI ,BRICKS ,COFFIN ,CRYPT>
+ <EQUAL? ,PRSI ,DUNGEON ,IRON-MAIDEN ,TOMB>
+ <EQUAL? ,PRSI ,WELL>>
+ <TELL ,ANCIENT-SECRETS CR>)
+ (T <PRE-ASK-ABOUT>)>>
+
+<ROUTINE V-TELL-ABOUT ("AUX" P)
+ <COND ;(<DOBJ? PLAYER>
+ <COND (<SET P <GETP ,PRSI ,P?TEXT>>
+ <TELL .P CR>)
+ (T <ARENT-TALKING>)>)
+ (T
+ <TELL "\"I'm afraid you'll have to show me instead of telling me.\""
+ ;"\"I don't see why that's important now.\"" CR>
+ ;<PERFORM ,V?ASK-ABOUT ,PRSO ,PRSI>
+ <RTRUE>)>>
+
+<ROUTINE PRE-TALK-ABOUT ("AUX" P)
+ <COND (<NOT <==? ,WINNER ,PLAYER>>
+ <SET P ,WINNER>
+ <SETG WINNER ,PLAYER>
+ <PERFORM ,V?ASK-ABOUT .P ,PRSO>
+ <RTRUE>)
+ (<QCONTEXT-GOOD?>
+ <PERFORM ,V?ASK-ABOUT ,QCONTEXT ,PRSO>
+ <RTRUE>)
+ (<SET P <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,WINNER>>
+ <TELL-I-ASSUME .P " to">
+ <PERFORM ,V?ASK-ABOUT .P ,PRSO>
+ <RTRUE>)>>
+
+<ROUTINE V-TALK-ABOUT () <ARENT-TALKING>>
+
+<GLOBAL QUITE-WELCOME "\"You're quite welcome, I'm sure.\"|">
+
+<ROUTINE V-THANKS ()
+ <COND (<T? ,PRSO>
+ <COND (<AND <FSET? ,PRSO ,PERSONBIT>
+ <NOT <FSET? ,PRSO ,MUNGBIT>>>
+ <TELL ,QUITE-WELCOME>
+ <RTRUE>)
+ (T <YOU-CANT>)>)
+ (T
+ <COND (<OR <QCONTEXT-GOOD?>
+ <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,WINNER>>
+ <TELL ,QUITE-WELCOME>)
+ (T <TELL "You're more than welcome." CR>)>)>>
+
+<ROUTINE V-THROW () <COND (<IDROP> <TELL "Thrown." CR>)>>
+
+<ROUTINE V-THROW-AT ()
+ <COND (<NOT <IDROP>>
+ <RTRUE>)>
+ <COND ;(<AND <FSET? ,PRSI ,PERSONBIT>
+ <NOT <FSET? ,PRSI ,MUNGBIT>>>
+ <TELL CHE ,PRSI duck>)
+ (T <TELL CHE ,PRSI do "n't duck">)>
+ <TELL " as" HE ,PRSO " flies by." CR>>
+
+;<ROUTINE V-THROW-OFF ("AUX" X) <YOU-CANT "throw off">>
+
+<ROUTINE PRE-THROW-THROUGH ()
+ <FCLEAR ,PRSO ,WORNBIT>
+ <RFALSE>>
+
+<ROUTINE V-THROW-THROUGH ()
+ <COND (<NOT <FSET? ,PRSO ,PERSONBIT>>
+ <TELL "Let's not resort to vandalism, please." CR>)
+ (T <V-THROW>)>>
+
+;<ROUTINE PRE-TIE-TO ()
+ <COND (<NOT <FSET? ,PRSO ,PERSONBIT>>
+ <TELL "That won't do any good." CR>)>>
+
+;<ROUTINE V-TIE-TO ()
+ <TELL "You can't tie" HIM ,PRSO " to" THE ,PRSI "." CR>>
+
+;<ROUTINE PRE-TIE-WITH ()
+ <COND (<OR <NOT <FSET? ,PRSO ,PERSONBIT>>
+ <NOT <FSET? ,PRSI ,TOOLBIT>>>
+ <TELL "That won't do any good." CR>)>>
+
+;<ROUTINE V-TIE-WITH ()
+ <TELL "\"If you don't formally arrest me first, I'll sue!\"" CR>>
+
+<ROUTINE V-TIME ()
+ <TELL "The time is now ">
+ <TIME-PRINT ,PRESENT-TIME>
+ <TELL "." CR>>
+
+<ROUTINE TIME-PRINT (NUM "AUX" HR ;(AM <>))
+ <SET HR </ .NUM 60>>
+ <COND (<G? .HR 12>
+ <SET HR <- .HR 12>>
+ ;<SET AM T>)
+ ;(<==? .HR 12> <SET AM T>)>
+ <PRINTN .HR>
+ <TELL !\:>
+ <COND (<L? <SET HR <MOD .NUM 60>> 10>
+ <TELL !\0>)>
+ <TELL N .HR>
+ ;<TELL !\ <COND (.AM "a.m.") (T "p.m.")>>>
+
+<ROUTINE V-TURN ()
+ <COND ;(<EQUAL? <META-LOC ,PRSO> ,GLOBAL-OBJECTS>
+ <NOT-HERE ,PRSO>)
+ (<AND <FSET? ,PRSO ,DOORBIT> <FSET? ,PRSO ,OPENBIT>>
+ <PERFORM ,V?CLOSE ,PRSO>
+ <RTRUE>)
+ (T <TELL "What do you want that to do?" CR>)>>
+
+<ROUTINE V-LAMP-OFF ()
+ <COND (<NOT <FSET? ,PRSO ,LIGHTBIT>>
+ <YOU-CANT "turn off">)
+ (<NOT <FSET? ,PRSO ,ONBIT>>
+ <ALREADY ,PRSO "off">)
+ (T
+ <OKAY ,PRSO "off">)>>
+
+<ROUTINE V-LAMP-ON ()
+ <COND (<FSET? ,PRSO ,ONBIT>
+ <ALREADY ,PRSO "on">)
+ (<FSET? ,PRSO ,LIGHTBIT>
+ <OKAY ,PRSO "on">)
+ (<FSET? ,PRSO ,PERSONBIT>
+ <HAR-HAR>)
+ (T <YOU-CANT "turn on">)>>
+
+<ROUTINE V-UNLOCK ()
+ <COND (<OR <FSET? ,PRSO ,DOORBIT>
+ <AND <FSET? ,PRSO ,CONTBIT>
+ <NOT <ZERO? <GETP ,PRSO ,P?CAPACITY>>>>>
+ <COND (<NOT <FSET? ,PRSO ,LOCKED>>
+ <ALREADY ,PRSO "unlocked">)
+ (<ZERO? <UNLOCK-DOOR? ,PRSO>>
+ <YOU-CANT>)
+ (T
+ ;<COND (<FSET? ,PRSO ,OPENBIT>
+ <FCLEAR ,PRSO ,OPENBIT>
+ <FIRST-YOU "close" ,PRSO>)>
+ <FCLEAR ,PRSO ,LOCKED>
+ <OKAY ,PRSO "unlocked">)>)
+ (T
+ <SETG CLOCK-WAIT T>
+ <TELL !\( CHE ,PRSO is "n't locked!)" CR>)>>
+
+;<ROUTINE V-UNTIE ()
+ <TELL "You can't tie" HIM ,PRSO ", so you can't untie" HIM ,PRSO "!" CR>>
+
+<ROUTINE MORE-SPECIFIC ()
+ <SETG CLOCK-WAIT T>
+ <TELL "[Please be more specific.]" CR>>
+
+<ROUTINE V-USE () <MORE-SPECIFIC>>
+
+"V-WAIT has three modes, depending on the arguments:
+1) If only one argument is given, it will wait for that many moves.
+2) If a second argument is given, it will wait the least of the first
+ argument number of moves and the time at which the second argument
+ (an object) is in the room with the player.
+3) If the third argument is given, the second should be FALSE. It will
+ wait <first argument> number of moves (or at least try to). The
+ third argument means that an 'internal wait' is happening (e.g. for
+ a 'careful' search)."
+
+;<GLOBAL WHO-WAIT:NUMBER 0>
+
+<GLOBAL KEEP-WAITING <>>
+
+<ROUTINE V-WAIT ("OPTIONAL" (NUM -1) (WHO <>) (INT <>)
+ "AUX" (WHO-WAIT 0) VAL HR (RESULT T))
+ <COND (<==? -1 .NUM>
+ <SET NUM 10>)>
+ <COND (<AND <ZERO? .INT>
+ <AND <NOT <FSET? ,PRSO ,PERSONBIT>>
+ <NOT <DOBJ? INTNUM TURN GHOST-NEW>>>>
+ <TELL ,I-ASSUME " Wait " N .NUM " minute">
+ <COND (<NOT <1? .NUM>>
+ <TELL !\s>)>
+ <TELL ".]" CR>)>
+ <SET HR ,HERE>
+ <COND (<NOT .INT> <TELL "Time passes..." CR>)>
+ <DEC NUM>
+ <REPEAT ()
+ <COND (<L? <SET NUM <- .NUM 1>> 0>
+ <SETG KEEP-WAITING <>>
+ <RETURN>)
+ (<SET VAL <CLOCKER>>
+ <COND (<OR <==? .VAL ,M-FATAL>
+ <NOT <==? .HR ,HERE>>>
+ <SETG CLOCK-WAIT T>
+ <SET RESULT ,M-FATAL>
+ <RETURN>)
+ ;(<0? .NUM> <RETURN>)
+ (<AND .WHO <IN? .WHO ,HERE>>
+ <SETG CLOCK-WAIT T>
+ <NOT-IT .WHO>
+ <TELL CTHE .WHO ", for wh">
+ <COND (<FSET? .WHO ,PERSONBIT>
+ <TELL "om">)
+ (T <TELL "ich">)>
+ <TELL " you're waiting, has arrived." CR>
+ <RETURN>)
+ (T
+ <SET WHO-WAIT <+ .WHO-WAIT 1>>
+ <COND (<NOT <==? <BAND <GETB 0 1> 16> 0>>
+ <TELL !\(>
+ <SET VAL <TIME-PRINT ,PRESENT-TIME>>
+ <TELL ") ">)>
+ <COND (<T? ,KEEP-WAITING>
+ <USL>
+ <AGAIN>)>
+ <TELL "Do you want to keep ">
+ <SET VAL <VERB-PRINT T>>
+ <COND (<YES?> <USL>)
+ (T
+ <SETG CLOCK-WAIT T>
+ <SET RESULT ,M-FATAL>
+ <RETURN>)>)>)
+ (<AND .WHO <G? <SET WHO-WAIT <+ .WHO-WAIT 1>> 30>>
+ <SET VAL <START-SENTENCE .WHO>>
+ <TELL
+" still hasn't arrived. Do you want to keep waiting?">
+ <COND (<NOT <YES?>> <RETURN>)>
+ <SET WHO-WAIT 0>
+ <USL>)
+ (T <USL>)>>
+ %<DEBUG-CODE <COND (<NOT .INT>
+ <TELL "{" ;"Note to Stu: ">
+ <TIME-PRINT ,PRESENT-TIME>
+ <TELL "}|">
+ ;<V-TIME>)>>
+ .RESULT>
+
+;<ROUTINE INT-WAIT (N "AUX" TIM REQ VAL)
+ <SET TIM ,PRESENT-TIME>
+ <COND (<==? ,M-FATAL <V-WAIT <SET REQ <RANDOM <* .N 2>>> <> T>>
+ <RFATAL>)
+ (<NOT <L? <- ,PRESENT-TIME .TIM> .REQ>>
+ <RTRUE>)
+ (T <RFALSE>)>>
+
+<ROUTINE V-WAIT-FOR ("AUX" WHO)
+ <COND (<AND <NOT <==? -1 ,P-NUMBER>>
+ <DOBJ? ROOMS TURN INTNUM>>
+ <COND ;(<G? ,P-NUMBER ,PRESENT-TIME> <V-WAIT-UNTIL> <RTRUE>)
+ ;(<G? ,P-NUMBER 180>
+ <TELL "That's too long to wait." CR>)
+ (<T? ,P-TIME>
+ <V-WAIT-UNTIL>)
+ (T <V-WAIT ,P-NUMBER>)>)
+ (<DOBJ? ROOMS TURN GLOBAL-HERE>
+ <V-WAIT>)
+ (<DOBJ? PLAYER>
+ <ALREADY ,PLAYER "here">)
+ (<OR <FSET? ,PRSO ,PERSONBIT>
+ <DOBJ? GHOST-NEW>>
+ <COND (<==? <META-LOC ,PRSO> ,HERE>
+ <ALREADY ,PRSO "here">)
+ (T <V-WAIT 10000 ,PRSO>)>)
+ (T <TELL "Not a good idea. You might wait forever." CR>)>>
+
+<ROUTINE V-WAIT-UNTIL ("AUX" N)
+ <COND (<AND <NOT <==? -1 ,P-NUMBER>>
+ <DOBJ? ROOMS TURN INTNUM>>
+ <SET N ,P-NUMBER>
+ <COND (<T? ,P-TIME>
+ <COND (<L? .N 420>
+ <SET N <+ .N 720>>)>)
+ (T
+ <COND (<L? .N 8 ;7>
+ <SET N <+ <* .N 60> 720>>)
+ (<L? .N 13>
+ <SET N <* .N 60>>)
+ (<L? .N 24>
+ <SET N <- <* .N 60> 720>>)
+ (<G? .N 99>
+ <SET N <+ <MOD .N 100>
+ <* </ .N 100> 60>>>)>
+ <COND (<L? .N 420>
+ <SET N <+ .N 720>>)>
+ <TELL ,I-ASSUME !\ >
+ <TIME-PRINT .N>
+ <TELL "]" CR>)>
+ <COND (<G? .N ,PRESENT-TIME>
+ <V-WAIT <- .N ,PRESENT-TIME>>)
+ (T
+ <SETG CLOCK-WAIT T>
+ <TELL "(It's already past that time!)" CR>)>)
+ (T <YOU-CANT "wait until">)>>
+
+<ROUTINE V-ALARM ()
+ <COND (<==? ,PRSO ,ROOMS>
+ ;<SETG OPRSO ,PRSO>
+ <SETG PRSO ,WINNER>)>
+ <COND ;(<FSET? ,PRSO ,PERSONBIT>
+ <COND (<FSET? ,PRSO ,MUNGBIT>
+ <WONT-HELP-TO-TALK-TO ,PRSO>
+ ;<TELL " doesn't respond." CR>)
+ (T <TELL
+CHE ,PRSO " is wide awake, or haven't you noticed?" CR>)>)
+ (T
+ <TOO-BAD-BUT ,PRSO "not asleep">)>>
+
+<ROUTINE DO-WALK (DIR "AUX" P)
+ <SETG P-WALK-DIR .DIR>
+ <PERFORM ,V?WALK .DIR>>
+
+<ROUTINE V-WALK ("AUX" PT PTS STR RM)
+ <COND (<ZERO? ,P-WALK-DIR>
+ <COND (<AND <==? ,PRSO ,P?IN>
+ <OR <IN? ,P-IT-OBJECT ,ROOMS>
+ <FSET? ,P-IT-OBJECT ,VEHBIT>
+ <FSET? ,P-IT-OBJECT ,CONTBIT>>>
+ <TELL-I-ASSUME ,P-IT-OBJECT ;" Go in">
+ <PERFORM ,V?THROUGH ,P-IT-OBJECT>
+ <RTRUE>)
+ (T
+ <V-WALK-AROUND>
+ <RFATAL>)>)>
+ <COND (<SET PT <GETPT <LOC ,WINNER> ,PRSO>>
+ <COND (<==? <SET PTS <PTSIZE .PT>> ,UEXIT>
+ <SET RM <GET-REXIT-ROOM .PT>>
+ <COND (<GOTO .RM> <OKAY>)>
+ <RTRUE>)
+ (<==? .PTS ,NEXIT>
+ <SETG CLOCK-WAIT T>
+ <TELL !\( <GET .PT ,NEXITSTR> !\) CR>
+ <RFATAL>)
+ (<==? .PTS ,FEXIT>
+ <COND (<SET RM <APPLY <GET .PT ,FEXITFCN>>>
+ <COND (<GOTO .RM> <OKAY>)>
+ <RTRUE>)
+ (T
+ <RFATAL>)>)
+ (<==? .PTS ,CEXIT>
+ <COND (<VALUE <GETB .PT ,CEXITFLAG>>
+ <COND (<GOTO <GET-REXIT-ROOM .PT>> <OKAY>)>
+ <RTRUE>)
+ (<SET STR <GET .PT ,CEXITSTR>>
+ <TELL .STR CR>
+ <RFATAL>)
+ (T
+ <YOU-CANT "go">
+ <RFATAL>)>)
+ (<==? .PTS ,DEXIT>
+ <COND (<WALK-THRU-DOOR? .PT>
+ <COND (<GOTO <GET-REXIT-ROOM .PT>> <OKAY>)>
+ <RTRUE>)
+ (T <RFATAL>)>)>)
+ (<EQUAL? ,PRSO ,P?IN ,P?OUT>
+ <V-WALK-AROUND>)
+ (<EQUAL? ,PRSO ,P?UP>
+ <PERFORM ,V?CLIMB-UP ,STAIRS>
+ <RTRUE>)
+ (<EQUAL? ,PRSO ,P?DOWN>
+ <PERFORM ,V?CLIMB-DOWN ,STAIRS>
+ <RTRUE>)
+ (<EQUAL? ,HERE ,DRIVEWAY>
+ <TELL ,CASTLE-IS-SOUTH>
+ <RFATAL>)
+ (T
+ <YOU-CANT "go">
+ <RFATAL>)>>
+
+<GLOBAL CASTLE-IS-SOUTH "(The castle is south of here.)|">
+
+<ROUTINE UNLOCK-DOOR? (DR)
+ <COND (<EQUAL? ,HERE .DR>
+ <RTRUE>)
+ (<EQUAL? ,HERE ;,CAR ,DRIVEWAY <GETP ,HERE ,P?STATION>>
+ <RFALSE>)
+ (<EQUAL? .DR ,SECRET-SITTING-DOOR ,FRONT-GATE>
+ <RFALSE>)
+ (T <RTRUE>)>>
+
+<ROUTINE WALK-THRU-DOOR? (PT "OPTIONAL" (OBJ 0) (TELL? T)
+ "AUX" RM)
+ <COND (<ZERO? .OBJ>
+ <SET OBJ <GET-DOOR-OBJ .PT>>)>
+ ;<SET RM <GET-REXIT-ROOM .PT>>
+ <COND (<FSET? .OBJ ,OPENBIT>
+ <RTRUE>)
+ (<AND <FSET? .OBJ ,SECRETBIT>
+ <NOT <FSET? .OBJ ,TOUCHBIT ;,SEENBIT>>>
+ <COND (<EQUAL? <> .TELL? ,VERBOSITY>
+ <RFALSE>)
+ (<NOT <FSET? ,HERE ,SECRETBIT>>
+ <YOU-CANT "go">
+ <RFALSE>)
+ (<ZERO? ,LIT>
+ <NOT-FOUND .OBJ>
+ <RFALSE>)
+ (T
+ <COND (<NOT <VERB? WALK-TO>>
+ <OPEN-DOOR-AND-CLOSE-IT-AGAIN .OBJ>)>
+ <RTRUE>)>)
+ (<NOT <FSET? .OBJ ,LOCKED>>
+ <COND (<NOT <VERB? WALK-TO>>
+ <FCLEAR .OBJ ,SECRETBIT>
+ <FSET .OBJ ,SEENBIT ;,TOUCHBIT>
+ ;"Don't put TOUCHBIT on ROOM"
+ <COND (<NOT <EQUAL? <> .TELL? ,VERBOSITY>>
+ <OPEN-DOOR-AND-CLOSE-IT-AGAIN .OBJ>)>)>
+ <RTRUE>)
+ (<AND <T? .PT>
+ <SET RM <GET .PT ,DEXITSTR>>>
+ <COND (<T? .TELL?>
+ <TELL .RM CR>)>
+ <RFALSE>)
+ (T
+ <COND (<ZERO? .TELL?>
+ <RFALSE>)
+ (<T? <UNLOCK-DOOR? .OBJ>>
+ <COND (<AND <NOT <VERB? WALK-TO>>
+ <T? ,VERBOSITY>>
+ <OPEN-DOOR-AND-CLOSE-IT-AGAIN .OBJ>)>
+ <RTRUE>)
+ ;(<IN? .OBJ ,ROOMS>
+ ;<COND (<VERB? WALK-TO>
+ <TELL ", but t">)
+ (T )>
+ <TELL "The door is locked." CR>
+ ;<COND (<NOT <VERB? WALK-TO>>
+ )>)
+ (T <TOO-BAD-BUT .OBJ "locked">)>
+ <THIS-IS-IT .OBJ>
+ <RFALSE>)>>
+
+<ROUTINE OPEN-DOOR-AND-CLOSE-IT-AGAIN (OBJ)
+ <FSET .OBJ ,SEENBIT ;,TOUCHBIT> ;"Don't put TOUCHBIT on ROOM"
+ <COND (<NOT <==? ,WINNER ,PLAYER>>
+ <RTRUE>)>
+ <TELL "(You ">
+ <COND (<FSET? .OBJ ,LOCKED>
+ <FCLEAR .OBJ ,LOCKED>
+ <TELL "unlock and ">)>
+ <TELL "open the ">
+ <COND (<EQUAL? .OBJ ,FRONT-GATE> <TELL "gate">)
+ (T <TELL "door">)>
+ <COND (<FSET? .OBJ ,SECRETBIT>
+ <FSET .OBJ ,OPENBIT>)
+ (T <TELL " and close it again">)>
+ <TELL ".)" CR>>
+
+<ROUTINE V-WALK-AROUND ()
+ <SETG CLOCK-WAIT T>
+ <TELL !\[ ,WHICH-DIR "]|">
+ <RFATAL>>
+
+<ROUTINE WHO-KNOWS? (OBJ)
+ <SETG CLOCK-WAIT T>
+ <TELL "(Who knows where" HE .OBJ is "?)" CR>>
+
+;<ROUTINE V-BACK-UP () <WALK-WITHIN-ROOM>>
+
+<ROUTINE WALK-WITHIN-ROOM () <NO-NEED "move around within" ,HERE ;" a place">>
+
+<ROUTINE V-WALK-TO ("AUX" L VAL)
+ <SET L <META-LOC ,PRSO>>
+ <COND (<FSET? ,PRSO ,PERSONBIT>
+ <COND (<AND <==? <META-LOC ,WINNER> .L>
+ <NOT <FSET? ,PRSO ,NDESCBIT>>>
+ <BITE-YOU>
+ <RTRUE>)
+ (<NOT <SET L <FOLLOW-LOC?>>>
+ ;<ZERO? <SET L <GET ,FOLLOW-LOC <GETP ,PRSO ,P?CHARACTER>>>>
+ <WHO-KNOWS? ,PRSO>
+ <RFATAL>)
+ ;(<==? <PRE-FIND> ,M-FATAL>
+ <RFATAL>)>)>
+ %<DEBUG-CODE <COND (<T? ,DBUG> <TELL "{WALK-TO: " D ,PRSO !\/ D .L "}|">)>>
+ <COND (<AND <FSET? ,PRSO ,SECRETBIT>
+ <NOT <==? .L ,PRSO>>>
+ <NO-FUN>)
+ (<AND <EQUAL? ,HERE <LOC ,WINNER>>
+ <OR <EQUAL? .L ,HERE>
+ <EQUAL? ,PRSO ,PSEUDO-OBJECT ,WALL>
+ <AND <NOT <IN? .L ,ROOMS>>
+ <GLOBAL-IN? ,PRSO ,HERE>>>>
+ <WALK-WITHIN-ROOM>)
+ (<AND <OR <EQUAL? .L ,LOCAL-GLOBALS> ;<FSET? ,PRSO ,DOORBIT>>
+ ;<GLOBAL-IN? ,PRSO ,HERE>>
+ <MORE-SPECIFIC>)
+ (<TOUR?>
+ <RTRUE>)
+ (<APPLY <GETP ,HERE ,P?ACTION> ,M-EXIT>
+ <RTRUE>)
+ (<DOBJ? INTDIR>
+ <V-WALK-AROUND>)
+ (<OR ;<AND <FSET? ,PRSO ,PERSONBIT> ;"done above"
+ <FSET? ,PRSO ,NDESCBIT>>
+ <AND <NOT <IN? ,PRSO ;.L ,ROOMS>>
+ <NOT <FSET? ,PRSO ,TOUCHBIT>>>>
+ <WHO-KNOWS? ,PRSO>
+ <RFATAL>)
+ (<FAR-AWAY? .L>
+ <SETG CLOCK-WAIT T>
+ <TELL !\( CHE ,WINNER " can't go there from here">
+ <COND (<NOT <EQUAL? .L ,GLOBAL-OBJECTS>>
+ <TELL ", at least not directly">)>
+ <TELL ".)" CR>)
+ (<NOT <EQUAL? ,WINNER ,PLAYER>>
+ <COND (<GOTO .L>
+ <COND (<EQUAL? ,WINNER ,FOLLOWER>
+ <SETG FOLLOWER 0>)>
+ <SET L <GT-O ,WINNER>>
+ <COND (<T? <GET .L ,GOAL-S>>
+ <ESTABLISH-GOAL ,WINNER
+ <GET .L ,GOAL-F>
+ <GET .L ,GOAL-ENABLE>>)>
+ <OKAY>
+ ;<TELL "\"Okay.\"" CR>)>
+ <RTRUE>)
+ (T
+ <COND (<SEE-INTO? ,PRSO <> ;T>
+ <SET VAL <DIR-FROM ,HERE .L>>
+ <COND (<T? .VAL>
+ <COND (<==? ,M-FATAL <APPLY <GETP ,HERE ,P?ACTION> .VAL>>
+ <RFATAL>)>)>
+ <GOTO ,PRSO <>>
+ <RTRUE>)
+ (<ZERO? ,NOW-WEARING>
+ <YOUR-ROOM-F ,P?OUT>
+ <RFATAL>)>
+ <TELL "You go quickly toward" THE .L ;" that place" ".|">
+ ;<COND (<EQUAL? ,HERE ,YOUR-BATHROOM>
+ <MOVE ,PLAYER ,YOUR-ROOM>)>
+ <ESTABLISH-GOAL ,PLAYER .L>
+ <SETG OHERE ,HERE>
+ <FSET ,PLAYER ,INVISIBLE>
+ <REPEAT ()
+ <COND (<SET VAL <FOLLOW-GOAL ,PLAYER>>
+ <RETURN>)>>
+ <FCLEAR ,PLAYER ,INVISIBLE>
+ <COND (<T? ,FOLLOWER>
+ <FRIEND-FOLLOWS-YOU ,HERE>)>
+ <COND (<NOT <==? ,OHERE ,HERE>>
+ <ENTER-ROOM>)>
+ .VAL)>>
+
+<GLOBAL DISCOVERED-HERE:OBJECT <>>
+<ROUTINE ENTER-ROOM ("AUX" VAL)
+ <SETG LIT <LIT? ;,HERE>>
+ <COND (<FSET? ,HERE ,SECRETBIT>
+ <SETG WASHED <>>)
+ (<OR <EQUAL? ,HERE ,JACK-ROOM ,TAMARA-ROOM ,IRIS-ROOM>
+ <EQUAL? ,HERE ,WENDISH-ROOM ,VIVIEN-ROOM ,IAN-ROOM>
+ <EQUAL? ,HERE ,HYDE-ROOM>>
+ <TELL
+"You enter the room cautiously after a preliminary peek.">
+ <COND (<AND ;<ZERO? ,LIONEL-SPEAKS-COUNTER>
+ <NOT <EQUAL? <LOC <GET ,CHARACTER-TABLE
+ <- <ZMEMQ ,HERE ,CHAR-ROOM-TABLE> 1>>>
+ ,HERE ,LOCAL-GLOBALS>>>
+ <SETG DISCOVERED-HERE ,HERE>
+ <QUEUE I-DISCOVERED 6 ;5>)>
+ <COND (<AND <T? ,LIT>
+ <ZERO? <FIND-FLAG-HERE ,PERSONBIT ,PLAYER>>>
+ <TELL " No one is there.">)>
+ <CRLF>)>
+ <APPLY <GETP ,HERE ,P?ACTION> ,M-ENTER>
+ <SET VAL <V-FIRST-LOOK>>
+ <APPLY <GETP ,HERE ,P?ACTION> ,M-FLASH>
+ .VAL>
+
+;<ROUTINE V-WALK-UNDER () <YOU-CANT "go under">>
+
+<ROUTINE V-RUN-OVER () <TELL "That doesn't make much sense." CR>>
+
+<GLOBAL NO-CHANGING
+"Before you unfasten even the first button, you decide
+that this isn't a good place to undress.|">
+
+<ROUTINE NO-CHANGING? ("AUX" X)
+ ;<SET X <FIRST? ,HERE>>
+ ;<REPEAT ()
+ <COND (<ZERO? .X> <RETURN>)
+ (<AND <FSET? .X ,PERSONBIT>
+ <NOT <FSET? .X ,MUNGBIT>>
+ <NOT <FSET? .X ,RMUNGBIT>>
+ <NOT <FSET? .X ,NDESCBIT>>
+ <NOT <EQUAL? .X ,WINNER>>>
+ <RETURN>)
+ (T <SET X <NEXT? .X>>)>>
+ <COND (<SET X <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,WINNER>>
+ <COND (<EQUAL? .X ,GHOST-NEW>
+ <TELL ,NO-CHANGING>
+ <RTRUE>)
+ (T <TELL
+CHE .X " says, \"I wish you wouldn't change clothes while I'm here!\"" CR>
+ <RTRUE>)>)
+ (<EQUAL? ,HERE ,YOUR-BATHROOM ,YOUR-ROOM>
+ ;<COND (<NOT <ZERO? ,NOW-WEARING>>
+ ;<MOVE ,NOW-WEARING ,WINNER>
+ <FCLEAR ,NOW-WEARING ,WORNBIT>
+ <SETG NOW-WEARING <>>)>
+ <RFALSE>)
+ (T
+ <TELL ,NO-CHANGING>
+ ;<COND (<EQUAL? ,HERE ,YOUR-ROOM>
+ <TELL " Someone might come in without knocking.">)>
+ <RTRUE>)>>
+
+<ROUTINE V-WEAR ("AUX" X)
+ <COND (<NOT <ZERO? ,PRSO>>
+ <COND (<NOT <FSET? ,PRSO ,WEARBIT>>
+ <TELL CHE ,WINNER " can't wear" HIM ,PRSO>
+ <COND (<DOBJ? NECKLACE-OF-D>
+ <TELL ", because" ,CLASP-MUNGED>)>
+ <TELL "." CR>
+ <RTRUE>)
+ (<FSET? ,PRSO ,WORNBIT>
+ <ALREADY ,PRSO "being worn">
+ <RTRUE>)>)>
+ <COND (<NOT <DOBJ? NECKLACE ;NECKLACE-OF-D EARRING ;HEADDRESS
+ ;WIG LENS LENS-1 LENS-2>>
+ <COND (<NO-CHANGING?>
+ <RTRUE>)
+ (<NOT <ZERO? ,NOW-WEARING>>
+ ;<MOVE ,NOW-WEARING ,WINNER>
+ <COND (<T? ,PRSO>
+ <FIRST-YOU "remove" ,NOW-WEARING>)>
+ <FCLEAR ,NOW-WEARING ,WORNBIT>
+ ;<SETG NOW-WEARING <>>)>
+ <SETG NOW-WEARING ,PRSO>)>
+ <COND (<NOT <ZERO? ,PRSO>>
+ <MOVE ,PRSO ,PLAYER ;,GLOBAL-OBJECTS>
+ <FSET ,PRSO ,WORNBIT>
+ <COND (<OR <DOBJ? NECKLACE ;NECKLACE-OF-D EARRING ;HEADDRESS
+ ;WIG LENS LENS-1 LENS-2>
+ <FSET? ,PRSO ,MUNGBIT>>
+ <TELL "Okay." CR>)
+ (T
+ <FSET ,PRSO ,MUNGBIT>
+ <TELL
+"Ahhh! Nothing like a new outfit to change your whole outlook!" CR>)>
+ <RTRUE>)
+ (T
+ <TELL "Okay... ">
+ <COND (<ZERO? ,GENDER-KNOWN>
+ <TELL "You immediately wish for central heating!" CR>)
+ (T
+ <TELL "My, what a fine figure of a ">
+ <COND (<FSET? ,PLAYER ,FEMALE> <TELL "wo">)>
+ <TELL "man!" CR>)
+ ;(<FSET? ,PLAYER ,FEMALE>
+ <TELL "Wow, are you ever beautiful!" CR>)>)>>
+
+<ROUTINE V-YELL ("AUX" (N 0) RM P)
+ <COND (<OR <SET P <QCONTEXT-GOOD?>>
+ <SET P <FIND-FLAG-HERE-NOT ,PERSONBIT ,MUNGBIT ,WINNER>>>
+ <TELL CTHE .P " says, \"I'm right here. You needn't yell.\"" CR>
+ <RTRUE>)
+ (T
+ <COND (<AND <==? 3 <GETP ,HERE ,P?CHARACTER>>
+ <OR <FSET? ,HERE ,WEARBIT> ;"WING-ROOMS"
+ <AND <NOT <FSET? ,HERE ,WEARBIT>>
+ <NOT <FSET? ,HERE ,SECRETBIT>>>>>
+ <REPEAT ()
+ <COND (<IGRTR? N ,DEB-C> <RETURN>)>
+ <SET P <GET ,CHARACTER-TABLE .N>>
+ <COND (<NOT <EQUAL? .P ,GHOST-NEW ,CONFESSED ,CAPTOR>>
+ <SET RM <META-LOC .P>>
+ <COND (<AND <==? 3 <GETP .RM ,P?CHARACTER>>
+ <OR <AND <FSET? ,HERE ,WEARBIT>
+ <FSET? .RM ,WEARBIT>>
+ <AND <NOT <FSET? ,HERE ,WEARBIT>>
+ <NOT <FSET? .RM ,WEARBIT>>>>>
+ <GO-TO-SOUND ,HERE .P>)>)>>)>
+ <TELL "\"Aaaarrrrgggghhhh!\"" CR>)>>
+
+"<ROUTINE V-YELL-FOR () <V-YES>>"
+
+<ROUTINE V-YES ("OPTIONAL" (NO? <>) "AUX" PER)
+ <COND (<AND <OR <NOT <==? <SET PER ,WINNER> ,PLAYER>>
+ <AND <T? ,AWAITING-REPLY>
+ <SET PER <GETB ,QUESTIONERS ,AWAITING-REPLY>>>
+ <SET PER <QCONTEXT-GOOD?>>>
+ ;<VERB? YES NO ANSWER>>
+ <COND (<NOT <D-APPLY "Actor" <GETP .PER ,P?ACTION> ,M-WINNER>>
+ <TELL "\"I see...\"" CR>
+ ;<SETG CLOCK-WAIT T>
+ ;<TELL "(That was a rhetorical question.)" CR>)>
+ <RTRUE>)
+ (<EQUAL? ,HERE ,DRIVEWAY>
+ <TELL "The echoes fade and silence is soon restored." CR>)
+ (T <ARENT-TALKING>)>>
+
+<ROUTINE V-NO () <V-YES T>>
+
+<ROUTINE FINISH ("OPTIONAL" (REPEATING <>) VAL)
+ %<DEBUG-CODE <COND (<T? ,DBUG> <RTRUE>)>>
+ <CRLF>
+ <CRLF>
+ <COND (<NOT .REPEATING>
+ <V-SCORE>
+ <CRLF>)>
+ <TELL
+"Would you like to:|
+ RESTORE your place from where you saved it,|
+ RESTART the story from the beginning, or|
+ QUIT for now?" CR>
+ <REPEAT ()
+ <TELL !\>>
+ <READ ,P-INBUF ,P-LEXV>
+ <SET VAL <GET ,P-LEXV ,P-LEXSTART>>
+ <COND (<NOT <0? .VAL>>
+ <SET VAL <WT? .VAL ,PS?VERB ,P1?VERB>>
+ <COND (<EQUAL? .VAL ,ACT?RESTART>
+ <RESTART>
+ ;<TELL-FAILED>
+ <FINISH T>)
+ (<EQUAL? .VAL ,ACT?RESTORE>
+ <COND (<V-RESTORE> <RETURN>)>
+ <FINISH T>)
+ (<EQUAL? .VAL ,ACT?QUIT>
+ <QUIT>)>)>
+ <TELL "[Type RESTORE, RESTART, or QUIT.] ">>>
+
+<ROUTINE DIVESTMENT? (OBJ)
+ <AND <==? ,PRSO .OBJ>
+ <VERB? DISEMBARK DROP GIVE POUR PUT PUT-IN PUT-UNDER
+ REMOVE THROW-AT THROW-THROUGH>>>
+
+;<ROUTINE EXIT-VERB? ("AUX" P)
+ <COND (<VERB? WALK> <RETURN ,PRSO>)
+ (<VERB? WALK-TO FOLLOW THROUGH>
+ <SET P <META-LOC ,PRSO>>
+ <COND (<==? ,HERE .P> <RFALSE>)
+ (<VERB? WALK-TO>
+ <FOLLOW-GOAL-DIR ,HERE .P>)
+ (T <DIR-FROM ,HERE .P>)>)>>
+
+<ROUTINE REMOTE-VERB? ()
+ <COND (<VERB? ;ARREST ASK-ABOUT ASK-CONTEXT-ABOUT ASK-CONTEXT-FOR ASK-FOR ;BUY
+ DESCRIBE DISEMBARK DRESS FIND FOLLOW LEAVE LOOK-UP
+ ;MAKE SEARCH SEARCH-FOR SHOW SSHOW
+ TAKE-TO TALK-ABOUT TELL-ABOUT WAIT-FOR WAIT-UNTIL WALK-TO
+ ;$WHERE>
+ <RTRUE>)>
+ <RFALSE>>