aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhistoricalsource <historicalsoftware@textfiles.com>2019-04-13 22:26:27 -0400
committerhistoricalsource <historicalsoftware@textfiles.com>2019-04-13 22:26:27 -0400
commitf9f770f8c72a10c2f2ac4317c5e0e01e779c2f5b (patch)
treed1d29decef45f84a8ad5e0b7bbace9091529a6f1
downloadstarcross-f9f770f8c72a10c2f2ac4317c5e0e01e779c2f5b.tar.gz
starcross-f9f770f8c72a10c2f2ac4317c5e0e01e779c2f5b.tar.bz2
starcross-f9f770f8c72a10c2f2ac4317c5e0e01e779c2f5b.zip
Revision 15 (Original Source)
-rw-r--r--README.md1
-rw-r--r--actions.zil4266
-rw-r--r--clock.zil60
-rw-r--r--crufty.xzap22
-rw-r--r--crufty.zil17
-rw-r--r--dungeon.zil2409
-rw-r--r--emerg.zil279
-rw-r--r--load.zil54
-rw-r--r--macros.zil86
-rw-r--r--main.zil176
-rw-r--r--parser.zil1178
-rw-r--r--sf.zil54
-rw-r--r--sffreq.xzap200
-rw-r--r--syntax.zil517
-rw-r--r--verbs.zil1380
15 files changed, 10699 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..2110963
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# starcross
diff --git a/actions.zil b/actions.zil
new file mode 100644
index 0000000..ed6a174
--- /dev/null
+++ b/actions.zil
@@ -0,0 +1,4266 @@
+"ACTIONS for
+ Interlogic SF Game
+ (c) Copyright 1981,1982 Infocom, Inc. All Rights Reserved
+"
+
+<GLOBAL ALARM? T>
+
+<ROUTINE BRIDGE-FCN (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"This is the control room of the Starcross. There are exits labelled
+(arbitrarily) \"Port,\" \"Starboard,\" and \"Out.\" The latter exit has
+a heavy bulkhead which is " <COND (<FSET? ,AIRLOCK-INNER ,OPENBIT>
+ "open.")
+ (T "closed.")>>
+ <CRLF>
+ <TELL
+"Your ship's computer takes care of all the routine tasks of
+navigation and life support. A control couch is in the front end of the
+room, surrounded by controls and fronting a large viewport. The ship's
+registration is affixed nearby." CR>
+ <TELL
+"Your mass detector, essential in the search for black holes, sits to one
+side. On the detector are a red button, a blue button, and a small screen
+on which something is displayed." CR>)>>
+
+<ROUTINE DETECTOR-FCN ()
+ <COND (<VERB? EXAMINE READ>
+ <TELL "The display reads: \"">
+ <PRINTD ,MASS>
+ <TELL ".\"" CR>)>>
+
+<GLOBAL MASS <>>
+<GLOBAL MASSNUM <>>
+
+<ROUTINE I-ALARM ("AUX" (HEAR? <>))
+ <COND (,ALARM?
+ <COND (<NOT ,MASS>
+ <SETG MASSNUM <RANDOM 8>>
+ <SETG MASS <GET ,MASSES ,MASSNUM>>)>
+ <ENABLE <QUEUE I-ALARM 1>>
+ <COND (<EQUAL? ,HERE ,SPACESHIP-BRIDGE
+ ,SPACESHIP-QUARTERS ,SPACESHIP-STORES>
+ <SET HEAR? T>)
+ (<AND <==? ,HERE ,SPACESHIP-AIRLOCK>
+ <FSET? ,AIRLOCK-INNER ,OPENBIT>>
+ <SET HEAR? T>)>
+ <COND (.HEAR?
+ <TELL
+"The alarm bell on the mass detector is ringing stridently." CR>)>
+ <COND (<==? ,MOVES 15>
+ <SETG ALARM? <>>
+ <SETG COMPUTER-ON T>
+ <COND (.HEAR?
+ <TELL
+"\"If you won't turn it off, I will. I can't take that noise any more.\"" CR>)>)
+ (<AND .HEAR? <==? ,MOVES 10>>
+ <SETG COMPUTER-ON T>
+ <TELL
+"A somewhat expressionless but nonetheless surly voice issues from
+the computer: \"Will you please turn that alarm off? We'll both have
+headaches if you don't.\"" CR>)>
+ <RTRUE>)>>
+
+<ROUTINE ALARM-FCN ()
+ <COND (<VERB? LISTEN>
+ <TELL "The alarm is ">
+ <COND (,ALARM? <TELL "ringing.">)(T <TELL "off.">)>
+ <CRLF>)
+ (<NOT <==? ,HERE ,SPACESHIP-BRIDGE>>
+ <TELL "The alarm is on the bridge, not here." CR>)
+ (<VERB? EXAMINE>
+ <TELL "The alarm is ">
+ <COND (,ALARM? <TELL "ringing.">)(T <TELL "off.">)>
+ <CRLF>)
+ (<VERB? LAMP-OFF PUSH>
+ <COND (,ALARM?
+ <SETG ALARM? <>>
+ <TELL
+"The alarm goes silent." CR>)
+ (T
+ <TELL
+"The alarm's already off. Your ears must be ringing." CR>)>)
+ (<VERB? LAMP-ON>
+ <TELL
+"Only the mass detector can turn the alarm on." CR>)>>
+
+<ROUTINE MASS-FCN ()
+ <COND (<VERB? SET>
+ <COND (<KVETCH> <RTRUE>)
+ (ELSE
+ <TELL
+"The computer must be used to set courses, as navigation is fully
+automated." CR>)>)
+ (<VERB? EXAMINE>
+ <COND (<HELD? ,CHART>
+ <TELL
+"It's still here on the output." CR>)
+ (ELSE <TELL "You don't have the output." CR>)>)>>
+
+<ROUTINE BUNK-FCN ("OPTIONAL" (RARG <>))
+ <COND (<AND <==? .RARG ,M-BEG>
+ <VERB? WALK>
+ <IN? ,ADVENTURER ,BUNK>>
+ <TELL "You must get up first!" CR>)>>
+
+<ROUTINE BUTTON-FCN ()
+ <COND (<VERB? PUSH>
+ <COND (<FSET? ,CHART ,TOUCHBIT>
+ <TELL "Nothing happens." CR>)
+ (T
+ <MOVE ,CHART ,HERE>
+ <FSET ,CHART ,TOUCHBIT>
+ <TELL
+"The mass detector produces some output." CR>)>)>>
+
+<ROUTINE V-R ()
+ <COND (<==? ,WINNER ,COMPUTER>
+ <COND (<==? ,PRSO ,INTNUM>
+ <COND (<OR <0? ,P-NUMBER> <G? ,P-NUMBER 360>>
+ <NOT-IN-RANGE "R">
+ <RTRUE>)
+ (T <OK-TELL ,R-VALUE "R">)>
+ <SETG R-VALUE ,P-NUMBER>
+ <COURSE-SET>)
+ (T <NON-NUMERIC "R">)>)
+ (ELSE
+ <EXPLAIN-COORDINATES>)>>
+
+<ROUTINE V-THETA ()
+ <COND (<==? ,WINNER ,COMPUTER>
+ <COND (<==? ,PRSO ,INTNUM>
+ <COND (<OR <0? ,P-NUMBER> <G? ,P-NUMBER 360>>
+ <NOT-IN-RANGE "theta">
+ <RTRUE>)
+ (T <OK-TELL ,THETA-VALUE "Theta">)>
+ <SETG THETA-VALUE ,P-NUMBER>
+ <COURSE-SET>)
+ (T <NON-NUMERIC "theta">)>)
+ (ELSE <EXPLAIN-COORDINATES>)>>
+
+<ROUTINE V-PHI ()
+ <COND (<==? ,WINNER ,COMPUTER>
+ <COND (<==? ,PRSO ,INTNUM>
+ <COND (<OR <0? ,P-NUMBER> <G? ,P-NUMBER 360>>
+ <NOT-IN-RANGE "phi">
+ <RTRUE>)
+ (T <OK-TELL ,PHI-VALUE "Phi">)>
+ <SETG PHI-VALUE ,P-NUMBER>
+ <COURSE-SET>)
+ (T <NON-NUMERIC "phi">)>)
+ (ELSE <EXPLAIN-COORDINATES>)>>
+
+<ROUTINE OK-TELL (VAL STR)
+ <TELL "\"">
+ <COND (.VAL
+ <TELL "Changing your mind, eh? ">)>
+ <TELL .STR " set.">>
+
+<ROUTINE NOT-IN-RANGE (STR)
+ <TELL
+"\"That value for " .STR " is out of range.\"" CR>>
+
+<ROUTINE NON-NUMERIC (STR)
+ <TELL
+"\"You must give me a numerical value for " .STR ".\"" CR>>
+
+<ROUTINE EXPLAIN-COORDINATES ()
+ <COND (<KVETCH> <RTRUE>)
+ (ELSE
+ <TELL
+"You must set a course by telling the computer the appropriate R, theta,
+and phi values of your destination." CR>)>>
+
+<ROUTINE KVETCH ()
+ <SETG COMPUTER-COUNT <+ ,COMPUTER-COUNT 1>>
+ <COND (<==? ,COMPUTER-COUNT 3>
+ <SETG COMPUTER-COUNT 0>
+ <TELL
+"Please consult your manual for the correct operating procedure for the
+computer." CR>)>>
+
+<GLOBAL R-VALUE <>>
+<GLOBAL THETA-VALUE <>>
+<GLOBAL PHI-VALUE <>>
+
+<GLOBAL COMPUTER-COUNT 0>
+
+<ROUTINE COURSE-SET ()
+ <COND (<AND ,R-VALUE ,THETA-VALUE ,PHI-VALUE>
+ <SETG GOT-INSTRUCTIONS T>
+ <SETG DESTINATION <>>
+ <SETG LOST <>>
+ <TELL
+"\" Lights blink furiously for a few moments. The computer speaks: ">
+ <SETG GIVE-UP <FIND-DESTINATION ,KNOWN-LOCS ,KNOWNS>>
+ <COND (,GIVE-UP
+ <TELL
+"\"Navigational program for " D ,GIVE-UP " is programmed and ready. Giving up,
+huh? Figures, just when we get a good strike. ">)
+ (<AND <SETG DESTINATION
+ <FIND-DESTINATION ,MASS-LOCS ,MASSES>>
+ <==? ,DESTINATION ,MASS>>
+ <TELL
+"\"Navigational program for intercept of mass concentration is
+programmed and ready. ">)
+ (ELSE
+ <SETG LOST T>
+ <TELL
+"\"I know my instruments aren't as good as the mass detector, but I don't
+show anything at that location. Well, if you say so. ">)>
+ <TELL "Please confirm new navigational
+program. I'm waiting...\"" CR>)
+ (T <TELL " Waiting for additional values.\"" CR>)>>
+
+<GLOBAL GIVE-UP <>>
+<GLOBAL LOST <>>
+<GLOBAL DESTINATION <>>
+<GLOBAL GOT-INSTRUCTIONS <>>
+<GLOBAL COUNTDOWN <>>
+
+<ROUTINE FIND-DESTINATION (X M "AUX" (C 0) (N <GET .X 0>))
+ <REPEAT ()
+ <SET C <+ .C 1>>
+ <COND (<AND <==? <GET .X 1> ,R-VALUE>
+ <==? <GET .X 2> ,THETA-VALUE>
+ <==? <GET .X 3> ,PHI-VALUE>>
+ <RETURN <GET .M .C>>)>
+ <COND (<==? .C .N> <RETURN <>>)>
+ <SET X <REST .X 6>>>>
+
+<ROUTINE KNOWN-COURSE (D SET? "AUX" X N (C 0))
+ <SET X ,KNOWN-LOCS>
+ <SET N <GET .X 0>>
+ <REPEAT ()
+ <SET C <+ .C 1>>
+ <COND (<==? <GET ,KNOWNS .C> .D>
+ <COND (.SET?
+ <SETG R-VALUE <GET .X 1>>
+ <SETG THETA-VALUE <GET .X 2>>
+ <SETG PHI-VALUE <GET .X 3>>
+ <RETURN .D>)
+ (ELSE <RETURN .X>)>)>
+ <COND (<==? .C .N> <RETURN <>>)>
+ <SET X <REST .X 6>>>>
+
+;<ROUTINE V-CHEAT ("AUX" (N <+ 1 <* 3 <- ,MASSNUM 1>>>))
+ <COND (,MASS
+ <REPORT-LOCATION ,MASS ,MASS-LOCS .N>)
+ (ELSE <TELL "Now, now, don't anticipate..." CR>)>>
+
+<ROUTINE REPORT-LOCATION (M ML N)
+ <TELL "\"Coordinates for " D .M
+ ": R is " N <GET .ML .N>
+ ", theta is " N <GET .ML <+ .N 1>>
+ ", phi is " N <GET .ML <+ .N 2>>
+ ".\""
+ CR>>
+
+<ROUTINE CONTROLS-FCN ()
+ <COND (<==? ,HERE ,THRONE-ROOM>
+ <COND (<VERB? EXAMINE> <AS-ADVERTISED>)
+ (T <TELL
+"The controls look in no way operational." CR>)>)
+ (<VERB? EXAMINE>
+ <TELL
+"This is the standard control panel for this class of single-passenger
+mining survey ship. Most controls are for emergencies only, as
+the Starcross is normally controlled by verbal instructions to the
+computer.">
+ <COND (<NOT <IN? ,COMPUTER ,HERE>>
+ <TELL " This set of controls is non-functional.">)>
+ <CRLF>
+ <RTRUE>)
+ (<VERB? RUB SET LAMP-ON LAMP-OFF PLAY>
+ <COND (<NOT <IN? ,COMPUTER ,HERE>>
+ <TELL
+"The controls are no longer functional." CR>)
+ (,COMPUTER-ON
+ <COND (,GOT-INSTRUCTIONS
+ <TELL
+"As you reach for the controls, the computer blares: \"Warning! Warning!
+Course is set! Remember what happened last time you played with the controls
+in mid-course...\"" CR>)
+ (ELSE
+ <TELL
+"The computer's voice intrudes. \"Are you sure you want to touch the
+controls just now? I don't want to impugn your piloting ability, but
+wouldn't you rather have me execute any course corrections? I'm very
+good at it, you know.\"" CR>)>)
+ (ELSE
+ <SETG COMPUTER-ON T>
+ <TELL
+"The computer comes on and chides, \"Manual operation when the ship's
+computer is functional is not recommended. Ship's controls are not
+currently enabled.\"" CR>)>)>>
+
+<ROUTINE BRIDGE-EXITS ()
+ <COND (<==? ,PRSO ,P?WEST> ,SPACESHIP-QUARTERS)
+ (<==? ,PRSO ,P?EAST> ,SPACESHIP-STORES)
+ (<EQUAL? ,PRSO ,P?OUT ,P?SOUTH>
+ <COND (<FSET? ,AIRLOCK-INNER ,OPENBIT> ,SPACESHIP-AIRLOCK)
+ (T <ITS-CLOSED ,AIRLOCK-INNER>)>)>>
+
+<ROUTINE OPEN-CLOSE (OBJ STROPN STRCLS)
+ #DECL ((OBJ) OBJECT (STROPN STRCLS) STRING)
+ <COND (<VERB? OPEN>
+ <COND (<FSET? .OBJ ,OPENBIT>
+ <TELL <PICK-ONE ,DUMMY>>)
+ (ELSE
+ <TELL .STROPN>
+ <FSET .OBJ ,OPENBIT>)>
+ <CRLF>)
+ (<VERB? CLOSE>
+ <COND (<FSET? .OBJ ,OPENBIT>
+ <TELL .STRCLS>
+ <FCLEAR .OBJ ,OPENBIT>
+ T)
+ (ELSE <TELL <PICK-ONE ,DUMMY> CR>)>
+ <CRLF>)>>
+
+<GLOBAL DUMMY
+ <LTABLE "Look around."
+ "You think it isn't?"
+ "I think you've already done that.">>
+
+<ROUTINE OBJECT-PSEUDO ()
+ <COND (<VERB? EXAMINE>
+ <PERFORM ,V?LOOK-INSIDE ,WINDOW>
+ <RTRUE>)>>
+
+<ROUTINE PORTHOLE-FCN ()
+ <COND (<VERB? LOOK-INSIDE EXAMINE>
+ <COND (<==? ,HERE ,SPACESHIP-BRIDGE>
+ <DESCRIBE-SPACE>)
+ (<==? ,HERE ,THRONE-ROOM>
+ <TELL
+"You see the green dock, and the stars wheeling by above." CR>)>)>>
+
+<ROUTINE V-THROUGH ("OPTIONAL" (OBJ <>) "AUX" M)
+ #DECL ((OBJ) <OR OBJECT FALSE> (M) <PRIMTYPE VECTOR>)
+ <COND (<AND <NOT .OBJ> <FSET? ,PRSO ,VEHBIT>>
+ <PERFORM ,V?BOARD ,PRSO>
+ <RTRUE>)
+ (<AND <NOT .OBJ> <NOT <FSET? ,PRSO ,TAKEBIT>>>
+ <TELL "You hit your head against the "
+ D ,PRSO
+ " as you attempt this feat." CR>)
+ (.OBJ <TELL "You can't do that!" CR>)
+ (<IN? ,PRSO ,WINNER>
+ <TELL "That would involve quite a contortion!" CR>)
+ (ELSE <TELL <PICK-ONE ,YUKS> CR>)>>
+
+<ROUTINE ROOM? (OBJ "AUX" NOBJ)
+ <REPEAT ()
+ <SET NOBJ <LOC .OBJ>>
+ <COND (<NOT .NOBJ> <RFALSE>)
+ (<==? .NOBJ ,WINNER> <RFALSE>)
+ (<==? .NOBJ ,ROOMS> <RETURN .OBJ>)>
+ <SET OBJ .NOBJ>>>
+
+<ROUTINE GRUE-FUNCTION ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The grue is a sinister, lurking presence in the dark places of the
+earth. Its favorite diet is spacers, but its insatiable
+appetite is tempered by its fear of light. No grue has ever been
+seen by the light of day, and few have survived its fearsome jaws
+to tell the tale." CR>)
+ (<VERB? FIND>
+ <TELL
+"There is no grue here, but I'm sure there is at least one lurking
+in the darkness nearby. I'd stay in lighted areas if I were you!" CR>)
+ (<VERB? LISTEN>
+ <TELL
+"It makes no sound but is always lurking in the darkness nearby." CR>)>>
+
+<ROUTINE GROUND-FCN ()
+ <COND (<AND <VERB? PUT> <==? ,PRSI ,GROUND>>
+ <PERFORM ,V?DROP ,PRSO>
+ <RTRUE>)
+ (<VERB? DIG>
+ <TELL "The ground is too hard for digging here." CR>)>>
+
+<ROUTINE DEBRIS-FCN ()
+ <COND (<AND ,DOCKED?
+ ,SEEN-MOUSE?
+ <VERB? TAKE EXAMINE>>
+ <TELL
+"You should leave debris for the maintenance mice." CR>)>>
+
+<ROUTINE ADVENTURER-FCN ()
+ <COND (<==? ,ADVENTURER ,WINNER>
+ <COND (<AND ,THAT-END
+ ,THIS-END
+ <IN? ,SPACESUIT ,WINNER>
+ <VERB? WALK>
+ <NOT <AND <EQUAL? ,HERE ,YELLOW-DOCK>
+ <EQUAL? ,PRSO ,P?WEST>>>
+ <NOT <AND <EQUAL? ,HERE ,YELLOW-DOCK-EDGE>
+ <EQUAL? ,PRSO ,P?EAST>>>
+ <NOT <AND <EQUAL? ,HERE
+ ,SPACESHIP-AIRLOCK>
+ <EQUAL? ,PRSO ,P?SOUTH ,P?OUT P?DOWN>>>
+ <NOT <AND <EQUAL? ,HERE ,DEEP-SPACE>
+ <EQUAL? ,PRSO ,P?IN>>>>
+ <TELL
+"The safety line prevents you from leaving, as it is only about
+five meters long. You must detach it to leave." CR>)
+ (<AND ,THAT-END
+ <NOT ,THIS-END>
+ <VERB? WALK>
+ <IN? ,SAFETY-LINE ,WINNER>>
+ <MOVE ,SAFETY-LINE ,HERE>
+ <TELL
+"You leave the half-secured safety line behind." CR>
+ <>)>)>>
+
+<ROUTINE CRETIN ()
+ <COND (<VERB? GIVE>
+ <PERFORM ,V?TAKE ,PRSO>
+ <RTRUE>)
+ (<VERB? EAT> <TELL "Auto-cannibalism is not the answer." CR>)
+ (<VERB? KILL MUNG>
+ <COND (<==? ,PRSO ,ME>
+ <JIGS-UP
+"If you insist.... Poof, you're dead!">)
+ (ELSE <TELL "What a silly idea!" CR>)>)
+ (<VERB? TAKE>
+ <TELL "How romantic!" CR>)
+ (<VERB? DISEMBARK>
+ <TELL "You'll have to do that on your own." CR>)
+ (<VERB? EXAMINE>
+ <TELL "That's difficult unless your eyes are prehensile."
+ CR>)>>
+
+<ROUTINE FIND-IN (WHERE WHAT "AUX" W)
+ <SET W <FIRST? .WHERE>>
+ <COND (<NOT .W> <RFALSE>)>
+ <REPEAT ()
+ <COND (<FSET? .W .WHAT> <RETURN .W>)
+ (<NOT <SET W <NEXT? .W>>> <RETURN <>>)>>>
+
+<ROUTINE FIND-TARGET (TARGET "AUX" P T L ROOM)
+ <COND (<IN? .TARGET ,HERE> ,HERE)
+ (ELSE
+ <SET P 0>
+ <REPEAT ()
+ <COND (<0? <SET P <NEXTP ,HERE .P>>>
+ <RETURN <>>)
+ (<NOT <L? .P ,LOW-DIRECTION>>
+ <SET T <GETPT ,HERE .P>>
+ <SET L <PTSIZE .T>>
+ <COND (<OR <EQUAL? .L ,UEXIT>
+ <AND <EQUAL? .L ,CEXIT>
+ <VALUE <GETB .T ,CEXITFLAG>>>
+ <AND <EQUAL? .L ,DEXIT>
+ <FSET? <GETB .T ,DEXITOBJ>
+ ,OPENBIT>>>
+ <SET ROOM <GETB .T 0>>
+ <COND (<IN? .TARGET .ROOM>
+ <RETURN .ROOM>)>)>)>>)>>
+
+<GLOBAL COMPUTER-ON T>
+
+<ROUTINE COMPUTER-FCN ("AUX" N)
+ <COND (<==? ,WINNER ,COMPUTER>
+ <COND (<NOT ,COMPUTER-ON>
+ <SETG COMPUTER-ON T>
+ <TELL "The computer turns itself on." CR>)>
+ <COND (<OR <VERB? WALK-TO>
+ <AND <VERB? SET> <==? ,PRSO ,COURSE>>>
+ <COND (<VERB? WALK-TO> <SETG PRSI ,PRSO>)>
+ <COND (,DOCKED?
+ <TELL ,ROPES-OFF CR>
+ <RTRUE>)
+ (,ORBIT-MATCHED
+ <TELL
+"\"We just got here! I think we should look around first!\"" CR>
+ <RTRUE>)
+ (,COUNTDOWN
+ <TELL ,BURN-COMING CR>
+ <RTRUE>)
+ (,COURSE-SELECTED
+ <TELL ,IN-TRANSIT CR>
+ <RTRUE>)>
+ <COND (<KNOWN-COURSE ,PRSI T>
+ <TELL "\"Course being set for " D ,PRSI ".">
+ <COURSE-SET>)
+ (ELSE
+ <TELL
+"The computer sounds surly. \"I told you to buy those additional I/O options.
+You know as well as I do that I can't talk to that stupid mass detector, so I
+have no idea where that object is. You're just going to have to tell me the
+coordinates from its output. Maybe next time you'll listen.\"" CR>)>)
+ (<VERB? R THETA PHI>
+ <COND (<G? ,VIEW-COUNT 0>
+ <TELL
+"\"We just got here. You wouldn't be scared, would you?\"" CR>)
+ (<G? ,TRIP-COUNT 0>
+ <TELL ,IN-TRANSIT CR>)
+ (,DOCKED?
+ <TELL ,ROPES-OFF CR>)
+ (,COUNTDOWN
+ <TELL ,BURN-COMING CR>)
+ (T <>)>)
+ (<VERB? NO>
+ <SETG GOT-INSTRUCTIONS <>>
+ <SETG R-VALUE <>>
+ <SETG THETA-VALUE <>>
+ <SETG PHI-VALUE <>>
+ <SETG GIVE-UP <>>
+ <SETG LOST <>>
+ <TELL "\"Okay.\"" CR>)
+ (<VERB? YES>
+ <COND (<AND ,PRSO <NOT <==? ,PRSO ,COURSE>>>
+ <TELL "\"You can't confirm that!\"" CR>)
+ (,GOT-INSTRUCTIONS
+ <SETG GOT-INSTRUCTIONS <>>
+ <SETG COUNTDOWN T>
+ <ENABLE <QUEUE I-BURN 3>>
+ <TELL
+"\"Thank you. New navigational program will initiate in fifteen seconds.
+There will be a course correction burn of " N <+ 30 <RANDOM 30>> " seconds
+duration. I advise you to fasten your seat belt.\"" CR>)
+ (ELSE
+ <TELL
+"\"No pending program. Confirmation ignored.\"" CR>)>)
+ (<VERB? LAND>
+ <COND (,PRSO
+ <COND (<==? ,PRSO ,ARTIFACT>
+ <PERFORM ,V?LAND>
+ <RTRUE>)
+ (ELSE
+ <PERFORM ,V?SET ,COURSE ,PRSO>
+ <RTRUE>)>)
+ (,DOCKED? <TELL
+"\"Error. I am already landed. Program cancelled.\"" CR>)
+ (<G? ,VIEW-COUNT 0>
+ <TELL
+"\"Working... working... Program aborted. The object is spinning too rapidly
+for a safe landing. I can maintain current synchronized course
+indefinitely.\"" CR>)
+ (ELSE <TELL
+"\"Program cancelled. There is nothing nearby to land on.\"" CR>)>)
+ (<VERB? EXAMINE>
+ <COND (<EQUAL? ,PRSO ,MISSION-STATUS ,COURSE>
+ <PERFORM ,V?REPORT ,MISSION-STATUS>
+ <RTRUE>)
+ (ELSE <TELL
+"\"Your eyes are better than mine for that.\"" CR>)>)
+ (<VERB? HELLO> <TELL "\"Hello, astronaut.\"" CR>)
+ (<VERB? FIND>
+ <COND (<==? ,PRSO ,ME>
+ <PERFORM ,V?REPORT ,MISSION-STATUS>
+ <RTRUE>)
+ (<SET N <KNOWN-COURSE ,PRSO <>>>
+ <REPORT-LOCATION ,PRSO .N 1>)
+ (ELSE
+ <TELL "\"I don't know where that is.\"" CR>)>)
+ (<OR <AND <VERB? REPORT>
+ <==? ,PRSO ,MISSION-STATUS>>
+ <AND <VERB? SGIVE GIVE>
+ <EQUAL? ,MISSION-STATUS ,PRSO ,PRSI>>>
+ <COND (,LOST
+ <TELL
+"\"We're on our way somewhere unpromising, that's all I can tell you.\"" CR>)
+ (,GIVE-UP
+ <TELL
+"\"You've given up and are heading for " D ,GIVE-UP ", or had you
+forgotten?\"" CR>)
+ (,DOCKED?
+ <TELL
+"\"We've docked with this odd object. I think those tentacles may have
+broken something; I don't feel too well.\"" CR>)
+ (<G? ,VIEW-COUNT 0>
+ <TELL
+"\"We're on a parallel course with a strange artifact which is
+spinning rapidly beneath us.\"" CR>)
+ (<G? ,TRIP-COUNT 0>
+ <TELL
+"\"We're heading towards that newly reported unknown mass.">
+ <COND (<G? ,TRIP-COUNT 2>
+ <TELL
+" We are being scanned by radiation emanating from that mass.">)>
+ <TELL "\"" CR>)
+ (,COUNTDOWN
+ <TELL
+"\"Counting down to course correction.\"" CR>)
+ (,GOT-INSTRUCTIONS
+ <TELL
+"\"Waiting for confirmation of new course.\"" CR>)
+ (<AND <0? ,R-VALUE>
+ <0? ,THETA-VALUE>
+ <0? ,PHI-VALUE>>
+ <TELL
+"\"The mass detector has reported discovery of a new mass concentration.
+Other than that, things have been pretty dull around here.\"" CR>)
+ (ELSE
+ <TELL
+"\"We have a partially specified new course:">
+ <COND (<NOT <0? ,R-VALUE>>
+ <TELL " R is " N ,R-VALUE ".">)>
+ <COND (<NOT <0? ,THETA-VALUE>>
+ <TELL " Theta is " N ,THETA-VALUE ".">)>
+ <COND (<NOT <0? ,PHI-VALUE>>
+ <TELL " Phi is " N ,PHI-VALUE ".\"">)>
+ <CRLF>)>)
+ (<AND <VERB? LAMP-OFF> <==? ,PRSO ,ALARM>>
+ <COND (<NOT ,ALARM?>
+ <TELL "\"It's not on...\"" CR>)
+ (T
+ <TELL "\"And about time...\"" CR>
+ <SETG ALARM? <>>
+ <QUEUE I-ALARM 0>)>)
+ (<VERB? WAIT>
+ <TELL
+"\"I can wait quite easily. Probably more easily than you.\"" CR>)
+ (<AND <VERB? KILL ATTACK MUNG> <==? ,PRSO ,ME>>
+ <TELL
+"\"That is not among my capabilities. Sigh.\"" CR>)
+ (<PROB 25>
+ <TELL
+"\"That is not among my capabilities. Perhaps if you were to invest in
+a few upgrades I could do some of these things, but no...\"" CR>)
+ (ELSE
+ <TELL
+"\"I'm only a navigational computer. That is not one of my functions.\"" CR>)>)
+ (<VERB? HELLO>
+ <TELL
+"\"I don't have the patience for small talk.\"" CR>)
+ (<VERB? LAMP-ON>
+ <COND (,COMPUTER-ON
+ <ALREADY "on" ,COMPUTER>)
+ (ELSE
+ <SETG COMPUTER-ON T>
+ <TELL "The computer comes on." CR>)>)
+ (<VERB? LAMP-OFF>
+ <COND (,COMPUTER-ON
+ <SETG COMPUTER-ON <>>
+ <TELL
+"\"If you insist I'll turn off, but remember, my programming impels me
+to come back on if something important happens.\"" CR>)
+ (ELSE <ALREADY "off" ,COMPUTER>)>)
+ (<VERB? GIVE>
+ <TELL
+"\"I might be able to take that if you had bought the extensors I asked for,
+but no...\"" CR>)
+ (<AND <VERB? TELL> <NOT ,P-CONT>>
+ <TELL "\"Yes?\"" CR>)>>
+
+<GLOBAL IN-TRANSIT
+"\"We're in the midst of a trip. Are you still asleep?\"">
+
+<GLOBAL BURN-COMING
+"\"I'm too busy, I've got a burn coming up. You'd better brace
+yourself.\"">
+
+<GLOBAL ROPES-OFF
+"\"Unless you have some idea of how to get those ropes off me, I
+wouldn't try leaving just yet.\"">
+
+<GLOBAL SEAT-BELT? <>>
+
+<ROUTINE I-BURN ()
+ <SETG COUNTDOWN <>>
+ <ROB ,DEEP-SPACE>
+ <TELL
+"The ship's thrusters spin it into a proper attitude, and then the engines
+begin their course correction burn. There are significant G's and not
+a little vibration." CR>
+ <COND (,SEAT-BELT?
+ <TELL "Fortunately, you are securely belted in." CR>
+ <SETG COURSE-SELECTED T>
+ <ENABLE <QUEUE I-TRIP 3>>)
+ (ELSE
+ <SETG R-VALUE 0>
+ <SETG THETA-VALUE 0>
+ <SETG PHI-VALUE 0>
+ <SETG GOT-INSTRUCTIONS <>>
+ <SETG WINNER ,ADVENTURER>
+ <JIGS-UP
+"The G forces drive you against the rear bulkhead (which is unpadded,
+of course). You are crushed to death.">)>>
+
+<GLOBAL COURSE-SELECTED <>>
+
+<GLOBAL TRIP-COUNT 0>
+
+<GLOBAL TRIP-DESCS <LTABLE
+ "You are headed towards a rather bright starlike object."
+ "The starlike object now shows some shape."
+ "You are approaching a huge, cylindrical asteroid."
+ "The asteroid is unnaturally smooth, but there are surface features on it."
+ "Filling space before you is an enormous artifact, more than 5 km long
+and about a kilometer in diameter. Regularly spaced around its waist are
+bumps and other odd protrusions. You cannot see the aft end but the fore
+end sports a glass or crystal dome almost 100 meters across. This dome is
+brightly lit.">>
+
+<ROUTINE I-TRIP ()
+ <TELL "Time passes as you journey towards your destination." CR>
+ <SETG TRIP-COUNT <+ ,TRIP-COUNT 1>>
+ <COND (,GIVE-UP
+ <TELL
+"|
+You arrive at " D ,GIVE-UP " safe and sound. On the other hand,
+you seem to have given up, as " D ,GIVE-UP " has no prospects as a locale
+for quantum black holes. As it would be tedious to continue, this is the
+end.|
+">
+ <FINISH>
+ <RTRUE>)>
+ <COND (<EQUAL? ,HERE
+ ,SPACESHIP-BRIDGE ,SPACESHIP-AIRLOCK ,DEEP-SPACE>
+ <COND (<OR ,LOST <NOT <==? ,DESTINATION ,MASS>>>
+ <TELL "There is nothing interesting visible ahead." CR>)
+ (ELSE
+ <TELL <GET ,TRIP-DESCS ,TRIP-COUNT> CR>)>)>
+ <COND (<==? ,TRIP-COUNT 5>
+ <COND (,LOST
+ <TELL
+"You have reached your destination. The computer speaks: \"There's
+nothing here, as I predicted. You never listen do you? This trip is over;
+See if I'll ever work with you again...\"|
+|" CR>
+ <FINISH>)
+ (<==? ,DESTINATION ,MASS>
+ <TELL
+"There is a brief burn as the ship matches course with the artifact. You
+are hanging in space about one kilometer away from the waist of the object.
+The Starcross's engines shut down. The computer speaks: \"Program
+completed. We are being scanned by low level radiation at various frequencies.
+Waiting for instructions.\"" CR>
+ <SETG VIEW-COUNT 1>
+ <ENABLE <QUEUE I-VIEW 2>>
+ <SETG ORBIT-MATCHED T>)
+ (ELSE
+ <TELL
+"Ahead is a nondescript nickel-iron asteroid, rather a small one too. It is
+obvious that you have picked the wrong destination.|
+|" CR>
+ <FINISH>)>)
+ (ELSE
+ <COND (<AND <NOT ,LOST>
+ <==? ,DESTINATION ,MASS>>
+ <COND (<==? ,TRIP-COUNT 3>
+ <TELL
+"The computer says, \"Telescopic observations reveal the object ahead to
+be extremely regular in shape. This is not your usual asteroid.\"" CR>)
+ (<==? ,TRIP-COUNT 4>
+ <TELL
+"The computer remarks: \"I detect low-level scanning taking place. The
+radiation is not dangerous. I think we may be getting into something
+more than we expected here.\"" CR>)>)>
+ <ENABLE <QUEUE I-TRIP 3>>)>>
+
+<GLOBAL VIEW-COUNT 0>
+<GLOBAL ORBIT-MATCHED <>>
+
+<ROUTINE I-VIEW ()
+ <COND (<EQUAL? ,HERE ,SPACESHIP-BRIDGE ,SPACESHIP-AIRLOCK>
+ <TELL
+"As the object rotates beneath you, the surface features of a different
+area are visible through the viewport." CR>
+ <TELL <GET ,VIEW-TABLE <MOD <- ,VIEW-COUNT 1> 4>> CR>)>
+ <SETG VIEW-COUNT <+ ,VIEW-COUNT 1>>
+ <COND (<==? ,VIEW-COUNT 5> <TENTACLE-APPEARS>)
+ (ELSE <ENABLE <QUEUE I-VIEW 2>>)>>
+
+<GLOBAL VIEW-TABLE <TABLE
+"There is an area with a blue dome below. Near the dome is a spherical object
+which just might be a spaceship. It is held down by silvery ropes."
+"The area here has a yellow dome. The surface of the object here looks damaged
+and scorched, and is littered with tangled debris."
+"This area has a green dome and a long, silvery spaceship tethered nearby."
+"Below is an area with a red dome which has no ship near it.">>
+
+<ROUTINE TENTACLE-APPEARS ()
+ <ENABLE <QUEUE I-MOUSE 1>>
+ <ENABLE <QUEUE I-BAD-AIR <+ 75 <RANDOM 50>>>>
+ <TELL
+"Suddenly an odd protrusion near the red dome splits open and a huge
+articulated metal tentacle issues from it at great speed.">
+ <COND (<EQUAL? ,HERE ,DEEP-SPACE>
+ <CRLF>
+ <JIGS-UP
+"The tentacle grabs the ship around the hull, spinning you off into the
+depths of space!">)
+ (<EQUAL? ,HERE ,SPACESHIP-BRIDGE ,SPACESHIP-AIRLOCK>
+ <TELL
+" It approaches the ship and delicately wraps itself around the hull."> <COND (,SEAT-BELT?
+ <TELL
+ " You are slammed against your seat">)
+ (ELSE
+ <TELL
+ " You are smashed against the bulkhead">)>
+ <TELL " as the tentacle accelerates the Starcross to
+the speed of rotation of the object. Inexorably, your ship is drawn toward
+the dome. When you are a few tens of meters away, three smaller tentacles
+issue forth and grapple the ship solidly to the surface of the artifact. The
+large tentacle retreats into its housing, which closes.|">
+<COND (,SEAT-BELT?
+ <TELL
+"|
+You are disoriented: now that you are attached to the artifact, which is
+rotating, \"up\" and \"down\" have taken on new meanings. Your sense
+of balance tells you that your ship is clinging to the underside of some
+enormous object, and if you aren't careful you will fall! \"Up\" now
+refers to the center of the object, \"down\" to the immensities of space." CR>)
+ (ELSE
+ <JIGS-UP "Unfortunately, the accelerations involved were tremendous,
+and being smashed into the walls didn't help your condition either.">)>)
+ (ELSE
+ <JIGS-UP
+"Something has grabbed the ship! You are slammed against the bulkhead!
+After a great deal of buffeting, there is a metallic clang and the ship is
+at rest, but unfortunately, so are you.">)>
+ <SETG DOCKED? T>>
+
+<GLOBAL DOCKED? <>>
+
+<GLOBAL TAPE-ON <>>
+
+<ROUTINE TAPE-FCN ()
+ <COND (<VERB? TAKE>
+ <COND (<IN? ,TAPE-PLAYER ,SPIDER>
+ <TELL "The spider refuses to part with it." CR>)
+ (ELSE <RFALSE>)>)
+ (<NOT <IN? ,TAPE-PLAYER ,WINNER>>
+ <DONT-HAVE ,TAPE-PLAYER>)
+ (<VERB? LAMP-ON>
+ <COND (,TAPE-ON
+ <ALREADY "on" ,TAPE-PLAYER>)
+ (ELSE
+ <SETG TAPE-ON T>
+ <TELL "The " D ,PRSO " comes on." CR>)>)
+ (<VERB? LAMP-OFF>
+ <COND (,TAPE-ON
+ <SETG TAPE-ON <>>
+ <TELL "The " D ,PRSO " is now off." CR>)
+ (ELSE <ALREADY "off" ,TAPE-PLAYER>)>)
+ (<VERB? PLAY WEAR>
+ <COND (<NOT ,TAPE-ON>
+ <TELL "First, you must turn on the tape player." CR>)
+ (ELSE
+ <TELL
+"The player picks a recently referenced selection: ">
+ <TELL <PICK-ONE ,TAPES> CR>)>)
+ (<VERB? LISTEN>
+ <COND (,TAPE-ON
+ <TELL
+"The tape player continues with the previous selection." CR>)
+ (ELSE <TELL "The player isn't on." CR>)>)>>
+
+<GLOBAL TAPES
+ <LTABLE
+ "A lecture on the history of Brazil in the 2030's begins."
+ "This is a discussion of contemporary trends in literature."
+ "Bach's \"The Well-Tempered Clavier\" is played."
+ "\"Fantasia,\" complete with holo-projection, begins."
+ "A list of the works of Edgar Rice Burroughs is read off."
+ "This is Pynchon's \"Gravity's Rainbow.\""
+ "Vernon's \"Origins of the Third World War\" plays."
+ "The classic computer mystery \"Deadline\" is displayed."
+ >>
+
+\
+
+<ROUTINE MOUSE-CONT ()
+ <COND (<VERB? TAKE>
+ <TELL
+"The maintenance mouse buzzes for a moment, then rotates its \"ears\" in your
+direction as you reach for the " D ,PRSO ". It seems profoundly puzzled at
+your behavior." CR>
+ <RFALSE>)>>
+
+<ROUTINE MOUSE-GOODIES ()
+ <COND (<FIRST? ,MOUSE>
+ <TELL " It has already collected ">
+ <PRINT-CONTENTS ,MOUSE>
+ <TELL ".">)>
+ <RTRUE>>
+
+<ROUTINE MOUSE-FCN ("OPTIONAL" (RARG <>))
+ <COND (<==? .RARG ,M-OBJDESC>
+ <COND (<IN? ,MOUSE ,GARAGE>
+ <TELL
+"There is a maintenance mouse here.">)
+ (,SEEN-MOUSE?
+ <TELL
+"There is a maintenance mouse here, cheerfully scouring the area for garbage.">
+ <MOUSE-GOODIES>)
+ (ELSE
+ <SETG SEEN-MOUSE? T>
+ <TELL
+"A small metal contraption about a meter long and half a meter high
+enters the room." ,LONG-MOUSE>)>
+ <CRLF>)
+ (<AND <EQUAL? ,GLOBAL-MOUSE ,PRSO ,PRSI>
+ <NOT <IN? ,MOUSE ,HERE>>>
+ <COND (<VERB? FOLLOW>
+ <COND (,GARAGED?
+ <TELL "You can't go through the hole." CR>)
+ (,MFOLLOW
+ <DO-WALK ,MFOLLOW> <RTRUE>)
+ (ELSE
+ <TELL "You've lost him." CR>)>)
+ (ELSE <TELL "There is no mouse here." CR>)>)
+ (<VERB? FOLLOW>
+ <TELL "He's right here!" CR>)
+ (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <DISABLE <INT I-MOUSE>>
+ <REMOVE ,MOUSE>
+ <TELL "The mouse is obliterated, squealing piteously." CR>)
+ (<VERB? MUNG>
+ <TELL "The maintenance mouse is unscathed." CR>)
+ (<VERB? EXAMINE LOOK-INSIDE>
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The maintenance mouse is a boxy machine with a large receptacle on top in
+which various objects it collects can be stored. It is buzzing back and forth
+looking for garbage, diligently polishing the floor, and waving its \"ears\"
+(small dish antennae) about." CR>)>
+ <COND (<FIRST? ,MOUSE>
+ <TELL "The receptacle on the mouse's back contains: ">
+ <PRINT-CONTENTS ,MOUSE>
+ <TELL "." CR>)
+ (ELSE <TELL "The receptacle is empty." CR>)>)
+ (<VERB? OPEN CLOSE>
+ <TELL
+"The mouse has no lid, just an open receptacle on its back." CR>)>>
+
+<GLOBAL LONG-MOUSE " Its guidance system (two large dish antennae at the
+front) circles quizzically. A power antenna juts from the rear. On top
+is a small tray. It cleans the floor as it goes, humming contentedly. All
+in all, it looks like nothing so much as a mechanical mouse.">
+
+<ROUTINE OUT-OF-HOLE ()
+ <COND (<AND ,SEEN-MOUSE? ,LIT>
+ <TELL
+"A maintenance mouse" ,HOLE-SHUTS "." CR>)
+ (ELSE
+ <SETG SEEN-MOUSE? T>
+ <TELL
+"A small metal contraption" ,HOLE-SHUTS " as soon as the device emerges.
+The device stops in its tracks and buzzes briefly, giving you a shot at
+a closer look." ,LONG-MOUSE CR>)>
+ <RTRUE>>
+
+<GLOBAL HOLE-SHUTS
+" emerges from a hitherto unnoticed hole in the wall. The hole slides shut and
+becomes practically invisible">
+
+<GLOBAL SEEN-MOUSE? <>>
+<GLOBAL MOUSE-LOC <>>
+<GLOBAL GARAGED? <>>
+<GLOBAL MFOLLOW <>>
+
+<ROUTINE I-MOUSE ("AUX" (OLDM <LOC ,MOUSE>) (HERE? <IN? ,MOUSE ,HERE>)
+ ROBBED?)
+ <ENABLE <QUEUE I-MOUSE 2>>
+ <REMOVE ,MOUSE-HOLE>
+ <SETG GARAGED? <>>
+ <SET ROBBED? <ROB <LOC ,MOUSE> ,MOUSE>>
+ <COND (<AND .ROBBED? .HERE? <NOT <IN? ,MOUSE ,GARAGE>>>
+ <COND (,LIT
+ <TELL
+"The maintenance mouse, buzzing happily, picks up some refuse." CR>)
+ (ELSE <TELL "You hear a cheerful buzzing nearby." CR>)>)>
+ <COND (<IN? ,MOUSE ,GARAGE>
+ <COND (<FIRST? ,MOUSE>
+ <ROB ,MOUSE ,TRASH-BIN>
+ <COND (<IN? ,BLUE-DISK ,TRASH-BIN>
+ <MOVE ,BLUE-DISK ,GARAGE>)>
+ <COND (<IN? ,RED-DISK ,TRASH-BIN>
+ <MOVE ,RED-DISK ,GARAGE>)>
+ <COND (<AND .HERE? ,LIT>
+ <TELL
+"The mouse rolls up to the trash bin and dumps some stuff into it." CR>)>)>
+ <COND (<PROB 40>
+ <COND (<AND .HERE? ,LIT>
+ <TELL
+"The mouse leaves as unobtrusively as it arrived." CR>)>
+ <MOVE ,MOUSE ,MOUSE-LOC>
+ <COND (<==? ,MOUSE-LOC ,HERE>
+ <MOVE ,MOUSE-HOLE ,HERE>
+ <OUT-OF-HOLE>)>)>
+ .HERE?)
+ (<AND .HERE? <PROB 30>>
+ <COND (,LIT
+ <TELL
+"The maintenance mouse sits in the middle of the room, buzzing
+contentedly." CR>)
+ (ELSE <TELL "There is buzzing nearby." CR>)>)
+ (<AND <FIRST? ,MOUSE> <PROB 15>>
+ <SETG MOUSE-LOC <LOC ,MOUSE>>
+ <MOVE ,MOUSE ,GARAGE>
+ <SETG GARAGED? T>
+ <COND (<==? ,HERE ,GARAGE>
+ <COND (,LIT
+ <TELL
+"A maintenance mouse enters the garage, preparing to dump a load of
+trash." CR>)>)
+ (.HERE?
+ <MOVE ,MOUSE-HOLE .HERE?>
+ <COND (,LIT
+ <TELL
+"The mouse disappears into a heretofore unnoticed hole in the wall. "
+,HOLE-SHUTS "." CR>)>)>)
+ (ELSE
+ <MOVE-MOUSE>
+ <SET ROBBED? <ROB <LOC ,MOUSE> ,MOUSE>>
+ <COND (<NOT <IN? ,MOUSE ,HERE>>
+ <COND (<AND .HERE? ,LIT>
+ <TELL
+"The maintenance mouse glides happily away, looking for new dirt to
+conquer." CR>
+ <RTRUE>)>)
+ (<AND <NOT ,SEEN-MOUSE?> ,LIT>
+ <MOUSE-FCN ,M-OBJDESC>)
+ (,LIT
+ <TELL
+"A maintenance mouse buzzes into the room, intent on trash.">
+ <MOUSE-GOODIES>
+ <CRLF>)>
+ <SET HERE? <IN? ,MOUSE ,HERE>>
+ <COND (<NOT ,LIT> T)
+ (.ROBBED?
+ <COND (.HERE?
+ <TELL
+"The mouse has decided to collect some discarded items." CR>)>)
+ (.HERE?
+ <TELL
+"The mouse is diligently cleaning the floor and looking for
+garbage." CR>)>)>
+ <IN? ,MOUSE ,HERE>>
+
+<ROUTINE MOVE-MOUSE ("AUX" (H <LOC ,MOUSE>) (P 0) T L (D <>))
+ <REPEAT ()
+ <COND (<L? <SET P <NEXTP .H .P>> ,LOW-DIRECTION>
+ <COND (.D
+ <COND (<EQUAL? .D ,UP-A-TREE>
+ <COND (<IN? ,MOUSE ,HERE>
+ <TELL
+"The mouse tries briefly to climb a large tree, but meets little
+success." CR>)>
+ <RFALSE>)
+ (<EQUAL? .D ,MAZE>
+ <COND (<IN? ,MOUSE ,HERE>
+ <TELL
+"The mouse tries to enter the warren, but is prodded away by several
+aliens." CR>)>
+ <RFALSE>)
+ (ELSE
+ <MOVE ,MOUSE .D>)>)>
+ <RTRUE>)
+ (ELSE
+ <SET T <GETPT .H .P>>
+ <SET L <PTSIZE .T>>
+ <COND (<OR <EQUAL? .L ,UEXIT>
+ <AND <EQUAL? .L ,CEXIT>
+ <VALUE <GETB .T ,CEXITFLAG>>>>
+ <COND (<OR <NOT .D> <PROB 50>>
+ <COND (<IN? ,MOUSE ,HERE>
+ <SETG MFOLLOW .P>)>
+ <SET D <GETB .T ,REXIT>>)>)>)>>>
+
+;<ROUTINE V-MOUSE ()
+ <TELL "The mouse is in " D <LOC ,MOUSE>>
+ <COND (<FIRST? ,MOUSE>
+ <TELL ", carrying ">
+ <PRINT-CONTENTS ,MOUSE>)>
+ <TELL "." CR>>
+
+<ROUTINE DOOR-PSEUDO ()
+ <COND (<VERB? THROUGH>
+ <TELL "Please specify a direction." CR>)
+ (<VERB? EXAMINE> <AS-ADVERTISED>)>>
+
+<ROUTINE HOLE-FCN ()
+ <COND (<VERB? OPEN>
+ <TELL
+"There is no apparent way to open the mouse hole. You can
+barely even see the seam between it and the wall." CR>)
+ (<VERB? MUNG>
+ <TELL
+"This has no effect other than to make it even less obvious where the
+hole is." CR>)>>
+
+<GLOBAL TRASH-COUNT 0>
+
+<ROUTINE TRASH-BIN-FCN ()
+ <COND (<VERB? LOOK-INSIDE EXAMINE>
+ <TELL
+"The bin is filled with all sorts of flotsam and jetsam. Bones, clothing,
+and broken spears are just some of the items visible on the top layer.">
+ <COND (<FIRST? ,TRASH-BIN>
+ <TELL " The bin also contains: ">
+ <PRINT-CONTENTS ,TRASH-BIN>
+ <TELL ".">)>
+ <CRLF>)
+ (<VERB? SHAKE>
+ <TELL "The bin is solidly affixed to the floor." CR>)
+ (<VERB? REACH>
+ <TELL
+"There's a lot of stuff inside the bin." CR>)
+ (<VERB? SEARCH DIG THROUGH>
+ <COND (<FSET? ,GREEN-KEY ,TOUCHBIT>
+ <TELL
+"You find nothing else of interest." CR>)
+ (<==? ,TRASH-COUNT 0>
+ <TELL
+"After searching a bit, you have found a great deal of junk, but nothing
+of value. There is a great deal of trash here." CR>
+ <SETG TRASH-COUNT 25>)
+ (<PROB ,TRASH-COUNT>
+ <MOVE ,GREEN-KEY ,TRASH-BIN>
+ <FSET ,GREEN-KEY ,TOUCHBIT>
+ <THIS-IS-IT ,GREEN-KEY>
+ <TELL
+"Ahah, there's something! It appears to be a green crystal rod." CR>)
+ (ELSE
+ <SETG TRASH-COUNT <+ ,TRASH-COUNT 25>>
+ <TELL
+"You continue sifting through the junk; nothing of interest turns up." CR>)>)>>
+
+<ROUTINE HOLE-PSEUDO ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The hole is deep and the air in it is warm." CR>)
+ (<AND <VERB? DROP> <==? ,PRSI ,PSEUDO-OBJECT>>
+ <REMOVE ,PRSO>
+ <TELL
+"The " D ,PRSO " falls into the hole and disappears." CR>)
+ (<VERB? CLIMB-DOWN THROUGH>
+ <JIGS-UP
+"The hole leads straight to the input hopper of a fusion reactor which
+gets some of its power from trash. It is now getting some of its power
+from you.">)>>
+
+\
+
+"SUBTITLE SPIDER"
+
+<ROUTINE SPHERE-SHIP-FCN (RARG)
+ <COND (<==? .RARG ,M-ENTER>
+ <ENABLE <QUEUE I-SPIDER 1>>)>>
+
+<ROUTINE BUBBLE-ROOM-FCN (RARG)
+ <COND (<==? .RARG ,M-ENTER>
+ <DISABLE <INT I-SPIDER>>)>>
+
+<ROUTINE BUBBLE-PSEUDO ()
+ <COND (<VERB? MUNG>
+ <TELL "The bubble is made of indestructible plastic." CR>)
+ (<VERB? LOOK-INSIDE>
+ <TELL "You can see the dock area quite clearly." CR>)>>
+
+<ROUTINE I-SPIDER ()
+ <COND (<OR <NOT <IN? ,SPIDER ,SPHERE-SHIP>>
+ <NOT <IN? ,ADVENTURER ,SPHERE-SHIP>>>
+ <RFALSE>)>
+ <ENABLE <QUEUE I-SPIDER 1>>
+ <COND (<NOT ,REFERRED?>
+ <COND (<IN? ,TAPE-PLAYER ,SPIDER>
+ <TELL
+"The spider, oblivious to all else, is fiddling with the tape player.
+Every so often, he makes a happy little noise." CR>)
+ (<NOT ,TALKED?>
+ <COND (<PROB 25>
+ <SPIDER-GREETING>)
+ (ELSE
+ <TELL
+"The spider watches you with multifaceted eyes." CR>)>)
+ (ELSE
+ <TELL
+"The spider sidles along the wires towards you. ">
+ <TELL "He asks " <PICK-ONE ,SPIDER-QUESTIONS> CR>)>)
+ (ELSE <SETG REFERRED? <>>)>>
+
+<GLOBAL SPIDER-QUESTIONS
+ <LTABLE
+"you a question about Earth, a rather abstruse one."
+"who won the World Cup this year."
+"if you have read any good books lately."
+"what your astrological sign is."
+"your views on the Luna City Manifesto.">>
+
+<GLOBAL REFERRED? <>>
+<GLOBAL TALKED? <>>
+
+<ROUTINE TRANSLATOR-FCN ()
+ <COND (<VERB? ZAP> <PERFORM ,V?ZAP ,ZAP-GUN ,SPIDER> <RTRUE>)>>
+
+<ROUTINE SPIDER-FCN ()
+ <SETG REFERRED? T>
+ <COND (<==? ,SPIDER ,WINNER>
+ <COND (<NOT ,TALKED?>
+ <SPIDER-GREETING>)>
+ <COND (<IN? ,TAPE-PLAYER ,SPIDER>
+ <TELL ,ENGROSSED CR>)
+ (<VERB? EXAMINE FIND IS-IN FOLLOW>
+ <TELL
+"\"I can't help you there, I'm afraid. I'm quite a stay-at-home, I haven't
+left my ship for ages; nothing interesting going on out there any more.
+Those furry ones were interesting for a while but they're stagnant now.\"" CR>)
+ (<AND <VERB? TAKE> <==? ,PRSO ,TAPE-PLAYER>>
+ <SETG WINNER ,ADVENTURER>
+ <PERFORM ,V?GIVE ,PRSO ,SPIDER>
+ <RTRUE>)
+ (<VERB? TAKE DROP ATTACK KILL MUNG>
+ <TELL
+"\"I couldn't do that. You're just joking, of course. You humans have a
+strange idea of humor." CR>)
+ (<VERB? GIVE SGIVE>
+ <TELL
+"\"No, thank you.\" He seems offended that you would ask for an outright
+gift." CR>)
+ (ELSE
+ <TELL
+"\"I see. Thank you.\" He seems quite pleased." CR>)>)
+ (<VERB? EXAMINE> <TELL <GETP ,SPIDER ,P?LDESC> CR>)
+ (<VERB? MUNG>
+ <JIGS-UP
+"Bad idea. The spider grabs you with two of its arms and tears you apart.">)
+ (<IN? ,TAPE-PLAYER ,SPIDER>
+ <TELL ,ENGROSSED CR>)
+ (<VERB? HELLO TELL>
+ <COND (<NOT ,TALKED?>
+ <SPIDER-GREETING>
+ <COND (<VERB? TELL> <RFALSE>)
+ (ELSE <SETG P-CONT <>> <RTRUE>)>)
+ (<VERB? HELLO>
+ <TELL "\"Hello, again.\"" CR>)>)
+ (<VERB? GIVE>
+ <COND (<==? ,PRSO ,TAPE-PLAYER>
+ <SETG TALKED? T>
+ <MOVE ,YELLOW-KEY ,HERE>
+ <MOVE ,PRSO ,SPIDER>
+ <FSET ,PRSO ,NDESCBIT>
+ <FCLEAR ,PRSO ,TAKEBIT>
+ <PUTP ,SPIDER ,P?LDESC
+"There is a giant spider here, listening to a tape player.">
+ <TELL
+"The spider examines the tape player, then discovers the controls. A random
+song begins playing. Agitated, he fiddles with the controls again, and
+something else plays, a lecture this time. He becomes even more agitated.
+\"What a wonderful gift, human! This will alleviate my boredom for a while.
+Your culture is young, but you have amassed enough of interest to keep me
+sane for a few more years. I thank you.\" He fishes in a nearby pouch and
+comes up with something. \"Perhaps you may find some use from this; I
+long ago grew bored with such baubles.\" He tosses a yellow crystal rod at your
+feet." CR>)
+ (ELSE
+ <TELL
+"He takes the " D ,PRSO " politely, looks it over for a moment, and gives
+it back. \"No, thank you,\" he sighs." CR>)>)>>
+
+<GLOBAL ENGROSSED
+"Gurthark is engrossed in the tape library, and pays no attention to you.">
+
+<ROUTINE SPIDER-GREETING ()
+ <SETG TALKED? T>
+ <TELL
+"The spider draws forth an object from one of the wire clumps. He fiddles
+for a moment, then a voice issues from it: \"Greetings, creature
+from Earth. Are you afraid of me? Come closer, I won't harm you.\"|
+|
+The spider tells you his name is \"Gurthark-tun-Besnap,\" (or something
+more-or-less that). Like yourself, he landed here to explore. He didn't
+succeed in controlling the artifact before it left his system, and has been
+stranded here since. He sighs. \"It has been many centuries, and it's getting
+a little boring. The other inhabitants of this place are not too stimulating.
+The computer was some company until it malfunctioned. When we began to
+approach your system, I got excited! A whole new culture to learn! The end
+of boredom, for a while at least. I fed your language to my translator,
+from your radio broadcasts, and have eagerly awaited your arrival.\" He grins
+broadly, a fairly horrific sight." CR>>
+
+\
+
+"SUBTITLE FORCE FIELD AND TRANSPORTER DISKS"
+
+<ROUTINE GLOBE-SIZE (N)
+ <TELL "The silvery globe is the size of ">
+ <COND (<==? .N 1>
+ <TELL "an orange">
+ <COND (<IN? ,BLUE-KEY ,FORCE-FIELD-1>
+ <TELL
+". Imbedded in the silver globe is a blue crystal rod">)>)
+ (<==? .N 2> <TELL "a basketball">)
+ (<==? .N 3> <TELL "a beachball">)
+ (T
+ <TELL "four feet and seems embedded in the floor">)>
+ <TELL ".">>
+
+<ROUTINE FF-FCN ("OPTIONAL" (RARG <>) "AUX" F)
+ <COND (<==? .RARG ,M-OBJDESC>
+ <GLOBE-SIZE ,FF-STRENGTH>
+ <CRLF>
+ <COND (<FIRST? ,FF-HERE>
+ <PRINT-CONT ,FF-HERE <> 0>)>
+ <RTRUE>)
+ (<VERB? TAKE>
+ <TELL "The globe won't budge no matter how hard you try." CR>)
+ (<VERB? RUB PUSH>
+ <TELL
+"The globe feels neither hot nor cold. The globe doesn't move no matter how
+hard you press." CR>)
+ (<VERB? CLIMB-UP CLIMB-ON BOARD>
+ <TELL
+"Climbing it gives you a strange feeling, so you get back down." CR>)
+ (<VERB? PUT-UNDER>
+ <COND (<AND <NOT <FSET? ,PRSO ,TOUCHBIT>>
+ <NOT <TRYTAKE>>>
+ <RTRUE>)
+ (<==? ,FF-STRENGTH 4>
+ <TELL
+"The globe is now touching the floor (in fact part of it seems to be in the
+floor), so you can't put anything under it." CR>)
+ (,UNDER-GLOBE
+ <TELL
+"The " D ,UNDER-GLOBE " is already under the globe." CR>)
+ (<FSET? ,PRSO ,TAKEBIT>
+ <COND (<EQUAL? ,PRSO ,RED-DISK ,BLUE-DISK>
+ <PERFORM ,V?DROP ,PRSO>)
+ (ELSE <MOVE ,PRSO ,HERE>)>
+ <SETG UNDER-GLOBE ,PRSO>
+ <FSET ,PRSO ,NDESCBIT>
+ <TELL
+"The " D ,PRSO " slides under the globe." CR>)
+ (ELSE <TELL "Be serious!" CR>)>)
+ (<VERB? PUT-ON>
+ <COND (<NOT <TRYTAKE>> <RTRUE>)
+ (<SET F <FIRST? ,FF-HERE>>
+ <COND (<==? .F ,BLUE-KEY>
+ <TELL
+"The blue rod sticks out of the globe, preventing you from placing the "
+D ,PRSO " there." CR>)
+ (ELSE
+ <TELL
+"The " D .F " is already on the globe, rather precariously balanced." CR>)>)
+ (ELSE
+ <MOVE ,PRSO ,FF-HERE>
+ <TELL
+"The " D ,PRSO " is now on the globe." CR>)>)
+ (<VERB? ZAP>
+ <COND (<CAN-ZAP?>
+ <COND (<OR ,UNDER-GLOBE <ROB ,FF-HERE>>
+ <TELL
+"The blast destroys some carelessly stored objects." CR>)>
+ <COND (,UNDER-GLOBE
+ <REMOVE ,UNDER-GLOBE>
+ <SETG UNDER-GLOBE <>>)>
+ <TELL
+"The blast washes over the globe, which grows brighter and brighter as it
+overloads, then with a sinister shiver, it disappears!">
+ <COND (<IN? ,BLUE-KEY ,FORCE-FIELD-1>
+ <COND (<==? ,FF-HERE ,FORCE-FIELD-1>
+ <REMOVE ,BLUE-KEY>
+ <TELL
+" The blue rod is destroyed by the blast!">)
+ (<AND <EQUAL? ,WAS-UNDER-GLOBE
+ ,RED-DISK ,BLUE-DISK>
+ <NOT <DISKS-OFF? ,WAS-UNDER-GLOBE>>>
+ <SETG P-NUMBER 4>
+ <JUNK-INSIDE 4 2 T>)
+ (ELSE
+ <MOVE ,BLUE-KEY ,HERE>
+ <TELL
+" A blue rod drops to the floor from the globe's center!">)>)>
+ <TELL " Moments later, the projector builds up
+enough energy to restore the globe, and it reappears." CR>
+ <COND (<OR <ROB ,FORCE-FIELD-1 ,HERE>
+ <ROB ,FORCE-FIELD-2 ,HERE>
+ <ROB ,FORCE-FIELD-3 ,HERE>
+ <ROB ,FORCE-FIELD-4 ,HERE>
+ ;<ROB ,FF-BOWL-1 ,HERE>
+ <ROB ,FF-BOWL-2 ,HERE>
+ <ROB ,FF-BOWL-3 ,HERE>
+ <ROB ,FF-BOWL-4 ,HERE>>
+ <TELL
+"(The rod wasn't the only thing which dropped.)" CR>)>
+ <RTRUE>)>)>>
+
+<GLOBAL FF-STRENGTH 2>
+<GLOBAL FF-HERE <>>
+<GLOBAL FF-TABLE
+ <TABLE FORCE-FIELD-1 FORCE-FIELD-2 FORCE-FIELD-3 FORCE-FIELD-4>>
+<GLOBAL FF-FALLS
+ <TABLE <> FF-BOWL-2 FF-BOWL-3 FF-BOWL-4>>
+<GLOBAL UNDER-GLOBE <>>
+<GLOBAL WAS-UNDER-GLOBE <>>
+
+<ROUTINE FF-ROOM-FCN (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"This is a glaringly lit room filled with many strange devices. Most are
+completely incomprehensible. For example, a huge projector of some sort
+points menacingly at a silvery globe floating in midair in the center of
+the room. ">
+ <GLOBE-SIZE ,FF-STRENGTH>
+ <TELL
+" Beneath the projector is a dial with four positions." CR>
+ <COND (,UNDER-GLOBE
+ <TELL
+"Lying beneath the globe is a " D ,UNDER-GLOBE "." CR>)>
+ <RTRUE>)
+ (<AND <==? .RARG ,M-BEG>
+ <VERB? TAKE>
+ <==? ,PRSO ,UNDER-GLOBE>>
+ <SETG UNDER-GLOBE <>>
+ <RFALSE>)>>
+
+<ROUTINE BLUE-KEY-FCN ()
+ <COND (<AND <VERB? TAKE>
+ <IN? ,PRSO ,FORCE-FIELD-1>
+ <NOT <FSET? ,PRSO ,TOUCHBIT>>>
+ <TELL
+"The blue rod is solidly held by the silvery globe." CR>)>>
+
+<ROUTINE FF-DIAL-FCN ("AUX" OLD)
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The dial has four positions. It is currently set to " <GET ,NUMTAB ,FF-STRENGTH> "." CR>)
+ (<AND <VERB? SET> <==? ,PRSI ,INTNUM>>
+ <COND (<==? ,FF-STRENGTH ,P-NUMBER>
+ <TELL "That's where it's set now!" CR>)
+ (<OR <G? ,P-NUMBER 4> <L? ,P-NUMBER 1>>
+ <TELL
+"The dial is clearly labelled with the numbers 1 to 4." CR>)
+ (ELSE
+ <TELL
+"The globe flickers out for an instant and then reappears, ">
+ <COND (<G? ,P-NUMBER ,FF-STRENGTH> <TELL "expanded">)
+ (ELSE <TELL "shrunken">)>
+ <TELL ". ">
+ <GLOBE-SIZE ,P-NUMBER>
+ <CRLF>
+ <COND (<AND <==? ,FF-STRENGTH 4> ,WAS-UNDER-GLOBE>
+ <SETG UNDER-GLOBE ,WAS-UNDER-GLOBE>
+ <FCLEAR ,WAS-UNDER-GLOBE ,INVISIBLE>
+ <SETG WAS-UNDER-GLOBE <>>)
+ (<AND <==? ,P-NUMBER 4> ,UNDER-GLOBE>
+ <SETG WAS-UNDER-GLOBE ,UNDER-GLOBE>
+ <FSET ,WAS-UNDER-GLOBE ,INVISIBLE>
+ <SETG UNDER-GLOBE <>>)>
+ <SET OLD ,FF-HERE>
+ <REMOVE ,FF-HERE>
+ <SETG FF-HERE <GET ,FF-TABLE <- ,P-NUMBER 1>>>
+ <MOVE ,FF-HERE ,FF-ROOM>
+ <COND (<G? ,P-NUMBER ,FF-STRENGTH>
+ <JUNK-INSIDE ,P-NUMBER ,FF-STRENGTH>)
+ (ELSE
+ <JUNK-OUTSIDE ,P-NUMBER ,FF-STRENGTH>)>
+ <SETG FF-STRENGTH ,P-NUMBER>)>)>>
+
+<ROUTINE V-FALL () <TELL "Fallen." CR>>
+
+<ROUTINE JUNK-INSIDE (NEW OLD "OPTIONAL" (KEY? <>) "AUX" DEST RO RI)
+ <SET DEST <GET ,FF-FALLS <- .NEW 1>>>
+ <COND (<AND <==? ,P-NUMBER 4>
+ <OR <==? ,WAS-UNDER-GLOBE ,BLUE-DISK>
+ <==? ,WAS-UNDER-GLOBE ,RED-DISK>>>
+ <SET DEST ,WAS-UNDER-GLOBE>)>
+ <SET RO <ROB <GET ,FF-TABLE <- .OLD 1>> .DEST>>
+ <COND (<SET RI <GET ,FF-FALLS <- .OLD 1>>>
+ <SET RI <ROB .RI .DEST>>)>
+ <COND (<OR .RO .RI .KEY?>
+ <COND (<AND <==? ,P-NUMBER 4>
+ <EQUAL? ,WAS-UNDER-GLOBE ,BLUE-DISK ,RED-DISK>
+ <NOT <DISKS-OFF? ,WAS-UNDER-GLOBE>>>
+ <TELL
+"You hear the hum of the transporter disk activating." CR>
+ <COND (.RI <PERFORM ,V?FALL .RI ,WAS-UNDER-GLOBE>)>
+ <COND (.RO <PERFORM ,V?FALL .RO ,WAS-UNDER-GLOBE>)>
+ <COND (.KEY?
+ <MOVE ,BLUE-KEY ,WAS-UNDER-GLOBE>
+ <PERFORM ,V?FALL ,BLUE-KEY ,WAS-UNDER-GLOBE>)>
+ <COND (<AND <IN? ,BLUE-KEY ,FORCE-FIELD-1>
+ <IN? <LOC <OTHER-DISK ,WAS-UNDER-GLOBE>>
+ ,ROOMS>>
+ <SCORE-OBJ ,BLUE-KEY>
+ <FSET ,BLUE-KEY ,TOUCHBIT>
+ <MOVE ,BLUE-KEY <OTHER-DISK ,WAS-UNDER-GLOBE>>)>
+ <RTRUE>)
+ (ELSE
+ <TELL
+"You hear something fall inside the sphere." CR>)>)>
+ <RTRUE>>
+
+<GLOBAL SPHERE-SHRINKS "When the sphere shrinks, the ">
+
+<ROUTINE JUNK-OUTSIDE (NEW OLD "AUX" R)
+ <COND (<SET R <ROB <GET ,FF-TABLE <- .OLD 1>> ,FF-ROOM>>
+ <TELL
+,SPHERE-SHRINKS D .R " falls to the new surface and then
+slides to the floor." CR>)>
+ <COND (<SET R <ROB <GET ,FF-FALLS <- .OLD 1>> ,FF-ROOM>>
+ <TELL
+,SPHERE-SHRINKS D .R " falls">
+ <COND (<EQUAL? ,UNDER-GLOBE ,RED-DISK ,BLUE-DISK>
+ <TELL ". ">
+ <MOVE .R ,WINNER> ;"Kludge: make DROP work"
+ <PERFORM ,V?DROP .R ,UNDER-GLOBE>)
+ (ELSE
+ <TELL " onto the floor.">)>
+ <CRLF>)>
+ <RTRUE>>
+
+<ROUTINE DISK-FCN ("AUX" THERE OTHER)
+ <COND (<AND <VERB? TAKE> <EQUAL? ,PRSO ,RED-DISK ,BLUE-DISK>>
+ <COND (<ROB ,PRSO ,HERE>
+ <TELL "The stuff on the disk falls to the ground." CR>)>
+ <DISK-SWITCH ,PRSO <>>
+ <RFALSE>)
+ (<AND <VERB? DROP>
+ <EQUAL? ,PRSO ,RED-DISK ,BLUE-DISK>
+ <FSET? ,HERE ,RLANDBIT>
+ <NOT ,PRSI>>
+ <DISK-SWITCH ,PRSO T>
+ <MOVE ,PRSO ,HERE>
+ <TELL
+"The " D ,PRSO " drops to the ground. There is an almost inaudible click
+as it comes to rest." CR>)
+ (<AND <VERB? STAND-ON STEP-ON BOARD CLIMB-ON>
+ <EQUAL? ,PRSO ,RED-DISK ,BLUE-DISK>>
+ <SET OTHER <OTHER-DISK ,PRSO>>
+ <COND (<HELD? ,PRSO> <TELL "You're holding it!" CR>)
+ (<IN? ,PRSO ,MOUSE>
+ <TELL "The mouse skitters out of the way." CR>)
+ (<DISKS-OFF? ,PRSO> <TELL "Nothing happens." CR>)
+ (ELSE
+ <TELL
+"There is a loud click as you step on the disk, and then a moment of
+disorientation." CR>
+ <DISK-SWITCH ,RED-DISK <>>
+ <DISK-SWITCH ,BLUE-DISK <>>
+ <SET THERE <FIND-ROOM .OTHER>>
+ <COND (<EQUAL? .OTHER
+ ,UNDER-GLOBE ,WAS-UNDER-GLOBE>
+ <JIGS-UP
+"You reappear amidst the sphere. Unfortunately, parts of you are inside it
+and parts of you are outside it. Very untidy.">
+ <RTRUE>)>
+ <COND (<IN? .OTHER ,PRSO>
+ <REMOVE ,RED-DISK>
+ <REMOVE ,BLUE-DISK>
+ <JIGS-UP
+"There is a tremendous explosion as the disk tries to transport the other
+disk into itself. You are, unfortunately, intimately part of the explosion.">
+ <RTRUE>)>
+ <ROB ,PRSO .OTHER>
+ <COND (<==? ,HERE .THERE>
+ <TELL
+"You reappear in the same room, but on the other disk!" CR>)
+ (ELSE
+ <CRLF>
+ <GOTO .THERE>)>)>)
+ (<AND <VERB? PUT-ON FALL>
+ <EQUAL? ,PRSI ,RED-DISK ,BLUE-DISK>>
+ <COND (<NOT <FSET? ,PRSI ,TOUCHBIT>>
+ <TELL "It's on the wall!" CR>
+ <RTRUE>)
+ (<VERB? PUT-ON>
+ <COND (<NOT <TRYTAKE>> <RTRUE>)>)>
+ <MOVE ,PRSO ,PRSI>
+ <FSET ,PRSO ,TOUCHBIT>
+ <SET OTHER <OTHER-DISK ,PRSI>>
+ <COND (<DISKS-OFF? ,PRSI> <TELL "Nothing happens." CR>)
+ (<EQUAL? ,PRSO .OTHER>
+ <REMOVE ,RED-DISK>
+ <REMOVE ,BLUE-DISK>
+ <COND (<==? ,PRSI ,WAS-UNDER-GLOBE>
+ <SETG WAS-UNDER-GLOBE <>>
+ <ROB ,FF-BOWL-2>
+ <ROB ,FF-BOWL-3>
+ <ROB ,FF-BOWL-4>
+ <COND (<IN? ,BLUE-KEY ,FORCE-FIELD-1>
+ <REMOVE ,BLUE-KEY>)>
+ <TELL
+"You hear a muffled explosion." CR>)
+ (ELSE
+ <TELL
+"The " D ,PRSI " activates as the " D ,PRSO " touches it. It disappears
+for the merest fraction of a second, then a blinding flash of light fills
+the room as both disks explode!" CR>)>)
+ (ELSE
+ <MOVE ,PRSO .OTHER>
+ <COND (<IN? .OTHER ,PRSI>
+ <REMOVE ,RED-DISK>
+ <REMOVE ,BLUE-DISK>
+ <TELL
+"There is a tremendous explosion as the disk tries to transport the other
+disk into itself." CR>
+ <RTRUE>)>
+ <ROB ,PRSI .OTHER>
+ <DISK-SWITCH ,RED-DISK <>>
+ <DISK-SWITCH ,BLUE-DISK <>>
+ <COND (<AND <IN? .OTHER ,HERE>
+ <NOT <==? .OTHER ,WAS-UNDER-GLOBE>>>
+ <COND (<AND <==? ,PRSI ,WAS-UNDER-GLOBE>
+ <==? ,P-NUMBER 4>>
+ <TELL
+"There is a loud click, and then the " D ,PRSO " appears resting comfortably
+on the " D <OTHER-DISK ,PRSI> ".">
+ <COND (<IN? ,BLUE-KEY ,FORCE-FIELD-1>
+ <TELL
+" The blue rod must have been in range of the disk, because it appeared as
+well!">)>
+ <CRLF>)
+ (T
+ <TELL
+"There is a loud click from the " D ,PRSI ", and the " D ,PRSO " disappears
+for a fraction of a second, then reappears resting comfortably on the "
+ D .OTHER "." CR>)>)
+ (ELSE
+ <TELL
+"There is a loud click from the " D ,PRSI " and the " D ,PRSO
+" disappears!" CR>)>)>)>>
+
+"DISKS-OFF? returns true if disks can't work"
+
+<ROUTINE DISKS-OFF? (DISK "AUX" OTHER)
+ <SET OTHER <OTHER-DISK .DISK>>
+ <COND (<OR <NOT <FSET? ,RED-DISK ,TOUCHBIT>>
+ <NOT <FSET? ,BLUE-DISK ,TOUCHBIT>>>
+ <RTRUE>)
+ (<AND <==? .DISK ,RED-DISK> <NOT ,RED-DISK-ON>>
+ <RTRUE>)
+ (<AND <==? .DISK ,BLUE-DISK> <NOT ,BLUE-DISK-ON>>
+ <RTRUE>)
+ (<AND <NOT <FSET? <LOC .OTHER> ,RLANDBIT>>
+ <NOT <IN? .OTHER .DISK>>>
+ <RTRUE>)>>
+
+<ROUTINE FIND-ROOM (X)
+ <REPEAT ()
+ <COND (<NOT .X> ;"this can't happen, of course"
+ <RETURN ,SPACESHIP-BRIDGE>)
+ (<IN? .X ,ROOMS> <RETURN .X>)>
+ <SET X <LOC .X>>>>
+
+<ROUTINE DISK-SWITCH (WHICH NEW)
+ <FSET .WHICH ,TOUCHBIT>
+ <COND (<==? .WHICH ,RED-DISK> <SETG RED-DISK-ON .NEW>)
+ (ELSE <SETG BLUE-DISK-ON .NEW>)>>
+
+<ROUTINE OTHER-DISK (DISK)
+ <COND (<==? .DISK ,RED-DISK> ,BLUE-DISK)
+ (ELSE ,RED-DISK)>>
+
+<GLOBAL NUMTAB <LTABLE "1" "2" "3" "4">>
+
+<ROUTINE PROJECTOR-FCN ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"It is a formidable looking piece of apparatus that beams some sort of beam
+directly at the silvery globe." CR>)
+ (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <TELL
+"The projector is of the sturdiest construction, and is therefore
+unscathed." CR>)
+ (<VERB? MUNG>
+ <TELL
+"The projector is constructed of extremely tough plastic (yes, plastic)
+and is unscathed." CR>)>>
+
+<ROUTINE BEAM-FCN ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The beam transfers some sort of energy to the globe. It is impossible to
+tell any more." CR>)
+ (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <TELL
+"The beam is pure energy, and is therefore unscathed." CR>)
+ (<VERB? MUNG>
+ <TELL
+"The beam seems impervious to that." CR>)>>
+
+\
+
+<ROUTINE AIRLOCK-EXIT-FCN ()
+ <COND (<NOT <FSET? ,AIRLOCK-OUTER ,OPENBIT>>
+ <ITS-CLOSED ,AIRLOCK-OUTER>)
+ (,DOCKED?
+ <TELL
+"You exit gingerly, climbing \"up\" to the surface of the artifact, where
+your magnetic boots hold you securely as you hang \"upside-down.\"" CR>
+ <CRLF>
+ ,RED-DOCK)
+ (ELSE ,DEEP-SPACE)>>
+
+<ROUTINE AIRLOCK-FCN ("OPTIONAL" (RARG ,M-BEG))
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"This is the airlock of the Starcross. The inner door is
+" <DDESC ,AIRLOCK-INNER> ", and the outer door is "
+<DDESC ,AIRLOCK-OUTER> ". Neither door has a viewport.">
+ <COND (<FSET? ,AIRLOCK-OUTER ,OPENBIT>
+ <TELL " Just outside the airlock is a hook.">)>
+ <CRLF>)
+ (<==? .RARG ,M-BEG>
+ <COND (<AND <VERB? THROUGH> <==? ,PRSO ,AIRLOCK>>
+ <COND (<==? ,HERE ,SPACESHIP-BRIDGE>
+ <DO-WALK ,P?OUT>)
+ (<==? ,HERE ,DEEP-SPACE>
+ <DO-WALK ,P?IN>)
+ (ELSE <TELL "You are in it." CR>)>
+ <RTRUE>)
+ (<AND <VERB? OPEN CLOSE>
+ <==? ,HERE ,SPACESHIP-BRIDGE>>
+ <PERFORM ,PRSA ,AIRLOCK-INNER>
+ <RTRUE>)>)>>
+
+<ROUTINE RED-LOCK-FCN ("OPTIONAL" (RARG ,M-BEG))
+ <COND (<==? .RARG ,M-ENTER>
+ <SETG IN-ARTIFACT? T>
+ <RFALSE>)
+ (<==? .RARG ,M-LOOK>
+ <DESCRIBE-LOCK "red" ,RED-INNER ,RED-OUTER>)>>
+
+<ROUTINE BLUE-LOCK-FCN ("OPTIONAL" (RARG ,M-BEG))
+ <COND (<==? .RARG ,M-LOOK>
+ <DESCRIBE-LOCK "blue" ,BLUE-INNER ,BLUE-OUTER>)>>
+
+<ROUTINE GREEN-LOCK-FCN ("OPTIONAL" (RARG ,M-BEG))
+ <COND (<==? .RARG ,M-LOOK>
+ <DESCRIBE-LOCK "green" ,GREEN-INNER ,GREEN-OUTER>)>>
+
+<ROUTINE YELLOW-LOCK-FCN ("OPTIONAL" (RARG ,M-BEG))
+ <COND (<==? .RARG ,M-ENTER>
+ <SETG IN-ARTIFACT? T>
+ <RFALSE>)
+ (<==? .RARG ,M-LOOK>
+ <DESCRIBE-LOCK "yellow" ,YELLOW-INNER ,YELLOW-OUTER>
+ <COND (,ALWAYS-LIT
+ <TELL
+"The room is lit by an emergency lighting system." CR>)>
+ <RTRUE>)>>
+
+<ROUTINE DESCRIBE-LOCK (COLOR INNER OUTER)
+ <TELL
+"This is the main airlock of the " .COLOR " docking port. One door leads out to
+the surface, another up into the artifact's interior. The
+inner door is " <DDESC .INNER> ", and the outer door is "
+<DDESC .OUTER> "." CR>>
+
+<ROUTINE DDESC (D) <COND (<FSET? .D ,OPENBIT> "open")(T "closed")>>
+
+<ROUTINE AIRLOCK-DOORS-FCN ("AUX" DIR)
+ <COND (<VERB? THROUGH>
+ <COND (<==? ,HERE ,SPACESHIP-AIRLOCK>
+ <COND (<==? ,PRSO ,AIRLOCK-INNER>
+ <SET DIR ,P?WEST>)
+ (ELSE <SET DIR ,P?UP>)>)
+ (<==? ,PRSO ,AIRLOCK-INNER>
+ <SET DIR ,P?EAST>)
+ (ELSE <SET DIR ,P?DOWN>)>
+ <DO-WALK .DIR>
+ <RTRUE>)
+ (<VERB? OPEN CLOSE>
+ <COND (<AND ,PRSO ,PRSI <==? ,PRSO ,AIRLOCK>>
+ <PERFORM ,PRSA ,PRSI>
+ <RTRUE>)
+ (<==? ,PRSO ,AIRLOCK-INNER>
+ <COND (<VERB? OPEN>
+ <COND (<IN? ,WINNER ,COUCH>
+ <TELL
+"You'll have to get out of the couch first." CR>)
+ (<FSET? ,PRSO ,OPENBIT>
+ <ALREADY "open">)
+ (<FSET? ,AIRLOCK-OUTER ,OPENBIT>
+ <TELL
+"Fortunately the safety interlock prevents you from evacuating the
+spaceship by opening both doors of the airlock at once." CR>)
+ (ELSE
+ <DOOR-OPENS>)>)
+ (<IN? ,WINNER ,COUCH>
+ <TELL
+"You'll have to get out of the couch first." CR>)
+ (<NOT <FSET? ,PRSO ,OPENBIT>>
+ <ALREADY "closed">)
+ (ELSE
+ <DOOR-CLOSES>)>)
+ (<VERB? OPEN> ;"must be outer door, then"
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <ALREADY "open">)
+ (<FSET? ,AIRLOCK-INNER ,OPENBIT>
+ <TELL
+"You must close the inner door first, or you will empty all the air out of
+the ship. A safety interlock prevents this action." CR>)
+ (ELSE
+ <FSET ,PRSO ,OPENBIT>
+ <VACUUM-HERE>
+ <COND (<NOT ,DOCKED?>
+ <TELL
+" Outside the airlock is deep space. Beside the airlock is a safety hook
+to prevent you from drifting away into space.">)>
+ <CRLF>
+ <COND (<NOT ,SUIT-ON?>
+ <JIGS-UP
+"Didn't they teach you to anything in the Academy? You can't breathe
+vacuum! The process of dying is this way is very painful but at least
+relatively short.">)>
+ T)>)
+ (<NOT <FSET? ,PRSO ,OPENBIT>>
+ <ALREADY "closed">)
+ (ELSE
+ <FCLEAR ,PRSO ,OPENBIT>
+ <AIR-HERE>)>)
+ (<VERB? LOOK-INSIDE>
+ <COND (<NOT <FSET? ,PRSO ,OPENBIT>>
+ <TELL
+"The " D ,PRSO " is closed and there is no viewport." CR>)
+ (<==? ,PRSO ,AIRLOCK-INNER>
+ <TELL "You see the bridge." CR>)
+ (,DOCKED?
+ <TELL
+"You see the red docking area of the artifact, covered with strange
+bumps and protrusions. Forward of here is a dome with an airlock." CR>)
+ (ELSE <DESCRIBE-SPACE>)>)>>
+
+<ROUTINE DOOR-OPENS ()
+ <FSET ,PRSO ,OPENBIT>
+ <TELL "The " D ,PRSO " opens." CR>>
+
+<ROUTINE DOOR-CLOSES ()
+ <FCLEAR ,PRSO ,OPENBIT>
+ <TELL "The " D ,PRSO " closes." CR>>
+
+<ROUTINE DEEP-SPACE-FCN ("OPTIONAL" (RARG <>))
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"You are floating outside the airlock of the Starcross. The airlock
+door is " <COND (<FSET? ,AIRLOCK-OUTER ,OPENBIT> "open")
+ (T "closed")>>
+ <COND (,THAT-END
+ <TELL ". One end of your safety line is attached to
+a hook next to the airlock.">)
+ (ELSE
+ <TELL ". There is a hook next to the airlock.">)>
+ <TELL
+" This is deep space, outside the plane of the ecliptic and much further out
+than the orbit of Earth. The sun seems small but still intolerably bright to
+look at directly." CR>
+ <DESCRIBE-SPACE>)
+ (<==? .RARG ,M-END>
+ <COND (<OR <NOT ,THIS-END> <NOT ,THAT-END>>
+ <TELL
+"You have left the Starcross in deep space without a safety
+line, a good way to drift away into space and eventually run out of air." CR>
+ <COND (<PROB 40>
+ <TELL
+"So far you have been lucky and not drifted very far." CR>)
+ (ELSE <JIGS-UP
+"In fact, this is exactly what has happened to you.">)>
+ <RTRUE>)>)
+ (<==? .RARG ,M-BEG>
+ <COND (<VERB? THROW> <THROW-AWAY>)
+ (<AND <VERB? REACH-FOR>
+ <EQUAL? ,PRSO ,AIRLOCK-OUTER>>
+ <COND (<FSET? ,AIRLOCK-OUTER ,OPENBIT>
+ <TELL
+"Just in time you grab the outer hatch and pull yourself back in.|" CR>
+ <GOTO ,SPACESHIP-AIRLOCK>)
+ (ELSE
+ <TELL
+"You grab for the hatch, but can't find a handhold!" CR>)>)>)>>
+
+<ROUTINE OUTER-SPACE-FCN ("OPTIONAL" (RARG <>))
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"You are floating in space above the artifact. A panoramic view of the surface
+rotates by below you. Unfortunately you will eventually run out of air, which
+will ruin the experience." CR>)
+ (<==? .RARG ,M-BEG>
+ <COND (<VERB? THROW>
+ <THROW-AWAY>)
+ (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <JIGS-UP
+"The gun fires, and the force of the blast drives you back towards the
+surface of the artifact! You impact with a tremendous smash, as its
+rotation and your velocity combine to wipe you out.">)>)>>
+
+<ROUTINE THROW-AWAY ()
+ <REMOVE ,PRSO>
+ <TELL "The " D ,PRSO " sails away into space." CR>>
+
+<GLOBAL COLOR-CODED
+"This is a docking port color-coded in red. ">
+
+<ROUTINE DESCRIBE-SPACE ()
+ <COND (,DOCKED?
+ <TELL
+,COLOR-CODED "Your ship is tethered
+securely with thick silvery ropes. You are next to a large dome
+with an airlock. The surface looks metallic." CR>)
+ (<G? ,VIEW-COUNT 0>
+ <TELL <GET ,VIEW-TABLE <MOD <+ ,VIEW-COUNT 2> 4>>
+ CR>)
+ (<G? ,TRIP-COUNT 0>
+ <COND (<OR ,LOST <NOT <==? ,DESTINATION ,MASS>>>
+ <TELL
+ "There is nothing interesting visible." CR>)
+ (ELSE
+ <TELL <GET ,TRIP-DESCS ,TRIP-COUNT> CR>)>)
+ (ELSE <TELL "You see the emptiness of space." CR>)>>
+
+<ROUTINE SHIP-FCN ()
+ <COND (<VERB? EXAMINE>
+ <COND (<OR <EQUAL? ,HERE
+ ,SPACESHIP-BRIDGE
+ ,SPACESHIP-AIRLOCK ,SPACESHIP-STORES>
+ <EQUAL? ,HERE ,SPACESHIP-QUARTERS ,RED-DOCK
+ ,DEEP-SPACE>>
+ <TELL "The Starcross looks the same as always." CR>)
+ (<==? ,HERE ,BLUE-DOCK ,BUBBLE-ROOM ,SPHERE-SHIP>
+ <TELL "This ship looks like a huge crystalline bubble." CR>)
+ (<==? ,HERE ,UMBILICAL>
+ <TELL
+"It looks like something out of a Buck Rogers movie." CR>)
+ (ELSE
+ <TELL
+"The Starcross is where you left it, presumably." CR>)>)
+ (<AND <VERB? BOARD THROUGH> <==? ,HERE ,RED-DOCK>>
+ <DO-WALK ,P?SOUTH>
+ <RTRUE>)>>
+
+<ROUTINE ARTIFACT-FCN ()
+ <COND (<NOT ,DOCKED?> <TELL "What artifact?" CR>)
+ (<VERB? EXAMINE FIND> <TELL "It's all around!" CR>)>>
+
+<GLOBAL SUIT-ON? <>>
+
+<ROUTINE SPACESUIT-FCN ()
+ <COND (<AND <VERB? ZAP> <IN? ,SPACESUIT ,CHIEF>>
+ <PERFORM ,V?ZAP ,ZAP-GUN ,CHIEF>
+ <RTRUE>)
+ (<VERB? WEAR BOARD>
+ <COND (,SUIT-ON? <TELL "You are already wearing it." CR>)
+ (<NOT <TRYTAKE>> <RTRUE>)
+ (ELSE
+ <SETG SUIT-ON? T>
+ <FSET ,SPACESUIT ,WEARBIT>
+ <MOVE ,SPACESUIT ,WINNER>
+ <TELL
+"You are now wearing the space suit, breathing internal oxygen." CR>)>)
+ (<VERB? TAKE-OFF DISEMBARK>
+ <COND (,SUIT-ON?
+ <SETG SUIT-ON? <>>
+ <SETG THIS-END <>>
+ <FCLEAR ,SPACESUIT ,WEARBIT>
+ <COND (<FSET? ,HERE ,SPACEBIT>
+ <JIGS-UP
+"That was a pretty silly thing to do, as there is no air here. You
+die of all sorts of asphyxiation.">)
+ (<==? ,POISON-COUNT 4>
+ <JIGS-UP
+"The air is foul and unbreathable, and you pass out almost instantly
+after removing the space suit.">)
+ (ELSE
+ <TELL
+"You have removed the space suit.">
+ <COND (<ON-ARTIFACT?>
+ <DESCRIBE-AIR " The air here is ">)
+ (ELSE <CRLF>)>)>)
+ (ELSE <TELL "You aren't wearing it." CR>)>)
+ (<VERB? DROP GIVE THROW>
+ <COND (,SUIT-ON?
+ <TELL "You'll have to take it off first!" CR>)
+ (ELSE
+ <SETG THIS-END <>>
+ <RFALSE>)>)
+ (<AND <IN? ,SPACESUIT ,CHIEF> <VERB? TAKE POINT>>
+ <TELL
+"The chief jumps back, annoyed. He assumes you are trying to go back on
+your word." CR>)>>
+
+<ROUTINE JUNK-SPACESUIT-FCN ()
+ <COND (<AND <IN? ,PRSO ,CHIEF> <VERB? TAKE WEAR BOARD>>
+ <TELL
+"The chief jumps back, annoyed. He points at you and makes a long speech
+in his own language." CR>)
+ (<VERB? WEAR BOARD>
+ <COND (<FSET? ,PRSO ,WEARBIT>
+ <TELL "You are already wearing it." CR>)
+ (ELSE
+ <FSET ,PRSO ,WEARBIT>
+ <MOVE ,PRSO ,WINNER>
+ <TELL
+"You are now wearing the tattered old suit, which smells of alien." CR>)>)
+ (<VERB? TAKE-OFF DISEMBARK>
+ <COND (<FSET? ,PRSO ,WEARBIT>
+ <FCLEAR ,PRSO ,WEARBIT>
+ <TELL
+"You are no longer wearing the tattered suit." CR>)
+ (ELSE <TELL "You aren't wearing it." CR>)>)
+ (<AND <VERB? DROP GIVE> <FSET? ,PRSO ,WEARBIT>>
+ <TELL "You'll have to take it off first!" CR>)>>
+
+<GLOBAL THAT-END <>> ;"T if hooked to something"
+<GLOBAL THIS-END <>> ;"T if hooked to suit"
+
+<ROUTINE SAFETY-LINE-FCN ("OPTIONAL" (RARG <>))
+ <COND (<==? .RARG ,M-OBJDESC>
+ <TELL "A safety line">
+ <COND (<AND ,THIS-END <NOT <IN? ,SPACESUIT ,WINNER>>>
+ <SETG THIS-END <>>)>
+ <COND (<NOT <FSET? ,SAFETY-LINE ,TOUCHBIT>>
+ <TELL " hangs on the wall." CR>
+ <RTRUE>)
+ (,THIS-END
+ <TELL " (attached to your space suit">
+ <COND (,THAT-END
+ <TELL " and a hook">)>
+ <TELL ")">)
+ (,THAT-END
+ <TELL " (attached to a hook)">)>
+ <TELL " is here." CR>)
+ (<VERB? EXAMINE>
+ <COND (,THIS-END
+ <TELL
+"One end of the line is attached to your space suit">
+ <COND (,THAT-END
+ <TELL ", and one end to a hook">)>
+ <TELL "." CR>)
+ (,THAT-END
+ <TELL "One end of the line is attached to a hook." CR>)
+ (ELSE
+ <TELL "The line is not attached to anything." CR>)>)
+ (<VERB? TIE UNTIE>
+ <COND (<NOT <IN? ,SAFETY-LINE ,WINNER>>
+ <DONT-HAVE ,SAFETY-LINE>)
+ (<VERB? TIE>
+ <COND (<==? ,PRSI ,SPACESUIT>
+ <COND (<NOT <HELD? ,SPACESUIT>>
+ <DONT-HAVE ,SPACESUIT>
+ <RTRUE>)
+ (,THIS-END
+ <ALREADY "tied" ,SPACESUIT>
+ <RTRUE>)
+ (ELSE
+ <SETG THIS-END ,SPACESUIT>)>)
+ (<==? ,PRSI ,SAFETY-HOOK>
+ <COND (,THAT-END
+ <ALREADY "tied" ,SAFETY-HOOK>
+ <RTRUE>)
+ (ELSE
+ <SETG THAT-END ,SAFETY-HOOK>)>)
+ (,PRSI
+ <TELL
+"You can't attach the safety line to that." CR>
+ <RTRUE>)
+ (ELSE
+ <TELL "You must tell what to attach it to." CR>
+ <RTRUE>)>
+ <TELL "Attached to the " D ,PRSI "." CR>)
+ (<VERB? UNTIE>
+ <COND (,PRSI
+ <COND (<==? ,PRSI ,THAT-END>
+ <SETG THAT-END <>>)
+ (<==? ,PRSI ,THIS-END>
+ <SETG THIS-END <>>)
+ (ELSE
+ <TELL "It's not attached to the " D ,PRSI "." CR>
+ <RTRUE>)>
+ <TELL "Detached from the " D ,PRSI "." CR>)
+ (,THAT-END
+ <TELL "Detached from the " D ,THAT-END "." CR>
+ <SETG THAT-END <>>)
+ (,THIS-END
+ <TELL "Detached from the " D ,THIS-END "." CR>
+ <SETG THIS-END <>>)
+ (ELSE
+ <TELL "It's not attached to anything." CR>)>)>
+ <RTRUE>)
+ (<VERB? PUT DROP THROW GIVE PUT-ON>
+ <COND (<OR ,THIS-END ,THAT-END>
+ <TELL
+"You should detach it first." CR>)>)>>
+
+<GLOBAL DOOR-SOLVED? <>>
+
+<ROUTINE CORIOLIS ()
+ <COND (<VERB? DROP THROW>
+ <REMOVE ,PRSO>
+ <TELL
+"As the " D ,PRSO " leaves your hand, it is thrown into space by the rotation
+of the artifact." CR>)>>
+
+<ROUTINE RED-DOCK-FCN (RARG)
+ <COND (<==? .RARG ,M-BEG> <CORIOLIS>)
+ (<==? .RARG ,M-ENTER>
+ <SETG IN-ARTIFACT? <>>
+ <RFALSE>)
+ (<==? .RARG ,M-LOOK>
+ <TELL
+,COLOR-CODED "All around are strange
+protrusions, one of which looks like a hook for a safety line. The surface
+here is metallic, but gets stony further from the dock. On one side (\"Down\")
+is your ship, tethered securely to the surface of the artifact by thick
+silvery ropes. On the other (\"Up\") is a large dome with an airlock">
+ <COND (<FSET? ,RED-OUTER ,OPENBIT>
+ <TELL
+", which is open." CR>)
+ (T <TELL "." CR>)>)>>
+
+<ROUTINE BLACK-KEY-FCN ()
+ <COND (<AND <VERB? TAKE>
+ <IN? ,BLACK-KEY ,RELIEF>>
+ <FSET ,RED-OUTER ,OPENBIT>
+ <MOVE ,BLACK-KEY ,WINNER>
+ <SCORE-OBJ ,BLACK-KEY>
+ <SETG DOOR-SOLVED? T>
+ <TELL
+"When you take the black rod, the airlock door opens!" CR>)>>
+
+<ROUTINE RELIEF-FCN ()
+ <COND (<VERB? EXAMINE>
+ <COND (<NOT <IN? ,BUMP ,RED-DOCK>>
+ <TELL
+"The relief is no longer a relief. It is completely flattened out." CR>)
+ (ELSE
+ <TELL
+"A closer examination reveals that there are exactly ten circular bumps or
+columns on the sculpture: the first is large and centrally located, the
+second through tenth are smaller and scattered at various distances and
+orientations. As you go outward from the large bump
+in the center there are four small bumps, two rather large ones, two
+medium-sized ones, and then a small one again." CR>
+ <COND (<IN? ,BABY-BUMP ,HERE>
+ <TELL
+"There is also a tiny bump" ,ABOUT-SAME CR>)>)>
+ T)>>
+
+<ROUTINE INTNUM-FCN ()
+ <COND (<==? ,HERE ,RED-DOCK>
+ <COND (<==? ,PRSO ,INTNUM>
+ <PERFORM ,PRSA ,BUMP ,PRSI>
+ <RTRUE>)>)>>
+
+<ROUTINE ORDINAL (WRD)
+ <COND (<EQUAL? .WRD ,W?FIRST ,W?CENTER> 1)
+ (<==? .WRD ,W?SECOND> 2)
+ (<==? .WRD ,W?THIRD> 3)
+ (<==? .WRD ,W?FOURTH> 4)
+ (<==? .WRD ,W?FIFTH> 5)
+ (<==? .WRD ,W?SIXTH> 6)
+ (<==? .WRD ,W?SEVENTH> 7)
+ (<==? .WRD ,W?EIGHTH> 8)
+ (<==? .WRD ,W?NINTH> 9)
+ (<EQUAL? .WRD ,W?TENTH ,W?OUTER ,W?LAST> 10)
+ (T 0)>>
+
+<ROUTINE BUMP-FCN ("AUX" N)
+ <COND (<AND <VERB? PUSH RUB>
+ <EQUAL? ,PRSO ,BUMP ,BUMP-2 ,BABY-BUMP>>
+ <COND (<AND <EQUAL? ,PRSO ,BUMP ,BUMP-2>
+ <EQUAL? ,PRSI <> ,INTNUM>>
+ <COND (<EQUAL? ,PRSI ,INTNUM> T)
+ (<NOT ,P-ADJECTIVE>
+ <TELL "You didn't say which one." CR>
+ <RTRUE>)
+ (<SET N <ORDINAL ,P-ADJECTIVE>>
+ <SETG P-NUMBER .N>)
+ (T
+ <TELL "Lose, lose!" CR>
+ <RTRUE>)>)>
+ <COND (<OR <==? ,PRSO ,BABY-BUMP>
+ <AND <==? ,P-NUMBER 11>
+ <IN? ,BABY-BUMP ,HERE>>>
+ <REMOVE ,BABY-BUMP>
+ <REMOVE ,BUMP>
+ <REMOVE ,BUMP-2>
+ <MOVE ,BLACK-KEY ,RELIEF>
+ <PUTP ,RELIEF ,P?LDESC
+"The door is covered by a smooth pattern of silver hexagons.">
+ <TELL
+"The entire sculpture flattens out completely, except at the former
+location of the tiny bump, where a hexagonal rod of black crystal
+is extruded." CR>)
+ (<0? ,P-NUMBER>
+ <TELL "You must specify which one." CR>)
+ (<AND <==? ,P-NUMBER 4>
+ <NOT <IN? ,BABY-BUMP ,HERE>>>
+ <MOVE ,BABY-BUMP ,HERE>
+ <TELL
+"Nothing happens for a moment, then a tiny column made up of only one hexagon
+appears at" ,ABOUT-SAME CR>)
+ (ELSE
+ <REMOVE ,BABY-BUMP>
+ <REMOVE ,BUMP>
+ <REMOVE ,BUMP-2>
+ <PUTP ,RELIEF ,P?LDESC
+"The door is covered by a smooth pattern of silver hexagons.">
+ <TELL
+"All of the hexagons extend to full length, then retract into the surface,
+leaving the sculpture completely smooth." CR>)>)>>
+
+<GLOBAL ABOUT-SAME
+" about the same distance from the center as the first large bump.">
+
+<ROUTINE RED-DOORS-FCN ("AUX" DIR)
+ <COND (<VERB? THROUGH>
+ <COND (<==? ,HERE ,RED-LOCK>
+ <COND (<==? ,PRSO ,RED-INNER>
+ <SET DIR ,P?UP>)
+ (ELSE <SET DIR ,P?DOWN>)>)
+ (<==? ,PRSO ,RED-INNER>
+ <SET DIR ,P?DOWN>)
+ (ELSE <SET DIR ,P?UP>)>
+ <DO-WALK .DIR>
+ <RTRUE>)
+ (,DOOR-SOLVED?
+ <COND (<VERB? OPEN CLOSE>
+ <AIRLOCK-OPEN ,RED-INNER ,RED-OUTER ,RED-DOCK>)
+ (<VERB? LOOK-INSIDE>
+ <AIRLOCK-LOOK ,RED-INNER ,RED-THREE ,RED-DOCK>)>)
+ (<VERB? OPEN CLOSE>
+ <TELL "The airlock door won't budge." CR>)>>
+
+<ROUTINE BLUE-DOORS-FCN ("AUX" DIR)
+ <COND (<VERB? THROUGH>
+ <COND (<==? ,HERE ,BLUE-LOCK>
+ <COND (<==? ,PRSO ,BLUE-INNER>
+ <SET DIR ,P?UP>)
+ (ELSE <SET DIR ,P?DOWN>)>)
+ (<==? ,PRSO ,BLUE-INNER>
+ <SET DIR ,P?DOWN>)
+ (ELSE <SET DIR ,P?UP>)>
+ <DO-WALK .DIR>
+ <RTRUE>)
+ (<VERB? OPEN CLOSE>
+ <AIRLOCK-OPEN ,BLUE-INNER ,BLUE-OUTER ,BLUE-DOCK>)
+ (<VERB? LOOK-INSIDE>
+ <AIRLOCK-LOOK ,BLUE-INNER ,BLUE-THREE ,BLUE-DOCK>)>>
+
+<GLOBAL YELLOW-OPEN? <>>
+
+<ROUTINE YELLOW-DOORS-FCN ("AUX" DIR)
+ <COND (<NOT ,LIT> <TELL "It is too dark here to see." CR>)
+ (<VERB? THROUGH>
+ <COND (<==? ,HERE ,YELLOW-LOCK>
+ <COND (<==? ,PRSO ,YELLOW-INNER>
+ <SET DIR ,P?UP>)
+ (ELSE <SET DIR ,P?DOWN>)>)
+ (<==? ,PRSO ,YELLOW-INNER>
+ <SET DIR ,P?DOWN>)
+ (ELSE <SET DIR ,P?UP>)>
+ <DO-WALK .DIR>
+ <RTRUE>)
+ (<AND <==? ,PRSO ,YELLOW-OUTER>
+ <VERB? OPEN PUSH>
+ <NOT ,YELLOW-OPEN?>
+ <NOT <FSET? ,YELLOW-INNER ,OPENBIT>>>
+ <TELL
+"The door appears to be jammed. There may be debris outside blocking
+it. Perhaps if you pushed again." CR>
+ <SETG YELLOW-OPEN? T>)
+ (<VERB? OPEN CLOSE PUSH>
+ <AIRLOCK-OPEN ,YELLOW-INNER ,YELLOW-OUTER ,YELLOW-DOCK>)
+ (<VERB? LOOK-INSIDE>
+ <AIRLOCK-LOOK ,YELLOW-INNER ,YELLOW-THREE ,YELLOW-DOCK>)>>
+
+<ROUTINE YELLOW-DOCK-FCN (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"This dock area is severely scorched and damaged where other docks have rope
+housings. There was apparently a major explosion here, or possibly a
+chemically fueled rocket attempted to leave without taking proper precautions.
+There is a hook beside the airlock." CR>
+ <COND (<IN? ,SCORCHED-ALIEN ,YELLOW-DOCK-EDGE>
+ <TELL
+"Entangled in debris at the edge of the dock, to port, is what might be a
+body. It is out of reach from here." CR>)>
+ <RTRUE>)
+ (<==? .RARG ,M-BEG>
+ <BRODY>)
+ (<==? .RARG ,M-ENTER>
+ <SETG IN-ARTIFACT? <>>
+ <RFALSE>)>>
+
+<GLOBAL IN-ARTIFACT? <>>
+
+<ROUTINE BRODY ()
+ <COND (<VERB? LEAP>
+ <COND (<AND ,THIS-END ,THAT-END>
+ <TELL
+"You sail away into space as far as your safety line allows, and
+then back again." CR>)
+ (ELSE
+ <ENABLE <QUEUE I-SUFFOCATE 5>>
+ <TELL
+"You fly away into space like a super-hero. Unfortunately, you keep
+going indefinitely, the artifact dwindling beneath you. The view is nice,
+but eventually you will run out of air." CR>
+ <CRLF>
+ <GOTO ,OUTER-SPACE>)>)
+ (ELSE <CORIOLIS>)>>
+
+<ROUTINE YELLOW-DOCK-EXITS ()
+ <COND (<AND ,THIS-END ,THAT-END>
+ <TELL
+"You crawl across dock area, your magnetic boots overcoming the effect
+of centripetal force. The metal area they can cling to ends before you reach
+the edge of the dock, but thanks to your safety line you make it successfully
+to the tangle of debris." CR>
+ <CRLF>
+ ,YELLOW-DOCK-EDGE)
+ (ELSE
+ <TELL
+"You crawl across the dock area, your magnetic boots holding you safe.
+Unfortunately, the metallic area ends short of the tangle of debris. If you
+went further, you would be thrown into space by centripetal force." CR>
+ <RFALSE>)>>
+
+<ROUTINE YELLOW-DOCK-EDGE-FCN (RARG)
+ <COND (<==? .RARG ,M-BEG>
+ <BRODY>)
+ (<==? .RARG ,M-END>
+ <COND (<AND ,THIS-END ,THAT-END> <RFALSE>)
+ (ELSE
+ <ENABLE <QUEUE I-SUFFOCATE 5>>
+ <TELL
+"Now that you are no longer moored by the safety line, centripetal force
+throws you into space in a lovely trajectory which (as a matter of academic
+interest) looks curved from your perspective as the artifact rapidly rotates
+away under you." CR>
+ <CRLF>
+ <GOTO ,OUTER-SPACE>)>)>>
+
+<ROUTINE I-SUFFOCATE ()
+ <COND (<==? ,HERE ,OUTER-SPACE>
+ <JIGS-UP
+"You run out of air, dying an unpleasant death \"above\" the artifact.">)>>
+
+<ROUTINE SCORCHED-PSEUDO ()
+ <COND (<VERB? TAKE EXAMINE>
+ <TELL "It's too far away." CR>)>>
+
+<ROUTINE GREEN-DOORS-FCN ("AUX" DIR)
+ <COND (<VERB? THROUGH>
+ <COND (<==? ,HERE ,GREEN-LOCK>
+ <COND (<==? ,PRSO ,GREEN-INNER>
+ <SET DIR ,P?UP>)
+ (ELSE <SET DIR ,P?DOWN>)>)
+ (<==? ,PRSO ,GREEN-INNER>
+ <SET DIR ,P?DOWN>)
+ (ELSE <SET DIR ,P?UP>)>
+ <DO-WALK .DIR>
+ <RTRUE>)
+ (<VERB? OPEN CLOSE>
+ <AIRLOCK-OPEN ,GREEN-INNER ,GREEN-OUTER ,GREEN-DOCK>)
+ (<VERB? LOOK-INSIDE>
+ <AIRLOCK-LOOK ,GREEN-INNER ,GREEN-THREE ,GREEN-DOCK>)>>
+
+<ROUTINE AIRLOCK-OPEN (INNER OUTER OUTLOC)
+ <COND (<==? ,PRSO .INNER>
+ <COND (<VERB? OPEN PUSH>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <ALREADY "open">)
+ (<FSET? .OUTER ,OPENBIT>
+ <TELL
+"It refuses to open and a bright light flashes incessantly until
+you remove your hand from the door." CR>)
+ (ELSE
+ <DOOR-OPENS>)>)
+ (<NOT <FSET? ,PRSO ,OPENBIT>>
+ <ALREADY "closed">)
+ (ELSE
+ <DOOR-CLOSES>)>)
+ (<VERB? OPEN PUSH> ;"must be outer door, then"
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <ALREADY "open">)
+ (<FSET? .INNER ,OPENBIT>
+ <TELL
+"A bright light over the door flashes menacingly until you remove your
+hand." CR>)
+ (ELSE
+ <FSET ,PRSO ,OPENBIT>
+ <COND (<FSET? .OUTLOC ,SPACEBIT>
+ <VACUUM-HERE>
+ <CRLF>
+ <COND (<NOT ,SUIT-ON?>
+ <CRLF>
+ <JIGS-UP
+"Didn't they teach you anything in the Academy? You can't breathe
+vacuum! The process of dying is this way is very painful but at least
+relatively short.">)>)
+ (T <DOOR-OPENS>)>
+ T)>)
+ (<NOT <FSET? ,PRSO ,OPENBIT>>
+ <ALREADY "closed">)
+ (ELSE
+ <FCLEAR ,PRSO ,OPENBIT>
+ <AIR-HERE>)>>
+
+<ROUTINE IN-AIRLOCK? ()
+ <OR <EQUAL? ,HERE ,RED-LOCK ,GREEN-LOCK ,YELLOW-LOCK>
+ <EQUAL? ,HERE ,BLUE-LOCK ,SPACESHIP-AIRLOCK>>>
+
+<ROUTINE AIR-HERE ()
+ <TELL "The outer door closes">
+ <COND (<IN-AIRLOCK?>
+ <FCLEAR ,HERE ,SPACEBIT>
+ <TELL " and air rushes into the airlock">)>
+ <TELL "." CR>>
+
+<ROUTINE VACUUM-HERE ()
+ <TELL "The outer door opens">
+ <COND (<IN-AIRLOCK?>
+ <FSET ,HERE ,SPACEBIT>
+ <TELL " and air rushes out of the airlock">)>
+ <TELL ".">>
+
+<ROUTINE AIRLOCK-LOOK (INNER INNEXT OUTNEXT)
+ <COND (<NOT <FSET? ,PRSO ,OPENBIT>>
+ <TELL
+"The " D ,PRSO " is closed and there is no viewport." CR>)
+ (<==? ,PRSO .INNER>
+ <GO&LOOK .INNEXT>)
+ (ELSE <GO&LOOK .OUTNEXT>)>>
+
+<ROUTINE GO&LOOK (RM "AUX" OHERE OLIT (OSEEN <>))
+ #DECL ((RM) OBJECT)
+ <SET OHERE ,HERE>
+ <COND (<FSET? .OHERE ,TOUCHBIT>
+ <SET OSEEN T>)>
+ <SET OLIT ,LIT>
+ <SETG HERE .RM>
+ <SETG LIT <LIT? .RM>>
+ <PERFORM ,V?LOOK>
+ <COND (<NOT .OSEEN> <FCLEAR .OHERE ,TOUCHBIT>)>
+ <SETG HERE .OHERE>
+ <SETG LIT .OLIT>
+ T>
+
+<ROUTINE COUCH-FCN ("OPTIONAL" (RARG <>))
+ <COND (<NOT <==? ,HERE ,SPACESHIP-BRIDGE>>
+ <COND (<VERB? CLIMB-ON CLIMB-DOWN BOARD>
+ <TELL "That seat is taken...." CR>)
+ (T <EX-CHECK>)>)
+ (<AND <VERB? EXAMINE> <==? .RARG ,M-BEG> <==? ,PRSO ,COUCH>>
+ <DESCRIBE-SEAT-BELT>
+ <RTRUE>)
+ (<==? .RARG ,M-BEG>
+ <COND (<VERB? WALK>
+ <TELL "You'll have to stand up first." CR>)
+ (<AND <VERB? STAND DISEMBARK> ,SEAT-BELT?>
+ <TELL
+ "You must unfasten your seat belt first." CR>)
+ (<VERB? CLIMB-ON CLIMB-DOWN>
+ <PERFORM ,V?BOARD ,COUCH>
+ <RTRUE>)
+ (<AND <VERB? TAKE-OFF> <==? ,PRSO ,COUCH>>
+ <PERFORM ,V?DISEMBARK ,COUCH>
+ <RTRUE>)
+ (<VERB? TAKE>
+ <TELL "You can't reach it." CR>
+ <RTRUE>)>)
+ (<==? .RARG ,M-ENTER>
+ <DESCRIBE-SEAT-BELT>)>>
+
+<ROUTINE DESCRIBE-SEAT-BELT ()
+ <TELL "The couch has a seat belt which is currently ">
+ <COND (,SEAT-BELT? <TELL "fastened." CR>)
+ (ELSE <TELL "unfastened." CR>)>>
+
+<ROUTINE SEAT-BELT-FCN ()
+ <COND (<NOT <IN? ,WINNER ,COUCH>>
+ <TELL "You must sit down first." CR>)
+ (<VERB? TIE WEAR LOCK>
+ <COND (,SEAT-BELT? <TELL "It's already fastened." CR>)
+ (ELSE <SETG SEAT-BELT? T> <TELL "Click." CR>)>)
+ (<VERB? UNTIE TAKE-OFF OPEN UNLOCK REMOVE>
+ <COND (<NOT ,SEAT-BELT?>
+ <TELL "It's already unfastened." CR>)
+ (ELSE <SETG SEAT-BELT? <>> <TELL "Click." CR>)>)
+ (<VERB? EXAMINE>
+ <TELL "The seat belt is ">
+ <COND (,SEAT-BELT? <TELL "fastened." CR>)
+ (ELSE <TELL "unfastened." CR>)>)>>
+
+<ROUTINE BUREAU-PSEUDO ()
+ <COND (<VERB? OPEN LOOK-INSIDE>
+ <TELL "There is nothing in the bureau but some clothes." CR>)>>
+
+\
+
+"SUBTITLE PRIMITIVE ALIENS"
+
+<GLOBAL ALIENS-FRIENDLY? T>
+<GLOBAL ALIENS-DESCRIBED? <>>
+
+<ROUTINE VILLAGE-NW-EDGE-FCN (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"This is the edge of a populated area, growing denser as you move starboard.
+Primitive huts line the corridor, which is blocked ahead by a palisade built of
+mud and wood. An open gate, guarded by several spear-bearing creatures, leads
+into the structure. A small crowd of aliens has gathered to watch you." CR>
+ <COND (<NOT ,ALIENS-DESCRIBED?>
+ <SETG ALIENS-DESCRIBED? T>
+ <DESCRIBE-WEASELS>
+ <ENABLE <QUEUE I-CHIEF-APPEARS <+ 3 <RANDOM 3>>>>)>
+ <COND (,ALIENS-FRIENDLY?
+ <TELL
+"They gesture in a way intended to show friendship (they bare
+their huge razor-sharp teeth)." CR>
+ <COND (<NOT ,HUSTLED?>
+ <TELL
+"The smaller ones are hustled away, but almost immediately begin to sneak
+back." CR>)>)
+ (ELSE
+ <TELL
+"They stare at you with mingled awe and belligerence." CR>
+ <COND (<NOT ,HUSTLED?>
+ <TELL
+"The smaller ones are hustled away, leaving only the better-armed members
+of the tribe." CR>)>)>
+ <SETG HUSTLED? T>
+ <RTRUE>)
+ (<==? .RARG ,M-BEG>
+ <COND (<OR <AND <VERB? GIVE> <==? ,PRSI ,CHIEF>>
+ <AND <VERB? DROP> <IN? ,CHIEF ,HERE>>>
+ <GIVE-TO-CHIEF>)>)>>
+
+<ROUTINE PALISADE-FCN ()
+ <COND (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <SETG ALIENS-FRIENDLY? <>>
+ <TELL
+"The palisade smolders a bit, but is otherwise undamaged." CR>)
+ (<VERB? CLIMB-UP CLIMB-ON>
+ <TELL
+"The palisade in unclimbable from this side." CR>)>>
+
+<ROUTINE VILLAGE-FCN (RARG)
+ <COND (<==? .RARG ,M-BEG>
+ <COND (<AND <VERB? WALK>
+ <IN? ,SPACESUIT ,CHIEF>
+ <==? ,PRSO ,P?EAST>
+ <NOT <IN? ,CHIEF ,VILLAGE>>
+ <L? ,CHFOLLOW 2>>
+ <PERFORM ,V?FOLLOW ,CHIEF>
+ <RTRUE>)>)
+ (<==? .RARG ,M-ENTER>
+ <COND (<IN? ,SPACESUIT ,VILLAGE>
+ <REMOVE ,JUNK-SPACESUIT>
+ <MOVE ,SPACESUIT ,CHIEF>)>
+ <RFALSE>)>>
+
+<ROUTINE ENTER-WARREN ()
+ <COND (,ALIENS-FRIENDLY? ,MAZE)
+ (ELSE
+ <TELL
+"Hostile weasels bar your way." CR>
+ <RFALSE>)>>
+
+<ROUTINE GIVE-TO-CHIEF ()
+ <COND (<==? ,PRSO ,SPACESUIT>
+ <COND (,SUIT-ON? <RFALSE>)>
+ <MOVE ,JUNK-SPACESUIT ,HERE>
+ <FCLEAR ,JUNK-SPACESUIT ,NDESCBIT>
+ <MOVE ,SPACESUIT ,CHIEF>
+ <FSET ,SPACESUIT ,NDESCBIT>
+ <SETG THIS-END <>>
+ <SETG THAT-END <>>
+ <SETG SUIT-ON? <>>
+ <TELL
+"The chieftain removes his suit, and with surprisingly little difficulty dons
+yours. He is clearly delighted with the gift, and his people are truly
+impressed by his new wardrobe. He moves about, pointing at various objects
+(including some of his lesser wives and children) and glancing at you
+quizzically." CR>
+ <ENABLE <QUEUE I-CHIEF 2>>
+ <COND (,POINTED?
+ <TELL
+"He tries (somewhat sheepishly) to conceal the brown rod in the space suit,
+hoping you won't notice it." CR>)>
+ <RTRUE>)
+ (<NOT ,ALIENS-FRIENDLY?>
+ <TELL "He snarls at you, exposing razor-sharp teeth." CR>)
+ (<IN? ,SPACESUIT ,ADVENTURER>
+ <TELL
+"The chief refuses your gift but gazes hungrily at your space suit." CR>)
+ (<IN? ,SPACESUIT ,CHIEF>
+ <TELL
+"The chief considers the space suit to have been enough, and graciously
+refuses the gift." CR>)
+ (ELSE
+ <TELL
+"The chief looks pleased by the offer (as a token of your submission, no
+doubt), but turns it down." CR>)>>
+
+<GLOBAL HUSTLED? <>>
+
+<ROUTINE I-CHIEF-APPEARS ()
+ <COND (<==? ,HERE ,VILLAGE>
+ <FCLEAR ,GLOBAL-CHIEF ,INVISIBLE>
+ <MOVE ,CHIEF ,HERE>
+ <TELL
+"From down a passage between the hovels appears a large, almost
+all-grey alien." CR>
+ <COND (<IN? ,SPACESUIT ,CHIEF>
+ <TELL
+"He is wearing a human space suit and grinning cheerfully." CR>)
+ (ELSE
+ <TELL
+"He is dressed in the tattered remains of a space suit of alien manufacture.
+All that remains is the helmet and scraps of the body material." CR>)>
+ <COND (<IN? ,BROWN-KEY ,CHIEF>
+ <TELL
+"Around his neck hangs a brown crystal rod!" CR>)>
+ <TELL "The crowd parts to let him through." CR>
+ <COND (<IN? ,SPACESUIT ,ADVENTURER>
+ <TELL
+"He looks at you in awe, staring at your space suit. He points to it,
+and then at himself, and brandishes his spear menacingly." CR>)
+ (,ALIENS-FRIENDLY?
+ <TELL "He greets you warmly." CR>)>
+ <ENABLE <QUEUE I-CHIEF 2>>)
+ (ELSE
+ <COND (<NOT ,ACTIVITY?>
+ <SETG ACTIVITY? T>
+ <COND (<EQUAL? ,HERE ,VILLAGE ,VILLAGE-NW-EDGE>
+ <TELL
+"There seems to be activity in the village center." CR>)>)>
+ <ENABLE <QUEUE I-CHIEF-APPEARS 1>>)>>
+
+<GLOBAL ACTIVITY? <>>
+
+<ROUTINE DESCRIBE-WEASELS ()
+ <TELL
+"They resemble human-sized weasels in that their bodies are thin,
+flexible, and covered with several colors of hair. There are all sizes
+and ages, and the stronger ones are armed with spears, knives, and other
+nasty hardware." CR>>
+
+<ROUTINE ALIENS-FCN ()
+ <COND (<AND <IN? ,CHIEF ,HERE> <NOT <VERB? ZAP ATTACK>>>
+ <COND (<==? ,ALIENS ,WINNER>
+ <SETG WINNER ,CHIEF>
+ <PERFORM ,PRSA ,PRSO ,PRSI>)
+ (<==? ,PRSO ,CHIEF>
+ <PERFORM ,PRSA ,CHIEF ,PRSI>)
+ (<==? ,PRSI ,CHIEF>
+ <PERFORM ,PRSA ,PRSO ,CHIEF>)
+ (ELSE <TELL "You are ignored." CR>)>
+ <RTRUE>)
+ (<VERB? SMILE>
+ <COND (,ALIENS-FRIENDLY? <TELL "It smiles back." CR>)
+ (T <TELL "It snarls at you." CR>)>)
+ (<VERB? TELL>
+ <SETG P-CONT <>>
+ <TELL "The aliens pay no heed." CR>)
+ (<==? ,HERE ,GRASSLAND-2>
+ <COND (<G? ,HUNTER-COUNT 0>
+ <COND (<NOT <VERB? FIND EXAMINE>>
+ <SPOILED-HUNT>
+ <COND (<VERB? ZAP>
+ <CRLF>
+ <ZAP-ALIENS>)>
+ <RTRUE>)>)
+ (ELSE <TELL "There are no aliens here." CR>)>)
+ (<VERB? ZAP> <ZAP-ALIENS>)
+ (<VERB? FOLLOW> <TELL "They aren't going anywhere." CR>)
+ (<VERB? ATTACK KILL MUNG THROW>
+ <SETG ALIENS-FRIENDLY? <>>
+ <TELL "The weasels shy away in fright." CR>)>>
+
+<ROUTINE ZAP-ALIENS ("OPTIONAL" (ZAP-CHIEF? <>))
+ <SETG ALIENS-FRIENDLY? <>>
+ <COND (<0? ,ZAP-CNT>
+ <TELL
+"Nothing happens. Emboldened, the aliens surround you." CR>)
+ (<FIRST? ,ZAP-GUN>
+ <ZAP-GUN-FCN>
+ <TELL "The aliens are impressed and terrified." CR>)
+ (ELSE
+ <SETG ZAP-CNT <- ,ZAP-CNT 1>>
+ <COND (<AND .ZAP-CHIEF? <IN? ,CHIEF ,HERE>>
+ <TELL "The chief is">
+ <DISABLE <INT I-CHIEF>>
+ <REMOVE ,CHIEF>)
+ (ELSE <TELL "Many aliens are">)>
+ <TELL
+" disintegrated, in the best tradition of the 1930s pulps.
+The remainder of the tribe attacks you, seeking revenge. You fire the
+ray gun at them. ">
+ <COND (<G? ,ZAP-CNT 0>
+ <TELL
+"It fires " <GET ,ZAP-STRS <- ,ZAP-CNT 1>> ". Each time
+many aliens are dispatched, but more appear." CR>)
+ (ELSE <TELL "Nothing happens." CR>)>
+ <SETG ZAP-CNT 0>
+ <JIGS-UP "Ultimately, you are overwhelmed.">)>>
+
+<GLOBAL ZAP-STRS <TABLE "once" "twice" "three times">>
+
+<ROUTINE CHIEF-FCN ("OPTIONAL" (RARG <>) "AUX" SUIT?)
+ <COND (<==? .RARG ,M-OBJDESC>
+ <TELL "The chief alien">
+ <COND (<SET SUIT? <IN? ,JUNK-SPACESUIT ,CHIEF>>
+ <TELL
+", wearing a tattered space suit">)
+ (<SET SUIT? <IN? ,SPACESUIT ,CHIEF>>
+ <TELL
+", wearing your space suit">)>
+ <COND (<IN? ,BROWN-KEY ,CHIEF>
+ <TELL " and a brown crystal rod,">)
+ (.SUIT? <TELL ",">)>
+ <TELL " is here." CR>)
+ (<VERB? FOLLOW>
+ <COND (<IN? ,CHIEF ,HERE>
+ <TELL
+"You can't follow him until he leaves..." CR>)
+ (<L? ,CHFOLLOW 2>
+ <SETG CHFOLLOW 0>
+ <SETG CHPATH <- ,CHPATH 1>>
+ <COND (<0? ,CHPATH>
+ <ENABLE <QUEUE I-CHIEF 1>>
+ <MOVE ,CHIEF ,GREEN-THREE>
+ <GOTO ,GREEN-THREE>)
+ (ELSE
+ <MOVE ,CHIEF ,MAZE>
+ <GOTO ,MAZE>)>)
+ (<==? ,HERE ,VILLAGE>
+ <DO-WALK ,P?EAST>
+ <RTRUE>)
+ (ELSE
+ <TELL
+"You have lost track of him in the maze of twists and turns." CR>)>
+ <RTRUE>)
+ (<NOT <IN? ,CHIEF ,HERE>>
+ <TELL "There is no chief here." CR>)
+ (<OR <VERB? TELL HELLO>
+ <AND <==? ,CHIEF ,WINNER> <IN? ,CHIEF ,HERE>>>
+ <SETG P-CONT <>>
+ <TELL
+"The chief listens intently, then responds in his own language, probably
+saying something like \"That's Greek to me.\"" CR>)
+ (<VERB? EXAMINE>
+ <TELL
+"The chief is an perfect example of barbarian dignity and splendor.">
+ <COND (<IN? ,SPACESUIT ,CHIEF>
+ <TELL " He is wearing your space suit with the same
+dignity and aplomb which which a dandy would wear his evening clothes.">)
+ (<IN? ,BROWN-KEY ,CHIEF>
+ <TELL
+" Tied around his neck with a string is a brown crystal rod.">)>
+ <CRLF>)
+ (<VERB? SMILE>
+ <COND (,ALIENS-FRIENDLY? <TELL "He smiles back." CR>)
+ (T <TELL "He snarls at you." CR>)>)
+ (<VERB? ZAP> <ZAP-ALIENS T>)
+ (<VERB? ATTACK MUNG>
+ <SETG ALIENS-FRIENDLY? <>>
+ <RFALSE>)
+ (<VERB? POINT> <TELL "The chief seems puzzled." CR>)
+ (<VERB? GIVE> <GIVE-TO-CHIEF>)>>
+
+<GLOBAL POINTED? <>>
+
+<ROUTINE BROWN-KEY-FCN ()
+ <COND (<IN? ,BROWN-KEY ,CHIEF>
+ <COND (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <PERFORM ,V?ZAP ,CHIEF>
+ <RTRUE>)
+ (<VERB? TAKE>
+ <TELL
+"The chief jumps back and waves his spear at you angrily!" CR>)
+ (<VERB? POINT>
+ <SETG POINTED? T>
+ <COND (<IN? ,SPACESUIT ,CHIEF>
+ <FCLEAR ,BROWN-KEY ,NDESCBIT>
+ <SCORE-OBJ ,BROWN-KEY>
+ <MOVE ,BROWN-KEY ,ADVENTURER>
+ <SETG ALIENS-FRIENDLY? T>
+ <TELL
+"The chief hesitates, understanding you all too well, then reluctantly
+removes the rod from its string and hands it to you." CR>)
+ (<IN? ,SPACESUIT ,ADVENTURER>
+ <TELL
+"The chief looks at you shrewdly, then points at your space suit." CR>)
+ (ELSE
+ <TELL
+"The chief is offended." CR>)>)>)>>
+
+<ROUTINE WIFE-PSEUDO ()
+ <COND (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <SETG ALIENS-FRIENDLY? <>>
+ <TELL
+"She is totally destroyed by the blast! Fortunately for the chief, he has
+many wives, and this was a lesser one." CR>)
+ (<VERB? TAKE POINT>
+ <COND (<NOT <IN? ,BROWN-KEY ,CHIEF>> <RFALSE>)
+ (<IN? ,SPACESUIT ,CHIEF>
+ <TELL
+"She snarls at her husband and grimaces at you. The chief waves his hands as
+if to say \"Never mind.\"" CR>)>)>>
+
+<ROUTINE CHILD-PSEUDO ()
+ <COND (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <SETG ALIENS-FRIENDLY? <>>
+ <TELL
+"The agile young weasel dodges the blast, laughing at you." CR>)
+ (<VERB? TAKE POINT>
+ <COND (<NOT <IN? ,BROWN-KEY ,CHIEF>> <RFALSE>)
+ (<IN? ,SPACESUIT ,CHIEF>
+ <TELL
+"The child sticks its tongue at you and scampers off. Other young weasels
+caper about, making noises that sound much like laughter." CR>)>)>>
+
+<ROUTINE MAZE-FCN (RARG)
+ <FCLEAR ,MAZE ,TOUCHBIT>
+ <COND (<IN? ,CHIEF ,VILLAGE>
+ <QUEUE I-CHIEF 0>
+ <REMOVE ,CHIEF>)>
+ <COND (<==? .RARG ,M-BEG>
+ <COND (<AND <VERB? WALK> <PROB 5>>
+ <GOTO ,VILLAGE>)
+ (<VERB? DROP>
+ <TELL
+"As soon as you drop the " D ,PRSO ", one of the smaller creatures rushes
+over and grabs it! He charges out of the room, squeaking with glee." CR>
+ <COND (<PROB 25>
+ <TELL
+"With a roar, an older weasel grabs the young one before it escapes and cuffs
+it soundly about the ears. The elder creature hands you back the " D ,PRSO ",
+grinning and grunting in a friendly way." CR>)
+ (ELSE <REMOVE ,PRSO>)>)>)
+ (<==? .RARG ,M-ENTER>
+ <ROB ,HERE ,THRONE-ROOM>)>>
+
+<GLOBAL CHFOLLOW 2> ;"can't follow him initially"
+<GLOBAL CHWAIT 0> ;"how long chief waiting for trade"
+<GLOBAL CHPATH 0> ;"how many moves left in maze"
+
+<ROUTINE I-CHIEF ("AUX" (OLDP <LOC ,CHIEF>))
+ <COND (<AND <IN? ,CHIEF ,VILLAGE>
+ <IN? ,BROWN-KEY ,CHIEF>
+ <NOT <G? ,CHWAIT 10>>>
+ <SETG CHWAIT <+ ,CHWAIT 1>>
+ <COND (<IN? ,CHIEF ,HERE>
+ <TELL
+"The chief gestures impatiently at ">
+ <COND (<OR <IN? ,SPACESUIT ,ADVENTURER>
+ <IN? ,SPACESUIT ,HERE>>
+ <TELL "your space suit.">)
+ (ELSE
+ <TELL "various objects.">)>
+ <CRLF>)>
+ <ENABLE <QUEUE I-CHIEF 2>>
+ <RTRUE>)
+ (<IN? ,CHIEF ,GREEN-THREE>
+ <TELL
+"The chief grins, exposing his knife-sharp teeth, and points portentiously at
+the ladder. He curls up on the dirt floor and waits, watching you with
+interest." CR>
+ <DISABLE <INT I-CHIEF>>
+ <RTRUE>)>
+ <REMOVE ,CHIEF>
+ <SETG CHFOLLOW <+ ,CHFOLLOW 1>>
+ <COND (<G? ,CHWAIT 10> ;"chief tired of waiting"
+ <COND (<IN? ,WINNER .OLDP>
+ <TELL
+"The chief appears insulted and disappears into the warren. The others appear
+to be upset." CR>)>
+ <SETG ALIENS-FRIENDLY? <>>
+ <SETG CHFOLLOW 2>
+ <RTRUE> ;"chomped. don't reenable")>
+ <COND (<IN? ,WINNER .OLDP>
+ <SETG CHFOLLOW 0>
+ <COND (<==? .OLDP ,VILLAGE>
+ <SETG CHPATH <+ 5 <RANDOM 5>>>)>
+ <TELL <PICK-ONE ,CHIEF-MOVES> CR>)
+ (<IN? ,WINNER ,MAZE>
+ <COND (<PROB 5>
+ <MOVE ,CHIEF ,MAZE>
+ <SETG CHFOLLOW 0>
+ <TELL
+"The chief enters the room and seems surprised but pleased to see you." CR>)
+ (ELSE <SETG CHWAIT <+ ,CHWAIT 1>>)>)>
+ <ENABLE <QUEUE I-CHIEF
+ <COND (<PROB 75> 1)(ELSE 2)>>>
+ <RTRUE>>
+
+<GLOBAL CHIEF-MOVES <LTABLE
+"The chief slips through an opening and disappears."
+"Dodging several youngsters, the chief enters a hovel."
+"The chief slips through a crowd, which parts deferentially."
+"Glancing back at you, the chief leaves the room.">>
+
+<ROUTINE SKELETON-FCN ()
+ <COND (<VERB? TAKE RUB MOVE>
+ <COND (<FSET? ,VIOLET-KEY ,INVISIBLE>
+ <MOVE ,VIOLET-KEY ,THRONE-ROOM>
+ <FCLEAR ,VIOLET-KEY ,INVISIBLE>
+ <THIS-IS-IT ,VIOLET-KEY>
+ <TELL
+"When you touch the skeleton, its arm falls off the armrest. Something
+slides out of the space suit and onto the floor." CR>)
+ (ELSE
+ <SETG ALIENS-FRIENDLY? <>>
+ <JIGS-UP
+"This time, the skeleton falls apart with a horrendous clatter. In a moment,
+a head peeks through the door. It's a weasel! He roars, and soon dozens of
+the aliens surround you. The rest is, alas, too gory to describe.">)>)
+ (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <SETG ALIENS-FRIENDLY? <>>
+ <JIGS-UP
+"The skeleton is totally destroyed by the blast! The aliens, hearing it,
+rush in and overwhelm you for desecrating their sacred place.">)>>
+
+<GLOBAL CAUGHT? <>>
+
+<ROUTINE ITS-CLOSED (OBJ)
+ <TELL "The " D .OBJ " is closed." CR>
+ <THIS-IS-IT .OBJ>
+ <RFALSE>>
+
+<ROUTINE GREEN-LOCK-EXIT ()
+ <COND (<NOT <FSET? ,GREEN-INNER ,OPENBIT>>
+ <ITS-CLOSED ,GREEN-INNER>)
+ (<FSET? ,VIOLET-KEY ,INVISIBLE> ,GREEN-THREE)
+ (,CAUGHT?
+ <TELL "Outraged aliens bar your way." CR>
+ <RFALSE>)
+ (ELSE
+ <ALIEN-GUARDS>
+ <RFALSE>)>>
+
+<ROUTINE GREEN-THREE-FCN (RARG)
+ <COND (<==? .RARG ,M-ENTER>
+ <COND (<NOT <FSET? ,VIOLET-KEY ,INVISIBLE>>
+ <ALIEN-GUARDS>
+ <RFATAL>)>)>>
+
+<ROUTINE ALIEN-GUARDS ()
+ <SETG CAUGHT? T>
+ <SETG ALIENS-FRIENDLY? <>>
+ <REMOVE ,VIOLET-KEY>
+ <JIGS-UP
+"As you re-enter the warren an alien approaches, spear in hand. Initially he
+looks friendly but becomes suspicious and rushes past you into the ship. There
+is a loud roar as he realizes you have desecrated the altar! Other aliens
+surround you, spears at the ready.">
+ <RFATAL>>
+
+<ROUTINE NEST-CAGE-FCN (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"The force projectors here aren't working, but the cage is nonetheless
+inhabited by many creatures who are crosses between a rat and an ant. They
+are multi-legged with chitinous shells and a pincer arrangement for a mouth,
+but they have long ratlike tails and sparse tufts of hair. Some of them are
+armed with tiny spears and walk precariously on their hind legs.">
+ <COND (<IN? ,NEST ,NEST-CAGE>
+ <TELL
+" In one corner is a very large mud and stick nest.">
+ <COND (<FIRST? ,NEST>
+ <TELL
+" The nest is constructed of all sorts of odds and ends, including ">
+ <PRINT-CONTENTS ,NEST>
+ <TELL ".">
+ <COND (<IN? ,RED-KEY ,NEST>
+ <TELL
+" The rod is embedded in the mud near one of the entrances of the nest.">)>)>)
+ (<IN? ,SMASHED-NEST ,NEST-CAGE>
+ <TELL
+" In one corner is a ruined nest which has been broken into many
+smaller pieces.">
+ <COND (<FIRST? ,SMASHED-NEST>
+ <TELL
+" Resting among the fragments of the nest can be seen ">
+ <PRINT-CONTENTS ,SMASHED-NEST>
+ <TELL ".">)>)>
+ <COND (,RATS-MAD?
+ <TELL
+" The rat-ants are extremely agitated about your presence, and a detail
+follows you just out of reach, hissing and clicking their mandibles.">)>
+ <CRLF>)>>
+
+<GLOBAL RATS-MAD? <>>
+
+<ROUTINE RAT-ANT-FCN ()
+ <COND (<VERB? TELL>
+ <TELL "The rat-ant ignores you." CR>
+ <SETG P-CONT <>>
+ <RTRUE>)
+ (<VERB? EXAMINE>
+ <TELL
+"The rat-ant looks like a cross between a rat and an ant. They have
+chitinous shells, mandibles, and exhibit an ant-like social order. They also
+have hair, bear live young, and are roughly the size of rats. They have a
+crude intelligence, evidenced by the spears the warrior caste carries. The
+cage has many rat-ants of varying sizes, ages, and social roles." CR>)
+ (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <SETG RATS-MAD? T>
+ <TELL
+"Several rat-ant warriors are reduced to ash, but many more rush out to
+replace them, and these look mad!" CR>)
+ (<VERB? MUNG>
+ <SETG RATS-MAD? T>
+ <TELL
+"The rat-ants become ferocious, rushing about clicking their mandibles
+and squeaking." CR>)
+ (<AND <VERB? GIVE> <==? ,PRSI ,RAT-ANT>>
+ <FSET ,PRSO ,NDESCBIT>
+ <MOVE ,PRSO <COND (<IN? ,NEST ,HERE> ,NEST)
+ (<IN? ,SMASHED-NEST ,HERE> ,SMASHED-NEST)
+ (T
+ <TELL
+"The rat-ants ignore you in their grief." CR>
+ <RTRUE>)>>
+ <TELL
+"A rat-ant takes the " D ,PRSO " and incorporates it into the nest." CR>)>>
+
+<ROUTINE NEST-FCN ("AUX" (TOOL <>))
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The nest is a jerry-built construction of odds and ends precariously stuck
+together. Rat-ants swarm all over it." CR>)
+ (<VERB? KICK>
+ <TELL
+"Rat-ants nip at your toes and prevent it." CR>)
+ (<OR <AND <VERB? MUNG>
+ <==? ,PRSO ,NEST>
+ ,PRSI>
+ <AND <VERB? THROW>
+ <==? ,PRSI ,NEST>
+ ,PRSO>>
+ <COND (<VERB? MUNG> <SET TOOL ,PRSI>)
+ (ELSE <SET TOOL ,PRSO>)>
+ <COND (<==? .TOOL ,HANDS>
+ <TELL
+"Rat-ants snap at you with their nasty sharp mandibles." CR>
+ <RTRUE>)
+ (<NOT <IN? .TOOL ,WINNER>>
+ <DONT-HAVE .TOOL>
+ <RTRUE>)
+ (<G? <GETP .TOOL ,P?SIZE> 5>
+ <FSET .TOOL ,NDESCBIT>
+ <MOVE .TOOL ,SMASHED-NEST>
+ <COND (<IN? ,RED-KEY ,NEST>
+ <FSET ,RED-KEY ,TOUCHBIT>
+ <FSET ,RED-KEY ,NDESCBIT>
+ <MOVE ,RED-KEY ,SMASHED-NEST>)>
+ <MOVE ,SMASHED-NEST ,NEST-CAGE>
+ <ROB ,NEST ,SMASHED-NEST T>
+ <REMOVE ,NEST>
+ <ENABLE <QUEUE I-NEST 15>>
+ <TELL
+"The nest smashes into fragments and the rat-ants stop dead in their tracks!
+They frantically evacuate the nest and immediately begin constructing a new
+nest at the opposite end of the cage. Rat-ant babies are being carried across
+the cage, and warriors watch you suspiciously." CR>)
+ (ELSE
+ <FSET .TOOL ,NDESCBIT>
+ <MOVE .TOOL ,NEST>
+ <TELL
+"The " D .TOOL " doesn't damage the nest very much, and in fact a
+rat-ant quickly incorporates it into the nest." CR>)>)
+ (<VERB? ZAP>
+ <REMOVE ,NEST>
+ <DISABLE <INT I-NEST>>
+ <TELL
+"The nest and all it contains is destroyed." CR>)>>
+
+<ROUTINE I-NEST ()
+ <MOVE ,NEST ,NEST-CAGE>
+ <ROB ,SMASHED-NEST ,NEST T>
+ <ROB ,NEST-CAGE ,NEST T>
+ <REMOVE ,SMASHED-NEST>
+ <COND (<==? ,HERE ,NEST-CAGE>
+ <TELL
+"The rat-ants have completed their new nest, frugally incorporating all
+the materials from the old nest. They leave a few guards to
+watch you while the others retire inside for a well-earned rest." CR>)>>
+
+<ROUTINE NEST-CONT ()
+ <COND (<VERB? TAKE>
+ <TELL
+"As you reach for the " D ,PRSO ", a rat-ant pokes its head out of the nest
+and snaps at you with its needle-sharp mandibles. You draw back just in
+time." CR>)>>
+
+<ROUTINE SMASHED-NEST-CONT ()
+ <COND (<VERB? TAKE>
+ <FCLEAR ,PRSO ,NDESCBIT>
+ <>)>>
+
+<GLOBAL MELTED? <>>
+<GLOBAL FRIED? <>>
+<GLOBAL SWITCH-ON? <>>
+<GLOBAL GOT-KEY? <>>
+
+<ROUTINE PANEL-FCN ()
+ <COND (<AND <VERB? OPEN>
+ <NOT <FSET? ,PANEL ,OPENBIT>>>
+ <FSET ,PANEL ,OPENBIT>
+ <TELL
+"Opening the access panel reveals rack upon rack of metallic cards.">
+ <COND (<IN? ,CARD ,SLOT>
+ <TELL
+" All the slots have cards in them." CR>)
+ (ELSE
+ <TELL
+" There is one slot that has no card in it." CR>)>)>>
+
+<ROUTINE SLOT-FCN ()
+ <COND (<VERB? PUT>
+ <COND (<==? ,PRSO ,CARD>
+ <COND (<IN? ,CARD ,SLOT>
+ <TELL "It's already there." CR>)
+ (ELSE
+ <MOVE ,CARD ,SLOT>
+ <TELL
+"The card slides snugly into the slot.">
+ <COND (,SWITCH-ON?
+ <SETG FRIED? T>
+ <ENABLE <QUEUE I-MELTDOWN 2>>
+ <TELL
+" Almost immediately the smell of burning components assaults your nostrils,
+and smoke pours from the card.">)>
+ <CRLF>
+ <RTRUE>)>)
+ (ELSE
+ <WONT-FIT>)>)>>
+
+<ROUTINE I-MELTDOWN ()
+ <COND (,SWITCH-ON?
+ <SETG MELTED? T>
+ <SETG SWITCH-ON? <>>
+ <REMOVE ,CARD>
+ <TELL
+"The computer has now been completely fried by this electrical fire.
+Congratulations!" CR>)>>
+
+\
+
+"SUBTITLE WEAPONS DECK AND ZAP GUN"
+
+<GLOBAL ZAP-CNT 3>
+<GLOBAL ZAP-NUMS <LTABLE "one" "two" "three" "four">>
+
+"use CAN-ZAP? to do right thing in frobs that want to handle being zapped."
+
+<ROUTINE CAN-ZAP? ()
+ <COND (<OR <0? ,ZAP-CNT> <IN? ,SILVER-KEY ,ZAP-GUN>>
+ <RFALSE>)
+ (ELSE
+ <SETG ZAP-CNT <- ,ZAP-CNT 1>>
+ <RTRUE>)>>
+
+<ROUTINE ZAP-GUN-FCN ("AUX" I)
+ <SET I <FIRST? ,ZAP-GUN>>
+ <COND (<VERB? EXAMINE>
+ <TELL
+"It looks like the heavy duty model. It's got quite a bit of heft to it, and
+you really need two hands to aim it properly. The barrel is long and festooned
+with strange knobs and antennae. There is a charge indicator which is
+unfortunately unreadable." CR>)
+ (<VERB? OPEN> <TELL "You can't open that." CR>)
+ (<VERB? LOOK-INSIDE>
+ <COND (.I
+ <FSET ,ZAP-GUN ,OPENBIT>
+ <TELL "In the barrel is a " D .I "!" CR>
+ <SCORE-OBJ .I>
+ <RTRUE>)
+ (ELSE <TELL "There is nothing inside the barrel." CR>)>)
+ (<AND <VERB? SHAKE> .I>
+ <TELL "There is something loose inside it." CR>)
+ (<AND <VERB? PUT> <==? ,ZAP-GUN ,PRSI>>
+ <COND (.I <TELL "There is already something inside it." CR>)
+ (<NOT <FSET? ,PRSO ,KEYBIT>>
+ <WONT-FIT>)>)
+ (<VERB? POINT>
+ <TELL "Why don't you just fire it instead?" CR>)
+ (<VERB? MUNG ATTACK>
+ <TELL
+"Firing the ray gun is more efficient than smashing things with it." CR>)
+ (<VERB? ZAP>
+ <COND (<NOT <IN? ,ZAP-GUN ,WINNER>>
+ <TELL "You are firing it by mental force, I assume?" CR>
+ <RTRUE>)
+ (<==? ,ZAP-CNT 0>
+ <TELL "\"Click.\"" CR>
+ <RTRUE>)>
+ <SETG ZAP-CNT <- ,ZAP-CNT 1>>
+ <COND (.I
+ <REMOVE .I>
+ <SETG ZAP-CNT <- ,ZAP-CNT 1>>
+ <TELL
+"A giant blast">
+ <COND (<==? .I ,SILVER-KEY>
+ <TELL " of silvery rays">)>
+ <TELL " issues from the barrel, but it doesn't
+go very far. In fact, there is a secondary explosion about a foot from
+the barrel, scattering dust motes in the air. There is almost no
+recoil: instead the gun vibrated almost painfully. This felt like a
+misfire." CR>)
+ (<FSET? ,HERE ,RAIRBIT> <JATO>)
+ (<NOT ,PRSI>
+ <TELL
+"A giant blast of searing orange rays issues from the barrel, and the
+recoil knocks you flat on your back. Fortunately no one was standing
+in front of you or it would have been curtains." CR>)
+ (<EQUAL? ,PRSI ,ME ,HANDS>
+ <ROB ,WINNER>
+ <JIGS-UP
+"If you say so... The blast destroys you and your possessions so quickly
+there is no point in even describing the carnage.">)
+ (<==? ,PRSI ,ZAP-GUN>
+ <TELL
+"That would involve a higher technology than even the builders of the
+ray gun possessed." CR>)
+ (<FSET? ,PRSI ,VILLAIN>
+ <REMOVE ,PRSI>
+ <TELL
+"A mighty wash of orange rays and smoke covers the " D ,PRSI ". The powerful
+blast knocks you down as the poor " D ,PRSI " is utterly disintegrated." CR>)
+ (<IN? ,PRSI ,WINNER>
+ <ROB ,WINNER>
+ <TELL
+"A huge explosion of orange rays destroys the " D ,PRSI " utterly." CR>
+ <JIGS-UP
+"Unfortunately, that requires firing so close that the blast destroys
+you and your possessions as well.">)
+ (<OR <FSET? ,PRSI ,TAKEBIT> <FSET? ,PRSI ,VICBIT>>
+ <REMOVE ,PRSI>
+ <TELL
+"There is a horrendous explosion from the barrel of the ray gun, and a huge
+gout of orange rays envelops the " D ,PRSI ". You are knocked spinning by the
+recoil, and when you recover, nothing is left of the " D ,PRSI " but a tiny
+drift of dust." CR>)
+ (ELSE
+ <TELL
+"An explosion of orange rays sweeps over the " D ,PRSI ", but when the
+smoke clears, it is still there (though perhaps a bit singed)." CR>)>)
+ (<AND <VERB? KILL MUNG ATTACK>
+ <==? ,ZAP-GUN ,PRSI>>
+ <PERFORM ,V?ZAP ,PRSI ,PRSO>
+ <RTRUE>)>>
+
+\
+
+"SUBTITLE INSIDE THE CYLINDER"
+
+<ROUTINE TREE-FCN ()
+ <COND (<VERB? CLIMB-UP CLIMB-ON CLIMB-FOO> <DO-WALK ,P?UP> <RTRUE>)
+ (<EQUAL? ,HERE ,SCRUB ,SCRUB-2> <RFALSE>)
+ (<VERB? CLIMB-DOWN> <DO-WALK ,P?DOWN> <RTRUE>)>>
+
+<ROUTINE UP-A-TREE-EXIT ()
+ <COND (<OR <IN? ,SPACESUIT ,WINNER>
+ <IN? ,JUNK-SPACESUIT ,WINNER>>
+ <TELL "You can't climb with that bulky suit." CR>
+ <RFALSE>)
+ (ELSE ,UP-A-TREE)>>
+
+<ROUTINE UP-A-TREE-FCN (RARG)
+ <COND (<==? .RARG ,M-BEG>
+ <COND (<VERB? DROP THROW>
+ <MOVE ,PRSO ,BASE-OF-TREE>
+ <TELL
+"The " D ,PRSO " drops out of sight." CR>)
+ (<VERB? FLY>
+ <JIGS-UP
+"You aren't a bird, so you plummet rather than soar.">)
+ (<VERB? LEAP>
+ <JIGS-UP
+"Gravity is low here, but not that low, so your jump is fatal.">)>)>>
+
+<ROUTINE TREETOP-FCN (RARG)
+ <COND (<==? .RARG ,M-BEG>
+ <COND (<VERB? DROP THROW>
+ <MOVE ,PRSO ,BASE-OF-TREE>
+ <TELL
+"The " D ,PRSO " drops out of sight." CR>)
+ (<VERB? FLY>
+ <JIGS-UP
+"You aren't a bird, so you plummet rather than soar.">)
+ (<VERB? LEAP>
+ <TELL
+"Gravity is almost non-existent here, so your jump easily carries
+you to the hatch of the drive bubble." CR>
+ <CRLF>
+ <GOTO ,DRIVE-BUBBLE-ENTRANCE>)>)>>
+
+<ROUTINE DRIVE-BUBBLE-ENTRANCE-FCN (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"You are floating (clinging?) outside the drive bubble, a crystalline
+half-sphere covering the aft end of the artifact's axis of rotation.
+Small knobs like handholds lead up the surface of the bubble, away from the
+end of the cylinder. The drive bubble is transparent and through it you can
+see the controls for the main engines of the artifact, which must be aft of
+here. The only way in is a hatch which is ">
+ <COND (<FSET? ,DRIVE-BUBBLE-HATCH ,OPENBIT>
+ <TELL "open.">)
+ (ELSE <TELL "closed.">)>
+ <TELL " Beside the hatch is a silver slot">
+ <COND (<IN? ,SILVER-KEY ,SILVER-SLOT>
+ <TELL " containing a silver rod">)>
+ <TELL "." CR>)
+ (<==? .RARG ,M-BEG>
+ <COND (<VERB? DROP THROW> <BOMBS-AWAY>)
+ (ELSE
+ <SWAN-DIVE ,DRIVE-BUBBLE>)>)>>
+
+<ROUTINE SWAN-DIVE (BUB)
+ <COND (<OR <VERB? LEAP>
+ <AND <VERB? PUSH> <==? ,PRSO .BUB>>>
+ <JIGS-UP
+"Gravity is very light here and you practically zoom into the air.
+Unfortunately gravity is not entirely non-existent, so eventually you begin
+to fall, faster and faster, in a lovely curve produced by the rotation of the
+artifact. You make a gorgeous but fatal swan dive into the surface.">)>>
+
+<ROUTINE DRIVE-BUBBLE-FCN ()
+ <COND (<VERB? CLIMB-UP CLIMB-ON BOARD> <DO-WALK ,P?UP> <RTRUE>)>>
+
+<ROUTINE CONTROL-BUBBLE-FCN ()
+ <COND (<VERB? CLIMB-UP CLIMB-ON BOARD> <DO-WALK ,P?UP> <RTRUE>)>>
+
+<ROUTINE OUT-OF-REACH () <TELL "It's out of reach above you." CR>>
+
+<ROUTINE DRIVE-BUBBLE-ROOM-FCN (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"The drive bubble is on the axis of rotation at the aft end of the artifact,
+so there is no \"gravity\" here. It is transparent and you can see the tips
+of the tallest trees of the forest beyond. Far off, at the opposite end of
+the axis, is another bubble much like this one. ">
+ <COND (<IN? ,WHITE-KEY ,WHITE-SLOT>
+ <TELL
+"The room's gray walls are covered with traceries of white outlining
+controls, buttons, dials, and indicators. In addition, a black slot
+surrounded by an ominous dead-black circle is next to a white slot
+containing a white rod.">)
+ (ELSE
+ <TELL
+"The room is a featureless gray except for one small white slot.">)>
+ <TELL " One way out is the hatch, which is ">
+ <COND (<FSET? ,DRIVE-BUBBLE-HATCH ,OPENBIT>
+ <TELL "open.">)
+ (ELSE <TELL "closed.">)>
+ <CRLF>)
+ (<==? .RARG ,M-BEG>
+ <BUBBLE-BOUNCE>)>>
+
+<ROUTINE BUBBLE-BOUNCE ()
+ <COND (<AND <VERB? WALK> <EQUAL? ,PRSO ,P?UP ,P?NORTH>>
+ <TELL
+"You can't walk in that direction, as there is no gravity here. You could
+jump, perhaps..." CR>)
+ (<VERB? LEAP>
+ <TELL
+"You push off the floor, and because there is no weight you zoom into the air
+and rebound against the transparent surface of the bubble!" CR>)>>
+
+<ROUTINE WHITE-KEY-FCN ()
+ <COND (<AND <VERB? TAKE> <IN? ,WHITE-KEY ,WHITE-SLOT>>
+ <REMOVE ,BLACK-SLOT>
+ <FCLEAR ,WHITE-KEY ,NDESCBIT>
+ <MOVE ,WHITE-KEY ,WINNER>
+ <TELL
+"When you remove the rod, the displays fade and the wall becomes
+featureless gray, except for the white slot." CR>)
+ (<AND <VERB? PUT>
+ <TRYTAKE>
+ <==? ,PRSO ,WHITE-KEY>
+ <==? ,PRSI ,WHITE-SLOT>>
+ <FSET ,WHITE-KEY ,TOUCHBIT>
+ <FSET ,WHITE-KEY ,NDESCBIT>
+ <MOVE ,BLACK-SLOT ,DRIVE-BUBBLE-ROOM>
+ <MOVE ,WHITE-KEY ,WHITE-SLOT>
+ <TELL
+"As you insert the rod, the walls come alive with a white tracery of controls,
+dials, and gauges. In addition, a black slot surrounded by an ominous
+dead-black circle appears." CR>)>>
+
+<ROUTINE ON-DRIVE-BUBBLE-FCN (RARG)
+ <COND (<==? .RARG ,M-BEG>
+ <ON-BUBBLE-FCN ,DRIVE-BUBBLE ,AXIS-1>)>>
+
+<ROUTINE SILVER-SLOT-CONT ()
+ <HATCH-CLOSE ,DRIVE-BUBBLE-HATCH>>
+
+<ROUTINE GOLD-SLOT-CONT ()
+ <HATCH-CLOSE ,CONTROL-BUBBLE-HATCH>>
+
+<ROUTINE HATCH-CLOSE (HATCH "AUX" CONT)
+ <COND (<VERB? TAKE>
+ <SET CONT <FIRST? .HATCH>>
+ <COND (<TRYTAKE>
+ <TELL
+"The " D .HATCH " closes silently." CR>
+ <FCLEAR .CONT ,NDESCBIT>
+ <FCLEAR .HATCH ,OPENBIT>)>)>>
+
+<ROUTINE SILVER-SLOT-FCN ()
+ <SLOT-DOOR ,SILVER-SLOT ,SILVER-KEY ,DRIVE-BUBBLE-HATCH>>
+
+<ROUTINE GOLD-SLOT-FCN ()
+ <SLOT-DOOR ,GOLD-SLOT ,GOLD-KEY ,CONTROL-BUBBLE-HATCH>>
+
+<ROUTINE SLOT-DOOR (SLOT KEY DOOR)
+ <COND (<VERB? PUT>
+ <COND (<==? ,PRSO .KEY>
+ <COND (<NOT <FSET? .DOOR ,OPENBIT>>
+ <FSET .DOOR ,OPENBIT>
+ <FSET .KEY ,NDESCBIT>
+ <MOVE .KEY .SLOT>
+ <TELL
+"The " D ,PRSO " slides into the slot and the " D .DOOR " opens." CR>)
+ (ELSE
+ <ALREADY "open">)>)
+ (<FSET? ,PRSO ,KEYBIT>
+ <WRONG-KEY>)
+ (ELSE
+ <WONT-FIT>)>)>>
+
+<ROUTINE WHITE-SLOT-FCN ()
+ <COND (<VERB? PUT>
+ <COND (<NOT <TRYTAKE>> <RTRUE>)
+ (<NOT <FSET? ,PRSO ,KEYBIT>>
+ <TELL "You can't do that." CR>)
+ (<==? ,PRSO ,WHITE-KEY>
+ <RFALSE>)
+ (<IN? ,WHITE-KEY ,WHITE-SLOT>
+ <TELL
+"The white crystal rod is already in the slot." CR>)
+ (<FSET? ,PRSO ,KEYBIT>
+ <WRONG-KEY>)>)>>
+
+<ROUTINE BLACK-SLOT-FCN ()
+ <COND (<VERB? PUT>
+ <COND (<NOT <TRYTAKE>> <RTRUE>)
+ (<NOT <FSET? ,PRSO ,KEYBIT>>
+ <TELL "You can't do that." CR>)
+ (<==? ,PRSO ,BLACK-KEY>
+ <TELL
+"The rod slides easily into the slot, and as it does, the lights go out in
+the bubble. Outside, you can see dead
+black night settling over everything. An expressionless voice speaks inside
+your head: \"Emergency shutoff mechanism activated...\" The voice gets quieter
+and quieter, and finally silence rules over all.|
+">
+ <FINISH>)
+ (<FSET? ,PRSO ,KEYBIT>
+ <WRONG-KEY>)>)>>
+
+\
+
+<ROUTINE CONTROL-BUBBLE-ENTRANCE-FCN (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"You are floating outside a 100 meter crystal dome which protrudes from the
+fore end of the cylinder. Inside, you can discern shadowy mechanisms and odd
+constructions. Near you is an entrance which is ">
+ <COND (<FSET? ,CONTROL-BUBBLE-HATCH ,OPENBIT>
+ <TELL "open.">)
+ (ELSE <TELL "closed.">)>
+ <TELL
+" A small slot surrounded by gold crystal is next to the hatch.">
+ <COND (<IN? ,GOLD-KEY ,GOLD-SLOT>
+ <TELL " The slot contains a gold rod.">)>
+ <TELL " Small knobs
+which might make good handholds dot the surface of the bubble from the axis
+to the hatch." CR>)
+ (<==? .RARG ,M-BEG>
+ <COND (<VERB? DROP THROW> <BOMBS-AWAY>)
+ (ELSE <SWAN-DIVE ,CONTROL-BUBBLE>)>)>>
+
+<ROUTINE CONTROL-BUBBLE-ROOM-FCN (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"This room seems to be the main control room of the artifact.
+The control bubble itself is transparent and you can look out upon the
+interior of the artifact. Far off, mostly hidden by the tallest trees of the
+forest, is the matching drive bubble. One way out is the hatch, which is ">
+ <COND (<FSET? ,CONTROL-BUBBLE-HATCH ,OPENBIT>
+ <TELL "open.">)
+ (ELSE <TELL "closed.">)>
+ <CRLF>
+ <TELL "The walls are gray ">
+ <COND (<IN? ,CLEAR-KEY ,CLEAR-SLOT>
+ <TELL "except for five small
+color-coded slots (pink, brown, violet, green, and blue) ">
+ <COND (<IN? ,CLEAR-SLOT ,HERE>
+ <TELL "surrounding
+a small clear one.">)
+ (ELSE <TELL "arranged in a pentagon.">)>)
+ (ELSE
+ <TELL "except for a single small slot
+surrounded by clear crystal.">)>
+ <CRLF>
+ <SLOTS-AND-SPOTS>
+ <COND (<IN? ,VIEW-SELECT ,HERE>
+ <APPLY <GETP ,VIEW-SELECT ,P?ACTION> ,M-OBJDESC>)>
+ <RTRUE>)
+ (<==? .RARG ,M-BEG>
+ <BUBBLE-BOUNCE>)>>
+
+<ROUTINE PLANTER-FCN ()
+ <COND (<VERB? EXAMINE>
+ <AS-ADVERTISED>)
+ (<VERB? DIG>
+ <TELL "You find nothing of interest." CR>)>>
+
+<ROUTINE METAL-BAND-EXIT ()
+ <COND (<NOT <FSET? ,GRASSLAND ,TOUCHBIT>>
+ <ENABLE <QUEUE I-HUNTERS 2>>)>
+ <TELL
+"You climb a long vertical shaft for a considerable distance. The shaft opens
+into a gigantic space which obviously occupies most of the interior of the
+artifact. The area is " <COND (,NIGHT? "dimly")
+ (T "brightly")>
+ " lit and has
+an interesting geography...|
+" CR>
+ ,GRASSLAND>
+
+<GLOBAL HUNTER-COUNT 0>
+<GLOBAL HUNTER-TABLE
+ <LTABLE
+"Weasel-like aliens in a hunting party enter the grassland."
+"Weasels are stalking the unicorn herd."
+"The weasels attack the herd; one straggler is confused and the weasels
+converge. Speared, the unicorn falls dead."
+"Weasels are butchering a unicorn."
+"Weasel-like aliens are departing after a unicorn hunt.">>
+
+<ROUTINE SEES-HUNTERS? ()
+ <OR <EQUAL? ,HERE ,GRASSLAND ,GRASSLAND-2 ,FORE-END>
+ <EQUAL? ,HERE ,METAL-BAND ,METAL-BAND-2 ,FORE-END-2>
+ <EQUAL? ,HERE ,SCRUB ,SCRUB-2>>>
+
+<ROUTINE I-HUNTERS ()
+ <COND (<0? ,HUNTER-COUNT>
+ <COND (<AND <PROB 40> <SEES-HUNTERS?>>
+ <SETG HUNTER-COUNT 1>)
+ (T <ENABLE <QUEUE I-HUNTERS 2>>)>)>
+ <COND (<NOT <0? ,HUNTER-COUNT>>
+ <COND (<SEES-HUNTERS?>
+ <TELL "There is activity ">
+ <COND (<EQUAL? ,HERE ,GRASSLAND>
+ <TELL "above, across the cylinder: ">)
+ (<EQUAL? ,HERE ,GRASSLAND-2>
+ <TELL "nearby: ">)
+ (ELSE
+ <TELL
+"on the grassy plain: ">)>
+ <TELL <GET ,HUNTER-TABLE ,HUNTER-COUNT> CR>)>
+ <COND (<L? ,HUNTER-COUNT <GET ,HUNTER-TABLE 0>>
+ <SETG HUNTER-COUNT <+ ,HUNTER-COUNT 1>>
+ <ENABLE <QUEUE I-HUNTERS 2>>)
+ (ELSE
+ <SETG HUNTER-COUNT 0>
+ <ENABLE <QUEUE I-HUNTERS 200>>)>)>>
+
+<ROUTINE UNICORNS-FCN ()
+ <COND (<VERB? EXAMINE>
+ <COND (<==? ,HERE ,GRASSLAND>
+ <TELL
+"They are over on the other side of the cylinder." CR>)
+ (T
+ <TELL
+"They are nearby, cropping grass." CR>)>)
+ (<VERB? FOLLOW> <TELL "They aren't going anywhere." CR>)
+ (<VERB? ZAP>
+ <COND (<CAN-ZAP?>
+ <TELL
+"Many unicorns are incinerated; the rest scatter in terror, then slowly
+form back into a herd some distance away." CR>
+ <SPOILED-HUNT>)>)
+ (ELSE
+ <TELL
+"The creatures move off as you approach, so you can't get very close to
+them." CR>
+ <SPOILED-HUNT>)>>
+
+<ROUTINE SPOILED-HUNT ()
+ <COND (<AND <G? ,HUNTER-COUNT 0>
+ <L? ,HUNTER-COUNT 4>>
+ <SETG HUNTER-COUNT 0>
+ <ENABLE <QUEUE I-HUNTERS 200>>
+ <TELL
+"You have disturbed the hunters, who are annoyed, and the unicorns, who are
+now more wary. The hunt is spoiled." CR>)>
+ <RTRUE>>
+
+<GLOBAL NIGHT? <>>
+
+<ROUTINE I-NIGHT ()
+ <ENABLE <QUEUE I-NIGHT 128>>
+ <COND (<OR <SEES-HUNTERS?>
+ <EQUAL? ,HERE ,FOREST ,BASE-OF-TREE ,UP-A-TREE>
+ <EQUAL? ,HERE
+ ,TREETOP-ROOM ,DRIVE-BUBBLE-ENTRANCE
+ ,CONTROL-BUBBLE-ENTRANCE>
+ <EQUAL? ,HERE ,AXIS-1 ,AXIS-2 ,AXIS-3>
+ <EQUAL? ,HERE ,ON-DRIVE-BUBBLE ,ON-CONTROL-BUBBLE>>
+ <COND (,NIGHT?
+ <TELL
+"The lights come on: it is now full daylight." CR>)
+ (ELSE
+ <TELL
+"The lights dim: it is now nighttime. There is still enough light to
+see by; it's like a clear, moonlit night back on earth." CR>)>)>
+ <SETG NIGHT? <NOT ,NIGHT?>>>
+
+<ROUTINE BOMBS-AWAY ("AUX" A B)
+ <COND (<EQUAL? ,PRSO ,RED-DISK ,BLUE-DISK>
+ <DISK-SWITCH ,PRSO T>)>
+ <COND (<EQUAL? ,PRSI ,DRIVE-BUBBLE ,CONTROL-BUBBLE>
+ <MOVE ,PRSO
+ <COND (<==? ,PRSI ,DRIVE-BUBBLE> ,FOREST)
+ (ELSE ,FORE-END)>>
+ <TELL
+"Throwing the " D ,PRSO " provides some impulse away from the " D ,PRSI ",
+but air resistance slows you quickly." CR>)
+ (ELSE
+ <COND (<EQUAL? ,HERE
+ ,ON-DRIVE-BUBBLE
+ ,DRIVE-BUBBLE-ENTRANCE>
+ <SET A ,FOREST> <SET B ,BASE-OF-TREE>)
+ (<==? ,HERE ,AXIS-1>
+ <SET A ,SCRUB> <SET B ,SCRUB-2>)
+ (<==? ,HERE ,AXIS-2>
+ <SET A ,GRASSLAND> <SET B ,GRASSLAND-2>)
+ (<==? ,HERE ,AXIS-3>
+ <SET A ,METAL-BAND> <SET B ,METAL-BAND-2>)
+ (<EQUAL? ,HERE
+ ,ON-CONTROL-BUBBLE
+ ,CONTROL-BUBBLE-ENTRANCE>
+ <SET A ,FORE-END> <SET B ,FORE-END-2>)>
+ <MOVE ,PRSO <COND (<PROB 50> .A) (ELSE .B)>>
+ <TELL
+"The " D ,PRSO " sails away, drifting in a long arc towards the ground." CR>)>>
+
+<ROUTINE ON-BUBBLE-FCN (BUB DEST)
+ <COND (<VERB? DROP THROW> <BOMBS-AWAY>)
+ (<OR <VERB? LEAP>
+ <AND <VERB? PUSH> <==? ,PRSO .BUB>>>
+ <TELL
+"You push against the surface of the bubble, and because there is no weight
+here, you shoot into the air and away along the axis!" CR>
+ <CRLF>
+ <GOTO .DEST>
+ <RTRUE>)>>
+
+<ROUTINE ON-CONTROL-BUBBLE-FCN (RARG)
+ <COND (<==? .RARG ,M-BEG>
+ <ON-BUBBLE-FCN ,CONTROL-BUBBLE ,AXIS-3>)>>
+
+<ROUTINE AXIS-FCN ("OPTIONAL" (RARG <>))
+ <COND (<==? .RARG ,M-BEG>
+ <COND (<VERB? WALK>
+ <TELL
+"You are floating in midair near the axis of rotation. Given this fact,
+it's hard to see how you are going to walk anywhere." CR>)
+ (<VERB? DROP THROW>
+ <BOMBS-AWAY>)
+ (<VERB? LEAP>
+ <TELL
+"That was a good idea when you had something to push against. Here it
+has no effect." CR>)>)>>
+
+<ROUTINE JATO ("AUX" TARGET)
+ <SET TARGET ,PRSI>
+ <COND (<NOT <EQUAL? .TARGET ,DRIVE-BUBBLE ,CONTROL-BUBBLE ,GROUND>>
+ <SET TARGET
+ <COND (<PROB 40> ,DRIVE-BUBBLE)
+ (<PROB 40> ,CONTROL-BUBBLE)
+ (ELSE ,GROUND)>>)>
+ <TELL
+"A blast of orange flame issues from the gun, and the recoil propels you at
+an impressive speed through the air.">
+ <COND (<EQUAL? ,HERE ,DRIVE-BUBBLE-ROOM ,CONTROL-BUBBLE-ROOM>
+ <TELL
+" You hit the bulkhead rather hard. Ouch!" CR>)
+ (<EQUAL? .TARGET ,DRIVE-BUBBLE ,CONTROL-BUBBLE>
+ <TELL
+" Eventually, air resistance slows you down, but you are still in the
+weightless area near the center of the cylinder." CR>
+ <COND (<==? .TARGET ,DRIVE-BUBBLE>
+ <CRLF>
+ <COND (<==? ,HERE ,ON-DRIVE-BUBBLE> <GOTO ,AXIS-1>)
+ (<==? ,HERE ,AXIS-1> <GOTO ,AXIS-2>)
+ (<==? ,HERE ,AXIS-2> <GOTO ,AXIS-3>)
+ (<==? ,HERE ,AXIS-3>
+ <GOTO ,ON-CONTROL-BUBBLE>)
+ (<==? ,HERE ,ON-CONTROL-BUBBLE>
+ <TELL
+"You are still outside the control bubble." CR>)>)
+ (ELSE
+ <CRLF>
+ <COND (<==? ,HERE ,ON-DRIVE-BUBBLE>
+ <TELL
+"You are still outside the drive bubble." CR>)
+ (<==? ,HERE ,AXIS-1>
+ <GOTO ,ON-DRIVE-BUBBLE>)
+ (<==? ,HERE ,AXIS-2> <GOTO ,AXIS-1>)
+ (<==? ,HERE ,AXIS-3> <GOTO ,AXIS-2>)
+ (<==? ,HERE ,ON-CONTROL-BUBBLE>
+ <GOTO ,AXIS-3>)>)>
+ <RTRUE>)
+ (<==? .TARGET ,GROUND>
+ <JIGS-UP
+" You are now some distance from the axis of the cylinder. Air resistance and
+centripetal force take hold and you start to fall, faster and faster, in a
+lovely arc that ends as you splatter against the ground.">)>>
+
+<ROUTINE OBSERVATORY-FCN (RARG "AUX" X)
+ <COND (<==? .RARG ,M-LOOK>
+ <SET X <FIRST? ,SLIDE-PROJECTOR>>
+ <TELL
+"This is the interior part of the artifact's observatory, with an
+exit to starboard. There are no telescopes or other instruments visible">
+ <COND (<OR <NOT .X> <FSET? .X ,KEYBIT>>
+ <TELL
+", but in the center of the room is an image of space in the vicinity.
+Examining the image, you see a tiny model of the solar system. The sun is
+a bright dot in the center; Jupiter and Saturn are easily discovered.">
+ <COND (.X
+ <TELL
+ " The colors of the dots are not what you would
+expect, though,">
+ <COND (<IN? ,CLEAR-KEY ,SLIDE-PROJECTOR>
+ <TELL
+ " and range throughout the spectrum.">)
+ (<FSET? .X ,KEYBIT>
+ <TELL
+ " as they are filtered through a " D .X ".">)>)>)
+ (ELSE <TELL ", only a holographic projector.">)>
+ <CRLF>)>>
+
+<ROUTINE SLIDE-PROJECTOR-FCN ("AUX" X)
+ <COND (<VERB? EXAMINE>
+ <SET X <FIRST? ,SLIDE-PROJECTOR>>
+ <COND (<AND .X <NOT <FSET? .X ,KEYBIT>>>
+ <TELL
+"The projector is a type of laser, currently blocked by a " D .X " from
+projecting any light." CR>)
+ (ELSE
+ <TELL
+"The projector is a type of laser, producing a continuous holographic
+view of space outside the artifact. The light issues from the front of
+the projector, and is blindingly bright." CR>)>)
+ (<VERB? LOOK-SAFELY>
+ <COND (<EQUAL? ,PRSI ,SMOKED-GLASS ,BLACK-KEY>
+ <TELL
+"The light is very bright, but the " D ,PRSI " filters it enough so that
+you are not blinded." CR>
+ <COND (<IN? ,CLEAR-KEY ,SLIDE-PROJECTOR>
+ <FCLEAR ,CLEAR-KEY ,INVISIBLE>
+ <TELL
+"Inside the projector is a clear crystal rod, which has a prismatic effect
+on the light being emitted." CR>)>)
+ (ELSE
+ <JIGS-UP
+"The light is filtered somewhat by the rod, but not enough, and you are
+blinded. You blunder about for a while, end up in a dark place, and are set
+upon by grues.">)>)
+ (<VERB? LOOK-INSIDE>
+ <JIGS-UP
+"The light being emitted is so bright that your retina is scorched and you
+are blinded. You blunder about for a while, end up in a dark place, and are
+set upon by grues.">)
+ (<AND <VERB? TAKE> <IN? ,PRSO ,SLIDE-PROJECTOR>>
+ <MOVE ,PRSO ,WINNER>
+ <TELL "Taken. ">
+ <COND (<FSET? ,PRSO ,KEYBIT>
+ <SCORE-OBJ ,PRSO>
+ <TELL
+"The image displayed is now clear and correctly colored." CR>)
+ (ELSE
+ <TELL
+"The displayed image becomes visible again." CR>)>)
+ (<AND <VERB? PUT> <==? ,PRSI ,SLIDE-PROJECTOR>>
+ <COND (<FIRST? ,PRSI>
+ <TELL "There is already something there." CR>)
+ (<==? ,PRSO ,CLEAR-KEY>
+ <MOVE ,PRSO ,PRSI>
+ <TELL
+"The displayed image is now prismatic and multi-colored." CR>)
+ (<FSET? ,PRSO ,KEYBIT>
+ <MOVE ,PRSO ,PRSI>
+ <TELL
+"The displayed image is now filtered through a " D ,PRSO ", and becomes
+that color." CR>)
+ (ELSE <WONT-FIT>)>)
+ (<VERB? OPEN CLOSE>
+ <TELL "You can't do that to the " D ,PRSO "." CR>)>>
+
+<ROUTINE LASER-BEAM-FCN ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"The beam projects a view of some outside location." CR>)
+ (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <TELL
+"Zapping a light beam is a waste of time." CR>)
+ (<VERB? MUNG>
+ <TELL
+"The image vanishes while the beam is broken." CR>)>>
+
+<ROUTINE CANT-DAMAGE ()
+ <TELL
+"It's hard to see how you expect to damage a " D ,PRSO "." CR>>
+
+<ROUTINE CONTROL-SLOT-FCN ("AUX" F)
+ <COND (<VERB? PUT>
+ <COND (<OR <NOT <FSET? ,PRSO ,KEYBIT>> <FIRST? ,PRSI>>
+ <WONT-FIT>
+ <RTRUE>)
+ (<SET F <GETP ,PRSI ,P?KEY>>
+ <COND (<OR <NOT ,SWITCH-ON?>
+ <NOT <IN? ,CARD ,SLOT>>>
+ <TELL
+"The " D ,PRSI " rejects the " D ,PRSO ", and the slot flashes as if
+indicating a fault somewhere in the system." CR>
+ <RTRUE>)
+ (<NOT <==? ,PRSO .F>>
+ <WRONG-KEY>
+ <RTRUE>)>)>
+ <MOVE ,PRSO ,PRSI>
+ <FSET ,PRSO ,NDESCBIT>
+ <COND (<AND <==? ,PRSO ,CLEAR-KEY>
+ <==? ,PRSI ,CLEAR-SLOT>>
+ <MOVE ,BROWN-SLOT ,HERE>
+ <MOVE ,PINK-SLOT ,HERE>
+ <MOVE ,GREEN-SLOT ,HERE>
+ <MOVE ,BLUE-SLOT ,HERE>
+ <MOVE ,VIOLET-SLOT ,HERE>
+ <MOVE ,CLEAR-KEY ,CLEAR-SLOT>
+ <TELL
+"As you insert the clear rod, five other slots appear evenly ranged around
+the clear one. These are colored brown, green, blue, violet and pink
+respectively." CR>
+ <RTRUE>)
+ (<AND <==? ,PRSO ,BROWN-KEY>
+ <==? ,PRSI ,BROWN-SLOT>>
+ <SET F ,TARGET-SELECT>)
+ (<AND <==? ,PRSO ,PINK-KEY>
+ <==? ,PRSI ,PINK-SLOT>>
+ <SET F ,VIEW-SELECT>)
+ (<AND <==? ,PRSO ,GREEN-KEY>
+ <==? ,PRSI ,GREEN-SLOT>>
+ <SET F ,SPEED-SELECT>)
+ (<AND <==? ,PRSO ,BLUE-KEY>
+ <==? ,PRSI ,BLUE-SLOT>>
+ <SET F ,EXECUTE-BUTTON>)
+ (<AND <==? ,PRSO ,VIOLET-KEY>
+ <==? ,PRSI ,VIOLET-SLOT>>
+ <SET F ,COURSE-SELECT>)
+ (ELSE <RFALSE>)>
+ <MOVE .F ,HERE>
+ <TELL
+"When the " D ,PRSO " is inserted into the " D ,PRSI ", a ghostly image
+appears on the wall alongside it">
+ <COND (<IN? ,CLEAR-SLOT ,CONTROL-BUBBLE-ROOM>
+ <REMOVE ,CLEAR-SLOT>
+ <TELL
+", but the clear slot and its contents fade from view." CR>)
+ (ELSE <TELL "." CR>)>
+ <COND (<EQUAL? .F ,VIEW-SELECT>
+ <PERFORM ,V?EXAMINE .F>)
+ (ELSE
+ <TELL
+"The image is a " D .F " which almost seems to project out of the wall." CR>)>
+ <RTRUE>)
+ (<VERB? TAKE TAKE-OFF>
+ <COND (<AND <==? ,PRSO ,CLEAR-KEY>
+ <IN? ,PRSO ,CLEAR-SLOT>>
+ <SETG VIEW-STATUS 0>
+ <SETG TARGET 0>
+ <SETG COURSE-SHAPE 0>
+ <SETG SPEED-VALUE 0>
+ <REMOVE ,VIEW-SELECT>
+ <REMOVE ,TARGET-SELECT>
+ <REMOVE ,SPEED-SELECT>
+ <REMOVE ,COURSE-SELECT>
+ <REMOVE ,EXECUTE-BUTTON>
+ <REMOVE ,BROWN-SLOT>
+ <REMOVE ,PINK-SLOT>
+ <REMOVE ,GREEN-SLOT>
+ <REMOVE ,BLUE-SLOT>
+ <REMOVE ,VIOLET-SLOT>
+ <MOVE ,CLEAR-KEY ,WINNER>
+ <TELL
+"When you remove the clear rod, the room returns to its original
+featureless state." CR>
+ <RTRUE>)
+ (<AND <==? ,PRSO ,BROWN-KEY>
+ <IN? ,PRSO ,BROWN-SLOT>>
+ <SETG TARGET 0>
+ <SET F ,TARGET-SELECT>)
+ (<AND <==? ,PRSO ,PINK-KEY>
+ <IN? ,PRSO ,PINK-SLOT>>
+ <SETG VIEW-STATUS 0>
+ <SETG TARGET 0>
+ <SETG COURSE-SHAPE 0>
+ <SETG SPEED-VALUE 0>
+ <SET F ,VIEW-SELECT>)
+ (<AND <==? ,PRSO ,GREEN-KEY>
+ <IN? ,PRSO ,GREEN-SLOT>>
+ <SETG SPEED-VALUE 0>
+ <SET F ,SPEED-SELECT>)
+ (<AND <==? ,PRSO ,BLUE-KEY>
+ <IN? ,PRSO ,BLUE-SLOT>>
+ <SET F ,EXECUTE-BUTTON>)
+ (<AND <==? ,PRSO ,VIOLET-KEY>
+ <IN? ,PRSO ,VIOLET-SLOT>>
+ <SETG COURSE-SHAPE 0>
+ <SET F ,COURSE-SELECT>)
+ (ELSE <RFALSE>)>
+ <REMOVE .F>
+ <MOVE ,PRSO ,WINNER>
+ <FCLEAR ,PRSO ,NDESCBIT>
+ <TELL "The " D .F " fades from view as you take the " D ,PRSO>
+ <COND (<OR <IN? ,BROWN-KEY ,BROWN-SLOT>
+ <IN? ,BLUE-KEY ,BLUE-SLOT>
+ <IN? ,GREEN-KEY ,GREEN-SLOT>
+ <IN? ,PINK-KEY ,PINK-SLOT>
+ <IN? ,VIOLET-KEY ,VIOLET-SLOT>>
+ <TELL "." CR>)
+ (ELSE
+ <MOVE ,CLEAR-SLOT ,CONTROL-BUBBLE-ROOM>
+ <TELL
+", and a moment later the clear slot and its contents reappear." CR>)>)>>
+
+;"This routine describes the various slots, contents, and corresponding
+spots."
+
+<ROUTINE SLOTS-AND-SPOTS ("AUX" (CNT 0) (OFF 0) SCNT TBL)
+ <COND (<NOT <IN? ,CLEAR-KEY ,CLEAR-SLOT>>
+ <RTRUE>)
+ (T
+ <COND (<IN? ,CLEAR-SLOT ,HERE>
+ <TELL
+"A clear rod is in the clear slot. Of the surrounding slots, ">)
+ (ELSE
+ <TELL "Of the colored slots, ">)>
+ <COND (<IN? ,PINK-KEY ,PINK-SLOT>
+ <TELL "the pink one contains a pink rod and ">)>
+ <COND (<IN? ,BROWN-KEY ,BROWN-SLOT>
+ <SET CNT <+ .CNT 1>>)>
+ <COND (<IN? ,GREEN-KEY ,GREEN-SLOT>
+ <SET CNT <+ .CNT 1>>)>
+ <COND (<IN? ,BLUE-KEY ,BLUE-SLOT>
+ <SET CNT <+ .CNT 1>>)>
+ <COND (<IN? ,VIOLET-KEY ,VIOLET-SLOT>
+ <SET CNT <+ .CNT 1>>)>
+ <COND (<0? .CNT>
+ <COND (<IN? ,PINK-KEY ,PINK-SLOT>
+ <TELL "the others">)
+ (T
+ <TELL "all">)>
+ <TELL " are empty." CR>
+ <RTRUE>)>
+ <TELL "the ">
+ <SET TBL ,SLOT-TABLE>
+ <SET SCNT .CNT>
+ <REPEAT ()
+ <COND (<0? <GET .TBL .OFF>>
+ <RETURN>)
+ (<IN? <GET .TBL .OFF> <GET .TBL <+ .OFF 1>>>
+ <TELL <GET .TBL <+ .OFF 2>>>
+ <COND (<G? .CNT 2> <TELL ", ">)
+ (<==? .CNT 2> <TELL " and ">)>
+ <COND (<L? <SET CNT <- .CNT 1>> 1>
+ <RETURN>)>)>
+ <SET OFF <+ .OFF 3>>>
+ <TELL " rod">
+ <COND (<==? .SCNT 1>
+ <TELL " is">)
+ (T <TELL "s are">)>
+ <TELL " in place in the like-colored slot">
+ <COND (<==? .SCNT 1>
+ <TELL ". Alongside it is a spot">)
+ (T <TELL "s. Alongside each of those are spots">)>
+ <TELL " of the same color." CR>)>>
+
+<GLOBAL SLOT-TABLE
+ <TABLE BLUE-KEY BLUE-SLOT "blue"
+ GREEN-KEY GREEN-SLOT "green"
+ VIOLET-KEY VIOLET-SLOT "violet"
+ BROWN-KEY BROWN-SLOT "brown"
+ 0>>
+
+<GLOBAL VIEW-STATUS 0>
+<GLOBAL VIEW-SCREEN-VIEWS
+ <TABLE "an empty area with a stylized depiction of the artifact itself"
+ "the inner solar system, from the sun out to Jupiter"
+ "the entire solar system, including the cometary halo"
+ "the region near the solar system, not including nearby stars"
+ "the local interstellar region, including a few nearer stars">>
+
+<GLOBAL COURSE-SHAPE 0>
+<GLOBAL TARGET 0>
+<GLOBAL COURSES
+ <LTABLE "in the center of "
+ "in a parabola looping around "
+ "in an ellipse surrounding "
+ "in a circle around ">>
+<GLOBAL TARGETS <LTABLE "the Sun" "Mercury" "Venus" "Earth" "Mars" "Jupiter">>
+<GLOBAL SPEEDS <LTABLE "slowly" "rapidly">>
+<GLOBAL SPEED-VALUE 0>
+
+<ROUTINE VIEW-SELECT-FCN ("OPTIONAL" (RARG <>))
+ <COND (<OR <==? .RARG ,M-OBJDESC> <VERB? EXAMINE>>
+ <TELL
+"The pink screen includes a small square, a large square, and a display
+showing nearby space. This view shows "
+<GET ,VIEW-SCREEN-VIEWS ,VIEW-STATUS> ".">
+ <COND (<AND <==? ,VIEW-STATUS 1>
+ <NOT <0? ,TARGET>>>
+ <TELL " The symbol representing "
+ <GET ,TARGETS ,TARGET>
+ " is lit.">
+ <COND (<NOT <0? ,COURSE-SHAPE>>
+ <TELL
+" A line on the display connects the position of the artifact with
+that of " <GET ,TARGETS ,TARGET> ", and terminating " <GET ,COURSES ,COURSE-SHAPE> <GET ,TARGETS ,TARGET> ".">
+ <COND (<NOT <0? ,SPEED-VALUE>>
+ <TELL " The line is made of dots,
+blinking " <GET ,SPEEDS ,SPEED-VALUE> ", starting with the dot at the
+artifact and ending at the one next to " <GET ,TARGETS ,TARGET> ".">)>)>)>
+ <CRLF>)
+ (<VERB? RUB PUSH>
+ <COND (<==? ,PRSO ,ZOOM-IN>
+ <COND (<G? ,VIEW-STATUS 0>
+ <SETG VIEW-STATUS <- ,VIEW-STATUS 1>>
+ <TELL "The view screen now shows "
+ <GET ,VIEW-SCREEN-VIEWS ,VIEW-STATUS>
+ "."
+ CR>)
+ (ELSE <TELL "The view is unchanged." CR>)>)
+ (<==? ,PRSO ,ZOOM-OUT>
+ <COND (<L? ,VIEW-STATUS 4>
+ <SETG VIEW-STATUS <+ ,VIEW-STATUS 1>>
+ <TELL "The view screen now shows "
+ <GET ,VIEW-SCREEN-VIEWS ,VIEW-STATUS>
+ "." CR>)
+ (ELSE <TELL "The view is unchanged." CR>)>)
+ (ELSE <TELL
+"The display flashes briefly." CR>)>)>>
+
+<ROUTINE TARGET-SELECT-FCN ()
+ <COND (<VERB? RUB PUSH>
+ <COND (<AND <IN? ,VIEW-SELECT ,HERE>
+ <==? ,VIEW-STATUS 1>>
+ <SETG TARGET <MOD <+ ,TARGET 1> 7>>
+ <COND (<0? ,TARGET>
+ <TELL
+"Now nothing is highlighted on the view screen." CR>)
+ (ELSE
+ <TELL
+"The view screen now shows " <GET ,TARGETS ,TARGET> " brightly
+highlighted." CR>)>)
+ (ELSE <SPOT-FLASH>)>)>>
+
+<ROUTINE SPEED-SELECT-FCN ()
+ <COND (<VERB? RUB PUSH>
+ <COND (<IN? ,VIEW-SELECT ,HERE>
+ <COND (<AND <NOT <0? ,COURSE-SHAPE>>
+ <NOT <0? ,TARGET>>>
+ <COND (<NOT <IN? ,WHITE-KEY ,WHITE-SLOT>>
+ <TELL
+"The line on the display flashes brightly, insistently, for about five
+seconds, and then returns to its former state." CR>
+ <RTRUE>)>
+ <SETG SPEED-VALUE <MOD <+ ,SPEED-VALUE 1> 3>>
+ <COND (<NOT <0? ,SPEED-VALUE>>
+ <TELL
+"The line on the display now consists of dots which flash " <GET ,SPEEDS ,SPEED-VALUE> ", one at a time, starting with a dot at the artifact and concluding at " <GET ,TARGETS ,TARGET> "." CR>)
+ (ELSE
+ <TELL
+"The line on the display is now a solid line." CR>)>)
+ (ELSE <SPOT-FLASH>)>)
+ (ELSE <SPOT-FLASH>)>)>>
+
+<ROUTINE COURSE-SELECT-FCN ()
+ <COND (<VERB? RUB PUSH>
+ <COND (<IN? ,VIEW-SELECT ,HERE>
+ <SETG COURSE-SHAPE <MOD <+ ,COURSE-SHAPE 1> 5>>
+ <COND (<NOT <0? ,TARGET>>
+ <COND (<NOT <0? ,COURSE-SHAPE>>
+ <TELL
+"The highlighted image of " <GET ,TARGETS ,TARGET> " now is connected to
+that of the artifact. The line terminates " <GET ,COURSES ,COURSE-SHAPE>
+<GET ,TARGETS ,TARGET> "." CR>)
+ (ELSE
+ <TELL
+"A line no longer connects the artifact and " <GET ,TARGETS ,TARGET> "." CR>)>)
+ (ELSE <SPOT-FLASH>)>)
+ (ELSE <SPOT-FLASH>)>)>>
+
+<ROUTINE EXECUTE-BUTTON-FCN ("OPTIONAL" (RARG <>))
+ <COND (<VERB? PUSH RUB>
+ <COND (<IN? ,VIEW-SELECT ,HERE>
+ <COND (<AND <NOT <0? ,COURSE-SHAPE>>
+ <NOT <0? ,TARGET>>
+ <NOT <0? ,SPEED-VALUE>>
+ <==? ,VIEW-STATUS 1>>
+ <COND (<G? ,CONTROL-SCORE 0>
+ <SCORE-UPD ,CONTROL-SCORE>
+ <SETG CONTROL-SCORE 0>
+ <TELL
+"All of the displays flash once. There is a sensation of movement
+as the artifact positions itself to follow the course you have laid for it."
+CR>
+ <WIN-GAME>)
+ (ELSE <SPOT-FLASH>)>)
+ (ELSE <SPOT-FLASH>)>)
+ (ELSE <SPOT-FLASH>)>)>>
+
+<ROUTINE SPOT-FLASH () <TELL "The spot flashes briefly." CR>>
+
+<GLOBAL CONTROL-SCORE 25>
+
+<ROUTINE WIN-GAME ()
+ <CRLF>
+ <COND (<==? ,TARGET 4>
+ <COND (<EQUAL? ,COURSE-SHAPE 3 4>
+ <SCORE-UPD 25>
+ <SETG WON-FLAG T>
+ <TELL
+"The artifact, under your assured control, moves serenely toward Earth, where
+the knowledge it contains will immeasureably benefit mankind. Within a few
+years, there could be human ships flying out to the stars, and all because of
+your daring and cunning...|
+|
+A holographic projection of a humanoid figure appears before you. The being
+is tall, thin, and swathed in shimmering robes. It speaks perfectly but
+expressionlessly in your own language. \"Congratulations, you who have
+passed our test. You have succeeded where others failed. Your race shall
+benefit thereby.\" He smiles. \"I expect to see you in person, someday.\" The
+projection fades.|
+" CR>)
+ (ELSE
+ <TELL
+"The artifact approaches Earth, where the plaudits of humanity await you.
+Unfortunately, the course you have chosen "
+ <COND (<==? ,COURSE-SHAPE 1> "rams you
+into the planet and you earn the hatred of mankind, not its praises.")
+ (ELSE "loops you
+around the Earth and back into interstellar space, never to return.")>>
+ <CRLF>)>)
+ (ELSE
+ <TELL
+"The artifact moves confidently towards " <GET ,TARGETS ,TARGET> ",
+but its computer system is smart enough to know where you came from, and
+it realizes that you have made the wrong choice. All shipboard systems
+shut down, and the rest is silence." CR>)>
+ <FINISH>>
+
+<ROUTINE ON-ARTIFACT? ()
+ <COND (<OR <EQUAL? ,HERE ,SPACESHIP-BRIDGE ,SPACESHIP-STORES
+ ,SPACESHIP-QUARTERS>
+ <EQUAL? ,HERE ,SPACESHIP-AIRLOCK ,DEEP-SPACE ,RED-DOCK>
+ <EQUAL? ,HERE ,BLUE-DOCK ,YELLOW-DOCK ,GREEN-DOCK>
+ <EQUAL? ,HERE ,OUTER-SPACE>>
+ <RFALSE>)
+ (ELSE <RTRUE>)>>
+
+<ROUTINE CARD-F ()
+ <COND (<IN? ,CARD ,SLOT>
+ <COND (<AND <VERB? ZAP> <CAN-ZAP?>>
+ <SETG SWITCH-ON? <>>
+ <SETG MELTED? T>
+ <RFALSE>)
+ (<AND <VERB? TAKE> ,SWITCH-ON?>
+ <TELL
+ "You get a giant shock as you try to take it." CR>)>)>>
+
+<ROUTINE ROD-RACK-FCN ()
+ <COND (<AND <VERB? TAKE> <IN? ,PRSO ,ROD-RACK>>
+ <TELL
+"When you take the " D ,PRSO ", the hole it was in closes up as though it
+had never existed." CR>
+ <MOVE ,PRSO ,WINNER>
+ <RTRUE>)
+ (<AND <VERB? PUT> <==? ,PRSI ,ROD-RACK>>
+ <COND (<IN? ,PRSO ,ROD-RACK>
+ <TELL "It's already there." CR>)
+ (<NOT <TRYTAKE>> <RTRUE>)
+ (<FSET? ,PRSO ,KEYBIT>
+ <MOVE ,PRSO ,ROD-RACK>
+ <SCORE-OBJ ,PRSO>
+ <TELL
+"The " D ,PRSO " is inserted, and immediately another hole opens
+beside it." CR>)
+ (ELSE
+ <WONT-FIT>)>)>>
+
+<ROUTINE HATCH-DOOR-F ()
+ <COND (<VERB? OPEN CLOSE>
+ <TELL "You can't manually open or close the hatch." CR>)>>
+
+<ROUTINE SPEAR-F ("AUX" OBJ)
+ <COND (<==? ,HERE ,NEST-CAGE> <SET OBJ ,RAT-ANT>)
+ (T <SET OBJ ,ALIENS>)>
+ <COND (<VERB? TAKE>
+ <TELL
+"Every " D .OBJ " regards you with some suspicion and won't give you
+a weapon." CR>)
+ (<VERB? ZAP>
+ <PERFORM ,V?ZAP .OBJ>
+ <RTRUE>)>>
+
+<ROUTINE HUTS-F ()
+ <COND (<VERB? ZAP>
+ <TELL "A few huts are destroyed; many remain." CR>
+ <SETG ALIENS-FRIENDLY? <>>)
+ (T <EX-CHECK>)>>
+
+<ROUTINE AS-ADVERTISED ()
+ <TELL "The " D ,PRSO " is as described." CR>>
+
+<ROUTINE WALL-F ()
+ <COND (<AND <EQUAL? ,HERE ,FORE-END ,FORE-END-2>
+ <VERB? CLIMB-FOO CLIMB-UP CLIMB-ON>>
+ <TELL "The wall is unscalable!" CR>)>>
+
+<ROUTINE DISTANT-BUBBLE-F ()
+ <COND (<VERB? LOOK-INSIDE>
+ <TELL "No details are visible." CR>)
+ (ELSE
+ <EX-CHECK>)>>
+
+<ROUTINE EX-CHECK ()
+ <COND (<VERB? EXAMINE> <AS-ADVERTISED>)>>
+
+<ROUTINE VEGGIES-F ()
+ <COND (<VERB? EAT> <TELL "Yechh!" CR>)
+ (T <EX-CHECK>)>>
+
+<ROUTINE DRIVE-CONTROLS-F ()
+ <COND (<EX-CHECK> <RTRUE>)
+ (<VERB? ZAP> <RFALSE>)
+ (T <TELL
+"You can't do anything with them." CR>)>>
+
+<ROUTINE CAGES-F ()
+ <EX-CHECK>>
+
+<ROUTINE TOTEMS-F ()
+ <COND (<EX-CHECK> <RTRUE>)
+ (<VERB? EAT> <VEGGIES-F>)
+ (T <TELL "It would be impolite to fool with these." CR>)>>
+
+<ROUTINE KNOBS-F ()
+ <COND (<VERB? TAKE>
+ <TELL "It is firmly attached." CR>)
+ (<VERB? REACH CLIMB-UP CLIMB-DOWN CLIMB-FOO CLIMB-ON>
+ <COND (<EQUAL? ,HERE ,DRIVE-BUBBLE-ENTRANCE
+ ,CONTROL-BUBBLE-ENTRANCE>
+ <DO-WALK ,P?UP>)
+ (T <DO-WALK ,P?DOWN>)>
+ <RTRUE>)>> \ No newline at end of file
diff --git a/clock.zil b/clock.zil
new file mode 100644
index 0000000..e98e59f
--- /dev/null
+++ b/clock.zil
@@ -0,0 +1,60 @@
+
+<CONSTANT C-TABLELEN 180>
+
+<GLOBAL C-TABLE <ITABLE NONE 180>>
+
+<GLOBAL C-DEMONS 180>
+
+<GLOBAL C-INTS 180>
+
+<CONSTANT C-INTLEN 6>
+
+<CONSTANT C-ENABLED? 0>
+
+<CONSTANT C-TICK 1>
+
+<CONSTANT C-RTN 2>
+
+<ROUTINE DEMON (RTN TICK "AUX" CINT)
+ #DECL ((RTN) ATOM (TICK) FIX (CINT) <PRIMTYPE VECTOR>)
+ <PUT <SET CINT <INT .RTN T>> ,C-TICK .TICK>
+ .CINT>
+
+<ROUTINE QUEUE (RTN TICK "AUX" CINT)
+ #DECL ((RTN) ATOM (TICK) FIX (CINT) <PRIMTYPE VECTOR>)
+ <PUT <SET CINT <INT .RTN>> ,C-TICK .TICK>
+ .CINT>
+
+<ROUTINE INT (RTN "OPTIONAL" (DEMON <>) E C INT)
+ #DECL ((RTN) ATOM (DEMON) <OR ATOM FALSE> (E C INT) <PRIMTYPE
+ VECTOR>)
+ <SET E <REST ,C-TABLE ,C-TABLELEN>>
+ <SET C <REST ,C-TABLE ,C-INTS>>
+ <REPEAT ()
+ <COND (<==? .C .E>
+ <SETG C-INTS <- ,C-INTS ,C-INTLEN>>
+ <AND .DEMON <SETG C-DEMONS <- ,C-DEMONS ,C-INTLEN>>>
+ <SET INT <REST ,C-TABLE ,C-INTS>>
+ <PUT .INT ,C-RTN .RTN>
+ <RETURN .INT>)
+ (<==? <GET .C ,C-RTN> .RTN> <RETURN .C>)>
+ <SET C <REST .C ,C-INTLEN>>>>
+
+<GLOBAL CLOCK-WAIT <>>
+
+<ROUTINE CLOCKER ("AUX" C E TICK (FLG <>))
+ #DECL ((C E) <PRIMTYPE VECTOR> (TICK) FIX (FLG) <OR FALSE ATOM>)
+ <COND (,CLOCK-WAIT <SETG CLOCK-WAIT <>> <RFALSE>)>
+ <SET C <REST ,C-TABLE <COND (,P-WON ,C-INTS) (T ,C-DEMONS)>>>
+ <SET E <REST ,C-TABLE ,C-TABLELEN>>
+ <REPEAT ()
+ <COND (<==? .C .E> <RETURN .FLG>)
+ (<NOT <0? <GET .C ,C-ENABLED?>>>
+ <SET TICK <GET .C ,C-TICK>>
+ <COND (<0? .TICK>)
+ (T
+ <PUT .C ,C-TICK <- .TICK 1>>
+ <COND (<AND <NOT <G? .TICK 1>>
+ <APPLY <GET .C ,C-RTN>>>
+ <SET FLG T>)>)>)>
+ <SET C <REST .C ,C-INTLEN>>>>
diff --git a/crufty.xzap b/crufty.xzap
new file mode 100644
index 0000000..77a67bc
--- /dev/null
+++ b/crufty.xzap
@@ -0,0 +1,22 @@
+
+ .FUNCT THIS-IT?,OBJ,TBL,SYNS,?TMP1
+ FSET? OBJ,INVISIBLE /FALSE
+ ZERO? P-NAM /?THN3
+ GETPT OBJ,P?SYNONYM >SYNS
+ PTSIZE SYNS
+ DIV STACK,2
+ SUB STACK,1
+ CALL ZMEMQ,P-NAM,SYNS,STACK
+ ZERO? STACK /FALSE
+?THN3: ZERO? P-ADJ /?ELS8
+ GETPT OBJ,P?ADJECTIVE >SYNS
+ ZERO? SYNS /FALSE
+ PTSIZE SYNS
+ SUB STACK,1
+ CALL ZMEMQB,P-ADJ,SYNS,STACK
+ ZERO? STACK /FALSE
+?ELS8: ZERO? P-GWIMBIT /TRUE
+ FSET? OBJ,P-GWIMBIT /TRUE
+ RFALSE
+
+ .ENDI
diff --git a/crufty.zil b/crufty.zil
new file mode 100644
index 0000000..342049e
--- /dev/null
+++ b/crufty.zil
@@ -0,0 +1,17 @@
+"CRUFTY2 for
+ Zork: The Wizard of Frobozz
+ The Great Underground Empire (Part 2)
+ (c) Copyright 1981 Infocom, Inc. All Rights Reserved.
+"
+
+<ROUTINE THIS-IT? (OBJ TBL "AUX" SYNS)
+ #DECL ((OBJ) OBJECT (TBL) TABLE (SYNS) <OR FALSE TABLE>)
+ <AND <NOT <FSET? .OBJ ,INVISIBLE>>
+ <OR <NOT ,P-NAM>
+ <ZMEMQ ,P-NAM
+ <SET SYNS <GETPT .OBJ ,P?SYNONYM>>
+ <- </ <PTSIZE .SYNS> 2> 1>>>
+ <OR <NOT ,P-ADJ>
+ <AND <SET SYNS <GETPT .OBJ ,P?ADJECTIVE>>
+ <ZMEMQB ,P-ADJ .SYNS <- <PTSIZE .SYNS> 1>>>>
+ <OR <0? ,P-GWIMBIT> <FSET? .OBJ ,P-GWIMBIT>>>>
diff --git a/dungeon.zil b/dungeon.zil
new file mode 100644
index 0000000..c49f9e7
--- /dev/null
+++ b/dungeon.zil
@@ -0,0 +1,2409 @@
+"SEARCH <ROOM "
+
+"DUNGEON for
+ Interlogic SF Game
+ (c) Copyright 1981,1982 Infocom, Inc. All Rights Reserved
+"
+
+<DIRECTIONS NORTH EAST WEST SOUTH UP DOWN IN OUT LAND CROSS>
+
+"SUBTITLE GLOBAL OBJECTS"
+
+<GLOBAL LOAD-ALLOWED 100>
+
+<OBJECT GLOBAL-OBJECTS
+ (FLAGS RMUNGBIT INVISIBLE TOUCHBIT SURFACEBIT TRYTAKEBIT
+ SEARCHBIT TRANSBIT WEARBIT)>
+
+<OBJECT LOCAL-GLOBALS (IN GLOBAL-OBJECTS) (SYNONYM MGCKJK)>
+;"Yes, this synonym for LOCAL-GLOBALS needs to exist... sigh"
+
+<OBJECT ROOMS>
+
+<OBJECT INTNUM
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM INTNUM)
+ (DESC "number")
+ (ACTION INTNUM-FCN)>
+
+<OBJECT PSEUDO-OBJECT
+ (DESC "pseudo")
+ (ACTION INTNUM-FCN)>
+
+<OBJECT IT ;"was IT"
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM IT THAT THIS HIM)
+ (DESC "random object")
+ (FLAGS NDESCBIT)>
+
+<OBJECT PLANTERS
+ (IN LOCAL-GLOBALS)
+ (SYNONYM PLANTERS PLANT BOX BOXES)
+ (ADJECTIVE DEAD)
+ (DESC "planter")
+ (FLAGS NDESCBIT)
+ (ACTION PLANTER-FCN)>
+
+<OBJECT STAIRS
+ (IN LOCAL-GLOBALS)
+ (SYNONYM STAIRS STEPS LADDER STAIRWAY)
+ (DESC "stairs")
+ (FLAGS NDESCBIT CLIMBBIT)>
+
+<OBJECT GROUND ;"was GROUND"
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM GROUND EARTH FLOOR DIRT)
+ (DESC "ground")
+ (ACTION GROUND-FCN)>
+
+<OBJECT DEBRIS ;"was GROUND"
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM GARBAGE DEBRIS LEAVES)
+ (DESC "debris")
+ (ACTION DEBRIS-FCN)>
+
+<OBJECT HANDS ;"was HANDS"
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM PAIR HANDS)
+ (ADJECTIVE BARE)
+ (DESC "pair of hands")
+ (FLAGS NDESCBIT TOOLBIT)>
+
+<OBJECT ADVENTURER ;"was ADVENTURER"
+ (IN SPACESHIP-BRIDGE)
+ (SYNONYM ADVENTURER)
+ (DESC "cretin")
+ (FLAGS VILLAIN NDESCBIT INVISIBLE )
+ (ACTION ADVENTURER-FCN)>
+
+<OBJECT ME
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM ME MYSELF SELF WE)
+ (DESC "you")
+ (FLAGS VILLAIN)
+ (ACTION CRETIN)>
+
+\
+
+; "SUBTITLE ROOMS"
+
+; "SUBITLE YOUR SPACESHIP"
+
+<ROOM SPACESHIP-BRIDGE
+ (IN ROOMS)
+ (DESC "Bridge")
+ (WEST PER BRIDGE-EXITS) ;"SPACESHIP-QUARTERS"
+ (EAST PER BRIDGE-EXITS) ;"SPACESHIP-STORES"
+ (SOUTH PER BRIDGE-EXITS) ;"SPACESHIP-AIRLOCK"
+ (OUT PER BRIDGE-EXITS) ;"SPACESHIP-AIRLOCK"
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION BRIDGE-FCN)
+ (GLOBAL COUCH WINDOW AIRLOCK AIRLOCK-INNER ALARM MISSION-STATUS CONTROLS)
+ (PSEUDO "OBJECT" OBJECT-PSEUDO)>
+
+<OBJECT REGISTRATION
+ (IN SPACESHIP-BRIDGE)
+ (SYNONYM REGISTRATION)
+ (DESC "registration")
+ (FLAGS NDESCBIT READBIT)
+ (TEXT
+" Mining Class Ship \"Starcross\"|
+ Registered out of Ceres|
+ Registration 47291AA-4X|
+|
+ Designed by David Lebling|
+Constructed in 2178, Luna City Docks|
+ by Frobozzco Astronautics|
+ and Infocom, Inc.|
+")>
+
+<OBJECT MISSION-STATUS
+ (IN LOCAL-GLOBALS)
+ (SYNONYM STATUS SITUATION REPORT)
+ (ADJECTIVE STATUS MISSION)
+ (DESC "status")
+ (FLAGS NDESCBIT)>
+
+<OBJECT ARTIFACT
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM ARTIFACT)
+ (DESC "artifact")
+ (ACTION ARTIFACT-FCN)
+ (FLAGS NDESCBIT)>
+
+<OBJECT ALARM
+ (IN LOCAL-GLOBALS)
+ (SYNONYM ALARM BELL)
+ (DESC "mass-detector alarm")
+ (FLAGS NDESCBIT)
+ (ACTION ALARM-FCN)>
+
+<OBJECT RED-BUTTON
+ (IN SPACESHIP-BRIDGE)
+ (SYNONYM BUTTON)
+ (ADJECTIVE RED)
+ (DESC "red button")
+ (FLAGS NDESCBIT)
+ (ACTION ALARM-FCN)>
+
+<OBJECT DETECTOR
+ (IN SPACESHIP-BRIDGE)
+ (SYNONYM DETECTOR SCREEN)
+ (ADJECTIVE MASS READOUT)
+ (DESC "mass detector")
+ (FLAGS NDESCBIT)
+ (ACTION DETECTOR-FCN)>
+
+<OBJECT BUTTON
+ (IN SPACESHIP-BRIDGE)
+ (SYNONYM BUTTON)
+ (ADJECTIVE BLUE)
+ (DESC "blue button")
+ (FLAGS NDESCBIT)
+ (ACTION BUTTON-FCN)>
+
+<OBJECT CHART
+ (SYNONYM CHART MAP OUTPUT)
+ (ADJECTIVE ANOMALY MASS DETECTOR)
+ (DESC "mass detector output")
+ (FLAGS TAKEBIT READBIT)
+ (SIZE 1)
+ (TEXT
+"The output shows major mass concentrations in the vicinity, each with
+a code designation and the appropriate R, Theta, and Phi to describe its
+location relative to your course.")>
+
+<OBJECT COURSE
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM COURSE PROGRAM)
+ (ADJECTIVE NEW NAVIGATIONAL)
+ (DESC "course")
+ (FLAGS NDESCBIT)>
+
+<GLOBAL MASSES
+ <LTABLE UM08 UM12 UM24 UM28 UM31 UM52 UM70 UM91>>
+
+<GLOBAL MASS-LOCS
+ <TABLE 8 ;"number of objects in table"
+ ;"R THETA PHI"
+ 150 210 17
+ 100 345 107
+ 100 285 87
+ 250 45 178
+ 150 105 67
+ 175 165 35
+ 100 135 101
+ 50 15 121>>
+
+<GLOBAL KNOWNS
+ <LTABLE AB40 AX87 AX32 AX01 AX71 US75 MARS>>
+
+<GLOBAL KNOWN-LOCS
+ <TABLE 7 ;"number of objects in table"
+ ;"R THETA PHI"
+ 250 300 22
+ 125 75 102
+ 125 240 105
+ 200 240 134
+ 125 180 47
+ 175 135 34
+ 250 120 12>>
+
+<OBJECT UM08
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM UM08)
+ (ADJECTIVE MASS)
+ (DESC "mass UM08")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT UM12
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM UM12)
+ (ADJECTIVE MASS)
+ (DESC "mass UM12")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT UM24
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM UM24)
+ (ADJECTIVE MASS)
+ (DESC "mass UM24")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT UM28
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM UM28)
+ (ADJECTIVE MASS)
+ (DESC "mass UM28")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT UM31
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM UM31)
+ (ADJECTIVE MASS)
+ (DESC "mass UM31")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT UM52
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM UM52)
+ (ADJECTIVE MASS)
+ (DESC "mass UM52")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT UM70
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM UM70)
+ (ADJECTIVE MASS)
+ (DESC "mass UM70")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT UM91
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM UM91)
+ (ADJECTIVE MASS)
+ (DESC "mass UM91")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT AB40
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM AB40 CERES)
+ (ADJECTIVE MASS)
+ (DESC "mass AB40")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT AX87
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM AX87)
+ (ADJECTIVE MASS)
+ (DESC "mass AX87")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT AX32
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM AX32)
+ (ADJECTIVE MASS)
+ (DESC "mass AX32")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT AX01
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM AX01)
+ (ADJECTIVE MASS)
+ (DESC "mass AX01")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT AX71
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM AX71)
+ (ADJECTIVE MASS)
+ (DESC "mass AX71")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT US75
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM US75)
+ (ADJECTIVE MASS SHIP)
+ (DESC "ship US75")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT MARS
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM MARS)
+ (ADJECTIVE PLANET MASS)
+ (DESC "Mars")
+ (FLAGS NDESCBIT)
+ (ACTION MASS-FCN)>
+
+<OBJECT SHIP
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM SHIP SPACES STARCROSS)
+ (ADJECTIVE SPACE)
+ (DESC "ship")
+ (FLAGS NDESCBIT)
+ (ACTION SHIP-FCN)>
+
+<OBJECT COUCH
+ (IN LOCAL-GLOBALS)
+ (SYNONYM COUCH SEAT)
+ (ADJECTIVE CONTROL CRASH)
+ (DESC "control couch")
+ (FLAGS VEHBIT FURNITURE NDESCBIT CLIMBBIT)
+ (ACTION COUCH-FCN)
+ (CAPACITY 100)>
+
+<OBJECT SEAT-BELT
+ (IN SPACESHIP-BRIDGE)
+ (SYNONYM BELT SEATBELT)
+ (ADJECTIVE SEAT)
+ (DESC "seat belt")
+ (FLAGS NDESCBIT)
+ (ACTION SEAT-BELT-FCN)>
+
+<OBJECT CONTROLS
+ (IN LOCAL-GLOBALS)
+ (SYNONYM CONTROL PANEL CONSOLE INSTRUMENTS)
+ (DESC "control")
+ (FLAGS NDESCBIT)
+ (ACTION CONTROLS-FCN)>
+
+<OBJECT WINDOW
+ (IN LOCAL-GLOBALS)
+ (SYNONYM WINDOW PORT PORTHOLE VIEWPORT)
+ (ADJECTIVE VIEW)
+ (DESC "window")
+ (FLAGS VEHBIT NDESCBIT)
+ (ACTION PORTHOLE-FCN)>
+
+<ROOM SPACESHIP-QUARTERS
+ (IN ROOMS)
+ (LDESC "This cubicle is your rather spartan living quarters,
+containing only a bunk and a bureau. The only exit is to starboard.")
+ (DESC "Living Quarters")
+ (EAST TO SPACESHIP-BRIDGE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL ALARM)
+ (PSEUDO "BUREAU" BUREAU-PSEUDO)>
+
+<OBJECT BUNK
+ (IN SPACESHIP-QUARTERS)
+ (SYNONYM BUNK BED COT)
+ (DESC "bunk")
+ (FLAGS VEHBIT FURNITURE NDESCBIT CLIMBBIT)
+ (ACTION BUNK-FCN)
+ (CAPACITY 1000)>
+
+<ROOM SPACESHIP-STORES
+ (IN ROOMS)
+ (LDESC "This cubicle is used for storage. The only exit is to port.")
+ (DESC "Storage")
+ (WEST TO SPACESHIP-BRIDGE)
+ (GLOBAL ALARM)
+ (FLAGS RLANDBIT ONBIT)>
+
+<OBJECT SPACESUIT
+ (IN SPACESHIP-STORES)
+ (SYNONYM SPACES SUIT)
+ (ADJECTIVE SPACE PRESSURE MY GOOD)
+ (FDESC "Hanging on the rack is your space suit.")
+ (DESC "space suit")
+ (FLAGS TAKEBIT TRYTAKEBIT)
+ (SIZE 20)
+ (ACTION SPACESUIT-FCN)>
+
+<OBJECT JUNK-SPACESUIT
+ (IN CHIEF)
+ (SYNONYM SPACES SUIT)
+ (ADJECTIVE TATTERED ALIEN)
+ (DESC "tattered suit")
+ (FLAGS NDESCBIT TRYTAKEBIT TAKEBIT)
+ (SIZE 20)
+ (ACTION JUNK-SPACESUIT-FCN)>
+
+<OBJECT SAFETY-LINE
+ (IN SPACESHIP-STORES)
+ (SYNONYM LINE ROPE)
+ (ADJECTIVE SAFETY)
+ (DESC "safety line")
+ (FLAGS TAKEBIT TRYTAKEBIT)
+ (ACTION SAFETY-LINE-FCN)
+ (DESCFCN SAFETY-LINE-FCN)>
+
+<OBJECT SAFETY-HOOK
+ (IN LOCAL-GLOBALS)
+ (SYNONYM HOOK)
+ (ADJECTIVE SAFETY)
+ (DESC "hook")
+ (FLAGS NDESCBIT)>
+
+<ROOM SPACESHIP-AIRLOCK
+ (IN ROOMS)
+ (DESC "Airlock")
+ (NORTH TO SPACESHIP-BRIDGE IF AIRLOCK-INNER IS OPEN)
+ (IN TO SPACESHIP-BRIDGE IF AIRLOCK-INNER IS OPEN)
+ (NORTH PER AIRLOCK-EXIT-FCN)
+ (OUT PER AIRLOCK-EXIT-FCN)
+ (UP PER AIRLOCK-EXIT-FCN)
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION AIRLOCK-FCN)
+ (GLOBAL AIRLOCK AIRLOCK-INNER AIRLOCK-OUTER ALARM SAFETY-HOOK)>
+
+<OBJECT AIRLOCK
+ (IN LOCAL-GLOBALS)
+ (SYNONYM AIRLOCK)
+ (DESC "airlock")
+ (ACTION AIRLOCK-FCN)>
+
+<ROOM DEEP-SPACE ;"where you go if you leave ship in space"
+ (IN ROOMS)
+ (DESC "Outside Ship")
+ (IN TO SPACESHIP-AIRLOCK IF AIRLOCK-OUTER IS OPEN)
+ (FLAGS SPACEBIT ONBIT)
+ (ACTION DEEP-SPACE-FCN)
+ (GLOBAL AIRLOCK-OUTER SAFETY-HOOK)>
+
+<ROOM OUTER-SPACE ;"where you go if you leave artifact in space"
+ (IN ROOMS)
+ (DESC "Floating in Space")
+ (FLAGS SPACEBIT ONBIT)
+ (ACTION OUTER-SPACE-FCN)>
+
+<OBJECT AIRLOCK-OUTER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM DOOR BULKHEAD)
+ (ADJECTIVE OUTER)
+ (DESC "outer door")
+ (FLAGS NDESCBIT DOORBIT)
+ (ACTION AIRLOCK-DOORS-FCN)>
+
+<OBJECT AIRLOCK-INNER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM DOOR BULKHEAD)
+ (ADJECTIVE INNER)
+ (DESC "inner door")
+ (FLAGS NDESCBIT DOORBIT)
+ (ACTION AIRLOCK-DOORS-FCN)>
+
+<OBJECT COMPUTER
+ (IN SPACESHIP-BRIDGE)
+ (SYNONYM COMPUTER POWER)
+ (ADJECTIVE NAVIGATIONAL)
+ (DESC "computer")
+ (FLAGS NDESCBIT VICBIT)
+ (ACTION COMPUTER-FCN)>
+
+<OBJECT TAPE-PLAYER
+ (IN SPACESHIP-QUARTERS)
+ (SYNONYM RECORDER PLAYER VCR LIBRARY)
+ (ADJECTIVE TAPE TAPES VIDEO AUDIO)
+ (DESC "tape library")
+ (FLAGS TAKEBIT TRYTAKEBIT)
+ (ACTION TAPE-FCN)
+ (SIZE 10)>
+
+\
+
+; "SUBTITLE EXTERIOR OF ARTIFACT"
+
+<ROOM RED-DOCK
+ (IN ROOMS)
+ (DESC "Red Dock")
+ (FLAGS RLANDBIT SPACEBIT ONBIT)
+ (DOWN TO SPACESHIP-AIRLOCK IF AIRLOCK-OUTER IS OPEN)
+ (SOUTH TO SPACESHIP-AIRLOCK IF AIRLOCK-OUTER IS OPEN)
+ (UP TO RED-LOCK IF RED-OUTER IS OPEN)
+ (IN TO RED-LOCK IF RED-OUTER IS OPEN)
+ (ACTION RED-DOCK-FCN)
+ (GLOBAL RED-OUTER SAFETY-HOOK)
+ (VALUE 25)>
+
+<ROOM RED-LOCK
+ (IN ROOMS)
+ (DESC "Red Airlock")
+ (FLAGS RLANDBIT ONBIT)
+ (OUT TO RED-DOCK IF RED-OUTER IS OPEN)
+ (DOWN TO RED-DOCK IF RED-OUTER IS OPEN)
+ (UP TO RED-THREE IF RED-INNER IS OPEN)
+ (IN TO RED-THREE IF RED-INNER IS OPEN)
+ (ACTION RED-LOCK-FCN)
+ (GLOBAL RED-OUTER RED-INNER)>
+
+<OBJECT BLACK-KEY
+ (SYNONYM KEY RODS ROD)
+ (ADJECTIVE BLACK CRYSTAL)
+ (DESC "black rod")
+ (FLAGS TAKEBIT KEYBIT TRANSBIT)
+ (ACTION BLACK-KEY-FCN)
+ (VALUE 25)>
+
+<OBJECT RED-OUTER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM DOOR AIRLOCK BULKHEAD)
+ (ADJECTIVE RED OUTER)
+ (DESC "red outer door")
+ (FLAGS DOORBIT)
+ (ACTION RED-DOORS-FCN)>
+
+<OBJECT RELIEF
+ (IN RED-DOCK)
+ (SYNONYM RELIEF SCULPTURE SURFACE BUMPS)
+ (ADJECTIVE METAL SILVER)
+ (DESC "metal relief")
+ (LDESC
+"A round metal sculpture or relief covers part of the airlock door. You notice
+that it is made up of thousands of tiny hexagonal columns which extend various
+lengths from the surface, making a three-dimensional representation. You will
+have to examine it more closely to see the details.")
+ (FLAGS OPENBIT CONTBIT SEARCHBIT)
+ (ACTION RELIEF-FCN)>
+
+<OBJECT BUMP-2
+ (IN RED-DOCK)
+ (SYNONYM BUMP COLUMN)
+ (ADJECTIVE METAL EIGHTH NINTH TENTH CENTER OUTER LAST)
+ (DESC "eighth, ninth, or tenth bumps")
+ (FLAGS NDESCBIT)
+ (ACTION BUMP-FCN)>
+
+<OBJECT BUMP
+ (IN RED-DOCK)
+ (SYNONYM BUMP COLUMN)
+ (ADJECTIVE METAL FIRST SECOND THIRD FOURTH FIFTH SIXTH SEVENTH)
+ (DESC "first, second, third, fourth, fifth, sixth, or seventh bumps")
+ (FLAGS NDESCBIT)
+ (ACTION BUMP-FCN)>
+
+<OBJECT BABY-BUMP
+ (SYNONYM BUMP COLUMN HEXAGON)
+ (ADJECTIVE SMALL LONG NEW TINY)
+ (DESC "small bump")
+ (FLAGS NDESCBIT)
+ (ACTION BUMP-FCN)>
+
+<OBJECT RED-INNER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM AIRLOCK DOOR BULKHEAD)
+ (ADJECTIVE RED INNER)
+ (DESC "red inner door")
+ (FLAGS DOORBIT)
+ (ACTION RED-DOORS-FCN)>
+
+<ROOM BLUE-DOCK
+ (IN ROOMS)
+ (LDESC
+"You are viewing this area, color-coded in blue, through the first of several
+transparent bubbles connecting the dock with a large spherical object tethered
+by silvery ropes. The blue airlock dome is behind you, and the spherical
+spaceship is aft of here. There is a hook by the airlock.")
+ (DESC "Blue Dock")
+ (FLAGS RLANDBIT ONBIT)
+ (DOWN TO BUBBLE-ROOM)
+ (SOUTH TO BUBBLE-ROOM)
+ (UP TO BLUE-LOCK IF BLUE-OUTER IS OPEN)
+ (IN TO BLUE-LOCK IF BLUE-OUTER IS OPEN)
+ (GLOBAL BLUE-OUTER SAFETY-HOOK)
+ (PSEUDO "BUBBLE" BUBBLE-PSEUDO)>
+
+<ROOM BUBBLE-ROOM
+ (IN ROOMS)
+ (DESC "Bubbles")
+ (LDESC
+"This is a series of large plastic bubbles connecting the blue airlock
+with a spherical spaceship docked aft of here. The bubbles are made of
+a thick material which is nonetheless transparent.")
+ (NORTH TO BLUE-DOCK)
+ (SOUTH TO SPHERE-SHIP)
+ (IN TO SPHERE-SHIP)
+ (ACTION BUBBLE-ROOM-FCN)
+ (FLAGS RLANDBIT ONBIT)
+ (PSEUDO "BUBBLE" BUBBLE-PSEUDO)>
+
+<ROOM SPHERE-SHIP
+ (IN ROOMS)
+ (DESC "Spherical Ship")
+ (LDESC
+"You are within a huge bubble that is somehow transparent from this
+side. The interior is crisscrossed with wire webbing, so that a
+sufficiently agile creature could move around using only the wires. Many
+objects are stuck in the wires in various out-of-reach places. The whole
+impression is of a rather untidy spiderweb. The connection to the
+artifact is at the forward end of the sphere.")
+ (NORTH TO BUBBLE-ROOM)
+ (OUT TO BUBBLE-ROOM)
+ (ACTION SPHERE-SHIP-FCN)
+ (FLAGS RLANDBIT ONBIT)>
+
+<OBJECT SPIDER
+ (IN SPHERE-SHIP)
+ (SYNONYM SPIDER GURTHARK BESNAP)
+ (ADJECTIVE GIANT)
+ (DESC "giant spider")
+ (FLAGS VILLAIN OPENBIT CONTBIT VICBIT SEARCHBIT)
+ (LDESC
+"Crouched in the center of the sphere, where all the wires converge, is a
+creature which resembles a giant spider. A closer look reveals that it is not
+an insect, but rather a multi-legged, endoskeletal mammal. It has huge eyes
+and impressive grinding teeth. It grips the wires with many tiny fingers. As
+you watch it, it gazes back with almost hypnotic intensity.")
+ (ACTION SPIDER-FCN)>
+
+<OBJECT YELLOW-KEY
+ (SYNONYM KEY RODS ROD OBJECT)
+ (ADJECTIVE YELLOW CRYSTAL)
+ (DESC "yellow rod")
+ (VALUE 25)
+ (FLAGS TAKEBIT KEYBIT TRANSBIT)>
+
+<OBJECT TRANSLATOR
+ (IN SPIDER)
+ (SYNONYM TRANSLATOR OBJECT)
+ (DESC "translator")
+ (ACTION TRANSLATOR-FCN)
+ (FLAGS NDESCBIT)>
+
+<ROOM BLUE-LOCK
+ (IN ROOMS)
+ (DESC "Blue Airlock")
+ (FLAGS RLANDBIT ONBIT)
+ (OUT TO BLUE-DOCK IF BLUE-OUTER IS OPEN)
+ (DOWN TO BLUE-DOCK IF BLUE-OUTER IS OPEN)
+ (IN TO BLUE-THREE IF BLUE-INNER IS OPEN)
+ (UP TO BLUE-THREE IF BLUE-INNER IS OPEN)
+ (ACTION BLUE-LOCK-FCN)
+ (GLOBAL BLUE-OUTER BLUE-INNER)>
+
+<OBJECT BLUE-OUTER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM DOOR AIRLOCK)
+ (ADJECTIVE BLUE OUTER BULKHEAD)
+ (DESC "blue outer door")
+ (FLAGS DOORBIT)
+ (ACTION BLUE-DOORS-FCN)>
+
+<OBJECT BLUE-INNER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM AIRLOCK DOOR BULKHEAD)
+ (ADJECTIVE BLUE INNER)
+ (DESC "blue inner door")
+ (FLAGS DOORBIT)
+ (ACTION BLUE-DOORS-FCN)>
+
+<ROOM YELLOW-DOCK
+ (IN ROOMS)
+ (DESC "Yellow Dock")
+ (FLAGS RLANDBIT SPACEBIT ONBIT)
+ (UP TO YELLOW-LOCK IF YELLOW-OUTER IS OPEN)
+ (IN TO YELLOW-LOCK IF YELLOW-OUTER IS OPEN)
+ (WEST PER YELLOW-DOCK-EXITS)
+ (ACTION YELLOW-DOCK-FCN)
+ (GLOBAL YELLOW-OUTER SAFETY-HOOK)
+ (PSEUDO "ALIEN" SCORCHED-PSEUDO "BODY" SCORCHED-PSEUDO)>
+
+<ROOM YELLOW-DOCK-EDGE
+ (IN ROOMS)
+ (DESC "Among Debris")
+ (LDESC
+"You are among the blackened and twisted metal left by a huge explosion. The
+tentacle housings have been destroyed. To starboard is the airlock dome.")
+ (FLAGS RLANDBIT SPACEBIT ONBIT)
+ (EAST TO YELLOW-DOCK)
+ (ACTION YELLOW-DOCK-EDGE-FCN)>
+
+<ROOM YELLOW-LOCK
+ (IN ROOMS)
+ (DESC "Yellow Airlock")
+ (FLAGS RLANDBIT)
+ (OUT TO YELLOW-DOCK IF YELLOW-OUTER IS OPEN)
+ (IN TO YELLOW-THREE IF YELLOW-INNER IS OPEN)
+ (UP TO YELLOW-THREE IF YELLOW-INNER IS OPEN)
+ (DOWN TO YELLOW-DOCK IF YELLOW-OUTER IS OPEN)
+ (ACTION YELLOW-LOCK-FCN)
+ (GLOBAL YELLOW-OUTER YELLOW-INNER)>
+
+<OBJECT YELLOW-OUTER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM AIRLOCK DOOR BULKHEAD)
+ (ADJECTIVE YELLOW OUTER)
+ (DESC "yellow outer door")
+ (FLAGS DOORBIT)
+ (ACTION YELLOW-DOORS-FCN)>
+
+<OBJECT SCORCHED-ALIEN
+ (IN YELLOW-DOCK-EDGE)
+ (SYNONYM ALIEN REPTILE)
+ (ADJECTIVE SCORCHED)
+ (LDESC
+"Entangled in the wreckage is the scorched body of a creature which appears
+to have been a large reptile, almost a miniature allosaurus. It is clad in
+the remains of a space suit.")
+ (DESC "scorched alien")
+ (FLAGS VILLAIN OPENBIT CONTBIT VICBIT SEARCHBIT)>
+
+<OBJECT PINK-KEY
+ (IN SCORCHED-ALIEN)
+ (SYNONYM KEY RODS ROD)
+ (ADJECTIVE PINK CRYSTAL)
+ (DESC "pink rod")
+ (FLAGS TAKEBIT KEYBIT TRANSBIT)
+ (VALUE 25)
+ (FDESC "Clutched in the reptile's claw is a pink rod.")>
+
+<OBJECT YELLOW-INNER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM AIRLOCK DOOR BULKHEAD)
+ (ADJECTIVE YELLOW INNER)
+ (DESC "yellow inner door")
+ (FLAGS DOORBIT)
+ (ACTION YELLOW-DOORS-FCN)>
+
+<ROOM GREEN-DOCK
+ (IN ROOMS)
+ (LDESC
+"A plastic umbilical leads away to port from the green airlock. There is
+a hook next to the airlock.")
+ (DESC "Green Dock")
+ (FLAGS RLANDBIT ONBIT)
+ (WEST TO UMBILICAL)
+ (DOWN TO UMBILICAL)
+ (UP TO GREEN-LOCK IF GREEN-OUTER IS OPEN)
+ (IN TO GREEN-LOCK IF GREEN-OUTER IS OPEN)
+ (GLOBAL GREEN-OUTER SAFETY-HOOK)>
+
+<ROOM GREEN-LOCK
+ (IN ROOMS)
+ (DESC "Green Airlock")
+ (FLAGS RLANDBIT ONBIT)
+ (OUT TO GREEN-DOCK IF GREEN-OUTER IS OPEN)
+ (DOWN TO GREEN-DOCK IF GREEN-OUTER IS OPEN)
+ (UP PER GREEN-LOCK-EXIT)
+ ;(IN PER GREEN-LOCK-EXIT) ;"FIX THIS IF COMPILER EVER RECOMPILED..."
+ (ACTION GREEN-LOCK-FCN)
+ (GLOBAL GREEN-OUTER GREEN-INNER)>
+
+<OBJECT GREEN-OUTER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM DOOR AIRLOCK BULKHEAD)
+ (ADJECTIVE GREEN OUTER)
+ (DESC "green outer door")
+ (FLAGS DOORBIT)
+ (ACTION GREEN-DOORS-FCN)>
+
+<OBJECT GREEN-INNER
+ (IN LOCAL-GLOBALS)
+ (SYNONYM DOOR AIRLOCK BULKHEAD)
+ (ADJECTIVE GREEN INNER)
+ (DESC "green inner door")
+ (FLAGS DOORBIT OPENBIT)
+ (ACTION GREEN-DOORS-FCN)>
+
+\
+
+; "SUBTITLE MAIN HALLWAYS"
+
+<ROOM RED-ONE
+ (IN ROOMS)
+ (LDESC
+"The red hall ends here. A smaller corridor curves away on both sides.
+The light is dim and the plants are stunted.")
+ (DESC "Red Hall")
+ (NORTH "The hall ends here.")
+ (SOUTH TO RED-TWO)
+ (EAST TO GREEN-ONE)
+ (WEST TO BLUE-ONE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM RED-TWO
+ (IN ROOMS)
+ (LDESC
+"This is a long, dim corridor that intersects what looks like a ring corridor.
+The overheads are not very bright here, and the plant growth is feeble.")
+ (DESC "Red Hall")
+ (NORTH TO RED-ONE)
+ (SOUTH TO RED-THREE)
+ (EAST TO GREEN-TWO)
+ (WEST TO BLUE-RED-TWO)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM RED-THREE
+ (IN ROOMS)
+ (LDESC
+"This is a wide room with corridors leading in four directions and a ladder
+down to the airlock. The lighting is poor, as though the lights were worn out.
+Halfway up the walls are planters full of wilted plants.")
+ (DESC "Red Hall")
+ (DOWN TO RED-LOCK IF RED-INNER IS OPEN)
+ (OUT TO RED-LOCK IF RED-INNER IS OPEN)
+ (NORTH TO RED-TWO)
+ (SOUTH TO RED-FOUR)
+ (EAST TO VILLAGE-NW-EDGE)
+ (WEST TO BLUE-THREE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL RED-INNER PLANTERS STAIRS)>
+
+<ROOM RED-FOUR
+ (IN ROOMS)
+ (LDESC
+"This is part of a long hall with failing lights. It intersects with another
+corridor at right angles. The plant boxes here are empty.")
+ (DESC "Red Hall")
+ (NORTH TO RED-THREE)
+ (SOUTH TO RED-FIVE)
+ (EAST TO VILLAGE-SW-EDGE)
+ (WEST TO BLUE-RED-FOUR)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM RED-FIVE
+ (IN ROOMS)
+ (LDESC
+"This the end of the red hall where it T's with the aft-most ring corridor.
+The lighting is poor and the plant boxes here are empty and battered.")
+ (DESC "Red Hall")
+ (NORTH TO RED-FOUR)
+ (SOUTH "The hall ends here.")
+ (EAST TO GREEN-FIVE)
+ (WEST TO BLUE-FIVE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM BLUE-ONE
+ (IN ROOMS)
+ (LDESC
+"The fore end of the blue hall meets a ring corridor here.")
+ (DESC "Blue Hall")
+ (NORTH "The blue hall ends here.")
+ (SOUTH TO BLUE-ONE-TWO)
+ (EAST TO RED-ONE)
+ (WEST TO YELLOW-ONE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM BLUE-ONE-TWO
+ (IN ROOMS)
+ (DESC "Blue Hall")
+ (LDESC
+"This is near the fore end of the blue hall, where a small exit leads to
+port. The main corridor continues fore and aft.")
+ (NORTH TO BLUE-ONE)
+ (SOUTH TO BLUE-TWO)
+ (WEST TO OBSERVATORY)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM OBSERVATORY
+ (IN ROOMS)
+ (DESC "Observatory")
+ (EAST TO BLUE-ONE-TWO)
+ (OUT TO BLUE-ONE-TWO)
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION OBSERVATORY-FCN)>
+
+<OBJECT SMOKED-GLASS
+ (IN CARGO-ROOM)
+ (SYNONYM FRAGMENT PIECE)
+ (ADJECTIVE SMOKED BLACK GLASS VISOR)
+ (FDESC
+"A large fragment of black smoked glass from the visor of the alien chief's
+helmet lies on the floor.")
+ (DESC "black visor fragment")
+ (FLAGS TAKEBIT TRANSBIT)
+ (SIZE 2)>
+
+<OBJECT CLEAR-KEY
+ (IN SLIDE-PROJECTOR)
+ (SYNONYM KEY RODS ROD RAINBOW)
+ (ADJECTIVE CLEAR)
+ (DESC "clear rod")
+ (FDESC
+"A dazzling rainbow of colors bathes a clear crystal rod which rests
+in the light path.")
+ (VALUE 25)
+ (FLAGS INVISIBLE TRYTAKEBIT TAKEBIT KEYBIT TRANSBIT)>
+
+<OBJECT SLIDE-PROJECTOR
+ (IN OBSERVATORY)
+ (SYNONYM PROJECTOR LASER)
+ (ADJECTIVE SLIDE IMAGE HOLOGRAPHIC)
+ (DESC "holographic projector")
+ (FDESC
+"A holographic projector is on one wall.")
+ (FLAGS CONTBIT OPENBIT)
+ (ACTION SLIDE-PROJECTOR-FCN)
+ (CONTFCN SLIDE-PROJECTOR-FCN)
+ (CAPACITY 10)>
+
+<OBJECT LASER-BEAM
+ (IN OBSERVATORY)
+ (SYNONYM BEAM ENERGY LIGHT)
+ (ADJECTIVE LASER LIGHT)
+ (DESC "light beam")
+ (ACTION LASER-BEAM-FCN)
+ (FLAGS NDESCBIT VICBIT)>
+
+<OBJECT MODEL
+ (IN OBSERVATORY)
+ (SYNONYM MODEL SYSTEM PLANET)
+ (ADJECTIVE SOLAR)
+ (DESC "model")
+ (FLAGS NDESCBIT)>
+
+<ROOM BLUE-TWO
+ (IN ROOMS)
+ (LDESC
+"The junction of a wide fore-aft corridor and a smaller ring corridor. There is
+some dirt on the floor, freshly scattered.")
+ (DESC "Blue Hall")
+ (NORTH TO BLUE-ONE-TWO)
+ (SOUTH TO BLUE-THREE)
+ (EAST TO BLUE-RED-TWO)
+ (WEST TO YELLOW-TWO)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM BLUE-RED-TWO
+ (IN ROOMS)
+ (LDESC
+"The ring corridor here has an exit forward to a large open area. There is
+fresh dirt scattered about, and an acrid smell.")
+ (DESC "Room on Ring Two")
+ (NORTH TO ZOO)
+ (WEST TO BLUE-TWO)
+ (EAST TO RED-TWO)
+ (FLAGS RLANDBIT ONBIT)>
+
+<ROOM BLUE-THREE
+ (IN ROOMS)
+ (DESC "Blue Hall")
+ (LDESC
+"A ring corridor joins the blue hall here. There is an entrance (presumably
+for the blue docking area) below, and also a way up.")
+ (DOWN TO BLUE-LOCK IF BLUE-INNER IS OPEN)
+ (OUT TO BLUE-LOCK IF BLUE-INNER IS OPEN)
+ (UP PER METAL-BAND-EXIT)
+ (NORTH TO BLUE-TWO)
+ (SOUTH TO BLUE-34)
+ (EAST TO RED-THREE)
+ (WEST TO YELLOW-THREE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL BLUE-INNER PLANTERS LADDER)>
+
+<ROOM BLUE-FOUR
+ (IN ROOMS)
+ (LDESC
+"Another junction, the ring corridor curving away to port and starboard.
+The hall is damaged and bare rock protrudes in spots.")
+ (DESC "Blue Hall")
+ (NORTH TO BLUE-34)
+ (SOUTH TO BLUE-FIVE)
+ (EAST TO BLUE-RED-FOUR)
+ (WEST TO YELLOW-FOUR)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM BLUE-FIVE
+ (IN ROOMS)
+ (LDESC
+"The blue corridor goes no further aft, but a ring corridor leads away
+to port and starboard.")
+ (DESC "Blue Hall")
+ (NORTH TO BLUE-FOUR)
+ (SOUTH "The hall ends here.")
+ (EAST TO RED-FIVE)
+ (WEST TO YELLOW-FIVE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM YELLOW-ONE
+ (IN ROOMS)
+ (LDESC
+"This is the fore end of the yellow hall. The planters hold dry, dead
+plants. The usual ring corridor joins the main hall.")
+ (DESC "Yellow Hall")
+ (NORTH "The hall ends here.")
+ (SOUTH TO YELLOW-TWO)
+ (EAST TO BLUE-ONE)
+ (WEST TO GREEN-YELLOW-ONE)
+ (FLAGS RLANDBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM YELLOW-TWO
+ (IN ROOMS)
+ (LDESC
+"A junction between the yellow hall and a brightly-lit ring corridor. The
+planters have been removed.")
+ (DESC "Yellow Hall")
+ (NORTH TO YELLOW-ONE)
+ (SOUTH TO YELLOW-THREE)
+ (EAST TO BLUE-TWO)
+ (WEST TO GREEN-TWO)
+ (FLAGS RLANDBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM YELLOW-THREE
+ (IN ROOMS)
+ (LDESC
+"This is the intersection between the yellow hall and a large ring corridor.
+The airlock for the yellow dock is down from here. The plant boxes are empty.")
+ (DESC "Yellow Hall")
+ (DOWN TO YELLOW-LOCK IF YELLOW-INNER IS OPEN)
+ (OUT TO YELLOW-LOCK IF YELLOW-INNER IS OPEN)
+ (NORTH TO YELLOW-TWO)
+ (SOUTH TO YELLOW-FOUR)
+ (EAST TO BLUE-THREE)
+ (WEST TO VILLAGE-NE-EDGE)
+ (FLAGS RLANDBIT)
+ (GLOBAL YELLOW-INNER PLANTERS LADDER)>
+
+<ROOM YELLOW-FOUR
+ (IN ROOMS)
+ (LDESC
+"This is a wide hall whose maintenance has been neglected. The planters are
+untended. A ring corridor leads port and starboard.")
+ (DESC "Yellow Hall")
+ (NORTH TO YELLOW-THREE)
+ (SOUTH TO YELLOW-FOUR-FIVE)
+ (EAST TO BLUE-FOUR)
+ (WEST TO VILLAGE-SE-EDGE)
+ (FLAGS RLANDBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM YELLOW-FOUR-FIVE
+ (IN ROOMS)
+ (LDESC
+"The yellow corridor continues fore and aft, but a well-lit passage leads
+starboard.")
+ (DESC "Yellow Hall")
+ (NORTH TO YELLOW-FOUR)
+ (SOUTH TO YELLOW-FIVE)
+ (EAST TO FF-ROOM)
+ (FLAGS RLANDBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM YELLOW-FIVE
+ (IN ROOMS)
+ (LDESC
+"The yellow hall ends here and a ring corridor curves away to port and
+starboard.")
+ (DESC "Yellow Hall")
+ (NORTH TO YELLOW-FOUR-FIVE)
+ (SOUTH "The corridor comes to an end here.")
+ (EAST TO BLUE-FIVE)
+ (WEST TO GREEN-FIVE)
+ (FLAGS RLANDBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM GREEN-ONE
+ (IN ROOMS)
+ (LDESC
+"The green hall ends here at a ring corridor. The planters are well-tended.")
+ (DESC "Green Hall")
+ (NORTH "The hall ends here.")
+ (SOUTH TO GREEN-TWO)
+ (EAST TO GREEN-YELLOW-ONE)
+ (WEST TO RED-ONE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM GREEN-TWO
+ (IN ROOMS)
+ (LDESC
+"The green hall joins a ring corridor here. The plants here look healthy.")
+ (DESC "Green Hall")
+ (NORTH TO GREEN-ONE)
+ (SOUTH TO VILLAGE-N-EDGE)
+ (EAST TO YELLOW-TWO)
+ (WEST TO RED-TWO)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+<ROOM VILLAGE
+ (IN ROOMS)
+ (LDESC
+"This section of the hall has been made into an encampment, with primitive
+huts of various sizes filling the passage. They are so close they almost form
+a single large structure with many small entrances and exits. Many aliens are
+milling about, of all sizes and colors of fur. The only way to continue down
+the corridor is through the warren.")
+ (DESC "Village Center")
+ (EAST PER ENTER-WARREN)
+ (WEST TO VILLAGE-NW-EDGE)
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION VILLAGE-FCN)
+ (GLOBAL GLOBAL-CHIEF ALIENS SPEAR HUTS)
+ (PSEUDO "WIFE" WIFE-PSEUDO "CHILD" CHILD-PSEUDO)>
+
+\
+
+"SUBTITLE VILLAGE MAZE"
+
+<ROOM MAZE
+ (IN ROOMS)
+ (LDESC
+"This is an earth and reed burrow within the warren. There are many
+aliens here, going about their business. Some of the littler ones
+stare at you and make funny noises. There are passages all over the
+place, and a constant traffic in and out.")
+ (DESC "In the Warren")
+ (UP TO MAZE)
+ (DOWN TO MAZE)
+ (IN TO MAZE)
+ (OUT TO MAZE)
+ (SOUTH TO MAZE)
+ (WEST TO MAZE)
+ (EAST TO MAZE)
+ (NORTH TO MAZE)
+ (ACTION MAZE-FCN)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL GLOBAL-CHIEF ALIENS SPEAR)>
+
+<ROOM GREEN-THREE
+ (IN ROOMS)
+ (LDESC
+
+"This burrow is deep within the warren and the aliens seem to avoid it.
+An exit to port leads back into the warren. The walls are covered with
+crude but vibrant paintings depicting a huge spider, a gigantic mouse,
+man-sized lizards, and in the center, in ochre pigment, a being in a
+space suit. A close look reveals that this room is the center of the
+green hall's junction with the ring corridor. In fact, a ladder leads
+down to the green airlock.")
+ (DESC "Center of the Warren")
+ (IN TO MAZE)
+ (WEST TO MAZE)
+ (OUT TO GREEN-LOCK IF GREEN-INNER IS OPEN)
+ (DOWN TO GREEN-LOCK IF GREEN-INNER IS OPEN)
+ (ACTION GREEN-THREE-FCN)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL STAIRS GREEN-INNER GLOBAL-CHIEF PLANTERS)>
+
+\
+
+<ROOM GREEN-FOUR
+ (IN ROOMS)
+ (LDESC
+"A primitive village has been built here, almost choking the passage off. The
+village extends forward, becoming even more closely built to form a palisade
+built of mud and wood which completely blocks the corridor.")
+ (DESC "Village Suburbs")
+ (NORTH "The corridor is blocked by a mud and wood palisade.")
+ (SOUTH TO VILLAGE-S-EDGE)
+ (EAST TO VILLAGE-SE-EDGE)
+ (WEST TO VILLAGE-SW-EDGE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL GLOBAL-CHIEF ALIENS SPEAR PLANTERS PALISADE)>
+
+<OBJECT CHIEF
+ (SYNONYM ALIEN CHIEF CHIEFTAIN)
+ (ADJECTIVE GREY WEASEL)
+ (DESC "weasel chieftain")
+ (FLAGS VILLAIN CONTBIT OPENBIT VICBIT SEARCHBIT)
+ (DESCFCN CHIEF-FCN)
+ (ACTION CHIEF-FCN)>
+
+<OBJECT GLOBAL-CHIEF
+ (IN LOCAL-GLOBALS)
+ (SYNONYM ALIEN CHIEF CHIEFTAIN)
+ (ADJECTIVE GREY WEASEL)
+ (DESC "weasel chieftain")
+ (FLAGS VILLAIN CONTBIT OPENBIT VICBIT SEARCHBIT INVISIBLE)
+ (ACTION CHIEF-FCN)>
+
+<OBJECT BROWN-KEY
+ (IN CHIEF)
+ (SYNONYM KEY RODS ROD)
+ (ADJECTIVE CHIEFS BROWN CRYSTAL)
+ (DESC "brown rod")
+ (VALUE 25)
+ (FLAGS NDESCBIT TRYTAKEBIT TAKEBIT KEYBIT TRANSBIT)
+ (ACTION BROWN-KEY-FCN)>
+
+<OBJECT ALIENS
+ (IN LOCAL-GLOBALS)
+ (SYNONYM ALIENS ALIEN WEASEL HUNTER)
+ (ADJECTIVE GREY)
+ (DESC "weasel-like alien")
+ (FLAGS VILLAIN VICBIT)
+ (ACTION ALIENS-FCN)>
+
+<OBJECT PALISADE
+ (IN LOCAL-GLOBALS)
+ (SYNONYM PALISADE WALL)
+ (ADJECTIVE MUD WOOD)
+ (DESC "palisade")
+ (FLAGS VICBIT CLIMBBIT)
+ (ACTION PALISADE-FCN)>
+
+<ROOM VILLAGE-N-EDGE
+ (IN ROOMS)
+ (LDESC
+"This is the edge of an inhabited area. Crude hovels are scattered here and
+there, becoming denser as you move aft.")
+ (DESC "Outskirts of Village")
+ (NORTH TO GREEN-TWO)
+ (SOUTH "The corridor is blocked by a wood and mud palisade.")
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL GLOBAL-CHIEF ALIENS SPEAR PLANTERS PALISADE)>
+
+<ROOM VILLAGE-NW-EDGE
+ (IN ROOMS)
+ (DESC "Outskirts of Village")
+ (WEST TO RED-THREE)
+ (EAST TO VILLAGE)
+ (ACTION VILLAGE-NW-EDGE-FCN)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL GLOBAL-CHIEF ALIENS SPEAR PLANTERS)>
+
+<ROOM VILLAGE-NE-EDGE
+ (IN ROOMS)
+ (LDESC
+"This is the fringe of a populated area lying to port. The corridor is filled
+with primitive huts, and is being used for the cultivation of grain. It seems
+that the inhabitants heard you coming and have fled." )
+ (DESC "Outskirts of Village")
+ (WEST "The corridor is blocked by a wood and mud palisade.")
+ (EAST TO YELLOW-THREE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL GLOBAL-CHIEF HUTS PLANTERS PALISADE)>
+
+<ROOM VILLAGE-SW-EDGE
+ (IN ROOMS)
+ (LDESC
+"This is the edge of an inhabited area lying to starboard. Some odd vegetables
+are growing here, but the inhabitants, if any, have scattered.")
+ (DESC "Outskirts of Village")
+ (WEST TO RED-FOUR)
+ (EAST TO GREEN-FOUR)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL GLOBAL-CHIEF PLANTERS)>
+
+<ROOM VILLAGE-SE-EDGE
+ (IN ROOMS)
+ (LDESC
+"This is the fringe of an inhabited area lying to port. The corridor is filled
+with cultivated plantings, although the farmers have apparently fled before
+you.")
+ (DESC "Outskirts of Village")
+ (WEST TO GREEN-FOUR)
+ (EAST TO YELLOW-FOUR)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL GLOBAL-CHIEF PLANTERS)>
+
+<ROOM VILLAGE-S-EDGE
+ (IN ROOMS)
+ (LDESC
+"This is the aft edge of a settled area. The corridor has a dirt floor here,
+and several well-used paths lead forward.")
+ (DESC "Outskirts of Village")
+ (NORTH TO GREEN-FOUR)
+ (SOUTH TO GREEN-FIVE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL GLOBAL-CHIEF PLANTERS)>
+
+<ROOM GREEN-FIVE
+ (IN ROOMS)
+ (LDESC
+"This is the aft end of the green hall, well-tended and brightly lit,
+where a typical ring corridor crosses.")
+ (DESC "Green Hall")
+ (NORTH TO VILLAGE-S-EDGE)
+ (SOUTH "The corridor comes to an end here.")
+ (EAST TO YELLOW-FIVE)
+ (WEST TO RED-FIVE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+\
+
+"MAINTENANCE MICE ET AL"
+
+<OBJECT GLOBAL-MOUSE
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM MOUSE SWEEPER RECEPTACLE)
+ (ADJECTIVE MAINTENANCE)
+ (DESC "maintenance mouse")
+ (FLAGS CONTBIT SURFACEBIT TRANSBIT)
+ (LDESC "There is a maintenance mouse here, cheerfully scouring the
+area for dirt and discarded junk.")
+ (ACTION MOUSE-FCN)
+ (CAPACITY 1000)>
+
+<OBJECT MOUSE
+ (IN BLUE-RED-FOUR)
+ (SYNONYM MOUSE SWEEPER RECEPTACLE TRAY)
+ (ADJECTIVE MAINTENANCE)
+ (DESC "maintenance mouse")
+ (FLAGS CONTBIT SURFACEBIT OPENBIT TRANSBIT SEARCHBIT)
+ (DESCFCN MOUSE-FCN)
+ (ACTION MOUSE-FCN)
+ (CONTFCN MOUSE-CONT)
+ (CAPACITY 1000)>
+
+<OBJECT MOUSE-HOLE
+ (SYNONYM HOLE DOOR)
+ (ADJECTIVE MOUSE)
+ (DESC "mouse hole")
+ (FLAGS DOORBIT)
+ (LDESC "There is a barely visible mouse hole in the wall here.")
+ (ACTION HOLE-FCN)>
+
+\
+
+"STEPPING DISKS"
+
+<GLOBAL RED-DISK-ON <>>
+<GLOBAL BLUE-DISK-ON <>>
+
+<OBJECT RED-DISK
+ (IN FF-ROOM)
+ (SYNONYM DISK DISKS)
+ (ADJECTIVE RED THIN)
+ (FDESC
+"A thin red disk the size of a manhole cover hangs on the wall.")
+ (LDESC "There is a thin red disk the size of a manhole cover here.")
+ (DESC "red disk")
+ (FLAGS TAKEBIT TRYTAKEBIT SURFACEBIT CONTBIT OPENBIT VEHBIT)
+ (ACTION DISK-FCN)
+ (SIZE 10)
+ (CAPACITY 200)>
+
+<OBJECT BLUE-DISK
+ (IN FF-ROOM)
+ (SYNONYM DISK DISKS)
+ (ADJECTIVE BLUE THIN)
+ (FDESC
+"A thin blue disk the size of a manhole cover hangs on the wall.")
+ (LDESC "There is a thin blue disk the size of a manhole cover here.")
+ (DESC "blue disk")
+ (FLAGS TAKEBIT TRYTAKEBIT SURFACEBIT CONTBIT OPENBIT VEHBIT)
+ (ACTION DISK-FCN)
+ (CAPACITY 200)
+ (SIZE 10)>
+
+<OBJECT FF-DIAL
+ (IN FF-ROOM)
+ (SYNONYM DIAL)
+ (ADJECTIVE CONTROL)
+ (DESC "dial")
+ (FLAGS NDESCBIT)
+ (ACTION FF-DIAL-FCN)>
+
+<OBJECT FORCE-FIELD-1
+ (SYNONYM FIELD SPHERE BALL GLOBE)
+ (ADJECTIVE FORCE SILVER)
+ (DESC "silver sphere")
+ (DESCFCN FF-FCN)
+ (FLAGS NDESCBIT CONTBIT OPENBIT VEHBIT)
+ (ACTION FF-FCN)>
+
+<OBJECT FORCE-FIELD-2
+ (IN FF-ROOM)
+ (SYNONYM FIELD SPHERE BALL GLOBE)
+ (ADJECTIVE FORCE SILVER)
+ (DESC "silver sphere")
+ (DESCFCN FF-FCN)
+ (FLAGS NDESCBIT SURFACEBIT CONTBIT OPENBIT VEHBIT)
+ (ACTION FF-FCN)>
+
+<OBJECT FF-BOWL-2
+ (SYNONYM FIELD)
+ (DESC "bowl")>
+
+<OBJECT FORCE-FIELD-3
+ (SYNONYM FIELD SPHERE BALL GLOBE)
+ (ADJECTIVE FORCE SILVER)
+ (DESC "silver sphere")
+ (DESCFCN FF-FCN)
+ (FLAGS NDESCBIT SURFACEBIT CONTBIT OPENBIT VEHBIT)
+ (ACTION FF-FCN)>
+
+<OBJECT FF-BOWL-3
+ (SYNONYM FIELD)
+ (DESC "bowl")>
+
+<OBJECT FORCE-FIELD-4
+ (SYNONYM FIELD SPHERE BALL GLOBE)
+ (ADJECTIVE FORCE SILVER)
+ (DESC "silver sphere")
+ (DESCFCN FF-FCN)
+ (FLAGS NDESCBIT SURFACEBIT CONTBIT OPENBIT VEHBIT)
+ (ACTION FF-FCN)>
+
+<OBJECT FF-BOWL-4
+ (SYNONYM FIELD)
+ (DESC "bowl")>
+
+<ROOM FF-ROOM
+ (IN ROOMS)
+ (DESC "Laboratory")
+ (FLAGS RLANDBIT ONBIT)
+ (OUT TO YELLOW-FOUR-FIVE)
+ (WEST TO YELLOW-FOUR-FIVE)
+ (ACTION FF-ROOM-FCN)
+ (GLOBAL PROJECTOR BEAM)>
+
+<OBJECT PROJECTOR
+ (IN FF-ROOM)
+ (SYNONYM PROJECTOR APPARATUS)
+ (ADJECTIVE FORMIDABLE)
+ (DESC "projector")
+ (ACTION PROJECTOR-FCN)
+ (FLAGS NDESCBIT)>
+
+<OBJECT BEAM
+ (IN FF-ROOM)
+ (SYNONYM BEAM)
+ (ADJECTIVE ENERGY)
+ (DESC "beam of energy")
+ (ACTION BEAM-FCN)
+ (FLAGS NDESCBIT VICBIT)>
+
+<OBJECT BLUE-KEY
+ (IN FORCE-FIELD-1)
+ (SYNONYM KEY RODS ROD)
+ (ADJECTIVE BLUE CRYSTAL)
+ (DESC "blue rod")
+ (ACTION BLUE-KEY-FCN)
+ (VALUE 25)
+ (FLAGS TRYTAKEBIT TAKEBIT KEYBIT TRANSBIT)>
+
+<ROOM BLUE-RED-FOUR
+ (IN ROOMS)
+ (DESC "Room on Ring Four")
+ (LDESC
+"You are between the red and blue halls on a ring corridor. The corridor looks
+damaged to port. The illumination dims to starboard.")
+ (EAST TO RED-FOUR)
+ (WEST TO BLUE-FOUR)
+ (SOUTH "There is no exit visible on the aft wall.")
+ (FLAGS RLANDBIT ONBIT)>
+
+<ROOM GARAGE
+ (IN ROOMS)
+ (DESC "Garage")
+ (LDESC
+"This is the garage for Maintenance Mice. There are several stalls in
+which non-functional mice are rusting away. Other stalls are empty.
+There is a hole through which trash could be dumped, and a large bin nearby.
+A maintenance-mouse-sized door is in the forward wall.")
+ (NORTH TO BLUE-RED-FOUR)
+ (OUT TO BLUE-RED-FOUR)
+ (FLAGS RLANDBIT ONBIT)
+ (PSEUDO "HOLE" HOLE-PSEUDO "DOOR" DOOR-PSEUDO)>
+
+<OBJECT TRASH-BIN
+ (IN GARAGE)
+ (SYNONYM BIN)
+ (ADJECTIVE TRASH JUNK)
+ (DESC "trash bin")
+ (FLAGS RLANDBIT OPENBIT CONTBIT)
+ (LDESC
+"There is a trash bin full of junk of all sorts here. Someone appears to have
+been dumping things for years (decades? centuries?) and never cleaning them
+out.")
+ (ACTION TRASH-BIN-FCN)
+ (CAPACITY 1000)>
+
+<OBJECT GREEN-KEY
+ (SYNONYM KEY RODS ROD)
+ (ADJECTIVE GREEN CRYSTAL)
+ (DESC "green rod")
+ (VALUE 25)
+ (FLAGS TAKEBIT KEYBIT TRANSBIT)>
+
+\
+
+"SUBTITLE GREEN SPACESHIP"
+
+<ROOM THRONE-ROOM
+ (IN ROOMS)
+ (DESC "Control Room")
+ (FLAGS RLANDBIT ONBIT)
+ (LDESC
+"This was the control room of the ship which originally carried the
+now-primitive aliens to the artifact. They must have been at about the
+human level of technology, as the controls and style of the room are
+familiar. The control panel was obviously destroyed by a fire or explosion
+long ago, although the lights here still glow dimly.|
+Outside you can see the surface of the artifact. Gazing longingly at that
+view are the empty eyesockets of a skeleton; the skeleton of one of the
+aliens. It is dressed in the shreds of a space suit and sitting in the
+control couch. Scattered around the couch are fresh offerings of fruit and
+vegetables.")
+ (SOUTH TO CARGO-ROOM)
+ (GLOBAL COUCH WINDOW CONTROLS TOTEMS)>
+
+<OBJECT SKELETON
+ (IN THRONE-ROOM)
+ (SYNONYM SKELETON)
+ (ADJECTIVE ALIEN)
+ (DESC "alien skeleton")
+ (FLAGS TAKEBIT NDESCBIT TRYTAKEBIT)
+ (ACTION SKELETON-FCN)
+ (SIZE 10)>
+
+<OBJECT VIOLET-KEY
+ (IN THRONE-ROOM)
+ (SYNONYM KEY RODS ROD)
+ (ADJECTIVE VIOLET PURPLE CRYSTAL)
+ (DESC "violet rod")
+ (VALUE 25)
+ (FLAGS INVISIBLE TAKEBIT KEYBIT TRANSBIT)>
+
+<ROOM CARGO-ROOM
+ (IN ROOMS)
+ (DESC "Cargo Hold")
+ (FLAGS RLANDBIT ONBIT)
+ (LDESC
+"This was once the cargo hold of a spaceship, and is filled with fetishes of
+wood and clay, totems in the shape of strange beasts, and a great deal of
+withered fruit and grain. Openings lead fore and aft, and the umbilical
+tube is to starboard. There is dim illumination from ancient glow bulbs.")
+ (NORTH TO THRONE-ROOM)
+ (SOUTH TO GUARD-ROOM)
+ (EAST TO UMBILICAL)
+ (GLOBAL TOTEMS VEGGIES)>
+
+<ROOM GUARD-ROOM
+ (IN ROOMS)
+ (DESC "Guard Room")
+ (FLAGS RLANDBIT ONBIT)
+ (LDESC
+"Once a guard room or barracks, this room is now dusty and unused. The
+only exit is back the way you came. A large door that may have led
+to the engine room is fused shut, as if by enormous heat.")
+ (NORTH TO CARGO-ROOM)
+ (PSEUDO "DOOR" DOOR-PSEUDO)>
+
+<ROOM UMBILICAL
+ (IN ROOMS)
+ (DESC "Umbilical")
+ (FLAGS RLANDBIT ONBIT)
+ (LDESC
+"You are in a plastic umbilical about two meters in diameter which
+connects the green airlock to starboard with a spaceship about ten
+meters to port. The plastic is cloudy, obscuring your view of the outside.")
+ (WEST TO CARGO-ROOM)
+ (UP TO GREEN-DOCK)
+ (EAST TO GREEN-DOCK)>
+
+\
+
+"SUBTITLE ZOO"
+
+<ROOM ZOO
+ (IN ROOMS)
+ (LDESC
+"This is a port-to-starboard corridor lined with small cages. The bars of the
+cages are bands of force, detectable only by the slight shimmer they produce
+in the air, and are non-working on most of the cages. A few cages are still
+on, and contain the dried up carcasses of strange animals.")
+ (DESC "Zoo")
+ (SOUTH TO BLUE-RED-TWO)
+ (WEST TO GRUE-CAGE)
+ (EAST TO NEST-CAGE)
+ (NORTH "You can't pass the (still-working) bars of this cage.")
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL CAGES)>
+
+<ROOM GRUE-CAGE
+ (IN ROOMS)
+ (LDESC
+"This cage was apparently forced by its inhabitants before the general
+deterioration of the zoo equipment. The force projectors are ripped
+out of their mountings and smashed against the bulkhead, and the whole
+cage is scratched and dented as though many enraged creatures pounded
+on it violently for many weeks. There is a somewhat chewed sign to one
+side of the cage.")
+ (DESC "Broken Cage")
+ (EAST TO ZOO)
+ (WEST "The zoo area ends here.")
+ (NORTH TO IN-GRUE-CAGE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL CAGES)>
+
+<ROOM IN-GRUE-CAGE
+ (IN ROOMS)
+ (LDESC
+"The amount of damage done to this cage is impressive. The creatures
+imprisoned here didn't like it one bit, and whoever put them here
+obviously underestimated their nastiness.")
+ (DESC "Inside Grue Cage")
+ (SOUTH TO GRUE-CAGE)
+ (FLAGS RLANDBIT ONBIT)>
+
+<OBJECT GRUE-SIGN
+ (IN GRUE-CAGE)
+ (SYNONYM SIGN)
+ (ADJECTIVE CHEWED)
+ (DESC "chewed sign")
+ (FLAGS NDESCBIT READBIT)
+ (TEXT
+"The sign is a liquid crystal display, and even more oddly, is in English:|
+|
+\" Common Grues (Grue Vulgaris)|
+|
+The common grue, an inhabitant of the dark underground passages of a
+forgotten planet, is here exhibited for your pleasure in a typical family
+group. Note particularly the slavering fangs which reach such impressive
+size in the adults. Feeding the grues is not recommended.\"")>
+
+<OBJECT GRUE ;"was GRUE"
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM GRUE)
+ (ADJECTIVE LURKING SINISTER HUNGRY SILENT)
+ (DESC "lurking grue")
+ (ACTION GRUE-FUNCTION)>
+
+<ROOM NEST-CAGE
+ (IN ROOMS)
+ (DESC "Nesting Cage")
+ (WEST TO ZOO)
+ (EAST "The zoo area comes to an end here.")
+ (ACTION NEST-CAGE-FCN)
+ (GLOBAL SPEAR)
+ (FLAGS RLANDBIT ONBIT)>
+
+<OBJECT NEST
+ (IN NEST-CAGE)
+ (SYNONYM NEST)
+ (ADJECTIVE MUD)
+ (DESC "nest")
+ (FLAGS NDESCBIT OPENBIT CONTBIT VICBIT VILLAIN SEARCHBIT)
+ (ACTION NEST-FCN)
+ (CONTFCN NEST-CONT)
+ (CAPACITY 1000)>
+
+<OBJECT SMASHED-NEST
+ (SYNONYM NEST)
+ (ADJECTIVE SMASHED)
+ (DESC "smashed nest")
+ (FLAGS NDESCBIT OPENBIT CONTBIT VICBIT VILLAIN SEARCHBIT)
+ (ACTION NEST-FCN)
+ (CONTFCN SMASHED-NEST-CONT)
+ (CAPACITY 1000)>
+
+<OBJECT RED-KEY
+ (IN NEST)
+ (SYNONYM KEY RODS ROD)
+ (ADJECTIVE RED CRYSTAL)
+ (DESC "red rod")
+ (VALUE 25)
+ (FLAGS NDESCBIT TRYTAKEBIT TAKEBIT KEYBIT TRANSBIT)>
+
+<OBJECT RAT-ANT
+ (IN NEST-CAGE)
+ (SYNONYM ANT RAT-ANT)
+ (ADJECTIVE RAT)
+ (DESC "rat-ant")
+ (FLAGS NDESCBIT VICBIT VILLAIN)
+ (ACTION RAT-ANT-FCN)>
+
+<ROOM GREEN-YELLOW-ONE
+ (IN ROOMS)
+ (LDESC
+"A passage leads aft from this point on the ring corridor.")
+ (DESC "Room on Ring One")
+ (EAST TO YELLOW-ONE)
+ (WEST TO GREEN-ONE)
+ (SOUTH TO COMPUTER-ROOM)
+ (IN TO COMPUTER-ROOM)
+ (FLAGS RLANDBIT ONBIT)>
+
+<ROOM COMPUTER-ROOM
+ (IN ROOMS)
+ (DESC "Computer Room")
+ (OUT TO GREEN-YELLOW-ONE)
+ (NORTH TO GREEN-YELLOW-ONE)
+ (ACTION COMPUTER-ROOM-FCN)
+ (FLAGS RLANDBIT ONBIT)>
+
+<OBJECT ENV-COMPUTER
+ (IN COMPUTER-ROOM)
+ (SYNONYM COMPUTER)
+ (DESC "computer")
+ (FLAGS NDESCBIT)
+ (ACTION SWITCH-FCN)>
+
+<OBJECT ON-OFF-SWITCH
+ (IN COMPUTER-ROOM)
+ (SYNONYM SWITCH POWER)
+ (ADJECTIVE ON OFF)
+ (DESC "on-off switch")
+ (FLAGS NDESCBIT)
+ (ACTION SWITCH-FCN)>
+
+<OBJECT PANEL
+ (IN COMPUTER-ROOM)
+ (SYNONYM PANEL)
+ (ADJECTIVE ACCESS)
+ (DESC "access panel")
+ (FLAGS CONTBIT NDESCBIT SEARCHBIT)
+ (CAPACITY 100)
+ (ACTION PANEL-FCN)>
+
+<OBJECT SLOT
+ (IN PANEL)
+ (SYNONYM SLOT HOLE)
+ (DESC "slot")
+ (FLAGS CONTBIT OPENBIT SEARCHBIT)
+ (ACTION SLOT-FCN)>
+
+<OBJECT CARD
+ (IN REPAIR-ROOM)
+ (SYNONYM CARD SQUARE)
+ (ADJECTIVE COMPUTER METAL CERAMIC)
+ (DESC "metal and ceramic square")
+ (FLAGS TAKEBIT)
+ (ACTION CARD-F)
+ (SIZE 3)>
+
+<OBJECT GOLD-KEY
+ (SYNONYM KEY RODS ROD)
+ (ADJECTIVE GOLD CRYSTAL)
+ (DESC "gold rod")
+ (VALUE 25)
+ (FLAGS TAKEBIT KEYBIT TRANSBIT)>
+
+\
+
+"SUBTITLE WEAPONS DECK AND ZAP GUN"
+
+<OBJECT ZAP-GUN
+ (IN WEAPONS-DECK)
+ (SYNONYM GUN BARREL RAYGUN)
+ (ADJECTIVE RAY)
+ (DESC "ray gun")
+ (FDESC
+"Mounted in a wall-rack is a genuine-looking ray gun, large and formidable,
+with a long, ugly barrel. It's difficult to tell whether or not the gun is
+fully charged.")
+ (FLAGS TAKEBIT WEAPONBIT CONTBIT)
+ (ACTION ZAP-GUN-FCN)
+ (CAPACITY 5)
+ (SIZE 10)>
+
+<OBJECT SILVER-KEY
+ (IN ZAP-GUN)
+ (SYNONYM KEY RODS ROD)
+ (ADJECTIVE SILVER CRYSTAL)
+ (DESC "silver rod")
+ (VALUE 25)
+ (FLAGS TRYTAKEBIT TAKEBIT KEYBIT TRANSBIT)>
+
+<ROOM WEAPONS-DECK
+ (IN ROOMS)
+ (DESC "Weapons Deck")
+ (LDESC
+"This was the armory of the artifact. A massive bulkhead melted and burned
+away, giving free access to the weaponry. Unfortunately, it appears that the
+vast stock of futuristic armaments has been mostly destroyed. Gigantic
+projectors are scorched and shattered, strange battle armor is reduced to
+splinters, and wall racks for small arms are mostly empty.")
+ (EAST TO BLUE-34)
+ (OUT TO BLUE-34)
+ (FLAGS RLANDBIT ONBIT)>
+
+<ROOM BLUE-34
+ (IN ROOMS)
+ (DESC "Melted Spot")
+ (LDESC
+"At this point the corridor is twisted and the walls are half-melted.
+Titanic energies have been used here, apparently to blast through an
+armored hatch that shielded the area to port. There is little left of
+the hatch now, and the way is open.")
+ (WEST TO WEAPONS-DECK)
+ (NORTH TO BLUE-THREE)
+ (SOUTH TO BLUE-FOUR)
+ (IN TO WEAPONS-DECK)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL PLANTERS)>
+
+\
+
+"SUBTITLE INSIDE THE CYLINDER"
+
+<OBJECT TREE
+ (IN LOCAL-GLOBALS)
+ (SYNONYM TREE)
+ (ADJECTIVE HUGE SMALL ENORMOUS)
+ (DESC "tree")
+ (ACTION TREE-FCN)
+ (FLAGS NDESCBIT CLIMBBIT)>
+
+<ROOM BASE-OF-TREE
+ (IN ROOMS)
+ (DESC "Base of Tree")
+ (LDESC
+"You are in a primeval forest, standing at the base of a giant tree.
+The trunk is thick, perhaps 40 meters in diameter, and the height is
+incredible. The forest is very thick, so you can't see exactly how tall
+it is, but extending all the way to the axis isn't out of the question.
+The bark is so rough that climbing would be no problem.")
+ (UP PER UP-A-TREE-EXIT)
+ (NORTH TO SCRUB-2)
+ (EAST TO FOREST)
+ (WEST TO FOREST)
+ (SOUTH "You have reached the aft end of the cylinder.")
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL TREE VEGGIES)>
+
+<ROOM UP-A-TREE
+ (IN ROOMS)
+ (DESC "Up a Tree")
+ (LDESC
+"You are climbing a gigantic tree, one that would make the largest
+sequoia blush with envy. Fortunately the bark is rough and climbing
+is easy. The gravity lessens as you near the axis of rotation, which
+also helps.")
+ (UP TO TREETOP-ROOM)
+ (DOWN TO BASE-OF-TREE)
+ (ACTION UP-A-TREE-FCN)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL TREE)>
+
+<ROOM TREETOP-ROOM
+ (IN ROOMS)
+ (DESC "Top of Tree")
+ (LDESC
+"You are at the top of a giant tree, just below a huge crystalline bubble
+full of machinery and controls which lies at the axis of rotation at the aft
+end of the cylinder. Out of reach above you is a hatch which leads into the
+bubble. Beside the hatch is a silver slot. Gravity has almost disappeared
+here as you near the axis.")
+ (UP "The hatch is out of reach above you.")
+ (DOWN TO UP-A-TREE)
+ (FLAGS RLANDBIT ONBIT)
+ (ACTION TREETOP-FCN)
+ (GLOBAL TREE DRIVE-BUBBLE DRIVE-BUBBLE-HATCH)
+ (PSEUDO
+ "SLOT" OUT-OF-REACH
+ "SPOT" OUT-OF-REACH)>
+
+<OBJECT SILVER-SLOT
+ (IN DRIVE-BUBBLE-ENTRANCE)
+ (SYNONYM SLOT SPOT HOLE)
+ (ADJECTIVE SILVER)
+ (DESC "silver slot")
+ (FLAGS OPENBIT CONTBIT NDESCBIT)
+ (ACTION SILVER-SLOT-FCN)
+ (CONTFCN SILVER-SLOT-CONT)
+ (KEY TO SILVER-KEY)
+ (CAPACITY 5)>
+
+<ROOM DRIVE-BUBBLE-ENTRANCE
+ (IN ROOMS)
+ (DESC "Drive Bubble Entrance")
+ (IN TO DRIVE-BUBBLE-ROOM IF DRIVE-BUBBLE-HATCH IS OPEN)
+ (DOWN TO TREETOP-ROOM)
+ (UP TO ON-DRIVE-BUBBLE)
+ (ACTION DRIVE-BUBBLE-ENTRANCE-FCN)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL TREE DRIVE-BUBBLE-HATCH DRIVE-BUBBLE KNOBS)>
+
+<ROOM ON-DRIVE-BUBBLE
+ (IN ROOMS)
+ (LDESC
+"You are floating near and clinging to a large crystalline bubble covering
+the aft end of the axis of rotation of the artifact. There is no weight here.
+Small knobs resembling handholds cover the bubble; you could use them to
+climb back down. Far away at the fore end of the axis you can see another
+bubble very similar to this one.")
+ (DESC "On Drive Bubble")
+ (DOWN TO DRIVE-BUBBLE-ENTRANCE)
+ (UP "There is only air there.")
+ (ACTION ON-DRIVE-BUBBLE-FCN)
+ (FLAGS RAIRBIT ONBIT RMUNGBIT)
+ (GLOBAL DRIVE-BUBBLE CONTROL-BUBBLE KNOBS)>
+
+<ROOM DRIVE-BUBBLE-ROOM
+ (IN ROOMS)
+ (DESC "Drive Bubble")
+ (UP TO AXIS-1)
+ (NORTH TO AXIS-1)
+ (OUT TO DRIVE-BUBBLE-ENTRANCE IF DRIVE-BUBBLE-HATCH IS OPEN)
+ (ACTION DRIVE-BUBBLE-ROOM-FCN)
+ (FLAGS RAIRBIT ONBIT RMUNGBIT)
+ (GLOBAL DRIVE-BUBBLE-HATCH DRIVE-BUBBLE)>
+
+<OBJECT WHITE-SLOT
+ (IN DRIVE-BUBBLE-ROOM)
+ (SYNONYM SLOT PANEL HOLE)
+ (ADJECTIVE WHITE)
+ (DESC "white slot")
+ (KEY TO WHITE-KEY)
+ (FLAGS NDESCBIT CONTBIT OPENBIT SEARCHBIT)
+ (ACTION WHITE-SLOT-FCN)
+ (CAPACITY 10)>
+
+<OBJECT BLACK-SLOT
+ (SYNONYM SLOT PANEL HOLE)
+ (ADJECTIVE BLACK)
+ (DESC "black slot")
+ (KEY TO BLACK-KEY)
+ (FLAGS NDESCBIT CONTBIT OPENBIT SEARCHBIT)
+ (ACTION BLACK-SLOT-FCN)
+ (CAPACITY 10)>
+
+<OBJECT WHITE-KEY
+ (IN DRIVE-BUBBLE-ROOM)
+ (SYNONYM KEY RODS ROD)
+ (ADJECTIVE WHITE CRYSTAL)
+ (DESC "white rod")
+ (FDESC
+"Floating near a white slot in the wall is a white rod.")
+ (ACTION WHITE-KEY-FCN)
+ (VALUE 25)
+ (FLAGS TAKEBIT KEYBIT TRANSBIT)>
+
+<OBJECT DRIVE-BUBBLE-HATCH
+ (IN LOCAL-GLOBALS)
+ (SYNONYM HATCH DOOR)
+ (DESC "hatch")
+ (FLAGS NDESCBIT DOORBIT)
+ (ACTION HATCH-DOOR-F)>
+
+<ROOM AXIS-1
+ (IN ROOMS)
+ (DESC "Floating in Air")
+ (LDESC
+"You are floating at the axis of rotation of the cylinder, near the
+drive bubble. There are enormous trees \"below.\" There is no gravity here.")
+ (NORTH TO AXIS-2)
+ (SOUTH TO DRIVE-BUBBLE-ROOM)
+ (ACTION AXIS-FCN)
+ (FLAGS RAIRBIT ONBIT RMUNGBIT)
+ (GLOBAL DRIVE-BUBBLE CONTROL-BUBBLE)>
+
+<ROOM AXIS-2
+ (IN ROOMS)
+ (DESC "Floating in Air")
+ (LDESC
+"You are floating at the axis of rotation of the cylinder.
+There is grassland \"below.\" There is no gravity here.")
+ (NORTH TO AXIS-3)
+ (SOUTH TO AXIS-1)
+ (ACTION AXIS-FCN)
+ (FLAGS RAIRBIT ONBIT RMUNGBIT)
+ (GLOBAL DRIVE-BUBBLE CONTROL-BUBBLE)>
+
+<ROOM AXIS-3
+ (IN ROOMS)
+ (DESC "Floating in Air")
+ (LDESC
+"You are floating at the axis of rotation of the cylinder.
+There is a metal band \"below.\" There is no gravity here.")
+ (NORTH TO ON-CONTROL-BUBBLE)
+ (SOUTH TO AXIS-2)
+ (ACTION AXIS-FCN)
+ (FLAGS RAIRBIT ONBIT RMUNGBIT)
+ (GLOBAL DRIVE-BUBBLE CONTROL-BUBBLE)>
+
+<ROOM FOREST
+ (IN ROOMS)
+ (DESC "Dense Forest")
+ (LDESC
+"This is the forest primeval, conifers and cycads in rank profusion.
+Here and there huge trees thrust upward through the forest canopy.
+One particularly large tree is to port of here.")
+ (NORTH TO SCRUB)
+ (SOUTH "You have reached the aft end of the cylinder.")
+ (WEST TO BASE-OF-TREE)
+ (EAST TO BASE-OF-TREE)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL VEGGIES TREE)>
+
+<ROOM SCRUB
+ (IN ROOMS)
+ (DESC "Thin Forest")
+ (LDESC
+"This is an area of small trees and shrubs blending into a more imposing
+forest aft and into grassland forward. Strangely, there is a metal
+hatch cover nearby among the shrubbery.")
+ (NORTH TO GRASSLAND)
+ (SOUTH TO FOREST)
+ (WEST TO SCRUB-2)
+ (EAST TO SCRUB-2)
+ (DOWN TO REPAIR-ROOM IF METAL-DOOR IS OPEN)
+ (UP "There are no large trees here.")
+ (GLOBAL METAL-DOOR TREE VEGGIES)
+ (FLAGS RLANDBIT ONBIT)>
+
+<ROOM SCRUB-2
+ (IN ROOMS)
+ (DESC "Thin Forest")
+ (LDESC
+"This is an area of small trees and shrubs blending into a more imposing
+forest aft and into grassland forward.")
+ (NORTH TO GRASSLAND-2)
+ (SOUTH TO BASE-OF-TREE)
+ (WEST TO SCRUB)
+ (EAST TO SCRUB)
+ (UP "There are no large trees here.")
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL TREE VEGGIES)>
+
+<ROOM GRASSLAND
+ (IN ROOMS)
+ (DESC "Grassland")
+ (LDESC
+"You are standing on the floor of an enormous cylinder, kilometers in
+length and hundreds of meters across. Above you and all around is revealed
+a micro-geography of trees, grassland, and manufactured structures. The
+cylinder is divided into various bands, of which this is approximately the
+central one. Things cling to the floor (or ceiling) above you, as each band
+continues all the way around the cylinder.
+|
+You are in the midst of a grassy plain, a sort of savannah with warm
+breezes and tall grasses. An exit leads down to the outer deck. Looking
+forward, a metal floor circles the cylinder, and extends all the way to
+the forward end of the cylinder, which is a sheer metal wall with a
+crystal bubble at the axis. Looking aft, the grassland becomes more and
+more densely forested. The aft end of the cylinder is totally obscured
+by impossibly tall trees. A herd of creatures not unlike unicorns crops
+grass in the distance.")
+ (NORTH TO METAL-BAND)
+ (SOUTH TO SCRUB)
+ (EAST TO GRASSLAND-2)
+ (WEST TO GRASSLAND-2)
+ (DOWN TO BLUE-THREE)
+ (GLOBAL ALIENS UNICORNS DISTANT-BUBBLE)
+ (FLAGS RLANDBIT ONBIT)>
+
+<ROOM GRASSLAND-2
+ (IN ROOMS)
+ (DESC "Grassland")
+ (LDESC
+"A grassy plain circles this band of the cylinder, the vegetation
+merging into dense forest as you look aft, and stopping abruptly at bare
+metal as you look forward. The plain arches above you, giving an aerial
+view of the other side and the entry through which you came. The forest
+obscures the aft end of the cylinder. A herd of creatures not unlike
+unicorns crops grass nearby.")
+ (NORTH TO METAL-BAND-2)
+ (SOUTH TO SCRUB-2)
+ (EAST TO GRASSLAND)
+ (WEST TO GRASSLAND)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL ALIENS UNICORNS DISTANT-BUBBLE)>
+
+<OBJECT UNICORNS
+ (IN LOCAL-GLOBALS)
+ (DESC "unicorn")
+ (SYNONYM UNICORN)
+ (ADJECTIVE HERD)
+ (ACTION UNICORNS-FCN)
+ (FLAGS NDESCBIT)>
+
+<OBJECT METAL-DOOR
+ (IN LOCAL-GLOBALS)
+ (DESC "metal hatch")
+ (SYNONYM DOOR HATCH COVER)
+ (ADJECTIVE METAL)
+ (FLAGS NDESCBIT CONTBIT DOORBIT)>
+
+<ROOM METAL-BAND
+ (IN ROOMS)
+ (DESC "Metal Floor")
+ (LDESC
+"The floor of the cylinder is bare metal here, merging into grassland aft
+and eventually running into a sheer wall at the forward end of the artifact.")
+ (NORTH TO FORE-END)
+ (SOUTH TO GRASSLAND)
+ (EAST TO METAL-BAND-2)
+ (WEST TO METAL-BAND-2)
+ (GLOBAL CONTROL-BUBBLE)
+ (FLAGS RLANDBIT ONBIT)>
+
+<ROOM METAL-BAND-2
+ (IN ROOMS)
+ (DESC "Metal Floor")
+ (LDESC
+"The metal floor continues all the way around the cylinder. Aft the
+grassland begins, and forward the cylinder ends in a smooth vertical wall.")
+ (NORTH TO FORE-END-2)
+ (SOUTH TO GRASSLAND-2)
+ (EAST TO METAL-BAND)
+ (WEST TO METAL-BAND)
+ (GLOBAL CONTROL-BUBBLE)
+ (FLAGS RLANDBIT ONBIT)>
+
+<OBJECT WALL
+ (IN GLOBAL-OBJECTS)
+ (DESC "wall")
+ (SYNONYM WALL)
+ (ADJECTIVE SMOOTH)
+ (FLAGS CLIMBBIT NDESCBIT)
+ (ACTION WALL-F)>
+
+<OBJECT DISTANT-BUBBLE
+ (IN LOCAL-GLOBALS)
+ (DESC "bubble")
+ (SYNONYM BUBBLE)
+ (ADJECTIVE CRYSTAL CLEAR)
+ (ACTION DISTANT-BUBBLE-F)>
+
+<ROOM FORE-END
+ (IN ROOMS)
+ (DESC "Fore End")
+ (LDESC
+"You are at the fore end of the cylinder. A smooth, unscalable wall extends
+up all around the circumference. At the axis, high above, is a clear bubble.
+From this distance you can't see into it, but it's about 100 meters in
+diameter.")
+ (SOUTH TO METAL-BAND)
+ (EAST TO FORE-END-2)
+ (WEST TO FORE-END-2)
+ (UP "The fore wall is smooth and featureless.")
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL DISTANT-BUBBLE)>
+
+<ROOM FORE-END-2
+ (IN ROOMS)
+ (DESC "Fore End")
+ (LDESC
+"You are at the forward end of the interior. A vertical wall extends up all
+around the circumference. At the axis, high above, is a crystal bubble. From
+this distance you can't discern its contents, but it's about 100 meters in
+diameter.")
+ (SOUTH TO METAL-BAND-2)
+ (EAST TO FORE-END)
+ (WEST TO FORE-END)
+ (UP "The fore wall is smooth and featureless.")
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL DISTANT-BUBBLE)>
+
+\
+
+<ROOM ON-CONTROL-BUBBLE
+ (IN ROOMS)
+ (LDESC
+"You are floating outside a 100 meter crystal bubble which protrudes from
+the fore end of the cylinder. Inside, you can make out shadowy mechanisms
+and odd constructions. There are odd knobs of some sort which you could use
+to pull yourself down the bubble. At the other end of the cylinder you can
+see the drive bubble in the midst of enormous trees.")
+ (DESC "On Control Bubble")
+ (DOWN TO CONTROL-BUBBLE-ENTRANCE)
+ (UP "There is only air there.")
+ (ACTION ON-CONTROL-BUBBLE-FCN)
+ (FLAGS RAIRBIT ONBIT RMUNGBIT)
+ (GLOBAL CONTROL-BUBBLE DRIVE-BUBBLE KNOBS)>
+
+<ROOM CONTROL-BUBBLE-ENTRANCE
+ (IN ROOMS)
+ (DESC "Control Bubble Entrance")
+ (IN TO CONTROL-BUBBLE-ROOM IF CONTROL-BUBBLE-HATCH IS OPEN)
+ (UP TO ON-CONTROL-BUBBLE)
+ (ACTION CONTROL-BUBBLE-ENTRANCE-FCN)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL CONTROL-BUBBLE DRIVE-BUBBLE CONTROL-BUBBLE-HATCH KNOBS)>
+
+<OBJECT GOLD-SLOT
+ (IN CONTROL-BUBBLE-ENTRANCE)
+ (SYNONYM SLOT HOLE)
+ (ADJECTIVE GOLD)
+ (DESC "gold slot")
+ (FLAGS OPENBIT CONTBIT NDESCBIT)
+ (KEY TO GOLD-KEY)
+ (CONTFCN GOLD-SLOT-CONT)
+ (ACTION GOLD-SLOT-FCN)
+ (CAPACITY 5)>
+
+<OBJECT CONTROL-BUBBLE-HATCH
+ (IN LOCAL-GLOBALS)
+ (SYNONYM HATCH DOOR)
+ (DESC "hatch")
+ (FLAGS NDESCBIT DOORBIT)
+ (ACTION HATCH-DOOR-F)>
+
+<ROOM CONTROL-BUBBLE-ROOM
+ (IN ROOMS)
+ (DESC "Control Bubble")
+ (OUT TO CONTROL-BUBBLE-ENTRANCE IF CONTROL-BUBBLE-HATCH IS OPEN)
+ (ACTION CONTROL-BUBBLE-ROOM-FCN)
+ (FLAGS RAIRBIT ONBIT RMUNGBIT)
+ (GLOBAL CONTROL-BUBBLE CONTROL-BUBBLE-HATCH)
+ (VALUE 25)>
+
+<OBJECT DRIVE-BUBBLE
+ (IN LOCAL-GLOBALS)
+ (SYNONYM BUBBLE)
+ (ADJECTIVE DRIVE)
+ (DESC "drive bubble")
+ (ACTION DRIVE-BUBBLE-FCN)
+ (FLAGS NDESCBIT)>
+
+<OBJECT CONTROL-BUBBLE
+ (IN LOCAL-GLOBALS)
+ (SYNONYM BUBBLE)
+ (ADJECTIVE CONTROL FRONT FORE)
+ (DESC "control bubble")
+ (ACTION CONTROL-BUBBLE-FCN)
+ (FLAGS NDESCBIT)>
+
+"CONTROL ROOM GOODIES"
+
+<OBJECT BROWN-SLOT
+ (SYNONYM SLOT HOLE)
+ (ADJECTIVE BROWN)
+ (DESC "brown slot")
+ (ACTION CONTROL-SLOT-FCN)
+ (CONTFCN CONTROL-SLOT-FCN)
+ (KEY TO BROWN-KEY)
+ (FLAGS OPENBIT CONTBIT NDESCBIT)
+ (CAPACITY 10)>
+
+<OBJECT PINK-SLOT
+ (SYNONYM SLOT HOLE)
+ (ADJECTIVE PINK)
+ (DESC "pink slot")
+ (ACTION CONTROL-SLOT-FCN)
+ (CONTFCN CONTROL-SLOT-FCN)
+ (KEY TO PINK-KEY)
+ (FLAGS NDESCBIT OPENBIT CONTBIT)
+ (CAPACITY 10)>
+
+<OBJECT GREEN-SLOT
+ (SYNONYM SLOT HOLE)
+ (ADJECTIVE GREEN)
+ (DESC "green slot")
+ (ACTION CONTROL-SLOT-FCN)
+ (KEY TO GREEN-KEY)
+ (CONTFCN CONTROL-SLOT-FCN)
+ (FLAGS NDESCBIT OPENBIT CONTBIT)
+ (CAPACITY 10)>
+
+<OBJECT BLUE-SLOT
+ (SYNONYM SLOT HOLE)
+ (ADJECTIVE BLUE)
+ (DESC "blue slot")
+ (ACTION CONTROL-SLOT-FCN)
+ (KEY TO BLUE-KEY)
+ (CONTFCN CONTROL-SLOT-FCN)
+ (FLAGS NDESCBIT OPENBIT CONTBIT)
+ (CAPACITY 10)>
+
+<OBJECT VIOLET-SLOT
+ (SYNONYM SLOT HOLE)
+ (ADJECTIVE VIOLET PURPLE)
+ (DESC "violet slot")
+ (ACTION CONTROL-SLOT-FCN)
+ (KEY TO VIOLET-KEY)
+ (CONTFCN CONTROL-SLOT-FCN)
+ (FLAGS NDESCBIT OPENBIT CONTBIT)
+ (CAPACITY 10)>
+
+<OBJECT VIEW-SELECT
+ (SYNONYM SCREEN)
+ (ADJECTIVE PINK)
+ (DESC "pink screen")
+ (ACTION VIEW-SELECT-FCN)
+ (DESCFCN VIEW-SELECT-FCN)
+ (FLAGS OPENBIT CONTBIT NDESCBIT)>
+
+<OBJECT ZOOM-IN
+ (IN VIEW-SELECT)
+ (SYNONYM SQUARE)
+ (ADJECTIVE SMALL PINK)
+ (DESC "small pink square")
+ (ACTION VIEW-SELECT-FCN)
+ (FLAGS NDESCBIT)>
+
+<OBJECT ZOOM-OUT
+ (IN VIEW-SELECT)
+ (SYNONYM SQUARE)
+ (ADJECTIVE LARGE PINK)
+ (DESC "large pink square")
+ (ACTION VIEW-SELECT-FCN)
+ (FLAGS NDESCBIT)>
+
+<OBJECT TARGET-SELECT
+ (SYNONYM BUTTON SPOT)
+ (ADJECTIVE BROWN)
+ (DESC "brown spot")
+ (FLAGS NDESCBIT)
+ (ACTION TARGET-SELECT-FCN)>
+
+<OBJECT SPEED-SELECT
+ (SYNONYM BUTTON SPOT)
+ (ADJECTIVE GREEN)
+ (DESC "green spot")
+ (FLAGS NDESCBIT)
+ (ACTION SPEED-SELECT-FCN)>
+
+<OBJECT EXECUTE-BUTTON
+ (SYNONYM BUTTON SPOT)
+ (ADJECTIVE BLUE)
+ (DESC "blue spot")
+ (FLAGS NDESCBIT)
+ (ACTION EXECUTE-BUTTON-FCN)>
+
+<OBJECT COURSE-SELECT
+ (SYNONYM BUTTON SPOT)
+ (ADJECTIVE VIOLET PURPLE)
+ (DESC "violet spot")
+ (FLAGS NDESCBIT)
+ (ACTION COURSE-SELECT-FCN)>
+
+<OBJECT CLEAR-SLOT
+ (IN CONTROL-BUBBLE-ROOM)
+ (SYNONYM SLOT HOLE)
+ (ADJECTIVE CLEAR CRYSTAL)
+ (DESC "crystal slot")
+ (ACTION CONTROL-SLOT-FCN)
+ (KEY TO CLEAR-KEY)
+ (CONTFCN CONTROL-SLOT-FCN)
+ (FLAGS OPENBIT CONTBIT NDESCBIT)
+ (CAPACITY 10)>
+
+<OBJECT ROD-RACK
+ (IN YELLOW-LOCK)
+ (SYNONYM RACK CARTON BASKET POCKET)
+ (ADJECTIVE METAL SMALL)
+ (DESC "metal basket")
+ (FDESC
+"Discarded here is a metal basket with a small pocket.")
+ (ACTION ROD-RACK-FCN)
+ (CONTFCN ROD-RACK-FCN)
+ (FLAGS TAKEBIT OPENBIT CONTBIT)
+ (CAPACITY 120)
+ (SIZE 10)>
+
+<OBJECT SPEAR
+ (IN LOCAL-GLOBALS)
+ (DESC "spear")
+ (SYNONYM SPEAR SPEARS)
+ (ACTION SPEAR-F)>
+
+<OBJECT HUTS
+ (IN LOCAL-GLOBALS)
+ (DESC "hut")
+ (SYNONYM HUTS HUT)
+ (ACTION HUTS-F)>
+
+<OBJECT VEGGIES
+ (IN LOCAL-GLOBALS)
+ (DESC "vegetation")
+ (SYNONYM GRASS SHRUB CONIFER CYCAD)
+ (ACTION VEGGIES-F)>
+
+<OBJECT DRIVE-CONTROLS
+ (IN DRIVE-BUBBLE)
+ (DESC "control")
+ (SYNONYM DIALS INDICATORS GAUGES BUTTON)
+ (ACTION DRIVE-CONTROLS-F)>
+
+<OBJECT CAGES
+ (IN LOCAL-GLOBALS)
+ (DESC "cage")
+ (SYNONYM CAGE CAGES BARS)
+ (ACTION CAGES-F)>
+
+<OBJECT TOTEMS
+ (IN LOCAL-GLOBALS)
+ (DESC "funeral offering")
+ (SYNONYM FRUITS GRAIN TOTEMS FETISH)
+ (ACTION TOTEMS-F)>
+
+<OBJECT KNOBS
+ (IN LOCAL-GLOBALS)
+ (DESC "knob")
+ (SYNONYM KNOB KNOBS PROTRUSION HANDHOLD)
+ (FLAGS TAKEBIT TRYTAKEBIT CLIMBBIT)
+ (ACTION KNOBS-F)>
diff --git a/emerg.zil b/emerg.zil
new file mode 100644
index 0000000..e7d36ae
--- /dev/null
+++ b/emerg.zil
@@ -0,0 +1,279 @@
+"EMERG for
+ Interlogic SF Game
+ (c) Copyright 1981,1982 Infocom, Inc. All Rights Reserved
+"
+
+;"Emergency lighting and environmental controls"
+
+<ROUTINE SWITCH-FCN ()
+ <COND (<VERB? LAMP-ON TURN THROW>
+ <COND (,MELTED?
+ <TELL
+"There is a sickening wheeze, but nothing else happens." CR>)
+ (,SWITCH-ON?
+ <TELL "It's already on." CR>)
+ (ELSE
+ <TELL
+"The lights in the room come on and there is a deafening FOOOOM! noise as the
+computer starts up." CR>
+ <SETG SWITCH-ON? T>
+ <COND (<AND <IN? ,CARD ,SLOT> <NOT ,FRIED?>>
+ <COND (,GOT-KEY?
+ <TELL
+"The main display blinks once and then displays the word \"Ready\"." CR>)
+ (ELSE
+ <SETG GOT-KEY? T>
+ <MOVE ,GOLD-KEY ,HERE>
+ <FCLEAR ,ENUNCIATOR ,INVISIBLE>
+ <TELL
+"The main display blinks twice, a bell rings, and out of the output
+hopper onto the floor is extruded a gold rod! A moment later, a
+previously unseen enunciator panel comes on." CR>
+ <PERFORM ,V?EXAMINE ,ENUNCIATOR>
+ <RTRUE>)>)
+ (ELSE
+ <TELL
+"On the main display lights blink insistently and the word \"Fault\"
+appears." CR>)>)>)
+ (<VERB? LAMP-OFF>
+ <SETG SWITCH-ON? <>>
+ <FSET ,ENUNCIATOR ,INVISIBLE>
+ <TELL
+"The computer is off." CR>)>>
+
+<ROUTINE COMPUTER-ROOM-FCN (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"This is the main computer room. The builders of this ship were obviously
+still wedded to large mainframes: this one stretches off in all directions
+and is thirty meters high. There is an overlarge switch at about eye-level
+and an access panel below it, which is ">
+ <COND (<FSET? ,PANEL ,OPENBIT>
+ <TELL "open">)
+ (ELSE <TELL "closed">)>
+ <TELL ". The power seems to be ">
+ <COND (,SWITCH-ON? <TELL "on." CR>)
+ (ELSE <TELL "off." CR>)>
+
+ <COND (,FRIED? <TELL
+"There is a strong smell of burning components here." CR>)>
+ <RTRUE>)>>
+
+<OBJECT ENUNCIATOR
+ (IN COMPUTER-ROOM)
+ (DESC "enunciator panel")
+ (LDESC "An enunciator panel is prominent along one wall here.")
+ (SYNONYM PANEL LIGHT LIGHTS SYMBOL)
+ (ADJECTIVE ENUNCIATOR RED YELLOW BLUE GREEN)
+ (FLAGS INVISIBLE)
+ (ACTION ENUNCIATOR-F)>
+
+<ROUTINE ENUNCIATOR-F ()
+ <COND (<VERB? EXAMINE>
+ <COND (,SWITCH-ON?
+ <TELL
+"On the left are three banks of four colored lights: red, yellow, green, and
+blue. The first is labelled with a symbol of the emission of rays: of the
+lights underneath, the red one is flashing and the yellow one is brightly
+lit. The second column is labelled with a stylized docking port and the third
+with an airlock. The only indications on these two banks are the yellow ones,
+the first of which is brightly lit and the other of which is flashing. On the
+right are six other lights, each bearing a stylized picture. The first four,
+all dark, represent navigation, engine, library, and defenses. A fifth,
+bearing the picture of a cage, is brightly lit. The sixth is "
+<GET ,AIR-FLASH ,AIR-COUNT> ". It" ,REPAIR-PANEL CR>)
+ (ELSE <TELL "The panel is dark." CR>)>)>>
+
+<GLOBAL AIR-FLASH <TABLE
+"flickering dimly"
+"flashing slowly"
+"flashing rapidly"
+"also brightly lit"
+"also brightly lit">>
+
+<GLOBAL REPAIR-PANEL
+" bears a symbol in three parts: the first two parts, in black, are a
+solid block and a fluid level. The third, in red, is a series of parallel
+wavy lines.">
+
+<ROOM REPAIR-ROOM
+ (IN ROOMS)
+ (DESC "Repair Room")
+ (OUT TO SCRUB IF METAL-DOOR IS OPEN)
+ (UP TO SCRUB IF METAL-DOOR IS OPEN)
+ (ACTION REPAIR-ROOM-FCN)
+ (FLAGS RLANDBIT ONBIT)
+ (GLOBAL STAIRS METAL-DOOR)>
+
+<ROUTINE REPAIR-ROOM-FCN (RARG)
+ <COND (<==? .RARG ,M-LOOK>
+ <TELL
+"This is a bright room taken up by two large pieces of machinery. On the
+leftmost one is a symbol depicting the emission of rays and beside it a
+yellow slot. The other machine" ,REPAIR-PANEL " Beside it are three diagrams;
+under each one is a
+red slot. The first diagram shows four single dots equally spaced around a
+six-dot cluster. The second shows two eight-dot clusters in close proximity.
+The third has three single dots equally spaced around a seven-dot cluster.
+The only exit is up some stairs." CR>)>>
+
+<OBJECT YELLOW-SLOT
+ (IN REPAIR-ROOM)
+ (DESC "yellow slot")
+ (SYNONYM SLOT HOLE)
+ (ADJECTIVE YELLOW)
+ (FLAGS NDESCBIT CONTBIT OPENBIT)
+ (KEY TO YELLOW-KEY)
+ (CAPACITY 6)
+ (ACTION YELLOW-SLOT-F)>
+
+<ROUTINE YELLOW-SLOT-F ()
+ <COND (<AND <VERB? PUT> <==? ,PRSI ,YELLOW-SLOT>>
+ <COND (<==? ,PRSO ,YELLOW-KEY>
+ <SETG ALWAYS-LIT T>
+ <RIGHT-KEY>
+ <CRLF>)
+ (<FSET? ,PRSO ,KEYBIT> <WRONG-KEY>)
+ (ELSE <WONT-FIT>)>)>>
+
+<ROUTINE WONT-FIT ()
+ <TELL "The " D ,PRSO " doesn't fit." CR>>
+
+<OBJECT RED-SLOT
+ (IN REPAIR-ROOM)
+ (DESC "red slot")
+ (SYNONYM SLOT HOLE)
+ (ADJECTIVE RED FIRST SECOND THIRD)
+ (FLAGS NDESCBIT CONTBIT OPENBIT)
+ (KEY TO RED-KEY)
+ (CAPACITY 5)
+ (ACTION RED-SLOT-F)>
+
+<ROUTINE RED-SLOT-F ("AUX" NUM)
+ <COND (<AND <VERB? PUT> <==? ,PRSI ,RED-SLOT>>
+ <SET NUM <ORDINAL ,P-ADJECTIVE>>
+ <COND (<OR <G? .NUM 3> <EQUAL? .NUM 0>>
+ <TELL "You must specify which red slot." CR>)
+ (<NOT <==? ,PRSO ,RED-KEY>>
+ <WRONG-KEY>)
+ (T
+ <REMOVE ,RED-KEY>
+ <RIGHT-KEY>
+ <TELL
+" You hear the subdued hum of some machinery coming to life." CR>
+ <COND (<==? .NUM 2>
+ <ENABLE <QUEUE I-FRESH-AIR 30>>
+ <DISABLE <INT I-BAD-AIR>>)
+ (T
+ <ENABLE <QUEUE I-POISON-AIR 20>>
+ <DISABLE <INT I-BAD-AIR>>
+ <COND (<==? .NUM 3>
+ <SETG AMMONIA? T>)>
+ <RTRUE>)>)>)>>
+
+<ROUTINE RIGHT-KEY ()
+ <REMOVE ,PRSO>
+ <TELL
+"The " D ,PRSO " disappears into the slot.">>
+
+<ROUTINE WRONG-KEY ()
+ <REMOVE ,PRSO>
+ <TELL
+"The " D ,PRSO " slides into the slot and disappears." CR>>
+
+<ROUTINE I-FRESH-AIR ()
+ <SETG POISON-COUNT 0>
+ <COND (<0? ,AIR-COUNT> <RTRUE>)
+ (<L? <SETG AIR-COUNT <- ,AIR-COUNT 1>> 1>
+ <COND (<AND <NOT ,SUIT-ON?> ,IN-ARTIFACT?>
+ <TELL
+"The air seems fine now." CR>)>
+ <RTRUE>)>
+ <COND (<AND <NOT ,SUIT-ON?> ,IN-ARTIFACT?>
+ <DESCRIBE-AIR
+"The air seems a bit better, but is still ">)>
+ <QUEUE I-FRESH-AIR 20>>
+
+<GLOBAL POISON-COUNT 0>
+
+<ROUTINE I-POISON-AIR ()
+ <COND (<G? <SETG POISON-COUNT <+ ,POISON-COUNT 1>> 3>
+ <COND (<NOT ,IN-ARTIFACT?>
+ <ENABLE <QUEUE I-POISON-AIR 1>>)
+ (,SUIT-ON?
+ <JIGS-UP
+"Suddenly, you notice everything around you going dark, as though
+the artifact was shutting down. The lights are dimming everywhere,
+and a faint thrumming vibration stops; one you didn't even notice
+until it ceased.">)
+ (T <JIGS-UP
+"You are overcome by noxious gases and slump to the floor, dead.">)>)
+ (T
+ <COND (<AND <NOT ,SUIT-ON?> ,IN-ARTIFACT?>
+ <DESCRIBE-AIR "The air here has become ">)>
+ <QUEUE I-POISON-AIR 30>)>>
+
+<ROUTINE I-BAD-AIR ()
+ <COND (<G? <SETG AIR-COUNT <+ ,AIR-COUNT 1>> 3>
+ <SETG POISON-COUNT 4>
+ <COND (<NOT ,IN-ARTIFACT?>
+ <ENABLE <QUEUE I-BAD-AIR 1>>)
+ (<NOT ,SUIT-ON?>
+ <JIGS-UP
+"You gasp for air, but there is none left, and slump to the ground, dead.">)
+ (T
+ <JIGS-UP
+"Suddenly, you notice everything around you going dark, as though
+the artifact was shutting down. The lights are dimming everywhere,
+and a faint thrumming vibration stops; one you didn't even notice
+until it ceased.">)>)
+ (T
+ <COND (<AND <NOT ,SUIT-ON?> ,IN-ARTIFACT?>
+ <DESCRIBE-AIR "You notice that the air has become ">)>
+ <QUEUE I-BAD-AIR 40>)>>
+
+<GLOBAL AIR-COUNT 0>
+
+<ROUTINE DESCRIBE-AIR (STR)
+ <COND (<==? ,POISON-COUNT 4>
+ <COND (<==? ,AIR-COUNT 4>
+ <JIGS-UP
+"You gasp for air, but there is none left, and slump to the ground, dead.">)
+ (T
+ <JIGS-UP
+"You are overcome by noxious gases and slump to the floor, dead.">)>)
+ (<G? ,POISON-COUNT 0>
+ <TELL .STR
+ <GET ,POISON-AIRS ,POISON-COUNT>
+ <GET <COND (,AMMONIA? ,AMMONIA-TABLE)
+ (T ,METHANE-TABLE)>
+ ,POISON-COUNT>
+ CR>)
+ (T
+ <TELL .STR <GET ,LIGHT-AIRS ,AIR-COUNT> CR>)>>
+
+<GLOBAL AMMONIA-TABLE <TABLE
+"foo"
+"glass cleaner."
+"ammonia."
+"ammonia.">>
+
+<GLOBAL METHANE-TABLE <TABLE
+"foo"
+"charcoal."
+"coal gas."
+"coal gas.">>
+
+<GLOBAL AMMONIA? <>>
+
+<GLOBAL POISON-AIRS <TABLE
+"foo"
+"quite pungent, smelling vaguely of "
+"quite hard to breathe, permeated with the smell of "
+"almost unbreathable, and heavy with the smell of ">>
+
+<GLOBAL LIGHT-AIRS <TABLE
+"quite breathable and slightly sweet."
+"quite thin."
+"quite hard to breathe."
+"almost unbreathable.">> \ No newline at end of file
diff --git a/load.zil b/load.zil
new file mode 100644
index 0000000..6f916f6
--- /dev/null
+++ b/load.zil
@@ -0,0 +1,54 @@
+"SF for
+ Zork SF Game
+ (c) Copyright 1981 Infocom, Inc. All Rights Reserved.
+"
+
+<SNAME "INFOCOM.SF">
+
+<BLOAT 70000 0 0 2700 0 0 0 0 0 256>
+
+<SET REDEFINE T>
+
+<GLOBAL BIGFIX 10000>
+
+<OR <GASSIGNED? ZILCH>
+ <SETG WBREAKS <STRING !\" !\= !,WBREAKS>>>
+
+<OR <GASSIGNED? INSERT-CRUFTY>
+ <DEFINE INSERT-CRUFTY (STR) <IFILE .STR T>>>
+
+<DEFINE IFILE (STR "OPTIONAL" (FLOAD? <>) "AUX" (TIM <TIME>))
+ <INSERT-FILE .STR .FLOAD?>>
+
+<PRINC "Starcross: Interlogic Science Fiction
+">
+
+<COND (<GASSIGNED? PREDGEN>
+ <ID 0>)>
+
+<IFILE "DUNGEON" T>
+
+<PROPDEF SIZE 5>
+<PROPDEF CAPACITY 0>
+<PROPDEF VALUE 0>
+
+<IFILE "SYNTAX" T>
+<ENDLOAD>
+<IFILE "MACROS" T>
+<IFILE "CLOCK" T>
+<IFILE "MAIN" T>
+<IFILE "PARSER" T>
+;<IFILE "DEMONS" T>
+<INSERT-CRUFTY "CRUFTY">
+<IFILE "VERBS" T>
+<IFILE "FOO" T>
+
+
+<GC 0 T>
+
+<DEFINE CNT (STR OBL)
+ <PRINC .STR>
+ <PRIN1 <MAPF ,+ ,LENGTH .OBL>>
+ <CRLF>>
+
+<IMAGE 7><IMAGE 7><IMAGE 7> \ No newline at end of file
diff --git a/macros.zil b/macros.zil
new file mode 100644
index 0000000..b38ee4c
--- /dev/null
+++ b/macros.zil
@@ -0,0 +1,86 @@
+<SETG C-ENABLED? 0>
+<SETG C-ENABLED 1>
+<SETG C-DISABLED 0>
+
+<DEFMAC TELL ("ARGS" A)
+ <FORM PROG ()
+ !<MAPF ,LIST
+ <FUNCTION ("AUX" E P O)
+ <COND (<EMPTY? .A> <MAPSTOP>)
+ (<SET E <NTH .A 1>>
+ <SET A <REST .A>>)>
+ <COND (<TYPE? .E ATOM>
+ <COND (<OR <=? <SET P <SPNAME .E>>
+ "CRLF">
+ <=? .P "CR">>
+ <MAPRET '<CRLF>>)
+ (<EMPTY? .A>
+ <ERROR INDICATOR-AT-END? .E>)
+ (ELSE
+ <SET O <NTH .A 1>>
+ <SET A <REST .A>>
+ <COND (<OR <=? <SET P <SPNAME .E>>
+ "DESC">
+ <=? .P "D">
+ <=? .P "OBJ">
+ <=? .P "O">>
+ <MAPRET <FORM PRINTD .O>>)
+ (<OR <=? .P "NUM">
+ <=? .P "N">>
+ <MAPRET <FORM PRINTN .O>>)
+ (<OR <=? .P "CHAR">
+ <=? .P "CHR">
+ <=? .P "C">>
+ <MAPRET <FORM PRINTC .O>>)
+ (ELSE
+ <MAPRET
+ <FORM PRINT
+ <FORM GETP .O .E>>>)>)>)
+ (<TYPE? .E STRING>
+ <MAPRET <FORM PRINTI .E>>)
+ (<TYPE? .E FORM>
+ <MAPRET <FORM PRINT .E>>)
+ (ELSE <ERROR UNKNOWN-TYPE .E>)>>>>>
+
+<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
+ (<FORM GVAL <PARSE <STRING "V?" <SPNAME .ATM>>>>
+ !.L)>
+ <SET ATMS <REST .ATMS>>
+ <COND (<==? <LENGTH .L> 3> <RETURN!->)>>
+ <SET O (<FORM EQUAL? ',PRSA !.L> !.O)>
+ <SET L ()>>>
+
+<DEFMAC RFATAL ()
+ '<PROG () <PUSH 2> <RSTACK>>>
+
+<DEFMAC PROB ('BASE? "OPTIONAL" 'LOSER?)
+ <COND (<ASSIGNED? LOSER?> <FORM ZPROB .BASE?>)
+ (ELSE <FORM G? .BASE? '<RANDOM 100>>)>>
+
+<ROUTINE ZPROB
+ (BASE)
+ <COND (,LUCKY <G? .BASE <RANDOM 100>>)
+ (ELSE <G? .BASE <RANDOM 300>>)>>
+
+<ROUTINE PICK-ONE (FROB)
+ <GET .FROB <RANDOM <GET .FROB 0>>>>
+
+<DEFMAC ENABLE ('INT) <FORM PUT .INT ,C-ENABLED? 1>>
+
+<DEFMAC DISABLE ('INT) <FORM PUT .INT ,C-ENABLED? 0>>
+
+<DEFMAC OPENABLE? ('OBJ)
+ <FORM OR <FORM FSET? .OBJ ',DOORBIT>
+ <FORM FSET? .OBJ ',CONTBIT>>>
+
+<DEFMAC ABS ('NUM)
+ <FORM COND (<FORM L? .NUM 0> <FORM - 0 .NUM>)
+ (T .NUM)>> \ No newline at end of file
diff --git a/main.zil b/main.zil
new file mode 100644
index 0000000..46f09ae
--- /dev/null
+++ b/main.zil
@@ -0,0 +1,176 @@
+
+"MAIN for
+ Zork SF Game
+ (c) Copyright 1981 Infocom, Inc. All Rights Reserved.
+"
+
+<GLOBAL P-WON <>>
+
+<CONSTANT M-FATAL 2>
+
+<CONSTANT M-HANDLED 1>
+
+<CONSTANT M-NOT-HANDLED <>>
+
+<CONSTANT M-BEG 1>
+
+<CONSTANT M-END <>>
+
+<CONSTANT M-ENTER 2>
+
+<CONSTANT M-LOOK 3>
+
+<CONSTANT M-FLASH 4>
+
+<CONSTANT M-OBJDESC 5>
+
+<ROUTINE GO ()
+;"put interrupts on clock chain"
+ ;<QUEUE I-LAMP 200>
+ <ENABLE <QUEUE I-NIGHT 128>>
+ <ENABLE <QUEUE I-ALARM 1>>
+;"set up and go"
+ <SETG LIT T>
+ <SETG WINNER ,ADVENTURER>
+ <SETG HERE ,SPACESHIP-QUARTERS>
+ <MOVE ,ADVENTURER ,BUNK>
+ <SETG FF-HERE ,FORCE-FIELD-2>
+ <PUT ,MASSES 1 ,UM08>
+ <PUT ,MASSES 2 ,UM12>
+ <PUT ,MASSES 3 ,UM24>
+ <PUT ,MASSES 4 ,UM28>
+ <PUT ,MASSES 5 ,UM31>
+ <PUT ,MASSES 6 ,UM52>
+ <PUT ,MASSES 7 ,UM70>
+ <PUT ,MASSES 8 ,UM91>
+ <PUT ,KNOWNS 1 ,AB40>
+ <PUT ,KNOWNS 2 ,AX87>
+ <PUT ,KNOWNS 3 ,AX32>
+ <PUT ,KNOWNS 4 ,AX01>
+ <PUT ,KNOWNS 5 ,AX71>
+ <PUT ,KNOWNS 6 ,US75>
+ <PUT ,KNOWNS 7 ,MARS>
+ <SETG P-IT-LOC ,HERE>
+ <SETG P-IT-OBJECT <>>
+ <COND (<NOT <FSET? ,HERE ,TOUCHBIT>>
+ <V-VERSION>
+ <CRLF>
+ <TELL
+"You are sound asleep in your bunk aboard the deep-space black hole
+prospecting ship \"Starcross,\" operating out of Ceres. Just as your
+sleep becomes deep and comfortable, an alarm bell begins ringing! It's
+the mass detector! Instantly you awake. This hasn't been a profitable
+trip so far, and you don't even have the cash for repairs. This could
+be the break you've been waiting for.
+|" CR>)>
+ <V-LOOK>
+ <MAIN-LOOP>
+ <AGAIN>>
+
+
+<ROUTINE MAIN-LOOP ("AUX" ICNT OCNT NUM CNT OBJ TBL V PTBL OBJ1 TMP)
+ #DECL ((CNT OCNT ICNT NUM) FIX (V) <OR 'T FIX FALSE> (OBJ) <OR FALSE OBJECT>
+ (OBJ1) OBJECT (TBL) TABLE (PTBL) <OR FALSE ATOM>)
+ <REPEAT ()
+ <SET CNT 0>
+ <SET OBJ <>>
+ <SET PTBL T>
+ <COND (<SETG P-WON <PARSER>>
+ <SET ICNT <GET ,P-PRSI ,P-MATCHLEN>>
+ <SET NUM
+ <COND (<0? <SET OCNT <GET ,P-PRSO ,P-MATCHLEN>>> .OCNT)
+ (<G? .OCNT 1>
+ <SET TBL ,P-PRSO>
+ <COND (<0? .ICNT> <SET OBJ <>>)
+ (T <SET OBJ <GET ,P-PRSI 1>>)>
+ .OCNT)
+ (<G? .ICNT 1>
+ <SET PTBL <>>
+ <SET TBL ,P-PRSI>
+ <SET OBJ <GET ,P-PRSO 1>>
+ .ICNT)
+ (T 1)>>
+ <COND (<AND <NOT .OBJ> <1? .ICNT>> <SET OBJ <GET ,P-PRSI 1>>)>
+ <COND (<==? ,PRSA ,V?WALK> <SET V <PERFORM ,PRSA ,PRSO>>)
+ (<0? .NUM>
+ <COND (<0? <BAND <GETB ,P-SYNTAX ,P-SBITS> ,P-SONUMS>>
+ <SET V <PERFORM ,PRSA>>
+ <SETG PRSO <>>)
+ (T
+ <TELL "There isn't anything to ">
+ <SET TMP <GET ,P-ITBL ,P-VERBN>>
+ <COND (,P-OFLAG
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>)>
+ <TELL "!" CR>
+ <SET V <>>)>)
+ (T
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> .NUM> <RETURN>)
+ (T
+ <COND (.PTBL <SET OBJ1 <GET ,P-PRSO .CNT>>)
+ (T <SET OBJ1 <GET ,P-PRSI .CNT>>)>
+ <COND (<G? .NUM 1>
+ <PRINTD .OBJ1>
+ <TELL ": ">)>
+ <SETG PRSO <COND (.PTBL .OBJ1) (T .OBJ)>>
+ <SETG PRSI <COND (.PTBL .OBJ) (T .OBJ1)>>
+ <SET V <PERFORM ,PRSA ,PRSO ,PRSI>>
+ <COND (<==? .V ,M-FATAL> <RETURN>)>)>>)>
+ <COND (<NOT <==? ,PRSA ,V?AGAIN>>
+ <SETG L-PRSA ,PRSA>
+ <SETG L-PRSO ,PRSO>
+ <SETG L-PRSI ,PRSI>)>
+ <SETG MOVES <+ ,MOVES 1>>
+ <COND (<==? .V ,M-FATAL> <SETG P-CONT <>>)>)
+ (T
+ <SETG P-CONT <>>)>
+ <COND (,P-WON
+ <COND (<VERB? TELL BRIEF SUPER-BRIEF VERBOSE SAVE SCORE> T)
+ (T <SET V <CLOCKER>>)>)>>>
+
+<GLOBAL L-PRSA <>>
+
+<GLOBAL L-PRSO <>>
+
+<GLOBAL L-PRSI <>>
+
+<ROUTINE PERFORM (A "OPTIONAL" (O <>) (I <>) "AUX" V OA OO OI)
+ #DECL ((A) FIX (O) <OR FALSE OBJECT FIX> (I) <OR FALSE OBJECT> (V) ANY)
+ <SET OA ,PRSA>
+ <SET OO ,PRSO>
+ <SET OI ,PRSI>
+ <COND (<AND <EQUAL? ,IT .I .O>
+ <NOT <EQUAL? ,P-IT-LOC ,HERE>>>
+ <TELL "I don't see what you are referring to." CR>
+ <RFATAL>)>
+ <COND (<==? .O ,IT> <SET O ,P-IT-OBJECT>)>
+ <COND (<==? .I ,IT> <SET I ,P-IT-OBJECT>)>
+ <SETG PRSA .A>
+ <SETG PRSO .O>
+ <COND (<AND ,PRSO <NOT <VERB? WALK>>>
+ <SETG P-IT-OBJECT ,PRSO>
+ <SETG P-IT-LOC ,HERE>)>
+ <SETG PRSI .I>
+ <COND (<SET V <APPLY <GETP ,WINNER ,P?ACTION>>> .V)
+ (<SET V <APPLY <GETP <LOC ,WINNER> ,P?ACTION> ,M-BEG>> .V)
+ (<SET V <APPLY <GET ,PREACTIONS .A>>> .V)
+ (<AND .I <SET V <APPLY <GETP .I ,P?ACTION>>>> .V)
+ (<AND .O
+ <NOT <==? .A ,V?WALK>>
+ <LOC .O>
+ <SET V <APPLY <GETP <LOC .O> ,P?CONTFCN>>>>
+ .V)
+ (<AND .O
+ <NOT <==? .A ,V?WALK>>
+ <SET V <APPLY <GETP .O ,P?ACTION>>>>
+ .V)
+ (<SET V <APPLY <GET ,ACTIONS .A>>> .V)>
+ <COND (<NOT <==? .V ,M-FATAL>>
+ <SET V <APPLY <GETP <LOC ,WINNER> ,P?ACTION> ,M-END>>)>
+ <SETG PRSA .OA>
+ <SETG PRSO .OO>
+ <SETG PRSI .OI>
+ .V>
+
diff --git a/parser.zil b/parser.zil
new file mode 100644
index 0000000..90d4e37
--- /dev/null
+++ b/parser.zil
@@ -0,0 +1,1178 @@
+"PARSER for
+ Interlogic SF
+ Copyright 1981,1982 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 ALWAYS-LIT <>>
+
+<GLOBAL GWIM-DISABLE <>>
+
+<GLOBAL PRSA 0>
+
+<GLOBAL PRSI 0>
+
+<GLOBAL PRSO 0>
+
+<GLOBAL P-ADVERB <>>
+
+<GLOBAL P-ADJECTIVE <>>
+
+<GLOBAL P-SPACE 1>
+
+<GLOBAL P-TABLE 0>
+
+<GLOBAL P-ONEOBJ 0>
+
+<GLOBAL P-SYNTAX 0>
+
+<GLOBAL P-CCSRC 0>
+
+<GLOBAL P-LEN 0>
+
+<GLOBAL P-DIR 0>
+
+<GLOBAL HERE 0>
+
+<GLOBAL WINNER 0>
+
+<GLOBAL P-LEXV <ITABLE BYTE 120>>
+;"INBUF - Input buffer for READ"
+
+<GLOBAL P-INBUF <ITABLE BYTE 100>>
+;"Parse-cont variable"
+
+<GLOBAL P-CONT <>>
+
+<GLOBAL P-IT-OBJECT <>>
+<GLOBAL P-IT-LOC <>>
+
+;"Orphan flag"
+
+<GLOBAL P-OFLAG <>>
+
+<GLOBAL P-MERGED <>>
+
+<GLOBAL P-ACLAUSE <>>
+
+<GLOBAL P-ANAM <>>
+
+<GLOBAL P-AADJ <>>
+;"Parser variables and temporaries"
+
+<CONSTANT P-PHRLEN 3>
+
+<CONSTANT P-ORPHLEN 7>
+
+<CONSTANT P-RTLEN 3>
+;"Byte offset to # of entries in LEXV"
+
+<CONSTANT P-LEXWORDS 1>
+;"Word offset to start of LEXV entries"
+
+<CONSTANT P-LEXSTART 1>
+;"Number of words per LEXV entry"
+
+<CONSTANT P-LEXELEN 2>
+
+<CONSTANT P-WORDLEN 4>
+;"Offset to parts of speech byte"
+
+<CONSTANT P-PSOFF 4>
+;"Offset to first part of speech"
+
+<CONSTANT P-P1OFF 5>
+;"First part of speech bit mask in PSOFF byte"
+
+<CONSTANT P-P1BITS 3>
+
+<CONSTANT P-ITBLLEN 9>
+
+<GLOBAL P-ITBL <TABLE 0 0 0 0 0 0 0 0 0 0>>
+
+<GLOBAL P-OTBL <TABLE 0 0 0 0 0 0 0 0 0 0>>
+
+<GLOBAL P-VTBL <TABLE 0 0 0 0>>
+
+<GLOBAL P-NCN 0>
+
+<CONSTANT P-VERB 0>
+
+<CONSTANT P-VERBN 1>
+
+<CONSTANT P-PREP1 2>
+
+<CONSTANT P-PREP1N 3>
+
+<CONSTANT P-PREP2 4>
+
+<CONSTANT P-PREP2N 5>
+
+<CONSTANT P-NC1 6>
+
+<CONSTANT P-NC1L 7>
+
+<CONSTANT P-NC2 8>
+
+<CONSTANT P-NC2L 9>
+
+<GLOBAL QUOTE-FLAG <>>
+
+" Grovel down the input finding the verb, prepositions, and noun clauses.
+ If the input is <direction> or <walk> <direction>, fall out immediately
+ setting PRSA to ,V?WALK and PRSO to <direction>. Otherwise, perform
+ all required orphaning, syntax checking, and noun clause lookup."
+
+<ROUTINE PARSER ("AUX" (PTR ,P-LEXSTART) WORD (VAL 0) (VERB <>)
+ LEN (DIR <>) (NW 0) (LW 0) NUM SCNT (CNT -1))
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN> <RETURN>)
+ (T <PUT ,P-ITBL .CNT 0>)>>
+ <SETG P-NUMBER <>>
+ <SETG P-ADVERB <>>
+ <SETG P-ADJECTIVE <>>
+ <SETG P-MERGED <>>
+ <PUT ,P-PRSO ,P-MATCHLEN 0>
+ <PUT ,P-PRSI ,P-MATCHLEN 0>
+ <PUT ,P-BUTS ,P-MATCHLEN 0>
+ <COND (<AND <NOT ,QUOTE-FLAG> <N==? ,WINNER ,ADVENTURER>>
+ <SETG WINNER ,ADVENTURER>
+ <COND (<NOT <FSET? <LOC ,WINNER> ,VEHBIT>>
+ <SETG HERE <LOC ,WINNER>>)>)>
+ <COND (,P-CONT
+ <SET PTR ,P-CONT>
+ <SETG P-CONT <>>
+ <COND (<NOT <VERB? TELL>> <CRLF>)>)
+ (T
+ <SETG WINNER ,ADVENTURER>
+ <SETG QUOTE-FLAG <>>
+ <COND (<NOT <FSET? <LOC ,WINNER> ,VEHBIT>>
+ <SETG HERE <LOC ,WINNER>>)>
+ <SET SCNT ,P-SPACE>
+ <REPEAT ()
+ <COND (<L? <SET SCNT <- .SCNT 1>> 0> <RETURN>)
+ (T <CRLF>)>>
+ <TELL ">">
+ <READ ,P-INBUF ,P-LEXV>)>
+ <SETG P-LEN <GETB ,P-LEXV ,P-LEXWORDS>>
+ <COND (<0? ,P-LEN> <TELL "I beg your pardon?" CR> <RFALSE>)>
+ <SET LEN ,P-LEN>
+ <SETG P-DIR <>>
+ <SETG P-NCN 0>
+ <SETG P-GETFLAGS 0>
+ <REPEAT ()
+ <COND (<L? <SETG P-LEN <- ,P-LEN 1>> 0>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)
+ (<OR <SET WORD <GET ,P-LEXV .PTR>>
+ <SET WORD <NUMBER? .PTR>>>
+ <COND (<AND <==? .WORD ,W?TO>
+ <EQUAL? .VERB ,ACT?TELL>>
+ <SET WORD ,W?QUOTE>)
+ (<AND <==? .WORD ,W?THEN>
+ <NOT .VERB>>
+ <PUT ,P-ITBL ,P-VERB ,ACT?TELL>
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <SET WORD ,W?QUOTE>)>
+ <COND ;(<AND <EQUAL? .WORD ,W?.>
+ <EQUAL? .LW ,W?MRS ,W?MR ,W?MS>>
+ <SET LW 0>)
+ (<OR <EQUAL? .WORD ,W?THEN ,W?.>
+ <EQUAL? .WORD ,W?QUOTE>>
+ <COND (<EQUAL? .WORD ,W?QUOTE>
+ <COND (,QUOTE-FLAG
+ <SETG QUOTE-FLAG <>>)
+ (T <SETG QUOTE-FLAG T>)>)>
+ <OR <0? ,P-LEN>
+ <SETG P-CONT <+ .PTR ,P-LEXELEN>>>
+ <PUTB ,P-LEXV ,P-LEXWORDS ,P-LEN>
+ <RETURN>)
+ (<AND <SET VAL
+ <WT? .WORD
+ ,PS?DIRECTION
+ ,P1?DIRECTION>>
+ <OR <==? .LEN 1>
+ <AND <==? .LEN 2> <==? .VERB ,ACT?WALK>>
+ <AND <EQUAL? <SET NW
+ <GET ,P-LEXV
+ <+ .PTR ,P-LEXELEN>>>
+ ,W?THEN
+ ,W?QUOTE>
+ <==? .VERB ,ACT?WALK>
+ <G? .LEN 2>>
+ <AND <EQUAL? .NW ,W?.>
+ <EQUAL? .VERB ,ACT?WALK <>>
+ <G? .LEN 1>>
+ <AND ,QUOTE-FLAG
+ <==? .LEN 2>
+ <EQUAL? .NW ,W?QUOTE>>
+ <AND <G? .LEN 2>
+ <==? .VERB ,ACT?WALK>
+ <EQUAL? .NW ,W?COMMA ,W?AND>>>>
+ <SET DIR .VAL>
+ <COND (<EQUAL? .NW ,W?COMMA ,W?AND>
+ <PUT ,P-LEXV
+ <+ .PTR ,P-LEXELEN>
+ ,W?THEN>)>
+ <COND (<NOT <G? .LEN 2>>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)>)
+ (<AND <SET VAL <WT? .WORD ,PS?VERB ,P1?VERB>>
+ <NOT .VERB>>
+ <SET VERB .VAL>
+ <PUT ,P-ITBL ,P-VERB .VAL>
+ <PUT ,P-ITBL ,P-VERBN ,P-VTBL>
+ <PUT ,P-VTBL 0 .WORD>
+ <PUTB ,P-VTBL 2 <GETB ,P-LEXV
+ <SET NUM
+ <+ <* .PTR 2> 2>>>>
+ <PUTB ,P-VTBL 3 <GETB ,P-LEXV <+ .NUM 1>>>)
+ (<OR <SET VAL <WT? .WORD ,PS?PREPOSITION 0>>
+ <AND <OR <EQUAL? .WORD ,W?ALL ,W?ONE ,W?A>
+ <EQUAL? .WORD ,W?BOTH>
+ <WT? .WORD ,PS?ADJECTIVE>
+ <WT? .WORD ,PS?OBJECT>>
+ <SET VAL 0>>>
+ <COND (<AND <G? ,P-LEN 0>
+ <==? <GET ,P-LEXV
+ <+ .PTR ,P-LEXELEN>>
+ ,W?OF>
+ ;<NOT <EQUAL? .VERB ,ACT?ACCUSE>>
+ <0? .VAL>
+ <NOT
+ <EQUAL? .WORD ,W?ALL ,W?ONE ,W?A>>
+ <NOT <EQUAL? .WORD ,W?BOTH>>>)
+ (<AND <NOT <0? .VAL>>
+ <OR <0? ,P-LEN>
+ <EQUAL? <GET ,P-LEXV <+ .PTR 2>>
+ ,W?THEN ,W?.>>>
+ <COND (<L? ,P-NCN 2>
+ <PUT ,P-ITBL ,P-PREP1 .VAL>
+ <PUT ,P-ITBL ,P-PREP1N .WORD>)>)
+ (<==? ,P-NCN 2>
+ <TELL
+"I found too many nouns in that sentence." CR>
+ <RFALSE>)
+ (T
+ <SETG P-NCN <+ ,P-NCN 1>>
+ <OR <SET PTR <CLAUSE .PTR .VAL .WORD>>
+ <RFALSE>>
+ <COND (<L? .PTR 0>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)>)>)
+ ;(<OR <EQUAL? .WORD ,W?CAREFULLY ,W?QUIETLY>
+ <EQUAL? .WORD ,W?SLOWLY ,W?QUICKLY
+ ,W?BRIEFLY>>
+ <SETG P-ADVERB .WORD>)
+ (<WT? .WORD ,PS?BUZZ-WORD>)
+ (T
+ <CANT-USE .PTR>
+ <RFALSE>)>)
+ (T
+ <UNKNOWN-WORD .PTR>
+ <RFALSE>)>
+ <SET LW .WORD>
+ <SET PTR <+ .PTR ,P-LEXELEN>>>
+ <COND (.DIR
+ <SETG PRSA ,V?WALK>
+ <SETG PRSO .DIR>
+ <SETG P-WALK-DIR .DIR>
+ <RETURN T>)>
+ <SETG P-WALK-DIR <>>
+ <COND (,P-OFLAG <ORPHAN-MERGE>)>
+ ;<COND (<==? <GET ,P-ITBL ,P-VERB> 0> <PUT ,P-ITBL ,P-VERB ,ACT?CALL>)>
+ <COND (<AND <SYNTAX-CHECK> <SNARF-OBJECTS> <TAKE-CHECK> <MANY-CHECK>>
+ T)>>
+
+
+<GLOBAL P-WALK-DIR <>>
+
+;"Check whether word pointed at by PTR is the correct part of speech.
+ The second argument is the part of speech (,PS?<part of speech>). The
+ 3rd argument (,P1?<part of speech>), if given, causes the value
+ for that part of speech to be returned."
+
+<ROUTINE WT? (PTR BIT "OPTIONAL" (B1 5) "AUX" (OFFST ,P-P1OFF) TYP)
+ <COND (<BTST <SET TYP <GETB .PTR ,P-PSOFF>> .BIT>
+ <COND (<G? .B1 4> <RTRUE>)
+ (T
+ <SET TYP <BAND .TYP ,P-P1BITS>>
+ <COND (<NOT <==? .TYP .B1>> <SET OFFST <+ .OFFST 1>>)>
+ <GETB .PTR .OFFST>)>)>>
+;" Scan through a noun clause, leave a pointer to its starting location"
+
+<ROUTINE CLAUSE (PTR VAL WORD "AUX" OFF NUM (ANDFLG <>) (FIRST?? T) NW (LW 0))
+ #DECL ((PTR VAL OFF NUM) FIX (WORD NW) <OR FALSE FIX TABLE>
+ (ANDFLG FIRST??) <OR ATOM FALSE>)
+ <SET OFF <* <- ,P-NCN 1> 2>>
+ <COND (<NOT <==? .VAL 0>>
+ <PUT ,P-ITBL <SET NUM <+ ,P-PREP1 .OFF>> .VAL>
+ <PUT ,P-ITBL <+ .NUM 1> .WORD>
+ <SET PTR <+ .PTR ,P-LEXELEN>>)
+ (T <SETG P-LEN <+ ,P-LEN 1>>)>
+ <COND (<0? ,P-LEN> <SETG P-NCN <- ,P-NCN 1>> <RETURN -1>)>
+ <PUT ,P-ITBL <SET NUM <+ ,P-NC1 .OFF>> <REST ,P-LEXV <* .PTR 2>>>
+ <COND (<EQUAL? <GET ,P-LEXV .PTR> ,W?THE ,W?A ,W?AN>
+ <PUT ,P-ITBL .NUM <REST <GET ,P-ITBL .NUM> 4>>)>
+ <REPEAT ()
+ <COND (<L? <SETG P-LEN <- ,P-LEN 1>> 0>
+ <PUT ,P-ITBL <+ .NUM 1> <REST ,P-LEXV <* .PTR 2>>>
+ <RETURN -1>)>
+ <COND (<OR <SET WORD <GET ,P-LEXV .PTR>>
+ <SET WORD <NUMBER? .PTR>>>
+ <COND (<0? ,P-LEN> <SET NW 0>)
+ (T <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>)>
+ ;<COND (<AND <==? .WORD ,W?OF>
+ <==? <GET ,P-ITBL ,P-VERB> ,ACT?ACCUSE>>
+ <PUT ,P-LEXV .PTR ,W?WITH>
+ <SET WORD ,W?WITH>)>
+ <COND ;(<AND <EQUAL? .WORD ,W?.>
+ <EQUAL? .LW ,W?MRS ,W?MR ,W?MS>>
+ <SET LW 0>)
+ (<EQUAL? .WORD ,W?AND ,W?COMMA> <SET ANDFLG T>)
+ (<EQUAL? .WORD ,W?ALL ,W?BOTH ,W?ONE>
+ <COND (<==? .NW ,W?OF>
+ <SETG P-LEN <- ,P-LEN 1>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>)>)
+ (<OR <EQUAL? .WORD ,W?THEN ,W?.>
+ <AND <WT? .WORD ,PS?PREPOSITION>
+ <NOT .FIRST??>>>
+ <SETG P-LEN <+ ,P-LEN 1>>
+ <PUT ,P-ITBL
+ <+ .NUM 1>
+ <REST ,P-LEXV <* .PTR 2>>>
+ <RETURN <- .PTR ,P-LEXELEN>>)
+ (<AND .ANDFLG
+ <OR <WT? .WORD ,PS?DIRECTION>
+ <WT? .WORD ,PS?VERB>>>
+ <SET PTR <- .PTR 4>>
+ <PUT ,P-LEXV <+ .PTR 2> ,W?THEN>
+ <SETG P-LEN <+ ,P-LEN 2>>)
+ (<WT? .WORD ,PS?OBJECT>
+ <COND (<AND <WT? .WORD
+ ,PS?ADJECTIVE
+ ,P1?ADJECTIVE>
+ <NOT <==? .NW 0>>
+ <WT? .NW ,PS?OBJECT>>)
+ (<AND <NOT .ANDFLG>
+ <NOT <EQUAL? .NW ,W?BUT ,W?EXCEPT>>
+ <NOT <EQUAL? .NW ,W?AND ,W?COMMA>>>
+ <PUT ,P-ITBL
+ <+ .NUM 1>
+ <REST ,P-LEXV <* <+ .PTR 2> 2>>>
+ <RETURN .PTR>)
+ (T <SET ANDFLG <>>)>)
+ (<OR <WT? .WORD ,PS?ADJECTIVE>
+ <WT? .WORD ,PS?BUZZ-WORD>>)
+ (<WT? .WORD ,PS?PREPOSITION> T)
+ (T
+ <CANT-USE .PTR>
+ <RFALSE>)>)
+ (T <UNKNOWN-WORD .PTR> <RFALSE>)>
+ <SET LW .WORD>
+ <SET FIRST?? <>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>>>
+
+<ROUTINE NUMBER? (PTR "AUX" CNT BPTR CHR (SUM 0) (TIM <>))
+ <SET CNT <GETB <REST ,P-LEXV <* .PTR 2>> 2>>
+ <SET BPTR <GETB <REST ,P-LEXV <* .PTR 2>> 3>>
+ <REPEAT ()
+ <COND (<L? <SET CNT <- .CNT 1>> 0> <RETURN>)
+ (T
+ <SET CHR <GETB ,P-INBUF .BPTR>>
+ <COND (<==? .CHR 58>
+ <SET TIM .SUM>
+ <SET SUM 0>)
+ (<G? .SUM 10000> <RFALSE>)
+ (<AND <L? .CHR 58> <G? .CHR 47>>
+ <SET SUM <+ <* .SUM 10> <- .CHR 48>>>)
+ (T <RFALSE>)>
+ <SET BPTR <+ .BPTR 1>>)>>
+ <PUT ,P-LEXV .PTR ,W?INTNUM>
+ <COND (<G? .SUM 1000> <RFALSE>)
+ (.TIM
+ <COND (<L? .TIM 8> <SET TIM <+ .TIM 12>>)
+ (<G? .TIM 23> <RFALSE>)>
+ <SET SUM <+ .SUM <* .TIM 60>>>)>
+ <SETG P-NUMBER .SUM>
+ ,W?INTNUM>
+
+<GLOBAL P-NUMBER 0>
+
+
+<ROUTINE ORPHAN-MERGE ("AUX" (CNT -1) TEMP VERB BEG END (ADJ <>) WRD)
+ #DECL ((CNT TEMP VERB) FIX (BEG END) <PRIMTYPE VECTOR> (WRD) TABLE)
+ <SETG P-OFLAG <>>
+ <COND
+ (<AND <NOT <0? <SET VERB <GET ,P-ITBL ,P-VERB>>>>
+ <NOT <==? .VERB <GET ,P-OTBL ,P-VERB>>>>
+ <RFALSE>)
+ (<==? ,P-NCN 2>
+ <RFALSE>)
+ (<==? <GET ,P-OTBL ,P-NC1> 1>
+ <COND (<OR <==? <SET TEMP <GET ,P-ITBL ,P-PREP1>> <GET ,P-OTBL ,P-PREP1>>
+ <0? .TEMP>>
+ <PUT ,P-OTBL ,P-NC1 <GET ,P-ITBL ,P-NC1>>
+ <PUT ,P-OTBL ,P-NC1L <GET ,P-ITBL ,P-NC1L>>)
+ (T <RFALSE>)>)
+ (<==? <GET ,P-OTBL ,P-NC2> 1>
+ <COND (<OR <==? <SET TEMP <GET ,P-ITBL ,P-PREP1>> <GET ,P-OTBL ,P-PREP2>>
+ <0? .TEMP>>
+ <PUT ,P-OTBL ,P-NC2 <GET ,P-ITBL ,P-NC1>>
+ <PUT ,P-OTBL ,P-NC2L <GET ,P-ITBL ,P-NC1L>>
+ <SETG P-NCN 2>)
+ (T <RFALSE>)>)
+ (,P-ACLAUSE
+ <COND
+ (<NOT <==? ,P-NCN 1>> <SETG P-ACLAUSE <>> <RFALSE>)
+ (T
+ <SET BEG <GET ,P-ITBL ,P-NC1>>
+ <SET END <GET ,P-ITBL ,P-NC1L>>
+ <REPEAT ()
+ <COND (<==? .BEG .END>
+ <COND (.ADJ
+ <ACLAUSE-WIN .ADJ>
+ <RETURN>)
+ (T
+ <SETG P-ACLAUSE <>>
+ <RFALSE>)>)
+ (<AND <NOT .ADJ>
+ <BTST <GETB <SET WRD <GET .BEG 0>> ,P-PSOFF>
+ ,PS?ADJECTIVE>>
+ <SET ADJ .WRD>)
+ (<OR <BTST <GETB .WRD ,P-PSOFF> ,PS?OBJECT>
+ <==? .WRD ,W?ONE>>
+ <COND (<NOT <EQUAL? .WRD ,P-ANAM ,W?ONE>> <RFALSE>)
+ (T
+ <ACLAUSE-WIN .ADJ>
+ <RETURN>)>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>)>)>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN>
+ <SETG P-MERGED T>
+ <RTRUE>)
+ (T <PUT ,P-ITBL .CNT <GET ,P-OTBL .CNT>>)>>
+ T>
+
+<ROUTINE ACLAUSE-WIN (ADJ)
+ <SETG P-CCSRC ,P-OTBL>
+ <CLAUSE-COPY ,P-ACLAUSE <+ ,P-ACLAUSE 1> .ADJ>
+ <AND <NOT <==? <GET ,P-OTBL ,P-NC2> 0>>
+ <SETG P-NCN 2>>
+ <SETG P-ACLAUSE <>>
+ <RTRUE>>
+
+;"Print undefined word in input.
+ PTR points to the unknown word in P-LEXV"
+
+<ROUTINE WORD-PRINT (CNT BUF)
+ <REPEAT ()
+ <COND (<DLESS? CNT 0> <RETURN>)
+ (ELSE
+ <PRINTC <GETB ,P-INBUF .BUF>>
+ <SET BUF <+ .BUF 1>>)>>>
+
+<ROUTINE UNKNOWN-WORD (PTR "AUX" BUF)
+ #DECL ((PTR BUF) FIX)
+ <TELL "I don't know the word '">
+ <WORD-PRINT <GETB <REST ,P-LEXV <SET BUF <* .PTR 2>>> 2>
+ <GETB <REST ,P-LEXV .BUF> 3>>
+ <TELL "'." CR>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-OFLAG <>>>
+
+<ROUTINE CANT-USE (PTR "AUX" BUF)
+ #DECL ((PTR BUF) FIX)
+ <TELL "I can't use the word '">
+ <WORD-PRINT <GETB <REST ,P-LEXV <SET BUF <* .PTR 2>>> 2>
+ <GETB <REST ,P-LEXV .BUF> 3>>
+ <TELL "' here." CR>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-OFLAG <>>>
+
+;" Perform syntax matching operations, using P-ITBL as the source of
+ the verb and adjectives for this input. Returns false if no
+ syntax matches, and does it's own orphaning. If return is true,
+ the syntax is saved in P-SYNTAX."
+
+<GLOBAL P-SLOCBITS 0>
+
+<CONSTANT P-SYNLEN 8>
+
+<CONSTANT P-SBITS 0>
+
+<CONSTANT P-SPREP1 1>
+
+<CONSTANT P-SPREP2 2>
+
+<CONSTANT P-SFWIM1 3>
+
+<CONSTANT P-SFWIM2 4>
+
+<CONSTANT P-SLOC1 5>
+
+<CONSTANT P-SLOC2 6>
+
+<CONSTANT P-SACTION 7>
+
+<CONSTANT P-SONUMS 3>
+
+<ROUTINE SYNTAX-CHECK ("AUX" SYN LEN NUM OBJ (DRIVE1 <>) (DRIVE2 <>) PREP VERB TMP)
+ #DECL ((DRIVE1 DRIVE2) <OR FALSE <PRIMTYPE VECTOR>>
+ (SYN) <PRIMTYPE VECTOR> (LEN NUM VERB PREP) FIX
+ (OBJ) <OR FALSE OBJECT>)
+ <COND (<0? <SET VERB <GET ,P-ITBL ,P-VERB>>>
+ <TELL "I can't find a verb in that sentence!" CR>
+ <RFALSE>)>
+ <SET SYN <GET ,VERBS <- 255 .VERB>>>
+ <SET LEN <GETB .SYN 0>>
+ <SET SYN <REST .SYN>>
+ <REPEAT ()
+ <SET NUM <BAND <GETB .SYN ,P-SBITS> ,P-SONUMS>>
+ <COND (<AND <NOT <L? .NUM 1>>
+ <0? ,P-NCN>
+ <OR <0? <SET PREP <GET ,P-ITBL ,P-PREP1>>>
+ <==? .PREP <GETB .SYN ,P-SPREP1>>>>
+ <SET DRIVE1 .SYN>)
+ (<==? <GETB .SYN ,P-SPREP1> <GET ,P-ITBL ,P-PREP1>>
+ <COND (<AND <==? .NUM 2> <==? ,P-NCN 1>>
+ <SET DRIVE2 .SYN>)
+ (<==? <GETB .SYN ,P-SPREP2> <GET ,P-ITBL ,P-PREP2>>
+ <SYNTAX-FOUND .SYN>
+ <RTRUE>)>)>
+ <COND (<DLESS? LEN 1>
+ <COND (<OR .DRIVE1 .DRIVE2> <RETURN>)
+ (T
+ <TELL "I don't understand that sentence." CR>
+ <RFALSE>)>)
+ (T <SET SYN <REST .SYN ,P-SYNLEN>>)>>
+ <COND (<AND .DRIVE1
+ <SET OBJ
+ <GWIM <GETB .DRIVE1 ,P-SFWIM1>
+ <GETB .DRIVE1 ,P-SLOC1>
+ <GETB .DRIVE1 ,P-SPREP1>>>>
+ <PUT ,P-PRSO ,P-MATCHLEN 1>
+ <PUT ,P-PRSO 1 .OBJ>
+ <SYNTAX-FOUND .DRIVE1>)
+ (<AND .DRIVE2
+ <SET OBJ
+ <GWIM <GETB .DRIVE2 ,P-SFWIM2>
+ <GETB .DRIVE2 ,P-SLOC2>
+ <GETB .DRIVE2 ,P-SPREP2>>>>
+ <PUT ,P-PRSI ,P-MATCHLEN 1>
+ <PUT ,P-PRSI 1 .OBJ>
+ <SYNTAX-FOUND .DRIVE2>)
+ (<EQUAL? .VERB ,ACT?FIND>
+ <TELL "I can't answer that question." CR>
+ <RFALSE>)
+ (<NOT <==? ,WINNER ,ADVENTURER>>
+ <CANT-ORPHAN>)
+ (T
+ <ORPHAN .DRIVE1 .DRIVE2>
+ <TELL "What do you want to ">
+ <SET TMP <GET ,P-OTBL ,P-VERBN>>
+ <COND (<==? .TMP 0> <TELL "tell">)
+ (<0? <GETB ,P-VTBL 2>>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>
+ <PUTB ,P-VTBL 2 0>)>
+ <COND (.DRIVE2
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L>)>
+ <SETG P-OFLAG T>
+ <PREP-PRINT <COND (.DRIVE1 <GETB .DRIVE1 ,P-SPREP1>)
+ (T <GETB .DRIVE2 ,P-SPREP2>)>>
+ <TELL "?" CR>
+ <RFALSE>)>>
+
+<ROUTINE CANT-ORPHAN ()
+ <TELL "\"That command was incomplete. Why don't you try again?\"" CR>
+ <RFALSE>>
+
+<ROUTINE ORPHAN (D1 D2 "AUX" (CNT -1))
+ #DECL ((D1 D2) <OR FALSE <PRIMTYPE VECTOR>>)
+ <PUT ,P-OCLAUSE ,P-MATCHLEN 0>
+ <SETG P-CCSRC ,P-ITBL>
+ <REPEAT ()
+ <COND (<IGRTR? CNT ,P-ITBLLEN> <RETURN>)
+ (T <PUT ,P-OTBL .CNT <GET ,P-ITBL .CNT>>)>>
+ <COND (<==? ,P-NCN 2> <CLAUSE-COPY ,P-NC2 ,P-NC2L>)>
+ <COND (<NOT <L? ,P-NCN 1>> <CLAUSE-COPY ,P-NC1 ,P-NC1L>)>
+ <COND (.D1
+ <PUT ,P-OTBL ,P-PREP1 <GETB .D1 ,P-SPREP1>>
+ <PUT ,P-OTBL ,P-NC1 1>)
+ (.D2
+ <PUT ,P-OTBL ,P-PREP2 <GETB .D2 ,P-SPREP2>>
+ <PUT ,P-OTBL ,P-NC2 1>)>>
+
+<ROUTINE CLAUSE-PRINT (BPTR EPTR)
+ <BUFFER-PRINT <GET ,P-ITBL .BPTR> <GET ,P-ITBL .EPTR> T>>
+
+<ROUTINE BUFFER-PRINT (BEG END CP "AUX" (NOSP <>) WRD (FIRST?? T) (PN <>))
+ #DECL ((BEG END) <PRIMTYPE VECTOR> (CP) <OR FALSE ATOM>)
+ <REPEAT ()
+ <COND (<==? .BEG .END> <RETURN>)
+ (T
+ <COND (.NOSP <SET NOSP <>>)
+ (T <TELL " ">)>
+ <COND (<==? <SET WRD <GET .BEG 0>> ,W?.> <SET NOSP T>)
+ ;(<==? .WRD ,W?MRS> <TELL "Mrs."> <SET PN T>)
+ ;(<==? .WRD ,W?MS> <TELL "Ms."> <SET PN T>)
+ ;(<==? .WRD ,W?MR> <TELL "Mr."> <SET PN T>)
+ ;(<OR <EQUAL? .WRD YOUR-WORDS>
+ <EQUAL? .WRD ETC>>
+ <CAPITALIZE .BEG>
+ <SET PN T>)
+ (T
+ <COND (<AND .FIRST?? <NOT .PN> .CP>
+ <TELL "the ">)>
+ <COND (,P-OFLAG <PRINTB .WRD>)
+ (<AND <==? .WRD ,W?IT>
+ <==? ,P-IT-LOC ,HERE>>
+ <PRINTD ,P-IT-OBJECT>)
+ (T
+ <WORD-PRINT <GETB .BEG 2>
+ <GETB .BEG 3>>)>
+ <SET FIRST?? <>>)>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>>
+
+<ROUTINE CAPITALIZE (PTR)
+ <PRINTC <- <GETB ,P-INBUF <GETB .PTR 3>> 32>>
+ <WORD-PRINT <- <GETB .PTR 2> 1> <+ <GETB .PTR 3> 1>>>
+
+<ROUTINE PREP-PRINT (PREP "AUX" WRD)
+ #DECL ((PREP) FIX)
+ <COND (<NOT <0? .PREP>>
+ <TELL " ">
+ <SET WRD <PREP-FIND .PREP>>
+ <COND ;(<==? .WRD ,W?AGAINST> <TELL "against">)
+ (T <PRINTB .WRD>)>)>>
+
+<ROUTINE CLAUSE-COPY (BPTR EPTR "OPTIONAL" (INSRT <>) "AUX" BEG END)
+ #DECL ((BPTR EPTR) FIX (BEG END) <PRIMTYPE VECTOR>
+ (INSRT) <OR FALSE TABLE>)
+ <SET BEG <GET ,P-CCSRC .BPTR>>
+ <SET END <GET ,P-CCSRC .EPTR>>
+ <PUT ,P-OTBL
+ .BPTR
+ <REST ,P-OCLAUSE
+ <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN> 2>>>
+ <REPEAT ()
+ <COND (<==? .BEG .END>
+ <PUT ,P-OTBL
+ .EPTR
+ <REST ,P-OCLAUSE
+ <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN>
+ 2>>>
+ <RETURN>)
+ (T
+ <COND (<AND .INSRT <==? ,P-ANAM <GET .BEG 0>>>
+ <CLAUSE-ADD .INSRT>)>
+ <CLAUSE-ADD <GET .BEG 0>>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>>
+
+<ROUTINE CLAUSE-ADD (WRD "AUX" PTR)
+ #DECL ((WRD) TABLE (PTR) FIX)
+ <SET PTR <+ <GET ,P-OCLAUSE ,P-MATCHLEN> 2>>
+ <PUT ,P-OCLAUSE <- .PTR 1> .WRD>
+ <PUT ,P-OCLAUSE .PTR 0>
+ <PUT ,P-OCLAUSE ,P-MATCHLEN .PTR>>
+
+<ROUTINE PREP-FIND (PREP "AUX" (CNT 0) SIZE)
+ #DECL ((PREP CNT SIZE) FIX)
+ <SET SIZE <* <GET ,PREPOSITIONS 0> 2>>
+ <REPEAT ()
+ <COND (<IGRTR? CNT .SIZE> <RFALSE>)
+ (<==? <GET ,PREPOSITIONS .CNT> .PREP>
+ <RETURN <GET ,PREPOSITIONS <- .CNT 1>>>)>>>
+
+<ROUTINE SYNTAX-FOUND (SYN)
+ #DECL ((SYN) <PRIMTYPE VECTOR>)
+ <SETG P-SYNTAX .SYN>
+ <SETG PRSA <GETB .SYN ,P-SACTION>>>
+
+<GLOBAL P-GWIMBIT 0>
+
+<ROUTINE GWIM (GBIT LBIT PREP "AUX" OBJ)
+ #DECL ((GBIT LBIT) FIX (OBJ) OBJECT)
+ <COND (<==? .GBIT ,RMUNGBIT>
+ <RETURN ,ROOMS>)>
+ <SETG P-GWIMBIT .GBIT>
+ <SETG P-SLOCBITS .LBIT>
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <COND (<GET-OBJECT ,P-MERGE <>>
+ <SETG P-GWIMBIT 0>
+ <COND (<==? <GET ,P-MERGE ,P-MATCHLEN> 1>
+ <SET OBJ <GET ,P-MERGE 1>>
+ <COND (<AND <FSET? .OBJ ,VEHBIT>
+ <EQUAL? .PREP ,PR?DOWN>>
+ <SET PREP ,PR?ON>)>
+ <TELL "(">
+ <COND (<NOT <0? .PREP>>
+ <PRINTB <PREP-FIND .PREP>>
+ <TELL " the ">)>
+ <TELL D .OBJ ")" CR>
+ .OBJ)>)
+ (T <SETG P-GWIMBIT 0> <RFALSE>)>>
+
+<ROUTINE SNARF-OBJECTS ("AUX" PTR)
+ #DECL ((PTR) <OR FIX <PRIMTYPE VECTOR>>)
+ <COND (<NOT <==? <SET PTR <GET ,P-ITBL ,P-NC1>> 0>>
+ <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC1>>
+ <OR <SNARFEM .PTR <GET ,P-ITBL ,P-NC1L> ,P-PRSO> <RFALSE>>
+ <OR <0? <GET ,P-BUTS ,P-MATCHLEN>>
+ <SETG P-PRSO <BUT-MERGE ,P-PRSO>>>)>
+ <COND (<NOT <==? <SET PTR <GET ,P-ITBL ,P-NC2>> 0>>
+ <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC2>>
+ <OR <SNARFEM .PTR <GET ,P-ITBL ,P-NC2L> ,P-PRSI> <RFALSE>>
+ <COND (<NOT <0? <GET ,P-BUTS ,P-MATCHLEN>>>
+ <COND (<==? <GET ,P-PRSI ,P-MATCHLEN> 1>
+ <SETG P-PRSO <BUT-MERGE ,P-PRSO>>)
+ (T <SETG P-PRSI <BUT-MERGE ,P-PRSI>>)>)>)>
+ <RTRUE>>
+
+<ROUTINE BUT-MERGE (TBL "AUX" LEN BUTLEN (CNT 1) (MATCHES 0) OBJ NTBL)
+ #DECL ((TBL NTBL) TABLE (LEN BUTLEN MATCHES) FIX (OBJ) OBJECT)
+ <SET LEN <GET .TBL ,P-MATCHLEN>>
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <REPEAT ()
+ <COND (<DLESS? LEN 0> <RETURN>)
+ (<ZMEMQ <SET OBJ <GET .TBL .CNT>> ,P-BUTS>)
+ (T
+ <PUT ,P-MERGE <+ .MATCHES 1> .OBJ>
+ <SET MATCHES <+ .MATCHES 1>>)>
+ <SET CNT <+ .CNT 1>>>
+ <PUT ,P-MERGE ,P-MATCHLEN .MATCHES>
+ <SET NTBL ,P-MERGE>
+ <SETG P-MERGE .TBL>
+ .NTBL>
+
+<GLOBAL P-NAM <>>
+
+<GLOBAL P-ADJ <>>
+
+<GLOBAL P-ADJN <>>
+
+<GLOBAL P-PRSO <ITABLE NONE 50>>
+
+<GLOBAL P-PRSI <ITABLE NONE 50>>
+
+<GLOBAL P-BUTS <ITABLE NONE 50>>
+
+<GLOBAL P-MERGE <ITABLE NONE 50>>
+
+<GLOBAL P-OCLAUSE <ITABLE NONE 50>>
+
+<GLOBAL P-MATCHLEN 0>
+
+<GLOBAL P-GETFLAGS 0>
+
+<CONSTANT P-ALL 1>
+
+<CONSTANT P-ONE 2>
+
+<CONSTANT P-INHIBIT 4>
+
+<GLOBAL P-CSPTR <>>
+<GLOBAL P-CEPTR <>>
+
+<ROUTINE SNARFEM (PTR EPTR TBL "AUX" (BUT <>) LEN WV WORD NW)
+ #DECL ((TBL) TABLE (PTR EPTR) <PRIMTYPE VECTOR> (ANDFLG) <OR ATOM FALSE>
+ (BUT) <OR FALSE TABLE> (WV) <OR FALSE FIX>)
+ <SETG P-GETFLAGS 0>
+ <SETG P-CSPTR .PTR>
+ <SETG P-CEPTR .EPTR>
+ <PUT ,P-BUTS ,P-MATCHLEN 0>
+ <PUT .TBL ,P-MATCHLEN 0>
+ <SET WORD <GET .PTR 0>>
+ <REPEAT ()
+ <COND (<==? .PTR .EPTR> <RETURN <GET-OBJECT <OR .BUT .TBL>>>)
+ (T
+ <SET NW <GET .PTR ,P-LEXELEN>>
+ <COND (<EQUAL? .WORD ,W?ALL ,W?BOTH>
+ <SETG P-GETFLAGS ,P-ALL>
+ <COND (<==? .NW ,W?OF>
+ <SET PTR <REST .PTR ,P-WORDLEN>>)>)
+ (<EQUAL? .WORD ,W?BUT ,W?EXCEPT>
+ <OR <GET-OBJECT <OR .BUT .TBL>> <RFALSE>>
+ <SET BUT ,P-BUTS>
+ <PUT .BUT ,P-MATCHLEN 0>)
+ (<EQUAL? .WORD ,W?A ,W?ONE>
+ <COND (<NOT ,P-ADJ>
+ <SETG P-GETFLAGS ,P-ONE>
+ <COND (<==? .NW ,W?OF>
+ <SET PTR <REST .PTR ,P-WORDLEN>>)>)
+ (T
+ <SETG P-NAM ,P-ONEOBJ>
+ <OR <GET-OBJECT <OR .BUT .TBL>> <RFALSE>>
+ <AND <0? .NW> <RTRUE>>)>)
+ (<AND <EQUAL? .WORD ,W?AND ,W?COMMA>
+ <NOT <EQUAL? .NW ,W?AND ,W?COMMA>>>
+ <OR <GET-OBJECT <OR .BUT .TBL>> <RFALSE>>
+ T)
+ (<AND <WT? .WORD ,PS?PREPOSITION>
+ <==? .PTR ,P-CSPTR>>
+ <SETG P-CSPTR <REST ,P-CSPTR ,P-WORDLEN>>)
+ (<WT? .WORD ,PS?BUZZ-WORD>)
+ (<EQUAL? .WORD ,W?AND ,W?COMMA>)
+ (<==? .WORD ,W?OF>
+ <COND (<0? ,P-GETFLAGS>
+ <SETG P-GETFLAGS ,P-INHIBIT>)>)
+ (<AND <SET WV <WT? .WORD ,PS?ADJECTIVE ,P1?ADJECTIVE>>
+ <ADJ-CHECK>>
+ ;"Used to check for P-ADJ being <> as well"
+ <SETG P-ADJ .WV>
+ <SETG P-ADJN .WORD>
+ <SETG P-ADJECTIVE .WORD>)
+ (<WT? .WORD ,PS?OBJECT ,P1?OBJECT>
+ <SETG P-NAM .WORD>
+ <SETG P-ONEOBJ .WORD>)>)>
+ <COND (<NOT <==? .PTR .EPTR>>
+ <SET PTR <REST .PTR ,P-WORDLEN>>
+ <SET WORD .NW>)>>>
+
+<ROUTINE ADJ-CHECK ()
+ <COND (<NOT ,P-ADJ> <RTRUE>)
+ (<OR <EQUAL? ,P-ADJ ,A?FIRST ,A?SECOND ,A?THIRD>
+ <EQUAL? ,P-ADJ ,A?FOURTH ,A?FIFTH ,A?SIXTH>
+ <EQUAL? ,P-ADJ ,A?SEVENTH ,A?EIGHTH ,A?NINTH>
+ <EQUAL? ,P-ADJ ,A?TENTH ,A?SMALL ,A?LARGE>
+ <EQUAL? ,P-ADJ ,A?INNER ,A?OUTER>>
+ <RFALSE>)
+ (T <RTRUE>)>>
+
+<CONSTANT SH 128>
+
+<CONSTANT SC 64>
+
+<CONSTANT SIR 32>
+
+<CONSTANT SOG 16>
+
+<CONSTANT STAKE 8>
+
+<CONSTANT SMANY 4>
+
+<CONSTANT SHAVE 2>
+
+<ROUTINE GET-OBJECT (TBL
+ "OPTIONAL" (VRB T)
+ "AUX" LEN XBITS TLEN (GCHECK <>) (OLEN 0))
+ #DECL ((TBL) TABLE (XBITS TLEN LEN) FIX (GWIM) <OR FALSE FIX>
+ (VRB GCHECK) <OR ATOM FALSE>)
+ <SET XBITS ,P-SLOCBITS>
+ <SET TLEN <GET .TBL ,P-MATCHLEN>>
+ <COND (<BTST ,P-GETFLAGS ,P-INHIBIT> <RTRUE>)>
+ <COND (<AND <NOT ,P-NAM> ,P-ADJ <WT? ,P-ADJN ,PS?OBJECT ,P1?OBJECT>>
+ <SETG P-NAM ,P-ADJN>
+ <SETG P-ADJECTIVE <>>
+ <SETG P-ADJ <>>)>
+ <COND (<AND <NOT ,P-NAM>
+ <NOT ,P-ADJ>
+ <NOT <==? ,P-GETFLAGS ,P-ALL>>
+ <0? ,P-GWIMBIT>>
+ <COND (.VRB
+ <TELL "I think that sentence was missing a noun." CR>)>
+ <RFALSE>)>
+ <COND (<OR <NOT <==? ,P-GETFLAGS ,P-ALL>> <0? ,P-SLOCBITS>>
+ <SETG P-SLOCBITS -1>)>
+ <SETG P-TABLE .TBL>
+ <PROG ()
+ <COND (.GCHECK <GLOBAL-CHECK .TBL>)
+ (T
+ <COND (,LIT <DO-SL ,HERE ,SOG ,SIR>)>
+ <DO-SL ,ADVENTURER ,SH ,SC>)>
+ <SET LEN <- <GET .TBL ,P-MATCHLEN> .TLEN>>
+ <COND (<BTST ,P-GETFLAGS ,P-ALL>)
+ (<AND <BTST ,P-GETFLAGS ,P-ONE>
+ <NOT <0? .LEN>>>
+ <COND (<NOT <==? .LEN 1>>
+ <PUT .TBL 1 <GET .TBL <RANDOM .LEN>>>
+ <TELL "(How about the ">
+ <PRINTD <GET .TBL 1>>
+ <TELL "?)" CR>)>
+ <PUT .TBL ,P-MATCHLEN 1>)
+ (<OR <G? .LEN 1>
+ <AND <0? .LEN> <NOT <==? ,P-SLOCBITS -1>>>>
+ <COND (<==? ,P-SLOCBITS -1>
+ <SETG P-SLOCBITS .XBITS>
+ <SET OLEN .LEN>
+ <PUT .TBL
+ ,P-MATCHLEN
+ <- <GET .TBL ,P-MATCHLEN> .LEN>>
+ <AGAIN>)
+ (T
+ <COND (<0? .LEN> <SET LEN .OLEN>)>
+ <COND (<NOT <==? ,WINNER ,ADVENTURER>>
+ <CANT-ORPHAN>
+ <RFALSE>)
+ (<AND <==? ,P-NAM ,W?BUMP>
+ <==? ,P-NCN 2>
+ ,P-NUMBER>
+ <PUT .TBL ,P-MATCHLEN 1>
+ <PUT .TBL 1 ,BUMP>
+ <RETURN>)
+ (<AND .VRB ,P-NAM>
+ <WHICH-PRINT .TLEN .LEN .TBL>
+ <SETG P-ACLAUSE
+ <COND (<==? .TBL ,P-PRSO> ,P-NC1)
+ (T ,P-NC2)>>
+ <SETG P-AADJ ,P-ADJ>
+ <SETG P-ANAM ,P-NAM>
+ <ORPHAN <> <>>
+ <SETG P-OFLAG T>)
+ (.VRB
+ <TELL "You must supply a noun!" CR>)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RFALSE>)>)
+ (<AND <0? .LEN> .GCHECK>
+ <COND (.VRB
+ <COND (,LIT
+ <TELL "You can't see any">
+ <COND (,P-OFLAG
+ <COND (<AND ,P-ADJ ,P-NAM>
+ <TELL " such">)>
+ <COND (,P-NAM
+ <TELL " ">
+ <PRINTB ,P-NAM>)>)
+ (T
+ <BUFFER-PRINT ,P-CSPTR
+ ,P-CEPTR
+ <>>)>
+ <TELL " here." CR>)
+ (T
+ <TELL "It's too dark to see." CR>)>)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RFALSE>)
+ (<0? .LEN> <SET GCHECK T> <AGAIN>)>
+ <SETG P-ADJ <>>
+ <SETG P-NAM <>>
+ <SETG P-SLOCBITS .XBITS>
+ <RTRUE>>>
+
+<ROUTINE WHICH-PRINT (TLEN LEN TBL "AUX" OBJ RLEN)
+ <SET RLEN .LEN>
+ <TELL "Which ">
+ <PRINTB ,P-NAM>
+ <COND (<EQUAL? ,P-NAM ,W?BUMP W?COLUMN>
+ <TELL " of the ten do you mean?" CR>
+ <RTRUE>)>
+ <TELL " do you mean, ">
+ <REPEAT ()
+ <SET TLEN <+ .TLEN 1>>
+ <SET OBJ <GET .TBL .TLEN>>
+ <TELL "the ">
+ <TELL D .OBJ>
+ <COND (<==? .LEN 2>
+ <COND (<NOT <==? .RLEN 2>> <TELL ",">)>
+ <TELL " or ">)
+ (<G? .LEN 2> <TELL ", ">)>
+ <COND (<L? <SET LEN <- .LEN 1>> 1>
+ <TELL "?" CR>
+ <RETURN>)>>>
+
+
+<ROUTINE GLOBAL-CHECK (TBL "AUX" LEN RMG RMGL (CNT 0) OBJ OBITS FOO)
+ #DECL ((TBL) TABLE (RMG) <OR FALSE TABLE> (RMGL CNT) FIX (OBJ) OBJECT)
+ <SET LEN <GET .TBL ,P-MATCHLEN>>
+ <SET OBITS ,P-SLOCBITS>
+ <COND (<SET RMG <GETPT ,HERE ,P?GLOBAL>>
+ <SET RMGL <- <PTSIZE .RMG> 1>>
+ <REPEAT ()
+ <COND (<THIS-IT? <SET OBJ <GETB .RMG .CNT>> .TBL>
+ <OBJ-FOUND .OBJ .TBL>)>
+ <COND (<IGRTR? CNT .RMGL> <RETURN>)>>)>
+ <COND (<SET RMG <GETPT ,HERE ,P?PSEUDO>>
+ <SET RMGL <- </ <PTSIZE .RMG> 4> 1>>
+ <SET CNT 0>
+ <REPEAT ()
+ <COND (<==? ,P-NAM <GET .RMG <* .CNT 2>>>
+ <PUTP ,PSEUDO-OBJECT
+ ,P?ACTION
+ <GET .RMG <+ <* .CNT 2> 1>>>
+ <SET FOO
+ <BACK <GETPT ,PSEUDO-OBJECT ,P?ACTION> 5>>
+ <PUT .FOO 0 <GET ,P-NAM 0>>
+ <PUT .FOO 1 <GET ,P-NAM 1>>
+ <OBJ-FOUND ,PSEUDO-OBJECT .TBL>
+ <RETURN>)
+ (<IGRTR? CNT .RMGL> <RETURN>)>>)>
+ <COND (<==? <GET .TBL ,P-MATCHLEN> .LEN>
+ <SETG P-SLOCBITS -1>
+ <SETG P-TABLE .TBL>
+ <DO-SL ,GLOBAL-OBJECTS 1 1>
+ <SETG P-SLOCBITS .OBITS>
+ <COND (<0? <GET .TBL ,P-MATCHLEN>>
+ <COND (<OR <EQUAL? ,PRSA ,V?LOOK-INSIDE ,V?SEARCH>
+ <EQUAL? ,PRSA ,V?EXAMINE ,V?FIND ,V?THROUGH>>
+ <DO-SL ,ROOMS 1 1>)>)>)>>
+
+<ROUTINE DO-SL (OBJ BIT1 BIT2)
+ #DECL ((OBJ) OBJECT (BIT1 BIT2) FIX)
+ <COND (<BTST ,P-SLOCBITS <+ .BIT1 .BIT2>>
+ <SEARCH-LIST .OBJ ,P-TABLE ,P-SRCALL>)
+ (T
+ <COND (<BTST ,P-SLOCBITS .BIT1>
+ <SEARCH-LIST .OBJ ,P-TABLE ,P-SRCTOP>)
+ (<BTST ,P-SLOCBITS .BIT2>
+ <SEARCH-LIST .OBJ ,P-TABLE ,P-SRCBOT>)
+ (T <RTRUE>)>)>>
+
+<CONSTANT P-SRCBOT 2>
+
+<CONSTANT P-SRCTOP 0>
+
+<CONSTANT P-SRCALL 1>
+
+<ROUTINE SEARCH-LIST (OBJ TBL LVL "AUX" FLS NOBJ)
+ #DECL ((OBJ NOBJ) <OR FALSE OBJECT> (TBL) TABLE (LVL) FIX (FLS) ANY)
+ <COND (<SET OBJ <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<AND <NOT <==? .LVL ,P-SRCBOT>>
+ <GETPT .OBJ ,P?SYNONYM>
+ <THIS-IT? .OBJ .TBL>>
+ <OBJ-FOUND .OBJ .TBL>)>
+ <COND (<AND <NOT <FSET? .OBJ ,INVISIBLE>>
+ <OR <NOT <==? .LVL ,P-SRCTOP>>
+ <FSET? .OBJ ,SEARCHBIT>
+ <FSET? .OBJ ,SURFACEBIT>>
+ <SET NOBJ <FIRST? .OBJ>>
+ <OR <FSET? .OBJ ,OPENBIT>
+ <FSET? .OBJ ,TRANSBIT>>>
+ <COND (<AND <==? .LVL ,P-SRCTOP>
+ <FSET? .OBJ ,SEARCHBIT>
+ <==? ,P-GETFLAGS ,P-ALL>>
+ T)
+ (T
+ <SET FLS
+ <SEARCH-LIST .OBJ
+ .TBL
+ <COND (<FSET? .OBJ ,SURFACEBIT>
+ ,P-SRCALL)
+ (<FSET? .OBJ ,SEARCHBIT>
+ ,P-SRCALL)
+ (T ,P-SRCTOP)>>>)>)>
+ <COND (<SET OBJ <NEXT? .OBJ>>) (T <RETURN>)>>)>>
+
+<ROUTINE OBJ-FOUND (OBJ TBL "AUX" PTR)
+ #DECL ((OBJ) OBJECT (TBL) TABLE (PTR) FIX)
+ <SET PTR <GET .TBL ,P-MATCHLEN>>
+ <PUT .TBL <+ .PTR 1> .OBJ>
+ <PUT .TBL ,P-MATCHLEN <+ .PTR 1>>>
+
+<ROUTINE TAKE-CHECK ()
+ <AND <ITAKE-CHECK ,P-PRSO <GETB ,P-SYNTAX ,P-SLOC1>>
+ <ITAKE-CHECK ,P-PRSI <GETB ,P-SYNTAX ,P-SLOC2>>>>
+
+<ROUTINE ITAKE-CHECK (TBL IBITS "AUX" PTR OBJ TAKEN)
+ #DECL ((TBL) TABLE (IBITS PTR) FIX (OBJ) OBJECT
+ (TAKEN) <OR FALSE FIX ATOM>)
+ <COND (<AND <SET PTR <GET .TBL ,P-MATCHLEN>>
+ <OR <BTST .IBITS ,SHAVE>
+ <BTST .IBITS ,STAKE>>>
+ <REPEAT ()
+ <COND (<L? <SET PTR <- .PTR 1>> 0> <RETURN>)
+ (T
+ <SET OBJ <GET .TBL <+ .PTR 1>>>
+ <COND (<==? .OBJ ,IT> <SET OBJ ,P-IT-OBJECT>)>
+ <COND (<AND <NOT <HELD? .OBJ>>
+ <NOT <==? .OBJ ,HANDS>>>
+ <SETG PRSO .OBJ>
+ <COND (<FSET? .OBJ ,TRYTAKEBIT>
+ <SET TAKEN T>)
+ (<NOT <==? ,WINNER ,ADVENTURER>>
+ <SET TAKEN <>>)
+ (<AND <BTST .IBITS ,STAKE>
+ <==? <ITAKE <>> T>>
+ <SET TAKEN <>>)
+ (T <SET TAKEN T>)>
+ <COND (<AND .TAKEN <BTST .IBITS ,SHAVE>>
+ <TELL "You don't have the ">
+ <PRINTD .OBJ>
+ <TELL "." CR>
+ <RFALSE>)
+ (<AND <NOT .TAKEN>
+ <==? ,WINNER ,ADVENTURER>>
+ <TELL "(Taken)" CR>)>)>)>>)
+ (T)>>
+
+<ROUTINE HELD? (CAN)
+ <REPEAT ()
+ <SET CAN <LOC .CAN>>
+ <COND (<NOT .CAN> <RFALSE>)
+ (<==? .CAN ,WINNER> <RTRUE>)>>>
+
+<ROUTINE MANY-CHECK ("AUX" (LOSS <>) TMP)
+ #DECL ((LOSS) <OR FALSE FIX>)
+ <COND (<AND <G? <GET ,P-PRSO ,P-MATCHLEN> 1>
+ <NOT <BTST <GETB ,P-SYNTAX ,P-SLOC1> ,SMANY>>>
+ <SET LOSS 1>)
+ (<AND <G? <GET ,P-PRSI ,P-MATCHLEN> 1>
+ <NOT <BTST <GETB ,P-SYNTAX ,P-SLOC2> ,SMANY>>>
+ <SET LOSS 2>)>
+ <COND (.LOSS
+ <TELL "I can't use multiple ">
+ <COND (<==? .LOSS 2> <TELL "in">)>
+ <TELL "direct objects with '">
+ <SET TMP <GET ,P-ITBL ,P-VERBN>>
+ <COND (<0? .TMP> <TELL "tell">)
+ (,P-OFLAG
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>)>
+ <TELL "'." CR>
+ <RFALSE>)
+ (T)>>
+
+<ROUTINE ZMEMQ (ITM TBL "OPTIONAL" (SIZE -1) "AUX" (CNT 1))
+ <COND (<NOT .TBL> <RFALSE>)>
+ <COND (<NOT <L? .SIZE 0>> <SET CNT 0>)
+ (ELSE <SET SIZE <GET .TBL 0>>)>
+ <REPEAT ()
+ <COND (<==? .ITM <GET .TBL .CNT>> <RTRUE>)
+ (<IGRTR? CNT .SIZE> <RFALSE>)>>>
+
+<ROUTINE ZMEMQB (ITM TBL SIZE "AUX" (CNT 0))
+ #DECL ((ITM) ANY (TBL) TABLE (SIZE CNT) FIX)
+ <REPEAT ()
+ <COND (<==? .ITM <GETB .TBL .CNT>> <RTRUE>)
+ (<IGRTR? CNT .SIZE> <RFALSE>)>>>
+
+<SETG ALWAYS-LIT <>>
+
+<ROUTINE LIT? (RM "AUX" OHERE (LIT <>))
+ #DECL ((RM OHERE) OBJECT (LIT) <OR ATOM FALSE>)
+ <SETG P-GWIMBIT ,ONBIT>
+ <SET OHERE ,HERE>
+ <SETG HERE .RM>
+ <COND (<OR <FSET? .RM ,ONBIT> ,ALWAYS-LIT> <SET LIT T>)
+ (T
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <SETG P-TABLE ,P-MERGE>
+ <SETG P-SLOCBITS -1>
+ <COND (<==? .OHERE .RM> <DO-SL ,WINNER 1 1>)>
+ <DO-SL .RM 1 1>
+ <COND (<G? <GET ,P-TABLE ,P-MATCHLEN> 0> <SET LIT T>)>)>
+ <SETG HERE .OHERE>
+ <SETG P-GWIMBIT 0>
+ .LIT>
+
+<ROUTINE PRSO-PRINT ("AUX" PTR)
+ <COND (<OR ,P-MERGED
+ <==? <GET <SET PTR <GET ,P-ITBL ,P-NC1>> 0> ,W?IT>>
+ <TELL " " D ,PRSO>)
+ (T <BUFFER-PRINT .PTR <GET ,P-ITBL ,P-NC1L> <>>)>>
+
+<ROUTINE PRSI-PRINT ("AUX" PTR)
+ <COND (<OR ,P-MERGED
+ <==? <GET <SET PTR <GET ,P-ITBL ,P-NC2>> 0> ,W?IT>>
+ <TELL " " D ,PRSO>)
+ (T <BUFFER-PRINT .PTR <GET ,P-ITBL ,P-NC2L> <>>)>> \ No newline at end of file
diff --git a/sf.zil b/sf.zil
new file mode 100644
index 0000000..ea344fe
--- /dev/null
+++ b/sf.zil
@@ -0,0 +1,54 @@
+"SF for
+ Zork SF Game
+ (c) Copyright 1981 Infocom, Inc. All Rights Reserved.
+"
+
+<SNAME "INFOCOM.SF">
+
+<BLOAT 70000 0 0 2700 0 0 0 0 0 256>
+
+<SET REDEFINE T>
+
+<GLOBAL BIGFIX 10000>
+
+<OR <GASSIGNED? ZILCH>
+ <SETG WBREAKS <STRING !\" !\= !,WBREAKS>>>
+
+<OR <GASSIGNED? INSERT-CRUFTY>
+ <DEFINE INSERT-CRUFTY (STR) <IFILE .STR T>>>
+
+<DEFINE IFILE (STR "OPTIONAL" (FLOAD? <>) "AUX" (TIM <TIME>))
+ <INSERT-FILE .STR .FLOAD?>>
+
+<PRINC "Starcross: Interlogic Science Fiction
+">
+
+<COND (<GASSIGNED? PREDGEN>
+ <ID 0>)>
+
+<IFILE "DUNGEON" T>
+
+<PROPDEF SIZE 5>
+<PROPDEF CAPACITY 0>
+<PROPDEF VALUE 0>
+
+<IFILE "SYNTAX" T>
+<ENDLOAD>
+<IFILE "MACROS" T>
+<IFILE "CLOCK" T>
+<IFILE "MAIN" T>
+<IFILE "PARSER" T>
+;<IFILE "DEMONS" T>
+<INSERT-CRUFTY "CRUFTY">
+<IFILE "VERBS" T>
+<IFILE "ACTIONS" T>
+<IFILE "EMERG" T>
+
+<GC 0 T>
+
+<DEFINE CNT (STR OBL)
+ <PRINC .STR>
+ <PRIN1 <MAPF ,+ ,LENGTH .OBL>>
+ <CRLF>>
+
+<IMAGE 7><IMAGE 7><IMAGE 7> \ No newline at end of file
diff --git a/sffreq.xzap b/sffreq.xzap
new file mode 100644
index 0000000..0529f6e
--- /dev/null
+++ b/sffreq.xzap
@@ -0,0 +1,200 @@
+ .FSTR FSTR?1,"the " ;1784 892
+ .FSTR FSTR?2,"The " ;1164 388
+ .FSTR FSTR?3,"and " ;670 335
+ .FSTR FSTR?4,", " ;603 603
+ .FSTR FSTR?5,"You " ;585 195
+ .FSTR FSTR?6,"is " ;474 474
+ .FSTR FSTR?7,"you " ;442 221
+ .FSTR FSTR?8,"There " ;440 88
+ .FSTR FSTR?9,". " ;425 425
+ .FSTR FSTR?10,"of " ;393 393
+ .FSTR FSTR?11,"are " ;350 175
+ .FSTR FSTR?12,"can't " ;290 58
+ .FSTR FSTR?13,"with " ;276 92
+ .FSTR FSTR?14,"This " ;260 65
+ .FSTR FSTR?15,"to " ;254 254
+ .FSTR FSTR?16,"which " ;244 61
+ .FSTR FSTR?17,"your " ;237 79
+ .FSTR FSTR?18,"have " ;222 74
+ .FSTR FSTR?19,"that " ;207 69
+ .FSTR FSTR?20,"corridor " ;189 27
+ .FSTR FSTR?21,"from " ;177 59
+ .FSTR FSTR?22,"into " ;174 58
+ .FSTR FSTR?23,"in " ;168 168
+ .FSTR FSTR?24,"maintenance " ;160 16
+ .FSTR FSTR?25,"artifact" ;156 26
+ .FSTR FSTR?26,"computer " ;147 21
+ .FSTR FSTR?27,"for " ;146 73
+ .FSTR FSTR?28,"space " ;144 36
+ .FSTR FSTR?29,"nothing " ;138 23
+ .FSTR FSTR?30,"here" ;136 68
+ .FSTR FSTR?31,"but " ;132 66
+ .FSTR FSTR?32,"It's " ;130 26
+ .FSTR FSTR?33,"already " ;126 21
+ .FSTR FSTR?34,"cylinder" ;120 20
+ .FSTR FSTR?35,"large " ;116 29
+ .FSTR FSTR?36,"through " ;114 19
+ .FSTR FSTR?37,"around " ;110 22
+ .FSTR FSTR?38,"crystal " ;108 18
+ .FSTR FSTR?39,"artifact " ;105 15
+ .FSTR FSTR?40,"small " ;104 26
+ .FSTR FSTR?41,"something " ;104 13
+ .FSTR FSTR?42,"this " ;102 34
+ .FSTR FSTR?43,"don't " ;100 20
+ .FSTR FSTR?44,"mouse " ;96 24
+ .FSTR FSTR?45,"chief " ;96 24
+ .FSTR FSTR?46,"about " ;96 24
+ .FSTR FSTR?47,"surface " ;96 16
+ .FSTR FSTR?48,"airlock " ;96 16
+ .FSTR FSTR?49,"It " ;88 44
+ .FSTR FSTR?50,"there " ;88 22
+ .FSTR FSTR?51,"some " ;87 29
+ .FSTR FSTR?52,"has " ;86 43
+ .FSTR FSTR?53,"out " ;84 42
+ .FSTR FSTR?54,"not " ;84 42
+ .FSTR FSTR?55,"seems " ;84 21
+ .FSTR FSTR?56,"controls " ;84 12
+ .FSTR FSTR?57,"Unfortunately" ;84 7
+ .FSTR FSTR?58,"here " ;81 27
+ .FSTR FSTR?59,"almost " ;80 16
+ .FSTR FSTR?60,"aliens " ;80 16
+ .FSTR FSTR?61,"mass " ;78 26
+ .FSTR FSTR?62,"blue " ;78 26
+ .FSTR FSTR?63,"strange " ;78 13
+ .FSTR FSTR?64,"outside " ;78 13
+ .FSTR FSTR?65,"starboard" ;77 11
+ .FSTR FSTR?66,"floating " ;77 11
+ .FSTR FSTR?67,"at " ;76 76
+ .FSTR FSTR?68,"would " ;76 19
+ .FSTR FSTR?69,"bubble" ;76 19
+ .FSTR FSTR?70,"it " ;75 75
+ .FSTR FSTR?71,"been " ;75 25
+ .FSTR FSTR?72,"yellow " ;75 15
+ .FSTR FSTR?73,"airlock" ;75 15
+ .FSTR FSTR?74,"as " ;72 72
+ .FSTR FSTR?75,"one " ;72 36
+ .FSTR FSTR?76,"end " ;72 36
+ .FSTR FSTR?77,"area " ;72 24
+ .FSTR FSTR?78,"other " ;72 18
+ .FSTR FSTR?79,"metal " ;72 18
+ .FSTR FSTR?80,"looks " ;72 18
+ .FSTR FSTR?81,"They " ;72 18
+ .FSTR FSTR?82,"wearing " ;72 12
+ .FSTR FSTR?83,"appears " ;72 12
+ .FSTR FSTR?84,"projector " ;72 9
+ .FSTR FSTR?85,"on " ;71 71
+ .FSTR FSTR?86,"safety " ;70 14
+ .FSTR FSTR?87,"rotation " ;70 10
+ .FSTR FSTR?88,"attached " ;70 10
+ .FSTR FSTR?89,"like " ;69 23
+ .FSTR FSTR?90,"then " ;66 22
+ .FSTR FSTR?91,"corridor" ;66 11
+ .FSTR FSTR?92,"control " ;66 11
+ .FSTR FSTR?93,"rather " ;65 13
+ .FSTR FSTR?94,"bubble " ;65 13
+ .FSTR FSTR?95,"expressionless " ;65 5
+ .FSTR FSTR?96,"I " ;64 64
+
+
+;word frequency table of 96 most common words
+
+WORDS:: .TABLE
+ FSTR?1
+ FSTR?2
+ FSTR?3
+ FSTR?4
+ FSTR?5
+ FSTR?6
+ FSTR?7
+ FSTR?8
+ FSTR?9
+ FSTR?10
+ FSTR?11
+ FSTR?12
+ FSTR?13
+ FSTR?14
+ FSTR?15
+ FSTR?16
+ FSTR?17
+ FSTR?18
+ FSTR?19
+ FSTR?20
+ FSTR?21
+ FSTR?22
+ FSTR?23
+ FSTR?24
+ FSTR?25
+ FSTR?26
+ FSTR?27
+ FSTR?28
+ FSTR?29
+ FSTR?30
+ FSTR?31
+ FSTR?32
+ FSTR?33
+ FSTR?34
+ FSTR?35
+ FSTR?36
+ FSTR?37
+ FSTR?38
+ FSTR?39
+ FSTR?40
+ FSTR?41
+ FSTR?42
+ FSTR?43
+ FSTR?44
+ FSTR?45
+ FSTR?46
+ FSTR?47
+ FSTR?48
+ FSTR?49
+ FSTR?50
+ FSTR?51
+ FSTR?52
+ FSTR?53
+ FSTR?54
+ FSTR?55
+ FSTR?56
+ FSTR?57
+ FSTR?58
+ FSTR?59
+ FSTR?60
+ FSTR?61
+ FSTR?62
+ FSTR?63
+ FSTR?64
+ FSTR?65
+ FSTR?66
+ FSTR?67
+ FSTR?68
+ FSTR?69
+ FSTR?70
+ FSTR?71
+ FSTR?72
+ FSTR?73
+ FSTR?74
+ FSTR?75
+ FSTR?76
+ FSTR?77
+ FSTR?78
+ FSTR?79
+ FSTR?80
+ FSTR?81
+ FSTR?82
+ FSTR?83
+ FSTR?84
+ FSTR?85
+ FSTR?86
+ FSTR?87
+ FSTR?88
+ FSTR?89
+ FSTR?90
+ FSTR?91
+ FSTR?92
+ FSTR?93
+ FSTR?94
+ FSTR?95
+ FSTR?96
+ .ENDT
+
+ .ENDI
diff --git a/syntax.zil b/syntax.zil
new file mode 100644
index 0000000..5fa623f
--- /dev/null
+++ b/syntax.zil
@@ -0,0 +1,517 @@
+"SEARCH <SYNTAX "
+
+"SYNTAX for
+ Interlogic SF Game
+ (c) Copyright 1981,1982 Infocom, Inc. All Rights Reserved
+"
+
+"SUBTITLE VOCABULARY"
+
+<BUZZ A AN THE IS ARE EQUALS ;= AND OF THEN ALL ONE BUT EXCEPT \. \, \" OUR>
+
+<SYNONYM WITH USING THROUGH>
+<SYNONYM IN INSIDE INTO>
+<SYNONYM ALL BOTH>
+
+<SYNONYM NORTH N FORE FORWARD FOREWARD F>
+<SYNONYM SOUTH S AFT>
+<SYNONYM EAST E CW STARBOARD SB>
+<SYNONYM WEST W CCW PORT P>
+<SYNONYM DOWN D>
+<SYNONYM UP U>
+
+\
+
+"ZORK game commands"
+
+<SYNTAX BRIEF = V-BRIEF>
+
+<SYNTAX SUPER = V-SUPER-BRIEF>
+<SYNONYM SUPER SUPERBRIEF>
+
+<SYNTAX DIAGNOSE = V-DIAGNOSE>
+
+<SYNTAX INVENTORY = V-INVENTORY>
+<SYNONYM INVENTORY I>
+
+<SYNTAX QUIT = V-QUIT>
+<SYNONYM QUIT Q>
+
+<SYNTAX RESTART = V-RESTART>
+
+<SYNTAX RESTORE = V-RESTORE>
+
+<SYNTAX SAVE = V-SAVE>
+
+<SYNTAX SCORE = V-SCORE>
+
+<SYNTAX $VERIFY = V-$VERIFY>
+
+<SYNTAX VERSION = V-VERSION>
+
+<SYNTAX VERBOSE = V-VERBOSE>
+
+\
+
+"SUBTITLE REAL VERBS"
+
+<SYNTAX AGAIN = V-AGAIN>
+
+<SYNTAX ANSWER = V-ANSWER>
+<SYNTAX ANSWER OBJECT = V-REPLY>
+<SYNONYM ANSWER REPLY>
+
+<SYNTAX APPLY OBJECT TO OBJECT = V-PUT PRE-PUT>
+
+<SYNTAX ATTACK
+ OBJECT (FIND VILLAIN) (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE)
+ = V-ATTACK>
+<SYNONYM ATTACK FIGHT HURT INJURE HIT>
+
+<SYNTAX BACK = V-BACK>
+
+<SYNTAX BOARD OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM)
+ = V-BOARD PRE-BOARD>
+
+<SYNTAX CLIMB ON OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
+<SYNTAX CLIMB UP OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-UP>
+<SYNTAX CLIMB DOWN OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-DOWN>
+<SYNTAX CLIMB OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-FOO>
+<SYNTAX CLIMB IN OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-BOARD PRE-BOARD>
+<SYNONYM CLIMB SIT RECLINE LIE LAY>
+
+<SYNTAX STAND = V-STAND>
+<SYNTAX STAND UP OBJECT (FIND RMUNGBIT) = V-STAND>
+<SYNTAX STAND ON OBJECT = V-STAND-ON>
+<SYNONYM STAND>
+
+<SYNTAX CLOSE
+ OBJECT (FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-CLOSE>
+
+<SYNTAX CURSE = V-CURSES>
+<SYNTAX CURSE OBJECT (FIND VILLAIN) = V-CURSES>
+<SYNONYM CURSE DAMN>
+
+<SYNTAX DIG
+ IN
+ OBJECT ;(FIND DIGBIT) (ON-GROUND IN-ROOM)
+ = V-DIG>
+<SYNTAX DIG
+ WITH ;"REALLY THROUGH?"
+ OBJECT ;(FIND DIGBIT) (ON-GROUND IN-ROOM)
+ = V-DIG>
+
+<SYNTAX DISEMBARK OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM)
+ = V-DISEMBARK>
+
+<SYNTAX DRINK
+ OBJECT (FIND DRINKBIT) (HELD CARRIED ON-GROUND IN-ROOM)
+ = V-DRINK>
+<SYNONYM DRINK IMBIBE SWALLOW>
+
+<SYNTAX DROP OBJECT (HELD MANY HAVE) = V-DROP ;*>
+<SYNTAX DROP OBJECT (HELD MANY HAVE) DOWN OBJECT = V-PUT PRE-PUT>
+<SYNTAX DROP OBJECT (HELD MANY HAVE) IN OBJECT = V-PUT PRE-PUT>
+<SYNTAX DROP OBJECT (HELD MANY HAVE) ON OBJECT = V-PUT-ON PRE-PUT>
+<SYNONYM DROP RELEASE>
+
+<SYNTAX EAT
+ OBJECT (FIND FOODBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE MANY)
+ = V-EAT>
+<SYNONYM EAT BITE TASTE>
+
+<SYNTAX ENTER = V-ENTER>
+<SYNTAX ENTER OBJECT = V-THROUGH>
+<SYNTAX EXIT = V-EXIT>
+<SYNTAX EXIT OBJECT = V-EXIT>
+
+<SYNTAX EXAMINE OBJECT = V-EXAMINE>
+<SYNTAX EXAMINE IN OBJECT (HELD CARRIED IN-ROOM ON-GROUND MANY)
+ = V-LOOK-INSIDE>
+<SYNTAX EXAMINE ON OBJECT (HELD CARRIED IN-ROOM ON-GROUND MANY)
+ = V-LOOK-INSIDE>
+<SYNONYM EXAMINE DESCRIBE WHAT WHATS>
+
+<SYNTAX FIND OBJECT
+ = V-FIND>
+<SYNONYM FIND WHERE SEEK SEE>
+
+<SYNTAX FIRE OBJECT WITH OBJECT (FIND WEAPONBIT) (HELD) = V-SZAP PRE-SZAP>
+<SYNTAX FIRE OBJECT = V-ZAP PRE-ZAP>
+<SYNTAX FIRE OBJECT (FIND WEAPONBIT) (HELD)
+ AT OBJECT = V-ZAP>
+<SYNONYM FIRE ZAP BLAST SHOOT BURN>
+
+<SYNTAX FOLLOW = V-FOLLOW>
+<SYNTAX FOLLOW OBJECT = V-FOLLOW>
+<SYNONYM FOLLOW PURSUE CHASE>
+
+<SYNTAX FLY = V-FLY>
+<SYNTAX FLY OBJECT = V-FLY>
+
+<SYNTAX GIVE
+ OBJECT (MANY HELD HAVE ;CARRIED ;ON-GROUND ;IN-ROOM)
+ TO
+ OBJECT (FIND VICBIT) (ON-GROUND)
+ = V-GIVE PRE-GIVE>
+<SYNTAX GIVE
+ OBJECT (FIND VICBIT) (ON-GROUND)
+ OBJECT (MANY HELD HAVE)
+ = V-SGIVE PRE-SGIVE>
+<SYNONYM GIVE HAND DONATE OFFER FEED>
+
+<SYNTAX HELLO = V-HELLO ;*>
+<SYNTAX HELLO OBJECT = V-HELLO>
+<SYNONYM HELLO HI>
+
+<SYNTAX BLOW OUT OBJECT = V-LAMP-OFF>
+
+<SYNTAX JUMP = V-LEAP>
+<SYNTAX JUMP OVER OBJECT = V-LEAP>
+<SYNTAX JUMP ACROSS OBJECT = V-LEAP>
+<SYNTAX JUMP IN OBJECT = V-LEAP>
+<SYNTAX JUMP FROM OBJECT = V-LEAP>
+<SYNTAX JUMP OFF OBJECT = V-LEAP>
+<SYNONYM JUMP LEAP>
+
+<SYNTAX KICK OBJECT = V-KICK>
+
+<SYNTAX KILL OBJECT (FIND VILLAIN) (ON-GROUND IN-ROOM) = V-KILL>
+<SYNTAX KILL
+ OBJECT (FIND VILLAIN) (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE)
+ = V-KILL>
+<SYNONYM KILL MURDER SLAY DISPATCH STAB>
+
+<SYNTAX KISS OBJECT (FIND VILLAIN) (ON-GROUND IN-ROOM) = V-KISS>
+
+<SYNTAX KNOCK AT OBJECT = V-KNOCK ;*>
+<SYNTAX KNOCK ON OBJECT = V-KNOCK>
+<SYNTAX KNOCK DOWN OBJECT (FIND VICBIT) (ON-GROUND IN-ROOM) = V-ATTACK>
+<SYNONYM KNOCK RAP>
+
+<SYNTAX LAND = V-LAND>
+<SYNTAX LAND OBJECT = V-LAND>
+<SYNTAX LAND ON OBJECT = V-LAND>
+<SYNTAX LAND WITH OBJECT = V-LAND>
+<SYNONYM LAND DOCK INTERCEPT RENDEZVOUS>
+
+<SYNTAX LAUNCH OBJECT (FIND VEHBIT) = V-LAUNCH>
+
+<SYNTAX LEAVE = V-LEAVE>
+<SYNTAX LEAVE OBJECT = V-DROP>
+
+<SYNTAX LISTEN TO OBJECT = V-LISTEN>
+<SYNTAX LISTEN FOR OBJECT = V-LISTEN>
+
+<SYNTAX LOCK
+ OBJECT (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND TOOLBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ = V-LOCK>
+
+<SYNTAX LOOK = V-LOOK>
+<SYNTAX LOOK AROUND OBJECT (FIND RMUNGBIT) = V-LOOK>
+<SYNTAX LOOK AT OBJECT (HELD CARRIED ON-GROUND IN-ROOM MANY) = V-EXAMINE>
+<SYNTAX LOOK WITH OBJECT = V-LOOK-INSIDE>
+<SYNTAX LOOK UNDER OBJECT = V-LOOK-UNDER>
+<SYNTAX LOOK BEHIND OBJECT = V-LOOK-BEHIND>
+<SYNTAX LOOK IN OBJECT (HELD CARRIED ON-GROUND IN-ROOM MANY) = V-LOOK-INSIDE>
+<SYNTAX LOOK IN OBJECT (HELD CARRIED ON-GROUND IN-ROOM MANY) WITH OBJECT = V-LOOK-SAFELY>
+<SYNTAX LOOK AT OBJECT (HELD CARRIED ON-GROUND IN-ROOM MANY) WITH OBJECT = V-LOOK-SAFELY>
+<SYNTAX LOOK FOR OBJECT = V-FIND>
+<SYNONYM LOOK L STARE GAZE>
+
+<SYNTAX SEARCH OBJECT = V-SEARCH>
+<SYNTAX SEARCH IN OBJECT = V-SEARCH>
+<SYNTAX SEARCH FOR OBJECT = V-FIND>
+<SYNTAX SEARCH WITH OBJECT = V-SEARCH> ;"THROUGH"
+
+<SYNONYM SEARCH EMPTY RUMMAGE SORT SIFT>
+
+<SYNTAX LOWER OBJECT = V-LOWER>
+
+<SYNTAX MOVE OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+<SYNONYM MOVE>
+
+<SYNTAX PLAY OBJECT = V-PLAY>
+
+<SYNTAX POINT AT OBJECT (ON-GROUND IN-ROOM) = V-POINT>
+<SYNTAX POINT TO OBJECT (ON-GROUND IN-ROOM) = V-POINT>
+<SYNTAX POINT OBJECT (HELD CARRIED HAVE) AT OBJECT (ON-GROUND IN-ROOM)
+ = V-POINT>
+<SYNONYM POINT GESTURE AIM>
+
+<SYNTAX PULL OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE ; *>
+<SYNTAX PULL ON OBJECT (ON-GROUND IN-ROOM) = V-MOVE PRE-MOVE>
+<SYNONYM PULL TUG>
+
+<SYNTAX DESTROY
+ OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ WITH
+ OBJECT (HELD CARRIED TAKE)
+ = V-MUNG PRE-MUNG>
+<SYNTAX DESTROY
+ DOWN
+ OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ WITH
+ OBJECT (HELD CARRIED TAKE)
+ = V-MUNG PRE-MUNG>
+<SYNONYM DESTROY DAMAGE BREAK BLOCK SMASH>
+
+<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)
+ = V-OPEN>
+
+<SYNTAX PICK OBJECT = V-PICK>
+<SYNTAX PICK OBJECT WITH OBJECT = V-PICK>
+
+<SYNTAX PICK UP
+ OBJECT (FIND TAKEBIT)
+ (ON-GROUND MANY)
+ = V-TAKE PRE-TAKE>
+
+<SYNTAX PLUG OBJECT WITH OBJECT = V-PLUG>
+<SYNONYM PLUG GLUE PATCH REPAIR FIX>
+
+<SYNTAX POKE
+ OBJECT (FIND VILLAIN) (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND WEAPONBIT) (HELD CARRIED HAVE)
+ = V-MUNG PRE-MUNG>
+<SYNONYM POKE JAB BLIND>
+
+<SYNTAX PUSH OBJECT = V-PUSH>
+<SYNTAX PUSH ON OBJECT = V-PUSH>
+<SYNTAX PUSH OFF OBJECT = V-PUSH>
+<SYNTAX PUSH AGAINST OBJECT = V-PUSH>
+<SYNTAX PUSH OBJECT UNDER OBJECT = V-PUT-UNDER>
+<SYNONYM PUSH PRESS>
+
+<SYNTAX PUT OBJECT (HELD MANY HAVE TAKE) IN OBJECT = V-PUT PRE-PUT ;*>
+<SYNTAX PUT OBJECT (HELD MANY HAVE TAKE) ON OBJECT = V-PUT-ON PRE-PUT>
+<SYNTAX PUT DOWN OBJECT (HELD MANY HAVE) = V-DROP>
+<SYNTAX PUT OBJECT (HELD MANY HAVE TAKE) UNDER OBJECT = V-PUT-UNDER>
+<SYNTAX PUT ON OBJECT = V-WEAR>
+<SYNONYM PUT STUFF INSERT PLACE>
+
+<SYNTAX RAISE OBJECT = V-RAISE ;*>
+<SYNTAX RAISE UP OBJECT = V-RAISE>
+<SYNONYM RAISE LIFT>
+
+<SYNTAX RAPE OBJECT (FIND VICBIT) = V-RAPE>
+<SYNONYM RAPE MOLEST>
+
+<SYNTAX REACH IN OBJECT (FIND CONTBIT) = V-REACH>
+<SYNTAX REACH FOR OBJECT = V-REACH-FOR>
+
+<SYNTAX READ
+ OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ = V-READ PRE-READ ; *>
+<SYNTAX READ
+ OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ WITH
+ OBJECT
+ = V-READ PRE-READ>
+<SYNONYM READ SKIM>
+
+<SYNTAX RUB OBJECT = V-RUB>
+<SYNTAX RUB OBJECT WITH OBJECT = V-RUB>
+<SYNONYM RUB TOUCH FEEL PAT PET>
+
+<SYNTAX SCRIPT = V-SCRIPT>
+<SYNTAX UNSCRIPT = V-UNSCRIPT>
+
+<SYNTAX SHAKE OBJECT (HAVE TAKE) = V-SHAKE>
+
+<SYNTAX SLIDE OBJECT UNDER OBJECT = V-PUT-UNDER>
+
+<SYNTAX SKIP = V-SKIP>
+<SYNONYM SKIP HOP>
+
+<SYNTAX SMELL OBJECT = V-SMELL>
+<SYNONYM SMELL SNIFF>
+
+<SYNTAX STEP ON OBJECT = V-STEP-ON>
+
+<SYNTAX STRIKE
+ OBJECT (FIND VICBIT) (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND WEAPONBIT) (HELD CARRIED ON-GROUND IN-ROOM HAVE)
+ = V-ATTACK>
+<SYNTAX STRIKE
+ OBJECT (FIND VICBIT) (ON-GROUND IN-ROOM)
+ = V-ATTACK ;*>
+
+<SYNTAX SWIM = V-SWIM>
+<SYNTAX SWIM IN OBJECT = V-SWIM>
+<SYNONYM SWIM BATHE WADE>
+
+<SYNTAX TAKE
+ OBJECT (FIND TAKEBIT) (ON-GROUND MANY)
+ = V-TAKE PRE-TAKE ;*>
+<SYNTAX TAKE IN OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-BOARD PRE-BOARD>
+<SYNTAX TAKE OUT OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-DISEMBARK>
+<SYNTAX TAKE ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
+<SYNTAX TAKE
+ OBJECT (FIND TAKEBIT) (CARRIED IN-ROOM)
+ OUT
+ OBJECT
+ = V-TAKE PRE-TAKE>
+<SYNTAX TAKE
+ OBJECT (FIND TAKEBIT) (CARRIED IN-ROOM)
+ OFF
+ OBJECT
+ = V-TAKE PRE-TAKE>
+<SYNTAX TAKE
+ OBJECT (FIND TAKEBIT) (IN-ROOM CARRIED)
+ FROM
+ OBJECT
+ = V-TAKE PRE-TAKE>
+<SYNTAX TAKE OFF OBJECT (FIND WEARBIT) (HELD CARRIED) = V-TAKE-OFF>
+<SYNTAX TAKE UP OBJECT (FIND RMUNGBIT) = V-STAND> ;"GET UP"
+<SYNONYM TAKE GET HOLD CARRY>
+
+<SYNTAX REMOVE OBJECT = V-REMOVE>
+<SYNTAX REMOVE OBJECT FROM OBJECT = V-TAKE>
+
+<SYNTAX TELL OBJECT (FIND VICBIT) (IN-ROOM) = V-TELL>
+<SYNONYM TELL ASK>
+
+<SYNTAX SMILE AT OBJECT (FIND VILLAIN) = V-SMILE>
+<SYNTAX SMILE = V-SMILE>
+<SYNONYM SMILE GRIN>
+
+<SYNTAX SAY TO OBJECT (FIND VICBIT) (IN-ROOM) = V-TELL>
+<SYNTAX SAY = V-SAY>
+<SYNONYM SAY TALK>
+
+<SYNTAX THROW
+ OBJECT (HELD CARRIED HAVE)
+ AT
+ OBJECT (ON-GROUND IN-ROOM)
+ = V-THROW ;*>
+<SYNTAX THROW
+ OBJECT (HELD CARRIED HAVE)
+ WITH
+ OBJECT (ON-GROUND IN-ROOM)
+ = V-THROW>
+
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) IN OBJECT = V-PUT PRE-PUT>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) ON OBJECT = V-PUT PRE-PUT>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) OVER OBJECT = V-PUT PRE-PUT>
+<SYNTAX THROW OBJECT (HELD CARRIED HAVE) = V-THROW>
+<SYNONYM THROW HURL CHUCK TOSS>
+
+<SYNTAX HOOK OBJECT (HELD CARRIED) = V-TIE>
+<SYNTAX HOOK OBJECT (HELD CARRIED) TO OBJECT = V-TIE PRE-TIE>
+<SYNONYM HOOK TIE FASTEN SECURE ATTACH BUCKLE>
+
+<SYNTAX TURN
+ OBJECT (FIND TURNBIT) ( HELD CARRIED ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED HAVE)
+ = V-TURN PRE-TURN ;*>
+<SYNTAX TURN ON
+ OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ = V-LAMP-ON>
+<SYNTAX TURN OFF
+ OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ = V-LAMP-OFF>
+<SYNTAX TURN
+ OBJECT (ON-GROUND IN-ROOM)
+ TO
+ OBJECT
+ = V-SET>
+<SYNONYM TURN FLIP SHUT>
+
+<SYNTAX SET OBJECT (ON-GROUND IN-ROOM) TO OBJECT = V-SET>
+<SYNTAX SET OBJECT (ON-GROUND IN-ROOM) FOR OBJECT = V-SET>
+<SYNONYM SET PLOT>
+
+<SYNTAX UNLOCK
+ OBJECT (ON-GROUND IN-ROOM)
+ WITH
+ OBJECT (FIND TOOLBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
+ = V-UNLOCK>
+
+<SYNTAX UNTIE
+ OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ = V-UNTIE ;*>
+<SYNTAX UNTIE
+ OBJECT (ON-GROUND IN-ROOM HELD CARRIED)
+ FROM
+ OBJECT (HELD CARRIED)
+ = V-UNTIE>
+<SYNONYM UNTIE FREE UNFASTEN DETACH UNATTACH UNHOOK UNBUCKLE>
+
+<SYNTAX WAIT = V-WAIT>
+
+<SYNTAX WAKE OBJECT (FIND VICBIT) (ON-GROUND IN-ROOM) = V-ALARM ;*>
+<SYNTAX WAKE UP OBJECT (FIND VICBIT) (ON-GROUND IN-ROOM) = V-ALARM>
+<SYNONYM WAKE AWAKE SURPRISE STARTLE>
+
+<SYNTAX WALK OBJECT = V-WALK>
+<SYNTAX WALK IN OBJECT = V-THROUGH>
+<SYNTAX WALK WITH OBJECT = V-THROUGH>
+<SYNTAX WALK AROUND OBJECT = V-WALK-AROUND>
+<SYNTAX WALK UP OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-UP>
+<SYNTAX WALK DOWN OBJECT (FIND CLIMBBIT) (ON-GROUND IN-ROOM) = V-CLIMB-DOWN>
+<SYNTAX WALK TO OBJECT = V-WALK-TO>
+<SYNONYM WALK GO RUN PROCEED>
+
+<SYNTAX WAVE OBJECT (HELD CARRIED) = V-WAVE>
+<SYNTAX WAVE OBJECT (HELD CARRIED) AT OBJECT = V-WAVE>
+<SYNONYM WAVE BRANDISH>
+
+<SYNTAX WEAR OBJECT = V-WEAR>
+<SYNONYM WEAR DON>
+
+<SYNTAX YELL = V-YELL>
+<SYNONYM YELL SCREAM SHOUT>
+
+<SYNTAX ZORK = V-ZORK>
+
+<SYNTAX YES = V-YES>
+<SYNTAX YES OBJECT = V-YES>
+<SYNONYM YES Y CONFIRM AFFIRMATIVE>
+
+<SYNTAX NO = V-NO>
+<SYNONYM NO NEGATIVE CANCEL>
+
+;"Simple questions"
+
+;"<SYNTAX WHAT ...> WHAT is a synonym of EXAMINE"
+
+;"<SYNTAX WHERE ...> WHERE is a synonym of FIND"
+
+<SYNTAX IS OBJECT IN OBJECT = V-IS-IN>
+<SYNTAX IS OBJECT ON OBJECT = V-IS-IN>
+
+<SYNTAX R OBJECT = V-R>
+<SYNONYM R RANGE>
+<SYNTAX THETA OBJECT = V-THETA>
+<SYNONYM THETA ANGLE>
+<SYNTAX PHI OBJECT = V-PHI>
+<SYNONYM PHI ELEVATION>
+
+;<SYNTAX $CHEAT = V-CHEAT>
+
+<SYNTAX REPORT OBJECT = V-REPORT>
+
+<SYNTAX $FALL OBJECT OBJECT = V-FALL> ;"for objects falling inside sphere"
+
+;<SYNTAX $MOUSE = V-MOUSE>
diff --git a/verbs.zil b/verbs.zil
new file mode 100644
index 0000000..58a688a
--- /dev/null
+++ b/verbs.zil
@@ -0,0 +1,1380 @@
+"VERBS for
+ Interlogic SF Game
+ (c) Copyright 1981,1982 Infocom, Inc. All Rights Reserved
+"
+
+"SUBTITLE DESCRIBE THE UNIVERSE"
+
+"SUBTITLE SETTINGS FOR VARIOUS LEVELS OF DESCRIPTION"
+
+<GLOBAL VERBOSE <>>
+<GLOBAL SUPER-BRIEF <>>
+<GDECL (VERBOSE SUPER-BRIEF) <OR ATOM FALSE>>
+
+<ROUTINE V-VERBOSE ()
+ <SETG VERBOSE T>
+ <SETG SUPER-BRIEF <>>
+ <TELL "Maximum verbosity." CR>>
+
+<ROUTINE V-BRIEF ()
+ <SETG VERBOSE <>>
+ <SETG SUPER-BRIEF <>>
+ <TELL "Brief descriptions." CR>>
+
+<ROUTINE V-SUPER-BRIEF ()
+ <SETG SUPER-BRIEF T>
+ <TELL "Super-brief descriptions." CR>>
+
+\
+
+"SUBTITLE DESCRIBERS"
+
+<ROUTINE V-LOOK ()
+ <COND (<DESCRIBE-ROOM T>
+ <DESCRIBE-OBJECTS T>)>>
+
+<ROUTINE V-FIRST-LOOK ()
+ <COND (<DESCRIBE-ROOM>
+ <COND (<NOT ,SUPER-BRIEF> <DESCRIBE-OBJECTS>)>)>>
+
+<ROUTINE V-EXAMINE ()
+ <COND (<GETP ,PRSO ,P?TEXT>
+ <TELL <GETP ,PRSO ,P?TEXT> CR>)
+ (<OR <FSET? ,PRSO ,CONTBIT>
+ <FSET? ,PRSO ,DOORBIT>>
+ <V-LOOK-INSIDE>)
+ (ELSE
+ <TELL "I see nothing special about the "
+ D ,PRSO "." CR>)>>
+
+<GLOBAL LIT <>>
+
+<ROUTINE DESCRIBE-ROOM ("OPTIONAL" (LOOK? <>) "AUX" V? STR AV)
+ <SET V? <OR .LOOK? ,VERBOSE>>
+ <COND (<NOT ,LIT>
+ <TELL
+"It is pitch black. You are likely to be eaten by a grue." CR>
+ <RETURN <>>)>
+ <COND (<NOT <FSET? ,HERE ,TOUCHBIT>>
+ <FSET ,HERE ,TOUCHBIT>
+ <SET V? T>)>
+ <COND (<IN? ,HERE ,ROOMS> <TELL D ,HERE CR>)>
+ <COND (<OR .LOOK? <NOT ,SUPER-BRIEF>>
+ <SET AV <LOC ,WINNER>>
+ <COND (<FSET? .AV ,VEHBIT>
+ <TELL "(You are in the " D .AV ".)" CR>)>
+ <COND (<AND .V? <APPLY <GETP ,HERE ,P?ACTION> ,M-LOOK>>
+ <RTRUE>)
+ (<AND .V? <SET STR <GETP ,HERE ,P?LDESC>>>
+ <TELL .STR CR>)
+ (T <APPLY <GETP ,HERE ,P?ACTION> ,M-FLASH>)>
+ <COND (<AND <NOT <==? ,HERE .AV>> <FSET .AV ,VEHBIT>>
+ <APPLY <GETP .AV ,P?ACTION> ,M-LOOK>)>)>
+ <COND (<AND <NOT <FSET? ,HERE ,ONBIT>> ,ALWAYS-LIT>
+ <TELL
+"The room is lit by an emergency lighting system." CR>)>
+ T>
+
+<ROUTINE DESCRIBE-OBJECTS ("OPTIONAL" (V? <>))
+ <COND (,LIT
+ <COND (<FIRST? ,HERE>
+ <PRINT-CONT ,HERE <SET V? <OR .V? ,VERBOSE>> -1>)>)
+ (ELSE
+ <TELL "I can't see anything in the dark." CR>)>>
+
+"DESCRIBE-OBJECT -- takes object and flag. if flag is true will print a
+long description (fdesc or ldesc), otherwise will print short."
+
+<ROUTINE DESCRIBE-OBJECT (OBJ V? LEVEL "AUX" (STR <>) AV)
+ <COND (<AND <0? .LEVEL>
+ <APPLY <GETP .OBJ ,P?DESCFCN> ,M-OBJDESC>>
+ <RTRUE>)
+ (<AND <0? .LEVEL>
+ <OR <AND <NOT <FSET? .OBJ ,TOUCHBIT>>
+ <SET STR <GETP .OBJ ,P?FDESC>>>
+ <SET STR <GETP .OBJ ,P?LDESC>>>>
+ <TELL .STR>)
+ (<0? .LEVEL>
+ <TELL "There is a " D .OBJ " here.">)
+ (ELSE
+ <TELL <GET ,INDENTS .LEVEL>>
+ <TELL "A " D .OBJ>
+ <COND (<FSET? .OBJ ,WEARBIT> <TELL " (being worn)">)
+ (<==? .OBJ ,SAFETY-LINE>
+ <COND (<AND ,THIS-END ,THAT-END>
+ <TELL " (connecting the suit and a hook)">)
+ (,THIS-END <TELL " (tied to the suit)">)
+ (,THAT-END <TELL " (tied to a hook)">)>)>)>
+ <COND (<AND <0? .LEVEL>
+ <SET AV <LOC ,WINNER>>
+ <FSET? .AV ,VEHBIT>>
+ <TELL " (outside the " D .AV ")">)>
+ <CRLF>
+ <COND (<AND <SEE-INSIDE? .OBJ> <FIRST? .OBJ>>
+ <PRINT-CONT .OBJ .V? .LEVEL>)>>
+
+<ROUTINE PRINT-CONT (OBJ "OPTIONAL" (V? <>) (LEVEL 0)
+ "AUX" Y 1ST? AV STR (PV? <>) (INV? <>))
+ #DECL ((OBJ) OBJECT (LEVEL) FIX)
+ <COND (<NOT <SET Y <FIRST? .OBJ>>> <RTRUE>)>
+ <COND (<AND <SET AV <LOC ,WINNER>> <FSET? .AV ,VEHBIT>>
+ T)
+ (ELSE <SET AV <>>)>
+ <SET 1ST? T>
+ <COND (<EQUAL? ,WINNER .OBJ <LOC .OBJ>>
+ <SET INV? T>)
+ (ELSE
+ <REPEAT ()
+ <COND (<NOT .Y> <RETURN <NOT .1ST?>>)
+ (<==? .Y .AV> <SET PV? T>)
+ (<==? .Y ,WINNER>)
+ (<AND <NOT <FSET? .Y ,INVISIBLE>>
+ <NOT <FSET? .Y ,TOUCHBIT>>
+ <SET STR <GETP .Y ,P?FDESC>>>
+ <COND (<NOT <FSET? .Y ,NDESCBIT>>
+ <TELL .STR CR>)>
+ <COND (<AND <SEE-INSIDE? .Y>
+ <NOT <GETP <LOC .Y> ,P?DESCFCN>>
+ <FIRST? .Y>>
+ <PRINT-CONT .Y .V? 0>)>)>
+ <SET Y <NEXT? .Y>>>)>
+ <SET Y <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (<NOT .Y>
+ <COND (<AND .PV? .AV <FIRST? .AV>>
+ <PRINT-CONT .AV .V? .LEVEL>)>
+ <RETURN <NOT .1ST?>>)
+ (<EQUAL? .Y .AV ,ADVENTURER>)
+ (<AND <NOT <FSET? .Y ,INVISIBLE>>
+ <OR .INV?
+ <FSET? .Y ,TOUCHBIT>
+ <NOT <GETP .Y ,P?FDESC>>>>
+ <COND (<NOT <FSET? .Y ,NDESCBIT>>
+ <COND (.1ST?
+ <COND (<FIRSTER .OBJ .LEVEL>
+ <COND (<L? .LEVEL 0>
+ <SET LEVEL 0>)>)>
+ <SET LEVEL <+ 1 .LEVEL>>
+ <SET 1ST? <>>)>
+ <DESCRIBE-OBJECT .Y .V? .LEVEL>)
+ (<AND <FIRST? .Y> <SEE-INSIDE? .Y>>
+ <PRINT-CONT .Y .V? .LEVEL>)>)>
+ <SET Y <NEXT? .Y>>>>
+
+<ROUTINE FIRSTER (OBJ LEVEL)
+ <COND (<==? .OBJ ,WINNER>
+ <TELL "You are carrying:" CR>)
+ (<NOT <IN? .OBJ ,ROOMS>>
+ <COND (<G? .LEVEL 0>
+ <TELL <GET ,INDENTS .LEVEL>>)>
+ <COND (<==? .OBJ ,TRASH-BIN>
+ <TELL
+"Among the trash near the top of the bin you see:" CR>)
+ (<FSET? .OBJ ,SURFACEBIT>
+ <TELL
+"Sitting on the " D .OBJ " is:" CR>)
+ (ELSE
+ <TELL
+"The " D .OBJ " contains:" CR>)>)
+ (<FSET? .OBJ ,RMUNGBIT>
+ <TELL
+"Floating nearby is: " CR>)>>
+
+\
+
+"SUBTITLE SCORING"
+
+<GLOBAL MOVES 0>
+<GLOBAL SCORE 0>
+<GLOBAL WON-FLAG <>>
+
+<ROUTINE SCORE-UPD (NUM)
+ #DECL ((NUM) FIX)
+ <SETG SCORE <+ ,SCORE .NUM>>
+ T>
+
+<ROUTINE SCORE-OBJ (OBJ)
+ #DECL ((OBJ) OBJECT (TEMP) FIX)
+ <COND (<G? <GETP .OBJ ,P?VALUE> 0>
+ <FSET .OBJ ,TOUCHBIT>
+ <SCORE-UPD <GETP .OBJ ,P?VALUE>>
+ <PUTP .OBJ ,P?VALUE 0>)>>
+
+<GLOBAL SCORE-MAX 400>
+
+<ROUTINE V-SCORE ("OPTIONAL" (ASK? T))
+ #DECL ((ASK?) <OR ATOM FALSE>)
+ <TELL "Your score ">
+ <COND (.ASK? <TELL "would be ">) (ELSE <TELL "is ">)>
+ <TELL N ,SCORE>
+ <TELL " (total of ">
+ <TELL N ,SCORE-MAX>
+ <TELL " points), in ">
+ <TELL N ,MOVES>
+ <COND (<1? ,MOVES> <TELL " move.">) (ELSE <TELL " moves.">)>
+ <CRLF>
+ <TELL "This score gives you the rank of ">
+ <COND (,WON-FLAG <TELL "Galactic Overlord">)
+ (<G? ,SCORE 360> <TELL "Cluster Admiral">)
+ (<G? ,SCORE 320> <TELL "System Captain">)
+ (<G? ,SCORE 240> <TELL "Planetary Commodore">)
+ (<G? ,SCORE 160> <TELL "Lieutenant">)
+ (<G? ,SCORE 80> <TELL "Ensign">)
+ (<G? ,SCORE 40> <TELL "Space Cadet">)
+ (T <TELL "Beginner">)>
+ <TELL "." CR>
+ ,SCORE>
+
+<ROUTINE FINISH ()
+ <V-SCORE>
+ <QUIT>>
+
+<ROUTINE V-QUIT ("OPTIONAL" (ASK? T) "AUX" SCOR)
+ #DECL ((ASK?) <OR ATOM <PRIMTYPE LIST>> (SCOR) FIX)
+ <V-SCORE>
+ <COND (<OR <AND .ASK?
+ <TELL
+"Do you wish to leave the game? (Y is affirmative): ">
+ <YES?>>
+ <NOT .ASK?>>
+ <QUIT>)
+ (ELSE <TELL "Ok." CR>)>>
+
+<ROUTINE YES? ()
+ <PRINTI ">">
+ <READ ,P-INBUF ,P-LEXV>
+ <COND (<EQUAL? <GET ,P-LEXV 1> ,W?YES ,W?Y>
+ <RTRUE>)
+ (T
+ <RFALSE>)>>
+
+<ROUTINE V-VERSION ("AUX" (CNT 17))
+ <TELL
+"STARCROSS: INTERLOGIC Science Fiction|
+Copyright (c) 1982 by Infocom, Inc. All rights reserved.|
+STARCROSS and INTERLOGIC are trademarks of Infocom, Inc.|
+Release ">
+ <PRINTN <BAND <GET 0 1> *3777*>>
+ <TELL " / Serial number ">
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> 23>
+ <RETURN>)
+ (T
+ <PRINTC <GETB 0 .CNT>>)>>
+ <CRLF>>
+
+<ROUTINE V-AGAIN ("AUX" OBJ)
+ <COND (<==? ,L-PRSA ,V?WALK>
+ <DO-WALK ,L-PRSO>)
+ (T
+ <SET OBJ
+ <COND (<AND ,L-PRSO <NOT <LOC ,L-PRSO>>>
+ ,L-PRSO)
+ (<AND ,L-PRSI <NOT <LOC ,L-PRSI>>>
+ ,L-PRSI)>>
+ <COND (.OBJ
+ <TELL "I can't see the " D .OBJ " anymore." CR>
+ <RFATAL>)
+ (T
+ <PERFORM ,L-PRSA ,L-PRSO ,L-PRSI>)>)>>
+
+\
+
+"SUBTITLE DEATH AND TRANSFIGURATION"
+
+<GLOBAL DEATHS 0>
+<GLOBAL LUCKY 1>
+
+<ROUTINE JIGS-UP (DESC "OPTIONAL" (PLAYER? <>))
+ #DECL ((DESC) STRING (PLAYER?) <OR ATOM FALSE>)
+ <TELL .DESC CR>
+ <COND (<NOT <==? ,ADVENTURER ,WINNER>>
+ <TELL "
+| **** The " D ,WINNER " has died ****
+|
+|">
+ <REMOVE ,WINNER>
+ <SETG WINNER ,ADVENTURER>
+ <SETG HERE <LOC ,WINNER>>
+ <RFATAL>)>
+ <PROG ()
+ <SCORE-UPD -10>
+ <TELL "
+| **** You have died ****
+|
+|">
+ <SETG DEATHS <+ ,DEATHS 1>>
+ <COND (<==? ,DEATHS 4>
+ <COND (,DOCKED?
+ <TELL
+"The expressionless voice seems despairing as it says \"Four failures.
+They would not be pleased. Such promising candidates, too. If only...\"
+The voice trails off into background hiss. Nothing more happens, ever." CR>)
+ (ELSE
+ <TELL
+"This time, you aren't given another chance." CR>)>
+ <FINISH>)
+ (<G? ,POISON-COUNT 3>
+ <TELL
+"An expressionless voice seems to be trying to express outrage, but not
+successfully. \"The candidate has not made the necessary repairs in time.
+This is a disaster. All are now dead, and repairs are
+not possible. They would not approve. This area will be marked, that is
+certain.\" Everything fades to black, and silence reigns." CR>
+ <FINISH>)>
+ <RANDOMIZE-OBJECTS>
+ <COND (<FSET? ,RED-THREE ,TOUCHBIT>
+ <MOVE ,WINNER ,RED-THREE>)
+ (ELSE
+ <SETG IN-ARTIFACT? <>>
+ <FCLEAR ,AIRLOCK-OUTER ,OPENBIT>
+ <FCLEAR ,AIRLOCK-INNER ,OPENBIT>
+ <MOVE ,WINNER ,SPACESHIP-BRIDGE>
+ <MOVE ,SPACESUIT ,SPACESHIP-STORES>)>
+ <COND (,DOCKED?
+ <TELL
+"You hear, if that is the right word, an expressionless voice. It seems
+to be inside your head. \"This is not promising. The candidate does not
+deserve another chance, but the instructions are explicit. There are not
+even any more docking ports. They would be disappointed if they knew.\"
+You wake to a brief glimpse of a pallet (on which you are lying) surrounded
+by metallic threads. The whole apparatus begins to vibrate and you feel very
+dizzy. As you lose consciousness, you realize that you can't see the rest of
+your body. There is a feeling of dislocation, and then..." CR>)
+ (ELSE
+ <TELL
+"You wake to find yourself alive, on board the \"Starcross.\" It appears
+you have been given another chance." CR>)>
+ <SETG LIT T>
+ <FCLEAR ,SPACESUIT ,WEARBIT>
+ <SETG SUIT-ON? <>>
+ <SETG THIS-END <>>
+ <SETG THAT-END <>>
+ <SETG P-CONT <>>
+ <SETG COUNTDOWN <>>
+ <SETG R-VALUE 0>
+ <SETG PHI-VALUE 0>
+ <SETG THETA-VALUE 0>
+ <SETG LOST <>>
+ <SETG GIVE-UP <>>
+ <KILL-INTERRUPTS>
+ <RFATAL>>>
+
+<ROUTINE RANDOMIZE-OBJECTS ("AUX" (R <>) F N L)
+ <SET N <FIRST? ,WINNER>>
+ <REPEAT ()
+ <SET F .N>
+ <COND (<NOT .F> <RETURN>)>
+ <SET N <NEXT? .F>>
+ <COND (<FSET? ,RED-THREE ,TOUCHBIT>
+ <COND (<FSET? .F ,KEYBIT> <MOVE .F ,HERE>)
+ (ELSE <MOVE .F ,RED-LOCK>)>)
+ (ELSE
+ <COND (<FSET? .F ,KEYBIT> <MOVE .F ,HERE>)
+ (ELSE
+ <MOVE .F ,SPACESHIP-STORES>)>)>>>
+
+<ROUTINE KILL-INTERRUPTS ()
+ <DISABLE <INT I-BURN>>
+ <RTRUE>>
+
+<ROUTINE V-RESTORE ()
+ <COND (<RESTORE>
+ <TELL "Ok." CR>
+ <V-FIRST-LOOK>)
+ (T
+ <TELL "Failed." CR>)>>
+
+<ROUTINE V-SAVE ()
+ <COND (<SAVE>
+ <TELL "Ok." CR>)
+ (T
+ <TELL "Failed." CR>)>>
+
+<ROUTINE V-RESTART ()
+ <V-SCORE T>
+ <TELL "Do you wish to restart? (Y is affirmative): ">
+ <COND (<YES?>
+ <TELL "Restarting." CR>
+ <RESTART>
+ <TELL "Failed." CR>)>>
+
+<CONSTANT REXIT 0>
+<CONSTANT UEXIT 1>
+<CONSTANT NEXIT 2>
+<CONSTANT FEXIT 3>
+<CONSTANT CEXIT 4>
+<CONSTANT DEXIT 5>
+
+<CONSTANT NEXITSTR 0>
+<CONSTANT FEXITFCN 0>
+<CONSTANT CEXITFLAG 1>
+<CONSTANT CEXITSTR 1>
+<CONSTANT DEXITOBJ 1>
+<CONSTANT DEXITSTR 1>
+
+<ROUTINE V-WALK-AROUND ()
+ <TELL "Use directions for movement here." CR>>
+
+<ROUTINE V-LAUNCH ()
+ <TELL "You can't launch that!" CR>>
+
+<ROUTINE GO-NEXT (TBL "AUX" VAL)
+ #DECL ((TBL) TABLE (VAL) ANY)
+ <COND (<SET VAL <LKP ,HERE .TBL>>
+ <GOTO .VAL>)>>
+
+<ROUTINE LKP (ITM TBL "AUX" (CNT 0) (LEN <GET .TBL 0>))
+ #DECL ((ITM) ANY (TBL) TABLE (CNT LEN) FIX)
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> .LEN>
+ <RFALSE>)
+ (<==? <GET .TBL .CNT> .ITM>
+ <COND (<==? .CNT .LEN> <RFALSE>)
+ (T
+ <RETURN <GET .TBL <+ .CNT 1>>>)>)>>>
+
+<ROUTINE V-WALK ("AUX" PT PTS STR OBJ RM)
+ #DECL ((PT) <OR FALSE TABLE> (PTS) FIX (STR) <OR STRING FALSE>
+ (OBJ) OBJECT (RM) <OR FALSE OBJECT>)
+ <COND (<NOT ,P-WALK-DIR>
+ <PERFORM ,V?WALK-TO ,PRSO>
+ <RTRUE>)
+ (<SET PT <GETPT ,HERE ,PRSO>>
+ <COND (<==? <SET PTS <PTSIZE .PT>> ,UEXIT>
+ <GOTO <GETB .PT ,REXIT>>)
+ (<==? .PTS ,NEXIT>
+ <TELL <GET .PT ,NEXITSTR> CR>
+ <RFATAL>)
+ (<==? .PTS ,FEXIT>
+ <COND (<SET RM <APPLY <GET .PT ,FEXITFCN>>>
+ <GOTO .RM>)
+ (T
+ <RFATAL>)>)
+ (<==? .PTS ,CEXIT>
+ <COND (<VALUE <GETB .PT ,CEXITFLAG>>
+ <GOTO <GETB .PT ,REXIT>>)
+ (<SET STR <GET .PT ,CEXITSTR>>
+ <TELL .STR CR>
+ <RFATAL>)
+ (T
+ <TELL "You can't go that way." CR>
+ <RFATAL>)>)
+ (<==? .PTS ,DEXIT>
+ <COND (<FSET? <SET OBJ <GETB .PT ,DEXITOBJ>> ,OPENBIT>
+ <GOTO <GETB .PT ,REXIT>>)
+ (<SET STR <GET .PT ,DEXITSTR>>
+ <TELL .STR CR>
+ <RFATAL>)
+ (T
+ <TELL "The " D .OBJ " is closed." CR>
+ <THIS-IS-IT .OBJ>
+ <RFATAL>)>)>)
+ (<AND <NOT ,LIT> <PROB 75>>
+ <JIGS-UP
+"Oh, no! You have walked into the slavering fangs of a lurking grue!">)
+ (T
+ <TELL "You can't go that way." CR>
+ <RFATAL>)>>
+
+<ROUTINE THIS-IS-IT (OBJ)
+ <SETG P-IT-OBJECT .OBJ>
+ <SETG P-IT-LOC ,HERE>>
+
+<ROUTINE V-INVENTORY ()
+ <COND (<FIRST? ,WINNER> <PRINT-CONT ,WINNER>)
+ (T <TELL "You are empty handed." CR>)>>
+
+<GLOBAL INDENTS
+ <TABLE ""
+ " "
+ " "
+ " "
+ " "
+ " ">>
+
+\
+
+<ROUTINE PRE-TAKE ()
+ <COND (<IN? ,PRSO ,WINNER> <TELL "You already have it." CR>)
+ (<AND <FSET? <LOC ,PRSO> ,CONTBIT>
+ <NOT <FSET? <LOC ,PRSO> ,OPENBIT>>>
+ <TELL "I can't reach that." CR>
+ <RTRUE>)
+ (<AND ,PRSI <NOT <==? ,PRSO ,SPEAR>>>
+ <COND (<NOT <==? ,PRSI <LOC ,PRSO>>>
+ <TELL "It's not in that!" CR>)
+ (T
+ <SETG PRSI <>>
+ <RFALSE>)>)
+ (<==? ,PRSO <LOC ,WINNER>> <TELL "You are in it, loser!" CR>)>>
+
+<ROUTINE V-TAKE ()
+ <COND (<==? <ITAKE> T>
+ <TELL "Taken." CR>)>>
+
+<GLOBAL FUMBLE-NUMBER 7>
+<GLOBAL FUMBLE-PROB 8>
+
+<ROUTINE TRYTAKE ()
+ <COND (<IN? ,PRSO ,WINNER> <RTRUE>)
+ (<AND <FSET? ,PRSO ,TRYTAKEBIT>
+ <GETP ,PRSO ,P?ACTION>>
+ <PERFORM ,V?TAKE ,PRSO>
+ <IN? ,PRSO ,WINNER>)
+ (ELSE <ITAKE>)>>
+
+<ROUTINE ITAKE ("OPTIONAL" (VB T) "AUX" CNT OBJ WLOC)
+ #DECL ((VB) <OR ATOM FALSE> (CNT) FIX (OBJ) OBJECT)
+ <COND (<NOT <FSET? ,PRSO ,TAKEBIT>>
+ <COND (.VB
+ <TELL <PICK-ONE ,YUKS> CR>)>
+ <RFALSE>)
+ (<AND <NOT <IN? <LOC ,PRSO> ,WINNER>>
+ <G? <+ <WEIGHT ,PRSO> <WEIGHT ,WINNER>> ,LOAD-ALLOWED>>
+ <COND (.VB
+ <TELL "Your load is too heavy." CR>)>
+ <RFATAL>)
+ (<AND <G? <SET CNT <CCOUNT ,WINNER>> ,FUMBLE-NUMBER>
+ <PROB <* .CNT ,FUMBLE-PROB>>>
+ <SET OBJ <FIRST? ,WINNER>>
+ <SET OBJ <NEXT? .OBJ>>
+ ;"This must go! Chomping compiler strikes again"
+ <TELL
+"Oh, no. The " D .OBJ " slips from your arms while taking the "
+D ,PRSO " and both tumble to the ground." CR>
+ <SET WLOC <LOC ,WINNER>>
+ <COND (<==? ,PRSO ,UNDER-GLOBE>
+ <SETG UNDER-GLOBE <>>
+ <FCLEAR ,PRSO ,NDESCBIT>)>
+ <COND (<OR <FSET? .WLOC ,RMUNGBIT>
+ <EQUAL? .WLOC
+ ,UP-A-TREE
+ ,TREETOP-ROOM
+ ,DRIVE-BUBBLE-ENTRANCE>
+ <EQUAL? .WLOC
+ ,CONTROL-BUBBLE-ENTRANCE>>
+ <PERFORM ,V?DROP .OBJ>
+ <MOVE ,PRSO ,WINNER>
+ <PERFORM ,V?DROP ,PRSO>)
+ (ELSE
+ <MOVE .OBJ .WLOC>
+ <MOVE ,PRSO .WLOC>)>
+ <RFATAL>)
+ (T
+ <MOVE ,PRSO ,WINNER>
+ <FCLEAR ,PRSO ,NDESCBIT>
+ <SCORE-OBJ ,PRSO>
+ <FSET ,PRSO ,TOUCHBIT>
+ <RTRUE>)>>
+
+<GLOBAL YUKS
+ <LTABLE
+ "A valiant attempt."
+ "You can't be serious."
+ "Not bloody likely."
+ "An interesting idea..."
+ "What a concept!">>
+
+<ROUTINE PRE-PUT ()
+ <COND (<OR <IN? ,PRSO ,GLOBAL-OBJECTS>
+ <NOT <FSET? ,PRSO ,TAKEBIT>>>
+ <TELL "Nice try." CR>)>>
+
+<ROUTINE V-PUT ()
+ <COND (<OR <FSET? ,PRSI ,OPENBIT>
+ <OPENABLE? ,PRSI>
+ <FSET? ,PRSI ,VEHBIT>>)
+ (T
+ <TELL "I can't do that." CR>
+ <RTRUE>)>
+ <COND (<NOT <FSET? ,PRSI ,OPENBIT>>
+ <TELL "The " D ,PRSI " isn't open." CR>)
+ (<==? ,PRSI ,PRSO>
+ <TELL "How can you do that?" CR>)
+ (<IN? ,PRSO ,PRSI>
+ <TELL "The " D ,PRSO " is already in the " D ,PRSI "." CR>)
+ (<G? <- <+ <WEIGHT ,PRSI> <WEIGHT ,PRSO>>
+ <GETP ,PRSI ,P?SIZE>>
+ <GETP ,PRSI ,P?CAPACITY>>
+ <TELL "There's no room." CR>)
+ (<AND <NOT <HELD? ,PRSO>>
+ <NOT <TRYTAKE>>>
+ <RTRUE>)
+ (T
+ <SCORE-OBJ ,PRSO>
+ <MOVE ,PRSO ,PRSI>
+ <FSET ,PRSO ,TOUCHBIT>
+ <TELL "Done." CR>)>>
+
+<ROUTINE PRE-DROP ()
+ <COND (<==? ,PRSO <LOC ,WINNER>>
+ <PERFORM ,V?DISEMBARK ,PRSO>
+ <RTRUE>)>>
+
+"SZAP => ZAP who WITH what"
+
+<ROUTINE PRE-SZAP ()
+ <PERFORM ,V?ZAP ,PRSI ,PRSO>
+ <RTRUE>>
+
+"ZAP => ZAP <weapon> <who>"
+
+<ROUTINE PRE-ZAP ()
+ <COND (,PRSI <RFALSE>)
+ (<FSET? ,PRSO ,WEAPONBIT> <RFALSE>)
+ (<IN? ,ZAP-GUN ,WINNER>
+ <PERFORM ,V?ZAP ,ZAP-GUN ,PRSO>
+ <RTRUE>)
+ (ELSE <TELL
+"You have nothing to shoot the " D ,PRSO " with." CR>)>>
+
+<ROUTINE DONT-HAVE (OBJ)
+ <TELL "You don't have the " D .OBJ "." CR>>
+
+<ROUTINE V-ZAP ()
+ <COND (<NOT <IN? ,PRSO ,WINNER>>
+ <DONT-HAVE ,PRSO>)
+ (<NOT <FSET? ,PRSO ,WEAPONBIT>>
+ <TELL "You can't use a " D ,PRSO " as a ray gun!" CR>)
+ (<NOT ,PRSI> <TELL "At what?" CR>)
+ (ELSE <TELL "Nothing happens." CR>)>>
+
+<ROUTINE V-SZAP ()
+ <TELL "ZAPPP!!" CR>>
+
+<ROUTINE PRE-GIVE ()
+ <COND (<NOT <HELD? ,PRSO>>
+ <TELL
+"That's easy for you to say since you don't even have it." CR>)>>
+
+<ROUTINE PRE-SGIVE ()
+ <PERFORM ,V?GIVE ,PRSI ,PRSO>
+ <RTRUE>>
+
+<ROUTINE V-GIVE ()
+ <COND (<NOT <FSET? ,PRSI ,VICBIT>>
+ <TELL "You can't give a " D ,PRSO " to a " D ,PRSI "!" CR>)
+ (<IDROP> <TELL "Given." CR>)>>
+
+<ROUTINE V-SGIVE ()
+ <TELL "FOOOO!!" CR>>
+
+<ROUTINE V-DROP () <COND (<IDROP> <TELL "Dropped." CR>)>>
+
+<ROUTINE V-THROW () <COND (<IDROP> <TELL "Thrown." CR>)>>
+
+<ROUTINE IDROP ()
+ <COND (<NOT <HELD? ,PRSO>>
+ <TELL "You're not carrying the " D ,PRSO "." CR>
+ <RFALSE>)
+ (<AND <NOT <IN? ,PRSO ,WINNER>>
+ <NOT <FSET? <LOC ,PRSO> ,OPENBIT>>>
+ <TELL "The " D ,PRSO " is closed." CR>
+ <RFALSE>)
+ (T <MOVE ,PRSO <LOC ,WINNER>> <RTRUE>)>>
+
+\
+
+<ROUTINE ALREADY (ON-OFF "OPTIONAL" (OBJ <>))
+ <COND (.OBJ
+ <TELL "The " D .OBJ " is ">)
+ (ELSE
+ <TELL "It's ">)>
+ <TELL "already " .ON-OFF "." CR>>
+
+<ROUTINE V-OPEN ("AUX" F STR)
+ <COND (<NOT <FSET? ,PRSO ,CONTBIT>>
+ <TELL
+"You must be very clever to do that to the " D ,PRSO "." CR>)
+ (<OR <FSET? ,PRSO ,DOORBIT>
+ <NOT <==? <GETP ,PRSO ,P?CAPACITY> 0>>>
+ <COND (<FSET? ,PRSO ,OPENBIT> <ALREADY "open">)
+ (T
+ <FSET ,PRSO ,OPENBIT>
+ <COND (<FSET? ,PRSO ,DOORBIT>
+ <TELL "The " D ,PRSO " is now open." CR>)
+ (<OR <NOT <FIRST? ,PRSO>> <FSET? ,PRSO ,TRANSBIT>>
+ <TELL "Opened." CR>)
+ (<AND <SET F <FIRST? ,PRSO>>
+ <NOT <NEXT? .F>>
+ <SET STR <GETP .F ,P?FDESC>>>
+ <TELL "The " D ,PRSO " opens." CR>
+ <TELL .STR CR>)
+ (T
+ <TELL "Opening the " D ,PRSO " reveals ">
+ <PRINT-CONTENTS ,PRSO>
+ <TELL "." CR>)>)>)
+ (T <TELL "The " D ,PRSO " cannot be opened." CR>)>>
+
+<ROUTINE PRINT-CONTENTS (OBJ "AUX" F N (1ST? T))
+ #DECL ((OBJ) OBJECT (F N) <OR FALSE OBJECT>)
+ <COND (<SET F <FIRST? .OBJ>>
+ <REPEAT ()
+ <SET N <NEXT? .F>>
+ <COND (.1ST? <SET 1ST? <>>)
+ (ELSE
+ <TELL ", ">
+ <COND (<NOT .N> <TELL "and ">)>)>
+ <TELL "a " D .F>
+ <SET F .N>
+ <COND (<NOT .F> <RETURN>)>>)>>
+
+<ROUTINE V-CLOSE ()
+ <COND (<NOT <FSET? ,PRSO ,CONTBIT>>
+ <TELL "You must tell me how to do that to a " D ,PRSO "." CR>)
+ (<AND <NOT <FSET? ,PRSO ,SURFACEBIT>>
+ <OR <NOT <==? <GETP ,PRSO ,P?CAPACITY> 0>>
+ <FSET? ,PRSO ,DOORBIT>>>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <FCLEAR ,PRSO ,OPENBIT>
+ <TELL "Closed." CR>)
+ (T <ALREADY "closed">)>)
+ (ELSE
+ <TELL "You cannot close that." CR>)>>
+
+<ROUTINE CCOUNT (OBJ "AUX" (CNT 0) X)
+ <COND (<SET X <FIRST? .OBJ>>
+ <REPEAT ()
+ <SET CNT <+ .CNT 1>>
+ <COND (<NOT <SET X <NEXT? .X>>>
+ <RETURN>)>>)>
+ .CNT>
+
+"WEIGHT: Get sum of SIZEs of supplied object, recursing to the nth level."
+
+<ROUTINE WEIGHT
+ (OBJ "AUX" CONT (WT 0))
+ #DECL ((OBJ) OBJECT (CONT) <OR FALSE OBJECT> (WT) FIX)
+ <COND (<SET CONT <FIRST? .OBJ>>
+ <REPEAT ()
+ <SET WT <+ .WT <WEIGHT .CONT>>>
+ <COND (<NOT <SET CONT <NEXT? .CONT>>> <RETURN>)>>)>
+ <+ .WT <GETP .OBJ ,P?SIZE>>>
+
+<ROUTINE V-SCRIPT ()
+ <PUT 0 8 <BOR <GET 0 8> 1>>
+ <TELL "Ok." CR>>
+
+<ROUTINE V-UNSCRIPT ()
+ <PUT 0 8 <BAND <GET 0 8> -2>>
+ <TELL "Ok." CR>>
+
+<ROUTINE PRE-MOVE
+ ()
+ <COND (<HELD? ,PRSO> <TELL "I don't juggle objects!" CR>)>>
+
+<ROUTINE V-MOVE ()
+ <COND (<FSET? ,PRSO ,TAKEBIT>
+ <TELL "Moving the " D ,PRSO " reveals nothing." CR>)
+ (T <TELL "You can't move the " D ,PRSO "." CR>)>>
+
+<ROUTINE V-LAMP-ON
+ ()
+ <COND (<FSET? ,PRSO ,LIGHTBIT>
+ <COND (<FSET? ,PRSO ,ONBIT> <ALREADY "on">)
+ (ELSE
+ <FSET ,PRSO ,ONBIT>
+ <TELL "The " D ,PRSO " is now on." CR>
+ <COND (<NOT ,LIT>
+ <SETG LIT <LIT? ,HERE>>
+ <V-LOOK>)>)>)
+ (T
+ <TELL "You can't turn that on." CR>)>
+ <RTRUE>>
+
+<ROUTINE V-LAMP-OFF
+ ()
+ <COND (<FSET? ,PRSO ,LIGHTBIT>
+ <COND (<NOT <FSET? ,PRSO ,ONBIT>>
+ <ALREADY "off">)
+ (ELSE
+ <FCLEAR ,PRSO ,ONBIT>
+ <COND (,LIT
+ <SETG LIT <LIT? ,HERE>>)>
+ <TELL "The " D ,PRSO " is now off." CR>
+ <COND (<NOT <SETG LIT <LIT? ,HERE>>>
+ <TELL "It is now pitch black." CR>)>)>)
+ (ELSE <TELL "You can't turn that off." CR>)>
+ <RTRUE>>
+
+<ROUTINE V-WAIT ("OPTIONAL" (NUM 3))
+ #DECL ((NUM) FIX)
+ <TELL "Time passes..." CR>
+ <REPEAT ()
+ <COND (<L? <SET NUM <- .NUM 1>> 0> <RETURN>)
+ (<CLOCKER> <RETURN>)>
+ <SETG MOVES <+ ,MOVES 1>>>
+ <SETG CLOCK-WAIT T>>
+
+<ROUTINE PRE-BOARD ("AUX" AV)
+ <SET AV <LOC ,WINNER>>
+ <COND (<FSET? ,PRSO ,VEHBIT>
+ <COND ;(<NOT <HERE?? ,PRSO>>
+ <TELL "The "
+ D
+ ,PRSO
+ " must be on the ground to be boarded." CR>)
+ (<FSET? .AV ,VEHBIT>
+ <TELL "You are already in it!" CR>)
+ (T <RFALSE>)>)
+ (<EQUAL? ,PRSO ,SPACESUIT ,JUNK-SPACESUIT>
+ <RFALSE>)
+ (T
+ <TELL "I suppose you have a theory on boarding a "
+ D
+ ,PRSO
+ "." CR>)>
+ <RFATAL>>
+
+<ROUTINE V-BOARD ("AUX" AV)
+ #DECL ((AV) OBJECT)
+ <TELL "You are now in the " D ,PRSO "." CR>
+ <MOVE ,WINNER ,PRSO>
+ <APPLY <GETP ,PRSO ,P?ACTION> ,M-ENTER>
+ <RTRUE>>
+
+<ROUTINE V-DISEMBARK
+ ()
+ <COND (<NOT <==? <LOC ,WINNER> ,PRSO>>
+ <TELL "You're not in that!" CR>
+ <RFATAL>)
+ (T
+ <TELL "You are on your own feet again." CR>
+ <MOVE ,WINNER ,HERE>)>>
+
+<ROUTINE GOTO (RM "OPTIONAL" (V? T) "AUX" (WLOC <LOC ,WINNER>) OLIT)
+ #DECL ((RM WLOC) OBJECT)
+ <SET OLIT ,LIT>
+ <MOVE ,WINNER .RM>
+ <SETG MFOLLOW <>> ;"we moved, so can't follow him"
+ <SETG CHFOLLOW <>> ;"ditto"
+ <SETG HERE .RM>
+ <SETG LIT <LIT? ,HERE>>
+ <COND (<AND <NOT .OLIT>
+ <NOT ,LIT>
+ <PROB 75>>
+ <JIGS-UP
+"Oh, no! A lurking grue slithered into the room and devoured you!">
+ <RTRUE>)>
+ <COND (<==? <APPLY <GETP ,HERE ,P?ACTION> ,M-ENTER> 2>
+ <RTRUE>)>
+ <COND (<NOT <==? ,ADVENTURER ,WINNER>>
+ <TELL "The " D ,WINNER " leaves the room." CR>)
+ (.V? <V-FIRST-LOOK>)>
+ <SCORE-OBJ .RM>
+ <RTRUE>>
+
+<ROUTINE V-BACK
+ ()
+ <TELL
+"Sorry, my memory isn't that good. You'll have to give a direction." CR>>
+
+<ROUTINE V-DRINK ()
+ <V-EAT>>
+
+<ROUTINE V-EAT ()
+ <TELL "I don't think that the "
+ D
+ ,PRSO
+ " would agree with you." CR>>
+
+<ROUTINE V-CURSES ()
+ <COND (,PRSO
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <TELL "Insults of this nature won't help you." CR>)
+ (T
+ <TELL "What a loony!" CR>)>)
+ (T
+ <TELL
+"Such language in a high-class establishment like this!" CR>)>>
+
+<ROUTINE V-LISTEN ()
+ <TELL "The " D ,PRSO " makes no sound." CR>>
+
+<ROUTINE V-FOLLOW ()
+ <TELL "You're nuts!" CR>>
+
+<ROUTINE V-LEAP ("AUX" T S)
+ #DECL ((T) <OR FALSE TABLE>)
+ <COND (,PRSO
+ <COND (<IN? ,PRSO ,HERE>
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <TELL "The "
+ D
+ ,PRSO
+ " is too big to jump over." CR>)
+ (T <V-SKIP>)>)
+ (T <TELL "That would be a good trick." CR>)>)
+ (<SET T <GETPT ,HERE ,P?DOWN>>
+ <SET S <PTSIZE .T>>
+ <COND (<OR <==? .S 2> ;NEXIT
+ <AND <==? .S 4> ;CEXIT
+ <NOT <VALUE <GETB .T 1>>>>>
+ <TELL
+"This was not a very safe place to try jumping." CR>
+ <JIGS-UP "You should have looked before you leaped.">)
+ (T <V-SKIP>)>)
+ (ELSE <V-SKIP>)>>
+
+<ROUTINE V-SKIP () <TELL <PICK-ONE ,WHEEEEE> CR>>
+
+<ROUTINE V-LEAVE () <DO-WALK ,P?OUT>>
+
+<GLOBAL HS 0>
+
+<ROUTINE V-HELLO ()
+ <COND (,PRSO
+ <TELL
+"I think that only schizophrenics say \"Hello\" to a " D ,PRSO "." CR>)
+ (ELSE <TELL <PICK-ONE ,HELLOS> CR>)>>
+
+<GLOBAL HELLOS
+ <LTABLE "Hello."
+ "Nice weather we've been having lately."
+ "Goodbye.">>
+
+<GLOBAL WHEEEEE
+ <LTABLE "Have you tried skipping from star to star, too?"
+ "Are you enjoying yourself?"
+ "Wheeeeeeeeee!!!!!">>
+
+<ROUTINE PRE-READ ()
+ ;<COND (<NOT ,LIT> <TELL "It is impossible to read in the dark." CR>)
+ (<AND ,PRSI <NOT <FSET? ,PRSI ,TRANSBIT>>>
+ <TELL "How does one look through a " D ,PRSI "?" CR>)>
+ <RFALSE>>
+
+<ROUTINE V-READ ()
+ <COND (<NOT <FSET? ,PRSO ,READBIT>>
+ <TELL "How can I read a " D ,PRSO "?" CR>)
+ (ELSE <TELL <GETP ,PRSO ,P?TEXT> CR>)>>
+
+<ROUTINE V-LOOK-UNDER () <TELL "There is nothing but dust there." CR>>
+
+<ROUTINE V-LOOK-BEHIND () <V-LOOK-UNDER>>
+
+<ROUTINE V-LOOK-INSIDE
+ ()
+ <COND (<FSET? ,PRSO ,DOORBIT>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <TELL "The "
+ D
+ ,PRSO
+ " is open, but I can't tell what's beyond it.">)
+ (ELSE <TELL "The " D ,PRSO " is closed.">)>
+ <CRLF>)
+ (<FSET? ,PRSO ,CONTBIT>
+ <COND (<FSET? ,PRSO ,VICBIT>
+ <TELL "There is nothing special to be seen." CR>)
+ (<SEE-INSIDE? ,PRSO>
+ <COND (<AND <FIRST? ,PRSO> <PRINT-CONT ,PRSO>>
+ <RTRUE>)
+ (<FSET? ,PRSO ,SURFACEBIT>
+ <TELL "There is nothing on the " D ,PRSO "." CR>)
+ (T
+ <TELL "The " D ,PRSO " is empty." CR>)>)
+ (ELSE <TELL "The " D ,PRSO " is closed." CR>)>)
+ (<FSET? ,PRSO ,TRANSBIT>
+ <TELL "You can see dimly through the " D ,PRSO "." CR>)
+ (ELSE <TELL "I don't know how to look inside a " D ,PRSO "." CR>)>>
+
+<ROUTINE SEE-INSIDE? (OBJ)
+ <AND <NOT <FSET? .OBJ ,INVISIBLE>>
+ <OR <FSET? .OBJ ,TRANSBIT> <FSET? .OBJ ,OPENBIT>>>>
+
+<ROUTINE PRE-TURN
+ ()
+ <COND (<NOT <FSET? ,PRSO ,TURNBIT>> <TELL "You can't turn that!" CR>)
+ (<NOT <FSET? ,PRSI ,TOOLBIT>>
+ <TELL "You certainly can't turn it with a " D ,PRSI "." CR>)>>
+
+<ROUTINE V-TURN () <TELL "That doesn't work." CR>>
+
+<ROUTINE V-LOCK () <V-TURN>>
+
+<ROUTINE V-PICK () <V-TURN>>
+
+<ROUTINE V-UNLOCK () <V-TURN>>
+
+<ROUTINE V-KILL ()
+ <IKILL "kill">>
+
+<ROUTINE IKILL (STR)
+ #DECL ((STR) STRING)
+ <COND (<NOT ,PRSO> <TELL "There is nothing here to " .STR "." CR>)
+ (<AND <NOT <FSET? ,PRSO ,VILLAIN>>
+ <NOT <FSET? ,PRSO ,VICBIT>>>
+ <TELL "I've known strange people, but fighting a "
+ D
+ ,PRSO
+ "?" CR>)
+ (<OR <NOT ,PRSI> <==? ,PRSI ,HANDS>>
+ <FUTILE .STR>)
+ (<NOT <FSET? ,PRSI ,WEAPONBIT>>
+ <TELL "Trying to "
+ .STR
+ " the "
+ D
+ ,PRSO
+ " with a "
+ D
+ ,PRSI
+ " is futile." CR>)
+ (ELSE <TELL "You can't." CR>)>>
+
+<ROUTINE V-ATTACK () <IKILL "attack">>
+
+<ROUTINE V-KICK () <HACK-HACK "Kicking the ">>
+
+<ROUTINE V-WAVE () <HACK-HACK "Waving the ">>
+
+<ROUTINE V-RAISE () <HACK-HACK "Playing in this way with the ">>
+
+<ROUTINE V-LOWER () <HACK-HACK "Playing in this way with the ">>
+
+<ROUTINE V-RUB () <HACK-HACK "Fiddling with the ">>
+
+<ROUTINE V-PUSH () <HACK-HACK "Pushing the ">>
+
+<ROUTINE PRE-MUNG ()
+ <COND (<NOT <FSET? ,PRSO ,VICBIT>>
+ <HACK-HACK "Trying to destroy the ">)
+ (<NOT ,PRSI>
+ <FUTILE "destroy">)>>
+
+<ROUTINE FUTILE (STR)
+ <TELL
+"Trying to " .STR " a " D ,PRSO " with your bare hands is futile." CR>>
+
+<ROUTINE V-MUNG ()
+ <COND (<FSET? ,PRSO ,KEYBIT>
+ <REMOVE ,PRSO>
+ <TELL
+"It shatters and disappears." CR>)
+ (T <TELL "You can't." CR>)>>
+
+<ROUTINE HACK-HACK
+ (STR)
+ #DECL ((STR) STRING)
+ <TELL .STR D ,PRSO <PICK-ONE ,HO-HUM> CR>>
+
+<GLOBAL HO-HUM
+ <LTABLE
+ " isn't notably helpful."
+ " does nothing."
+ " has no effect.">>
+
+<ROUTINE WORD-TYPE
+ (OBJ WORD "AUX" SYNS)
+ #DECL ((OBJ) OBJECT (WORD SYNS) TABLE)
+ <ZMEMQ .WORD
+ <SET SYNS <GETPT .OBJ ,P?SYNONYM>>
+ <- </ <PTSIZE .SYNS> 2> 1>>>
+
+<ROUTINE V-KNOCK
+ ()
+ <COND (<WORD-TYPE ,PRSO ,W?DOOR>
+ <TELL "Nobody's home." CR>)
+ (ELSE <TELL "Why knock on a " D ,PRSO "?" CR>)>>
+
+<ROUTINE V-FROBOZZ
+ ()
+ <TELL
+"The FROBOZZ Corporation sponsored this expedition." CR>>
+
+<ROUTINE V-YELL () <TELL "Aarrrrggggggghhhhhhhh!" CR>>
+
+<ROUTINE V-PLUG () <TELL "This has no effect." CR>>
+
+\
+
+<ROUTINE V-SHAKE ("AUX" X)
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <TELL "This seems to have no effect." CR>)
+ (<AND <NOT <FSET? ,PRSO ,OPENBIT>>
+ <FIRST? ,PRSO>>
+ <TELL "It sounds like there is something inside the "
+ D
+ ,PRSO
+ "."
+ CR>)
+ (<AND <FSET? ,PRSO ,OPENBIT> <FIRST? ,PRSO>>
+ <REPEAT ()
+ <COND (<SET X <FIRST? ,PRSO>> <MOVE .X ,PRSO>)
+ (ELSE <RETURN>)>>
+ <TELL "All of the objects spill onto the floor." CR>)>>
+
+<ROUTINE V-DIG () <TELL "What a silly idea!" CR>>
+
+<ROUTINE V-SMELL ()
+ <COND (,SUIT-ON?
+ <SETG PRSO ,SPACESUIT>)>
+ <TELL "It smells just like a " D ,PRSO "." CR>>
+
+<ROUTINE GLOBAL-IN? (OBJ1 OBJ2 "AUX" T)
+ #DECL ((OBJ1 OBJ2) OBJECT (T) <OR FALSE TABLE>)
+ <COND (<SET T <GETPT .OBJ2 ,P?GLOBAL>>
+ <ZMEMQB .OBJ1 .T <- <PTSIZE .T> 1>>)>>
+
+<ROUTINE HERE?? (OBJ)
+ <OR <IN? .OBJ ,HERE> <GLOBAL-IN? .OBJ ,HERE>>>
+
+<ROUTINE V-SWIM ()
+ <COND (<FSET? ,HERE ,RAIRBIT>
+ <TELL
+"Waving your arms and legs about doesn't help much. You move a little, but
+some stronger impulse would be much more useful." CR>)
+ (ELSE
+ <TELL "You can't swim here!" CR>)>>
+
+<ROUTINE V-UNTIE () <TELL "Unfasten it how?" CR>>
+
+<ROUTINE PRE-TIE
+ ()
+ <COND (<==? ,PRSI ,WINNER>
+ <TELL "You can't tie it to yourself." CR>)>>
+
+<ROUTINE V-TIE () <TELL "You can't tie the " D ,PRSO " to that." CR>>
+
+<ROUTINE V-ALARM ()
+ <COND (<FSET? ,PRSO ,VILLAIN>
+ <TELL "He's wide awake, or haven't you noticed..." CR>)
+ (ELSE
+ <TELL "The " D ,PRSO " isn't sleeping." CR>)>>
+
+<ROUTINE V-ZORK () <TELL "I see no Zork here." CR>>
+
+\
+
+<ROUTINE V-COMMAND ()
+ <COND (<FSET? ,PRSO ,VICBIT>
+ <TELL "The " D ,PRSO " pays no attention." CR>)
+ (ELSE
+ <TELL "You cannot talk to that!" CR>)>>
+
+<ROUTINE V-CLIMB-ON ()
+ <COND (<AND <FSET? ,PRSO ,FURNITURE> <FSET? ,PRSO ,VEHBIT>>
+ <PERFORM ,V?BOARD ,PRSO>
+ <RTRUE>)
+ (<FSET? ,PRSO ,VEHBIT>
+ <V-CLIMB-UP ,P?UP T>)
+ (T
+ <TELL "You can't climb onto the " D ,PRSO "." CR>)>>
+
+<ROUTINE V-CLIMB-FOO () <V-CLIMB-UP ,P?UP T>>
+
+<ROUTINE V-CLIMB-UP ("OPTIONAL" (DIR ,P?UP) (OBJ <>) "AUX" X)
+ #DECL ((DIR) FIX (OBJ) <OR ATOM FALSE> (X) TABLE)
+ <COND (<GETPT ,HERE .DIR>
+ <DO-WALK .DIR>
+ <RTRUE>)
+ (<NOT .OBJ>
+ <TELL "You can't go that way." CR>)
+ (ELSE <TELL "Bizarre!" CR>)>>
+
+<ROUTINE V-CLIMB-DOWN ()
+ <COND (<AND <FSET? ,PRSO ,FURNITURE> <FSET? ,PRSO ,VEHBIT>>
+ <V-CLIMB-ON>
+ <RTRUE>)
+ (T <V-CLIMB-UP ,P?DOWN>)>>
+
+<ROUTINE V-PUT-UNDER ()
+ <TELL "You can't do that." CR>>
+
+<ROUTINE V-ENTER ()
+ <DO-WALK ,P?IN>>
+
+<ROUTINE V-EXIT ()
+ <DO-WALK ,P?OUT>>
+
+<ROUTINE V-SEARCH ()
+ <TELL "You find nothing unusual." CR>>
+
+<ROUTINE V-FIND ("AUX" (L <LOC ,PRSO>))
+ <COND (<EQUAL? ,PRSO ,ME ,HANDS>
+ <TELL "You're around here somewhere..." CR>)
+ (<EQUAL? .L ,GLOBAL-OBJECTS>
+ <TELL "You find it." CR>)
+ (<IN? ,PRSO ,WINNER>
+ <TELL "You have it." CR>)
+ (<OR <IN? ,PRSO ,HERE>
+ <==? ,PRSO ,PSEUDO-OBJECT>>
+ <TELL "It's right here." CR>)
+ (<FSET? .L ,VILLAIN>
+ <TELL "The " D .L " has it." CR>)
+ (<FSET? .L ,CONTBIT>
+ <TELL "It's in the " D .L "." CR>)
+ (ELSE
+ <TELL "Beats me." CR>)>>
+
+<ROUTINE V-TELL ()
+ <COND (<FSET? ,PRSO ,VICBIT>
+ <SETG WINNER ,PRSO>)
+ (T
+ <TELL "You can't talk to the " D ,PRSO "!" CR>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <RFATAL>)>>
+
+<ROUTINE V-ANSWER ()
+ <TELL "Nobody is awaiting your answer." CR>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>>
+
+<ROUTINE V-REPLY ()
+ <TELL "It is hardly likely that the " D ,PRSO " is interested." CR>
+ <SETG P-CONT <>>
+ <SETG QUOTE-FLAG <>>
+ <RTRUE>>
+
+<ROUTINE V-IS-IN ()
+ <COND (<IN? ,PRSO ,PRSI>
+ <TELL "Yes, it is ">
+ <COND (<FSET? ,PRSI ,SURFACEBIT>
+ <TELL "on">)
+ (T <TELL "in">)>
+ <TELL " the " D ,PRSI "." CR>)
+ (T <TELL "No, it isn't." CR>)>>
+
+<ROUTINE V-KISS ()
+ <TELL "I'd sooner kiss a pig." CR>>
+
+<ROUTINE V-RAPE ()
+ <TELL "What a (ahem!) strange idea." CR>>
+
+<ROUTINE V-DIAGNOSE ()
+ <TELL "You are in perfect health." CR>
+ <COND (<NOT <0? ,DEATHS>>
+ <TELL "You have been killed ">
+ <COND (<1? ,DEATHS> <TELL "once.">)
+ (<==? ,DEATHS 2> <TELL "twice.">)
+ (T <TELL "three times.">)>
+ <CRLF>)>>
+
+<ROUTINE V-SAY ("AUX" V)
+ <COND (<SET V <FIND-IN ,HERE ,VICBIT>>
+ <SETG P-CONT <>>
+ <TELL "You must address the " D .V " directly." CR>)
+ (ELSE
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <TELL
+"Talking to yourself is a sign of impending mental collapse." CR>)>>
+
+<ROUTINE V-WEAR ()
+ <TELL "You can't wear that, and besides, it wouldn't fit." CR>>
+
+<ROUTINE V-REMOVE ()
+ <COND (<FSET? ,PRSO ,WEARBIT> <PERFORM ,V?TAKE-OFF ,PRSO> <RTRUE>)
+ (ELSE <PERFORM ,V?TAKE ,PRSO> <RTRUE>)>>
+
+<ROUTINE V-TAKE-OFF ()
+ <COND (<FSET? ,PRSO ,VEHBIT> <V-DISEMBARK>)
+ (T <TELL "You aren't wearing that." CR>)>>
+
+<ROUTINE V-STEP-ON ()
+ <TELL "That's a silly thing to do." CR>>
+
+<ROUTINE V-PUT-ON ()
+ <PERFORM ,V?PUT ,PRSO ,PRSI>>
+
+<ROUTINE V-LAND ()
+ <TELL "Such complicated tasks are best left to computers." CR>>
+
+<ROUTINE ROB (WHO "OPTIONAL" (WHERE <>) (HIDE? <>) "AUX" N X (ROBBED? <>))
+ <SET X <FIRST? .WHO>>
+ <REPEAT ()
+ <COND (<NOT .X> <RETURN .ROBBED?>)>
+ <SET N <NEXT? .X>>
+ <COND (<RIPOFF .X .WHERE>
+ <COND (.HIDE? <FSET .X ,NDESCBIT>)>
+ <SET ROBBED? .X>)>
+ <SET X .N>>>
+
+<ROUTINE RIPOFF (X WHERE)
+ <COND (<AND <==? .X ,BLUE-KEY>
+ <IN? ,BLUE-KEY ,FORCE-FIELD-1>>
+ <RFALSE>)
+ (<AND <NOT <IN? .X .WHERE>>
+ <NOT <FSET? .X ,INVISIBLE>>
+ <FSET? .X ,TOUCHBIT>
+ <FSET? .X ,TAKEBIT>>
+ <COND (<==? .X ,UNDER-GLOBE>
+ <FCLEAR .X ,NDESCBIT>
+ <SETG UNDER-GLOBE <>>)>
+ <COND (<EQUAL? .X ,RED-DISK ,BLUE-DISK>
+ <DISK-SWITCH .X <>>)>
+ <COND (.WHERE <MOVE .X .WHERE>)
+ (ELSE <REMOVE .X>)>
+ <RTRUE>)>>
+
+<ROUTINE V-STAND ()
+ <COND (<FSET? <LOC ,WINNER> ,VEHBIT>
+ <PERFORM ,V?DISEMBARK <LOC ,WINNER>>
+ <RTRUE>)
+ (ELSE
+ <TELL "You are already standing, I think." CR>)>>
+
+<ROUTINE V-NO ()
+ <TELL "You sound rather negative." CR>>
+
+<ROUTINE V-YES ()
+ <TELL "You sound rather positive." CR>>
+
+<ROUTINE V-POINT () <TELL "It's usually impolite to point." CR>>
+
+<ROUTINE V-SET ()
+ <TELL "Setting a " D ,PRSO " is a strange concept." CR>>
+
+<ROUTINE V-PLAY ()
+ <TELL "Playing a " D ,PRSO "?" CR>>
+
+<ROUTINE V-$VERIFY ()
+ <TELL "Verifying game..." CR>
+ <COND (<VERIFY> <TELL "Game correct." CR>)
+ (T <TELL CR "** Game File Failure **" CR>)>>
+
+<ROUTINE V-STAND-ON ()
+ <TELL "Standing on a " D ,PRSO " seems like a waste of time." CR>>
+
+<ROUTINE V-REPORT ()
+ <TELL
+"Report? Why don't you wait until you've accomplished something..." CR>>
+
+<ROUTINE V-LOOK-SAFELY ()
+ <COND (<FSET? ,PRSI ,TRANSBIT>
+ <TELL "The " D ,PRSO " looks as before, only tinged by the
+color of the " D ,PRSI "." CR>)
+ (ELSE <TELL "The " D ,PRSI " isn't transparent." CR>)>>
+
+<ROUTINE V-REACH ()
+ <COND (<FIRST? ,PRSO>
+ <TELL "There is something">)
+ (ELSE <TELL "There is nothing">)>
+ <TELL " inside the " D ,PRSO "." CR>>
+
+<ROUTINE V-REACH-FOR ()
+ <COND (<FSET? ,PRSO ,TAKEBIT>
+ <PERFORM ,V?TAKE ,PRSO>
+ <RTRUE>)
+ (<IN? ,PRSO ,HERE>
+ <TELL "It's here! Now what?" CR>)
+ (ELSE <TELL "It is out of reach." CR>)>>
+
+<ROUTINE DO-WALK (DIR)
+ <SETG P-WALK-DIR .DIR>
+ <PERFORM ,V?WALK .DIR>>
+
+<ROUTINE V-WALK-TO ()
+ <COND (<OR <IN? ,PRSO ,HERE>
+ <GLOBAL-IN? ,PRSO ,HERE>>
+ <TELL "It's here!" CR>)
+ (T <TELL "You should supply a direction!" CR>)>>
+
+<ROUTINE V-FLY ()
+ <TELL "Humans are not usually equipped for flying." CR>>
+
+<ROUTINE V-SMILE ()
+ <TELL "How pleasant!" CR>>