]> github.com/historicalsource and other repositories - cutthroats.git/commitdiff
Revision 23 (Original Source)
authorhistoricalsource <historicalsoftware@textfiles.com>
Sun, 14 Apr 2019 00:20:29 +0000 (20:20 -0400)
committerhistoricalsource <historicalsoftware@textfiles.com>
Sun, 14 Apr 2019 00:20:29 +0000 (20:20 -0400)
34 files changed:
README.md [new file with mode: 0644]
boat.zap [new file with mode: 0644]
boat.zil [new file with mode: 0644]
clock.zap [new file with mode: 0644]
clock.zil [new file with mode: 0644]
events.zap [new file with mode: 0644]
events.zil [new file with mode: 0644]
globals.zap [new file with mode: 0644]
globals.zil [new file with mode: 0644]
goal.zap [new file with mode: 0644]
goal.zil [new file with mode: 0644]
island.zap [new file with mode: 0644]
island.zil [new file with mode: 0644]
macros.zap [new file with mode: 0644]
macros.zil [new file with mode: 0644]
main.zap [new file with mode: 0644]
main.zil [new file with mode: 0644]
parser.zap [new file with mode: 0644]
parser.zil [new file with mode: 0644]
people.zap [new file with mode: 0644]
people.zil [new file with mode: 0644]
syntax.zap [new file with mode: 0644]
syntax.zil [new file with mode: 0644]
toa.xzap [new file with mode: 0644]
toa.zap [new file with mode: 0644]
toa.zil [new file with mode: 0644]
toa.zip [new file with mode: 0644]
toadat.zap [new file with mode: 0644]
toafreq.xzap [new file with mode: 0644]
toastr.zap [new file with mode: 0644]
verbs.zap [new file with mode: 0644]
verbs.zil [new file with mode: 0644]
wrecks.zap [new file with mode: 0644]
wrecks.zil [new file with mode: 0644]

diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..7154115
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# cutthroats
diff --git a/boat.zap b/boat.zap
new file mode 100644 (file)
index 0000000..e39d9d8
--- /dev/null
+++ b/boat.zap
@@ -0,0 +1,916 @@
+
+
+       .FUNCT  FERRY-F
+       EQUAL?  PRSA,V?CLIMB-ON,V?THROUGH,V?BOARD \?ELS5
+       IN?     FERRY,FERRY-LANDING \?ELS10
+       EQUAL?  HERE,FERRY-LANDING \?ELS15
+       CALL    TELL-CANT-BOARD
+       RSTACK  
+?ELS15:        CALL    TELL-YOURE-NOT,STR?303
+       RSTACK  
+?ELS10:        PRINTR  "It's not at the landing. Be patient."
+?ELS5: EQUAL?  PRSA,V?WALK-TO \?ELS23
+       EQUAL?  HERE,FERRY-LANDING /?ELS23
+       CALL    TELL-SHD-DIR
+       RSTACK  
+?ELS23:        EQUAL?  PRSA,V?LISTEN \FALSE
+       PRINTR  "You hear its engines."
+
+
+       .FUNCT  TELL-CANT-BOARD
+       CALL    TELL-DONT-HAVE,STR?304
+       RSTACK  
+
+
+       .FUNCT  GLOBAL-FERRY-F
+       EQUAL?  PRSA,V?FIND,V?TELL,V?ASK-ABOUT /FALSE
+       CALL    GLOBAL-NOT-HERE-PRINT,GLOBAL-FERRY
+       RSTACK  
+
+
+       .FUNCT  MM-FORE-DECK-F,RARG
+       EQUAL?  RARG,M-LOOK \FALSE
+       CALL    TELL-FORE-END,SALVAGER
+       RSTACK  
+
+
+       .FUNCT  TELL-FORE-END,OBJ
+       PRINTI  "You are at the fore end of the "
+       CALL    DPRINT,OBJ
+       PRINTR  ". You can see the ocean over the rail that runs around the deck. A ladder leads below deck, and the wheelhouse is aft of you. A chair is bolted to the deck."
+
+
+       .FUNCT  DECK-CHAIR-F,RARG=0
+       EQUAL?  RARG,M-OBJDESC \?ELS5
+       IN?     PETE,DECK-CHAIR \TRUE
+       CALL    TELL-IN-CHAIR,PETE
+       RTRUE   
+?ELS5: ZERO?   RARG \FALSE
+       EQUAL?  PRSA,V?EXAMINE \?ELS15
+       PRINTI  "This weatherbeaten chair is used by a lookout while standing watch. It faces forward and is bolted to the deck. "
+       IN?     PETE,DECK-CHAIR \?CND18
+       CALL    TELL-IN-CHAIR,PETE
+?CND18:        CRLF    
+       RTRUE   
+?ELS15:        EQUAL?  PRSA,V?ASK-ABOUT \?ELS22
+       PRINTR  """It's the lookout's chair."""
+?ELS22:        EQUAL?  PRSA,V?PUT-ON,V?PUT \?ELS26
+       EQUAL?  PRSI,DECK-CHAIR \?ELS26
+       CALL    IDROP
+       ZERO?   STACK /TRUE
+       IN?     PLAYER,DECK-CHAIR \?CND32
+       LOC     DECK-CHAIR
+       MOVE    PRSO,STACK
+?CND32:        PRINTR  "It slides off the chair and onto the deck."
+?ELS26:        EQUAL?  PRSA,V?BOARD \FALSE
+       IN?     PETE,DECK-CHAIR \FALSE
+       CALL    TELL-ALREADY,STR?305
+       RSTACK  
+
+
+       .FUNCT  TELL-IN-CHAIR,OCC
+       CALL    START-SENTENCE,OCC
+       PRINTR  " is sitting in the chair."
+
+
+       .FUNCT  MM-PORT-DECK-F,RARG,DOCK?
+       EQUAL?  RARG,M-ENTER \?ELS5
+       MOVE    BUNK,MM-CREW-QTRS
+       MOVE    UNDER-BUNK,MM-CREW-QTRS
+       MOVE    STOVE,MM-GALLEY
+       MOVE    DECK-CHAIR,MM-FORE-DECK
+       MOVE    REDS-BUNK,MM-CAPT-CABIN
+       MOVE    LOUNGE-CHAIR,MM-LOUNGE
+       IN?     PETE,MM-GALLEY \?CND6
+       MOVE    FOOD,STOVE
+       FSET    FOOD,NDESCBIT
+?CND6: ZERO?   WATER-DELIVERED /FALSE
+       EQUAL?  SHIP-CHOSEN,SALVAGER \FALSE
+       MOVE    DRINKING-WATER,MM-GALLEY
+       FSET    DRINKING-WATER,NDESCBIT
+       RFALSE  
+?ELS5: EQUAL?  RARG,M-LOOK \FALSE
+       CALL    TELL-FOO-SIDE,SALVAGER,STR?184,STR?183
+       RTRUE   
+
+
+       .FUNCT  TELL-FOO-SIDE,OBJ,SIDE,HOUSE,DOCK?
+       PRINTI  "You are on the "
+       PRINT   SIDE
+       PRINTI  " side of the "
+       CALL    DPRINT,OBJ
+       PRINTI  ", a sturdy vessel designed for "
+       EQUAL?  OBJ,TRAWLER \?ELS5
+       PRINTI  "trawling"
+       JUMP    ?CND3
+?ELS5: PRINTI  "deep-sea salvaging"
+?CND3: PRINTI  ". To "
+       PRINT   HOUSE
+       PRINTI  " is a small wheelhouse, while "
+       EQUAL?  OBJ,TRAWLER \?ELS16
+       SET     'DOCK?,TRAWLER-DOCKED
+       JUMP    ?CND14
+?ELS16:        SET     'DOCK?,SALVAGER-DOCKED
+?CND14:        ZERO?   DOCK? /?ELS23
+       PRINTI  "to "
+       PRINT   SIDE
+       PRINTR  " is the gangway leading to the dock. The gentle rocking of the boat in port reminds you of time spent on the open sea."
+?ELS23:        PRINTI  "the ocean, with its blue-green waves crashing, lies off the "
+       PRINT   SIDE
+       PRINTR  " rail."
+
+
+       .FUNCT  TELL-AFT-DECK
+       PRINTI  "The smell of diesel fuel is strong but reassuring here on the aft deck. A ladder leads below deck, while forward you can see the entrance to the command center of the boat, the wheelhouse."
+       RTRUE   
+
+
+       .FUNCT  MM-AFT-DECK-F,RARG
+       EQUAL?  RARG,M-LOOK \?ELS5
+       CALL    TELL-AFT-DECK
+       PRINTR  " A huge air compressor is bolted to the deck by the aft rail."
+?ELS5: EQUAL?  RARG,M-BEG \?ELS9
+       EQUAL?  PRSA,V?WALK \FALSE
+       IN?     AIR-HOSE,DEEP-SUIT \FALSE
+       IN?     DEEP-SUIT,PLAYER \FALSE
+       PRINTI  "You don't want to drag the "
+       CALL    DPRINT,AIR-HOSE
+       PRINTR  " around the boat."
+?ELS9: EQUAL?  RARG,M-FLASH \FALSE
+       IN?     WEASEL,MM-AFT-DECK \FALSE
+       ZERO?   AT-SEA /FALSE
+       ZERO?   WEASEL-APPREHENDED \FALSE
+       CALL    QUEUED?,I-PENDULUM
+       ZERO?   STACK \FALSE
+       CALL    QUEUE,I-PENDULUM,-1
+       PUT     STACK,0,1
+       CALL    TELL-WEASEL-TOSSES
+       RSTACK  
+
+
+       .FUNCT  TELL-WEASEL-TOSSES
+       FCLEAR  LINE-HACK,INVISIBLE
+       LOC     WEASEL
+       MOVE    LINE-HACK,STACK
+       PRINTI  "The Weasel tosses a line over the side and says, "
+       PRINT   LINE-STR
+       CRLF    
+       RTRUE   
+
+
+       .FUNCT  LINE-HACK-F,HOLDER=0
+       LOC     LINE-HACK
+       IN?     WEASEL,STACK \?ELS3
+       SET     'HOLDER,WEASEL
+       JUMP    ?CND1
+?ELS3: LOC     LINE-HACK
+       IN?     JOHNNY,STACK \?CND1
+       SET     'HOLDER,JOHNNY
+?CND1: EQUAL?  PRSA,V?EXAMINE \?ELS10
+       ZERO?   HOLDER /?ELS15
+       CALL    START-SENTENCE,HOLDER
+       PRINTI  " is holding one end of a weighted "
+       CALL    DPRINT,LINE-HACK
+       PRINTR  "."
+?ELS15:        PRINTI  "One end of "
+       CALL    APRINT,LINE-HACK
+       PRINTR  " is here. Leave it alone."
+?ELS10:        EQUAL?  PRSA,V?ASK-ABOUT,V?FIND /FALSE
+       ZERO?   HOLDER /?ELS31
+       CALL    START-SENTENCE,HOLDER
+       PRINTR  " pulls it away. ""Don't mess with that!"""
+?ELS31:        PRINTR  "Leave it alone."
+
+
+       .FUNCT  MM-COMPRESSOR-F,TICK
+       EQUAL?  PRSA,V?CLOSE,V?OPEN \?ELS5
+       CALL    TELL-NO-NO
+       RSTACK  
+?ELS5: EQUAL?  PRSA,V?PUT \?ELS7
+       EQUAL?  PRSI,MM-COMPRESSOR \?ELS7
+       PRINTR  "There's no place to put it."
+?ELS7: EQUAL?  PRSA,V?EXAMINE \?ELS13
+       PRINTI  "The large, gasoline-powered air compressor is "
+       FSET?   MM-COMPRESSOR,ONBIT \?ELS18
+       PRINTI  "on"
+       JUMP    ?CND16
+?ELS18:        PRINTI  "off"
+?CND16:        PRINTI  ". You can quickly see it "
+       CALL    INT,I-MM-COMPRESSOR
+       GET     STACK,C-TICK >TICK
+       ZERO?   TICK \?ELS29
+       PRINTI  "is out of fuel"
+       JUMP    ?CND27
+?ELS29:        EQUAL?  TICK,80 \?ELS36
+       PRINTI  "has"
+       JUMP    ?CND34
+?ELS36:        PRINTI  "started with"
+?CND34:        PRINTI  " fuel for an hour and a half's operation"
+?CND27:        PRINTI  ". A retractable "
+       CALL    DPRINT,AIR-HOSE
+       PRINTR  " is built in."
+?ELS13:        EQUAL?  PRSA,V?LAMP-ON \?ELS48
+       FSET?   MM-COMPRESSOR,ONBIT \?ELS53
+       CALL    TELL-ALREADY,STR?56
+       RSTACK  
+?ELS53:        CALL    INT,I-MM-COMPRESSOR
+       PUT     STACK,0,1
+       FSET    MM-COMPRESSOR,ONBIT
+       PRINTR  "Okay. The compressor is on."
+?ELS48:        EQUAL?  PRSA,V?LAMP-OFF \?ELS59
+       FSET?   MM-COMPRESSOR,ONBIT \?ELS64
+       CALL    INT,I-MM-COMPRESSOR
+       PUT     STACK,0,0
+       FCLEAR  MM-COMPRESSOR,ONBIT
+       CALL    TELL-NOW,MM-COMPRESSOR,STR?264
+       RSTACK  
+?ELS64:        CALL    TELL-ALREADY,STR?264
+       RSTACK  
+?ELS59:        EQUAL?  PRSA,V?LISTEN \FALSE
+       FSET?   MM-COMPRESSOR,ONBIT \FALSE
+       PRINTR  "The compressor is making a steady loud noise."
+
+
+       .FUNCT  AIR-HOSE-F
+       EQUAL?  PRSA,V?EXAMINE \?ELS5
+       IN?     AIR-HOSE,DEEP-SUIT \?ELS10
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,UNDERWATER-LINE-C \?ELS15
+       PRINTI  "This "
+       CALL    DPRINT,AIR-HOSE
+       PRINTI  " goes from the aft deck of the "
+       CALL    DPRINT,SALVAGER
+       PRINTR  " and ends at your diving suit. Without it, you would find breathing impossible."
+?ELS15:        PRINTI  "It connects the "
+       CALL    DPRINT,DEEP-SUIT
+       PRINTI  " and the "
+       CALL    DPRINT,MM-COMPRESSOR
+       PRINTI  " "
+       EQUAL?  HERE,MM-AFT-DECK \?ELS24
+       PRINTI  "here"
+       JUMP    ?CND22
+?ELS24:        PRINTI  "on the aft deck"
+?CND22:        PRINTR  "."
+?ELS10:        PRINTI  "It is designed to be connected to a "
+       CALL    DPRINT,DEEP-SUIT
+       PRINTR  " to provide air and is about 600 feet long."
+?ELS5: EQUAL?  PRSA,V?TIE,V?PUT \?ELS38
+       EQUAL?  PRSI,DEEP-SUIT /?THN41
+       EQUAL?  PRSO,DEEP-SUIT \?ELS38
+?THN41:        IN?     AIR-HOSE,DEEP-SUIT \?ELS47
+       CALL    TELL-ALREADY,STR?308
+       RSTACK  
+?ELS47:        MOVE    AIR-HOSE,DEEP-SUIT
+       CALL    TELL-NOW,AIR-HOSE,CONNECT-STR
+       RSTACK  
+?ELS38:        EQUAL?  PRSA,V?TAKE \?ELS51
+       IN?     AIR-HOSE,DEEP-SUIT \?ELS56
+       CALL    TELL-ALREADY,CONNECT-STR
+       RSTACK  
+?ELS56:        PRINTI  "Why drag it around? Just connect it to the "
+       CALL    DPRINT,DEEP-SUIT
+       PRINTR  "."
+?ELS51:        EQUAL?  PRSA,V?TIE \?ELS62
+       CALL    TELL-YOU-CANT,STR?309
+       RSTACK  
+?ELS62:        EQUAL?  PRSA,V?UNTIE \?ELS64
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,UNDERWATER-LINE-C \?ELS69
+       CALL    JIGS-UP,STR?310
+       RSTACK  
+?ELS69:        MOVE    AIR-HOSE,MM-COMPRESSOR
+       PRINTR  "The hose retracts back to the compressor."
+?ELS64:        EQUAL?  PRSA,V?MOVE \?ELS75
+       PRINTR  "That was fun."
+?ELS75:        EQUAL?  PRSA,V?CLIMB-FOO \FALSE
+       CALL    TELL-YOU-CANT,STR?311
+       RSTACK  
+
+
+       .FUNCT  TELL-WHEELHOUSE,OBJ
+       PRINTI  " Through the glass windows you see the "
+       ZERO?   AT-SEA /?ELS7
+       PRINTR  "ocean churning all around you."
+?ELS7: CALL    DPRINT,OBJ
+       PRINTR  " docked at the wharf, and the island stretching aft. Forward, you see the choppy waters of the bay."
+
+
+       .FUNCT  MM-WHEELHOUSE-F,RARG
+       EQUAL?  RARG,M-LOOK \?ELS5
+       PRINTI  "You are in the wheelhouse with a passageway leading out onto the deck abaft. You can see the "
+       CALL    DPRINT,MM-COMPRESSOR
+       PRINTI  " sitting there, taking up most of the aft deck."
+       CALL    TELL-WHEELHOUSE,TRAWLER
+       RTRUE   
+?ELS5: EQUAL?  RARG,M-BEG \FALSE
+       EQUAL?  OCEAN,PRSO,PRSI \FALSE
+       EQUAL?  PRSA,V?EXAMINE \?ELS19
+       PRINTR  "You see the ocean through the window."
+?ELS19:        EQUAL?  PRSA,V?ASK-ABOUT,V?FIND /FALSE
+       CALL    TELL-YOU-CANT,STR?313
+       RSTACK  
+
+
+       .FUNCT  COMPRESSOR-PSEUDO,PARG=0
+       EQUAL?  PARG,M-NAME \?ELS5
+       PUTP    PSEUDO-OBJECT,P?SDESC,STR?314
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?EXAMINE \?ELS7
+       CALL    TELL-YOU-CANT,STR?315
+       RSTACK  
+?ELS7: CALL    TELL-CANT-REACH,STR?316
+       RSTACK  
+
+
+       .FUNCT  MM-LOCKER-F,RARG
+       EQUAL?  RARG,M-LOOK \FALSE
+       PRINTI  "You are in a relatively empty locker."
+       PRINT   SPARE-PARTS-STR
+       CRLF    
+       RTRUE   
+
+
+       .FUNCT  METAL-DETECTOR-F,TMP
+       EQUAL?  PRSA,V?EXAMINE \?ELS5
+       PRINTI  "The "
+       CALL    DPRINT,METAL-DETECTOR
+       PRINTI  "'s label is well-worn. It has a "
+       CALL    DPRINT,DETECTOR-SWITCH
+       PRINTI  " which is currently "
+       ZERO?   DETECTOR-ON /?ELS10
+       PRINTI  "on"
+       JUMP    ?CND8
+?ELS10:        PRINTI  "off"
+?CND8: PRINTI  ", and a compartment on the side which is "
+       FSET?   DETECTOR-COMPARTMENT,OPENBIT \?ELS22
+       PRINTI  "open"
+       FIRST?  DETECTOR-COMPARTMENT >TMP \?CND20
+       PRINTI  " and contains "
+       CALL    APRINT,TMP
+       JUMP    ?CND20
+?ELS22:        PRINTI  "closed"
+?CND20:        PRINTR  "."
+?ELS5: EQUAL?  PRSA,V?LAMP-ON \?ELS37
+       SET     'DETECTOR-ON,TRUE-VALUE
+       CALL    TELL-SWITCH,STR?56
+       RTRUE   
+?ELS37:        EQUAL?  PRSA,V?LAMP-OFF \?ELS39
+       SET     'DETECTOR-ON,FALSE-VALUE
+       CALL    TELL-SWITCH,STR?264
+       RTRUE   
+?ELS39:        EQUAL?  PRSA,V?LISTEN \?ELS41
+       CALL    DETECTOR-NOISE,TRUE-VALUE
+       RTRUE   
+?ELS41:        EQUAL?  PRSA,V?PUT \?ELS43
+       EQUAL?  PRSI,METAL-DETECTOR \?ELS43
+       CALL    PERFORM,V?PUT,PRSO,DETECTOR-COMPARTMENT
+       RTRUE   
+?ELS43:        EQUAL?  PRSA,V?EMPTY,V?CLOSE,V?OPEN \?ELS47
+       CALL    PERFORM,PRSA,DETECTOR-COMPARTMENT
+       SET     'P-IT-OBJECT,METAL-DETECTOR
+       RTRUE   
+?ELS47:        EQUAL?  PRSA,V?LOOK-INSIDE \?ELS49
+       CALL    PERFORM,V?EXAMINE,DETECTOR-COMPARTMENT
+       SET     'P-IT-OBJECT,METAL-DETECTOR
+       RTRUE   
+?ELS49:        EQUAL?  PRSA,V?SHAKE \FALSE
+       FSET?   DETECTOR-COMPARTMENT,OPENBIT \?ELS54
+       FIRST?  DETECTOR-COMPARTMENT \?ELS54
+       MOVE    DRY-CELL,HERE
+       SET     'DETECTOR-POWERED,FALSE-VALUE
+       PRINTI  "The "
+       CALL    DPRINT,DRY-CELL
+       PRINTR  " falls out of the machine."
+?ELS54:        PRINTR  "Nothing happens."
+
+
+       .FUNCT  DETECTOR-LABEL-F
+       EQUAL?  PRSA,V?TAKE \FALSE
+       PRINTR  "You tug at it, but it can't be pulled off."
+
+
+       .FUNCT  DETECTOR-SWITCH-F
+       EQUAL?  PRSA,V?EXAMINE \?ELS5
+       ZERO?   DETECTOR-ON /?ELS8
+       CALL    TELL-SWITCH,STR?56
+       RTRUE   
+?ELS8: CALL    TELL-SWITCH,STR?264
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?LAMP-ON \?ELS13
+       CALL    PERFORM,V?LAMP-ON,METAL-DETECTOR
+       SET     'P-IT-OBJECT,DETECTOR-SWITCH
+       RTRUE   
+?ELS13:        EQUAL?  PRSA,V?LAMP-OFF \?ELS15
+       CALL    PERFORM,V?LAMP-OFF,METAL-DETECTOR
+       SET     'P-IT-OBJECT,DETECTOR-SWITCH
+       RTRUE   
+?ELS15:        EQUAL?  PRSA,V?THROW,V?MOVE,V?TURN \FALSE
+       ZERO?   DETECTOR-ON /?ELS20
+       CALL    PERFORM,V?LAMP-OFF,METAL-DETECTOR
+       JUMP    ?CND18
+?ELS20:        CALL    PERFORM,V?LAMP-ON,METAL-DETECTOR
+?CND18:        SET     'P-IT-OBJECT,DETECTOR-SWITCH
+       RTRUE   
+
+
+       .FUNCT  DETECTOR-COMPARTMENT-F,RARG=0
+       EQUAL?  RARG,M-CONT \?ELS5
+       EQUAL?  PRSA,V?TAKE \FALSE
+       EQUAL?  PRSO,DRY-CELL \FALSE
+       CALL    ITAKE
+       ZERO?   STACK /TRUE
+       PRINTI  "Taken."
+       CRLF    
+       ZERO?   DETECTOR-POWERED /TRUE
+       SET     'DETECTOR-POWERED,FALSE-VALUE
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?LOOK-INSIDE,V?EXAMINE \?ELS23
+       FSET?   DETECTOR-COMPARTMENT,OPENBIT \?ELS26
+       PRINTI  "The compartment is on the side of the machine. Inside "
+       FIRST?  DETECTOR-COMPARTMENT \?ELS31
+       PRINTI  "is a connected"
+       JUMP    ?CND29
+?ELS31:        PRINTI  "are connections for a"
+?CND29:        PRINTI  " nine-volt "
+       CALL    DPRINT,DRY-CELL
+       PRINTR  "."
+?ELS26:        CALL    TELL-CLOSED,STR?319
+       RTRUE   
+?ELS23:        EQUAL?  PRSA,V?PUT \?ELS43
+       EQUAL?  PRSO,DETECTOR-COMPARTMENT /FALSE
+       FSET?   DETECTOR-COMPARTMENT,OPENBIT /?ELS50
+       CALL    TELL-CLOSED,STR?320
+       RSTACK  
+?ELS50:        EQUAL?  PRSO,DRY-CELL \?ELS52
+       MOVE    DRY-CELL,DETECTOR-COMPARTMENT
+       FSET?   DRY-CELL,RMUNGBIT /?CND53
+       SET     'DETECTOR-POWERED,TRUE-VALUE
+?CND53:        PRINTI  "The "
+       CALL    DPRINT,DRY-CELL
+       PRINTR  " fits snugly inside."
+?ELS52:        PRINTR  "Unfortunately, it doesn't fit."
+?ELS43:        EQUAL?  PRSA,V?OPEN \?ELS63
+       IN?     DRY-CELL,DETECTOR-COMPARTMENT \?ELS63
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,UNDERWATER-LINE-C \?ELS63
+       CALL    AIRTIGHT-ROOM?
+       ZERO?   STACK \?ELS63
+       FSET    DRY-CELL,RMUNGBIT
+       SET     'DETECTOR-POWERED,FALSE-VALUE
+       RFALSE  
+?ELS63:        EQUAL?  PRSA,V?EMPTY \FALSE
+       FSET?   DETECTOR-COMPARTMENT,OPENBIT \FALSE
+       SET     'DETECTOR-POWERED,FALSE-VALUE
+       RFALSE  
+
+
+       .FUNCT  DEEP-SUIT-F
+       EQUAL?  PRSA,V?CLOSE,V?OPEN \?ELS5
+       CALL    TELL-NO-NO
+       RSTACK  
+?ELS5: EQUAL?  PRSA,V?EXAMINE \?ELS7
+       PRINTI  "This "
+       CALL    DPRINT,DEEP-SUIT
+       PRINTR  " is bulky on land, but underwater it will protect you to 500 feet. It has a hood with ""viewport"" and a connection for a compressor hose."
+?ELS7: EQUAL?  PRSA,V?PUT \?ELS11
+       EQUAL?  PRSI,DEEP-SUIT \?ELS11
+       EQUAL?  PRSO,AIR-HOSE /?ELS11
+       CALL    TELL-NO-NO
+       RSTACK  
+?ELS11:        EQUAL?  PRSA,V?WEAR \?ELS15
+       FSET?   WET-SUIT,WORNBIT \?ELS15
+       CALL    TELL-NO-FIT,STR?321
+       RSTACK  
+?ELS15:        EQUAL?  PRSA,V?DISEMBARK,V?THROW,V?DROP \FALSE
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,UNDERWATER-LINE-C \FALSE
+       CALL    JIGS-UP,STR?322
+       RSTACK  
+
+
+       .FUNCT  MM-CREW-QTRS-F,RARG,W
+       EQUAL?  RARG,M-LOOK \?ELS5
+       CALL    TELL-CREW-QTRS
+       RTRUE   
+?ELS5: EQUAL?  RARG,M-ENTER \FALSE
+       CALL    MOVE-SHARED-OBJECTS,MM-CREW-QTRS
+       RFALSE  
+
+
+       .FUNCT  BUNK-F,RARG=0,F
+       ZERO?   RARG \FALSE
+       EQUAL?  PRSA,V?SLEEP,V?BOARD \?ELS10
+       FIRST?  BUNK >F \?ELS16
+       EQUAL?  F,PLAYER \?THN13
+?ELS16:        CALL    WEARING-SOMETHING?
+       ZERO?   STACK /?ELS10
+?THN13:        CALL    TELL-NOT-COMFORTABLE
+       RSTACK  
+?ELS10:        EQUAL?  PRSA,V?HIDE-UNDER,V?PUT-UNDER \?ELS18
+       EQUAL?  PRSO,GLOBAL-SELF,ME \?ELS23
+       PRINTR  "You won't fit."
+?ELS23:        GETP    PRSO,P?SIZE
+       LESS?   STACK,5 \?ELS27
+       FIRST?  UNDER-BUNK \?ELS32
+       CALL    TELL-NO-FIT
+       RSTACK  
+?ELS32:        MOVE    PRSO,UNDER-BUNK
+       FSET    PRSO,NDESCBIT
+       CALL    TELL-NOW,PRSO,STR?323
+       RSTACK  
+?ELS27:        CALL    TELL-NO-FIT
+       RSTACK  
+?ELS18:        EQUAL?  PRSA,V?LOOK-UNDER \FALSE
+       FIRST?  UNDER-BUNK >F \?ELS43
+       SET     'P-IT-OBJECT,F
+       PRINTI  "There is "
+       CALL    APRINT,F
+       PRINTR  " under the mattress."
+?ELS43:        PRINTR  "Nobody's hidden his life savings there."
+
+
+       .FUNCT  WEARING-SOMETHING?,F
+       FIRST?  PLAYER >F /?KLU12
+?KLU12:        
+?PRG1: ZERO?   F /FALSE
+       FSET?   F,WORNBIT \?ELS7
+       EQUAL?  F,WATCH \TRUE
+?ELS7: NEXT?   F >F /?KLU13
+?KLU13:        JUMP    ?PRG1
+
+
+       .FUNCT  UNDER-BUNK-F,RARG=0
+       EQUAL?  RARG,M-OBJDESC /TRUE
+       EQUAL?  RARG,M-CONT \FALSE
+       EQUAL?  PRSA,V?TAKE \FALSE
+       FCLEAR  PRSO,NDESCBIT
+       RFALSE  
+
+
+       .FUNCT  BUNKS-PSEUDO,PARG=0
+       EQUAL?  PARG,M-NAME \?ELS5
+       PUTP    PSEUDO-OBJECT,P?SDESC,STR?324
+       RTRUE   
+?ELS5: PRINTR  "The only bunk you should worry about is your own."
+
+
+       .FUNCT  MM-GALLEY-F,RARG
+       CALL    GENERIC-GALLEY-F,RARG,MM-GALLEY
+       RSTACK  
+
+
+       .FUNCT  GENERIC-GALLEY-F,RARG,PLACE,?TMP1
+       EQUAL?  RARG,M-ENTER \?ELS5
+       PUTP    GLOBAL-SURFACE,P?SDESC,STR?36
+       CALL    MOVE-SHARED-OBJECTS,PLACE
+       RFALSE  
+?ELS5: EQUAL?  RARG,M-LOOK \?ELS7
+       PRINTI  "You are in the "
+       EQUAL?  PLACE,MM-GALLEY \?ELS12
+       CALL    DPRINT,SALVAGER
+       JUMP    ?CND10
+?ELS12:        CALL    DPRINT,TRAWLER
+?CND10:        PRINTI  "'s galley. A stove and a small table are the fixtures here."
+       IN?     FOOD,STOVE \?CND21
+       CALL    TELL-STEW-ON
+?CND21:        ZERO?   WATER-DELIVERED /?CND24
+       GETP    SHIP-CHOSEN,P?LINE >?TMP1
+       GETP    PLACE,P?LINE
+       EQUAL?  ?TMP1,STACK \?CND24
+       PRINTI  " Water is available."
+?CND24:        PRINTR  " A ladder leads up through the deck to the wheelhouse for feeding the captain in rough weather."
+?ELS7: EQUAL?  RARG,M-BEG \FALSE
+       CALL    DOUBLE-DUTY-CHECK
+       ZERO?   STACK \TRUE
+       RFALSE
+
+
+       .FUNCT  DOUBLE-DUTY-CHECK
+       EQUAL?  PRSA,V?ASK-FOR \FALSE
+       EQUAL?  PRSO,PETE \FALSE
+       EQUAL?  PRSI,FOOD \?ELS12
+       ZERO?   SOUPS-ON /?ELS17
+       PRINTI  """Take some "
+       CALL    DPRINT,GLOBAL-SELF
+       PRINTR  "."""
+?ELS17:        PRINTR  """Wait 'til it's ready."""
+?ELS12:        EQUAL?  PRSI,DRINKING-WATER \FALSE
+       PRINTI  """Take it "
+       CALL    DPRINT,GLOBAL-SELF
+       PRINTR  "."""
+
+
+       .FUNCT  TELL-STEW-ON,LEAD?=1
+       ZERO?   LEAD? /?CND1
+       PRINTI  " "
+?CND1: PRINTI  "A pot of stew is simmering on the stove."
+       RTRUE   
+
+
+       .FUNCT  STOVE-F
+       EQUAL?  PRSA,V?EXAMINE \?ELS5
+       PRINTI  "The small stove rests on gimbals that keep it relatively level."
+       IN?     FOOD,STOVE \?CND8
+       CALL    TELL-STEW-ON
+?CND8: CRLF    
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?LOOK-INSIDE \?ELS12
+       IN?     FOOD,STOVE \?ELS12
+       CALL    TELL-STEW-ON,FALSE-VALUE
+       CRLF    
+       RTRUE   
+?ELS12:        EQUAL?  PRSA,V?LAMP-OFF,V?LAMP-ON \FALSE
+       PRINTR  "That's Pete's job."
+
+
+       .FUNCT  MM-LOUNGE-F,RARG
+       EQUAL?  RARG,M-ENTER \FALSE
+       PUTP    GLOBAL-SURFACE,P?SDESC,STR?36
+       CALL    MOVE-SHARED-OBJECTS,MM-LOUNGE
+       RFALSE  
+
+
+       .FUNCT  LOUNGE-CHAIR-F,RARG=0,F
+       EQUAL?  PRSO,CHAIR \FALSE
+       EQUAL?  PRSA,V?BOARD \FALSE
+       FIRST?  CHAIR >F \FALSE
+       CALL    TELL-NOT-COMFORTABLE
+       RSTACK  
+
+
+       .FUNCT  REDS-BUNK-F
+       EQUAL?  PRSA,V?SIT,V?SLEEP,V?BOARD /?THN6
+       EQUAL?  PRSA,V?HIDE-UNDER,V?PUT-UNDER,V?SIT-ON /?THN6
+       EQUAL?  PRSA,V?PUT \?ELS5
+       EQUAL?  PRSI,REDS-BUNK \?ELS5
+?THN6: PRINTR  "You know better than to disturb the captain's bunk!"
+?ELS5: EQUAL?  PRSA,V?LOOK-INSIDE \FALSE
+       PRINTR  "It's shipshape."
+
+
+       .FUNCT  MM-ENGINE-ROOM-F,RARG
+       EQUAL?  RARG,M-LOOK \FALSE
+       PRINTI  "You are in a tiny cabin with barely enough room to breathe. By your feet lie the huge diesel engines of the "
+       CALL    DPRINT,SALVAGER
+       PRINTR  "."
+
+
+       .FUNCT  ENGINE-PSEUDO,PARG=0
+       EQUAL?  PARG,M-NAME \?ELS5
+       PUTP    PSEUDO-OBJECT,P?SDESC,STR?328
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?EXAMINE \?ELS7
+       PRINTR  "The engines are extremely complex and delicate pieces of machinery."
+?ELS7: EQUAL?  PRSA,V?PLUG,V?LAMP-OFF,V?LAMP-ON \?ELS11
+       PRINTI  "Leave the engines to "
+       CALL    DPRINT,WEASEL
+       PRINTR  " and he'll leave the diving to you."
+?ELS11:        EQUAL?  PRSA,V?ASK-ABOUT \?ELS15
+       EQUAL?  PRSO,WEASEL \?ELS15
+       PRINTR  """These are in pretty good shape."""
+?ELS15:        EQUAL?  PRSA,V?LISTEN \FALSE
+       ZERO?   AT-SEA /FALSE
+       CALL    TELL-YOU-CANT,STR?329
+       RSTACK  
+
+
+       .FUNCT  NW-FORE-DECK-F,RARG
+       EQUAL?  RARG,M-LOOK \FALSE
+       CALL    TELL-FORE-END,TRAWLER
+       RSTACK  
+
+
+       .FUNCT  NW-STARBOARD-DECK-F,RARG
+       EQUAL?  RARG,M-ENTER \?ELS5
+       MOVE    BUNK,NW-CREW-QTRS
+       MOVE    UNDER-BUNK,NW-CREW-QTRS
+       MOVE    STOVE,NW-GALLEY
+       MOVE    DECK-CHAIR,NW-FORE-DECK
+       MOVE    REDS-BUNK,NW-CAPT-CABIN
+       MOVE    LOUNGE-CHAIR,NW-LOUNGE
+       IN?     PETE,NW-GALLEY \?CND6
+       MOVE    FOOD,STOVE
+       FSET    FOOD,NDESCBIT
+?CND6: ZERO?   WATER-DELIVERED /FALSE
+       EQUAL?  TRAWLER,SHIP-CHOSEN \FALSE
+       MOVE    DRINKING-WATER,NW-GALLEY
+       FSET    DRINKING-WATER,NDESCBIT
+       RFALSE  
+?ELS5: EQUAL?  RARG,M-LOOK \FALSE
+       CALL    TELL-FOO-SIDE,TRAWLER,STR?183,STR?184
+       RTRUE   
+
+
+       .FUNCT  NW-AFT-DECK-F,RARG
+       EQUAL?  RARG,M-LOOK \?ELS5
+       CALL    TELL-AFT-DECK
+       CRLF    
+       RTRUE   
+?ELS5: EQUAL?  RARG,M-FLASH \FALSE
+       IN?     WEASEL,NW-AFT-DECK \FALSE
+       ZERO?   AT-SEA /FALSE
+       ZERO?   WEASEL-APPREHENDED \FALSE
+       CALL    QUEUED?,I-PENDULUM
+       ZERO?   STACK \FALSE
+       CALL    QUEUE,I-PENDULUM,-1
+       PUT     STACK,0,1
+       CALL    TELL-WEASEL-TOSSES
+       RSTACK  
+
+
+       .FUNCT  NW-WHEELHOUSE-F,RARG
+       EQUAL?  RARG,M-LOOK \?ELS5
+       PRINTI  "You are in the wheelhouse of the "
+       CALL    DPRINT,TRAWLER
+       PRINTI  ". The passageway leading out onto the deck lies abaft."
+       CALL    TELL-WHEELHOUSE,SALVAGER
+       RTRUE   
+?ELS5: EQUAL?  RARG,M-BEG \FALSE
+       EQUAL?  OCEAN,PRSO,PRSI \FALSE
+       EQUAL?  PRSA,V?EXAMINE \?ELS19
+       PRINTR  "You see the ocean through the window."
+?ELS19:        CALL    TELL-YOU-CANT,STR?313
+       RSTACK  
+
+
+       .FUNCT  NW-LOCKER-F,RARG
+       EQUAL?  RARG,M-LOOK \FALSE
+       PRINTI  "You are in a fairly empty storage locker. It must have been cleaned out after its last trawling expedition."
+       PRINT   SPARE-PARTS-STR
+       CRLF    
+       RTRUE   
+
+
+       .FUNCT  TELL-SWITCH,STR
+       PRINTI  "The switch is now in the """
+       PRINT   STR
+       PRINTR  """ position."
+
+
+       .FUNCT  DRILL-F,RARG=0
+       EQUAL?  RARG,M-CONT \?ELS5
+       EQUAL?  PRSA,V?TAKE \FALSE
+       EQUAL?  PRSO,BATTERY \FALSE
+       CALL    ITAKE
+       ZERO?   STACK /TRUE
+       PRINTI  "Taken."
+       ZERO?   DRILL-POWERED /?CND18
+       SET     'DRILL-POWERED,FALSE-VALUE
+       ZERO?   DRILL-ON /?CND18
+       CALL    INT,I-DRILL
+       PUT     STACK,0,0
+       PRINTI  " The drill bit winds to a halt."
+?CND18:        CRLF    
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?LAMP-ON \?ELS29
+       EQUAL?  PRSO,DRILL \?ELS29
+       ZERO?   DRILL-ON /?ELS36
+       CALL    TELL-ALREADY,STR?56
+       RSTACK  
+?ELS36:        ZERO?   DRILL-POWERED /?ELS39
+       SET     'DRILL-ON,TRUE-VALUE
+       CALL    INT,I-DRILL
+       PUT     STACK,0,1
+       PRINTR  "The drill bit begins to spin."
+?ELS39:        SET     'DRILL-ON,TRUE-VALUE
+       CALL    TELL-SWITCH,STR?56
+       RSTACK  
+?ELS29:        EQUAL?  PRSA,V?LAMP-OFF \?ELS46
+       EQUAL?  PRSO,DRILL \?ELS46
+       ZERO?   DRILL-ON \?ELS53
+       CALL    TELL-ALREADY,STR?264
+       RSTACK  
+?ELS53:        ZERO?   DRILL-POWERED /?ELS55
+       SET     'DRILL-ON,FALSE-VALUE
+       CALL    INT,I-DRILL
+       PUT     STACK,0,0
+       PRINTR  "The drill bit stops spinning."
+?ELS55:        SET     'DRILL-ON,FALSE-VALUE
+       CALL    TELL-SWITCH,STR?264
+       RSTACK  
+?ELS46:        EQUAL?  PRSA,V?EXAMINE \?ELS62
+       PRINTI  "This waterproof wonder features a permanent bit"
+       CALL    QUEUED?,I-DRILL
+       ZERO?   STACK /?CND65
+       PRINTI  " which is turning"
+?CND65:        PRINTI  ", a panel which is "
+       FSET?   DRILL,OPENBIT \?ELS74
+       PRINTI  "open"
+       ZERO?   DRILL-POWERED /?ELS79
+       PRINTI  " with a C battery inside"
+       JUMP    ?CND72
+?ELS79:        PRINTI  ", revealing space for a C battery"
+       JUMP    ?CND72
+?ELS74:        PRINTI  "closed"
+?CND72:        PRINTI  ", and a switch which is in the """
+       ZERO?   DRILL-ON /?ELS95
+       PRINTI  "on"
+       JUMP    ?CND93
+?ELS95:        PRINTI  "off"
+?CND93:        PRINTR  """ position."
+?ELS62:        EQUAL?  PRSA,V?LOOK-INSIDE \?ELS106
+       CALL    PERFORM,V?EXAMINE,DRILL
+       RTRUE   
+?ELS106:       EQUAL?  PRSA,V?OPEN \?ELS108
+       IN?     BATTERY,DRILL \?ELS108
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,UNDERWATER-LINE-C \?ELS108
+       CALL    AIRTIGHT-ROOM?
+       ZERO?   STACK \?ELS108
+       FSET    BATTERY,RMUNGBIT
+       SET     'DRILL-POWERED,FALSE-VALUE
+       RFALSE  
+?ELS108:       EQUAL?  PRSI,DRILL \FALSE
+       EQUAL?  PRSA,V?PUT \?ELS117
+       FSET?   DRILL,OPENBIT /?ELS122
+       SET     'P-IT-OBJECT,DRILL
+       CALL    TELL-CLOSED,STR?320
+       RSTACK  
+?ELS122:       EQUAL?  PRSO,BATTERY \?ELS124
+       MOVE    BATTERY,DRILL
+       FSET?   BATTERY,RMUNGBIT \?CND125
+       CALL    TELL-NOW,BATTERY,STR?332
+       RTRUE   
+?CND125:       SET     'DRILL-POWERED,TRUE-VALUE
+       ZERO?   DRILL-ON /?ELS132
+       CALL    INT,I-DRILL
+       PUT     STACK,0,1
+       PRINTR  "The drill bit starts spinning."
+?ELS132:       CALL    TELL-NOW,BATTERY,STR?332
+       RSTACK  
+?ELS124:       CALL    TELL-NO-FIT
+       RSTACK  
+?ELS117:       EQUAL?  PRSA,V?TELL,V?ASK-ABOUT,V?TAKE /FALSE
+       EQUAL?  PRSA,V?PUT-ON,V?PUT-AGAINST /FALSE
+       ZERO?   DRILL-ON /?THN148
+       ZERO?   DRILL-POWERED \FALSE
+?THN148:       EQUAL?  PRSO,GLOBAL-TIME /FALSE
+       SET     'P-IT-OBJECT,DRILL
+       PRINTI  "The "
+       CALL    DPRINT,DRILL
+       PRINTR  " isn't running!"
+
+
+       .FUNCT  GENERIC-HOLE-F
+       EQUAL?  PRSA,V?EXAMINE \?ELS5
+       PRINTR  "As holes go, it's very nice."
+?ELS5: EQUAL?  PRSA,V?LOOK-INSIDE \?ELS9
+       PRINTR  "You see nothing new."
+?ELS9: EQUAL?  PRSA,V?REACH-IN \FALSE
+       PRINTR  "It's not that big."
+
+
+       .FUNCT  ADD-HOLE,OBJ,I
+       FSET?   HOLE-1,INVISIBLE \?ELS3
+       FCLEAR  HOLE-1,INVISIBLE
+       MOVE    HOLE-1,OBJ
+       JUMP    ?CND1
+?ELS3: FSET?   HOLE-2,INVISIBLE \?ELS5
+       FCLEAR  HOLE-2,INVISIBLE
+       PUTP    HOLE-1,P?SDESC,STR?335
+       MOVE    HOLE-2,OBJ
+       JUMP    ?CND1
+?ELS5: PRINTI  "The drill should be dead now."
+       CRLF    
+?CND1: CALL    INT,I-DRILL >I
+       GET     I,C-TICK
+       SUB     STACK,1
+       PUT     I,C-TICK,STACK
+       GET     I,C-TICK
+       ZERO?   STACK \TRUE
+       CALL    I-DRILL
+       RTRUE   
+
+
+       .FUNCT  TELL-CREW-QTRS
+       PRINTR  "You are below deck in the crew's quarters. Narrow, uncomfortable bunks line the bulkheads, and you note the similarity between this area and a sardine can. Sleeping here is necessary but uninviting. A ladder leads up and out to the fore deck."
+
+
+       .FUNCT  NW-CREW-QTRS-F,RARG,W
+       EQUAL?  RARG,M-LOOK \?ELS5
+       CALL    TELL-CREW-QTRS
+       RSTACK  
+?ELS5: EQUAL?  RARG,M-ENTER \FALSE
+       CALL    MOVE-SHARED-OBJECTS,NW-CREW-QTRS
+       RFALSE  
+
+
+       .FUNCT  NW-GALLEY-F,RARG
+       CALL    GENERIC-GALLEY-F,RARG,NW-GALLEY
+       RSTACK  
+
+
+       .FUNCT  NW-LOUNGE-F,RARG
+       EQUAL?  RARG,M-ENTER \FALSE
+       PUTP    GLOBAL-SURFACE,P?SDESC,STR?36
+       CALL    MOVE-SHARED-OBJECTS,NW-LOUNGE
+       RFALSE  
+
+
+       .FUNCT  NW-ENGINE-ROOM-F,RARG
+       EQUAL?  RARG,M-LOOK \FALSE
+       PRINTI  "You are in a tiny, smelly space where it is difficult to breathe. By your feet lie the diesel engines of the "
+       CALL    DPRINT,TRAWLER
+       PRINTR  "."
+
+       .ENDI
diff --git a/boat.zil b/boat.zil
new file mode 100644 (file)
index 0000000..25bdbdb
--- /dev/null
+++ b/boat.zil
@@ -0,0 +1,1422 @@
+"BOAT ROOMS for TOA #2
+ Copyright (C) 1984 Infocom, Inc."
+
+<OBJECT FERRY
+       (IN LOCAL-GLOBALS)
+       (DESC "ferry")
+       (LDESC "The ferry for the mainland bobs up and down, its engines
+running.")
+       (TEXT "The ferry for the mainland bobs up and down, its engines
+running.")
+       (SYNONYM FERRY BOAT SHIP ENGINE)
+       (ADJECTIVE FERRY)
+       (FLAGS INVISIBLE VEHBIT)
+       (ACTION FERRY-F)>
+
+<ROUTINE FERRY-F ()
+        <COND (<VERB? BOARD THROUGH CLIMB-ON>
+               <COND (<IN? ,FERRY ,FERRY-LANDING>
+                      <COND (<==? ,HERE ,FERRY-LANDING>
+                             <TELL-CANT-BOARD>)
+                            (T <TELL-YOURE-NOT "at the landing.">)>)
+                     (T <TELL "It's not at the landing. Be patient." CR>)>)
+              (<AND <VERB? WALK-TO> <NOT <==? ,HERE ,FERRY-LANDING>>>
+               <TELL-SHD-DIR>)
+              (<VERB? LISTEN>
+               <TELL "You hear its engines." CR>)>>
+
+<ROUTINE TELL-CANT-BOARD ()
+        <TELL-DONT-HAVE "a ferry token">>
+
+<OBJECT GLOBAL-FERRY
+       (IN GLOBAL-OBJECTS)
+       (DESC "ferry")
+       (SYNONYM FERRY)
+       (FLAGS CONTBIT)
+       (ACTION GLOBAL-FERRY-F)>
+
+<ROUTINE GLOBAL-FERRY-F ()
+        <COND (<NOT <VERB? ASK-ABOUT TELL FIND>>
+               <GLOBAL-NOT-HERE-PRINT ,GLOBAL-FERRY>)>>
+
+<ROOM MM-FORE-DECK
+      (IN ROOMS)
+      (DESC "Fore Deck")
+      (FLAGS RLANDBIT ONBIT)
+      (SE TO MM-STARBOARD-DECK)
+      (EAST TO MM-STARBOARD-DECK)
+      (SW TO MM-PORT-DECK)
+      (WEST TO MM-PORT-DECK)
+      (SOUTH "There's a wall in the way.")
+      (DOWN TO MM-CREW-QTRS)
+      (GLOBAL OCEAN DECK SALVAGER RAILING IN-WINDOW LADDER-TOP)
+      (LINE 5)
+      (STATION MM-FORE-DECK)
+      (PSEUDO "BOLT" BOLT-PSEUDO "BOLTS" BOLT-PSEUDO)
+      (ACTION MM-FORE-DECK-F)>
+
+<ROUTINE MM-FORE-DECK-F (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+       <TELL-FORE-END ,SALVAGER>)>>
+
+<ROUTINE TELL-FORE-END (OBJ)
+       <TELL
+"You are at the fore end of the " D .OBJ ". You can see the ocean over the
+rail that runs around the deck. A ladder leads below deck, and the wheelhouse
+is aft of you. A chair is bolted to the deck." CR>>
+
+<OBJECT DECK-CHAIR
+       (IN MM-FORE-DECK)
+       (DESC "chair")
+       (SYNONYM CHAIR SEAT ARMCHA)
+       (ADJECTIVE LOOKOU)
+       ;(LDESC 
+"A chair facing forward is bolted to the deck. It has a button on each arm.")
+       (STATION 70) ;"metal content"
+       (DESCFCN DECK-CHAIR-F)
+       (FLAGS SURFACEBIT VEHBIT TRANSBIT)
+       (ACTION DECK-CHAIR-F)>
+
+<ROUTINE DECK-CHAIR-F ("OPTIONAL" (RARG <>))
+        <COND (<==? .RARG ,M-OBJDESC>
+               <COND (<IN? ,PETE ,DECK-CHAIR>
+                      <TELL-IN-CHAIR ,PETE>)
+                     ;(<IN? ,WEASEL ,DECK-CHAIR>
+                      <TELL-IN-CHAIR ,WEASEL>)>
+               <RTRUE>)
+              (<NOT .RARG>
+               <COND (<VERB? EXAMINE>
+                      <TELL
+"This weatherbeaten chair is used by a lookout while standing watch.
+It faces forward and is bolted to the deck. ">
+                      <COND ;(<IN? ,WEASEL ,DECK-CHAIR>
+                             <TELL "The Weasel is currently in the chair.">)
+                            (<IN? ,PETE ,DECK-CHAIR>
+                             <TELL-IN-CHAIR ,PETE>
+                             ;<TELL
+D ,PETE " is in the chair, staring out to sea.">)>
+                      <CRLF>)
+                     (<VERB? ASK-ABOUT>
+                      <TELL "\"It's the lookout's chair.\"" CR>)
+                     (<AND <VERB? PUT PUT-ON>
+                           <PRSI? ,DECK-CHAIR>>
+                      <COND (<IDROP>
+                             <COND (<IN? ,PLAYER ,DECK-CHAIR>
+                                    <MOVE ,PRSO <LOC ,DECK-CHAIR>>)>
+                             <TELL
+"It slides off the chair and onto the deck." CR>)>
+                      <RTRUE>)
+                     (<AND <VERB? BOARD>
+                           <IN? ,PETE ,DECK-CHAIR>>
+                      <TELL-ALREADY "occupied">)>)>>
+
+<ROUTINE TELL-IN-CHAIR (OCC)
+        <START-SENTENCE .OCC>
+        <TELL " is sitting in the chair." CR>>
+
+;<OBJECT LEFT-BUTTON
+       (IN DECK-CHAIR)
+       (DESC "left button")
+       (SYNONYM BUTTON)
+       (ADJECTIVE LEFT WEST ;PORT)
+       (FLAGS NDESCBIT)
+       (ACTION BUTTON-F)>
+
+;<OBJECT RIGHT-BUTTON
+       (IN DECK-CHAIR)
+       (DESC "right button")
+       (SYNONYM BUTTON)
+       (ADJECTIVE RIGHT EAST)
+       (FLAGS NDESCBIT)
+       (ACTION BUTTON-F)>
+
+;<ROUTINE BUTTON-F ()
+        <COND (<VERB? PUSH>
+               <COND (<AND ,ON-WATCH
+                           <NOT <EQUAL? ,ON-WATCH ,PLAYER>>>
+                      <START-SENTENCE ,ON-WATCH>
+                      <TELL " stops you. \"">
+                      <COND (<G? ,O-CTR 0>
+                             <TELL "Don't worry. I got it,\" he says.">)
+                            (T <TELL
+"Haven't you ever heard of the kid who cried wolf?\" he asks.">)>
+                      <CRLF>
+                      <RTRUE>)
+                     (<PRSO? ,LEFT-BUTTON>
+                      <SETG BUTTON-PUSHED 1>)
+                     (T <SETG BUTTON-PUSHED 2>)>
+               <COND (<==? ,O-CTR 0>
+                      <ENABLE <QUEUE I-USELESS-TURN <+ 1 <RANDOM 2>>>>)>
+               <TELL "Pushed." CR>)>>
+
+;<OBJECT PROW-LIGHT
+       (IN MM-FORE-DECK)
+       (DESC "prow light")
+       (SYNONYM LIGHT)
+       (ADJECTIVE SEARCH PROW)
+       (FLAGS ONBIT TRYTAKEBIT NDESCBIT)
+       (TEXT
+"This light, affixed to the prow of the boat, shines into the ocean.")
+       (ACTION PROW-LIGHT-F)>
+
+;<ROUTINE PROW-LIGHT-F ()
+        <COND (<VERB? LAMP-ON>
+               <TELL-ALREADY "on">)
+              (<VERB? LAMP-OFF>
+               <TELL "It would be too dangerous." CR>)
+              (<VERB? TAKE>
+               <TELL "It's firmly attached to the prow." CR>)>>
+
+<ROOM MM-STARBOARD-DECK
+      (IN ROOMS)
+      (DESC "Starboard Deck")
+      (FLAGS RLANDBIT ONBIT)
+      (LDESC 
+"The starboard side of the Mary Margaret has the wheelhouse to port.
+The deck is well-worn after many years of use, but still solid. The ocean
+is off to the other side of the rail.")
+      (NW TO MM-FORE-DECK)
+      (NORTH TO MM-FORE-DECK)
+      (SW TO MM-AFT-DECK)
+      (SOUTH TO MM-AFT-DECK)
+      (WEST "There's a wall in the way.")
+      (GLOBAL OCEAN DECK SALVAGER RAILING IN-WINDOW)
+      (LINE 5)
+      (STATION MM-STARBOARD-DECK)>
+
+<ROOM MM-PORT-DECK
+      (IN ROOMS)
+      (DESC "Port Deck")
+      (FLAGS RLANDBIT ONBIT)
+      (NE TO MM-FORE-DECK)
+      (NORTH TO MM-FORE-DECK)
+      (SE TO MM-AFT-DECK)
+      (SOUTH TO MM-AFT-DECK)
+      (EAST "There's a wall in the way.")
+      (WEST TO WHARF IF SALVAGER-DOCKED ELSE "You're out to sea now.")
+      (OUT TO WHARF IF SALVAGER-DOCKED ELSE "You're out to sea now.")
+      (GLOBAL OCEAN DECK SALVAGER RAILING IN-WINDOW)
+      (LINE 5)
+      (STATION MM-PORT-DECK)
+      (ACTION MM-PORT-DECK-F)>
+
+<ROUTINE MM-PORT-DECK-F (RARG "AUX" DOCK?)
+        <COND (<EQUAL? .RARG ,M-ENTER>
+               <MOVE ,BUNK ,MM-CREW-QTRS>
+               <MOVE ,UNDER-BUNK ,MM-CREW-QTRS>
+               <MOVE ,STOVE ,MM-GALLEY>
+               ;<MOVE ,CUPBOARDS ,MM-GALLEY>
+               <MOVE ,DECK-CHAIR ,MM-FORE-DECK>
+               ;<MOVE ,REDS-LAMP ,MM-CAPT-CABIN>
+               <MOVE ,REDS-BUNK ,MM-CAPT-CABIN>
+               ;<MOVE ,PROW-LIGHT ,MM-FORE-DECK>
+               <MOVE ,LOUNGE-CHAIR ,MM-LOUNGE>
+               <COND (<IN? ,PETE ,MM-GALLEY>
+                      <MOVE ,FOOD ,STOVE>
+                      <FSET ,FOOD ,NDESCBIT>)>
+               <COND (<AND ,WATER-DELIVERED
+                           <==? ,SHIP-CHOSEN ,SALVAGER>>
+                      <MOVE ,DRINKING-WATER ,MM-GALLEY>
+                      <FSET ,DRINKING-WATER ,NDESCBIT>)>
+               <RFALSE>)
+              (<EQUAL? .RARG ,M-LOOK>
+               <TELL-FOO-SIDE ,SALVAGER "port" "starboard">
+               <RTRUE>)>>
+
+<ROUTINE TELL-FOO-SIDE (OBJ SIDE HOUSE "AUX" DOCK?)
+       <TELL
+"You are on the ".SIDE" side of the " D .OBJ", a sturdy vessel designed for ">
+       <COND (<EQUAL? .OBJ ,TRAWLER> <TELL "trawling">)
+             (T <TELL "deep-sea salvaging">)>
+       <TELL ". To " .HOUSE " is a small wheelhouse, while ">
+       <COND (<EQUAL? .OBJ ,TRAWLER> <SET DOCK? ,TRAWLER-DOCKED>)
+             (T <SET DOCK? ,SALVAGER-DOCKED>)>
+       <COND (.DOCK?
+              <TELL
+"to " .SIDE " is the gangway leading to the dock. The gentle rocking of the
+boat in port reminds you of time spent on the open sea." CR>)
+             (T <TELL
+"the ocean, with its blue-green waves crashing, lies off the "
+.SIDE " rail." CR>)>>
+
+<ROOM MM-AFT-DECK
+      (IN ROOMS)
+      (DESC "Aft Deck")
+      (FLAGS RLANDBIT ONBIT)
+      (NE TO MM-STARBOARD-DECK)
+      (EAST TO MM-STARBOARD-DECK)
+      (NW TO MM-PORT-DECK)
+      (WEST TO MM-PORT-DECK)
+      (NORTH TO MM-WHEELHOUSE)
+      (DOWN TO MM-LOUNGE)
+      (GLOBAL OCEAN DECK SALVAGER RAILING LADDER-TOP)
+      (LINE 5)
+      (STATION MM-AFT-DECK)
+      (PSEUDO "BOLT" BOLT-PSEUDO "BOLTS" BOLT-PSEUDO)
+      (ACTION MM-AFT-DECK-F)>
+
+<ROUTINE TELL-AFT-DECK ()
+       <TELL
+"The smell of diesel fuel is strong but reassuring here on the aft deck.
+A ladder leads below deck, while forward you can see the entrance to the
+command center of the boat, the wheelhouse.">>
+
+<ROUTINE MM-AFT-DECK-F (RARG)
+        <COND (<==? .RARG ,M-LOOK>
+               <TELL-AFT-DECK>
+               <TELL
+" A huge air compressor is bolted to the deck by the aft rail." CR>)
+              (<==? .RARG ,M-BEG>
+               <COND (<AND <VERB? WALK>
+                           <IN? ,AIR-HOSE ,DEEP-SUIT>
+                           <IN? ,DEEP-SUIT ,PLAYER>>
+                      <TELL
+"You don't want to drag the " D ,AIR-HOSE " around the boat." CR>)>)
+              (<==? .RARG ,M-FLASH>
+               <COND (<AND <IN? ,WEASEL ,MM-AFT-DECK>
+                           ,AT-SEA
+                           <NOT ,WEASEL-APPREHENDED>
+                           <NOT <QUEUED? I-PENDULUM>>>
+                      <ENABLE <QUEUE I-PENDULUM -1>>
+                      <TELL-WEASEL-TOSSES>)>)>>
+
+<ROUTINE TELL-WEASEL-TOSSES ()
+        <FCLEAR ,LINE-HACK ,INVISIBLE>
+        <MOVE ,LINE-HACK <LOC ,WEASEL>>
+        <TELL
+"The Weasel tosses a line over the side and says, " ,LINE-STR CR>>
+
+<OBJECT LINE-HACK ;"quick and dirty"
+       (IN LOCAL-GLOBALS)
+       (DESC "orange line")
+       (SYNONYM LINE ROPE)
+       (ADJECTIVE SAFETY WEIGHT FLOURE ORANGE)
+       (FLAGS TRYTAKEBIT INVISIBLE VOWELBIT NDESCBIT)
+       (ACTION LINE-HACK-F)>
+
+<ROUTINE LINE-HACK-F ("AUX" (HOLDER <>))
+        <COND (<IN? ,WEASEL <LOC ,LINE-HACK>>
+               <SET HOLDER ,WEASEL>)
+              (<IN? ,JOHNNY <LOC ,LINE-HACK>>
+               <SET HOLDER ,JOHNNY>)>
+        <COND (<VERB? EXAMINE>
+               <COND (.HOLDER
+                      <START-SENTENCE .HOLDER>
+                      <TELL " is holding one end of a weighted " D ,LINE-HACK "." CR>)
+                     (T <TELL "One end of " A ,LINE-HACK " is here. Leave it alone." CR>)>)
+              (<VERB? FIND ASK-ABOUT>
+               <RFALSE>)
+              (T
+               <COND (.HOLDER
+                      <START-SENTENCE .HOLDER>
+                      <TELL " pulls it away. \"Don't mess with that!\"" CR>)
+                     (T <TELL "Leave it alone." CR>)>)>>
+
+<OBJECT MM-COMPRESSOR
+       (IN MM-AFT-DECK)
+       (DESC "large air compressor")
+       (SYNONYM COMPRE SWITCH)
+       (ADJECTIVE LARGE AIR HUGE)
+       (FLAGS CONTBIT OPENBIT NDESCBIT)
+       (STATION 100) ;"metal content"
+       (ACTION MM-COMPRESSOR-F)>
+
+<ROUTINE MM-COMPRESSOR-F ("AUX" TICK)
+        <COND (<VERB? OPEN CLOSE>
+               <TELL-NO-NO>)
+              (<AND <VERB? PUT>
+                    <PRSI? ,MM-COMPRESSOR>>
+               <TELL "There's no place to put it." CR>)
+              (<VERB? EXAMINE>
+               <TELL
+"The large, gasoline-powered air compressor is ">
+               <COND (<FSET? ,MM-COMPRESSOR ,ONBIT>
+                      <TELL "on">)
+                     (T <TELL "off">)>
+               <TELL ". You can quickly see it ">
+               <COND (<0? <SET TICK <GET <INT I-MM-COMPRESSOR> ,C-TICK>>>
+                      <TELL "is out of fuel">)
+                     (T
+                      <COND (<==? .TICK 80>
+                             <TELL "has">)
+                            (T <TELL "started with">)>
+                      <TELL " fuel for an hour and a half's operation">)>
+               <TELL ". A retractable " D ,AIR-HOSE " is built in." CR>)
+              (<VERB? LAMP-ON>
+               <COND (<FSET? ,MM-COMPRESSOR ,ONBIT>
+                      <TELL-ALREADY "on">)
+                     (T
+                      <ENABLE <INT I-MM-COMPRESSOR>>
+                      <FSET ,MM-COMPRESSOR ,ONBIT>
+                      <TELL "Okay. The compressor is on." CR>)>)
+              (<VERB? LAMP-OFF>
+               <COND (<FSET? ,MM-COMPRESSOR ,ONBIT>
+                      <DISABLE <INT I-MM-COMPRESSOR>>
+                      <FCLEAR ,MM-COMPRESSOR ,ONBIT>
+                      <TELL-NOW ,MM-COMPRESSOR "off">)
+                     (T <TELL-ALREADY "off">)>)
+              (<AND <VERB? LISTEN>
+                    <FSET? ,MM-COMPRESSOR ,ONBIT>>
+               <TELL "The compressor is making a steady loud noise." CR>)>>
+
+<OBJECT AIR-HOSE
+       (IN MM-COMPRESSOR)
+       (DESC "airhose")
+       (SYNONYM AIRHOSE HOSE)
+       (ADJECTIVE AIR RETRAC)
+       (FLAGS NDESCBIT TRYTAKEBIT VOWELBIT)
+       (ACTION AIR-HOSE-F)>
+
+<ROUTINE AIR-HOSE-F ()
+        <COND (<VERB? EXAMINE>
+               <COND (<IN? ,AIR-HOSE ,DEEP-SUIT>
+                      <COND (<==? <GETP ,HERE ,P?LINE>
+                                  ,UNDERWATER-LINE-C>
+                             <TELL
+"This " D ,AIR-HOSE " goes from the aft deck of the " D ,SALVAGER" and ends at
+your diving suit. Without it, you would find breathing impossible." CR>)
+                            (T <TELL
+"It connects the " D ,DEEP-SUIT " and the " D ,MM-COMPRESSOR " ">
+                             <COND (<EQUAL? ,HERE ,MM-AFT-DECK>
+                                    <TELL "here">)
+                                   (T <TELL "on the aft deck">)>
+                             <TELL "." CR>)>)
+                     (T <TELL
+"It is designed to be connected to a " D ,DEEP-SUIT " to provide air and
+is about 600 feet long." CR>)>)
+              (<AND <VERB? PUT TIE>
+                    <OR <PRSI? ,DEEP-SUIT>
+                        <PRSO? ,DEEP-SUIT>>>
+               <COND (<IN? ,AIR-HOSE ,DEEP-SUIT>
+                      <TELL-ALREADY "connected">)
+                     (T
+                      <MOVE ,AIR-HOSE ,DEEP-SUIT>
+                      <TELL-NOW ,AIR-HOSE ,CONNECT-STR>)>)
+              (<VERB? TAKE>
+               <COND (<IN? ,AIR-HOSE ,DEEP-SUIT>
+                      <TELL-ALREADY ,CONNECT-STR>)
+                     (T <TELL
+"Why drag it around? Just connect it to the " D ,DEEP-SUIT "." CR>)>)
+              (<VERB? TIE>
+               <TELL-YOU-CANT "connect the airhose to that!">)
+              (<VERB? UNTIE>
+               <COND (<EQUAL? <GETP ,HERE ,P?LINE>
+                              ,UNDERWATER-LINE-C>
+                      <JIGS-UP "Oops! So much for instantly growing gills.">)
+                     (T
+                      <MOVE ,AIR-HOSE ,MM-COMPRESSOR>
+                      <TELL "The hose retracts back to the compressor." CR>)>)
+              (<VERB? MOVE>
+               <TELL "That was fun." CR>)
+              (<VERB? CLIMB-FOO>
+               <TELL-YOU-CANT "climb that!">)>>
+
+<GLOBAL CONNECT-STR "connected to the deep-sea diving suit">
+
+<ROOM MM-WHEELHOUSE
+      (IN ROOMS)
+      (DESC "Wheelhouse")
+      (FLAGS RLANDBIT ONBIT)
+      (SOUTH TO MM-AFT-DECK)
+      (DOWN TO MM-GALLEY)
+      (GLOBAL DECK SALVAGER TRAWLER LADDER-TOP WINDOW OCEAN)
+      (PSEUDO "WHEEL" WHEEL-PSEUDO "COMPRE" COMPRESSOR-PSEUDO)
+      (LINE 5)
+      (STATION MM-AFT-DECK)
+      (ACTION MM-WHEELHOUSE-F)>
+
+<ROUTINE TELL-WHEELHOUSE (OBJ)
+       <TELL " Through the glass windows you see the ">
+       <COND (,AT-SEA <TELL "ocean churning all around you." CR>)
+             (T <TELL
+D .OBJ " docked at the wharf, and the island stretching aft.
+Forward, you see the choppy waters of the bay." CR>)>>
+
+;<TELL
+"wharf and the island beyond, stretching out to the south. Forward, you
+see the choppy waters of the bay. To starboard you can see the salvager docked.">
+
+<ROUTINE MM-WHEELHOUSE-F (RARG)
+        <COND (<EQUAL? .RARG ,M-LOOK>
+               <TELL
+"You are in the wheelhouse with a passageway leading out onto the deck abaft.
+You can see the " D ,MM-COMPRESSOR " sitting there, taking up most of the aft deck.">
+               <TELL-WHEELHOUSE ,TRAWLER>
+               <RTRUE>)
+              (<==? .RARG ,M-BEG>
+               <COND (<EQUAL? ,OCEAN ,PRSO ,PRSI>
+                      <COND (<VERB? EXAMINE>
+                             <TELL
+"You see the ocean through the window." CR>)
+                            (<VERB? FIND ASK-ABOUT>
+                             <RFALSE>)
+                            (T <TELL-YOU-CANT "from here.">)>)>)>>  
+
+<ROUTINE COMPRESSOR-PSEUDO ("OPTIONAL" (PARG <>))
+        <COND (<==? .PARG ,M-NAME>
+               <PUTP ,PSEUDO-OBJECT ,P?SDESC "large air compressor">)
+              (<VERB? EXAMINE>
+               <TELL-YOU-CANT "make out too many details from here.">)
+              (T <TELL-CANT-REACH "it from here">)>>
+
+;<ROOM MM-HEAD
+      (IN ROOMS)
+      (DESC "Head")
+      (FLAGS RLANDBIT ONBIT)
+      (LDESC 
+"You are in the small head aboard the Mary Margaret. There's barely enough
+room to turn around and get out abaft.")
+      (SOUTH TO MM-LOCKER)
+      (GLOBAL DECK SALVAGER)
+      (LINE 5)
+      (STATION MM-LOCKER)>
+
+<ROOM MM-LOCKER
+      (IN ROOMS)
+      (DESC "Storage Locker")
+      (FLAGS RLANDBIT ONBIT)
+      ;(NORTH TO MM-HEAD)
+      (SOUTH TO MM-CREW-QTRS)
+      (GLOBAL DECK SALVAGER)
+      (LINE 5)
+      (PSEUDO "LOCKER" GLOBAL-ROOM-F)
+      (STATION MM-CREW-QTRS)
+       (ACTION MM-LOCKER-F)>
+
+<ROUTINE MM-LOCKER-F (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+       <TELL
+"You are in a relatively empty locker." ,SPARE-PARTS-STR CR>)>>
+
+<GLOBAL SPARE-PARTS-STR
+" There are spare parts for the engine and other equipment scattered about.">
+
+<OBJECT METAL-DETECTOR
+       (IN MM-LOCKER)
+       (DESC "small machine")
+       (SYNONYM MACHIN DETECT DEVICE)
+       (ADJECTIVE SMALL METAL ACME)
+       (FLAGS CONTBIT TRANSBIT SEARCHBIT TAKEBIT)
+       (ACTION METAL-DETECTOR-F)>
+
+<ROUTINE METAL-DETECTOR-F ("AUX" TMP)
+        <COND (<VERB? EXAMINE>
+               <TELL 
+"The " D ,METAL-DETECTOR "'s label is well-worn. It has a "
+D ,DETECTOR-SWITCH " which is currently ">
+               <COND (,DETECTOR-ON <TELL "on">)
+                     (T <TELL "off">)>
+               <TELL ", and a compartment on the side which is ">
+               <COND (<FSET? ,DETECTOR-COMPARTMENT ,OPENBIT>
+                      <TELL "open">
+                      <COND (<SET TMP <FIRST? ,DETECTOR-COMPARTMENT>>
+                             <TELL " and contains " A .TMP>)>)
+                     (T <TELL "closed">)>
+               <TELL "." CR>
+               <RTRUE>)
+              (<VERB? LAMP-ON>
+               <SETG DETECTOR-ON T>
+               <TELL-SWITCH "on">
+               <RTRUE>)
+              (<VERB? LAMP-OFF>
+               <SETG DETECTOR-ON <>>
+               <TELL-SWITCH "off">
+               <RTRUE>)
+              (<VERB? LISTEN>
+               <DETECTOR-NOISE T>
+               <RTRUE>)
+              (<AND <VERB? PUT>
+                    <PRSI? ,METAL-DETECTOR>>
+               <PERFORM ,V?PUT ,PRSO ,DETECTOR-COMPARTMENT>
+               <RTRUE>)
+              (<VERB? OPEN CLOSE EMPTY>
+               <PERFORM ,PRSA ,DETECTOR-COMPARTMENT>
+               <SETG P-IT-OBJECT ,METAL-DETECTOR>
+               <RTRUE>)
+              (<VERB? LOOK-INSIDE>
+               <PERFORM ,V?EXAMINE ,DETECTOR-COMPARTMENT>
+               <SETG P-IT-OBJECT ,METAL-DETECTOR>
+               <RTRUE>)
+              (<VERB? SHAKE>
+               <COND (<AND <FSET? ,DETECTOR-COMPARTMENT ,OPENBIT>
+                           <FIRST? ,DETECTOR-COMPARTMENT>>
+                      <MOVE ,DRY-CELL ,HERE>
+                      <SETG DETECTOR-POWERED <>>
+                      <TELL
+"The " D ,DRY-CELL " falls out of the machine." CR>)
+                     (T <TELL "Nothing happens." CR>)>
+               <RTRUE>)>>
+
+<OBJECT DETECTOR-LABEL
+       (IN METAL-DETECTOR)
+       (DESC "machine label")
+       (SYNONYM LABEL TAG STICKE LOGO)
+       (ADJECTIVE WELL WORN WELL-W MACHIN DETECT METAL SMALL)
+       (TEXT 
+"The label is worn, so all you can make out is a large \"ACME\" at the top.")
+       (FLAGS READBIT NDESCBIT)
+       (ACTION DETECTOR-LABEL-F)>
+
+<ROUTINE DETECTOR-LABEL-F ()
+        <COND (<VERB? TAKE>
+               <TELL "You tug at it, but it can't be pulled off." CR>
+               <RTRUE>)>>
+
+<OBJECT DETECTOR-SWITCH
+       (IN METAL-DETECTOR)
+       (DESC "machine switch")
+       (SYNONYM SWITCH)
+       (ADJECTIVE MACHIN DETECT METAL SMALL POWER ON-OFF ON/OFF)
+       (FLAGS NDESCBIT TURNBIT)
+       (ACTION DETECTOR-SWITCH-F)>
+
+<ROUTINE DETECTOR-SWITCH-F ()
+        <COND (<VERB? EXAMINE>
+               <COND (,DETECTOR-ON
+                      <TELL-SWITCH "on">)
+                     (T <TELL-SWITCH "off">)>
+               <RTRUE>)
+              (<VERB? LAMP-ON>
+               <PERFORM ,V?LAMP-ON ,METAL-DETECTOR>
+               <SETG P-IT-OBJECT ,DETECTOR-SWITCH>
+               <RTRUE>)
+              (<VERB? LAMP-OFF>
+               <PERFORM ,V?LAMP-OFF ,METAL-DETECTOR>
+               <SETG P-IT-OBJECT ,DETECTOR-SWITCH>
+               <RTRUE>)
+              (<VERB? TURN MOVE THROW>
+               <COND (,DETECTOR-ON <PERFORM ,V?LAMP-OFF ,METAL-DETECTOR>)
+                     (T <PERFORM ,V?LAMP-ON ,METAL-DETECTOR>)>
+               <SETG P-IT-OBJECT ,DETECTOR-SWITCH>
+               <RTRUE>)>>
+
+<OBJECT DETECTOR-COMPARTMENT
+       (IN METAL-DETECTOR)
+       (DESC "machine compartment")
+       (SYNONYM COMPAR RECESS PANEL)
+       (ADJECTIVE SMALL MACHIN METAL DETECT)
+       (CAPACITY 3)
+       (CONTFCN DETECTOR-COMPARTMENT-F)
+       (FLAGS CONTBIT NDESCBIT)
+       (ACTION DETECTOR-COMPARTMENT-F)>
+
+<ROUTINE DETECTOR-COMPARTMENT-F ("OPTIONAL" (RARG <>))
+        <COND (<==? .RARG ,M-CONT>
+               <COND (<AND <VERB? TAKE>
+                           <PRSO? ,DRY-CELL>>
+                      <COND (<ITAKE>
+                             <TELL "Taken." CR>
+                             <COND (,DETECTOR-POWERED
+                                    <SETG DETECTOR-POWERED <>>)>)>
+                      <RTRUE>)>)
+              (<VERB? EXAMINE LOOK-INSIDE>
+               <COND (<FSET? ,DETECTOR-COMPARTMENT ,OPENBIT>
+                      <TELL 
+"The compartment is on the side of the machine. Inside ">
+                       <COND (<FIRST? ,DETECTOR-COMPARTMENT>
+                              <TELL "is a connected">)
+                             (T <TELL "are connections for a">)>
+                       <TELL " nine-volt " D ,DRY-CELL "." CR>)
+                      (T
+                       <TELL-CLOSED "small panel on the side of the machine">)>
+               <RTRUE>)
+              (<VERB? PUT>
+               <COND (<PRSO? ,DETECTOR-COMPARTMENT>
+                      <RFALSE>)
+                     (<NOT <FSET? ,DETECTOR-COMPARTMENT ,OPENBIT>>
+                      <TELL-CLOSED "panel">)
+                     (<PRSO? ,DRY-CELL>
+                      <MOVE ,DRY-CELL ,DETECTOR-COMPARTMENT>
+                      <COND (<NOT <FSET? ,DRY-CELL ,RMUNGBIT>>
+                             <SETG DETECTOR-POWERED T>)>
+                      <TELL "The " D ,DRY-CELL " fits snugly inside." CR>
+                      <RTRUE>)
+                     (T <TELL "Unfortunately, it doesn't fit." CR>)>)
+              (<AND <VERB? OPEN>
+                    <IN? ,DRY-CELL ,DETECTOR-COMPARTMENT>
+                    <==? <GETP ,HERE ,P?LINE> ,UNDERWATER-LINE-C>
+                    <NOT <AIRTIGHT-ROOM?>>>
+               <FSET ,DRY-CELL ,RMUNGBIT>
+               <SETG DETECTOR-POWERED <>>
+               <RFALSE>)
+              (<AND <VERB? EMPTY>
+                    <FSET? ,DETECTOR-COMPARTMENT ,OPENBIT>>
+               <SETG DETECTOR-POWERED <>>
+               <RFALSE>)>>
+
+<OBJECT DEEP-SUIT
+       (IN MM-LOCKER)
+       (DESC "deep-sea diving suit")
+       (SYNONYM SUIT HOOD)
+       (ADJECTIVE DEEP DEEP-S SEA DIVING BULKY)
+       (FLAGS TAKEBIT WEARBIT CONTBIT OPENBIT)
+       (ACTION DEEP-SUIT-F)>
+
+<ROUTINE DEEP-SUIT-F ()
+        <COND (<VERB? OPEN CLOSE>
+               <TELL-NO-NO>)
+              (<VERB? EXAMINE>
+               <TELL
+"This " D ,DEEP-SUIT " is bulky on land, but underwater it will
+protect you to 500 feet. It has a hood with \"viewport\" and a
+connection for a compressor hose." CR>)
+              (<AND <VERB? PUT>
+                    <PRSI? ,DEEP-SUIT>
+                    <NOT <PRSO? ,AIR-HOSE>>>
+               <TELL-NO-NO>)
+              (<AND <VERB? WEAR>
+                    <FSET? ,WET-SUIT ,WORNBIT>>
+               <TELL-NO-FIT "over the wet suit">)
+              (<AND <VERB? DROP THROW DISEMBARK>
+                    <==? <GETP ,HERE ,P?LINE> ,UNDERWATER-LINE-C>>
+               <JIGS-UP
+"You take the suit off and quickly realize you're not a dolphin. You realize
+this too late, though.">)>>
+
+<ROOM MM-CREW-QTRS
+      (IN ROOMS)
+      (DESC "Crew's Quarters")
+      (FLAGS RLANDBIT ONBIT)
+      (NORTH TO MM-LOCKER)
+      (SOUTH TO MM-GALLEY)
+      (UP TO MM-FORE-DECK)
+      (GLOBAL DECK SALVAGER LADDER-BOTTOM)
+      (LINE 5)
+      (STATION MM-CREW-QTRS)
+      (PSEUDO "BUNKS" BUNKS-PSEUDO)
+      (ACTION MM-CREW-QTRS-F)>
+
+<ROUTINE MM-CREW-QTRS-F (RARG "AUX" W)
+        <COND (<==? .RARG ,M-LOOK>
+               <TELL-CREW-QTRS>
+               <RTRUE>)
+              (<==? .RARG ,M-ENTER>
+               <MOVE-SHARED-OBJECTS ,MM-CREW-QTRS>
+               <RFALSE>)
+              ;(<==? .RARG ,M-BEG>
+               <COND (<AND <NOT ,GROGGIED>
+                           ,AT-SEA
+                           <SET W <W-KLUDGE>>>
+                      <SETG GROGGIED T>
+                      <START-SENTENCE .W>
+                      <TELL " looks up groggily. ">
+                      <RFALSE>)>)>>
+
+;<GLOBAL GROGGIED <>>
+
+;<ROUTINE W-KLUDGE ()
+        <COND (<EQUAL? ,WINNER ,WEASEL ,PETE>
+               <RETURN ,WINNER>)
+              (<VERB? ASK-ABOUT>
+               <RETURN ,PRSO>)
+              (T <RFALSE>)>>
+
+<OBJECT BUNK
+       (IN MM-CREW-QTRS)
+       (DESC "bunk")
+       (SYNONYM BUNK BED MATTRE)
+       (FLAGS VEHBIT SURFACEBIT CONTBIT OPENBIT TRANSBIT NDESCBIT)
+       (CAPACITY 25)
+       (STATION 30) ;"metal content"
+       (ACTION BUNK-F)>
+
+<ROUTINE BUNK-F ("OPTIONAL" (RARG <>) "AUX" F)
+        <COND (<NOT .RARG>
+               <COND (<AND <VERB? BOARD SLEEP>
+                           <OR <AND <SET F <FIRST? ,BUNK>>
+                                    <NOT <==? .F ,PLAYER>>>
+                               <WEARING-SOMETHING?>>>
+                      <TELL-NOT-COMFORTABLE>)
+                     (<VERB? PUT-UNDER HIDE-UNDER>
+                      <COND (<PRSO? ,ME ,GLOBAL-SELF>
+                             <TELL "You won't fit." CR>)
+                            (<L? <GETP ,PRSO ,P?SIZE> 5>
+                             <COND (<FIRST? ,UNDER-BUNK>
+                                    <TELL-NO-FIT>)
+                                   (T
+                                    <MOVE ,PRSO ,UNDER-BUNK>
+                                    <FSET ,PRSO ,NDESCBIT>
+                                    <TELL-NOW ,PRSO "hidden under the mattress">)>)
+                            (T <TELL-NO-FIT>)>)
+                     (<VERB? LOOK-UNDER>
+                      <COND (<SET F <FIRST? ,UNDER-BUNK>>
+                             <SETG P-IT-OBJECT .F>
+                             <TELL "There is " A .F " under the mattress." CR>)
+                            (T <TELL "Nobody's hidden his life savings there." CR>)>)>)>>
+
+<ROUTINE WEARING-SOMETHING? ("AUX" F)
+        <SET F <FIRST? ,PLAYER>>
+        <REPEAT ()
+         <COND (<NOT .F> <RFALSE>)
+               (<AND <FSET? .F ,WORNBIT>
+                     <NOT <==? .F ,WATCH>>>
+                <RTRUE>)
+               (T <SET F <NEXT? .F>>)>>>
+
+<OBJECT UNDER-BUNK
+       (IN MM-CREW-QTRS)
+       (DESC "under the bunk")
+       (FLAGS CONTBIT NDESCBIT OPENBIT)
+       (CAPACITY 10)
+       (DESCFCN UNDER-BUNK-F)
+       (CONTFCN UNDER-BUNK-F)>
+
+<ROUTINE UNDER-BUNK-F ("OPTIONAL" (RARG <>))
+        <COND (<==? .RARG ,M-OBJDESC>
+               <RTRUE>)
+              (<==? .RARG ,M-CONT>
+               <COND (<VERB? TAKE>
+                      <FCLEAR ,PRSO ,NDESCBIT>
+                      <RFALSE>)>)>>
+
+<ROUTINE BUNKS-PSEUDO ("OPTIONAL" (PARG <>))
+        <COND (<==? .PARG ,M-NAME>
+               <PUTP ,PSEUDO-OBJECT ,P?SDESC "bunks">)
+              (T <TELL "The only bunk you should worry about is your own." CR>)>>
+
+<ROOM MM-GALLEY
+      (IN ROOMS)
+      (DESC "Galley")
+      (FLAGS RLANDBIT ONBIT)
+      (NORTH TO MM-CREW-QTRS)
+      (SOUTH TO MM-LOUNGE)
+      (UP TO MM-WHEELHOUSE)
+      (GLOBAL DECK SALVAGER LADDER-BOTTOM)
+      (LINE 5)
+      (STATION MM-GALLEY)
+      (ACTION MM-GALLEY-F)>
+
+<ROUTINE MM-GALLEY-F (RARG)
+        <GENERIC-GALLEY-F .RARG ,MM-GALLEY>>
+
+<ROUTINE GENERIC-GALLEY-F (RARG PLACE)
+        <COND (<==? .RARG ,M-ENTER>
+               <PUTP ,GLOBAL-SURFACE ,P?SDESC "table">
+               <MOVE-SHARED-OBJECTS .PLACE>
+               <RFALSE>)
+              (<==? .RARG ,M-LOOK>
+               <TELL "You are in the ">
+               <COND (<==? .PLACE ,MM-GALLEY>
+                      <TELL D ,SALVAGER>)
+                     (T <TELL D ,TRAWLER>)>
+               <TELL
+"'s galley. A stove and a small table are the fixtures here.">
+               <COND (<IN? ,FOOD ,STOVE>
+                      <TELL-STEW-ON>)>
+               <COND (<AND ,WATER-DELIVERED
+                           <==? <GETP ,SHIP-CHOSEN ,P?LINE>
+                                <GETP ,PLACE ,P?LINE>>>
+                      <TELL " Water is available.">)>
+               <TELL
+" A ladder leads up through the deck to the wheelhouse for
+feeding the captain in rough weather." CR>)
+              (<==? .RARG ,M-BEG>
+               <COND (<DOUBLE-DUTY-CHECK>
+                      <RTRUE>)>)>>
+
+<ROUTINE DOUBLE-DUTY-CHECK ()
+        <COND (<AND <VERB? ASK-FOR>
+                    <PRSO? ,PETE>>
+               <COND (<PRSI? ,FOOD>
+                      <COND (,SOUPS-ON
+                             <TELL "\"Take some " D ,GLOBAL-SELF ".\"" CR>)
+                            (T <TELL "\"Wait 'til it's ready.\"" CR>)>)
+                     (<PRSI? ,DRINKING-WATER>
+                      <TELL "\"Take it " D ,GLOBAL-SELF ".\"" CR>)>)>>
+
+<ROUTINE TELL-STEW-ON ("OPTIONAL" (LEAD? T))
+        <COND (.LEAD? <TELL " ">)>
+        <TELL "A pot of stew is simmering on the stove.">>
+
+<OBJECT STOVE
+       (IN MM-GALLEY)
+       (DESC "stove")
+       (SYNONYM STOVE RANGE GIMBAL)
+       (ADJECTIVE SMALL)
+       (FLAGS SURFACEBIT OPENBIT CONTBIT NDESCBIT)
+       (CAPACITY 5)
+       (ACTION STOVE-F)>
+
+<ROUTINE STOVE-F ()
+        <COND (<VERB? EXAMINE>
+               <TELL
+"The small stove rests on gimbals that keep it relatively level.">
+               <COND (<IN? ,FOOD ,STOVE>
+                      <TELL-STEW-ON>)>
+               <CRLF>)
+              (<AND <VERB? LOOK-INSIDE>
+                    <IN? ,FOOD ,STOVE>>
+               <TELL-STEW-ON <>>
+               <CRLF>)
+              (<VERB? LAMP-ON LAMP-OFF>
+               <TELL "That's Pete's job." CR>)>>
+
+;<OBJECT CUPBOARDS
+       (IN MM-GALLEY)
+       (DESC "set of cupboards")
+       (SYNONYM CUPBOA CABINE SET)
+       (ADJECTIVE EMPTY BARE FEW STORAG)
+       (FLAGS NDESCBIT CONTBIT)
+       (CAPACITY 1)
+       (ACTION CUPBOARDS-F)>
+
+;<ROUTINE CUPBOARDS-F ()
+        <COND (<VERB? EXAMINE>
+               <TELL "There are a few ">
+               <COND (<FSET? ,CUPBOARDS ,OPENBIT>
+                      <TELL "empty">)
+                     (T <TELL "closed">)>
+               <TELL " storage cupboards here." CR>)
+              (<VERB? OPEN>
+               <COND (<FSET? ,CUPBOARDS ,OPENBIT>
+                      <TELL "They're already open." CR>)
+                     (T
+                      <FSET ,CUPBOARDS ,OPENBIT>
+                      <TELL
+"Opening them reveals nothing but empty cupboards." CR>)>)
+              (<VERB? CLOSE>
+               <COND (<FSET? ,CUPBOARDS ,OPENBIT>
+                      <FCLEAR ,CUPBOARDS ,OPENBIT>
+                      <TELL "Closed." CR>)
+                     (T <TELL "They're already closed." CR>)>)
+              (<AND <VERB? PUT>
+                    <PRSI? ,CUPBOARDS>>
+               <TELL "It would only make Pete mad." CR>)>>
+
+<ROOM MM-LOUNGE
+      (IN ROOMS)
+      (DESC "Lounge")
+      (FLAGS RLANDBIT ONBIT)
+      (LDESC
+"You are in a small, cramped cabin decorated with a table and a few chairs.
+To the aft is the captain's cabin, while the galley lies forward. A ladder
+leading down goes into the engine room.")
+      (NORTH TO MM-GALLEY)
+      (SOUTH TO MM-CAPT-CABIN)
+      (UP TO MM-AFT-DECK)
+      (DOWN TO MM-ENGINE-ROOM)
+      (GLOBAL DECK SALVAGER LADDER-BOTTOM LADDER-TOP)
+      (LINE 5)
+      (STATION MM-LOUNGE)
+      (ACTION MM-LOUNGE-F)>
+
+<ROUTINE MM-LOUNGE-F (RARG)
+        <COND (<==? .RARG ,M-ENTER>
+               <PUTP ,GLOBAL-SURFACE ,P?SDESC "table">
+               <MOVE-SHARED-OBJECTS ,MM-LOUNGE>
+               <RFALSE>)>>
+
+<OBJECT LOUNGE-CHAIR
+       (IN MM-LOUNGE)
+       (DESC "chair")
+       (SYNONYM CHAIR CHAIRS SEAT)
+       (FLAGS NDESCBIT VEHBIT SURFACEBIT TRANSBIT OPENBIT)
+       (CAPACITY 10)
+       (ACTION LOUNGE-CHAIR-F)>
+
+<ROUTINE LOUNGE-CHAIR-F ("OPTIONAL" (RARG <>) "AUX" F)
+        <COND (<PRSO? ,CHAIR>
+               <COND (<VERB? BOARD>
+                      <COND (<SET F <FIRST? ,CHAIR>>
+                             <TELL-NOT-COMFORTABLE>)>)>)>>
+
+<ROOM MM-CAPT-CABIN
+      (IN ROOMS)
+      (DESC "Captain's Cabin")
+      (FLAGS RLANDBIT ONBIT)
+      (LDESC
+"You are in the captain's cabin. There is a large and
+comfortable-looking bunk here. The forward doorway leads to the
+crew's lounge.")
+      (NORTH TO MM-LOUNGE)
+      (GLOBAL DECK SALVAGER)
+      (LINE 5)
+      (STATION MM-LOUNGE)>
+
+;<OBJECT REDS-LAMP
+       (IN MM-CAPT-CABIN)
+       (DESC "reading lamp")
+       (SYNONYM LAMP LIGHT)
+       (ADJECTIVE READIN)
+       (FLAGS NDESCBIT)
+       (ACTION REDS-LAMP-F)>
+
+;<ROUTINE REDS-LAMP-F ()
+        <COND (<VERB? EXAMINE>
+               <TELL "The lamp is ">
+               <COND (<FSET? ,REDS-LAMP ,ONBIT>
+                      <TELL "on">)
+                     (T <TELL "off">)>
+               <TELL "." CR>)
+              (<VERB? LAMP-ON>
+               <COND (<FSET? ,REDS-LAMP ,ONBIT>
+                      <TELL-ALREADY "on">)
+                     (T
+                      <FSET ,REDS-LAMP ,ONBIT>
+                      <TELL-NOW ,REDS-LAMP "on">)>)
+              (<VERB? LAMP-OFF>
+               <COND (<FSET? ,REDS-LAMP ,ONBIT>
+                      <FCLEAR ,REDS-LAMP ,ONBIT>
+                      <TELL "The lamp is now off." CR>)
+                     (T <TELL-ALREADY "off">)>)>>
+
+<OBJECT REDS-BUNK
+       (IN MM-CAPT-CABIN)
+       (DESC "large bunk")
+       (SYNONYM BUNK BED MATTRE)
+       (ADJECTIVE LARGE COMFOR LOOKIN CAPTAI)
+       (FLAGS NDESCBIT)
+       (TEXT "This large, comfortable-looking bunk is the captain's.")
+       (ACTION REDS-BUNK-F)>
+
+<ROUTINE REDS-BUNK-F ()
+        <COND (<OR <VERB? BOARD SLEEP SIT>
+                   <VERB? SIT-ON PUT-UNDER HIDE-UNDER>
+                   <AND <VERB? PUT>
+                        <PRSI? ,REDS-BUNK>>>
+               <TELL "You know better than to disturb the captain's bunk!" CR>)
+              (<VERB? LOOK-INSIDE>
+               <TELL "It's shipshape." CR>)>>
+
+<ROOM MM-ENGINE-ROOM
+      (IN ROOMS)
+      (DESC "Engine Room")
+      (FLAGS RLANDBIT ONBIT)
+      (UP TO MM-LOUNGE)
+      (GLOBAL DECK SALVAGER LADDER-BOTTOM)
+      (LINE 5)
+      (DESCFCN 100) ;"metal content"
+      (PSEUDO "ENGINE" ENGINE-PSEUDO)
+      (STATION MM-LOUNGE)
+      (ACTION MM-ENGINE-ROOM-F)>
+
+<ROUTINE MM-ENGINE-ROOM-F (RARG)
+        <COND (<==? .RARG ,M-LOOK>
+               <TELL
+"You are in a tiny cabin with barely enough room to breathe. By your feet lie
+the huge diesel engines of the " D ,SALVAGER "." CR>)>>
+<ROUTINE ENGINE-PSEUDO ("OPTIONAL" (PARG <>))
+        <COND (<==? .PARG ,M-NAME>
+               <PUTP ,PSEUDO-OBJECT ,P?SDESC "diesel engine">)
+              (<VERB? EXAMINE>
+               <TELL
+"The engines are extremely complex and delicate pieces of machinery." CR>)
+              (<VERB? LAMP-ON LAMP-OFF PLUG>
+               <TELL
+"Leave the engines to " D ,WEASEL " and he'll leave the diving to you." CR>)
+              (<AND <VERB? ASK-ABOUT>
+                    <PRSO? ,WEASEL>>
+               <TELL "\"These are in pretty good shape.\"" CR>)
+              (<AND <VERB? LISTEN>
+                    ,AT-SEA>
+               <TELL-YOU-CANT "avoid it.">)>>
+
+<ROOM NW-FORE-DECK
+      (IN ROOMS)
+      (DESC "Fore Deck")
+      (FLAGS RLANDBIT ONBIT)
+      (SE TO NW-STARBOARD-DECK)
+      (EAST TO NW-STARBOARD-DECK)
+      (SW TO NW-PORT-DECK)
+      (WEST TO NW-PORT-DECK)
+      (SOUTH "There's a wall in the way.")
+      (DOWN TO NW-CREW-QTRS)
+      (GLOBAL OCEAN DECK TRAWLER RAILING IN-WINDOW LADDER-TOP)
+      (LINE 4)
+      (STATION NW-FORE-DECK)
+      (PSEUDO "BOLT" BOLT-PSEUDO "BOLTS" BOLT-PSEUDO)
+      (ACTION NW-FORE-DECK-F)>
+
+<ROUTINE NW-FORE-DECK-F (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+       <TELL-FORE-END ,TRAWLER>)>>
+
+<ROOM NW-STARBOARD-DECK
+      (IN ROOMS)
+      (DESC "Starboard Deck")
+      (FLAGS RLANDBIT ONBIT)
+      (EAST TO WHARF IF TRAWLER-DOCKED ELSE "You're out to sea now.")
+      (OUT TO WHARF IF TRAWLER-DOCKED ELSE "You're out to sea now.")
+      (NW TO NW-FORE-DECK)
+      (NORTH TO NW-FORE-DECK)
+      (SW TO NW-AFT-DECK)
+      (SOUTH TO NW-AFT-DECK)
+      (WEST "There's a bulkhead there.")
+      (GLOBAL OCEAN DECK TRAWLER RAILING IN-WINDOW)
+      (LINE 4)
+      (STATION NW-STARBOARD-DECK)
+      (ACTION NW-STARBOARD-DECK-F)>
+
+<ROUTINE NW-STARBOARD-DECK-F (RARG)
+        <COND (<EQUAL? .RARG ,M-ENTER>
+               <MOVE ,BUNK ,NW-CREW-QTRS>
+               <MOVE ,UNDER-BUNK ,NW-CREW-QTRS>
+               <MOVE ,STOVE ,NW-GALLEY>
+               ;<MOVE ,CUPBOARDS ,NW-GALLEY>
+               <MOVE ,DECK-CHAIR ,NW-FORE-DECK>
+               ;<MOVE ,REDS-LAMP ,NW-CAPT-CABIN>
+               <MOVE ,REDS-BUNK ,NW-CAPT-CABIN>
+               <MOVE ,LOUNGE-CHAIR ,NW-LOUNGE>
+               ;<MOVE ,PROW-LIGHT ,NW-FORE-DECK>
+               <COND (<IN? ,PETE ,NW-GALLEY>
+                      <MOVE ,FOOD ,STOVE>
+                      <FSET ,FOOD ,NDESCBIT>)>
+               <COND (<AND ,WATER-DELIVERED
+                           <==? ,TRAWLER ,SHIP-CHOSEN>>
+                      <MOVE ,DRINKING-WATER ,NW-GALLEY>
+                      <FSET ,DRINKING-WATER ,NDESCBIT>)>
+               <RFALSE>)
+              (<EQUAL? .RARG ,M-LOOK>
+               <TELL-FOO-SIDE ,TRAWLER "starboard" "port">
+               <RTRUE>)>>
+
+<ROOM NW-PORT-DECK
+      (IN ROOMS)
+      (DESC "Port Deck")
+      (FLAGS RLANDBIT ONBIT)
+      (LDESC 
+"You are on the port side of the Night Wind. The wheelhouse is to starboard.
+The teak deck is very well-kept. The ocean lies off to port.")
+      (NE TO NW-FORE-DECK)
+      (NORTH TO NW-FORE-DECK)
+      (SE TO NW-AFT-DECK)
+      (SOUTH TO NW-AFT-DECK)
+      (GLOBAL OCEAN DECK TRAWLER RAILING IN-WINDOW)
+      (LINE 4)
+      (STATION NW-PORT-DECK)>
+
+<ROOM NW-AFT-DECK
+      (IN ROOMS)
+      (DESC "Aft Deck")
+      (FLAGS RLANDBIT ONBIT)
+      (NE TO NW-STARBOARD-DECK)
+      (EAST TO NW-STARBOARD-DECK)
+      (NW TO NW-PORT-DECK)
+      (WEST TO NW-PORT-DECK)
+      (NORTH TO NW-WHEELHOUSE)
+      (DOWN TO NW-LOUNGE)
+      (GLOBAL OCEAN DECK TRAWLER RAILING LADDER-TOP)
+      (LINE 4)
+      (STATION NW-AFT-DECK)
+      (ACTION NW-AFT-DECK-F)>
+
+<ROUTINE NW-AFT-DECK-F (RARG)
+        <COND (<EQUAL? .RARG ,M-LOOK>
+               <TELL-AFT-DECK>
+               <CRLF>)
+              (<EQUAL? .RARG ,M-FLASH>
+               <COND (<AND <IN? ,WEASEL ,NW-AFT-DECK>
+                           ,AT-SEA
+                           <NOT ,WEASEL-APPREHENDED>
+                           <NOT <QUEUED? I-PENDULUM>>>
+                      <ENABLE <QUEUE I-PENDULUM -1>>
+                      <TELL-WEASEL-TOSSES>)>)>>
+
+<ROOM NW-WHEELHOUSE
+      (IN ROOMS)
+      (DESC "Wheelhouse")
+      (FLAGS RLANDBIT ONBIT)
+      (SOUTH TO NW-AFT-DECK)
+      (DOWN TO NW-GALLEY)
+      (GLOBAL DECK TRAWLER SALVAGER LADDER-TOP WINDOW OCEAN)
+      (LINE 4)
+      (STATION NW-AFT-DECK)
+      (PSEUDO "WHEEL" WHEEL-PSEUDO)
+      (ACTION NW-WHEELHOUSE-F)>
+
+<ROUTINE NW-WHEELHOUSE-F (RARG)
+        <COND (<EQUAL? .RARG ,M-LOOK>
+               <TELL
+"You are in the wheelhouse of the " D ,TRAWLER ". The passageway leading
+out onto the deck lies abaft.">
+               <TELL-WHEELHOUSE ,SALVAGER>
+               <RTRUE>)
+              (<==? .RARG ,M-BEG>
+               <COND (<EQUAL? ,OCEAN ,PRSO ,PRSI>
+                      <COND (<VERB? EXAMINE>
+                             <TELL
+"You see the ocean through the window." CR>)
+                            (T <TELL-YOU-CANT "from here.">)>)>)>>  
+
+;<ROOM NW-HEAD
+      (IN ROOMS)
+      (DESC "Head")
+      (FLAGS RLANDBIT ONBIT)
+      (LDESC 
+"You are in the small head on board the Night Wind. It's so small there's
+only enough room to turn around to get out aft.")
+      (SOUTH TO NW-LOCKER)
+      (GLOBAL DECK TRAWLER)
+      (LINE 4)
+      (STATION NW-LOCKER)>
+
+<ROOM NW-LOCKER
+      (IN ROOMS)
+      (DESC "Storage Locker")
+      (FLAGS RLANDBIT ONBIT)
+      ;(NORTH TO NW-HEAD)
+      (SOUTH TO NW-CREW-QTRS)
+      (GLOBAL DECK TRAWLER)
+      (LINE 4)
+      (PSEUDO "LOCKER" GLOBAL-ROOM-F)
+      (STATION NW-CREW-QTRS)
+       (ACTION NW-LOCKER-F)>
+
+<ROUTINE NW-LOCKER-F (RARG)
+ <COND (<EQUAL? .RARG ,M-LOOK>
+       <TELL
+"You are in a fairly empty storage locker. It must have been cleaned out
+after its last trawling expedition." ,SPARE-PARTS-STR CR>)>>
+
+<OBJECT DRILL
+       (IN NW-LOCKER)
+       (DESC "portable drill")
+       (SYNONYM DRILL BIT PANEL SWITCH)
+       (ADJECTIVE WATERP PORTAB ;BATTER ;OPERAT ;DRILL)
+       (FLAGS TAKEBIT CONTBIT TOOLBIT)
+       (CAPACITY 3)
+       (STATION 25) ;"metal content"
+       (CONTFCN DRILL-F)
+       (ACTION DRILL-F)>
+
+<ROUTINE TELL-SWITCH (STR)
+        <TELL "The switch is now in the \"" .STR "\" position." CR>>
+        
+<ROUTINE DRILL-F ("OPTIONAL" (RARG <>))
+        <COND (<==? .RARG ,M-CONT>
+               <COND (<AND <VERB? TAKE>
+                           <PRSO? ,BATTERY>>
+                      <COND (<ITAKE>
+                             <TELL "Taken.">
+                             <COND (,DRILL-POWERED
+                                    <SETG DRILL-POWERED <>>
+                                    <COND (,DRILL-ON
+                                           <DISABLE <INT I-DRILL>>
+                                           <TELL
+                                     " The drill bit winds to a halt.">)>)>
+                             <CRLF>)>
+                      <RTRUE>)>)
+              (<AND <VERB? LAMP-ON>
+                    <PRSO? ,DRILL>>
+               <COND (,DRILL-ON
+                      <TELL-ALREADY "on">)
+                     (,DRILL-POWERED
+                      <SETG DRILL-ON T>
+                      <ENABLE <INT I-DRILL>>
+                      <TELL "The drill bit begins to spin." CR>)
+                     (T
+                      <SETG DRILL-ON T>
+                      <TELL-SWITCH "on">)>)
+              (<AND <VERB? LAMP-OFF>
+                    <PRSO? ,DRILL>>
+               <COND (<NOT ,DRILL-ON>
+                      <TELL-ALREADY "off">)
+                     (,DRILL-POWERED
+                      <SETG DRILL-ON <>>
+                      <DISABLE <INT I-DRILL>>
+                      <TELL "The drill bit stops spinning." CR>)
+                     (T
+                      <SETG DRILL-ON <>>
+                      <TELL-SWITCH "off">)>)
+              (<VERB? EXAMINE>
+               <TELL "This waterproof wonder features a permanent bit">
+               <COND (<QUEUED? I-DRILL>
+                      <TELL " which is turning">)>
+               <TELL ", a panel which is ">
+               <COND (<FSET? ,DRILL ,OPENBIT>
+                      <TELL "open">
+                      <COND (,DRILL-POWERED
+                             <TELL " with a C battery inside">)
+                            (T <TELL ", revealing space for a C battery">)>)
+                     (T <TELL "closed">)>
+               <TELL ", and a switch which is in the \"">
+               <COND (,DRILL-ON <TELL "on">) (T <TELL "off">)>
+               <TELL "\" position." CR>)
+              (<VERB? LOOK-INSIDE>
+               <PERFORM ,V?EXAMINE ,DRILL>
+               <RTRUE>)
+              (<AND <VERB? OPEN>
+                    <IN? ,BATTERY ,DRILL>
+                    <==? <GETP ,HERE ,P?LINE> ,UNDERWATER-LINE-C>
+                    <NOT <AIRTIGHT-ROOM?>>>
+               <FSET ,BATTERY ,RMUNGBIT>
+               <SETG DRILL-POWERED <>>
+               <RFALSE>)
+              (<PRSI? ,DRILL>
+               <COND (<VERB? PUT>
+                      <COND (<NOT <FSET? ,DRILL ,OPENBIT>>
+                             <SETG P-IT-OBJECT ,DRILL>
+                             <TELL-CLOSED "panel">)
+                            (<PRSO? ,BATTERY>
+                             <MOVE ,BATTERY ,DRILL>
+                             <COND (<FSET? ,BATTERY ,RMUNGBIT>
+                                    <TELL-NOW ,BATTERY "in the drill">
+                                    <RTRUE>)>
+                             <SETG DRILL-POWERED T>
+                             <COND (,DRILL-ON
+                                    <ENABLE <INT I-DRILL>>
+                                    <TELL "The drill bit starts spinning." CR>)
+                                   (T
+                                    <TELL-NOW ,BATTERY "in the drill">)>)
+                            (T <TELL-NO-FIT>)>)
+                     (<VERB? TAKE ASK-ABOUT TELL PUT-AGAINST PUT-ON>
+                      <RFALSE>)
+                     (<AND <OR <NOT ,DRILL-ON>
+                               <NOT ,DRILL-POWERED>>
+                           <NOT <PRSO? ,GLOBAL-TIME>>>
+                      <SETG P-IT-OBJECT ,DRILL>
+                      <TELL "The " D ,DRILL " isn't running!" CR>)>)>>
+
+<GLOBAL DRILL-ON <>>
+<GLOBAL DRILL-POWERED <>>
+
+<OBJECT HOLE-1
+        (IN LOCAL-GLOBALS)
+        ;(DESC "hole")
+       (SDESC "hole you drilled")
+       (FLAGS INVISIBLE NDESCBIT)
+       (SYNONYM HOLE DRILLE)
+       (ADJECTIVE FIRST 1ST HOLE I)
+       (ACTION GENERIC-HOLE-F)>
+
+<OBJECT HOLE-2
+        (IN LOCAL-GLOBALS)
+        ;(DESC "hole")
+       (SDESC "second hole you drilled")
+        (FLAGS INVISIBLE NDESCBIT)
+       (SYNONYM HOLE DRILLE)
+       (ADJECTIVE SECOND 2ND HOLE I)
+       (ACTION GENERIC-HOLE-F)>
+
+<ROUTINE GENERIC-HOLE-F ()
+        <COND (<VERB? EXAMINE>
+               <TELL "As holes go, it's very nice." CR>)
+              (<VERB? LOOK-INSIDE>
+               <TELL "You see nothing new." CR>)
+              (<VERB? REACH-IN>
+               <TELL "It's not that big." CR>)>>
+
+<ROUTINE ADD-HOLE (OBJ "AUX" I)
+        <COND (<FSET? ,HOLE-1 ,INVISIBLE>
+               <FCLEAR ,HOLE-1 ,INVISIBLE>
+               <MOVE ,HOLE-1 .OBJ>)
+              (<FSET? ,HOLE-2 ,INVISIBLE>
+               <FCLEAR ,HOLE-2 ,INVISIBLE>
+               <PUTP ,HOLE-1 ,P?SDESC "first hole you drilled">
+               <MOVE ,HOLE-2 .OBJ>)
+              (T <TELL "The drill should be dead now." CR>)>
+         <SET I <INT I-DRILL>>
+        <PUT .I ,C-TICK <- <GET .I ,C-TICK> 1>>
+        <COND (<0? <GET .I ,C-TICK>>
+               <I-DRILL>)>
+        <RTRUE>>
+
+<ROOM NW-CREW-QTRS
+      (IN ROOMS)
+      (DESC "Crew's Quarters")
+      (FLAGS RLANDBIT ONBIT)
+      (NORTH TO NW-LOCKER)
+      (SOUTH TO NW-GALLEY)
+      (UP TO NW-FORE-DECK)
+      (GLOBAL DECK TRAWLER LADDER-BOTTOM)
+      (LINE 4)
+      (STATION NW-CREW-QTRS)
+      (PSEUDO "BUNKS" BUNKS-PSEUDO)
+      (ACTION NW-CREW-QTRS-F)>
+
+<ROUTINE TELL-CREW-QTRS ()
+       <TELL
+"You are below deck in the crew's quarters. Narrow, uncomfortable bunks
+line the bulkheads, and you note the similarity between this area and a
+sardine can. Sleeping here is necessary but uninviting. A ladder leads
+up and out to the fore deck." CR>>
+
+<ROUTINE NW-CREW-QTRS-F (RARG "AUX" W)
+        <COND (<==? .RARG ,M-LOOK>
+               <TELL-CREW-QTRS>)
+              (<==? .RARG ,M-ENTER>
+               <MOVE-SHARED-OBJECTS ,NW-CREW-QTRS>
+               <RFALSE>)
+              ;(<==? .RARG ,M-BEG>
+               <COND (<AND <NOT ,GROGGIED>
+                           ,AT-SEA
+                           <SET W <W-KLUDGE>>>
+                      <SETG GROGGIED T>
+                      <START-SENTENCE .W>
+                      <TELL " looks up groggily. ">
+                      <RFALSE>)>)>>
+
+<ROOM NW-GALLEY
+      (IN ROOMS)
+      (DESC "Galley")
+      (FLAGS RLANDBIT ONBIT)
+      ;(LDESC
+"You are in the Night Wind's tiny galley. A stove and a small
+table are all that are here. A ladder leads
+up through the deck overhead to the wheelhouse for feeding the captain
+in rough weather.")
+      (NORTH TO NW-CREW-QTRS)
+      (SOUTH TO NW-LOUNGE)
+      (UP TO NW-WHEELHOUSE)
+      (GLOBAL DECK TRAWLER LADDER-BOTTOM)
+      (LINE 4)
+      (STATION NW-GALLEY)
+      (ACTION NW-GALLEY-F)>
+
+<ROUTINE NW-GALLEY-F (RARG)
+        <GENERIC-GALLEY-F .RARG ,NW-GALLEY>>
+
+<ROOM NW-LOUNGE
+      (IN ROOMS)
+      (DESC "Lounge")
+      (FLAGS RLANDBIT ONBIT)
+      (LDESC
+"You are in the crew's lounge, a cramped cabin with little more than
+a table and a few chairs. To aft is the captain's cabin, while
+the galley lies forward. A ladder leads into the engine room.")
+      (NORTH TO NW-GALLEY)
+      (SOUTH TO NW-CAPT-CABIN)
+      (UP TO NW-AFT-DECK)
+      (DOWN TO NW-ENGINE-ROOM)
+      (GLOBAL DECK TRAWLER LADDER-BOTTOM LADDER-TOP)
+      (LINE 4)
+      (STATION NW-LOUNGE)
+      (ACTION NW-LOUNGE-F)>
+
+<ROUTINE NW-LOUNGE-F (RARG)
+        <COND (<==? .RARG ,M-ENTER>
+               <PUTP ,GLOBAL-SURFACE ,P?SDESC "table">
+               <MOVE-SHARED-OBJECTS ,NW-LOUNGE>
+               <RFALSE>)>>
+
+<ROOM NW-CAPT-CABIN
+      (IN ROOMS)
+      (DESC "Captain's Cabin")
+      (FLAGS RLANDBIT ONBIT)
+      (LDESC
+"You are in the captain's cabin. A large and
+comfortable-looking bunk is one of the many comforts in the
+cabin. The forward doorway leads to the crew's lounge.")
+      (NORTH TO NW-LOUNGE)
+      (GLOBAL DECK TRAWLER)
+      (LINE 4)
+      (STATION NW-LOUNGE)>
+
+<ROOM NW-ENGINE-ROOM
+      (IN ROOMS)
+      (DESC "Engine Room")
+      (FLAGS RLANDBIT ONBIT)
+      (UP TO NW-LOUNGE)
+      (GLOBAL DECK TRAWLER LADDER-BOTTOM)
+      (LINE 4)
+      (DESCFCN 100) ;"metal content"
+      (PSEUDO "ENGINE" ENGINE-PSEUDO)
+      (STATION NW-LOUNGE)
+      (ACTION NW-ENGINE-ROOM-F)>
+
+<ROUTINE NW-ENGINE-ROOM-F (RARG)
+        <COND (<==? .RARG ,M-LOOK>
+               <TELL
+"You are in a tiny, smelly space where it is difficult to breathe.
+By your feet lie the diesel engines of the " D ,TRAWLER "." CR>)>>
\ No newline at end of file
diff --git a/clock.zap b/clock.zap
new file mode 100644 (file)
index 0000000..d30f8c3
--- /dev/null
+++ b/clock.zap
@@ -0,0 +1,98 @@
+
+
+       .FUNCT  QUEUE,RTN,TICK,CINT
+       CALL    INT,RTN >CINT
+       PUT     CINT,C-TICK,TICK
+       RETURN  CINT
+
+
+       .FUNCT  INT,RTN,E,C,INT
+       ADD     C-TABLE,C-TABLELEN >E
+       ADD     C-TABLE,C-INTS >C
+?PRG1: EQUAL?  C,E \?ELS5
+       SUB     C-INTS,C-INTLEN >C-INTS
+       ADD     C-TABLE,C-INTS >INT
+       PUT     INT,C-RTN,RTN
+       RETURN  INT
+?ELS5: GET     C,C-RTN
+       EQUAL?  STACK,RTN \?CND3
+       RETURN  C
+?CND3: ADD     C,C-INTLEN >C
+       JUMP    ?PRG1
+
+
+       .FUNCT  ENABLED?,RTN,C,E
+       ADD     C-TABLE,C-TABLELEN >E
+       ADD     C-TABLE,C-INTS >C
+?PRG1: EQUAL?  C,E /FALSE
+       GET     C,C-RTN
+       EQUAL?  STACK,RTN \?CND3
+       GET     C,C-ENABLED?
+       ZERO?   STACK \TRUE
+       RFALSE  
+?CND3: ADD     C,C-INTLEN >C
+       JUMP    ?PRG1
+
+
+       .FUNCT  QUEUED?,RTN,C,E
+       ADD     C-TABLE,C-TABLELEN >E
+       ADD     C-TABLE,C-INTS >C
+?PRG1: EQUAL?  C,E /FALSE
+       GET     C,C-RTN
+       EQUAL?  STACK,RTN \?CND3
+       GET     C,C-ENABLED?
+       ZERO?   STACK /FALSE
+       GET     C,C-TICK
+       ZERO?   STACK \TRUE
+       RFALSE  
+?CND3: ADD     C,C-INTLEN >C
+       JUMP    ?PRG1
+
+
+       .FUNCT  CLOCKER,C,E,TICK,FLG=0,VAL
+       ZERO?   CLOCK-WAIT /?CND1
+       SET     'CLOCK-WAIT,FALSE-VALUE
+       RFALSE  
+?CND1: INC     'PRESENT-TIME
+       GRTR?   PRESENT-TIME,1439 \?CND5
+       SUB     PRESENT-TIME,1440 >PRESENT-TIME
+?CND5: ZERO?   WATCH-WOUND /?CND8
+       IGRTR?  'WATCH-MOVES,59 \?CND8
+       SUB     WATCH-MOVES,60 >WATCH-MOVES
+       IGRTR?  'WATCH-SCORE,11 \?CND12
+       SET     'WATCH-SCORE,0
+?CND12:        
+?CND8: CALL    WATCH-UPDATE
+       ADD     C-TABLE,C-INTS >C
+       ADD     C-TABLE,C-TABLELEN >E
+?PRG18:        EQUAL?  C,E \?ELS22
+       RETURN  FLG
+?ELS22:        GET     C,C-ENABLED?
+       ZERO?   STACK /?CND20
+       GET     C,C-TICK >TICK
+       ZERO?   TICK \?ELS27
+       JUMP    ?CND20
+?ELS27:        SUB     TICK,1
+       PUT     C,C-TICK,STACK
+       GRTR?   TICK,1 /?CND25
+       GET     C,C-RTN
+       CALL    STACK >VAL
+       ZERO?   VAL /?CND25
+       ZERO?   FLG /?THN38
+       EQUAL?  VAL,M-FATAL \?CND20
+?THN38:        SET     'FLG,VAL
+?CND25:        
+?CND20:        ADD     C,C-INTLEN >C
+       JUMP    ?PRG18
+
+
+       .FUNCT  WATCH-UPDATE
+       IN?     WATCH,PLAYER \?ELS5
+       SET     'MOVES,WATCH-MOVES
+       SET     'SCORE,WATCH-SCORE
+       RETURN  SCORE
+?ELS5: SET     'MOVES,99
+       SET     'SCORE,111
+       RETURN  SCORE
+
+       .ENDI
diff --git a/clock.zil b/clock.zil
new file mode 100644 (file)
index 0000000..2997bcf
--- /dev/null
+++ b/clock.zil
@@ -0,0 +1,108 @@
+"CLOCK for TOA #2
+Copyright (C) 1984 Infocom, Inc.  All rights reserved."
+
+<CONSTANT C-TABLELEN 246>
+
+<GLOBAL C-TABLE <ITABLE NONE %<COND (<GASSIGNED? PREDGEN> 123) (T 246)>>>
+
+;<GLOBAL C-DEMONS 300>
+
+<GLOBAL C-INTS 246>
+
+<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 "AUX" E C INT)
+        #DECL ((RTN) ATOM (E C INT) <PRIMTYPE VECTOR>)
+        <SET E <REST ,C-TABLE ,C-TABLELEN>>
+        <SET C <REST ,C-TABLE ,C-INTS>>
+        <REPEAT ()
+                <COND (<==? .C .E>
+                       <SETG C-INTS <- ,C-INTS ,C-INTLEN>>
+                       ;<AND .DEMON <SETG C-DEMONS <- ,C-DEMONS ,C-INTLEN>>>
+                       <SET INT <REST ,C-TABLE ,C-INTS>>
+                       <PUT .INT ,C-RTN .RTN>
+                       <RETURN .INT>)
+                      (<EQUAL? <GET .C ,C-RTN> .RTN> <RETURN .C>)>
+                <SET C <REST .C ,C-INTLEN>>>>
+
+<ROUTINE ENABLED? (RTN "AUX" C E)
+        <SET E <REST ,C-TABLE ,C-TABLELEN>>
+        <SET C <REST ,C-TABLE ,C-INTS>>
+        <REPEAT ()
+                <COND (<==? .C .E> <RFALSE>)
+                      (<EQUAL? <GET .C ,C-RTN> .RTN>
+                       <COND (<0? <GET .C ,C-ENABLED?>> <RFALSE>)
+                             (T <RTRUE>)>)>
+                <SET C <REST .C ,C-INTLEN>>>>
+
+<ROUTINE QUEUED? (RTN "AUX" C E)
+        <SET E <REST ,C-TABLE ,C-TABLELEN>>
+        <SET C <REST ,C-TABLE ,C-INTS>>
+        <REPEAT ()
+                <COND (<==? .C .E> <RFALSE>)
+                      (<EQUAL? <GET .C ,C-RTN> .RTN>
+                       <COND (<OR <0? <GET .C ,C-ENABLED?>>
+                                  <0? <GET .C ,C-TICK>>>
+                              <RFALSE>)
+                             (T <RTRUE>)>)>
+                <SET C <REST .C ,C-INTLEN>>>>
+
+<GLOBAL CLOCK-WAIT <>>
+
+<ROUTINE CLOCKER ("AUX" C E TICK (FLG <>) VAL)
+        #DECL ((C E) <PRIMTYPE VECTOR> (TICK) FIX ;(FLG) ;<OR FALSE ATOM>)
+        <COND (,CLOCK-WAIT <SETG CLOCK-WAIT <>> <RFALSE>)>
+        <SETG PRESENT-TIME <+ ,PRESENT-TIME 1>>
+        <COND (<G? ,PRESENT-TIME 1439>
+               <SETG PRESENT-TIME <- ,PRESENT-TIME 1440>>)>
+        ;<COND (<G? ,PRESENT-TIME 1019>
+               <SETG BUSINESS-HOURS? <>>)
+              (<G? ,PRESENT-TIME 539>
+               <SETG BUSINESS-HOURS? T>)>
+        <COND (,WATCH-WOUND
+               <COND (<G? <SETG WATCH-MOVES <+ ,WATCH-MOVES 1>> 59>
+                      <SETG WATCH-MOVES <- ,WATCH-MOVES 60>>
+                      <COND (<G? <SETG WATCH-SCORE <+ ,WATCH-SCORE 1>> 11>
+                             <SETG WATCH-SCORE 0>)>)>)>
+        <WATCH-UPDATE>
+        <SET C <REST ,C-TABLE ,C-INTS ;<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>>
+                                          <SET VAL <APPLY <GET .C ,C-RTN>>>>
+                                     ;<COND (,DEBUG
+                                            <TELL "[Interrupt returning T.]" CR>)>
+                                     <COND (<OR <NOT .FLG>
+                                                <==? .VAL ,M-FATAL>>
+                                            <SET FLG .VAL>)>)>)>)>
+                <SET C <REST .C ,C-INTLEN>>>>
+
+<ROUTINE WATCH-UPDATE ()
+        <COND (<IN? ,WATCH ,PLAYER>
+               <SETG MOVES ,WATCH-MOVES>
+               <SETG SCORE ,WATCH-SCORE>)
+              (T
+               <SETG MOVES 99>
+               <SETG SCORE 111>)>>
diff --git a/events.zap b/events.zap
new file mode 100644 (file)
index 0000000..2b4c12a
--- /dev/null
@@ -0,0 +1,1392 @@
+
+
+       .FUNCT  I-UNWOUND
+       SET     'WATCH-WOUND,FALSE-VALUE
+       RFALSE  
+
+
+       .FUNCT  I-BUSINESS-HOURS
+       ZERO?   BUSINESS-HOURS? /?ELS5
+       SET     'BUSINESS-HOURS?,FALSE-VALUE
+       IN?     PLAYER,MCGINTY-HQ \?ELS9
+       MOVE    PLAYER,WHARF-ROAD-2
+       SET     'HERE,WHARF-ROAD-2
+       PRINTI  """Closing time,"" says "
+       CALL    DPRINT,MCGINTY
+       PRINTI  " as he escorts you out to the street..."
+       CRLF    
+       CRLF    
+       CALL    V-FIRST-LOOK
+       RTRUE   
+?ELS9: IN?     PLAYER,OUTFITTERS-HQ \?ELS13
+       MOVE    PLAYER,WHARF-ROAD-4
+       SET     'HERE,WHARF-ROAD-4
+       PRINTI  """Sorry, but it's closing time,"" the salesman says, then shows you out..."
+       CRLF    
+       CRLF    
+       CALL    V-FIRST-LOOK
+       RTRUE   
+?ELS13:        IN?     PLAYER,BANK \FALSE
+       MOVE    PLAYER,SHORE-ROAD-2
+       SET     'HERE,SHORE-ROAD-2
+       PRINTI  "The teller says, ""You'll have to leave. It's 5:00."" A guard escorts you out..."
+       CRLF    
+       CRLF    
+       CALL    V-FIRST-LOOK
+       RTRUE   
+?ELS5: SET     'BUSINESS-HOURS?,TRUE-VALUE
+       CALL    QUEUE,I-BUSINESS-HOURS,480
+       PUT     STACK,0,1
+       RFALSE  
+
+
+       .FUNCT  I-FERRY-APPROACHING
+       CALL    QUEUE,I-FERRY-APPROACHING,-1
+       PUT     STACK,0,1
+       FCLEAR  FERRY,INVISIBLE
+       IN?     WEASEL,GLOBAL-FERRY \?CND1
+       MOVE    WEASEL,FERRY
+?CND1: EQUAL?  HERE,FERRY-LANDING,SHORE-ROAD-1,SHORE-ROAD-2 \FALSE
+       PRINTR  "The ferry approaches the landing."
+
+
+       .FUNCT  I-FERRY,WEASEL-HERE?=0
+       CALL    INT,I-FERRY-APPROACHING
+       PUT     STACK,0,0
+       CALL    QUEUE,I-FERRY-LEAVING,5
+       PUT     STACK,0,1
+       CALL    QUEUE,I-FERRY-GONE,8
+       PUT     STACK,0,1
+       MOVE    FERRY,FERRY-LANDING
+       IN?     WEASEL,FERRY-LANDING \?ELS3
+       CALL    QUEUED?,I-TRAITOR-MEETING
+       ZERO?   STACK \?ELS3
+       SET     'WEASEL-HERE?,TRUE-VALUE
+       MOVE    WEASEL,FERRY
+       JUMP    ?CND1
+?ELS3: IN?     WEASEL,FERRY \?CND1
+       MOVE    WEASEL,FERRY-LANDING
+       IN?     JOHNNY,FERRY-LANDING \?ELS10
+       ZERO?   WEASEL-BLOWN /?ELS10
+       CALL    ROUGH-JUSTICE
+       JUMP    ?CND1
+?ELS10:        EQUAL?  SHIP-CHOSEN,TRAWLER \?ELS14
+       CALL    ESTABLISH-GOAL,WEASEL,NW-CREW-QTRS
+       JUMP    ?CND1
+?ELS14:        EQUAL?  SHIP-CHOSEN,SALVAGER \?CND1
+       CALL    ESTABLISH-GOAL,WEASEL,MM-CREW-QTRS
+?CND1: EQUAL?  HERE,FERRY-LANDING \?ELS21
+       PRINTI  "The ferry arrives. Some passengers get off and others get on."
+       ZERO?   WEASEL-HERE? /?ELS26
+       CALL    TELL-FERRY-KLUDGE,STR?430
+       JUMP    ?CND24
+?ELS26:        IN?     WEASEL,FERRY-LANDING \?CND24
+       CALL    QUEUED?,I-TRAITOR-MEETING
+       ZERO?   STACK \?CND24
+       CALL    TELL-FERRY-KLUDGE,STR?431
+       IN?     ENVELOPE,PLAYER \?CND24
+       CRLF    
+       CALL    WEASEL-BEATS-YOU
+?CND24:        CRLF    
+       RTRUE   
+?ELS21:        EQUAL?  HERE,SHORE-ROAD-1,SHORE-ROAD-2 \FALSE
+       PRINTR  "The ferry arrives at the landing."
+
+
+       .FUNCT  TELL-FERRY-KLUDGE,STR
+       PRINTI  " The Weasel "
+       PRINT   STR
+       PRINTI  "."
+       RTRUE   
+
+
+       .FUNCT  I-FERRY-LEAVING
+       CALL    QUEUE,I-FERRY-LEAVING,-1
+       PUT     STACK,0,1
+       MOVE    FERRY,LOCAL-GLOBALS
+       IN?     WEASEL,FERRY \?CND1
+       IN?     PASSBOOK,WEASEL \?CND1
+       MOVE    WEASEL,LOCAL-GLOBALS
+?CND1: EQUAL?  HERE,FERRY-LANDING,SHORE-ROAD-1,SHORE-ROAD-2 \FALSE
+       PRINTR  "The ferry pulls away, heading for the mainland."
+
+
+       .FUNCT  I-FERRY-GONE
+       CALL    INT,I-FERRY-LEAVING
+       PUT     STACK,0,0
+       CALL    QUEUE,I-FERRY-APPROACHING,109
+       PUT     STACK,0,1
+       CALL    QUEUE,I-FERRY,112
+       PUT     STACK,0,1
+       FSET    FERRY,INVISIBLE
+       IN?     WEASEL,FERRY \FALSE
+       MOVE    WEASEL,GLOBAL-FERRY
+       RFALSE  
+
+
+       .FUNCT  I-DISGUSTING-WEASEL-KLUDGE,WGT
+       IN?     PASSBOOK,WEASEL /FALSE
+       GET     GOAL-TABLES,WEASEL-C >WGT
+       GET     WGT,GOAL-F
+       EQUAL?  STACK,SHANTY /FALSE
+       PUT     WGT,ATTENTION,0
+       CALL    ESTABLISH-GOAL,WEASEL,SHANTY
+       RFALSE  
+
+
+       .FUNCT  I-FIRST-MEETING
+       EQUAL?  FM-CTR,5 \?ELS5
+       CALL    INT,I-FIRST-MEETING
+       PUT     STACK,0,0
+       RFALSE  
+?ELS5: IN?     JOHNNY,SHANTY \FALSE
+       IN?     PETE,SHANTY \FALSE
+       CALL    META-LOC,PLAYER
+       EQUAL?  STACK,SHANTY \FALSE
+       ZERO?   FM-CTR \?ELS14
+       GRTR?   PRESENT-TIME,535 \?CND15
+       CALL    I-PLOT-NEVER-STARTS
+       CALL    INT,I-FIRST-MEETING
+       PUT     STACK,0,0
+       RFALSE  
+?CND15:        SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       PRINTI  """Sit down and we'll talk,"" "
+       CALL    DPRINT,JOHNNY
+       PRINTR  " says."
+?ELS14:        EQUAL?  FM-CTR,1 \?ELS21
+       IN?     WEASEL,SHANTY \?ELS26
+       SET     'FM-CTR,2
+       CALL    I-FIRST-MEETING
+       RSTACK  
+?ELS26:        ZERO?   WAITING-FOR-WEASEL /?ELS28
+       GRTR?   PRESENT-TIME,525 \FALSE
+       CALL    INT,I-FIRST-MEETING
+       PUT     STACK,0,0
+       CALL    I-PLOT-NEVER-STARTS
+       SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       PRINTI  "Pete looks at Johnny and says, ""Weasel ain't gonna show.""
+""Guess not,"" replies Johnny. ""Without "
+       CALL    DPRINT,WEASEL
+       PRINTR  ", there's no deal. Who knows what that creep is up to?"""
+?ELS28:        SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       PRINTI  "Johnny says, ""When "
+       CALL    DPRINT,WEASEL
+       PRINTI  " shows, I'll tell ya what we got."""
+       CRLF    
+       SET     'WAITING-FOR-WEASEL,TRUE-VALUE
+       RETURN  WAITING-FOR-WEASEL
+?ELS21:        GRTR?   BLOOD-ALCOHOL,10 \?ELS42
+       CALL    INT,I-FIRST-MEETING
+       PUT     STACK,0,0
+       CALL    I-PLOT-NEVER-STARTS
+       PRINTR  "Pete turns to Johnny and says, ""This joker's drunk!""
+""Yeah,"" Johnny says. He looks at you. ""Some diver! We'll find someone else."""
+?ELS42:        EQUAL?  FM-CTR,2 \?ELS46
+       SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       PRINTI  "At Pete's request, "
+       CALL    DPRINT,WEASEL
+       PRINTI  " joins you. Johnny then whispers that he's come across some sunken "
+       CALL    DPRINT,GLOBAL-TREASURE
+       PRINTI  "."
+       CRLF    
+       SET     'FM-CTR,3
+       SET     'I-WAIT-RTN,I-FIRST-MEETING
+       SET     'I-WAIT-DURATION,2
+       RETURN  I-WAIT-DURATION
+?ELS46:        EQUAL?  FM-CTR,3 \?ELS50
+       ZERO?   I-WAIT-FLAG /?ELS55
+       PRINTI  "Unfortunately, this interrupts Johnny's explanation of what the meeting is about."
+       CRLF    
+       SET     'I-WAIT-DURATION,2
+       RETURN  I-WAIT-DURATION
+?ELS55:        GRTR?   I-WAIT-DURATION,0 \?ELS60
+       EQUAL?  I-WAIT-RTN,I-FIRST-MEETING /FALSE
+?ELS60:        SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       PRINTI  "Johnny explains that they need more money to get started. They chose you because they know you've salted some money away and you're a great diver. He asks if you're interested in the deal."
+       CRLF    
+       SET     'FM-CTR,4
+       RETURN  FM-CTR
+?ELS50:        EQUAL?  FM-CTR,4 \FALSE
+       GRTR?   PRESENT-TIME,539 \?ELS73
+       EQUAL?  PRSA,V?NO,V?YES /?ELS73
+       SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       CALL    I-PLOT-NEVER-STARTS
+       PRINTR  "Pete turns to Johnny. ""We don't want anyone who can't decide.""
+""Right,"" says Johnny. ""We'll find someone else."" He turns to you. ""Say a word about this and you're history!"""
+?ELS73:        SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       PRINTR  """Well, what is it? Yes or no?"" Pete asks anxiously."
+
+
+       .FUNCT  SAMPLE-TREASURE-F
+       EQUAL?  PRSA,V?TAKE /?THN6
+       EQUAL?  PRSA,V?ASK-FOR \?ELS5
+       EQUAL?  PRSO,JOHNNY \?ELS5
+?THN6: IN?     MCGINTY,HERE \?ELS14
+       CALL    PERFORM,V?TELL,MCGINTY,SAMPLE-TREASURE
+       RTRUE   
+?ELS14:        PRINTR  "Red pulls it back. ""If we get the loot, there'll be plenty for all."""
+?ELS5: EQUAL?  PRSA,V?TURN \FALSE
+       CALL    DPRINT,JOHNNY
+       PRINTR  " has it."
+
+
+       .FUNCT  I-SECOND-MEETING
+       GRTR?   PRESENT-TIME,585 \?CND1
+       LESS?   SM-CTR,2 /?THN6
+       GRTR?   HOW-HUNGRY,3 \?CND1
+?THN6: CALL    ALL-GO-HOME
+       CALL    I-PLOT-NEVER-STARTS
+       SET     'SM-CTR,4
+?CND1: EQUAL?  SM-CTR,4 \?ELS12
+       CALL    INT,I-SECOND-MEETING
+       PUT     STACK,0,0
+       RTRUE   
+?ELS12:        EQUAL?  HERE,WINDING-ROAD-1 /?ELS14
+       CALL    INT,I-SECOND-MEETING
+       PUT     STACK,0,0
+       RTRUE   
+?ELS14:        GRTR?   SM-CTR,1 \?ELS16
+       IN?     MCGINTY,WINDING-ROAD-1 /?THN19
+       IN?     MCGINTY,WINDING-ROAD-2 \?ELS16
+?THN19:        CALL    JIGS-UP,STR?434
+       RSTACK  
+?ELS16:        LESS?   SM-CTR,2 \?ELS22
+       IN?     WEASEL,WINDING-ROAD-1 \?ELS27
+       IN?     JOHNNY,WINDING-ROAD-1 \?ELS27
+       IN?     PETE,WINDING-ROAD-1 \?ELS27
+       SET     'SM-CTR,2
+       CALL    I-SECOND-MEETING
+       RTRUE   
+?ELS27:        ZERO?   SM-CTR \FALSE
+       IN?     JOHNNY,WINDING-ROAD-1 \FALSE
+       SET     'SM-CTR,1
+       SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       PRINTR  "Johnny says, ""We'll start when everyone's here."""
+?ELS22:        GRTR?   BLOOD-ALCOHOL,10 \?ELS40
+       SET     'SM-CTR,4
+       CALL    INT,I-SECOND-MEETING
+       PUT     STACK,0,0
+       SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       CALL    ALL-GO-HOME
+       CALL    I-PLOT-NEVER-STARTS
+       PRINTI  """I won't risk everything on a drunk diver!"" "
+       CALL    DPRINT,WEASEL
+       PRINTR  " says.
+""You're right,"" says Johnny. ""We're calling this off."""
+?ELS40:        EQUAL?  SM-CTR,2 \?ELS44
+       RANDOM  2 >WRECK-FOUND
+       EQUAL?  WRECK-FOUND,1 \?ELS47
+       SET     'SAMPLE-TREASURE,GOLD-COIN
+       JUMP    ?CND45
+?ELS47:        SET     'SAMPLE-TREASURE,DINNER-PLATE
+?CND45:        PUTP    SAMPLE-TREASURE,P?ACTION,SAMPLE-TREASURE-F
+       MOVE    SAMPLE-TREASURE,JOHNNY
+       SET     'P-IT-OBJECT,SAMPLE-TREASURE
+       SET     'SM-CTR,3
+       SET     'I-WAIT-DURATION,6
+       SET     'I-WAIT-RTN,I-SECOND-MEETING
+       SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       PRINTI  "Johnny nods, then pulls out "
+       CALL    APRINT,SAMPLE-TREASURE
+       PRINTR  " he says he came across while on a shark hunt."
+?ELS44:        EQUAL?  SM-CTR,3 \FALSE
+       ZERO?   I-WAIT-FLAG /?ELS58
+       PRINTI  "This interrupts Johnny's explanation, which makes him angry."
+       CRLF    
+       SET     'I-WAIT-DURATION,6
+       RETURN  I-WAIT-DURATION
+?ELS58:        GRTR?   I-WAIT-DURATION,0 \?ELS63
+       EQUAL?  I-WAIT-RTN,I-SECOND-MEETING /FALSE
+?ELS63:        CALL    INT,I-SECOND-MEETING
+       PUT     STACK,0,0
+       SUB     705,PRESENT-TIME
+       CALL    QUEUE,I-OTHERS-MEET,STACK
+       PUT     STACK,0,1
+       SET     'SM-CTR,4
+       SET     'MEETINGS-COMPLETED,2
+       PUT     MOVEMENT-GOALS,JOHNNY-C,JOHNNY-CONTINUES-TABLE
+       CALL    IMOVEMENT,JOHNNY,I-JOHNNY
+       CALL    RATING-UPD,20
+       SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       CRLF    
+       PRINTI  """We're not sure which wreck to salvage,"" Johnny says. ""Since you're joining up, we're hoping you'll identify where the "
+       CALL    DPRINT,SAMPLE-TREASURE
+       PRINTI  " came from, and then do the dive for us. I'll captain, Pete will cook, and "
+       CALL    DPRINT,WEASEL
+       PRINTI  " will crew.
+
+Johnny winks at you. ""We'll need you to supply the minutes of longitude and latitude of the wreck. Get $500 and meet me at Point Lookout at 10:45. Then we'll provision the boat.""
+
+He turns to the others. ""We'll meet in "
+       CALL    DPRINT,SHANTY
+       PRINTR  " at 11:45 to discuss final arrangements.
+
+""We're all in this now,"" Johnny says to the group. ""I'm not gonna chance this operation if one of you doesn't show. We need everyone to pull this off. If anyone tries anything stupid, you won't live to regret it."""
+
+
+       .FUNCT  I-THIRD-MEETING,JMG
+       EQUAL?  HERE,POINT-LOOKOUT /?ELS3
+       CALL    INT,I-THIRD-MEETING
+       PUT     STACK,0,0
+       RFALSE  
+?ELS3: IN?     JOHNNY,POINT-LOOKOUT \FALSE
+       LESS?   TM-CTR,6 \?CND1
+       INC     'TM-CTR
+?CND1: IN?     MCGINTY,POINT-LOOKOUT \?ELS15
+       CALL    JIGS-UP,STR?435
+       RSTACK  
+?ELS15:        IN?     MCGINTY,OCEAN-ROAD-3 \?ELS17
+       CALL    IN-MOTION?,MCGINTY
+       ZERO?   STACK \?ELS17
+       CALL    JIGS-UP,STR?436
+       RSTACK  
+?ELS17:        EQUAL?  TM-CTR,1 \?ELS21
+       SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       PRINTR  "Johnny turns toward you. ""Well? Did you bring the money?"""
+?ELS21:        GRTR?   BLOOD-ALCOHOL,10 \?ELS25
+       CALL    JIGS-UP,STR?437
+       RSTACK  
+?ELS25:        EQUAL?  TM-CTR,4 \?ELS27
+       PRINTR  "Johnny glares at you as if you were a sea slug."
+?ELS27:        EQUAL?  TM-CTR,5 \?ELS31
+       CALL    JIGS-UP,STR?438
+       RSTACK  
+?ELS31:        EQUAL?  TM-CTR,6 \?ELS33
+       SET     'TM-CTR,7
+       CALL    RATING-UPD,20
+       SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       CRLF    
+       PRINTI  """Glad you're with us. Since you're okay, I'll level with you. Before Hevlin died, he told me he gave you the book. He also said you could handle this job. He's the one who gave me the "
+       CALL    DPRINT,SAMPLE-TREASURE
+       PRINTI  ". I didn't want to say anything in front of Pete and "
+       CALL    DPRINT,WEASEL
+       PRINTI  " just in case.
+
+""We're gonna need a boat, but I don't know which one. If you need deep-sea diving gear, it'll have to be the "
+       CALL    DPRINT,SALVAGER
+       PRINTI  ". Is the "
+       CALL    DPRINT,GLOBAL-TREASURE
+       PRINTR  " more than 200 feet deep?"""
+?ELS33:        EQUAL?  TM-CTR,7 \?ELS37
+       GRTR?   PRESENT-TIME,675 \?CND38
+       CALL    JIGS-UP,STR?439
+?CND38:        SET     'QCONTEXT,JOHNNY
+       SET     'QCONTEXT-ROOM,HERE
+       PRINTR  "Johnny looks impatient. ""Don't confuse things. A yes or no will do."""
+?ELS37:        EQUAL?  TM-CTR,8 \FALSE
+       CALL    ESTABLISH-GOAL,JOHNNY,OUTFITTERS-HQ
+       PUT     MOVEMENT-GOALS,JOHNNY-C,JOHNNY-COMPLETES-TABLE
+       GET     MOVEMENT-GOALS,JOHNNY-C >JMG
+       SUB     838,PRESENT-TIME
+       PUT     JMG,MG-TIME,STACK
+       CALL    IMOVEMENT,JOHNNY,I-JOHNNY
+       CALL    INT,I-THIRD-MEETING
+       PUT     STACK,0,0
+       SET     'MEETINGS-COMPLETED,3
+       PRINTI  """We'll rent the "
+       CALL    DPRINT,SHIP-CHOSEN
+       PRINTR  ". Let's go get what we need."""
+
+
+       .FUNCT  I-EQUIP,MCG-GT,V=0
+       IN?     PLAYER,OUTFITTERS-HQ \?ELS5
+       IN?     MCGINTY,OUTFITTERS-HQ \?ELS10
+       INC     'WARNING-CTR
+       EQUAL?  WARNING-CTR,7 \?CND11
+       PRINTI  "Johnny leans over and whispers, ""Let's wait out McGinty. He should leave soon."""
+       CRLF    
+       SET     'V,TRUE-VALUE
+?CND11:        GRTR?   I-WAIT-DURATION,0 \?ELS20
+       SET     'I-WAIT-DURATION,0
+       SET     'I-WAIT-RTN,FALSE-VALUE
+       PRINTI  "Johnny ends his conversation, and "
+       CALL    DPRINT,MCGINTY
+       PRINTR  " asks the salesman some questions."
+?ELS20:        GET     GOAL-TABLES,MCGINTY-C >MCG-GT
+       GET     MCG-GT,GOAL-ENABLE
+       ZERO?   STACK /?ELS24
+       GET     MCG-GT,GOAL-F
+       EQUAL?  STACK,MCGINTY-HQ \?ELS24
+       ZERO?   MCGINTY-KNOWS \?CND27
+       SET     'MCGINTY-MEETS-WEASEL,TRUE-VALUE
+?CND27:        SET     'I-WAIT-DURATION,9
+       SET     'I-WAIT-RTN,I-EQUIP
+       RFALSE  
+?ELS24:        EQUAL?  PRSA,V?RENT,V?BUY \?ELS31
+       EQUAL?  PRSO,FERRY-TOKEN /?ELS31
+       SET     'MCGINTY-KNOWS,TRUE-VALUE
+       CALL    INT,I-MCGINTY-FOLLOWS
+       PUT     STACK,0,0
+       CALL    INT,I-EQUIP
+       PUT     STACK,0,0
+       MOVE    MCGINTY,WHARF-ROAD-4
+       CALL    ESTABLISH-GOAL,MCGINTY,MCGINTY-HQ
+       CALL    DPRINT,MCGINTY
+       PRINTI  " grins as he realizes what you're up to."
+       CALL    SAY-MCGINTY-KNOWS
+       RSTACK  
+?ELS31:        GRTR?   PRESENT-TIME,699 \?ELS37
+       IN?     JOHNNY,OUTFITTERS-HQ \?ELS42
+       CALL    ESTABLISH-GOAL,JOHNNY,SHANTY
+       PRINTI  "Johnny glares at "
+       CALL    DPRINT,MCGINTY
+       PRINTR  " and then at his watch. ""There's no way."" He turns to you. ""Forget it. We can't get this done in time."""
+?ELS42:        CALL    INT,I-MCGINTY-FOLLOWS
+       PUT     STACK,0,0
+       CALL    ESTABLISH-GOAL,MCGINTY,MCGINTY-HQ
+       CALL    INT,I-EQUIP
+       PUT     STACK,0,0
+       CALL    DPRINT,MCGINTY
+       PRINTR  " turns to the salesman. ""I think... yeah! I will need that boat after all."" He turns to you and grins."
+?ELS37:        EQUAL?  PRSA,V?WAIT-FOR,V?WAIT /?ELS50
+       EQUAL?  PRSA,V?WALK,V?LOOK /?ELS50
+       PRINTI  "Johnny glances nervously at "
+       CALL    DPRINT,MCGINTY
+       PRINTR  "."
+?ELS50:        RETURN  V
+?ELS10:        ZERO?   MCGINTY-KNOWS /?ELS58
+       CALL    INT,I-EQUIP
+       PUT     STACK,0,0
+       RFALSE  
+?ELS58:        ZERO?   I-WAIT-FLAG /?ELS61
+       PRINTI  "Johnny seems unhappy to have his conversation interrupted."
+       CRLF    
+       SET     'I-WAIT-DURATION,9
+       RETURN  I-WAIT-DURATION
+?ELS61:        EQUAL?  I-WAIT-RTN,I-EQUIP \?ELS66
+       GRTR?   I-WAIT-DURATION,0 /FALSE
+       CALL    ESTABLISH-GOAL,JOHNNY,SHANTY
+       SUB     870,PRESENT-TIME
+       CALL    QUEUE,I-SHOVE-OFF,STACK
+       PUT     STACK,0,1
+       CALL    INT,I-EQUIP
+       PUT     STACK,0,0
+       EQUAL?  SHIP-CHOSEN,TRAWLER \?ELS76
+       RANDOM  50
+       ADD     50,STACK >AMT-OWED
+       JUMP    ?CND74
+?ELS76:        RANDOM  50
+       ADD     400,STACK >AMT-OWED
+?CND74:        SET     'JOHNNY-MADE-DEAL,TRUE-VALUE
+       CALL    RATING-UPD,20
+       PRINTI  "Johnny hands him a list and the salesman quotes a price. Johnny gives him the money he has, then says to you, ""You'll need to chip in $"
+       PRINTN  AMT-OWED
+       PRINTI  " plus the money for your stuff. We'll leave on the "
+       CALL    DPRINT,SHIP-CHOSEN
+       PRINTI  " at high tide.""
+
+He tells the "
+       CALL    DPRINT,SPEAR-CARRIER
+       PRINTR  ", ""Deliver the stuff half an hour before high tide."" He turns back to you. ""Better be on board then to watch the stuff."""
+?ELS66:        IN?     MCGINTY,WHARF-ROAD-4 /FALSE
+       SET     'I-WAIT-DURATION,9
+       SET     'I-WAIT-RTN,I-EQUIP
+       RFALSE  
+?ELS5: SET     'I-WAIT-DURATION,0
+       CALL    INT,I-EQUIP
+       GET     STACK,C-TICK
+       LESS?   STACK,-15 \FALSE
+       CALL    INT,I-EQUIP
+       PUT     STACK,0,0
+       IN?     JOHNNY,OUTFITTERS-HQ \?CND90
+       CALL    ESTABLISH-GOAL,JOHNNY,SHANTY
+?CND90:        CALL    I-PLOT-NEVER-STARTS
+       RFALSE  
+
+
+       .FUNCT  TELL-NEED-BOAT
+       PRINTR  " ""We will need that boat after all,"" he says to the salesman as he leaves."
+
+
+       .FUNCT  SAY-MCGINTY-KNOWS
+       CALL    TELL-NEED-BOAT
+       MOVE    JOHNNY,WHARF-ROAD-3
+       CALL    ZERO-ATTENTION,JOHNNY
+       CALL    ESTABLISH-GOAL,JOHNNY,SHANTY
+       CRLF    
+       PRINTR  "Johnny glares at you. ""That was stupid! Now he's stopped us from renting the boat we need."" He storms out. You can't help feeling fortunate that someone else happened to be here."
+
+
+       .FUNCT  I-OTHERS-MEET,V=1
+       GRTR?   PRESENT-TIME,720 \?ELS3
+       CALL    INT,I-OTHERS-MEET
+       PUT     STACK,0,0
+       CALL    I-PLOT-NEVER-STARTS
+       IN?     PLAYER,CHAIR \?ELS6
+       PRINTI  "Johnny tells Pete the deal's off."
+       CRLF    
+       RETURN  V
+?ELS6: IN?     PLAYER,SHANTY \?ELS10
+       PRINTI  "Johnny says something to Pete."
+       CRLF    
+       RETURN  V
+?ELS10:        SET     'V,FALSE-VALUE
+       RETURN  V
+?ELS3: IN?     JOHNNY,SHANTY \?THN17
+       IN?     PETE,SHANTY \?THN17
+       IN?     WEASEL,SHANTY /?ELS16
+?THN17:        CALL    QUEUE,I-OTHERS-MEET,1
+       PUT     STACK,0,1
+       RFALSE  
+?ELS16:        ZERO?   JOHNNY-MADE-DEAL \?CND1
+       CALL    I-PLOT-NEVER-STARTS
+?CND1: IN?     PLAYER,CHAIR \?ELS25
+       PRINTI  "Johnny tells Pete and "
+       CALL    DPRINT,WEASEL
+       PRINTI  " the deal's "
+       ZERO?   JOHNNY-MADE-DEAL /?ELS30
+       PRINTI  "on and to be at the "
+       CALL    DPRINT,SHIP-CHOSEN
+       PRINTI  " at 2:30"
+       JUMP    ?CND28
+?ELS30:        PRINTI  "off"
+?CND28:        PRINTR  "."
+?ELS25:        IN?     PLAYER,SHANTY \FALSE
+       PRINTI  "Johnny, Pete, and "
+       CALL    DPRINT,WEASEL
+       PRINTR  " are talking at a corner table."
+
+
+       .FUNCT  I-TRAITOR-MEETING,FERRY-HERE=0
+       IN?     WEASEL,FERRY /?THN6
+       ZERO?   MCGINTY-KNOWS \?THN6
+       IN?     MCGINTY,FERRY-LANDING /?ELS5
+?THN6: CALL    INT,I-TRAITOR-MEETING
+       PUT     STACK,0,0
+       RFALSE  
+?ELS5: IN?     WEASEL,FERRY-LANDING \FALSE
+       IN?     ID-CARD,WEASEL \?ELS11
+       IN?     PASSBOOK,WEASEL \?ELS16
+       IN?     FERRY,FERRY-LANDING \?CND17
+       MOVE    WEASEL,FERRY
+       SET     'FERRY-HERE,TRUE-VALUE
+?CND17:        CALL    INT,I-TRAITOR-MEETING
+       PUT     STACK,0,0
+       IN?     PLAYER,FERRY-LANDING \FALSE
+       CALL    TELL-CORNER,FERRY-HERE,STR?440
+       RSTACK  
+?ELS16:        MOVE    ID-CARD,MCGINTY
+       IN?     FERRY,FERRY-LANDING \?CND27
+       MOVE    WEASEL,FERRY
+       SET     'FERRY-HERE,TRUE-VALUE
+?CND27:        CALL    INT,I-TRAITOR-MEETING
+       PUT     STACK,0,0
+       IN?     PLAYER,FERRY-LANDING \FALSE
+       CALL    TELL-CORNER,FERRY-HERE,STR?441
+       RSTACK  
+?ELS11:        MOVE    ID-CARD,WEASEL
+       SET     'MCGINTY-MEETS-WEASEL,FALSE-VALUE
+       IN?     PLAYER,FERRY-LANDING \FALSE
+       CALL    DPRINT,MCGINTY
+       PRINTI  " takes "
+       CALL    DPRINT,WEASEL
+       PRINTR  " to a corner of the landing, where they talk."
+
+
+       .FUNCT  TELL-CORNER,FERRY-HERE,STR
+       CALL    DPRINT,MCGINTY
+       PRINTI  " and "
+       CALL    DPRINT,WEASEL
+       PRINTI  " are talking in a corner. The Weasel "
+       PRINT   STR
+       PRINTI  " and "
+       ZERO?   FERRY-HERE /?ELS5
+       PRINTI  "then boards the ferry"
+       JUMP    ?CND3
+?ELS5: PRINTI  "they separate"
+?CND3: PRINTR  "."
+
+
+       .FUNCT  I-SHOVE-OFF,L,?TMP1
+       CALL    ENABLED?,I-JOHNNY
+       ZERO?   STACK /FALSE
+       CALL    META-LOC,PLAYER
+       GETP    STACK,P?LINE >?TMP1
+       GETP    SHIP-CHOSEN,P?LINE
+       EQUAL?  ?TMP1,STACK \?ELS7
+       GRTR?   PRESENT-TIME,930 \?ELS10
+       ZERO?   LATITUDE-SET \?ELS10
+       ZERO?   LONGITUDE-SET \?ELS10
+       CALL    ALL-GO-HOME
+       RFALSE  
+?ELS10:        CALL    META-LOC,PLAYER
+       IN?     JOHNNY,STACK \?ELS14
+       CALL    DPRINT,JOHNNY
+       PRINTI  " turns to"
+       JUMP    ?CND8
+?ELS14:        LOC     JOHNNY >L
+       CALL    META-LOC,PLAYER
+       MOVE    JOHNNY,STACK
+       CALL    ESTABLISH-GOAL,JOHNNY,L
+       CALL    DPRINT,JOHNNY
+       PRINTI  " walks up behind"
+?CND8: PRINTI  " you and says, """
+       ZERO?   DELIVERY-MADE \?ELS25
+       PRINTI  "We're gonna have to forget it. Outfitters never delivered the stuff."
+       CRLF    
+       CALL    ALL-GO-HOME
+       RTRUE   
+?ELS25:        EQUAL?  0,LATITUDE-SET,LONGITUDE-SET \?ELS29
+       PRINTI  "If we're gonna go, you have to tell me the minutes of "
+       ZERO?   LATITUDE-SET \?CND32
+       PRINTI  "latitude"
+       ZERO?   LONGITUDE-SET \?CND32
+       PRINTI  " and "
+?CND32:        ZERO?   LONGITUDE-SET \?CND42
+       PRINTI  "longitude"
+?CND42:        PRINTI  "."""
+       CRLF    
+       CALL    GRAB-ATTENTION,JOHNNY
+       RANDOM  10
+       ADD     30,STACK
+       CALL    QUEUE,I-SHOVE-OFF,STACK
+       PUT     STACK,0,1
+       RTRUE   
+?ELS29:        PRINTI  "We'll be leaving shortly. Get some sleep."""
+       CRLF    
+?CND23:        EQUAL?  SHIP-CHOSEN,SALVAGER \?ELS55
+       CALL    ESTABLISH-GOAL,JOHNNY,MM-WHEELHOUSE
+       JUMP    ?CND53
+?ELS55:        CALL    ESTABLISH-GOAL,JOHNNY,NW-WHEELHOUSE
+?CND53:        LOC     WEASEL
+       EQUAL?  STACK,FERRY,GLOBAL-FERRY,LOCAL-GLOBALS /?CND58
+       LOC     DECK-CHAIR
+       CALL    ESTABLISH-GOAL,WEASEL,STACK
+?CND58:        ZERO?   AMT-OWED \FALSE
+       CALL    QUEUE,I-BOAT-TRIP,10
+       PUT     STACK,0,1
+       RFALSE  
+?ELS7: GRTR?   PRESENT-TIME,900 \?ELS67
+       CALL    ALL-GO-HOME
+       RFALSE  
+?ELS67:        RANDOM  10
+       ADD     30,STACK
+       CALL    QUEUE,I-SHOVE-OFF,STACK
+       PUT     STACK,0,1
+       RFALSE  
+
+
+       .FUNCT  ALL-GO-HOME
+       CALL    ESTABLISH-GOAL,PETE,SHANTY
+       IN?     WEASEL,FERRY /?CND1
+       IN?     WEASEL,GLOBAL-FERRY /?CND1
+       IN?     WEASEL,LOCAL-GLOBALS /?CND1
+       CALL    ESTABLISH-GOAL,WEASEL,SHANTY
+?CND1: SET     'JOHNNY-SILENT,TRUE-VALUE
+       CALL    ESTABLISH-GOAL,JOHNNY,SHANTY
+       RSTACK  
+
+
+       .FUNCT  I-BOAT-TRIP,BOAT,OT,EXCESS,?TMP1
+       ZERO?   ASLEEP \FALSE
+       CALL    META-LOC,PLAYER
+       GETP    STACK,P?LINE >?TMP1
+       GETP    SHIP-CHOSEN,P?LINE >BOAT
+       EQUAL?  ?TMP1,BOAT \FALSE
+       LOC     WEASEL
+       GETP    STACK,P?LINE
+       EQUAL?  STACK,BOAT /?ELS11
+       CALL    TELL-COMES-UP,JOHNNY
+       PRINTI  """The Weasel's not on board. The deal's off."""
+       CRLF    
+       CALL    FINISH
+       JUMP    ?CND9
+?ELS11:        LOC     MCGINTY
+       GETP    STACK,P?LINE
+       EQUAL?  STACK,BOAT \?ELS15
+       CALL    TELL-COMES-UP,WEASEL
+       CALL    JIGS-UP,STR?442
+       JUMP    ?CND9
+?ELS15:        IN?     ENVELOPE,JOHNNY \?CND9
+       LOC     WEASEL
+       MOVE    JOHNNY,STACK
+       CALL    ROUGH-JUSTICE
+?CND9: CALL    INT,I-MCGINTY-FOLLOWS
+       PUT     STACK,0,0
+       SET     'SOUPS-ON,TRUE-VALUE
+       CALL    RATING-UPD,20
+       EQUAL?  LATITUDE-SET,20 \?CND18
+       EQUAL?  LONGITUDE-SET,25 \?CND18
+       CALL    TELL-COMES-UP,JOHNNY
+       CALL    JIGS-UP,STR?443
+?CND18:        CALL    META-LOC,PLAYER
+       EQUAL?  STACK,MM-GALLEY,NW-GALLEY \?CND23
+       PRINTI  "Pete announces that the stew is ready."
+       CRLF    
+?CND23:        EQUAL?  SHIP-CHOSEN,TRAWLER \?ELS30
+       SET     'TRAWLER-DOCKED,FALSE-VALUE
+       JUMP    ?CND28
+?ELS30:        SET     'SALVAGER-DOCKED,FALSE-VALUE
+?CND28:        SET     'AT-SEA,TRUE-VALUE
+       IN?     PLAYER,DECK-CHAIR \?CND33
+       LOC     DECK-CHAIR
+       MOVE    PLAYER,STACK
+?CND33:        LOC     PLAYER
+       CALL    GLOBAL-IN?,RAILING,STACK
+       ZERO?   STACK /?ELS38
+       PRINTI  "As the engines roar to life, you go to the "
+       CALL    DPRINT,RAILING
+       PRINTI  " to watch the shoreline recede."
+       LOC     PLAYER
+       IN?     DECK-CHAIR,STACK \?CND41
+       CALL    TELL-FERRY-KLUDGE,STR?444
+?CND41:        PRINTI  " As the boat leaves the wharf, y"
+       JUMP    ?CND36
+?ELS38:        PRINTI  "The boat begins to move through the waves. Y"
+?CND36:        PRINTI  "ou feel the thrill of being out to sea once again."
+       CRLF    
+       CRLF    
+       IN?     PLAYER,BUNK /?CND52
+       PRINTI  "You "
+       LOC     BUNK
+       IN?     PLAYER,STACK /?CND57
+       LOC     BUNK >HERE
+       CALL    MOVE-SHARED-OBJECTS,HERE
+       IN?     AIR-HOSE,DEEP-SUIT \?CND60
+       MOVE    AIR-HOSE,MM-COMPRESSOR
+       PRINTI  "disconnect the "
+       CALL    DPRINT,AIR-HOSE
+       PRINTI  ", "
+?CND60:        PRINTI  "go to the crew's quarters and "
+?CND57:        MOVE    PLAYER,BUNK
+       PRINTI  "climb into your bunk"
+       CALL    STRIP-EQUIPMENT
+       PRINTI  ". "
+       CRLF    
+?CND52:        PRINTI  "In no time, the rhythm of the ocean lulls you to sleep..."
+       CRLF    
+       CRLF    
+       MOVE    PETE,DECK-CHAIR
+       MOVE    JOHNNY,HERE
+       EQUAL?  SHIP-CHOSEN,SALVAGER \?ELS75
+       MOVE    WEASEL,MM-AFT-DECK
+       JUMP    ?CND73
+?ELS75:        MOVE    WEASEL,NW-AFT-DECK
+?CND73:        CALL    META-LOC,ENVELOPE
+       GETP    STACK,P?LINE
+       EQUAL?  STACK,BOAT \?CND78
+       IN?     ENVELOPE,UNDER-BUNK /?CND78
+       MOVE    ENVELOPE,WEASEL
+?CND78:        SET     'OT,PRESENT-TIME
+       RANDOM  15
+       ADD     345,STACK >PRESENT-TIME
+       ADD     PRESENT-TIME,1440
+       SUB     STACK,OT >EXCESS
+       CALL    INTERRUPT-CHECK,EXCESS
+       ZERO?   WATCH-WOUND /?CND83
+       MOD     EXCESS,60
+       ADD     WATCH-MOVES,STACK >WATCH-MOVES
+       GRTR?   WATCH-MOVES,59 \?CND87
+       SUB     WATCH-MOVES,60 >WATCH-MOVES
+       INC     'WATCH-SCORE
+?CND87:        DIV     EXCESS,60
+       ADD     WATCH-SCORE,STACK >WATCH-SCORE
+?PRG90:        GRTR?   WATCH-SCORE,11 \?REP91
+       SUB     WATCH-SCORE,12 >WATCH-SCORE
+       JUMP    ?PRG90
+?REP91:        
+?CND83:        CALL    WATCH-UPDATE
+       EQUAL?  LATITUDE-SET,40 \?ELS99
+       EQUAL?  LONGITUDE-SET,45 \?ELS99
+       SET     'WRECK-CHOSEN,1
+       SET     'OCEAN-BOTTOM,400
+       JUMP    ?CND97
+?ELS99:        EQUAL?  LATITUDE-SET,25 \?ELS103
+       EQUAL?  LONGITUDE-SET,25 \?ELS103
+       SET     'WRECK-CHOSEN,2
+       SET     'OCEAN-BOTTOM,150
+       JUMP    ?CND97
+?ELS103:       EQUAL?  LATITUDE-SET,15 \?ELS107
+       EQUAL?  LONGITUDE-SET,50 \?ELS107
+       SET     'WRECK-CHOSEN,3
+       SET     'OCEAN-BOTTOM,350
+       JUMP    ?CND97
+?ELS107:       CALL    OCEAN-BOTTOM-FCN >OCEAN-BOTTOM
+       ZERO?   OCEAN-BOTTOM \?CND97
+       CALL    JIGS-UP,STR?445
+?CND97:        SET     'HOW-TIRED,1
+       LESS?   HOW-HUNGRY,2 \?CND112
+       SET     'HOW-HUNGRY,1
+?CND112:       LESS?   HOW-THIRSTY,2 \?CND115
+       SET     'HOW-THIRSTY,1
+?CND115:       CALL    QUEUE,I-HUNGER,10
+       PUT     STACK,0,1
+       CALL    QUEUE,I-THIRST,15
+       PUT     STACK,0,1
+       CALL    QUEUE,I-TIRED,869
+       PUT     STACK,0,1
+       SUB     720,PRESENT-TIME
+       CALL    QUEUE,I-ENDIT,STACK
+       PUT     STACK,0,1
+       CALL    DPRINT,JOHNNY
+       PRINTI  " shakes your shoulder and wakes you. "
+       EQUAL?  SHIP-CHOSEN,TRAWLER \?ELS122
+       CALL    ESTABLISH-GOAL,JOHNNY,NW-CAPT-CABIN
+       JUMP    ?CND120
+?ELS122:       CALL    ESTABLISH-GOAL,JOHNNY,MM-CAPT-CABIN
+?CND120:       CALL    INT,I-BOAT-TRIP
+       PUT     STACK,0,0
+       PRINTR  """We've arrived. You're up as soon as you're ready."""
+
+
+       .FUNCT  STRIP-EQUIPMENT,F,N,V=0
+       FIRST?  PLAYER >F /?KLU17
+?KLU17:        
+?PRG1: ZERO?   F \?CND3
+       JUMP    ?REP2
+?CND3: NEXT?   F >N /?KLU18
+?KLU18:        EQUAL?  F,WATCH /?CND6
+       LOC     BUNK
+       MOVE    F,STACK
+       FCLEAR  F,WORNBIT
+       SET     'V,TRUE-VALUE
+?CND6: SET     'F,N
+       JUMP    ?PRG1
+?REP2: ZERO?   V /FALSE
+       PRINTI  ", dropping your equipment"
+       RTRUE   
+
+
+       .FUNCT  INTERRUPT-CHECK,DUR,C,E,TICK,FOO,R
+       ADD     C-TABLE,C-INTS >C
+       ADD     C-TABLE,C-TABLELEN >E
+       SET     'ASLEEP,TRUE-VALUE
+?PRG1: EQUAL?  C,E \?ELS5
+       JUMP    ?REP2
+?ELS5: GET     C,C-ENABLED?
+       ZERO?   STACK /?CND3
+       GET     C,C-TICK >TICK
+       ZERO?   TICK \?ELS10
+       JUMP    ?CND3
+?ELS10:        SUB     TICK,DUR >FOO
+       LESS?   FOO,2 \?ELS15
+       GET     C,C-RTN
+       CALL    STACK
+       SUB     TICK,1
+       PUT     C,C-TICK,STACK
+       JUMP    ?CND8
+?ELS15:        PUT     C,C-TICK,FOO
+?CND8: 
+?CND3: ADD     C,C-INTLEN >C
+       JUMP    ?PRG1
+?REP2: SET     'ASLEEP,FALSE-VALUE
+       RETURN  ASLEEP
+
+
+       .FUNCT  LE?,LAT,LON,CNST,?TMP1
+       MUL     LAT,LATITUDE-SET >?TMP1
+       MUL     LON,LONGITUDE-SET
+       ADD     ?TMP1,STACK
+       GRTR?   STACK,CNST /FALSE
+       RTRUE   
+
+
+       .FUNCT  GE?,LAT,LON,CNST,?TMP1
+       MUL     LAT,LATITUDE-SET >?TMP1
+       MUL     LON,LONGITUDE-SET
+       ADD     ?TMP1,STACK
+       LESS?   STACK,CNST /FALSE
+       RTRUE   
+
+
+       .FUNCT  OCEAN-BOTTOM-FCN
+       LESS?   LONGITUDE-SET,5 /?THN6
+       GRTR?   LONGITUDE-SET,55 /?THN6
+       LESS?   LATITUDE-SET,5 /?THN6
+       GRTR?   LATITUDE-SET,45 \?ELS5
+?THN6: CALL    JIGS-UP,STR?446
+       RSTACK  
+?ELS5: GRTR?   LATITUDE-SET,17 /?ELS9
+       CALL    LE?,2,-5,-11
+       ZERO?   STACK /?ELS9
+       CALL    LE?,1,1,30
+       ZERO?   STACK \FALSE
+?ELS9: GRTR?   LATITUDE-SET,6 /?ELS13
+       GRTR?   LONGITUDE-SET,36 /?ELS13
+       LESS?   LONGITUDE-SET,34 \FALSE
+?ELS13:        GRTR?   LONGITUDE-SET,34 /?ELS17
+       GRTR?   LATITUDE-SET,7 /?ELS17
+       CALL    LE?,1,-1,-26
+       ZERO?   STACK \FALSE
+?ELS17:        CALL    GE?,2,1,115
+       ZERO?   STACK /?ELS21
+       RETURN  400
+?ELS21:        CALL    GE?,1,1,68
+       ZERO?   STACK /?ELS23
+       CALL    LE?,1,-2,-91
+       ZERO?   STACK /?ELS23
+       RETURN  400
+?ELS23:        LESS?   LATITUDE-SET,40 \?THN32
+       CALL    GE?,15,4,680
+       ZERO?   STACK \?THN32
+       CALL    GE?,2,1,107
+       ZERO?   STACK \?THN32
+       CALL    GE?,1,1,76
+       ZERO?   STACK \?THN32
+       LESS?   LONGITUDE-SET,44 /?ELS27
+       CALL    GE?,2,1,70
+       ZERO?   STACK /?ELS27
+       LESS?   LONGITUDE-SET,52 \?THN32
+       CALL    LE?,5,-3,-57
+       ZERO?   STACK \?THN32
+       CALL    LE?,1,-1,-31
+       ZERO?   STACK /?ELS27
+?THN32:        RETURN  350
+?ELS27:        GRTR?   LATITUDE-SET,37 /?THN40
+       CALL    GE?,6,1,240
+       ZERO?   STACK \?THN40
+       CALL    GE?,13,6,635
+       ZERO?   STACK \?THN40
+       CALL    GE?,1,1,72
+       ZERO?   STACK \?THN40
+       LESS?   LONGITUDE-SET,41 /?ELS35
+       CALL    GE?,13,8,497
+       ZERO?   STACK /?ELS35
+       LESS?   LONGITUDE-SET,49 \?THN40
+       CALL    LE?,6,-5,-121
+       ZERO?   STACK \?THN40
+       CALL    LE?,2,-3,-103
+       ZERO?   STACK /?ELS35
+?THN40:        RETURN  300
+?ELS35:        LESS?   LATITUDE-SET,35 \?THN48
+       CALL    GE?,2,-1,57
+       ZERO?   STACK \?THN48
+       CALL    GE?,44,15,1810
+       ZERO?   STACK \?THN48
+       CALL    GE?,4,3,230
+       ZERO?   STACK \?THN48
+       LESS?   LONGITUDE-SET,37 /?ELS43
+       CALL    GE?,13,7,415
+       ZERO?   STACK /?ELS43
+       LESS?   LONGITUDE-SET,46 \?THN48
+       CALL    LE?,3,-2,-32
+       ZERO?   STACK /?ELS43
+?THN48:        RETURN  250
+?ELS43:        GRTR?   LATITUDE-SET,19 /?ELS55
+       CALL    LE?,5,3,131
+       ZERO?   STACK /?ELS55
+       CALL    LE?,7,6,214
+       ZERO?   STACK \?THN52
+?ELS55:        GRTR?   LATITUDE-SET,7 /?ELS57
+       GRTR?   LONGITUDE-SET,35 \?THN52
+?ELS57:        GRTR?   LATITUDE-SET,8 /?ELS51
+       CALL    LE?,2,-1,-16
+       ZERO?   STACK /?ELS51
+       CALL    LE?,1,1,45
+       ZERO?   STACK /?ELS51
+       CALL    LE?,2,1,51
+       ZERO?   STACK /?ELS51
+?THN52:        RETURN  50
+?ELS51:        GRTR?   LATITUDE-SET,20 /?ELS65
+       CALL    LE?,2,1,50
+       ZERO?   STACK /?ELS65
+       CALL    LE?,10,7,286
+       ZERO?   STACK \?THN62
+?ELS65:        GRTR?   LATITUDE-SET,9 /?ELS61
+       CALL    LE?,3,2,99
+       ZERO?   STACK /?ELS61
+?THN62:        RETURN  100
+?ELS61:        GRTR?   LATITUDE-SET,22 /?THN74
+       CALL    LE?,5,3,140
+       ZERO?   STACK \?THN74
+       CALL    LE?,7,3,172
+       ZERO?   STACK \?THN70
+?THN74:        GRTR?   LATITUDE-SET,10 /?ELS69
+       CALL    LE?,9,5,270
+       ZERO?   STACK /?ELS69
+?THN70:        RETURN  150
+?ELS69:        GRTR?   LONGITUDE-SET,29 /?ELS79
+       LESS?   LONGITUDE-SET,18 /?ELS79
+       GRTR?   LATITUDE-SET,24 /?ELS79
+       LESS?   LATITUDE-SET,19 /?ELS79
+       CALL    LE?,9,4,296
+       ZERO?   STACK /?ELS79
+       CALL    GE?,4,1,102
+       ZERO?   STACK /?ELS79
+       CALL    GE?,2,1,62
+       ZERO?   STACK /?ELS79
+       RETURN  50
+?ELS79:        GRTR?   LATITUDE-SET,28 /?ELS83
+       LESS?   LATITUDE-SET,17 /?ELS83
+       GRTR?   LONGITUDE-SET,34 /?ELS83
+       LESS?   LONGITUDE-SET,15 /?ELS83
+       CALL    LE?,1,-1,11
+       ZERO?   STACK /?ELS83
+       CALL    GE?,1,1,39
+       ZERO?   STACK /?ELS83
+       CALL    GE?,5,2,141
+       ZERO?   STACK /?ELS83
+       CALL    GE?,1,-1,-15
+       ZERO?   STACK /?ELS83
+       CALL    LE?,4,1,118
+       ZERO?   STACK \?THN86
+       CALL    LE?,6,5,268
+       ZERO?   STACK /?ELS83
+?THN86:        RETURN  100
+?ELS83:        GRTR?   LATITUDE-SET,32 /?ELS89
+       LESS?   LATITUDE-SET,16 /?ELS89
+       GRTR?   LONGITUDE-SET,38 /?ELS89
+       CALL    GE?,5,-3,-19
+       ZERO?   STACK /?ELS89
+       CALL    GE?,7,3,196
+       ZERO?   STACK /?ELS89
+       CALL    GE?,3,7,164
+       ZERO?   STACK /?ELS89
+       CALL    LE?,1,-1,18
+       ZERO?   STACK /?ELS89
+       CALL    LE?,7,6,344
+       ZERO?   STACK \?THN92
+       CALL    LE?,11,4,394
+       ZERO?   STACK /?ELS89
+?THN92:        RETURN  150
+?ELS89:        RETURN  200
+
+
+       .FUNCT  I-HUNGER,N,?TMP1
+       ZERO?   ASLEEP \FALSE
+       INC     'HOW-HUNGRY
+       EQUAL?  HOW-HUNGRY,1 \?ELS9
+       CALL    QUEUE,I-HUNGER,300
+       PUT     STACK,0,1
+       RFALSE  
+?ELS9: EQUAL?  HOW-HUNGRY,2 \?ELS11
+       CALL    QUEUE,I-HUNGER,20
+       PUT     STACK,0,1
+       PRINTI  "You begin to feel hungry."
+       CRLF    
+       RFALSE  
+?ELS11:        EQUAL?  HOW-HUNGRY,3 \?ELS15
+       CALL    QUEUE,I-HUNGER,20
+       PUT     STACK,0,1
+       PRINTI  "Your stomach begins to bother you. Better "
+       CALL    META-LOC,PLAYER >?TMP1
+       CALL    META-LOC,FOOD
+       EQUAL?  ?TMP1,STACK \?ELS20
+       PRINTI  "do something about it"
+       JUMP    ?CND18
+?ELS20:        PRINTI  "find some food"
+?CND18:        PRINTI  "!"
+       CRLF    
+       RFALSE  
+?ELS15:        GRTR?   HOW-HUNGRY,3 \FALSE
+       EQUAL?  HERE,SHANTY \?ELS33
+       SET     'N,2
+       JUMP    ?CND31
+?ELS33:        SET     'N,6
+?CND31:        CALL    QUEUE,I-HUNGER,N
+       PUT     STACK,0,1
+       PRINTI  "Your stomach is growling loudly."
+       CRLF    
+       RETURN  2
+
+
+       .FUNCT  I-THIRST
+       ZERO?   ASLEEP \FALSE
+       INC     'HOW-THIRSTY
+       EQUAL?  HOW-THIRSTY,1 \?ELS9
+       CALL    QUEUE,I-THIRST,110
+       PUT     STACK,0,1
+       PRINTI  "Your throat starts to feel dry."
+       CRLF    
+       RFALSE  
+?ELS9: EQUAL?  HOW-THIRSTY,2 \?ELS13
+       CALL    QUEUE,I-THIRST,115
+       PUT     STACK,0,1
+       PRINTI  "You feel fairly thirsty."
+       CRLF    
+       RFALSE  
+?ELS13:        EQUAL?  HOW-THIRSTY,3 \?ELS17
+       CALL    QUEUE,I-THIRST,15
+       PUT     STACK,0,1
+       CALL    TELL-YOUD-BETTER,STR?447
+       RFALSE  
+?ELS17:        GRTR?   HOW-THIRSTY,3 \FALSE
+       CALL    QUEUE,I-THIRST,4
+       PUT     STACK,0,1
+       PRINTI  "You lick your lips and clear your throat."
+       CRLF    
+       RETURN  2
+
+
+       .FUNCT  I-TIRED
+       ZERO?   ASLEEP \FALSE
+       LESS?   HOW-TIRED,6 \?CND1
+       INC     'HOW-TIRED
+?CND1: EQUAL?  HOW-TIRED,1 \?ELS11
+       CALL    QUEUE,I-TIRED,479
+       PUT     STACK,0,1
+       RFALSE  
+?ELS11:        EQUAL?  HOW-TIRED,2 \?ELS13
+       CALL    QUEUE,I-TIRED,1
+       PUT     STACK,0,1
+       RFALSE  
+?ELS13:        EQUAL?  HOW-TIRED,3 \?ELS15
+       CALL    QUEUE,I-TIRED,30
+       PUT     STACK,0,1
+       PRINTR  "You yawn as you begin to feel drowsy."
+?ELS15:        EQUAL?  HOW-TIRED,4 \?ELS19
+       CALL    QUEUE,I-TIRED,20
+       PUT     STACK,0,1
+       PRINTI  "You are starting to feel tired."
+       CRLF    
+       RFALSE  
+?ELS19:        EQUAL?  HOW-TIRED,5 \?ELS23
+       CALL    QUEUE,I-TIRED,10
+       PUT     STACK,0,1
+       PRINTR  "You yawn and feel very tired. Think about going to bed."
+?ELS23:        EQUAL?  HOW-TIRED,6 \FALSE
+       PRINTI  "Exhaustion overwhelms you. Keeping your eyes open is painful."
+       ZERO?   AT-SEA \?ELS32
+       PRINTI  " "
+       CALL    V-SLEEP
+       RETURN  2
+?ELS32:        CALL    QUEUE,I-TIRED,6
+       PUT     STACK,0,1
+       CRLF    
+       RETURN  2
+
+
+       .FUNCT  I-SQUID,L
+       LOC     SQUID >L
+       CALL    META-LOC,PLAYER
+       EQUAL?  STACK,L \?ELS5
+       CALL    JIGS-UP,STR?448
+       RSTACK  
+?ELS5: CALL    INT,I-SQUID
+       PUT     STACK,0,0
+       RFALSE  
+
+
+       .FUNCT  I-SHARK
+       GETP    HERE,P?LINE
+       LESS?   STACK,UNDERWATER-LINE-C \?ELS5
+       CALL    INT,I-SHARK
+       PUT     STACK,0,0
+       MOVE    SHARK,LOCAL-GLOBALS
+       FCLEAR  SHARK,ONBIT
+       RFALSE  
+?ELS5: IN?     SHARK,UNDERWATER \?ELS7
+       IN?     SHARK-REPELLENT,PLAYER \?ELS12
+       FSET?   SHARK-REPELLENT,OPENBIT \?ELS12
+       MOVE    SHARK,WINDING-ROAD-2
+       CALL    INT,I-SHARK
+       PUT     STACK,0,0
+       ZERO?   LIT /FALSE
+       FSET?   SHARK,ONBIT \?ELS19
+       PRINTI  "The shark continues"
+       JUMP    ?CND15
+?ELS19:        PRINTI  "A shark swims"
+?CND15:        PRINTR  " toward you, then stops. It turns and swims away."
+?ELS12:        FSET?   SHARK,ONBIT \?ELS32
+       PRINTI  "The shark"
+       JUMP    ?CND30
+?ELS32:        ZERO?   LIT /?ELS36
+       PRINTI  "A shark"
+       JUMP    ?CND30
+?ELS36:        PRINTI  "Something"
+?CND30:        CALL    JIGS-UP,STR?449
+       RSTACK  
+?ELS7: MOVE    SHARK,UNDERWATER
+       CALL    QUEUE,I-SHARK,-1
+       PUT     STACK,0,1
+       ZERO?   LIT /FALSE
+       FSET    SHARK,ONBIT
+       PRINTR  "A shark swims toward you!"
+
+
+       .FUNCT  I-PLUMMET
+       INC     'CRIMP-CTR
+       EQUAL?  CRIMP-CTR,1 \?ELS5
+       CALL    QUEUE,I-PLUMMET,-1
+       PUT     STACK,0,1
+       CALL    GLOBAL-IN?,FALLEN-BUNK,HERE
+       ZERO?   STACK /FALSE
+       SET     'P-IT-OBJECT,FALLEN-BUNK
+       PRINTR  "The row of bunks you moved starts to fall."
+?ELS5: EQUAL?  CRIMP-CTR,2 \?ELS14
+       CALL    GLOBAL-IN?,FALLEN-BUNK,HERE
+       ZERO?   STACK /FALSE
+       SET     'P-IT-OBJECT,FALLEN-BUNK
+       PRINTI  "The row of bunks falls toward the doorway"
+       EQUAL?  HERE,WRECK-8 \?ELS24
+       PRINTI  ", threatening to pinch your "
+       CALL    DPRINT,AIR-HOSE
+       PRINTI  "!"
+       JUMP    ?CND22
+?ELS24:        PRINTI  "."
+?CND22:        CRLF    
+       RTRUE   
+?ELS14:        EQUAL?  CRIMP-CTR,3 \FALSE
+       CALL    GLOBAL-IN?,FALLEN-BUNK,HERE
+       ZERO?   STACK /?ELS37
+       EQUAL?  HERE,WRECK-8 \?ELS42
+       CALL    JIGS-UP,STR?450
+       RSTACK  
+?ELS42:        SET     'BUNKS-MOVED,FALSE-VALUE
+       SET     'P-IT-OBJECT,FALLEN-BUNK
+       PRINTR  "The bunks fall back into the doorway, blocking the passage."
+?ELS37:        EQUAL?  HERE,WRECK-1,WRECK-2,WRECK-3 /?THN49
+       EQUAL?  HERE,WRECK-4,WRECK-5,WRECK-6 /?THN49
+       EQUAL?  HERE,UNDERWATER \?ELS48
+?THN49:        SET     'BUNKS-MOVED,FALSE-VALUE
+       RFALSE  
+?ELS48:        CALL    JIGS-UP,STR?451
+       RSTACK  
+
+
+       .FUNCT  I-LIVER
+       GRTR?   BLOOD-ALCOHOL,0 \?CND1
+       DEC     'BLOOD-ALCOHOL
+?CND1: GRTR?   SLOSH-CTR,0 \?CND4
+       DEC     'SLOSH-CTR
+?CND4: CALL    QUEUE,I-LIVER,10
+       PUT     STACK,0,1
+       GRTR?   BLOOD-ALCOHOL,15 \FALSE
+       PRINTI  "Your head swims for a minute."
+       CRLF    
+       RETURN  2
+
+
+       .FUNCT  I-PENDULUM,DIR=0
+       CALL    QUEUE,I-PENDULUM,-2
+       EQUAL?  LINE-LOC,5 \?ELS3
+       SET     'LINE-LOC-INC,-1
+       JUMP    ?CND1
+?ELS3: EQUAL?  LINE-LOC,1 \?ELS5
+       SET     'LINE-LOC-INC,1
+       JUMP    ?CND1
+?ELS5: CALL    META-LOC,PLAYER
+       IN?     SAFETY-LINE,STACK \?CND1
+       EQUAL?  LINE-LOC-INC,1 \?ELS10
+       SET     'DIR,STR?170
+       JUMP    ?CND1
+?ELS10:        SET     'DIR,STR?171
+?CND1: ADD     LINE-LOC,LINE-LOC-INC >LINE-LOC
+       EQUAL?  LINE-LOC,2 \?ELS17
+       MOVE    SAFETY-LINE,WEST-OF-WRECK-9
+       EQUAL?  HERE,WEST-OF-WRECK-9 \FALSE
+       CALL    TELL-LINE-SWINGS
+       RSTACK  
+?ELS17:        EQUAL?  LINE-LOC,4 \?ELS24
+       MOVE    SAFETY-LINE,WEST-OF-WRECK-11
+       EQUAL?  HERE,WEST-OF-WRECK-11 \FALSE
+       CALL    TELL-LINE-SWINGS
+       RSTACK  
+?ELS24:        MOVE    SAFETY-LINE,LOCAL-GLOBALS
+       ZERO?   DIR /FALSE
+       PRINTI  "The line swings away to the "
+       PRINT   DIR
+       PRINTR  "."
+
+
+       .FUNCT  TELL-LINE-SWINGS
+       PRINTI  "The "
+       CALL    DPRINT,SAFETY-LINE
+       PRINTI  " from above swings in from the "
+       EQUAL?  LINE-LOC-INC,1 \?ELS5
+       PRINTI  "south"
+       JUMP    ?CND3
+?ELS5: PRINTI  "north"
+?CND3: PRINTR  "."
+
+
+       .FUNCT  I-CASE-LEAK,ALREADY=0
+       INC     'WATER-IN-CASE
+       GRTR?   WATER-IN-CASE,9 \?CND1
+       FSET?   STAMPS,RMUNGBIT \?CND4
+       SET     'ALREADY,TRUE-VALUE
+?CND4: FSET    STAMPS,RMUNGBIT
+       CALL    INT,I-CASE-LEAK
+       PUT     STACK,0,0
+?CND1: IN?     GLASS-CASE,PLAYER \FALSE
+       PRINTI  "The water level in the "
+       CALL    DPRINT,GLASS-CASE
+       PRINTI  " rises."
+       FSET?   STAMPS,RMUNGBIT \?CND14
+       ZERO?   ALREADY \?CND14
+       PRINTI  " As it reaches the stamps, it soaks them."
+?CND14:        CRLF    
+       RTRUE   
+
+
+       .FUNCT  I-DRILL
+       FSET    BATTERY,RMUNGBIT
+       SET     'DRILL-POWERED,FALSE-VALUE
+       CALL    INT,I-DRILL
+       PUT     STACK,0,0
+       PRINTI  "The "
+       CALL    DPRINT,DRILL
+       PRINTR  " sputters, and the bit stops turning."
+
+
+       .FUNCT  I-AIR-SUPPLY
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,UNDERWATER-LINE-C \FALSE
+       IN?     AIR-TANK,PLAYER \FALSE
+       CALL    AIRTIGHT-ROOM?
+       ZERO?   STACK \FALSE
+       ADD     DEPTH,33
+       DIV     STACK,44
+       SUB     AIR-LEFT,STACK >AIR-LEFT
+       LESS?   AIR-LEFT,1 \?ELS12
+       CALL    JIGS-UP,STR?452
+       RSTACK  
+?ELS12:        LESS?   AIR-LEFT,15 \FALSE
+       PRINTI  "Your air supply is dangerously low."
+       CRLF    
+       EQUAL?  WAITED?,1 /TRUE
+       RETURN  2
+
+
+       .FUNCT  I-MM-COMPRESSOR
+       CALL    QUEUE,I-LAST-GASP,10
+       PUT     STACK,0,1
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,UNDERWATER-LINE-C \FALSE
+       PRINTI  "You have to breathe harder. Maybe you'd better surface."
+       CRLF    
+       RETURN  2
+
+
+       .FUNCT  I-LAST-GASP
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,UNDERWATER-LINE-C \?ELS5
+       CALL    JIGS-UP,STR?453
+       RSTACK  
+?ELS5: CALL    QUEUE,I-LAST-GASP,1
+       PUT     STACK,0,0
+       RTRUE   
+
+
+       .FUNCT  I-PLOT-NEVER-STARTS
+       CALL    INT,I-JOHNNY
+       PUT     STACK,0,0
+       CALL    INT,I-PETE
+       PUT     STACK,0,0
+       IN?     WEASEL,SHANTY \?CND1
+       CALL    INT,I-WEASEL
+       PUT     STACK,0,0
+?CND1: SET     'FM-CTR,5
+       RFALSE  
+
+
+       .FUNCT  I-ENDIT
+       GETP    HERE,P?LINE
+       LESS?   STACK,UNDERWATER-LINE-C \FALSE
+       CALL    JIGS-UP,STR?454
+       RSTACK  
+
+       .ENDI
diff --git a/events.zil b/events.zil
new file mode 100644 (file)
index 0000000..dae51e1
--- /dev/null
@@ -0,0 +1,1629 @@
+"       EVENTS for TOA2
+ Copyright (C) 1984 Infocom Inc.
+      All rights reserved."
+
+<ROUTINE I-UNWOUND ()
+        <SETG WATCH-WOUND <>>
+        <RFALSE>>
+
+<ROUTINE I-BUSINESS-HOURS ()
+        <COND (,BUSINESS-HOURS?
+               <SETG BUSINESS-HOURS? <>>
+               <COND (<IN? ,PLAYER ,MCGINTY-HQ>
+                      <MOVE ,PLAYER ,WHARF-ROAD-2>
+                      <SETG HERE ,WHARF-ROAD-2>
+                      <TELL
+"\"Closing time,\" says " D ,MCGINTY " as he escorts you out to the
+street..." CR CR>
+                      <V-FIRST-LOOK>)
+                     (<IN? ,PLAYER ,OUTFITTERS-HQ>
+                      <MOVE ,PLAYER ,WHARF-ROAD-4>
+                      <SETG HERE ,WHARF-ROAD-4>
+                      <TELL
+"\"Sorry, but it's closing time,\" the salesman says, then shows you out..." CR CR>
+                      <V-FIRST-LOOK>)
+                     (<IN? ,PLAYER ,BANK>
+                      <MOVE ,PLAYER ,SHORE-ROAD-2>
+                      <SETG HERE ,SHORE-ROAD-2>
+                      <TELL
+"The teller says, \"You'll have to leave. It's 5:00.\" A guard escorts you
+out..." CR CR>
+                      <V-FIRST-LOOK>)
+                     (T <RFALSE>)>
+               <RTRUE>)
+              (T
+               <SETG BUSINESS-HOURS? T>
+               <ENABLE <QUEUE I-BUSINESS-HOURS 480>>
+               <RFALSE>)>>
+
+<ROUTINE I-FERRY-APPROACHING ()
+        <ENABLE <QUEUE I-FERRY-APPROACHING -1>>
+        <FCLEAR ,FERRY ,INVISIBLE>
+        <COND (<IN? ,WEASEL ,GLOBAL-FERRY>
+               <MOVE ,WEASEL ,FERRY>)>
+        <COND (<EQUAL? ,HERE ,FERRY-LANDING ,SHORE-ROAD-1 ,SHORE-ROAD-2>
+               <TELL
+"The ferry approaches the landing." CR>)>>
+
+<ROUTINE I-FERRY ("AUX" (WEASEL-HERE? <>))
+        <DISABLE <INT I-FERRY-APPROACHING>>
+        <ENABLE <QUEUE I-FERRY-LEAVING 5>>
+        <ENABLE <QUEUE I-FERRY-GONE 8>>
+        <MOVE ,FERRY ,FERRY-LANDING>
+        <COND (<AND <IN? ,WEASEL ,FERRY-LANDING>
+                    <NOT <QUEUED? I-TRAITOR-MEETING>>>
+               <SET WEASEL-HERE? T>
+               <MOVE ,WEASEL ,FERRY>)
+              (<IN? ,WEASEL ,FERRY>
+               <MOVE ,WEASEL ,FERRY-LANDING>
+               <COND (<AND <IN? ,JOHNNY ,FERRY-LANDING>
+                           ,WEASEL-BLOWN>
+                      <ROUGH-JUSTICE>)
+                     (<==? ,SHIP-CHOSEN ,TRAWLER>
+                      <ESTABLISH-GOAL ,WEASEL ,NW-CREW-QTRS>)
+                     (<==? ,SHIP-CHOSEN ,SALVAGER>
+                      <ESTABLISH-GOAL ,WEASEL ,MM-CREW-QTRS>)>)>
+        <COND (<==? ,HERE ,FERRY-LANDING>
+               <TELL 
+"The ferry arrives. Some passengers get off and others get on.">
+               <COND (.WEASEL-HERE?
+                      <TELL-FERRY-KLUDGE "boards">)
+                     (<AND <IN? ,WEASEL ,FERRY-LANDING>
+                           <NOT <QUEUED? I-TRAITOR-MEETING>>>
+                      <TELL-FERRY-KLUDGE "disembarks">
+                      <COND (<IN? ,ENVELOPE ,PLAYER>
+                             <CRLF>
+                             <WEASEL-BEATS-YOU>)>)>
+               <CRLF>)
+              (<EQUAL? ,HERE ,SHORE-ROAD-1 ,SHORE-ROAD-2>
+               <TELL "The ferry arrives at the landing." CR>)>>
+
+<ROUTINE TELL-FERRY-KLUDGE (STR)
+        <TELL " The Weasel " .STR ".">>
+
+<ROUTINE I-FERRY-LEAVING ()
+        <ENABLE <QUEUE I-FERRY-LEAVING -1>>
+        <MOVE ,FERRY ,LOCAL-GLOBALS>
+        <COND (<AND <IN? ,WEASEL ,FERRY>
+                    <IN? ,PASSBOOK ,WEASEL>>
+               <MOVE ,WEASEL ,LOCAL-GLOBALS>)>
+        <COND (<EQUAL? ,HERE ,FERRY-LANDING ,SHORE-ROAD-1 ,SHORE-ROAD-2>
+               <TELL 
+"The ferry pulls away, heading for the mainland." CR>)>>
+
+<ROUTINE I-FERRY-GONE ()
+        <DISABLE <INT I-FERRY-LEAVING>>
+        <ENABLE <QUEUE I-FERRY-APPROACHING 109>>
+        <ENABLE <QUEUE I-FERRY 112>>
+        <FSET ,FERRY ,INVISIBLE>
+        <COND (<IN? ,WEASEL ,FERRY>
+               <MOVE ,WEASEL ,GLOBAL-FERRY>)>
+        <RFALSE>>
+
+<ROUTINE I-DISGUSTING-WEASEL-KLUDGE ("AUX" WGT);"make sure he goes to 1st mtg"
+        <COND (<AND <NOT <IN? ,PASSBOOK ,WEASEL>>
+                    <NOT <==? <GET <SET WGT <GET ,GOAL-TABLES ,WEASEL-C>>
+                                   ,GOAL-F>
+                         ,SHANTY>>>
+               <PUT .WGT ,ATTENTION 0>
+               <ESTABLISH-GOAL ,WEASEL ,SHANTY>
+               <RFALSE>)>>
+
+<ROUTINE I-FIRST-MEETING ()
+        <COND (<==? ,FM-CTR 5>
+               <DISABLE <INT I-FIRST-MEETING>>
+               <RFALSE>)
+              (<AND <IN? ,JOHNNY ,SHANTY>
+                    <IN? ,PETE ,SHANTY>
+                    <==? <META-LOC ,PLAYER> ,SHANTY>>
+               <COND (<==? ,FM-CTR 0>
+                      <COND (<G? ,PRESENT-TIME 535>
+                             <I-PLOT-NEVER-STARTS>
+                             <DISABLE <INT I-FIRST-MEETING>>
+                             <RFALSE>)>
+                      <SETG QCONTEXT ,JOHNNY>
+                      <SETG QCONTEXT-ROOM ,HERE>
+                      <TELL 
+"\"Sit down and we'll talk,\" " D ,JOHNNY " says." CR>)
+                     (<==? ,FM-CTR 1>
+                      <COND (<IN? ,WEASEL ,SHANTY>
+                             <SETG FM-CTR 2>
+                             <I-FIRST-MEETING>)
+                            (,WAITING-FOR-WEASEL
+                             <COND (<G? ,PRESENT-TIME 525>
+                                    <DISABLE <INT I-FIRST-MEETING>>
+                                    <I-PLOT-NEVER-STARTS>
+                                    <SETG QCONTEXT ,JOHNNY>
+                                    <SETG QCONTEXT-ROOM ,HERE>
+                                    <TELL 
+"Pete looks at Johnny and says, \"Weasel ain't gonna show.\"|
+\"Guess not,\" replies Johnny. \"Without " D ,WEASEL ", there's
+no deal. Who knows what that creep is up to?\"" CR>)>)
+                            (T
+                             <SETG QCONTEXT ,JOHNNY>
+                             <SETG QCONTEXT-ROOM ,HERE>
+                             <TELL 
+"Johnny says, \"When " D ,WEASEL " shows, I'll tell ya what we got.\"" CR>
+                             <SETG WAITING-FOR-WEASEL T>)>)
+                      (<G? ,BLOOD-ALCOHOL 10>
+                       <DISABLE <INT I-FIRST-MEETING>>
+                       <I-PLOT-NEVER-STARTS>
+                       <TELL
+"Pete turns to Johnny and says, \"This joker's drunk!\"|
+\"Yeah,\" Johnny says. He looks at you. \"Some diver! We'll find
+someone else.\"" CR>)
+                      (<==? ,FM-CTR 2>
+                       <SETG QCONTEXT ,JOHNNY>
+                       <SETG QCONTEXT-ROOM ,HERE>
+                       <TELL 
+"At Pete's request, " D ,WEASEL " joins you. Johnny then whispers that he's
+come across some sunken " D ,GLOBAL-TREASURE "." CR>
+                       <SETG FM-CTR 3>
+                       <SETG I-WAIT-RTN ,I-FIRST-MEETING>
+                       <SETG I-WAIT-DURATION 2>)
+                      (<==? ,FM-CTR 3>
+                       <COND (,I-WAIT-FLAG
+                              <TELL
+"Unfortunately, this interrupts Johnny's explanation of what the meeting is
+about." CR>
+                              <SETG I-WAIT-DURATION 2>)
+                             (<AND <G? ,I-WAIT-DURATION 0>
+                                   <==? ,I-WAIT-RTN ,I-FIRST-MEETING>>
+                              <RFALSE>)
+                              (T
+                              <SETG QCONTEXT ,JOHNNY>
+                              <SETG QCONTEXT-ROOM ,HERE>
+                              <TELL 
+"Johnny explains that they need more money to get started.
+They chose you because they know you've salted some money away and
+you're a great diver. He asks if you're interested in the deal."
+CR>
+                              <SETG FM-CTR 4>)>)
+                      (<==? ,FM-CTR 4>
+                       <COND (<AND <G? ,PRESENT-TIME 539>
+                                   <NOT <VERB? YES NO>>>
+                              <SETG QCONTEXT ,JOHNNY>
+                              <SETG QCONTEXT-ROOM ,HERE>
+                              <I-PLOT-NEVER-STARTS>
+                              <TELL 
+"Pete turns to Johnny. \"We don't want anyone who can't decide.\"|
+\"Right,\" says Johnny. \"We'll find someone else.\" He turns to
+you. \"Say a word about this and you're history!\"" CR>)
+                             (T
+                              <SETG QCONTEXT ,JOHNNY>
+                              <SETG QCONTEXT-ROOM ,HERE>
+                              <TELL 
+"\"Well, what is it? Yes or no?\" Pete asks anxiously." CR>)>)>)>>
+
+<GLOBAL WAITING-FOR-WEASEL <>>
+
+<GLOBAL I-WAIT-FLAG <>>
+
+<GLOBAL I-WAIT-DURATION 0>
+
+<GLOBAL I-WAIT-RTN <>>
+
+<GLOBAL FM-CTR 0>  "counter for throughout first meeting:
+                   0-waiting for player to sit down
+                   1-waiting for the Weasel to show up
+                   2-Johnny mentions treasure
+                   3-Johnny pitches the deal
+                   4-waiting for player to accept
+                     (handled in CHAIR-F, SHANTY-F)
+                   5-no meeting or meeting concluded"
+
+<GLOBAL SAMPLE-TREASURE <>>
+
+<OBJECT GOLD-COIN
+       (IN LOCAL-GLOBALS)
+       (SYNONYM COIN DOUBLO ESCUDO)
+       (ADJECTIVE GOLD PORTUG)
+       (DESC "gold coin")
+       (TEXT
+"It is dated 1680 and stamped with a portrait of King Peter II of Portugal.")
+       (FLAGS TRYTAKEBIT READBIT)
+       (ACTION RED-HERRING-F)>
+
+<OBJECT DINNER-PLATE
+       (IN LOCAL-GLOBALS)
+       (SYNONYM PLATE DISH)
+       (ADJECTIVE DINNER SUPPER)
+       (DESC "dinner plate")
+       (TEXT
+"It bears the Hollywood Cruise Lines markings.")
+       (FLAGS TRYTAKEBIT READBIT)
+       (ACTION RED-HERRING-F)>
+
+;<OBJECT DINNER-PLATE
+       (IN LOCAL-GLOBALS)
+       (SYNONYM TRAY ASHTRA)
+       (ADJECTIVE ASH)
+       (SDESC "ashtray")
+       (TEXT
+"This is an ashtray with the markings of the Hollywood Cruise Lines.")
+       (FLAGS TRYTAKEBIT VOWELBIT)
+       (ACTION SAMPLE-TREASURE-F)>
+
+;<OBJECT DINNER-PLATE
+       (IN LOCAL-GLOBALS)
+       (SYNONYM FORK)
+       (ADJECTIVE SILVER SALAD)
+       (SDESC "salad fork")
+       (TEXT
+"This is a salad fork with the markings of the Hollywood Cruise Lines.")
+       (FLAGS TRYTAKEBIT)
+       (ACTION SAMPLE-TREASURE-F)>
+
+;<OBJECT DINNER-PLATE
+       (IN LOCAL-GLOBALS)
+       (SYNONYM KNIFE)
+       (ADJECTIVE BUTTER SILVER)
+       (SDESC "dinner plate")
+       (TEXT
+"This is a butter knife with the markings of the Hollywood Cruise Lines.")
+       (FLAGS TRYTAKEBIT)
+       (ACTION SAMPLE-TREASURE-F)>
+
+;<OBJECT DINNER-PLATE
+       (IN LOCAL-GLOBALS)
+       (SYNONYM SPOON)
+       (ADJECTIVE SOUP SILVER)
+       (SDESC "soup spoon")
+       (TEXT
+"This is a soup spoon with the markings of the Hollywood Cruise Lines.")
+       (FLAGS TRYTAKEBIT)
+       (ACTION RED-HERRING-F)>
+
+<ROUTINE SAMPLE-TREASURE-F ()
+        <COND (<OR <VERB? TAKE>
+                   <AND <VERB? ASK-FOR>
+                        <PRSO? ,JOHNNY>>>
+               <COND (<IN? ,MCGINTY ,HERE>
+                      <PERFORM ,V?TELL ,MCGINTY ,SAMPLE-TREASURE>
+                      <RTRUE>)
+                     (T <TELL 
+"Red pulls it back. \"If we get the loot, there'll be plenty for all.\"" CR>)>)
+              (<VERB? TURN>
+               <TELL D ,JOHNNY " has it." CR>)>>
+
+<ROUTINE I-SECOND-MEETING ()
+        <COND (<AND <G? ,PRESENT-TIME 585>
+                    <OR <L? ,SM-CTR 2>
+                        <G? ,HOW-HUNGRY 3>>>
+               <ALL-GO-HOME>
+               <I-PLOT-NEVER-STARTS>
+               <SETG SM-CTR 4>)>
+        <COND (<==? ,SM-CTR 4>
+               <DISABLE <INT I-SECOND-MEETING>>)
+              (<NOT <==? ,HERE ,WINDING-ROAD-1>>
+               <DISABLE <INT I-SECOND-MEETING>>)
+              (<AND <G? ,SM-CTR 1>
+                    <OR <IN? ,MCGINTY ,WINDING-ROAD-1>
+                        <IN? ,MCGINTY ,WINDING-ROAD-2>>>
+               <JIGS-UP
+"Pete spots McGinty, who is near enough to overhear! While Johnny
+chases McGinty, Pete accuses you of bringing McGinty along. Before you
+respond, the Weasel plunges his knife into your heart.">)
+              (<L? ,SM-CTR 2>
+               <COND (<AND <IN? ,WEASEL ,WINDING-ROAD-1>
+                           <IN? ,JOHNNY ,WINDING-ROAD-1>
+                           <IN? ,PETE ,WINDING-ROAD-1>>
+                      <SETG SM-CTR 2>
+                      <I-SECOND-MEETING>
+                      <RTRUE>)
+                     (<==? ,SM-CTR 0>
+                      <COND (<IN? ,JOHNNY ,WINDING-ROAD-1>
+                             <SETG SM-CTR 1>
+                             <SETG QCONTEXT ,JOHNNY>
+                             <SETG QCONTEXT-ROOM ,HERE>
+                             <TELL 
+"Johnny says, \"We'll start when everyone's here.\"" CR>)>)>)
+              (<G? ,BLOOD-ALCOHOL 10>
+               <SETG SM-CTR 4>
+               <DISABLE <INT I-SECOND-MEETING>>
+               <SETG QCONTEXT ,JOHNNY>
+               <SETG QCONTEXT-ROOM ,HERE>
+               <ALL-GO-HOME>
+               <I-PLOT-NEVER-STARTS>
+               <TELL
+"\"I won't risk everything on a drunk diver!\" " D ,WEASEL " says.|
+\"You're right,\" says Johnny. \"We're calling this off.\"" CR>)
+              (<==? ,SM-CTR 2>
+               <SETG WRECK-FOUND <RANDOM 2>>
+               <COND (<==? ,WRECK-FOUND 1>
+                      <SETG SAMPLE-TREASURE ,GOLD-COIN>)
+                     (T <SETG SAMPLE-TREASURE ,DINNER-PLATE>)>
+               <PUTP ,SAMPLE-TREASURE ,P?ACTION SAMPLE-TREASURE-F>
+               <MOVE ,SAMPLE-TREASURE ,JOHNNY>
+               ;<FCLEAR ,SAMPLE-TREASURE ,INVISIBLE>
+               <SETG P-IT-OBJECT ,SAMPLE-TREASURE>
+               <SETG SM-CTR 3>
+               <SETG I-WAIT-DURATION 6>
+               <SETG I-WAIT-RTN ,I-SECOND-MEETING>
+               <SETG QCONTEXT ,JOHNNY>
+               <SETG QCONTEXT-ROOM ,HERE>
+               <TELL 
+"Johnny nods, then pulls out " A ,SAMPLE-TREASURE " he says he came across
+while on a shark hunt." CR>)
+              (<==? ,SM-CTR 3>
+               <COND (,I-WAIT-FLAG
+                      <TELL 
+"This interrupts Johnny's explanation, which makes him angry." CR>
+                      <SETG I-WAIT-DURATION 6>)
+                     (<AND <G? ,I-WAIT-DURATION 0>
+                           <==? ,I-WAIT-RTN ,I-SECOND-MEETING>>
+                      <RFALSE>)
+                     (T
+                      <DISABLE <INT I-SECOND-MEETING>>
+                      <ENABLE <QUEUE I-OTHERS-MEET <- 705 ,PRESENT-TIME>>>
+                      <SETG SM-CTR 4>
+                      <SETG MEETINGS-COMPLETED 2>
+                      <PUT ,MOVEMENT-GOALS ,JOHNNY-C ,JOHNNY-CONTINUES-TABLE>
+                      <IMOVEMENT ,JOHNNY I-JOHNNY>
+                      <RATING-UPD 20>
+                      <SETG QCONTEXT ,JOHNNY>
+                      <SETG QCONTEXT-ROOM ,HERE>
+                      <CRLF>
+                      <TELL 
+"\"We're not sure which wreck to salvage,\" Johnny says.
+\"Since you're joining up, we're hoping you'll identify where
+the " D ,SAMPLE-TREASURE " came from, and then do the dive for us. I'll
+captain, Pete will cook, and " D ,WEASEL " will crew.|
+|
+Johnny winks at you. \"We'll need you to supply the minutes of longitude and
+latitude of the wreck. Get $500 and meet me at Point Lookout at 10:45. Then
+we'll provision the boat.\"|
+|
+He turns to the others. \"We'll meet in " D ,SHANTY " at 11:45 to discuss final
+arrangements.|
+|
+\"We're all in this now,\" Johnny says to the group. \"I'm not gonna chance
+this operation if one of you doesn't show. We need everyone to pull this off.
+If anyone tries anything stupid, you won't live to regret it.\"" CR>)>)>>
+
+<GLOBAL SM-CTR 0>  "counter for throughout second meeting:
+                   0-Johnny not here
+                   1-waiting for Weasel and/or Pete
+                   2-Johnny shows treasure
+                   3-Johnny shoots deal
+                   4-meeting's over" 
+
+<ROUTINE I-THIRD-MEETING ("AUX" JMG)
+        <COND (<NOT <EQUAL? ,HERE ,POINT-LOOKOUT>>
+               <DISABLE <INT I-THIRD-MEETING>>
+               <RFALSE>)
+              (<IN? ,JOHNNY ,POINT-LOOKOUT>
+               <COND (<L? ,TM-CTR 6> <SETG TM-CTR <+ ,TM-CTR 1>>)>)
+              (T <RFALSE>)>
+        <COND (<IN? ,MCGINTY ,POINT-LOOKOUT>
+               <JIGS-UP
+"Johnny glares at McGinty. \"Trying to cash in on my work again,
+huh? You probably killed Hevlin, too!\" And with that, he pushes McGinty off
+the cliff.|
+|
+\"I can't leave witnesses,\" he mumbles.
+Before you can react, you're on your way down to join what's left of
+McGinty.">)
+              (<AND <IN? ,MCGINTY ,OCEAN-ROAD-3>
+                    <NOT <IN-MOTION? ,MCGINTY>>>
+               <JIGS-UP
+"Johnny sees McGinty on the road. \"You brought McGinty, you traitor! You
+probably killed Hevlin, too!\" A moment later, you're falling
+down to the rocks.">)
+              (<==? ,TM-CTR 1>
+               <SETG QCONTEXT ,JOHNNY>
+               <SETG QCONTEXT-ROOM ,HERE>
+               <TELL 
+"Johnny turns toward you. \"Well? Did you bring the money?\"" CR>)
+              (<G? ,BLOOD-ALCOHOL 10>
+               <JIGS-UP
+"Johnny stares at you in disgust. \"A drunk diving for us? You'll probably
+tell McGinty, too. I'll make sure you don't.\" He pushes you off the cliff.
+Although you feel no pain, your landing is fatal.">)
+              (<==? ,TM-CTR 4>
+               <TELL 
+"Johnny glares at you as if you were a sea slug." CR>)
+              (<==? ,TM-CTR 5>
+               <JIGS-UP 
+"Johnny looks disgusted. \"No money? You probably told McGinty already.
+Traitor!\" He pushes you off the cliff, and you scream as
+the pointy rocks rush up to meet you.">)
+              (<==? ,TM-CTR 6>
+               <SETG TM-CTR 7>
+                <RATING-UPD 20>
+               <SETG QCONTEXT ,JOHNNY>
+               <SETG QCONTEXT-ROOM ,HERE>
+               <CRLF>
+               <TELL
+"\"Glad you're with us. Since you're okay, I'll level with you. Before
+Hevlin died, he told me he gave you the book. He also said you could handle
+this job. He's the one who gave me the " D ,SAMPLE-TREASURE ". I didn't want
+to say anything in front of Pete and " D ,WEASEL " just in case.|
+|
+\"We're gonna need a boat, but I don't know which one. If
+you need deep-sea diving gear, it'll have to be
+the " D ,SALVAGER ". Is the " D ,GLOBAL-TREASURE " more than 200 feet deep?\""
+CR>)
+              (<==? ,TM-CTR 7>
+               <COND (<G? ,PRESENT-TIME 675>
+                      <JIGS-UP
+"Johnny looks disgusted. \"I can't wait all day...\" You feel a shove and then
+find yourself on your way down to the rocks below.">)>
+               <SETG QCONTEXT ,JOHNNY>
+               <SETG QCONTEXT-ROOM ,HERE>
+               <TELL 
+"Johnny looks impatient. \"Don't confuse things. A yes or no will do.\""
+CR>)
+              (<==? ,TM-CTR 8>
+               <ESTABLISH-GOAL ,JOHNNY ,OUTFITTERS-HQ>
+               <PUT ,MOVEMENT-GOALS ,JOHNNY-C ,JOHNNY-COMPLETES-TABLE>
+               <SET JMG <GET ,MOVEMENT-GOALS ,JOHNNY-C>>
+               <PUT .JMG ,MG-TIME <- 838 ,PRESENT-TIME>>
+               <IMOVEMENT ,JOHNNY I-JOHNNY>
+               <DISABLE <INT I-THIRD-MEETING>>
+               <SETG MEETINGS-COMPLETED 3>
+               <TELL
+"\"We'll rent the " D ,SHIP-CHOSEN ". Let's go get what we need.\"" CR>)>>
+
+<GLOBAL TM-CTR 0>  "Counter for third meeting (incremented every move thru 5):
+                   0 - no meeting yet
+                   1 - Johnny wants to see money
+                   2-5 - Johnny is waiting to see money
+                         (on 5, he's waited long enough and kills you)
+                   6 - money shown; Johnny asks which ship to rent
+                   7 - waiting for answer about ship
+                   8 - meeting's over"
+
+<ROUTINE I-EQUIP ("AUX" MCG-GT (V <>))
+        <COND (<IN? ,PLAYER ,OUTFITTERS-HQ>
+               <COND (<IN? ,MCGINTY ,OUTFITTERS-HQ>
+                      <SETG WARNING-CTR <+ ,WARNING-CTR 1>>
+                      <COND (<==? ,WARNING-CTR 7>
+                             <TELL
+"Johnny leans over and whispers, \"Let's wait out McGinty. He should leave soon.\"" CR>
+                             <SET V T>)>
+                      <COND (<G? ,I-WAIT-DURATION 0>
+                             <SETG I-WAIT-DURATION 0>
+                             <SETG I-WAIT-RTN <>>
+                             <TELL 
+"Johnny ends his conversation, and " D ,MCGINTY
+" asks the salesman some questions." CR>)
+                            (<AND <GET <SET MCG-GT
+                                           <GET ,GOAL-TABLES ,MCGINTY-C>>
+                                       ,GOAL-ENABLE>
+                                  <==? <GET .MCG-GT ,GOAL-F> ,MCGINTY-HQ>>
+                             <COND (<NOT ,MCGINTY-KNOWS>
+                                    <SETG MCGINTY-MEETS-WEASEL T>)>
+                             <SETG I-WAIT-DURATION 9>
+                             <SETG I-WAIT-RTN ,I-EQUIP>
+                             <RFALSE>)
+                            (<AND <VERB? BUY RENT>
+                                  <NOT <PRSO? ,FERRY-TOKEN>>>
+                             <SETG MCGINTY-KNOWS T>
+                             <DISABLE <INT I-MCGINTY-FOLLOWS>>
+                             <DISABLE <INT I-EQUIP>>
+                             <MOVE ,MCGINTY ,WHARF-ROAD-4>
+                             ;<MOVE ,JOHNNY ,WHARF-ROAD-3>
+                             ;<ESTABLISH-GOAL ,JOHNNY ,SHANTY>
+                             <ESTABLISH-GOAL ,MCGINTY ,MCGINTY-HQ>
+                             <TELL D ,MCGINTY
+" grins as he realizes what you're up to.">
+                             <SAY-MCGINTY-KNOWS>)
+                            (<G? ,PRESENT-TIME 699>
+                             <COND (<IN? ,JOHNNY ,OUTFITTERS-HQ>
+                                    <ESTABLISH-GOAL ,JOHNNY ,SHANTY>
+                                    <TELL
+"Johnny glares at " D ,MCGINTY
+" and then at his watch. \"There's no way.\" He turns
+to you. \"Forget it. We can't get this done in time.\"" CR>)
+                                   (T
+                                    <DISABLE <INT I-MCGINTY-FOLLOWS>>
+                                    <ESTABLISH-GOAL ,MCGINTY ,MCGINTY-HQ>
+                                    <DISABLE <INT I-EQUIP>>
+                                    <TELL
+D ,MCGINTY
+" turns to the salesman. \"I think... yeah! I will need that boat after
+all.\" He turns to you and grins." CR>)>)
+                            (<NOT <OR <VERB? WAIT WAIT-FOR>
+                                      <VERB? LOOK WALK>>>
+                             <TELL
+"Johnny glances nervously at " D ,MCGINTY "." CR>)
+                            (T <RETURN .V>)>)
+                     (,MCGINTY-KNOWS
+                      <DISABLE <INT I-EQUIP>>
+                      <RFALSE>)
+                     (,I-WAIT-FLAG
+                      <TELL 
+"Johnny seems unhappy to have his conversation interrupted." CR>
+                      <SETG I-WAIT-DURATION 9>)
+                     (<==? ,I-WAIT-RTN ,I-EQUIP>
+                      <COND (<G? ,I-WAIT-DURATION 0>
+                             <RFALSE>)
+                            (T
+                             <ESTABLISH-GOAL ,JOHNNY ,SHANTY>
+                             <ENABLE <QUEUE I-SHOVE-OFF <- 870 ,PRESENT-TIME>>>
+                             <DISABLE <INT I-EQUIP>>
+                             <COND (<EQUAL? ,SHIP-CHOSEN ,TRAWLER>
+                                    <SETG AMT-OWED <+ 50 <RANDOM 50>>>)
+                                   (T <SETG AMT-OWED <+ 400 <RANDOM 50>>>)>
+                             <SETG JOHNNY-MADE-DEAL T>
+                             <RATING-UPD 20>
+                             <TELL
+"Johnny hands him a list and the salesman quotes a price.
+Johnny gives him the money he has, then says to you, \"You'll need to chip
+in $" N ,AMT-OWED " plus the money for your stuff. We'll leave on the "
+D ,SHIP-CHOSEN " at high tide.\"|
+|
+He tells the " D ,SPEAR-CARRIER ", \"Deliver the stuff half an hour before high
+tide.\" He turns back to you. \"Better be on board then to watch
+the stuff.\"" CR>)>)
+                     (<NOT <IN? ,MCGINTY ,WHARF-ROAD-4>>
+                      <SETG I-WAIT-DURATION 9>
+                      <SETG I-WAIT-RTN ,I-EQUIP>
+                      <RFALSE>)>)
+              (T
+               <SETG I-WAIT-DURATION 0>
+               <COND (<L? <GET <INT I-EQUIP> ,C-TICK> -15>
+                      <DISABLE <INT I-EQUIP>>
+                      <COND (<IN? ,JOHNNY ,OUTFITTERS-HQ>
+                             <ESTABLISH-GOAL ,JOHNNY ,SHANTY>)>
+                      <I-PLOT-NEVER-STARTS>
+                      <RFALSE>)>)>>
+
+<GLOBAL WARNING-CTR 0>
+
+<GLOBAL AMT-OWED 0>
+
+<GLOBAL MCGINTY-KNOWS <>>
+
+<GLOBAL JOHNNY-MADE-DEAL <>>
+
+<ROUTINE TELL-NEED-BOAT ()
+        <TELL
+" \"We will need that boat after all,\" he says to the salesman as he
+leaves." CR>>
+
+<ROUTINE SAY-MCGINTY-KNOWS ()
+        <TELL-NEED-BOAT>
+        <MOVE ,JOHNNY ,WHARF-ROAD-3>
+        <ZERO-ATTENTION ,JOHNNY>
+        <ESTABLISH-GOAL ,JOHNNY ,SHANTY>
+        <TELL CR
+"Johnny glares at you. \"That was stupid! Now he's stopped us from renting
+the boat we need.\" He storms out.
+You can't help feeling fortunate that someone else happened to be here." CR>>
+
+<ROUTINE I-OTHERS-MEET ("AUX" (V T))
+        <COND (<G? ,PRESENT-TIME 720>
+               <DISABLE <INT I-OTHERS-MEET>>
+               <I-PLOT-NEVER-STARTS>
+               <COND (<IN? ,PLAYER ,CHAIR>
+                      <TELL "Johnny tells Pete the deal's off." CR>)
+                     (<IN? ,PLAYER ,SHANTY>
+                      <TELL "Johnny says something to Pete." CR>)
+                     (T <SET V <>>)>
+               <RETURN .V>)
+              (<OR <NOT <IN? ,JOHNNY ,SHANTY>>
+                   <NOT <IN? ,PETE ,SHANTY>>
+                   <NOT <IN? ,WEASEL ,SHANTY>>>
+               <ENABLE <QUEUE I-OTHERS-MEET 1>>
+               <RFALSE>)
+              (<NOT ,JOHNNY-MADE-DEAL>
+               <I-PLOT-NEVER-STARTS>)>
+        <COND (<IN? ,PLAYER ,CHAIR>
+               <TELL "Johnny tells Pete and " D ,WEASEL " the deal's ">
+               <COND (,JOHNNY-MADE-DEAL
+                      <TELL "on and to be at the " D ,SHIP-CHOSEN " at 2:30">)
+                     (T <TELL "off">)>
+               <TELL "." CR>)
+              (<IN? ,PLAYER ,SHANTY>
+               <TELL
+"Johnny, Pete, and " D ,WEASEL " are talking at a corner table." CR>)>>
+
+<ROUTINE I-TRAITOR-MEETING ("AUX" (FERRY-HERE <>))
+        <COND (<OR <IN? ,WEASEL ,FERRY>
+                   ,MCGINTY-KNOWS
+                   <NOT <IN? ,MCGINTY ,FERRY-LANDING>>>
+               <DISABLE <INT I-TRAITOR-MEETING>>
+               <RFALSE>)
+              (<NOT <IN? ,WEASEL ,FERRY-LANDING>>
+               <RFALSE>)
+              (<IN? ,ID-CARD ,WEASEL>
+               <COND (<IN? ,PASSBOOK .WEASEL>
+                      <COND (<IN? ,FERRY ,FERRY-LANDING>
+                             <MOVE ,WEASEL ,FERRY>
+                             <SET FERRY-HERE T>)>
+                      <DISABLE <INT I-TRAITOR-MEETING>>
+                      <COND (<IN? ,PLAYER ,FERRY-LANDING>
+                             <TELL-CORNER .FERRY-HERE "shakes his head">)>)
+                     (T
+                      <MOVE ,ID-CARD ,MCGINTY>
+                      <COND (<IN? ,FERRY ,FERRY-LANDING>
+                             <MOVE ,WEASEL ,FERRY>
+                             <SET FERRY-HERE T>)>
+                      <DISABLE <INT I-TRAITOR-MEETING>>
+                      <COND (<IN? ,PLAYER ,FERRY-LANDING>
+                             <TELL-CORNER .FERRY-HERE
+                                          "hands something to McGinty">)>)>)
+              (T
+               <MOVE ,ID-CARD ,WEASEL>
+               <SETG MCGINTY-MEETS-WEASEL <>>
+               <COND (<IN? ,PLAYER ,FERRY-LANDING>
+                      <TELL
+D ,MCGINTY " takes " D ,WEASEL
+" to a corner of the landing, where they talk." CR>)>)>>
+
+<ROUTINE TELL-CORNER (FERRY-HERE STR)
+        <TELL
+D ,MCGINTY " and " D ,WEASEL
+" are talking in a corner. The Weasel " .STR " and ">
+        <COND (.FERRY-HERE
+               <TELL "then boards the ferry">)
+              (T <TELL "they separate">)>
+        <TELL "." CR>>
+
+<ROUTINE I-SHOVE-OFF ("AUX" L)
+        <COND (<NOT <ENABLED? I-JOHNNY>>
+               <RFALSE>)
+              (<==? <GETP <META-LOC ,PLAYER> ,P?LINE>
+                    <GETP ,SHIP-CHOSEN ,P?LINE>>
+               <COND (<AND <G? ,PRESENT-TIME 930>
+                           <NOT ,LATITUDE-SET>
+                           <NOT ,LONGITUDE-SET>>
+                      <ALL-GO-HOME>
+                      <RFALSE>)
+                     (<IN? ,JOHNNY <META-LOC ,PLAYER>>
+                      <TELL D ,JOHNNY " turns to">)
+                     (T
+                      <SET L <LOC ,JOHNNY>>
+                      <MOVE ,JOHNNY <META-LOC ,PLAYER>>
+                      <ESTABLISH-GOAL ,JOHNNY .L>
+                      <TELL D ,JOHNNY " walks up behind">)>
+               <TELL " you and says, \"">
+               <COND (<NOT ,DELIVERY-MADE>
+                      <TELL
+"We're gonna have to forget it. Outfitters never delivered the stuff." CR>
+                      <ALL-GO-HOME>
+                      <RTRUE>)
+                     (<EQUAL? 0 ,LATITUDE-SET ,LONGITUDE-SET>
+                      <TELL
+"If we're gonna go, you have to tell me the minutes of ">
+                      <COND (<==? ,LATITUDE-SET 0>
+                             <TELL "latitude">
+                             <COND (<==? ,LONGITUDE-SET 0>
+                                    <TELL " and ">)>)>
+                      <COND (<==? ,LONGITUDE-SET 0>
+                             <TELL "longitude">)>
+                      <TELL ".\"" CR>
+                      <GRAB-ATTENTION ,JOHNNY>
+                      <ENABLE <QUEUE I-SHOVE-OFF <+ 30 <RANDOM 10>>>>
+                      <RTRUE>)
+                     (T <TELL
+"We'll be leaving shortly. Get some sleep.\"" CR>)>
+               ;<COND (<AND <==? ,LATITUDE-SET
+                                <GET ,LATITUDE-TABLE ,WRECK-FOUND>>
+                           <==? ,LONGITUDE-SET
+                                <GET ,LONGITUDE-TABLE ,WRECK-FOUND>>>
+                      <SETG AT-WRECK? T>)>
+               <COND (<==? ,SHIP-CHOSEN ,SALVAGER>
+                      <ESTABLISH-GOAL ,JOHNNY ,MM-WHEELHOUSE>)
+                     (T
+                      <ESTABLISH-GOAL ,JOHNNY ,NW-WHEELHOUSE>)>
+               <COND (<NOT <EQUAL? <LOC ,WEASEL>
+                                   ,FERRY ,GLOBAL-FERRY ,LOCAL-GLOBALS>>
+                      <ESTABLISH-GOAL ,WEASEL <LOC ,DECK-CHAIR>>)>
+               <COND (<0? ,AMT-OWED>
+                      <ENABLE <QUEUE I-BOAT-TRIP 10>>
+                      <RFALSE>)>)
+              (<G? ,PRESENT-TIME 900>
+               <ALL-GO-HOME>
+               <RFALSE>)
+              (T <ENABLE <QUEUE I-SHOVE-OFF <+ 30 <RANDOM 10>>>>
+               <RFALSE>)>>
+
+<ROUTINE ALL-GO-HOME ()
+        <ESTABLISH-GOAL ,PETE ,SHANTY>
+        <COND (<AND <NOT <IN? ,WEASEL ,FERRY>>
+                    <NOT <IN? ,WEASEL ,GLOBAL-FERRY>>
+                    <NOT <IN? ,WEASEL ,LOCAL-GLOBALS>>>
+               <ESTABLISH-GOAL ,WEASEL ,SHANTY>)>
+        <SETG JOHNNY-SILENT T>
+        <ESTABLISH-GOAL ,JOHNNY ,SHANTY>>
+
+<ROUTINE I-BOAT-TRIP ("AUX" BOAT OT EXCESS)
+        <COND (,ASLEEP <RFALSE>)
+              (<EQUAL? <GETP <META-LOC ,PLAYER> ,P?LINE>
+                       <SET BOAT <GETP ,SHIP-CHOSEN ,P?LINE>>>
+               <COND (<NOT <==? <GETP <LOC ,WEASEL> ,P?LINE> .BOAT>>
+                      <TELL-COMES-UP ,JOHNNY>
+                      <TELL
+"\"The Weasel's not on board. The deal's off.\"" CR>
+                      <FINISH>)
+                     (<==? <GETP <LOC ,MCGINTY> ,P?LINE> .BOAT>
+                      <TELL-COMES-UP ,WEASEL>
+                      <JIGS-UP
+"\"You brought McGinty!\" Next thing you know, your throat's been slit.">)
+                     (<IN? ,ENVELOPE ,JOHNNY>
+                      <MOVE ,JOHNNY <LOC ,WEASEL>>
+                      <ROUGH-JUSTICE>)>
+               ;<ENABLE <QUEUE I-CHANGE-WATCH <- 1075 ,PRESENT-TIME>>>
+               ;<ENABLE <QUEUE I-OBSTACLES <RANDOM 90>>>
+               ;<SETG HOW-TIRED 2>
+               <DISABLE <INT I-MCGINTY-FOLLOWS>>
+               <SETG SOUPS-ON T>
+               <RATING-UPD 20>
+               <COND (<AND <==? ,LATITUDE-SET 20>
+                           <==? ,LONGITUDE-SET 25>>
+                      <TELL-COMES-UP ,JOHNNY>
+                      <JIGS-UP
+"\"What kind of joke is this, giving me the coordinates of the island?\"">)>
+               <COND (<EQUAL? <META-LOC ,PLAYER> ,MM-GALLEY ,NW-GALLEY>
+                      <TELL "Pete announces that the stew is ready." CR>)>
+               <COND (<EQUAL? ,SHIP-CHOSEN ,TRAWLER>
+                      <SETG TRAWLER-DOCKED <>>)
+                     (T <SETG SALVAGER-DOCKED <>>)>
+               <SETG AT-SEA T>
+               ;<SETG ON-WATCH ,WEASEL>
+               ;<SET-NEXT-WATCH>
+               <COND (<IN? ,PLAYER ,DECK-CHAIR>
+                      <MOVE ,PLAYER <LOC ,DECK-CHAIR>>)>
+               ;<MOVE ,WEASEL ,DECK-CHAIR>
+               <COND (<GLOBAL-IN? ,RAILING <LOC ,PLAYER>>
+                      <TELL
+"As the engines roar to life, you go to the " D ,RAILING
+" to watch the shoreline recede.">
+                      <COND (<IN? ,DECK-CHAIR <LOC ,PLAYER>>
+                             <TELL-FERRY-KLUDGE "sits down for his watch">)>
+                      <TELL
+" As the boat leaves the wharf, y">)
+                     (T <TELL
+"The boat begins to move through the waves. Y">)>
+               <TELL "ou feel the thrill of being out to sea once again." CR>
+               <CRLF>
+               <COND (<NOT <IN? ,PLAYER ,BUNK>>
+                      <TELL "You ">
+                      <COND (<NOT <IN? ,PLAYER <LOC ,BUNK>>>
+                             <SETG HERE <LOC ,BUNK>>
+                             <MOVE-SHARED-OBJECTS ,HERE>
+                             <COND (<IN? ,AIR-HOSE ,DEEP-SUIT>
+                                    <MOVE ,AIR-HOSE ,MM-COMPRESSOR>
+                                    <TELL "disconnect the " D ,AIR-HOSE ", ">)>
+                             <TELL "go to the crew's quarters and ">)>
+                      <MOVE ,PLAYER ,BUNK>
+                      <TELL "climb into your bunk">
+                      <STRIP-EQUIPMENT>
+                      <TELL ". " CR>)>
+               <TELL
+"In no time, the rhythm of the ocean lulls you to sleep..." CR CR>
+               <MOVE ,PETE ,DECK-CHAIR>
+               <MOVE ,JOHNNY ,HERE>
+               <COND (<==? ,SHIP-CHOSEN ,SALVAGER>
+                      <MOVE ,WEASEL ,MM-AFT-DECK>)
+                     (T <MOVE ,WEASEL ,NW-AFT-DECK>)>
+               <COND (<AND <==? <GETP <META-LOC ,ENVELOPE> ,P?LINE> .BOAT>
+                           <NOT <IN? ,ENVELOPE ,UNDER-BUNK>>>
+                      <MOVE ,ENVELOPE ,WEASEL>)>
+               <SET OT ,PRESENT-TIME>
+               <SETG PRESENT-TIME <+ 345 <RANDOM 15>>>
+               ;<DISABLE <INT I-FERRY>>
+               ;<DISABLE <INT I-FERRY-APPROACHING>>
+               ;<DISABLE <INT I-FERRY-LEAVING>>
+               ;<DISABLE <INT I-FERRY-GONE>>
+               <INTERRUPT-CHECK <SET EXCESS <- <+ ,PRESENT-TIME 1440> .OT>>>
+               <COND (,WATCH-WOUND
+                      <SETG WATCH-MOVES <+ ,WATCH-MOVES <MOD .EXCESS 60>>>
+                      <COND (<G? ,WATCH-MOVES 59>
+                             <SETG WATCH-MOVES <- ,WATCH-MOVES 60>>
+                             <SETG WATCH-SCORE <+ ,WATCH-SCORE 1>>)>
+                      <SETG WATCH-SCORE <+ ,WATCH-SCORE </ .EXCESS 60>>>
+                      <REPEAT ()
+                              <COND (<G? ,WATCH-SCORE 11>
+                                     <SETG WATCH-SCORE <- ,WATCH-SCORE 12>>)
+                                    (T <RETURN>)>>)>
+               <WATCH-UPDATE>
+               <COND (<AND <==? ,LATITUDE-SET 40>
+                           <==? ,LONGITUDE-SET 45>>
+                      <SETG WRECK-CHOSEN 1>
+                      <SETG OCEAN-BOTTOM 400>)
+                     (<AND <==? ,LATITUDE-SET 25>
+                           <==? ,LONGITUDE-SET 25>>
+                      <SETG WRECK-CHOSEN 2>
+                      <SETG OCEAN-BOTTOM 150>)
+                     (<AND <==? ,LATITUDE-SET 15>
+                           <==? ,LONGITUDE-SET 50>>
+                      <SETG WRECK-CHOSEN 3>
+                      <SETG OCEAN-BOTTOM 350>)
+                     (<NOT <SETG OCEAN-BOTTOM <OCEAN-BOTTOM-FCN>>>
+                      <JIGS-UP
+"You are awakened by what feels like your ship running aground. You are put
+back to a permanent sleep by the Weasel's knife.">)>
+               <SETG HOW-TIRED 1>
+               <COND (<L? ,HOW-HUNGRY 2>
+                      <SETG HOW-HUNGRY 1>)>
+               <COND (<L? ,HOW-THIRSTY 2>
+                      <SETG HOW-THIRSTY 1>)>
+               <ENABLE <QUEUE I-HUNGER 10>>
+               <ENABLE <QUEUE I-THIRST 15>>
+               <ENABLE <QUEUE I-TIRED 869>>
+               <ENABLE <QUEUE I-ENDIT <- 720 ,PRESENT-TIME>>>
+               <TELL D ,JOHNNY " shakes your shoulder and wakes you. ">
+               <COND (<EQUAL? ,SHIP-CHOSEN ,TRAWLER>
+                      <ESTABLISH-GOAL ,JOHNNY ,NW-CAPT-CABIN>)
+                     (T <ESTABLISH-GOAL ,JOHNNY ,MM-CAPT-CABIN>)>
+               ;<SETG MOMENT-OF-TRUTH T>
+               <DISABLE <INT I-BOAT-TRIP>>
+               <TELL "\"We've arrived. You're up as soon as you're ready.\"" CR>)>>    
+
+<ROUTINE STRIP-EQUIPMENT ("AUX" F N (V <>))
+        <SET F <FIRST? ,PLAYER>>
+        <REPEAT ()
+         <COND (<NOT .F> <RETURN>)>
+         <SET N <NEXT? .F>>
+         <COND (<NOT <==? .F ,WATCH>>
+                <MOVE .F <LOC ,BUNK>>
+                <FCLEAR .F ,WORNBIT>
+                <SET V T>)>
+         <SET F .N>>
+        <COND (.V <TELL ", dropping your equipment">)>>
+
+<ROUTINE INTERRUPT-CHECK (DUR "AUX" C E TICK FOO R)
+        <SET C <REST ,C-TABLE ,C-INTS>>
+        <SET E <REST ,C-TABLE ,C-TABLELEN>>
+        <SETG ASLEEP T>
+        <REPEAT ()
+                <COND (<==? .C .E> <RETURN>)
+                      (<NOT <0? <GET .C ,C-ENABLED?>>>
+                       <SET TICK <GET .C ,C-TICK>>
+                       <COND (<0? .TICK>)
+                             (T
+                              <SET FOO <- .TICK .DUR>>
+                              <COND (<L? .FOO 2>
+                                     <APPLY <GET .C ,C-RTN>>
+                                     <PUT .C ,C-TICK <- .TICK 1>>)
+                                    (T <PUT .C ,C-TICK .FOO>)>
+                              ;<COND (<AND <NOT <G? .TICK 1>>
+                                          <SET VAL <APPLY <GET .C ,C-RTN>>>>
+                                     <COND (,DEBUG
+                                            <TELL "[Interrupt returning T.]" CR>)>
+                                     <COND (<OR <NOT .FLG>
+                                                <==? .VAL ,M-FATAL>>
+                                            <SET FLG .VAL>)>)>)>)>
+                <SET C <REST .C ,C-INTLEN>>>
+        <SETG ASLEEP <>>>
+
+<GLOBAL ASLEEP <>>
+
+<ROUTINE LE? (LAT LON CNST)
+        <NOT <G? <+ <* .LAT ,LATITUDE-SET> <* .LON ,LONGITUDE-SET>> .CNST>>>
+
+<ROUTINE GE? (LAT LON CNST)
+        <NOT <L? <+ <* .LAT ,LATITUDE-SET> <* .LON ,LONGITUDE-SET>> .CNST>>>
+
+<ROUTINE OCEAN-BOTTOM-FCN ()
+        <COND (<OR <L? ,LONGITUDE-SET 5>
+                   <G? ,LONGITUDE-SET 55>
+                   <L? ,LATITUDE-SET 5>
+                   <G? ,LATITUDE-SET 45>>
+               <JIGS-UP
+"Your boat is lost in a sudden squall while you sleep.">)
+              (<AND <NOT <G? ,LATITUDE-SET 17>>
+                    <LE? 2 -5 -11>
+                    <LE? 1 1 30>>
+               <RFALSE>)
+              (<AND <NOT <G? ,LATITUDE-SET 6>>
+                    <NOT <G? ,LONGITUDE-SET 36>>
+                    <NOT <L? ,LONGITUDE-SET 34>>>
+               <RFALSE>)
+              (<AND <NOT <G? ,LONGITUDE-SET 34>>
+                    <NOT <G? ,LATITUDE-SET 7>>
+                    <LE? 1 -1 -26>>
+               <RFALSE>)
+              (<GE? 2 1 115>
+               <RETURN 400>)
+              (<AND <GE? 1 1 68>
+                    <LE? 1 -2 -91>>
+               <RETURN 400>)
+              (<OR <NOT <L? ,LATITUDE-SET 40>>
+                   <GE? 15 4 680>
+                   <GE? 2 1 107>
+                   <GE? 1 1 76>
+                   <AND <NOT <L? ,LONGITUDE-SET 44>>
+                        <GE? 2 1 70>
+                        <OR <NOT <L? ,LONGITUDE-SET 52>>
+                            <LE? 5 -3 -57>
+                            <LE? 1 -1 -31>>>>
+               <RETURN 350>)
+              (<OR <G? ,LATITUDE-SET 37>
+                   <GE? 6 1 240>
+                   <GE? 13 6 635>
+                   <GE? 1 1 72>
+                   <AND <NOT <L? ,LONGITUDE-SET 41>>
+                        <GE? 13 8 497>
+                        <OR <NOT <L? ,LONGITUDE-SET 49>>
+                            <LE? 6 -5 -121>
+                            <LE? 2 -3 -103>>>>
+               <RETURN 300>)
+              (<OR <NOT <L? ,LATITUDE-SET 35>>
+                   <GE? 2 -1 57>
+                   <GE? 44 15 1810>
+                   <GE? 4 3 230>
+                   <AND <NOT <L? ,LONGITUDE-SET 37>>
+                        <GE? 13 7 415>
+                        <OR <NOT <L? ,LONGITUDE-SET 46>>
+                            <LE? 3 -2 -32>>>>
+               <RETURN 250>)
+              (<OR <AND <NOT <G? ,LATITUDE-SET 19>>
+                        <LE? 5 3 131>
+                        <LE? 7 6 214>>
+                   <AND <NOT <G? ,LATITUDE-SET 7>>
+                        <NOT <G? ,LONGITUDE-SET 35>>>
+                   <AND <NOT <G? ,LATITUDE-SET 8>>
+                        <LE? 2 -1 -16>
+                        <LE? 1 1 45>
+                        <LE? 2 1 51>>>
+               <RETURN 50>)
+              (<OR <AND <NOT <G? ,LATITUDE-SET 20>>
+                        <LE? 2 1 50>
+                        <LE? 10 7 286>>
+                   <AND <NOT <G? ,LATITUDE-SET 9>>
+                        <LE? 3 2 99>>>
+               <RETURN 100>)
+              (<OR <AND <NOT <G? ,LATITUDE-SET 22>>
+                        <OR <LE? 5 3 140>
+                            <LE? 7 3 172>>>
+                   <AND <NOT <G? ,LATITUDE-SET 10>>
+                        <LE? 9 5 270>>>
+               <RETURN 150>)
+              (<AND <NOT <G? ,LONGITUDE-SET 29>>
+                    <NOT <L? ,LONGITUDE-SET 18>>
+                    <NOT <G? ,LATITUDE-SET 24>>
+                    <NOT <L? ,LATITUDE-SET 19>>
+                    <LE? 9 4 296>
+                    <GE? 4 1 102>
+                    <GE? 2 1 62>>
+               <RETURN 50>)
+              (<AND <NOT <G? ,LATITUDE-SET 28>>
+                    <NOT <L? ,LATITUDE-SET 17>>
+                    <NOT <G? ,LONGITUDE-SET 34>>
+                    <NOT <L? ,LONGITUDE-SET 15>>
+                    <LE? 1 -1 11>
+                    <GE? 1 1 39>
+                    <GE? 5 2 141>
+                    <GE? 1 -1 -15>
+                    <OR <LE? 4 1 118>
+                        <LE? 6 5 268>>>
+               <RETURN 100>)
+              (<AND <NOT <G? ,LATITUDE-SET 32>>
+                    <NOT <L? ,LATITUDE-SET 16>>
+                    <NOT <G? ,LONGITUDE-SET 38>>
+                    <GE? 5 -3 -19>
+                    <GE? 7 3 196>
+                    <GE? 3 7 164>
+                    <LE? 1 -1 18>
+                    <OR <LE? 7 6 344>
+                        <LE? 11 4 394>>>
+               <RETURN 150>)
+              (T <RETURN 200>)>>
+
+;<ROUTINE V-DEPTH-CHECK ("AUX" DEP LAT LON)
+        <SET LAT 5>
+        <SET LON 5>
+        <REPEAT ()
+         <TELL "Latitude:" N .LAT " Longitude:" N .LON " Depth:">
+         <SETG LATITUDE-SET .LAT>
+         <SETG LONGITUDE-SET .LON>
+         <COND (<SET DEP <OCEAN-BOTTOM-FCN>>
+                <TELL N .DEP>)
+               (T <TELL "0">)>
+         <CRLF>
+         <COND (<G? <SET LON <+ .LON 5>> 55>
+                <COND (<G? <SET LAT <+ .LAT 5>> 45>
+                       <RETURN>)>
+                <SET LON 5>)>>>
+
+;<ROUTINE I-DIVETIME ()
+        <COND (<IN-MOTION? ,JOHNNY>
+               <COND (<NOT <EQUAL? <GET <GET ,GOAL-TABLES
+                                        <GETP ,JOHNNY ,P?CHARACTER>> ,GOAL-F>
+                                   <META-LOC ,PLAYER>>>
+                      <ESTABLISH-GOAL ,JOHNNY <META-LOC ,PLAYER>>)>
+               <RFALSE>)>
+        <COND (<EQUAL? ,SHIP-CHOSEN ,TRAWLER>
+               <ESTABLISH-GOAL ,WEASEL ,NW-AFT-DECK>)
+              (T <ESTABLISH-GOAL ,WEASEL ,MM-AFT-DECK>)>
+        <DISABLE <INT I-OBSTACLES>>
+        <COND (<IN? ,JOHNNY <META-LOC ,PLAYER>>
+               <JOHNNY-SAYS-GO>
+               <RFATAL>)
+              (T
+               <ESTABLISH-GOAL ,JOHNNY <META-LOC ,PLAYER>>
+               <ENABLE <QUEUE I-DIVETIME -1>>
+               <RFALSE>)>>
+
+<GLOBAL AT-SEA <>>
+
+<ROUTINE I-HUNGER ("AUX" N)
+        <COND (,ASLEEP <RFALSE>)>
+        <SETG HOW-HUNGRY <+ ,HOW-HUNGRY 1>>
+        <COND (<==? ,HOW-HUNGRY 1>
+               <ENABLE <QUEUE I-HUNGER 300>>
+               <RFALSE>)
+              (<==? ,HOW-HUNGRY 2>
+               <ENABLE <QUEUE I-HUNGER 20>>
+               <TELL "You begin to feel hungry." CR>
+               <RFALSE>)
+              (<==? ,HOW-HUNGRY 3>
+               <ENABLE <QUEUE I-HUNGER 20>>
+               <TELL "Your stomach begins to bother you. Better ">
+               <COND (<EQUAL? <META-LOC ,PLAYER> <META-LOC ,FOOD>>
+                      <TELL "do something about it">)
+                     (T <TELL "find some food">)>
+               <TELL "!" CR>
+               <RFALSE>)
+              (<G? ,HOW-HUNGRY 3>
+               <COND (<==? ,HERE ,SHANTY>
+                      <SET N 2>)
+                     (T <SET N 6>)>
+               <ENABLE <QUEUE I-HUNGER .N>>
+               <TELL "Your stomach is growling loudly." CR>
+               <RFATAL>)>>
+
+<ROUTINE I-THIRST ()
+        <COND (,ASLEEP <RFALSE>)>
+        <SETG HOW-THIRSTY <+ ,HOW-THIRSTY 1>>
+        <COND (<==? ,HOW-THIRSTY 1>
+               <ENABLE <QUEUE I-THIRST 110>>
+               <TELL "Your throat starts to feel dry." CR>
+               <RFALSE>)
+              (<==? ,HOW-THIRSTY 2>
+               <ENABLE <QUEUE I-THIRST 115>>
+               <TELL "You feel fairly thirsty." CR>
+               <RFALSE>)
+              (<==? ,HOW-THIRSTY 3>
+               <ENABLE <QUEUE I-THIRST 15>>
+               <TELL-YOUD-BETTER "find something to drink soon!">
+               <RFALSE>)
+              (<G? ,HOW-THIRSTY 3>
+               <ENABLE <QUEUE I-THIRST 4>>
+               <TELL "You lick your lips and clear your throat." CR>
+               <RFATAL>)>>
+
+<GLOBAL HOW-THIRSTY 0>
+
+<ROUTINE I-TIRED ()
+        <COND (,ASLEEP <RFALSE>)
+              (<L? ,HOW-TIRED 6>
+               <SETG HOW-TIRED <+ ,HOW-TIRED 1>>)>
+        <COND (<==? ,HOW-TIRED 1>
+               <ENABLE <QUEUE I-TIRED 479>>
+               <RFALSE>)
+              (<==? ,HOW-TIRED 2>
+               <ENABLE <QUEUE I-TIRED 1>>
+               <RFALSE>)
+              (<==? ,HOW-TIRED 3>
+               <ENABLE <QUEUE I-TIRED 30>>
+               <TELL "You yawn as you begin to feel drowsy." CR>)
+              (<==? ,HOW-TIRED 4>
+               <ENABLE <QUEUE I-TIRED 20>>
+               <TELL "You are starting to feel tired." CR>
+               <RFALSE>)
+              (<==? ,HOW-TIRED 5>
+               <ENABLE <QUEUE I-TIRED 10>>
+               <TELL 
+"You yawn and feel very tired. Think about going to bed." CR>)
+              (<==? ,HOW-TIRED 6>
+               <TELL
+"Exhaustion overwhelms you. Keeping your eyes open is painful.">
+               <COND (<NOT ,AT-SEA>
+                      <TELL " ">
+                      <V-SLEEP>)
+                     (T
+                      <ENABLE <QUEUE I-TIRED 6>>
+                      <CRLF>)>
+               <RFATAL>)>>
+
+;<ROUTINE I-OBSTACLES ("AUX" (UPFRONT? <>))
+        <SETG O-CTR <+ ,O-CTR 1>>
+        <COND (<AND <EQUAL? <META-LOC ,PLAYER> ,MM-FORE-DECK ,NW-FORE-DECK>
+                    <NOT ,ASLEEP?>>
+               <SET UPFRONT? T>)>;"Historical note: The compiler sucks."
+        <COND (<==? ,O-CTR 1>
+               <ENABLE <QUEUE I-OBSTACLES -1>>
+               <SETG O-NUM <RANDOM 3>>
+               <SETG O-SIDE <RANDOM 2>>
+               <COND (<QUEUED? I-USELESS-TURN>
+                      <I-USELESS-TURN>)>
+               <COND (.UPFRONT?
+                      <OPRINT>
+                      <RFATAL>)>)
+              (<==? ,O-CTR 2>
+               <COND (.UPFRONT?
+                      <OPRINT>
+                      <COND (<AND ,ON-WATCH
+                                  <NOT <EQUAL? ,ON-WATCH ,PLAYER>>>
+                             <SETG BUTTON-PUSHED ,O-SIDE>
+                             <START-SENTENCE ,ON-WATCH>
+                             <TELL " pushes the button to his ">
+                             <COND (<==? ,O-SIDE 1>
+                                    <TELL "left">)
+                                   (T <TELL "right">)>
+                             <TELL "." CR>)
+                            (T <RFATAL>)>
+                      <RTRUE>)
+                     (<AND ,ON-WATCH
+                           <NOT <EQUAL? ,ON-WATCH ,PLAYER>>>
+                      <SETG BUTTON-PUSHED ,O-SIDE>
+                      <COND (<AND <EQUAL? ,HERE ,MM-WHEELHOUSE ,NW-WHEELHOUSE>
+                                  <G? ,BUTTON-PUSHED 0>>
+                             <TELL 
+"A tone sounds. Johnny spins the wheel ">
+                             <COND (<==? ,BUTTON-PUSHED 1> <TELL "right">)
+                                   (T <TELL "left">)>
+                             <TELL "." CR>)>)>)
+              (<G? ,O-CTR 2>
+               <COND (.UPFRONT?
+                      <COND (<==? ,BUTTON-PUSHED 0>
+                             <TELL 
+"You watch in horror as the " D ,SHIP-CHOSEN " collides with" <OPRINT> "! ">
+                             <JIGS-UP
+"As the boat rapidly sinks, you see several sharks in the area. Mercifully,
+you black out before you meet your fate.">)
+                            (T
+                             <TELL "The boat veers to ">
+                             <COND (<==? ,BUTTON-PUSHED 1> <TELL "starboard">)
+                                   (T <TELL "port">)>
+                             <COND (<==? ,O-SIDE ,BUTTON-PUSHED>
+                                    <SETG BUTTON-PUSHED 0>
+                                    <TELL ", away from" <OPRINT> "." CR>
+                                    <SETG O-CTR 0>
+                                    <ENABLE <QUEUE I-OBSTACLES
+                                                   <+ 15 <RANDOM 130>>>>
+                                    <RTRUE>)
+                                   (T <TELL
+". Unfortunately, this puts you directly on a collision course! ">
+                                    <SETG BUTTON-PUSHED 0>
+                                    <I-OBSTACLES>)>)>)
+                     (<NOT <EQUAL? ,O-SIDE ,BUTTON-PUSHED>>
+                           <TELL
+"You feel the boat list to ">
+                           <COND (<==? ,O-SIDE 1> <TELL "port">)
+                                 (T <TELL "starboard">)>
+                           <JIGS-UP
+", and then start to sink! The water rises before you can respond.">)
+                     (T
+                      <SETG O-CTR 0>
+                      <SETG BUTTON-PUSHED 0>
+                      <ENABLE <QUEUE I-OBSTACLES <+ 15 <RANDOM 130>>>>
+                      <COND (<AND <NOT <EQUAL? ,ON-WATCH ,WEASEL>>
+                                  <0? ,WATCH-CHANGE-CTR>>
+                             <COND (<EQUAL? ,SHIP-CHOSEN ,SALVAGER>
+                                    <COND (<IN? ,WEASEL ,MM-ENGINE-ROOM>
+                                           <ESTABLISH-GOAL ,WEASEL
+                                                           ,MM-CREW-QTRS>)
+                                          (T <ESTABLISH-GOAL ,WEASEL
+                                                           ,MM-ENGINE-ROOM>)>)
+                                   (T
+                                    <COND (<IN? ,WEASEL ,NW-ENGINE-ROOM>
+                                           <ESTABLISH-GOAL ,WEASEL
+                                                           ,NW-CREW-QTRS>)
+                                          (T <ESTABLISH-GOAL ,WEASEL
+                                                        ,NW-ENGINE-ROOM>)>)>)>
+                      <COND (<AND <NOT <EQUAL? ,ON-WATCH ,PETE>>
+                                  <0? ,WATCH-CHANGE-CTR>>
+                             <COND (<IN? ,PETE <LOC ,DRINKING-WATER>>
+                                    <ESTABLISH-GOAL ,PETE <LOC ,BUNK>>)
+                                   (T
+                                <ESTABLISH-GOAL ,PETE <LOC ,DRINKING-WATER>>)>
+                             ;<COND (<EQUAL? ,SHIP-CHOSEN ,SALVAGER>
+                                    <COND (<IN? ,PETE ,MM-GALLEY>
+                                           <ESTABLISH-GOAL ,PETE
+                                                           ,MM-CREW-QTRS>)
+                                          (T <ESTABLISH-GOAL ,PETE
+                                                             ,MM-GALLEY>)>)
+                                   (T
+                                    <COND (<IN? ,PETE ,NW-GALLEY>
+                                           <ESTABLISH-GOAL ,PETE
+                                                           ,NW-CREW-QTRS>)
+                                          (T <ESTABLISH-GOAL ,PETE
+                                                             ,NW-GALLEY>)>)>)>
+                      <RFALSE>)>)>>
+
+;<ROUTINE OPRINT ("AUX" SIDE)
+        <COND (<==? ,O-SIDE 1> <SET SIDE "port">)
+              (T <SET SIDE "starboard">)>
+        <COND (<==? ,O-NUM 1>
+               <COND (<==? ,O-CTR 1>
+                      <TELL
+"Some debris approaches the " .SIDE " bow of the boat!" CR>)
+                     (<==? ,O-CTR 2>
+                      <TELL
+"To " .SIDE ", some floating wreckage heads for the boat!" CR>)
+                     (<VERB? WALK> <RETURN " some debris">)
+                     (T <RETURN " the debris">)>)
+              (<==? ,O-NUM 2>
+               <COND (<==? ,O-CTR 1>
+                      <TELL
+"You can see a coral reef ahead and off the " .SIDE " bow!" CR>)
+                     (<==? ,O-CTR 2>
+                      <TELL
+"A large, jagged coral reef looms ahead and to " .SIDE "!" CR>)
+                     (<VERB? WALK> <RETURN " a coral reef">)
+                     (T <RETURN " the coral reef">)>)
+              (<==? ,O-NUM 3>
+               <COND (<==? ,O-CTR 1>
+                      <TELL
+"To " .SIDE ", a boat on a collision course approaches!" CR>)
+                     (<==? ,O-CTR 2>
+                      <TELL
+"A boat comes directly at your " .SIDE " bow!" CR>)
+                     (<VERB? WALK> <RETURN " a boat">)
+                     (T <RETURN " the boat">)>)>>
+
+;<GLOBAL ON-WATCH <>>
+
+;<GLOBAL O-NUM 0>
+
+;<GLOBAL O-SIDE 0>
+
+;<GLOBAL O-CTR 0>
+
+;<GLOBAL BUTTON-PUSHED 0>
+
+;<GLOBAL USELESS-TURNS 0>
+
+;<ROUTINE I-USELESS-TURN ("AUX" (V <>))
+        <COND (<NOT ,AT-SEA>
+               <SETG BUTTON-PUSHED 0>
+               <DISABLE <INT I-USELESS-TURN>>
+               <RFALSE>)>
+        <SETG USELESS-TURNS <+ ,USELESS-TURNS 1>>
+        <COND (<G? ,O-CTR 1>
+               <RFALSE>)
+              (<AND <VERB? PUSH>
+                    <PRSO? ,LEFT-BUTTON ,RIGHT-BUTTON>>
+               T)
+              (T
+               <COND (<AND <EQUAL? <META-LOC ,PLAYER> ,MM-FORE-DECK
+                                                      ,NW-FORE-DECK>
+                           <NOT ,ASLEEP?>>
+                      <TELL "The boat veers to ">
+                      <COND (<==? ,BUTTON-PUSHED 1> <TELL "starboard">)
+                            (T <TELL "port">)>
+                      <TELL "." CR>
+                      <SET V T>)>
+               <SETG BUTTON-PUSHED 0>)>
+        <DISABLE <INT I-USELESS-TURN>>
+        .V>
+
+;<ROUTINE I-CHANGE-WATCH ("AUX" NEXT-UP (V <>))
+        <COND (<AND <G? ,O-CTR 0>
+                    ,ON-WATCH>
+               <COND (<NOT <QUEUED? I-CHANGE-WATCH>>
+                      <ENABLE <QUEUE I-CHANGE-WATCH 1>>)>
+               <RFALSE>)>
+        <SET NEXT-UP <GET ,WATCH-TABLE ,WT-PERSON>>
+        <COND (<==? .NEXT-UP ,PLAYER>
+               <COND (<IN? ,PLAYER <LOC ,DECK-CHAIR>>
+                      <COND (<AND ,ON-WATCH
+                                  <NOT <==? ,ON-WATCH ,PLAYER>>
+                                  <NOT ,SEARCHER>>
+                             <SET V T>
+                             <START-SENTENCE ,ON-WATCH>
+                             <TELL
+" says to you, \"Your watch,\" stands, then goes down the ladder." CR>
+                             <MOVE ,ON-WATCH <LOC ,BUNK>>)>
+                      <SETG ON-WATCH ,PLAYER>
+                      <COND (<NOT ,SEARCHER>
+                             <SET-NEXT-WATCH>
+                             <RETURN .V>)>)>
+               <SETG WATCH-CHANGE-CTR <+ ,WATCH-CHANGE-CTR 1>>
+               <COND (<==? ,WATCH-CHANGE-CTR 1>
+                      <ENABLE <QUEUE I-CHANGE-WATCH -1>>
+                      <COND (<EQUAL? <META-LOC ,PLAYER> ,MM-CREW-QTRS
+                                                        ,NW-CREW-QTRS>
+                             <COND (,ASLEEP?
+                                    <TELL "You are awakened by ">)
+                                   (T <TELL "You hear ">)>
+                             <TELL
+D ,ON-WATCH " yelling down that it's your watch." CR>)
+                            (<AND <GLOBAL-IN? ,RAILING ,HERE>
+                                  <NOT <IN? ,DECK-CHAIR ,HERE>>>
+                             <TELL
+"You hear " D ,ON-WATCH " yelling that it's your watch." CR>)>)
+                     (<==? ,WATCH-CHANGE-CTR 5>
+                      <COND (<EQUAL? <META-LOC ,PLAYER> ,MM-CREW-QTRS
+                                                        ,NW-CREW-QTRS>
+                             <RFALSE>)>
+                      <SETG SEARCHER ,ON-WATCH>
+                      <SETG ON-WATCH <>>
+                      <MOVE ,SEARCHER <LOC ,DECK-CHAIR>>
+                      <ESTABLISH-GOAL ,SEARCHER <META-LOC ,PLAYER>>
+                      <RFALSE>)
+                     (<G? ,WATCH-CHANGE-CTR 5>
+                      <COND (<EQUAL? ,ON-WATCH ,PETE ,WEASEL>
+                             <MOVE ,ON-WATCH <META-LOC ,PLAYER>>
+                             <SETG QCONTEXT ,ON-WATCH>
+                             <SETG QCONTEXT-ROOM <META-LOC ,PLAYER>>
+                             <COND (<IN? ,PLAYER ,BUNK>
+                                    <TELL
+"A hand shakes you. \"Get up and get topside!\" " D ,ON-WATCH " says.
+\"You're on watch!\"" CR>)
+                                   (T
+                                    <START-SENTENCE ,ON-WATCH>
+                                    <TELL
+" walks in. \"Get to the foredeck!\" he says. \"It's your watch!\"" CR>)>
+                             <SETG ON-WATCH <>>
+                             <RTRUE>)
+                            (<NOT ,SEARCHER> <RFALSE>)
+                            (<NOT <EQUAL? <GET <GET ,GOAL-TABLES
+                                               <GETP ,SEARCHER ,P?CHARACTER>>
+                                          ,GOAL-F>
+                                          <META-LOC ,PLAYER>>>
+                             <ESTABLISH-GOAL ,SEARCHER <META-LOC ,PLAYER>>
+                             <RFALSE>)>)>)
+              (T
+               <SETG WATCH-CHANGE-CTR <+ ,WATCH-CHANGE-CTR 1>>
+               <COND (<==? ,WATCH-CHANGE-CTR 1>
+                      <ENABLE <QUEUE I-CHANGE-WATCH -1>>
+                      <COND (<AND <EQUAL? <META-LOC ,PLAYER> ,MM-CREW-QTRS
+                                                             ,NW-CREW-QTRS>
+                                  <NOT <EQUAL? ,ON-WATCH ,PLAYER>>>
+                             <COND (,ASLEEP?
+                                    <TELL "You are awakened by ">)
+                                   (T <TELL "You hear ">)>
+                             <TELL
+D ,ON-WATCH " yelling to " D .NEXT-UP " that it's his watch." CR>
+                             <SET V T>)>
+                      <ESTABLISH-GOAL .NEXT-UP <LOC ,DECK-CHAIR>>
+                      .V)
+                     (<IN? .NEXT-UP <LOC ,DECK-CHAIR>>
+                      <COND (<==? ,ON-WATCH ,PLAYER>
+                             <COND (<IN? ,PLAYER ,DECK-CHAIR>
+                                    <SETG QCONTEXT .NEXT-UP>
+                                    <SETG QCONTEXT-ROOM <LOC ,DECK-CHAIR>>
+                                    <TELL-COMES-UP .NEXT-UP>
+                                    <TELL "\"Get up and I'll relieve you.\"" CR>)
+                                   (T
+                                    <SETG ON-WATCH .NEXT-UP>
+                                    <MOVE ,ON-WATCH ,DECK-CHAIR>
+                                    <COND (<L? ,HOW-TIRED 2>
+                                           <SETG HOW-TIRED 2>)>
+                                    <SET-NEXT-WATCH>
+                                    <COND (<IN? ,PLAYER <LOC ,DECK-CHAIR>>
+                                           <START-SENTENCE ,ON-WATCH>
+                                           <TELL " sits in the chair." CR>)>)>)
+                            (T
+                             <COND (<IN? ,PLAYER <LOC ,DECK-CHAIR>>
+                                    <START-SENTENCE .NEXT-UP>
+                                    <TELL
+" comes up and says to " D ,ON-WATCH ", \"I'm here to stand watch.\" ">
+                                    <START-SENTENCE ,ON-WATCH>
+                                    <TELL
+" gets up and " D .NEXT-UP " sits in the lookout's chair." CR>
+                                    <SET V T>)>
+                             <MOVE ,ON-WATCH <LOC ,DECK-CHAIR>>
+                             <MOVE .NEXT-UP ,DECK-CHAIR>
+                             <COND (<==? ,SHIP-CHOSEN ,SALVAGER>
+                                    <ESTABLISH-GOAL ,ON-WATCH ,MM-GALLEY>)
+                                   (T <ESTABLISH-GOAL ,ON-WATCH ,NW-GALLEY>)>
+                             <SETG ON-WATCH .NEXT-UP>
+                             <SET-NEXT-WATCH>
+                             .V)>)>)>>
+
+;<ROUTINE SET-NEXT-WATCH ("AUX" NEXT-TIME)
+        <SETG WATCH-CHANGE-CTR 0>
+        <COND (<GET ,WATCH-TABLE ,WT-NEXT>
+               <COND (<L? <SET NEXT-TIME <GET ,WATCH-TABLE ,WT-TIME>>
+                          ,PRESENT-TIME>
+                      <SET NEXT-TIME <+ .NEXT-TIME 1440>>)>
+               <ENABLE <QUEUE I-CHANGE-WATCH <- .NEXT-TIME ,PRESENT-TIME>>>
+               <SETG WATCH-TABLE <REST ,WATCH-TABLE ,WT-REST>>)
+              (T
+               <DISABLE <INT I-CHANGE-WATCH>>
+               <ENABLE <QUEUE I-DIVETIME <+ 165 <RANDOM 15>>>>)>>       
+
+;<GLOBAL SEARCHER <>>
+
+;<GLOBAL WATCH-CHANGE-CTR 0>
+
+;<GLOBAL WATCH-TABLE
+       <TABLE WEASEL     1075
+              PETE       1255
+              ADVENTURER 1435
+              WEASEL     175
+              PETE       355
+              0>>
+
+;<CONSTANT WT-PERSON 0>
+;<CONSTANT WT-TIME 1>
+;<CONSTANT WT-REST 4>
+;<CONSTANT WT-NEXT 2>
+
+<ROUTINE I-SQUID ("AUX" (L <LOC ,SQUID>))
+        <COND (<==? <META-LOC ,PLAYER> .L>
+               <JIGS-UP
+"The giant squid stirs and sees what disturbed it. When the huge eyes spot
+you, it moves toward you and hugs you with its tentacles. You squirm in an
+attempt to get away, but more arms surround you and one disconnects your
+airhose.">)
+              (T
+               <DISABLE <INT I-SQUID>>
+               <RFALSE>)>>
+
+<ROUTINE I-SHARK ()
+        <COND (<L? <GETP ,HERE ,P?LINE> ,UNDERWATER-LINE-C>
+               <DISABLE <INT I-SHARK>>
+               <MOVE ,SHARK ,LOCAL-GLOBALS>
+               <FCLEAR ,SHARK ,ONBIT>
+               <RFALSE>)
+              (<IN? ,SHARK ,UNDERWATER>
+               <COND (<AND <IN? ,SHARK-REPELLENT ,PLAYER>
+                           <FSET? ,SHARK-REPELLENT ,OPENBIT>>
+                      <MOVE ,SHARK ,WINDING-ROAD-2>;"now useless location"
+                      <DISABLE <INT I-SHARK>>
+                      <COND (<NOT ,LIT>
+                             <RFALSE>)
+                            (<FSET? ,SHARK ,ONBIT>
+                             <TELL "The shark continues">)
+                            (T <TELL "A shark swims">)>
+                      <TELL
+" toward you, then stops. It turns and swims away." CR>)
+                     (T
+                      <COND (<FSET? ,SHARK ,ONBIT>
+                             <TELL "The shark">)
+                            (,LIT <TELL "A shark">)
+                            (T <TELL "Something">)>
+                      <JIGS-UP " swims up to you and starts nibbling.">)>)
+              (T
+               <MOVE ,SHARK ,UNDERWATER>
+               <ENABLE <QUEUE I-SHARK -1>>
+               <COND (,LIT
+                      <FSET ,SHARK ,ONBIT>
+                      <TELL "A shark swims toward you!" CR>)>)>>
+
+<ROUTINE I-PLUMMET ()
+        <SETG CRIMP-CTR <+ ,CRIMP-CTR 1>>
+        <COND (<==? ,CRIMP-CTR 1>
+               <ENABLE <QUEUE I-PLUMMET -1>>
+               <COND (<GLOBAL-IN? ,FALLEN-BUNK ,HERE>
+                      <SETG P-IT-OBJECT ,FALLEN-BUNK>
+                      <TELL
+"The row of bunks you moved starts to fall." CR>)>)
+              (<==? ,CRIMP-CTR 2>
+               <COND (<GLOBAL-IN? ,FALLEN-BUNK ,HERE>
+                      <SETG P-IT-OBJECT ,FALLEN-BUNK>
+                      <TELL "The row of bunks falls toward the doorway">
+                      <COND (<EQUAL? ,HERE ,WRECK-8>
+                             <TELL
+                              ", threatening to pinch your " D ,AIR-HOSE "!">)
+                            (T <TELL ".">)>
+                      <CRLF>)>)
+              (<==? ,CRIMP-CTR 3>
+               <COND (<GLOBAL-IN? ,FALLEN-BUNK ,HERE>
+                      <COND (<EQUAL? ,HERE ,WRECK-8>
+                             <JIGS-UP
+"The row of fallen bunks pinches your airhose. A few moments later,
+it is impossible to breathe.">)
+                            (T
+                             <SETG BUNKS-MOVED <>>
+                             <SETG P-IT-OBJECT ,FALLEN-BUNK>
+                             <TELL
+"The bunks fall back into the doorway, blocking the passage." CR>)>)
+                     (<OR <EQUAL? ,HERE ,WRECK-1 ,WRECK-2 ,WRECK-3>
+                          <EQUAL? ,HERE ,WRECK-4 ,WRECK-5 ,WRECK-6>
+                          <EQUAL? ,HERE ,UNDERWATER>>
+                      <SETG BUNKS-MOVED <>>
+                      <RFALSE>)
+                     (T
+                      <JIGS-UP
+"You find yourself gasping for air, but there's none to breathe!">)>)>>
+
+<GLOBAL CRIMP-CTR 0>
+
+<ROUTINE I-LIVER ()
+        <COND (<G? ,BLOOD-ALCOHOL 0>
+               <SETG BLOOD-ALCOHOL <- ,BLOOD-ALCOHOL 1>>)>
+        <COND (<G? ,SLOSH-CTR 0>
+               <SETG SLOSH-CTR <- ,SLOSH-CTR 1>>)>
+        <ENABLE <QUEUE I-LIVER 10>>
+        <COND (<G? ,BLOOD-ALCOHOL 15>
+               <TELL "Your head swims for a minute." CR>
+               <RFATAL>)>
+        <RFALSE>>
+
+<ROUTINE I-PENDULUM ("AUX" (DIR <>))
+        <QUEUE I-PENDULUM -2>
+        <COND (<==? ,LINE-LOC 5>
+               <SETG LINE-LOC-INC -1>)
+              (<==? ,LINE-LOC 1>
+               <SETG LINE-LOC-INC 1>)
+              (<IN? ,SAFETY-LINE <META-LOC ,PLAYER>>
+               <COND (<EQUAL? ,LINE-LOC-INC 1>
+                      <SET DIR "north">)
+                     (T <SET DIR "south">)>)>
+        <SETG LINE-LOC <+ ,LINE-LOC ,LINE-LOC-INC>>
+        <COND (<==? ,LINE-LOC 2>
+               <MOVE ,SAFETY-LINE ,WEST-OF-WRECK-9>
+               <COND (<==? ,HERE ,WEST-OF-WRECK-9>
+                      <TELL-LINE-SWINGS>)>)
+              (<==? ,LINE-LOC 4>
+               <MOVE ,SAFETY-LINE ,WEST-OF-WRECK-11>
+               <COND (<==? ,HERE ,WEST-OF-WRECK-11>
+                      <TELL-LINE-SWINGS>)>)
+              (T
+               <MOVE ,SAFETY-LINE ,LOCAL-GLOBALS>
+               <COND (.DIR
+                      <TELL "The line swings away to the " .DIR "." CR>)>)>>
+
+<ROUTINE TELL-LINE-SWINGS ()
+        <TELL "The " D ,SAFETY-LINE " from above swings in from the ">
+        <COND (<EQUAL? ,LINE-LOC-INC 1>
+               <TELL "south">)
+              (T <TELL "north">)>
+        <TELL "." CR>>
+
+<GLOBAL LINE-LOC 1>
+<GLOBAL LINE-LOC-INC 1>
+
+<ROUTINE I-CASE-LEAK ("AUX" (ALREADY <>))
+        <SETG WATER-IN-CASE <+ ,WATER-IN-CASE 1>>
+        <COND (<G? ,WATER-IN-CASE 9>
+               <COND (<FSET? ,STAMPS ,RMUNGBIT>
+                      <SET ALREADY T>)>
+               <FSET ,STAMPS ,RMUNGBIT>
+               <DISABLE <INT I-CASE-LEAK>>)>
+        <COND (<IN? ,GLASS-CASE ,PLAYER>
+               <TELL "The water level in the " D ,GLASS-CASE " rises.">
+               <COND (<AND <FSET? ,STAMPS ,RMUNGBIT>
+                           <NOT .ALREADY>>
+                      <TELL " As it reaches the stamps, it soaks them.">)>
+               <CRLF>)>>
+
+<GLOBAL WATER-IN-CASE 0>
+
+<ROUTINE I-DRILL ()
+        <FSET ,BATTERY ,RMUNGBIT>
+        <SETG DRILL-POWERED <>>
+        <DISABLE <INT I-DRILL>>
+        <TELL "The " D ,DRILL " sputters, and the bit stops turning." CR>>
+
+<ROUTINE I-AIR-SUPPLY ()
+        <COND (<AND <==? <GETP ,HERE ,P?LINE> ,UNDERWATER-LINE-C>
+                    <IN? ,AIR-TANK ,PLAYER>
+                    <NOT <AIRTIGHT-ROOM?>>>
+               <SETG AIR-LEFT <- ,AIR-LEFT </ <+ ,DEPTH 33> 44>>>
+               <COND (<L? ,AIR-LEFT 1>
+                      <JIGS-UP "You've used all your air.">)
+                     (<L? ,AIR-LEFT 15>
+                      <TELL "Your air supply is dangerously low." CR>
+                      <COND (<==? ,WAITED? 1>
+                             <RTRUE>)
+                            (T <RFATAL>)>)>)>>
+
+<ROUTINE I-MM-COMPRESSOR ()
+        <ENABLE <QUEUE I-LAST-GASP 10>>
+        <COND (<==? <GETP ,HERE ,P?LINE> ,UNDERWATER-LINE-C>
+               <TELL
+"You have to breathe harder. Maybe you'd better surface." CR>
+               <RFATAL>)>>
+
+<ROUTINE I-LAST-GASP ()
+        <COND (<==? <GETP ,HERE ,P?LINE> ,UNDERWATER-LINE-C>
+               <JIGS-UP
+"There's not enough air to breathe!">)
+              (T
+               <DISABLE <QUEUE I-LAST-GASP 1>>)>>
+
+<ROUTINE I-PLOT-NEVER-STARTS ()
+        <DISABLE <INT I-JOHNNY>>
+        <DISABLE <INT I-PETE>>
+        <COND (<IN? ,WEASEL ,SHANTY>
+               <DISABLE <INT I-WEASEL>>)>
+        <SETG FM-CTR 5>
+        <RFALSE>>
+
+<ROUTINE I-ENDIT ()
+        <COND (<L? <GETP ,HERE ,P?LINE> ,UNDERWATER-LINE-C>
+               <JIGS-UP
+"You suddenly find Red's hands around your throat as he makes a comment
+about hating cowards and Hevlin being wrong.">)>>
\ No newline at end of file
diff --git a/globals.zap b/globals.zap
new file mode 100644 (file)
index 0000000..1fcf99c
--- /dev/null
@@ -0,0 +1,1313 @@
+
+
+       .FUNCT  RED-HERRING-F
+       EQUAL?  PRSA,V?ASK-ABOUT /FALSE
+       CALL    GLOBAL-NOT-HERE-PRINT,RED-HERRING
+       RSTACK  
+
+
+       .FUNCT  INTNUM-F
+       EQUAL?  PRSA,V?WITHDRAW,V?GIVE \?ELS5
+       ZERO?   P-DOLLAR-FLAG \?ELS5
+       PRINTI  "Next time, tell me what there's "
+       PRINTN  P-NUMBER
+       PRINTI  " of."
+       CRLF    
+       SET     'CLOCK-WAIT,TRUE-VALUE
+       RETURN  2
+?ELS5: ZERO?   P-DOLLAR-FLAG /FALSE
+       EQUAL?  PRSA,V?ASK-FOR,V?TAKE,V?WITHDRAW /FALSE
+       EQUAL?  WINNER,PLAYER \FALSE
+       GRTR?   P-AMOUNT,POCKET-CHANGE \FALSE
+       CALL    TELL-DONT-HAVE,STR?2
+       RSTACK  
+
+
+       .FUNCT  AIR-F
+       EQUAL?  PRSA,V?TASTE,V?SMELL \?ELS5
+       CALL    AIRTIGHT-ROOM?
+       ZERO?   STACK /?ELS10
+       FSET?   MASK,WORNBIT /?ELS10
+       PRINTR  "The air is musty but breathable."
+?ELS10:        EQUAL?  HERE,MM-ENGINE-ROOM,NW-ENGINE-ROOM \?ELS16
+       PRINTR  "The air is heavy with diesel fumes."
+?ELS16:        GETP    HERE,P?LINE
+       EQUAL?  STACK,UNDERWATER-LINE-C \?ELS20
+       PRINTR  "It feels a whole lot better than the water you could be breathing."
+?ELS20:        PRINTR  "You find nothing special about the air."
+?ELS5: EQUAL?  PRSA,V?CLOSE,V?OPEN \?ELS28
+       PRINTR  "I think you're an air head."
+?ELS28:        EQUAL?  PRSA,V?LOOK-INSIDE \?ELS32
+       CALL    PERFORM,V?LOOK
+       RTRUE   
+?ELS32:        EQUAL?  PRSI,AIR \FALSE
+       EQUAL?  PRSA,V?DROP,V?THROW \FALSE
+       CALL    PERFORM,PRSA,PRSO,GROUND
+       RTRUE   
+
+
+       .FUNCT  FLOOR-F
+       EQUAL?  PRSA,V?PUT,V?PUT-ON \FALSE
+       EQUAL?  PRSI,GROUND \FALSE
+       CALL    PERFORM,V?DROP,PRSO
+       RTRUE   
+
+
+       .FUNCT  DECK-F
+       EQUAL?  PRSA,V?WALK-TO \?ELS5
+       CALL    TELL-SHD-DIR
+       RSTACK  
+?ELS5: EQUAL?  PRSA,V?PUT,V?PUT-ON \FALSE
+       EQUAL?  PRSI,DECK \FALSE
+       CALL    PERFORM,V?DROP,PRSO
+       RTRUE   
+
+
+       .FUNCT  FLOOR-HOLE-F
+       EQUAL?  PRSA,V?THROUGH \?ELS5
+       CALL    DO-WALK,P?DOWN
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?LOOK-INSIDE \?ELS7
+       CALL    TELL-YOU-CANT,STR?6
+       RSTACK  
+?ELS7: EQUAL?  PRSA,V?EXAMINE \FALSE
+       EQUAL?  HERE,WRECK-5 \?ELS14
+       ZERO?   WRECK-5-FLOODED \?ELS14
+       PRINTR  "There's water on the other side."
+?ELS14:        CALL    TELL-LOOKS-HOLE
+       RSTACK  
+
+
+       .FUNCT  TELL-LOOKS-HOLE
+       PRINTR  "It looks a lot like a hole."
+
+
+       .FUNCT  CEILING-HOLE-F
+       EQUAL?  PRSA,V?THROUGH \?ELS5
+       CALL    DO-WALK,P?UP
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?LOOK-INSIDE \?ELS7
+       CALL    TELL-YOU-CANT,STR?6
+       RSTACK  
+?ELS7: EQUAL?  PRSA,V?EXAMINE \FALSE
+       CALL    TELL-LOOKS-HOLE
+       RSTACK  
+
+
+       .FUNCT  HOLE-F
+       EQUAL?  PRSA,V?DRILL /FALSE
+       CALL    GLOBAL-NOT-HERE-PRINT,HOLE
+       RSTACK  
+
+
+       .FUNCT  MAST-F
+       EQUAL?  PRSA,V?EXAMINE \?ELS5
+       PRINTI  "There are several rotting masts here."
+       EQUAL?  HERE,WRECK-1 \?CND8
+       PRINTI  " The top of one has fallen into a hole at your feet."
+?CND8: CRLF    
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?CLIMB-FOO \FALSE
+       PRINTR  "None of the masts looks sturdy enough."
+
+
+       .FUNCT  LIGHTHOUSE-F
+       EQUAL?  HERE,WINDING-ROAD-1 \?ELS5
+       EQUAL?  PRSA,V?OPEN,V?THROUGH \?ELS10
+       PRINTR  "The door is locked."
+?ELS10:        EQUAL?  PRSA,V?EXAMINE \FALSE
+       PRINTI  "You can see the base of a "
+       CALL    DPRINT,LIGHTHOUSE
+       PRINTI  ". "
+       CALL    TELL-CLOSED,STR?7
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?EXAMINE \?ELS23
+       PRINTI  "The "
+       CALL    DPRINT,LIGHTHOUSE
+       PRINTI  " towers over Hardscrabble Island from the island's northwest corner."
+       GRTR?   PRESENT-TIME,1200 /?THN29
+       LESS?   PRESENT-TIME,480 \?CND26
+?THN29:        PRINTI  " Its light provides a beacon for ships."
+?CND26:        CRLF    
+       RTRUE   
+?ELS23:        EQUAL?  PRSA,V?WALK-TO \?ELS34
+       CALL    TELL-SHD-DIR
+       RSTACK  
+?ELS34:        EQUAL?  PRSA,V?FIND /FALSE
+       EQUAL?  PRSA,V?ASK-ABOUT \?ELS38
+       FSET?   PRSO,VICBIT \FALSE
+       PRINTR  """It's been there forever."""
+?ELS38:        PRINTR  "That would be difficult from this distance."
+
+
+       .FUNCT  GLOBAL-TREASURE-F
+       EQUAL?  PRSA,V?TELL,V?ASK-CONTEXT-ABOUT,V?ASK-ABOUT /FALSE
+       EQUAL?  PRSA,V?FIND \?ELS7
+       EQUAL?  WINNER,PLAYER \?ELS12
+       CALL    TELL-NOT-EASY
+       RSTACK  
+?ELS12:        PRINTR  """I'd like to know where some is."""
+?ELS7: CALL    GLOBAL-NOT-HERE-PRINT,GLOBAL-TREASURE
+       RSTACK  
+
+
+       .FUNCT  TRAWLER-F
+       EQUAL?  PRSA,V?EXAMINE \?ELS5
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,TRAWLER-LINE-C \?ELS10
+       PRINTI  "The "
+       CALL    DPRINT,TRAWLER
+       PRINTR  " is in decent shape."
+?ELS10:        EQUAL?  HERE,MM-WHEELHOUSE \?ELS14
+       ZERO?   AT-SEA /?ELS14
+       CALL    GLOBAL-NOT-HERE-PRINT,TRAWLER
+       RSTACK  
+?ELS14:        PRINTI  "The "
+       CALL    DPRINT,TRAWLER
+       CALL    TELL-BOAT-DESC
+       RSTACK  
+?ELS5: EQUAL?  PRSA,V?THROUGH,V?BOARD \?ELS22
+       EQUAL?  HERE,WHARF \?ELS25
+       CALL    DO-WALK,P?WEST
+       RTRUE   
+?ELS25:        EQUAL?  HERE,UNDERWATER \?ELS27
+       EQUAL?  DEPTH,50 \?ELS27
+       CALL    DO-WALK,P?UP
+       RTRUE   
+?ELS27:        CALL    TELL-YOU-CANT,STR?8
+       RTRUE   
+?ELS22:        EQUAL?  PRSA,V?DISEMBARK \?ELS33
+       ZERO?   AT-SEA /?ELS38
+       CALL    GLOBAL-IN?,RAILING,HERE
+       ZERO?   STACK /?ELS44
+       CALL    PERFORM,V?DIVE
+       RTRUE   
+?ELS44:        CALL    TELL-NO-EXIT
+       RSTACK  
+?ELS38:        EQUAL?  HERE,NW-STARBOARD-DECK \?ELS48
+       CALL    DO-WALK,P?EAST
+       RSTACK  
+?ELS48:        CALL    TELL-NO-EXIT
+       RSTACK  
+?ELS33:        EQUAL?  PRSA,V?LISTEN \?ELS52
+       ZERO?   AT-SEA /?ELS52
+       CALL    TELL-THRUM
+       RSTACK  
+?ELS52:        EQUAL?  PRSA,V?LAUNCH \FALSE
+       CALL    TELL-YOU-CANT,STR?9
+       RSTACK  
+
+
+       .FUNCT  TELL-NO-EXIT
+       CALL    TELL-HOW-THAT,STR?10,STR?11
+       RSTACK  
+
+
+       .FUNCT  TELL-HOW-THAT,STR,LAST=0
+       PRINTI  "How can you "
+       PRINT   STR
+       PRINTI  " that"
+       ZERO?   LAST /?CND3
+       PRINTI  " "
+       PRINT   LAST
+?CND3: PRINTR  "?"
+
+
+       .FUNCT  TELL-BOAT-DESC
+       PRINTR  " looks weathered but not aged."
+
+
+       .FUNCT  TELL-THRUM
+       PRINTR  "You hear the powerful thrum of diesel engines."
+
+
+       .FUNCT  SALVAGER-F
+       EQUAL?  PRSA,V?EXAMINE \?ELS5
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,SALVAGER-LINE-C \?ELS10
+       PRINTI  "The "
+       CALL    DPRINT,SALVAGER
+       PRINTR  " is shipshape."
+?ELS10:        EQUAL?  HERE,NW-WHEELHOUSE \?ELS14
+       ZERO?   AT-SEA /?ELS14
+       CALL    GLOBAL-NOT-HERE-PRINT,SALVAGER
+       RSTACK  
+?ELS14:        PRINTI  "The "
+       CALL    DPRINT,SALVAGER
+       PRINTI  " is a medium-size boat that"
+       CALL    TELL-BOAT-DESC
+       RSTACK  
+?ELS5: EQUAL?  PRSA,V?THROUGH,V?BOARD \?ELS22
+       EQUAL?  HERE,WHARF \?ELS25
+       CALL    DO-WALK,P?EAST
+       RTRUE   
+?ELS25:        EQUAL?  HERE,UNDERWATER \?ELS27
+       EQUAL?  DEPTH,50 \?ELS27
+       CALL    DO-WALK,P?UP
+       RTRUE   
+?ELS27:        CALL    TELL-YOU-CANT,STR?8
+       RTRUE   
+?ELS22:        EQUAL?  PRSA,V?DISEMBARK \?ELS33
+       ZERO?   AT-SEA /?ELS38
+       CALL    GLOBAL-IN?,RAILING,HERE
+       ZERO?   STACK /?ELS44
+       CALL    PERFORM,V?DIVE
+       RTRUE   
+?ELS44:        CALL    TELL-NO-EXIT
+       RSTACK  
+?ELS38:        EQUAL?  HERE,MM-PORT-DECK \?ELS48
+       CALL    DO-WALK,P?WEST
+       RSTACK  
+?ELS48:        CALL    TELL-NO-EXIT
+       RSTACK  
+?ELS33:        EQUAL?  PRSA,V?LISTEN \?ELS52
+       ZERO?   AT-SEA /?ELS52
+       CALL    TELL-THRUM
+       RSTACK  
+?ELS52:        EQUAL?  PRSA,V?LAUNCH \FALSE
+       CALL    TELL-YOU-CANT,STR?9
+       RSTACK  
+
+
+       .FUNCT  SHIPWRECK-F
+       EQUAL?  PRSA,V?DISEMBARK \?ELS5
+       CALL    TELL-NOT-EASY
+       RSTACK  
+?ELS5: EQUAL?  PRSA,V?EXAMINE \FALSE
+       PRINTI  "It is what's left of a "
+       EQUAL?  WRECK-CHOSEN,1,3 \?ELS12
+       PRINTI  "wooden"
+       JUMP    ?CND10
+?ELS12:        PRINTI  "steel"
+?CND10:        PRINTR  " ship."
+
+
+       .FUNCT  GLOBAL-SLEEP-F
+       EQUAL?  PRSA,V?WALK-TO \?ELS5
+       CALL    PERFORM,V?SLEEP
+       RTRUE   
+?ELS5: PRINTR  "Huh? Wake up!"
+
+
+       .FUNCT  FIELD-F
+       EQUAL?  PRSA,V?THROUGH,V?BOARD \?ELS5
+       CALL    TELL-YOU-CANT,STR?12
+       RSTACK  
+?ELS5: EQUAL?  PRSA,V?LOOK-BEHIND \?ELS7
+       CALL    PICK-ONE,YUKS
+       PRINT   STACK
+       CRLF    
+       RTRUE   
+?ELS7: EQUAL?  PRSA,V?CUT \?ELS11
+       CALL    TELL-DONT-HAVE,STR?13
+       RSTACK  
+?ELS11:        EQUAL?  PRSA,V?PLAY \?ELS13
+       PRINTR  "Sounds exciting."
+?ELS13:        EQUAL?  PRSA,V?EXAMINE \FALSE
+       PRINTR  "This field was once productive farmland but hasn't been tended for many years."
+
+
+       .FUNCT  ROCKS-F
+       EQUAL?  PRSA,V?EXAMINE \?ELS5
+       PRINTR  "The rocks here are large, pointy, and impossible to get through."
+?ELS5: EQUAL?  PRSA,V?THROUGH,V?BOARD \FALSE
+       CALL    TELL-YOU-CANT,STR?14
+       RSTACK  
+
+
+       .FUNCT  POCKET-F
+       FSET?   WET-SUIT,WORNBIT /?THN6
+       FSET?   DEEP-SUIT,WORNBIT \?ELS5
+?THN6: PRINTR  "Your diving gear is over the pocket."
+?ELS5: EQUAL?  PRSA,V?TAKE \?ELS11
+       EQUAL?  PRSO,RIDICULOUS-MONEY-KLUDGE,GLOBAL-MONEY \?ELS11
+       CALL    TELL-FLASHING-CASH
+       RSTACK  
+?ELS11:        EQUAL?  PRSA,V?LOOK-INSIDE \?ELS15
+       PRINTI  "There is $"
+       PRINTN  POCKET-CHANGE
+       PRINTR  " in it."
+?ELS15:        EQUAL?  PRSA,V?EMPTY \?ELS19
+       PRINTR  "You think better of the idea."
+?ELS19:        EQUAL?  PRSA,V?OPEN \?ELS23
+       PRINTR  "It's open enough."
+?ELS23:        EQUAL?  PRSA,V?PUT \FALSE
+       EQUAL?  PRSI,POCKET \FALSE
+       ZERO?   P-DOLLAR-FLAG /?ELS34
+       EQUAL?  PRSO,INTNUM \?ELS34
+       GRTR?   P-AMOUNT,POCKET-CHANGE \?ELS34
+       CALL    TELL-DONT-HAVE,STR?2
+       RSTACK  
+?ELS34:        EQUAL?  PRSO,RIDICULOUS-MONEY-KLUDGE,GLOBAL-MONEY /?THN39
+       EQUAL?  PRSO,INTNUM \?ELS38
+       ZERO?   P-DOLLAR-FLAG /?ELS38
+?THN39:        CALL    TELL-ALREADY,STR?16
+       RSTACK  
+?ELS38:        CALL    TELL-NO-FIT
+       RSTACK  
+
+
+       .FUNCT  TELL-NO-FIT,STR=0
+       PRINTI  "It won't fit"
+       ZERO?   STR /?CND3
+       PRINTI  " "
+       PRINT   STR
+?CND3: PRINTR  "."
+
+
+       .FUNCT  PEOPLE-F
+       EQUAL?  HERE,SHANTY,FERRY-LANDING \?ELS5
+       PRINTR  "Leave them alone. They're not bothering you."
+?ELS5: IN?     HERE,WEASEL /?THN10
+       IN?     HERE,JOHNNY /?THN10
+       IN?     HERE,PETE /?THN10
+       IN?     HERE,SPEAR-CARRIER /?THN10
+       IN?     HERE,DELIVERY-BOY \?ELS9
+?THN10:        CALL    TELL-REFER-INDIVIDUAL,STR?17
+       RSTACK  
+?ELS9: CALL    GLOBAL-NOT-HERE-PRINT,PEOPLE
+       RSTACK  
+
+
+       .FUNCT  TELL-REFER-INDIVIDUAL,STR
+       PRINTI  "Refer to individual"
+       PRINT   STR
+       PRINTR  "."
+
+
+       .FUNCT  GLOBAL-SURFACE-F
+       EQUAL?  PRSA,V?OPEN \FALSE
+       CALL    PICK-ONE,YUKS
+       PRINT   STACK
+       CRLF    
+       RTRUE   
+
+
+       .FUNCT  MOVE-SHARED-OBJECTS,PLACE,CTR=0,SURFACE?=1,?TMP1
+       EQUAL?  PLACE,LAST-S-O-T-PLACE /FALSE
+       EQUAL?  LAST-S-O-T-PLACE,MM-CREW-QTRS,NW-CREW-QTRS \?ELS5
+       SET     'SURFACE?,FALSE-VALUE
+       CALL    UNLOAD,UNDER-BUNK
+       CALL    UNLOAD,BUNK
+       JUMP    ?CND1
+?ELS5: EQUAL?  LAST-S-O-T-PLACE,MM-GALLEY,NW-GALLEY \?ELS7
+       CALL    UNLOAD,STOVE
+       JUMP    ?CND1
+?ELS7: EQUAL?  LAST-S-O-T-PLACE,MM-LOUNGE,NW-LOUNGE \?CND1
+       CALL    UNLOAD,LOUNGE-CHAIR
+?CND1: ZERO?   SURFACE? /?CND10
+       CALL    UNLOAD,GLOBAL-SURFACE
+?CND10:        EQUAL?  PLACE,MM-CREW-QTRS,NW-CREW-QTRS /?CND14
+       MOVE    GLOBAL-SURFACE,PLACE
+?CND14:        SET     'LAST-S-O-T-PLACE,PLACE
+?PRG17:        GRTR?   CTR,44 /TRUE
+       ADD     CTR,1
+       GET     SHARED-OBJECT-TABLE,STACK
+       EQUAL?  STACK,PLACE \?CND19
+       GET     SHARED-OBJECT-TABLE,CTR >?TMP1
+       ADD     CTR,2
+       GET     SHARED-OBJECT-TABLE,STACK
+       MOVE    ?TMP1,STACK
+       PUT     SHARED-OBJECT-TABLE,CTR,0
+       ADD     CTR,1
+       PUT     SHARED-OBJECT-TABLE,STACK,0
+       ADD     CTR,2
+       PUT     SHARED-OBJECT-TABLE,STACK,0
+?CND19:        ADD     CTR,3 >CTR
+       JUMP    ?PRG17
+
+
+       .FUNCT  UNLOAD,OBJ,F,N
+       FIRST?  OBJ >F \FALSE
+       NEXT?   F >N /?KLU11
+?KLU11:        CALL    PUT-IN-TABLE,F,LAST-S-O-T-PLACE,OBJ
+?PRG6: ZERO?   N /TRUE
+       SET     'F,N
+       NEXT?   F >N /?KLU12
+?KLU12:        CALL    PUT-IN-TABLE,F,LAST-S-O-T-PLACE,OBJ
+       JUMP    ?PRG6
+
+
+       .FUNCT  PUT-IN-TABLE,OBJ,RM,SURF,CTR=0
+       EQUAL?  OBJ,PLAYER /FALSE
+?PRG4: GRTR?   CTR,44 \?ELS8
+       JUMP    ?REP5
+?ELS8: GET     SHARED-OBJECT-TABLE,CTR
+       ZERO?   STACK \?ELS10
+       PUT     SHARED-OBJECT-TABLE,CTR,OBJ
+       ADD     CTR,1
+       PUT     SHARED-OBJECT-TABLE,STACK,RM
+       ADD     CTR,2
+       PUT     SHARED-OBJECT-TABLE,STACK,SURF
+       MOVE    OBJ,LOCAL-GLOBALS
+       RFALSE  
+?ELS10:        ADD     CTR,3 >CTR
+       JUMP    ?PRG4
+?REP5: PRINTR  "[BUG: Too much on surfaces.]"
+
+
+       .FUNCT  GLOBAL-BANK-F
+       EQUAL?  HERE,BANK \?ELS5
+       EQUAL?  PRSA,V?EXAMINE \?ELS10
+       CALL    PERFORM,V?LOOK
+       SET     'P-IT-OBJECT,GLOBAL-BANK
+       RTRUE   
+?ELS10:        EQUAL?  PRSA,V?ROB \?ELS12
+       CALL    ROBBERY-ENDING
+       RSTACK  
+?ELS12:        EQUAL?  PRSA,V?EXIT,V?DROP \?ELS14
+       CALL    DO-WALK,P?OUT
+       RTRUE   
+?ELS14:        EQUAL?  PRSA,V?MUNG \FALSE
+       PRINTR  "This isn't Monte Carlo."
+?ELS5: EQUAL?  HERE,SHORE-ROAD-2 \?ELS20
+       EQUAL?  PRSA,V?THROUGH \?ELS25
+       CALL    DO-WALK,P?IN
+       RTRUE   
+?ELS25:        EQUAL?  PRSA,V?EXAMINE \?ELS27
+       PRINTI  "The "
+       CALL    DPRINT,BANK
+       PRINTR  " is an imposing granite building."
+?ELS27:        EQUAL?  PRSA,V?ROB \FALSE
+       ZERO?   BUSINESS-HOURS? /?ELS36
+       CALL    ROBBERY-ENDING
+       RSTACK  
+?ELS36:        CALL    ROBBERY-ENDING,FALSE-VALUE
+       RSTACK  
+?ELS20:        EQUAL?  PRSA,V?ASK-ABOUT \?ELS45
+       EQUAL?  PRSI,GLOBAL-BANK /FALSE
+?ELS45:        EQUAL?  PRSA,V?WALK-TO,V?FIND \?ELS41
+       EQUAL?  PRSO,GLOBAL-BANK /FALSE
+?ELS41:        CALL    GLOBAL-NOT-HERE-PRINT,GLOBAL-BANK
+       RSTACK  
+
+
+       .FUNCT  ROBBERY-ENDING,INSIDE?=1
+       ZERO?   INSIDE? /?ELS3
+       PRINTI  "The teller trips the alarm, and policemen come and drag you away. As you contemplate a stretch in prison, you consider that crime might not pay."
+       CRLF    
+       JUMP    ?CND1
+?ELS3: PRINTI  "You don't realize your attempts have set off a silent alarm until the police arrive. At that point, you can only wonder if attempted robbery wasn't such a bright idea."
+       CRLF    
+?CND1: CRLF    
+       CALL    FINISH
+       RSTACK  
+
+
+       .FUNCT  GLOBAL-MONEY-F
+       EQUAL?  PRSA,V?STEP,V?ASK-ABOUT,V?ASK-FOR /FALSE
+       EQUAL?  PRSA,V?FOLLOW,V?WHAT /FALSE
+       EQUAL?  PRSA,V?FIND \?ELS9
+       CALL    TELL-NOT-EASY
+       RTRUE   
+?ELS9: GRTR?   POCKET-CHANGE,0 \?ELS11
+       FSET?   WET-SUIT,WORNBIT /?THN17
+       FSET?   DEEP-SUIT,WORNBIT \?ELS16
+?THN17:        CALL    TELL-CANT-REACH,STR?21
+       RSTACK  
+?ELS16:        EQUAL?  PRSA,V?COUNT \?ELS20
+       PRINTI  "You are carrying $"
+       PRINTN  POCKET-CHANGE
+       PRINTR  "."
+?ELS20:        EQUAL?  PRSA,V?EXAMINE \?ELS24
+       PRINTI  "It looks a lot like $"
+       PRINTN  POCKET-CHANGE
+       PRINTR  "."
+?ELS24:        EQUAL?  PRSA,V?TAKE /FALSE
+       CALL    TELL-FLASHING-CASH
+       RSTACK  
+?ELS11:        EQUAL?  HERE,BANK \?ELS30
+       PRINTR  "Not surprisingly, the money here is not easily accessible."
+?ELS30:        CALL    GLOBAL-NOT-HERE-PRINT,GLOBAL-MONEY
+       RSTACK  
+
+
+       .FUNCT  TELL-FLASHING-CASH
+       PRINTR  "Flashing your bankroll is not a good idea."
+
+
+       .FUNCT  FERRY-TOKEN-F
+       IN?     SPEAR-CARRIER,HERE \?ELS5
+       EQUAL?  PRSA,V?ASK-FOR,V?ASK-ABOUT \?ELS11
+       EQUAL?  PRSO,SPEAR-CARRIER /?THN8
+?ELS11:        EQUAL?  PRSA,V?BUY \?ELS5
+?THN8: CALL    NO-TOKENS,HERE
+       RSTACK  
+?ELS5: EQUAL?  PRSA,V?ASK-ABOUT \?ELS13
+       FSET?   PRSO,PERSON \?ELS13
+       PRINTR  """You need them for the ferry."""
+?ELS13:        EQUAL?  PRSA,V?ASK-FOR,V?FIND /FALSE
+       CALL    GLOBAL-NOT-HERE-PRINT,FERRY-TOKEN
+       RSTACK  
+
+
+       .FUNCT  NO-TOKENS,PLACE
+       EQUAL?  PLACE,BANK \?ELS3
+       PRINTI  "The teller says, ""We're out. Try Outfitters."""
+       JUMP    ?CND1
+?ELS3: PRINTI  "The "
+       CALL    DPRINT,SPEAR-CARRIER
+       PRINTI  " checks and then says, ""I'm afraid we're out of tokens. Try "
+       CALL    DPRINT,BANK
+       PRINTI  "."""
+?CND1: CRLF    
+       RTRUE   
+
+
+       .FUNCT  GLOBAL-TIME-F
+       EQUAL?  PRSA,V?ASK-ABOUT,V?ASK-FOR \?ELS5
+       EQUAL?  PRSO,SPEAR-CARRIER \?ELS10
+       PRINTI  "The "
+       CALL    DPRINT,PRSO
+       PRINTI  " checks and tells you it's "
+       CALL    TIME-PRINT,PRESENT-TIME
+       CRLF    
+       RTRUE   
+?ELS10:        FSET?   PRSO,PERSON \FALSE
+       PRINTR  """I'm not sure."""
+?ELS5: EQUAL?  PRSA,V?TELL \?ELS18
+       EQUAL?  PRSO,GLOBAL-TIME \?ELS18
+       ZERO?   PRSI \?ELS18
+       PRINTR  "Didn't you learn that the little hand points to the hour and the big hand points to the minute?"
+?ELS18:        EQUAL?  PRSA,V?EXAMINE \?ELS24
+       CALL    PERFORM,V?TIME
+       SET     'P-IT-OBJECT,GLOBAL-TIME
+       RTRUE   
+?ELS24:        EQUAL?  PRSA,V?TELL \?ELS26
+       FSET?   PRSO,VICBIT \?ELS26
+       EQUAL?  PRSO,ME \FALSE
+?ELS26:        PRINTR  "If you want to know the time, check your watch."
+
+
+       .FUNCT  GLOBAL-DAY-F
+       EQUAL?  PRSA,V?ASK-ABOUT,V?ASK-FOR \?ELS9
+       FSET?   PRSO,VICBIT /?THN6
+?ELS9: EQUAL?  PRSA,V?WHAT \?ELS5
+       EQUAL?  WINNER,PLAYER /?ELS5
+?THN6: PRINTR  """Wednesday."""
+?ELS5: EQUAL?  PRSA,V?WHAT \?ELS15
+       PRINTR  "Ask somebody."
+?ELS15:        CALL    TELL-SERIOUS
+       RSTACK  
+
+
+       .FUNCT  TELL-SERIOUS
+       PRINTR  "Be serious."
+
+
+       .FUNCT  ADVENTURER-F
+       GRTR?   BLOOD-ALCOHOL,25 \?ELS5
+       CALL    JIGS-UP,STR?22
+       RSTACK  
+?ELS5: GRTR?   HOW-THIRSTY,3 /?THN8
+       GRTR?   BLOOD-ALCOHOL,15 /?THN8
+       GRTR?   HOW-HUNGRY,3 /?THN8
+       EQUAL?  HOW-TIRED,6 /?THN8
+       EQUAL?  P-ADVERB,W?SLOWLY \?ELS7
+?THN8: EQUAL?  PRSA,V?WAIT,V?SLEEP /?THN15
+       EQUAL?  PRSA,V?TELL \?ELS18
+       ZERO?   PRSI /?THN15
+?ELS18:        CALL    GAME-COMMAND?
+       ZERO?   STACK \?THN15
+       ZERO?   WAITED? /?ELS14
+?THN15:        SET     'WAITED?,2
+       EQUAL?  PRSA,V?WALK \?ELS21
+       JUMP    ?CND19
+?ELS21:        ZERO?   PRSO /?ELS23
+       CALL    META-LOC,PRSO
+       EQUAL?  STACK,HERE /?ELS23
+       IN?     PRSO,GLOBAL-OBJECTS /?ELS23
+       SET     'PRSO,NOT-HERE-OBJECT
+       JUMP    ?CND19
+?ELS23:        ZERO?   PRSI /?CND19
+       CALL    META-LOC,PRSI
+       EQUAL?  STACK,HERE /?CND19
+       IN?     PRSI,GLOBAL-OBJECTS /?CND19
+       SET     'PRSI,NOT-HERE-OBJECT
+?CND19:        EQUAL?  NOT-HERE-OBJECT,PRSO,PRSI \FALSE
+       CALL    NOT-HERE-OBJECT-F
+       RSTACK  
+?ELS14:        SET     'WAITED?,1
+       CALL    CLOCKER
+       EQUAL?  STACK,M-FATAL \?ELS43
+       SET     'CLOCK-WAIT,TRUE-VALUE
+       PRINTI  "This interrupts what you're trying to do."
+       CRLF    
+       RETURN  2
+?ELS43:        EQUAL?  PRSA,V?WALK \FALSE
+       IN?     PLAYER,UNDERWATER /FALSE
+       IN?     PLAYER,HERE \FALSE
+       GRTR?   BLOOD-ALCOHOL,15 \?ELS61
+       CALL    TELL-YOURE-NOT,STR?23
+       CRLF    
+       CALL    RANDOM-WALK
+       RSTACK  
+?ELS61:        RANDOM  100
+       GRTR?   40,STACK \FALSE
+       PRINTI  "You stop to sit down for a bit and then struggle back to your feet."
+       CRLF    
+       RETURN  2
+?ELS7: FSET?   FLIPPERS,WORNBIT \FALSE
+       EQUAL?  PRSA,V?WALK \FALSE
+       ZERO?   AT-SEA \FALSE
+       GETP    HERE,P?LINE
+       LESS?   STACK,TRAWLER-LINE-C /?THN72
+       EQUAL?  HERE,MM-PORT-DECK \?ELS75
+       EQUAL?  P-WALK-DIR,P?WEST /?THN72
+?ELS75:        EQUAL?  HERE,NW-STARBOARD-DECK \FALSE
+       EQUAL?  P-WALK-DIR,P?EAST \FALSE
+?THN72:        PRINTR  "You'd look silly walking around in flippers."
+
+
+       .FUNCT  RANDOM-WALK,P,Z,L,S,D=0
+       SET     'P,0
+?PRG1: NEXTP   HERE,P >P
+       LESS?   P,LOW-DIRECTION \?ELS5
+       ZERO?   D /TRUE
+       CALL    DO-WALK,D
+       RTRUE   
+?ELS5: GETPT   HERE,P >Z
+       PTSIZE  Z >L
+       EQUAL?  L,UEXIT /?THN15
+       EQUAL?  L,CEXIT \?ELS18
+       GETB    Z,CEXITFLAG
+       VALUE   STACK
+       ZERO?   STACK \?THN15
+?ELS18:        EQUAL?  L,DEXIT \?PRG1
+       GETB    Z,DEXITOBJ
+       FSET?   STACK,OPENBIT \?PRG1
+?THN15:        ZERO?   D \?ELS23
+       SET     'D,P
+       JUMP    ?PRG1
+?ELS23:        RANDOM  100
+       GRTR?   50,STACK \?PRG1
+       SET     'D,P
+       JUMP    ?PRG1
+
+
+       .FUNCT  DETECTOR-NOISE,LISTENING?=0,C,H,P,Z,L,R,LAST-R=0,?TMP1
+       CALL    META-LOC,PLAYER >H
+       ZERO?   LISTENING? \?ELS5
+       EQUAL?  PRSA,V?LISTEN \?ELS5
+       EQUAL?  PRSO,METAL-DETECTOR /FALSE
+?ELS5: CALL    META-LOC,METAL-DETECTOR
+       EQUAL?  STACK,H \?ELS9
+       ZERO?   DETECTOR-ON /?ELS9
+       ZERO?   DETECTOR-POWERED /?ELS9
+       CALL    COUNT-METAL,H >?TMP1
+       GETP    H,P?DESCFCN
+       ADD     ?TMP1,STACK >C
+       SET     'P,0
+?PRG12:        NEXTP   H,P >P
+       ZERO?   P \?ELS16
+       JUMP    ?REP13
+?ELS16:        LESS?   P,LOW-DIRECTION /?PRG12
+       GETPT   H,P >Z
+       PTSIZE  Z >L
+       EQUAL?  L,UEXIT,CEXIT,DEXIT \?ELS21
+       GETB    Z,0 >R
+       EQUAL?  R,LAST-R /?PRG12
+       CALL    COUNT-METAL,R
+       DIV     STACK,2
+       ADD     C,STACK
+       GETP    R,P?DESCFCN
+       DIV     STACK,2
+       ADD     STACK,STACK >C >C
+       SET     'LAST-R,R
+       JUMP    ?PRG12
+?ELS21:        EQUAL?  L,FEXIT \?PRG12
+       GET     Z,0
+       CALL    STACK,FALSE-VALUE >R
+       ZERO?   R /?PRG12
+       EQUAL?  R,LAST-R /?PRG12
+       CALL    COUNT-METAL,R
+       DIV     STACK,2
+       ADD     C,STACK
+       GETP    R,P?DESCFCN
+       DIV     STACK,2
+       ADD     STACK,STACK >C >C
+       SET     'LAST-R,R
+       JUMP    ?PRG12
+?REP13:        ZERO?   C \?CND36
+       ZERO?   LISTENING? /FALSE
+       PRINTI  "The "
+       CALL    DPRINT,METAL-DETECTOR
+       PRINTR  " makes no noise."
+?CND36:        PRINTI  "The "
+       CALL    DPRINT,METAL-DETECTOR
+       PRINTI  " is clicking "
+       GRTR?   C,100 \?ELS51
+       PRINTI  "extremely fast"
+       JUMP    ?CND49
+?ELS51:        GRTR?   C,75 \?ELS55
+       PRINTI  "quickly"
+       JUMP    ?CND49
+?ELS55:        GRTR?   C,50 \?ELS59
+       PRINTI  "moderately"
+       JUMP    ?CND49
+?ELS59:        GRTR?   C,25 \?ELS63
+       PRINTI  "slowly"
+       JUMP    ?CND49
+?ELS63:        PRINTI  "occasionally"
+?CND49:        PRINTR  "."
+?ELS9: ZERO?   LISTENING? /FALSE
+       PRINTI  "The "
+       CALL    DPRINT,METAL-DETECTOR
+       PRINTR  " makes no noise."
+
+
+       .FUNCT  COUNT-METAL,R,F,V=0
+       FIRST?  R >F /?KLU13
+?KLU13:        
+?PRG1: ZERO?   F \?ELS5
+       RETURN  V
+?ELS5: FSET?   F,INVISIBLE \?THN8
+       EQUAL?  F,PLAYER \?CND3
+?THN8: GETP    F,P?STATION
+       ADD     V,STACK >V
+       FIRST?  F \?CND3
+       CALL    COUNT-METAL,F
+       ADD     V,STACK >V
+?CND3: NEXT?   F >F /?KLU14
+?KLU14:        JUMP    ?PRG1
+
+
+       .FUNCT  CRETIN-F
+       EQUAL?  PRSO,WINNER,ME \FALSE
+       EQUAL?  PRSA,V?EAT \?ELS6
+       PRINTR  "Stick to stew."
+?ELS6: EQUAL?  PRSA,V?DRINK \?ELS10
+       PRINTR  "Stick to grog."
+?ELS10:        EQUAL?  PRSA,V?ALARM \?ELS14
+       PRINTR  "Good morning!"
+?ELS14:        EQUAL?  PRSA,V?KILL,V?ATTACK,V?MUNG \?ELS18
+       PRINTR  "Although it's not hard, I can't make it that simple."
+?ELS18:        EQUAL?  PRSA,V?FIND \?ELS22
+       PRINTR  "Have you tried asking the parrot?"
+?ELS22:        EQUAL?  PRSA,V?LAMP-ON,V?TAKE /?THN27
+       EQUAL?  PRSA,V?GIVE \?ELS26
+       EQUAL?  PRSO,ME \?ELS26
+?THN27:        PRINTR  "You romantic fool!"
+?ELS26:        EQUAL?  PRSA,V?EXAMINE \?ELS34
+       PRINTR  "You look like a diver."
+?ELS34:        EQUAL?  PRSA,V?LOOK-UNDER \?ELS38
+       PRINTR  "I think the center of the earth is down there somewhere."
+?ELS38:        EQUAL?  PRSA,V?RUB \?ELS42
+       PRINTR  "You're starting to rub me the wrong way."
+?ELS42:        EQUAL?  PRSA,V?PLAY \?ELS46
+       PRINTR  "Don't expect an Oscar."
+?ELS46:        EQUAL?  PRSA,V?THROUGH,V?BOARD,V?CLIMB-ON \?ELS50
+       PRINTR  "I'm not impressed."
+?ELS50:        EQUAL?  PRSA,V?SHAKE,V?CROSS \?ELS54
+       PRINTR  "I'm much too kind."
+?ELS54:        EQUAL?  PRSA,V?DROP \?ELS58
+       PRINTR  "Like a hot potato."
+?ELS58:        EQUAL?  PRSA,V?FOLLOW \?ELS62
+       PRINTR  "What makes you think you know where you're going?"
+?ELS62:        EQUAL?  PRSA,V?SEARCH \?ELS66
+       PRINTR  "Okay. I found one empty head but a strong heart."
+?ELS66:        EQUAL?  PRSA,V?PUSH,V?SMELL \?ELS70
+       PRINTR  "I'd rather not."
+?ELS70:        EQUAL?  PRSA,V?THROW \?ELS74
+       PRINTR  "For a loop?"
+?ELS74:        EQUAL?  PRSA,V?ROB \FALSE
+       PRINTR  "You wouldn't get much from anyone that stupid."
+
+
+       .FUNCT  GLOBAL-SELF-F
+       EQUAL?  WINNER,PLAYER \?CND1
+       EQUAL?  PRSI,GLOBAL-SELF \?CND4
+       SET     'PRSI,ME
+?CND4: EQUAL?  PRSO,GLOBAL-SELF \?CND1
+       SET     'PRSO,ME
+?CND1: CALL    PERFORM,PRSA,PRSO,PRSI
+       RTRUE   
+
+
+       .FUNCT  GLOBAL-ROOM-F,PARG=0
+       EQUAL?  PARG,M-NAME \?ELS5
+       PUTP    PSEUDO-OBJECT,P?SDESC,STR?24
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?EXAMINE \?ELS7
+       CALL    PERFORM,V?LOOK
+       SET     'P-IT-OBJECT,GLOBAL-ROOM
+       RTRUE   
+?ELS7: EQUAL?  PRSA,V?DISEMBARK,V?EXIT,V?DROP \?ELS9
+       CALL    DO-WALK,P?OUT
+       RTRUE   
+?ELS9: EQUAL?  PRSA,V?THROUGH,V?ENTER \?ELS11
+       CALL    DO-WALK,P?IN
+       RTRUE   
+?ELS11:        EQUAL?  PRSA,V?ATTACK,V?MUNG \?ELS13
+       PRINTR  "It's sturdier than you give it credit for."
+?ELS13:        EQUAL?  PRSA,V?UNLOCK \?ELS17
+       PRINTR  "Please be more specific about what you want to unlock."
+?ELS17:        EQUAL?  PRSA,V?PUT \FALSE
+       CALL    PERFORM,V?DROP,PRSO
+       RTRUE   
+
+
+       .FUNCT  WINDOW-F
+       EQUAL?  HERE,BEDROOM \?ELS5
+       EQUAL?  PRSA,V?LOOK-INSIDE \?ELS10
+       PRINTI  "You see an "
+       CALL    DPRINT,FIELD
+       PRINTR  " beyond the alley where the terrible events of last night transpired."
+?ELS10:        EQUAL?  PRSA,V?CLOSE,V?OPEN \FALSE
+       PRINTR  "It's stuck shut."
+?ELS5: EQUAL?  HERE,BANK \?ELS18
+       EQUAL?  PRSA,V?EXAMINE \?ELS23
+       PRINTR  "It is a barred window about chest-high behind which the teller transacts his business."
+?ELS23:        EQUAL?  PRSA,V?LOOK-BEHIND,V?LOOK-INSIDE \FALSE
+       PRINTR  "There is a teller there."
+?ELS18:        EQUAL?  HERE,MM-WHEELHOUSE,NW-WHEELHOUSE \FALSE
+       EQUAL?  PRSA,V?LOOK-INSIDE \FALSE
+       PRINTR  "You can see the ocean beyond the deck."
+
+
+       .FUNCT  IN-WINDOW-F,L,?TMP1
+       EQUAL?  PRSA,V?LOOK-INSIDE \FALSE
+       PRINTI  "You see "
+       LOC     JOHNNY >L
+       EQUAL?  L,MM-WHEELHOUSE,NW-WHEELHOUSE \?CND8
+       GETP    HERE,P?LINE >?TMP1
+       GETP    L,P?LINE
+       EQUAL?  ?TMP1,STACK \?CND8
+       PRINTI  "Johnny in "
+?CND8: PRINTR  "the wheelhouse."
+
+
+       .FUNCT  BEDROOM-DOOR-F
+       EQUAL?  PRSA,V?OPEN \?ELS5
+       FSET?   BEDROOM-DOOR,OPENBIT \?ELS10
+       CALL    TELL-ALREADY,STR?25
+       RTRUE   
+?ELS10:        EQUAL?  HERE,UPSTAIRS-HALLWAY \?ELS12
+       ZERO?   BEDROOM-DOOR-LOCKED /?ELS12
+       PRINTR  "It's locked."
+?ELS12:        FSET    BEDROOM-DOOR,OPENBIT
+       SET     'BEDROOM-DOOR-LOCKED,FALSE-VALUE
+       IN?     WEASEL,UPSTAIRS-HALLWAY \?ELS21
+       PRINTI  "You open the door and see "
+       CALL    DPRINT,WEASEL
+       PRINTI  ". He says, ""Oh. Hi. I was just wonderin' if you were gonna be at the meetin' at "
+       CALL    DPRINT,SHANTY
+       PRINTI  "."" He turns and heads down the steps."
+       CRLF    
+       CALL    ESTABLISH-GOAL,WEASEL,SHANTY
+       CALL    INT,I-WEASEL-TO-BEDROOM
+       PUT     STACK,0,0
+       RTRUE   
+?ELS21:        CALL    TELL-NOW,BEDROOM-DOOR,STR?25
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?CLOSE \?ELS27
+       FSET?   BEDROOM-DOOR,OPENBIT /?ELS32
+       CALL    TELL-ALREADY,STR?26
+       RTRUE   
+?ELS32:        FCLEAR  BEDROOM-DOOR,OPENBIT
+       CALL    TELL-NOW,BEDROOM-DOOR,STR?26
+       RTRUE   
+?ELS27:        EQUAL?  PRSA,V?UNLOCK \FALSE
+       ZERO?   BEDROOM-DOOR-LOCKED /?ELS41
+       IN?     PLAYER,BEDROOM /?THN48
+       EQUAL?  PRSI,KEY \?ELS47
+?THN48:        SET     'BEDROOM-DOOR-LOCKED,FALSE-VALUE
+       CALL    TELL-NOW,BEDROOM-DOOR,STR?27
+       RSTACK  
+?ELS47:        ZERO?   PRSI /?ELS51
+       CALL    TELL-YOU-CANT,STR?28
+       RSTACK  
+?ELS51:        PRINTR  "Not without the key."
+?ELS41:        CALL    TELL-ALREADY,STR?27
+       RSTACK  
+
+
+       .FUNCT  OCEAN-F,L
+       CALL    AIRTIGHT-ROOM?
+       ZERO?   STACK /?ELS5
+       PRINTR  "There's no water in here."
+?ELS5: EQUAL?  PRSA,V?EXAMINE \?ELS9
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,UNDERWATER-LINE-C \?ELS14
+       PRINTR  "There is water all around you."
+?ELS14:        PRINTI  "The ocean looks choppy"
+       ZERO?   AT-SEA /?ELS23
+       PRINTI  ". Whitecaps rise and fall around the boat."
+       JUMP    ?CND21
+?ELS23:        PRINTI  ", and you know about the dangerous currents here."
+?CND21:        CRLF    
+       RTRUE   
+?ELS9: EQUAL?  PRSA,V?LISTEN \?ELS32
+       PRINTR  "You hear the crashing of the waves."
+?ELS32:        EQUAL?  PRSA,V?SWIM,V?THROUGH,V?BOARD \?ELS36
+       GETP    HERE,P?LINE >L
+       EQUAL?  L,UNDERWATER-LINE-C \?ELS41
+       PRINTR  "You're already in it!"
+?ELS41:        EQUAL?  L,TRAWLER-LINE-C,SALVAGER-LINE-C /?THN46
+       EQUAL?  HERE,WHARF,FERRY-LANDING \?ELS45
+?THN46:        ZERO?   AT-SEA /?ELS52
+       CALL    PERFORM,V?DIVE
+       RTRUE   
+?ELS52:        CALL    JIGS-UP,STR?29
+       RSTACK  
+?ELS45:        CALL    TELL-NO-SHORELINE
+       RSTACK  
+?ELS36:        EQUAL?  PRSA,V?THROW,V?DROP \?ELS59
+       EQUAL?  PRSI,OCEAN \?ELS59
+       GETP    HERE,P?LINE
+       EQUAL?  STACK,UNDERWATER-LINE-C \?ELS66
+       CALL    PERFORM,V?DROP,PRSO
+       RTRUE   
+?ELS66:        CALL    TELL-NO-LITTER
+       RSTACK  
+?ELS59:        EQUAL?  PRSA,V?SMELL \?ELS70
+       PRINTR  "It smells very salty, which is what you might expect from the sea."
+?ELS70:        EQUAL?  PRSA,V?TASTE,V?DRINK \?ELS74
+       GETP    HERE,P?LINE
+       GRTR?   STACK,BACK-ALLEY-LINE-C /?THN80
+       EQUAL?  HERE,FERRY-LANDING,WHARF \?ELS79
+?THN80:        PRINTR  "Bleahhhh! You spit it out immediately!"
+?ELS79:        CALL    TELL-NO-SHORELINE
+       RSTACK  
+?ELS74:        EQUAL?  PRSA,V?RUB \FALSE
+       GETP    HERE,P?LINE
+       GRTR?   STACK,BACK-ALLEY-LINE-C /?THN93
+       EQUAL?  HERE,FERRY-LANDING,WHARF \?ELS92
+?THN93:        PRINTR  "It's wet."
+?ELS92:        CALL    TELL-NO-SHORELINE
+       RSTACK  
+
+
+       .FUNCT  TELL-NO-SHORELINE
+       CALL    TELL-YOU-CANT,STR?30
+       RSTACK  
+
+
+       .FUNCT  TELL-NO-LITTER
+       PRINTR  "It would spoil the beauty of the sea."
+
+
+       .FUNCT  STAIRS-F
+       EQUAL?  PRSA,V?EXAMINE \?ELS5
+       PRINTI  "The carpeted stairway leads "
+       EQUAL?  HERE,UPSTAIRS-HALLWAY \?ELS10
+       PRINTI  "down"
+       JUMP    ?CND8
+?ELS10:        EQUAL?  HERE,RED-BOAR-INN \?CND8
+       PRINTI  "up"
+?CND8: PRINTR  "."
+?ELS5: EQUAL?  PRSA,V?CLIMB-FOO \FALSE
+       EQUAL?  HERE,UPSTAIRS-HALLWAY \?ELS23
+       CALL    V-CLIMB-UP,P?DOWN
+       RTRUE   
+?ELS23:        CALL    V-CLIMB-UP
+       RTRUE   
+
+
+       .FUNCT  LADDER-TOP-F
+       EQUAL?  PRSA,V?CLIMB-FOO \FALSE
+       CALL    DO-WALK,P?DOWN
+       RTRUE   
+
+
+       .FUNCT  LADDER-BOTTOM-F
+       EQUAL?  PRSA,V?CLIMB-FOO \FALSE
+       CALL    DO-WALK,P?UP
+       RTRUE   
+
+
+       .FUNCT  RAILING-F
+       EQUAL?  PRSA,V?CLIMB-FOO \?ELS5
+       PRINTR  "You immediately climb back down."
+?ELS5: EQUAL?  PRSA,V?LEAP,V?DISEMBARK \FALSE
+       CALL    PERFORM,V?DIVE
+       RTRUE   
+
+
+       .FUNCT  BUNKS-F
+       EQUAL?  PRSA,V?SLEEP,V?BOARD \?ELS5
+       CALL    TELL-BAD-SHAPE
+       RSTACK  
+?ELS5: EQUAL?  PRSA,V?EXAMINE \?ELS7
+       PRINTR  "These stacks of bunks look as though they were never comfortable. The work of time and the sea have made them fairly decrepit, incapable of supporting much weight."
+?ELS7: EQUAL?  PRSA,V?MUNG \FALSE
+       PRINTR  "Some pieces fall away, but the structure holds together."
+
+
+       .FUNCT  TELL-BAD-SHAPE
+       PRINTR  "They don't look as if they could support your weight."
+
+
+       .FUNCT  TIME-PRINT,NUM,HR,PM=0
+       DIV     NUM,60 >HR
+       GRTR?   HR,12 \?ELS3
+       SUB     HR,12 >HR
+       SET     'PM,TRUE-VALUE
+       JUMP    ?CND1
+?ELS3: EQUAL?  HR,12 \?ELS5
+       SET     'PM,TRUE-VALUE
+       JUMP    ?CND1
+?ELS5: ZERO?   HR \?CND1
+       SET     'HR,12
+?CND1: PRINTN  HR
+       PRINTI  ":"
+       MOD     NUM,60 >HR
+       LESS?   HR,10 \?CND10
+       PRINTI  "0"
+?CND10:        PRINTN  HR
+       PRINTI  " "
+       ZERO?   PM /?ELS23
+       PUSH    STR?34
+       JUMP    ?CND19
+?ELS23:        PUSH    STR?35
+?CND19:        PRINT   STACK
+       RTRUE   
+
+
+       .FUNCT  TABLE-PSEUDO,PARG=0
+       EQUAL?  PARG,M-NAME \?ELS5
+       PUTP    PSEUDO-OBJECT,P?SDESC,STR?36
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?EXAMINE \?ELS7
+       PRINTR  "The table has a variety of forms and brochures you find boring."
+?ELS7: EQUAL?  PRSA,V?PUT-ON,V?PUT \FALSE
+       EQUAL?  PRSI,PSEUDO-OBJECT \FALSE
+       PRINTI  "A bank official scurries out, picks up the "
+       CALL    DPRINT,PRSO
+       PRINTR  ", and hands it to you, pointing out that the table is for bank business only."
+
+
+       .FUNCT  LIGHTHOUSE-LOCK-PSEUDO,PARG=0
+       EQUAL?  PARG,M-NAME \?ELS5
+       PUTP    PSEUDO-OBJECT,P?SDESC,STR?37
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?PICK \?ELS7
+       PRINTR  "You try for a while, but the lock won't give."
+?ELS7: EQUAL?  PRSA,V?UNLOCK \?ELS11
+       CALL    TELL-NO-KEY
+       RTRUE   
+?ELS11:        EQUAL?  PRSA,V?MUNG \?ELS13
+       PRINTR  "You find that the door and lock withstand your attempts."
+?ELS13:        EQUAL?  PRSA,V?LOCK \FALSE
+       CALL    TELL-ALREADY,STR?38
+       RTRUE   
+
+
+       .FUNCT  WHEEL-PSEUDO,PARG=0
+       EQUAL?  PARG,M-NAME \?ELS5
+       PUTP    PSEUDO-OBJECT,P?SDESC,STR?39
+       RTRUE   
+?ELS5: EQUAL?  PRSA,V?SPIN,V?TURN \FALSE
+       IN?     JOHNNY,HERE \?ELS12
+       CALL    DPRINT,JOHNNY
+       PRINTR  " glares at you. You decide to leave the piloting to the captain."
+?ELS12:        PRINTR  "The wheel spins."
+
+
+       .FUNCT  BOLT-PSEUDO,PARG=0
+       EQUAL?  PARG,M-NAME \?ELS5
+       PUTP    PSEUDO-OBJECT,P?SDESC,STR?40
+       RTRUE   
+?ELS5: PRINTR  "The bolts are rusted firmly into place."
+
+
+       .FUNCT  NOT-HERE-OBJECT-F,TBL,PRSO?=1,OBJ
+       EQUAL?  PRSO,NOT-HERE-OBJECT \?ELS3
+       EQUAL?  PRSI,NOT-HERE-OBJECT \?ELS3
+       PRINTR  "Those things aren't here."
+?ELS3: EQUAL?  PRSO,NOT-HERE-OBJECT \?ELS9
+       SET     'TBL,P-PRSO
+       JUMP    ?CND1
+?ELS9: SET     'TBL,P-PRSI
+       SET     'PRSO?,FALSE-VALUE
+?CND1: ZERO?   PRSO? /?ELS14
+       EQUAL?  PRSA,V?CLIMB-UP,V?ASK-CONTEXT-FOR,V?ASK-CONTEXT-ABOUT /?THN19
+       EQUAL?  PRSA,V?FOLLOW,V?FIND,V?EXAMINE /?THN19
+       EQUAL?  PRSA,V?$CALL,V?WHAT,V?WAIT-FOR /?THN19
+       EQUAL?  PRSA,V?THROUGH,V?MAKE,V?GIVE /?THN19
+       EQUAL?  PRSA,V?WALK-TO \?CND12
+?THN19:        CALL    FIND-NOT-HERE,TBL,PRSO? >OBJ
+       ZERO?   OBJ /FALSE
+       EQUAL?  OBJ,NOT-HERE-OBJECT \TRUE
+       JUMP    ?CND12
+?ELS14:        EQUAL?  PRSA,V?SGIVE,V?ASK-FOR,V?ASK-ABOUT /?THN34
+       EQUAL?  PRSA,V?TELL \?CND12
+?THN34:        CALL    FIND-NOT-HERE,TBL,PRSO? >OBJ
+       ZERO?   OBJ /FALSE
+       EQUAL?  OBJ,NOT-HERE-OBJECT \TRUE
+?CND12:        EQUAL?  PRSA,V?$CALL \?ELS46
+       CALL    V-CALL-LOSE
+       SET     'CLOCK-WAIT,FALSE-VALUE
+       JUMP    ?CND44
+?ELS46:        EQUAL?  WINNER,ADVENTURER \?ELS48
+       CALL    TELL-YOU-CANT,STR?41,FALSE-VALUE
+       CALL    NOT-HERE-PRINT,PRSO?
+       PRINTI  " here."
+       CRLF    
+       JUMP    ?CND44
+?ELS48:        CALL    START-SENTENCE,WINNER
+       PRINTI  " seems confused. ""I don't see any"
+       CALL    NOT-HERE-PRINT,PRSO?
+       PRINTI  " here!"""
+       CRLF    
+?CND44:        SET     'P-MOBY-FOUND,FALSE-VALUE
+       SET     'PRSA,FALSE-VALUE
+       SET     'PRSO,FALSE-VALUE
+       SET     'PRSI,FALSE-VALUE
+       RETURN  2
+
+
+       .FUNCT  FIND-NOT-HERE,TBL,PRSO?,M-F,OBJ,CTR,PER,?TMP1
+       CALL    MOBY-FIND,TBL >M-F
+       GRTR?   M-F,1 \?CND1
+       GET     TBL,1
+       GETP    STACK,P?GLOBAL >OBJ
+       ZERO?   OBJ /?CND1
+       SET     'M-F,1
+       SET     'P-MOBY-FOUND,OBJ
+?CND1: EQUAL?  1,M-F \?ELS10
+       ZERO?   PRSO? /?ELS13
+       EQUAL?  PRSA,V?TELL \?ELS17
+       EQUAL?  WINNER,PLAYER \?ELS17
+       FSET?   P-MOBY-FOUND,VICBIT \?ELS17
+       SET     'P-CONT,FALSE-VALUE
+       CALL    TELL-NOT-HERE-TALK
+       RTRUE   
+?ELS17:        EQUAL?  PRSA,V?EXAMINE \?ELS21
+       FSET?   P-MOBY-FOUND,PERSON \?ELS24
+       CALL    META-LOC,PLAYER
+       GETP    STACK,P?CORRIDOR >?TMP1
+       LOC     P-MOBY-FOUND
+       GETP    STACK,P?CORRIDOR
+       BAND    ?TMP1,STACK
+       ZERO?   STACK /?ELS24
+       PRINTI  "You can see "
+       CALL    DPRINT,P-MOBY-FOUND
+       PRINTR  " in the distance."
+?ELS24:        EQUAL?  PRSO,MCGINTY \?ELS30
+       IN?     PLAYER,BACK-ALLEY-2 \?ELS30
+       IN?     MCGINTY,MCGINTY-HQ \?ELS30
+       PRINTI  "Looking through the window, you see "
+       CALL    DPRINT,MCGINTY
+       PRINTR  " in his office."
+?ELS30:        CALL    GLOBAL-NOT-HERE-PRINT,PRSO
+       RTRUE   
+?ELS21:        SET     'PRSO,P-MOBY-FOUND
+       JUMP    ?CND11
+?ELS13:        SET     'PRSI,P-MOBY-FOUND
+?CND11:        ZERO?   P-XADJ /?ELS43
+       ZERO?   P-XNAM \?ELS43
+       SET     'P-NONOUN,TRUE-VALUE
+       RFALSE  
+?ELS43:        SET     'P-NONOUN,FALSE-VALUE
+       RFALSE  
+?ELS10:        ZERO?   PRSO? \?ELS49
+       EQUAL?  PRSA,V?ASK-ABOUT /?THN55
+       EQUAL?  PRSA,V?TELL \?ELS54
+       EQUAL?  PRSO,ME \?ELS54
+?THN55:        EQUAL?  PRSO,ME \?ELS61
+       EQUAL?  WINNER,PLAYER \?ELS64
+       ZERO?   QCONTEXT /?ELS64
+       EQUAL?  HERE,QCONTEXT-ROOM \?ELS64
+       SET     'PER,QCONTEXT
+       JUMP    ?CND59
+?ELS64:        SET     'PER,WINNER
+       JUMP    ?CND59
+?ELS61:        SET     'PER,PRSO
+?CND59:        FSET?   PER,VICBIT \?ELS73
+       CALL    SAY-CONFUSED,PER,PRSO?
+       RTRUE   
+?ELS73:        CALL    SUDDENLY-REALIZE-TALKING,PER
+       RTRUE   
+?ELS54:        FSET?   PRSO,VICBIT \?ELS77
+       CALL    SAY-CONFUSED,PRSO,PRSO?
+       RSTACK  
+?ELS77:        PRINTI  "You wouldn't find any"
+       CALL    NOT-HERE-PRINT,PRSO?
+       PRINTR  " there."
+?ELS49:        RETURN  NOT-HERE-OBJECT
+
+
+       .FUNCT  GLOBAL-NOT-HERE-PRINT,OBJ
+       ZERO?   P-MULT /?ELS3
+       INC     'P-NOT-HERE
+       JUMP    ?CND1
+?ELS3: CALL    TELL-YOU-CANT,STR?41,FALSE-VALUE
+       EQUAL?  OBJ,PRSO \?ELS9
+       CALL    PRSO-PRINT
+       JUMP    ?CND7
+?ELS9: CALL    PRSI-PRINT
+?CND7: PRINTI  " here."
+       CRLF    
+?CND1: SET     'P-WON,FALSE-VALUE
+       RTRUE   
+
+
+       .FUNCT  SAY-CONFUSED,PER,PRSO?
+       CALL    START-SENTENCE,PER
+       PRINTI  " looks confused. ""I have no idea what"
+       CALL    NOT-HERE-PRINT,PRSO?
+       PRINTR  " you're talking about!"""
+
+
+       .FUNCT  NOT-HERE-PRINT,PRSO?,?TMP1
+       ZERO?   P-OFLAG /?ELS3
+       ZERO?   P-XADJ /?CND5
+       PRINTI  " "
+       PRINTB  P-XADJN
+?CND5: ZERO?   P-XNAM /?CND1
+       PRINTI  " "
+       PRINTB  P-XNAM
+       JUMP    ?CND1
+?ELS3: ZERO?   PRSO? /?ELS18
+       GET     P-ITBL,P-NC1 >?TMP1
+       GET     P-ITBL,P-NC1L
+       CALL    BUFFER-PRINT,?TMP1,STACK,FALSE-VALUE
+       JUMP    ?CND1
+?ELS18:        GET     P-ITBL,P-NC2 >?TMP1
+       GET     P-ITBL,P-NC2L
+       CALL    BUFFER-PRINT,?TMP1,STACK,FALSE-VALUE
+?CND1: SET     'P-WON,FALSE-VALUE
+       RETURN  P-WON
+
+
+       .FUNCT  TELL-YOU-CANT,STR,FINISH=1
+       PRINTI  "You can't "
+       PRINT   STR
+       ZERO?   FINISH /FALSE
+       CRLF    
+       RTRUE   
+
+
+       .FUNCT  TELL-ROPE-HIGH
+       CALL    TELL-CANT-REACH,STR?42
+       RSTACK  
+
+
+       .FUNCT  TELL-CANT-REACH,STR
+       CALL    TELL-YOU-CANT,STR?43,FALSE-VALUE
+       PRINT   STR
+       PRINTR  "."
+
+
+       .FUNCT  TELL-NO-GO,PRINT?
+       ZERO?   PRINT? /FALSE
+       CALL    TELL-YOU-CANT,STR?44
+       RSTACK  
+
+
+       .FUNCT  TELL-NO-NO
+       CALL    TELL-YOU-CANT,STR?45
+       RSTACK  
+
+
+       .FUNCT  TELL-NO-AFFORD
+       CALL    TELL-YOU-CANT,STR?46
+       RSTACK  
+
+
+       .FUNCT  TELL-TOO-BIG
+       CALL    TELL-YOU-CANT,STR?47
+       RSTACK  
+
+       .ENDI
diff --git a/globals.zil b/globals.zil
new file mode 100644 (file)
index 0000000..55e221c
--- /dev/null
@@ -0,0 +1,1651 @@
+"GLOBALS for
+                             TOA #2
+       (c) Copyright 1984 Infocom, Inc.  All Rights Reserved.
+"
+
+<DIRECTIONS NORTH EAST WEST SOUTH UP DOWN IN OUT SE SW NE NW>
+
+"SUBTITLE GLOBAL OBJECTS"
+
+
+<OBJECT GLOBAL-OBJECTS
+       (FLAGS RMUNGBIT INVISIBLE TOUCHBIT SURFACEBIT TRYTAKEBIT VICBIT DOORBIT
+             TURNBIT PERSON VOWELBIT OPENBIT SEARCHBIT TRANSBIT WEARBIT ONBIT
+             TOOLBIT RENTBIT PUSHBIT WORNBIT)
+       ;(FDESC "")
+       ;(LDESC "")
+       ;(TEXT "")
+       ;(SIZE 0)
+       ;(VALUE 0)
+       ;(CAPACITY 0)>
+
+<OBJECT LOCAL-GLOBALS
+       (IN GLOBAL-OBJECTS)
+       (SYNONYM ZZMGCK)
+       ;(DESCFCN 0)
+        ;(GLOBAL GLOBAL-OBJECTS)
+       ;(PSEUDO "FOOBAR" V-WAIT)
+       ;(CONTFCN 0)
+       ;(SIZE 0)>
+;"Yes, this synonym for LOCAL-GLOBALS needs to exist... sigh"
+
+<OBJECT ROOMS>
+
+<OBJECT RED-HERRING
+       (IN LOCAL-GLOBALS)
+       (DESC "thingy")
+       (SYNONYM COMBIN)
+       (ACTION RED-HERRING-F)>
+
+<ROUTINE RED-HERRING-F ()
+        <COND (<VERB? ASK-ABOUT>
+               <RFALSE>)
+              (T <GLOBAL-NOT-HERE-PRINT ,RED-HERRING>)>>
+
+;<OBJECT FOO-TOOL
+       (IN GLOBAL-OBJECTS)
+       (SYNONYM HAMMER CROWBA EXPLOS MACHET)
+       (DESC "such thing")>
+
+;<OBJECT FINGER
+       (IN GLOBAL-OBJECTS)
+       (FLAGS SURFACEBIT OPENBIT CONTBIT TOUCHBIT)
+       (CAPACITY 1)
+       (SYNONYM FINGER)
+       (DESC "finger")
+       ;(ACTION FINGER-FCN)>
+
+;<ROUTINE FINGER-FCN ()
+        <COND (<AND <VERB? PUT-ON>
+                    <PRSI? ,FINGER>>
+               <PERFORM ,V?WEAR ,PRSO>
+               <RTRUE>)
+              (<VERB? EXAMINE LOOK-INSIDE>
+               <COND (<FSET? ,RING ,WEARBIT>
+                      <TELL "Sitting on your finger is a ring." CR>
+                      <RTRUE>)
+                     (T
+                      <TELL "It's part of your hands." CR>
+                      <RTRUE>)>)>>
+
+<OBJECT INTNUM
+       (IN GLOBAL-OBJECTS)
+       (SYNONYM INTNUM)
+       ;(DESC "number")
+       (SDESC "number")
+       (ACTION INTNUM-F)>
+
+<ROUTINE INTNUM-F ()
+        <COND (<AND <VERB? GIVE WITHDRAW>
+                    <NOT ,P-DOLLAR-FLAG>>
+               <TELL "Next time, tell me what there's " N ,P-NUMBER " of." CR>
+               <SETG CLOCK-WAIT T>
+               <RFATAL>)
+              (<AND ,P-DOLLAR-FLAG
+                    <NOT <VERB? WITHDRAW TAKE ASK-FOR>>
+                    <==? ,WINNER ,PLAYER>
+                    <G? ,P-AMOUNT ,POCKET-CHANGE>>
+               <TELL-DONT-HAVE "that much">)>>
+
+<OBJECT INTDIR
+       (IN GLOBAL-OBJECTS)
+       (SYNONYM INTDIR)
+       (ADJECTIVE NORTH EAST SOUTH WEST NE NW SE SW)
+       ;(FLAGS TOOLBIT)
+       (DESC "direction")>
+
+<OBJECT PSEUDO-OBJECT
+       ;(DESC "pseudo")
+       (SDESC "bunch of clothes")
+       (DESCFCN 0)
+       (ACTION CRETIN-F)>
+
+<OBJECT IT
+       (IN GLOBAL-OBJECTS)
+       (SYNONYM IT THAT HIM HER)
+       (DESC "random object")
+       (FLAGS NDESCBIT TOUCHBIT)>
+
+<OBJECT AIR
+       (IN GLOBAL-OBJECTS)
+       (DESC "air")
+       (FLAGS VOWELBIT CONTBIT OPENBIT)
+       (SYNONYM AIR OXYGEN)
+       (TEXT "Air being what it is, you can't see it.")
+       (ACTION AIR-F)>
+
+<ROUTINE AIR-F ()
+        <COND (<VERB? SMELL TASTE>
+               <COND (<AND <AIRTIGHT-ROOM?>
+                           <NOT <FSET? ,MASK ,WORNBIT>>>
+                      <TELL "The air is musty but breathable." CR>)
+                     (<EQUAL? ,HERE ,MM-ENGINE-ROOM ,NW-ENGINE-ROOM>
+                      <TELL "The air is heavy with diesel fumes." CR>)
+                     (<==? <GETP ,HERE ,P?LINE> ,UNDERWATER-LINE-C>
+                      <TELL
+"It feels a whole lot better than the water you could be breathing." CR>)
+                     (T
+                      <TELL "You find nothing special about the air." CR>)>)
+              (<VERB? OPEN CLOSE>
+               <TELL "I think you're an air head." CR>)
+              (<VERB? LOOK-INSIDE>
+               <PERFORM ,V?LOOK>
+               <RTRUE>)
+              (<AND <EQUAL? ,PRSI ,AIR>
+                    <VERB? THROW DROP>>
+               <PERFORM ,PRSA ,PRSO ,GROUND>
+               <RTRUE>)>>
+
+<OBJECT GROUND ;"was GROUND"
+       (IN GLOBAL-OBJECTS)
+       (SYNONYM FLOOR GROUND)
+       (ADJECTIVE OCEAN)
+       (DESC "floor")
+       (ACTION FLOOR-F)>
+
+<ROUTINE FLOOR-F ()
+        <COND (<AND <VERB? PUT-ON PUT>
+                    <PRSI? ,GROUND>>
+               <PERFORM ,V?DROP ,PRSO>
+               <RTRUE>)>>
+
+<OBJECT DECK
+       (IN LOCAL-GLOBALS)
+       (SYNONYM DECK)
+       (ADJECTIVE NORTH SOUTH EAST WEST);"my fingers are crossed"
+       (DESC "deck")
+       (ACTION DECK-F)>
+
+<ROUTINE DECK-F ()
+        <COND (<VERB? WALK-TO>
+               <TELL-SHD-DIR>)
+              (<AND <VERB? PUT-ON PUT>
+                    <PRSI? ,DECK>>
+               <PERFORM ,V?DROP ,PRSO>
+               <RTRUE>)>>
+
+<OBJECT FLOOR-HOLE-1
+       (IN LOCAL-GLOBALS)
+       (DESC "hole")
+       (SYNONYM HOLE HATCH HATCHW)
+       (ADJECTIVE BOTTOM LOWER)
+       (FLAGS INVISIBLE)
+       (ACTION FLOOR-HOLE-F)>
+
+<OBJECT FLOOR-HOLE-2
+       (IN LOCAL-GLOBALS)
+       ;(DESC "hole")
+       (SDESC "hole")
+       (SYNONYM HOLE HATCH HATCHW)
+       (ADJECTIVE BOTTOM LOWER)
+       (FLAGS INVISIBLE)
+       (ACTION FLOOR-HOLE-F)>
+
+<ROUTINE FLOOR-HOLE-F ()
+        <COND (<VERB? THROUGH>
+               <DO-WALK ,P?DOWN>
+               <RTRUE>)
+              (<VERB? LOOK-INSIDE ;LOOK-DOWN>
+               <TELL-YOU-CANT "make anything out on the other side.">)
+              (<VERB? EXAMINE>
+               <COND (<AND <==? ,HERE ,WRECK-5>
+                           <NOT ,WRECK-5-FLOODED>>
+                      <TELL "There's water on the other side." CR>)
+                     (T <TELL-LOOKS-HOLE>)>)>>
+
+<ROUTINE TELL-LOOKS-HOLE ()
+        <TELL "It looks a lot like a hole." CR>>
+
+<OBJECT CEILING-HOLE-1
+       (IN LOCAL-GLOBALS)
+       (DESC "hole")
+       (SYNONYM HOLE HATCH HATCHW)
+       (ADJECTIVE TOP UPPER)
+       (FLAGS INVISIBLE)
+       (ACTION CEILING-HOLE-F)>
+
+<OBJECT CEILING-HOLE-2
+       (IN LOCAL-GLOBALS)
+       ;(DESC "hole")
+       (SDESC "hole")
+       (SYNONYM HOLE HATCH HATCHW)
+       (ADJECTIVE TOP UPPER)
+       (FLAGS INVISIBLE)
+       (ACTION CEILING-HOLE-F)>
+
+<ROUTINE CEILING-HOLE-F ()
+        <COND (<VERB? THROUGH>
+               <DO-WALK ,P?UP>
+               <RTRUE>)
+              (<VERB? LOOK-INSIDE ;LOOK-UP>
+               <TELL-YOU-CANT "make anything out on the other side.">)
+              (<VERB? EXAMINE>
+               <TELL-LOOKS-HOLE>)>>
+
+<OBJECT HOLE
+       (IN GLOBAL-OBJECTS)
+       (FLAGS NDESCBIT)
+       (DESC "hole")
+       (SYNONYM HOLE)
+       (ADJECTIVE SMALL)
+       (ACTION HOLE-F)>
+
+<ROUTINE HOLE-F ()
+        <COND (<VERB? DRILL>
+               <RFALSE>)
+              (T <GLOBAL-NOT-HERE-PRINT ,HOLE>)>>
+
+<OBJECT BULKHEADS
+       (IN GLOBAL-OBJECTS)
+       (FLAGS NDESCBIT TOUCHBIT)
+       (DESC "bulkhead")
+       (SYNONYM BULKHE)>
+
+<OBJECT WALLS
+       (IN GLOBAL-OBJECTS)
+       (FLAGS NDESCBIT TOUCHBIT)
+       (DESC "wall")
+       (SYNONYM WALL WALLS)>
+               
+<OBJECT CEILING
+       (IN GLOBAL-OBJECTS)
+       (FLAGS NDESCBIT TOUCHBIT)
+       (DESC "ceiling")
+       (SYNONYM CEILIN)>
+
+<OBJECT MAST
+       (IN LOCAL-GLOBALS)
+       (DESC "mast")
+       (SYNONYM MAST MASTS)
+       (ADJECTIVE ROTTIN)
+       (FLAGS INVISIBLE)
+       (ACTION MAST-F)>
+
+<ROUTINE MAST-F ()
+        <COND (<VERB? EXAMINE>
+               <TELL "There are several rotting masts here.">
+               <COND (<==? ,HERE ,WRECK-1>
+                      <TELL
+" The top of one has fallen into a hole at your feet.">)>
+               <CRLF>)
+              (<VERB? CLIMB-FOO>
+               <TELL "None of the masts looks sturdy enough." CR>)>>
+
+;<OBJECT HANDS
+       (IN GLOBAL-OBJECTS)
+       (SYNONYM HAND HANDS PAIR ARMS)
+       (ADJECTIVE ARM)
+       (DESC "pair of hands")
+       (FLAGS NDESCBIT TOOLBIT WEAPONBIT TOUCHBIT)
+       ;(ACTION READ-PALMS-F)>
+
+;<ROUTINE READ-PALMS-F ()
+        <COND (<VERB? READ>
+               <TELL "I don't read palms." CR>
+               <RTRUE>)>>
+
+<OBJECT LIGHTHOUSE
+       (IN LOCAL-GLOBALS)
+       (SYNONYM LIGHTH BEACON)
+       (DESC "lighthouse")
+       (ACTION LIGHTHOUSE-F)>
+
+<ROUTINE LIGHTHOUSE-F ()
+        <COND (<EQUAL? ,HERE ,WINDING-ROAD-1>
+               <COND (<VERB? THROUGH OPEN>
+                      <TELL "The door is locked." CR>
+                      <RTRUE>)
+                     (<VERB? EXAMINE>
+                      <TELL 
+"You can see the base of a " D ,LIGHTHOUSE ". ">
+                      <TELL-CLOSED
+                       "door, which has lettering stencilled on it,">
+                      <RTRUE>)>)
+              (T
+               <COND (<VERB? EXAMINE>
+                      <TELL 
+"The " D ,LIGHTHOUSE " towers over Hardscrabble Island from the
+island's northwest corner.">
+                      <COND (<OR <G? ,PRESENT-TIME 1200>
+                                 <L? ,PRESENT-TIME 480>>
+                             <TELL 
+" Its light provides a beacon for ships.">)>
+                      <CRLF>
+                      <RTRUE>)
+                     (<VERB? WALK-TO>
+                      <TELL-SHD-DIR>
+                      ;<TELL "You must supply a " D ,INTDIR "!" CR>)
+                     (<VERB? FIND>
+                      <RFALSE>)
+                     (<VERB? ASK-ABOUT>
+                      <COND (<FSET? ,PRSO ,VICBIT>
+                             <TELL "\"It's been there forever.\"" CR>)>)
+                     (T
+                      <TELL "That would be difficult from this distance." CR>)>)>>
+
+<OBJECT GLOBAL-TREASURE
+       (IN GLOBAL-OBJECTS)
+       (SYNONYM TREASU)
+       (DESC "treasure")
+       (ACTION GLOBAL-TREASURE-F)>
+
+<ROUTINE GLOBAL-TREASURE-F ()
+        <COND (<VERB? ASK-ABOUT ASK-CONTEXT-ABOUT TELL>
+               <RFALSE>)
+              (<VERB? FIND>
+               <COND (<==? ,WINNER ,PLAYER>
+                      <TELL-NOT-EASY>)
+                     (T <TELL "\"I'd like to know where some is.\"" CR>)>)
+              (T <GLOBAL-NOT-HERE-PRINT ,GLOBAL-TREASURE>)>>
+
+<OBJECT TRAWLER
+       (IN LOCAL-GLOBALS)
+       (DESC "Night Wind")
+       (SYNONYM TRAWLE WIND BOAT SHIP)
+       (ADJECTIVE NIGHT)
+       (FLAGS RENTBIT)
+       (LINE 4)
+       (ACTION TRAWLER-F)>
+
+<ROUTINE TRAWLER-F ()
+        <COND (<VERB? EXAMINE>
+               <COND (<==? <GETP ,HERE ,P?LINE> ,TRAWLER-LINE-C>
+                      <TELL 
+"The " D ,TRAWLER " is in decent shape." CR>)
+                     (<AND <==? ,HERE ,MM-WHEELHOUSE>
+                           ,AT-SEA>
+                      <GLOBAL-NOT-HERE-PRINT ,TRAWLER>)
+                     (T 
+                      <TELL "The " D ,TRAWLER>
+                      <TELL-BOAT-DESC>)>)
+              (<VERB? BOARD THROUGH>
+               <COND (<==? ,HERE ,WHARF>
+                      <DO-WALK ,P?WEST>)
+                     (<AND <==? ,HERE ,UNDERWATER>
+                           <==? ,DEPTH 50>>
+                      <DO-WALK ,P?UP>)
+                     (T <TELL-YOU-CANT "get there from here.">)>
+               <RTRUE>)
+              (<VERB? DISEMBARK>
+               <COND (,AT-SEA
+                      <COND (<GLOBAL-IN? ,RAILING ,HERE>
+                             <PERFORM ,V?DIVE>
+                             <RTRUE>)
+                            (T <TELL-NO-EXIT>)>)
+                     (<==? ,HERE ,NW-STARBOARD-DECK>
+                      <DO-WALK ,P?EAST>)
+                     (T <TELL-NO-EXIT>)>)
+              (<AND <VERB? LISTEN>
+                    ,AT-SEA>
+               <TELL-THRUM>)
+              (<VERB? LAUNCH>
+               <TELL-YOU-CANT "do it alone.">)>>
+
+<ROUTINE TELL-NO-EXIT ()
+        <TELL-HOW-THAT "do" "from here">>
+
+<ROUTINE TELL-HOW-THAT (STR "OPTIONAL" (LAST <>))
+        <TELL "How can you " .STR " that">
+        <COND (.LAST <TELL " " .LAST>)>
+        <TELL "?" CR>>
+
+<ROUTINE TELL-BOAT-DESC ()
+        <TELL " looks weathered but not aged." CR>>
+
+<ROUTINE TELL-THRUM ()
+        <TELL "You hear the powerful thrum of diesel engines." CR>>
+
+<OBJECT SALVAGER
+       (IN LOCAL-GLOBALS)
+       (DESC "Mary Margaret")
+       (SYNONYM SALVAG MARGAR SHIP BOAT)
+       (ADJECTIVE MARY)
+       (FLAGS RENTBIT)
+       (LINE 5)
+       (ACTION SALVAGER-F)>
+
+<ROUTINE SALVAGER-F ()
+        <COND (<VERB? EXAMINE>
+               <COND (<==? <GETP ,HERE ,P?LINE> ,SALVAGER-LINE-C>
+                      <TELL 
+"The " D ,SALVAGER " is shipshape." CR>)
+                     (<AND <==? ,HERE ,NW-WHEELHOUSE>
+                           ,AT-SEA>
+                      <GLOBAL-NOT-HERE-PRINT ,SALVAGER>)
+                     (T
+                      <TELL "The " D ,SALVAGER " is a medium-size boat that">
+                      <TELL-BOAT-DESC>)>)
+              (<VERB? BOARD THROUGH>
+               <COND (<==? ,HERE ,WHARF>
+                      <DO-WALK ,P?EAST>)
+                     (<AND <==? ,HERE ,UNDERWATER>
+                           <==? ,DEPTH 50>>
+                      <DO-WALK ,P?UP>)
+                     (T <TELL-YOU-CANT "get there from here.">)>
+               <RTRUE>)
+              (<VERB? DISEMBARK>
+               <COND (,AT-SEA
+                      <COND (<GLOBAL-IN? ,RAILING ,HERE>
+                             <PERFORM ,V?DIVE>
+                             <RTRUE>)
+                            (T <TELL-NO-EXIT>)>)
+                     (<==? ,HERE ,MM-PORT-DECK>
+                      <DO-WALK ,P?WEST>)
+                     (T <TELL-NO-EXIT>)>)
+              (<AND <VERB? LISTEN>
+                    ,AT-SEA>
+               <TELL-THRUM>)
+              (<VERB? LAUNCH>
+               <TELL-YOU-CANT "do it alone.">)>>
+
+<OBJECT SHIPWRECK
+       (IN LOCAL-GLOBALS)
+       (DESC "shipwreck")
+       (SYNONYM WRECK SHIPWR SHIP)
+       (ADJECTIVE ROTTEN)
+       (ACTION SHIPWRECK-F)>
+
+<ROUTINE SHIPWRECK-F ()
+        <COND (<VERB? DISEMBARK>
+               <TELL-NOT-EASY>)
+              (<VERB? EXAMINE>
+               <TELL "It is what's left of a ">
+               <COND (<EQUAL? ,WRECK-CHOSEN 1 3>
+                      <TELL "wooden">)
+                     (T <TELL "steel">)>
+               <TELL " ship." CR>)>>
+
+<OBJECT GLOBAL-SLEEP
+       (IN GLOBAL-OBJECTS)
+       (DESC "sleep")
+       (SYNONYM SLEEP)
+       (ACTION GLOBAL-SLEEP-F)>
+
+<ROUTINE GLOBAL-SLEEP-F ()
+        <COND (<VERB? WALK-TO>
+               <PERFORM ,V?SLEEP>
+               <RTRUE>)
+              (T <TELL "Huh? Wake up!" CR>)>>
+
+;<OBJECT GLOBAL-MEETING
+       (IN GLOBAL-OBJECTS)
+       (DESC "meeting")
+       (SYNONYM MEETING)
+       (ACTION GLOBAL-MEETING-F)>
+
+;<ROUTINE GLOBAL-MEETING-F ()
+       <COND (<VERB? LAMP-ON>
+              <TELL-YOURE-NOT "Tip O'Neill.">)
+             (<VERB? EXAMINE>
+              <TELL "How do you propose I do that?" CR>)>>
+
+<OBJECT FIELD
+       (IN LOCAL-GLOBALS)
+       (DESC "abandoned field")
+       (SYNONYM FIELD WEEDS)
+       (ADJECTIVE ABANDO OVERGR)
+       (FLAGS VOWELBIT)
+       (ACTION FIELD-F)>
+
+<ROUTINE FIELD-F ()
+        <COND (<VERB? BOARD THROUGH>
+               <TELL-YOU-CANT "make your way through the growth.">)
+              (<VERB? LOOK-BEHIND>
+               <TELL <PICK-ONE ,YUKS> CR>)
+              (<VERB? CUT>
+               <TELL-DONT-HAVE "all week">)
+              (<VERB? PLAY>
+               <TELL "Sounds exciting." CR>)
+              (<VERB? EXAMINE>
+               <TELL
+"This field was once productive farmland but hasn't been tended for many
+years." CR>)>>
+
+<OBJECT ROCKS
+       (IN LOCAL-GLOBALS)
+       (DESC "rocky coastline")
+       (SYNONYM ROCKS COASTL)
+       (ADJECTIVE ROCKY)
+       (ACTION ROCKS-F)>
+
+<ROUTINE ROCKS-F ()
+        <COND (<VERB? EXAMINE>
+               <TELL
+"The rocks here are large, pointy, and impossible to get through." CR>)
+              (<VERB? BOARD THROUGH>
+               <TELL-YOU-CANT "get through the rocks.">)>>
+
+<OBJECT POCKET
+       (IN GLOBAL-OBJECTS)
+       (DESC "pocket")
+       (SYNONYM POCKET)
+       (FLAGS CONTBIT OPENBIT)
+       (TEXT "You keep your money in it.")
+       (ACTION POCKET-F)>
+
+<ROUTINE POCKET-F ()
+        <COND (<OR <FSET? ,WET-SUIT ,WORNBIT>
+                   <FSET? ,DEEP-SUIT ,WORNBIT>>
+               <TELL "Your diving gear is over the pocket." CR>)
+              (<AND <VERB? TAKE>
+                    <PRSO? ,GLOBAL-MONEY ,RIDICULOUS-MONEY-KLUDGE>>
+               <TELL-FLASHING-CASH>)
+              (<VERB? LOOK-INSIDE>
+               <TELL "There is $" N ,POCKET-CHANGE " in it." CR>)
+              (<VERB? EMPTY>
+               <TELL "You think better of the idea." CR>)
+              (<VERB? OPEN>
+               <TELL "It's open enough." CR>)
+              (<AND <VERB? PUT>
+                    <PRSI? ,POCKET>>
+               <COND (<AND ,P-DOLLAR-FLAG
+                           <PRSO? ,INTNUM>
+                           <G? ,P-AMOUNT ,POCKET-CHANGE>>
+                      <TELL-DONT-HAVE "that much">)
+                     (<OR <PRSO? ,GLOBAL-MONEY ,RIDICULOUS-MONEY-KLUDGE>
+                          <AND <PRSO? ,INTNUM> ,P-DOLLAR-FLAG>>
+                      <TELL-ALREADY "there">)
+                     (T <TELL-NO-FIT>)>)>>
+
+<ROUTINE TELL-NO-FIT ("OPTIONAL" (STR <>))
+        <TELL "It won't fit">
+        <COND (.STR <TELL " " .STR>)>
+        <TELL "." CR>>
+
+<OBJECT PEOPLE
+       (IN GLOBAL-OBJECTS)
+       (DESC "bunch of people")
+       (SYNONYM PEOPLE)
+       (ACTION PEOPLE-F)>
+
+<ROUTINE PEOPLE-F ()
+        <COND (<EQUAL? ,HERE ,SHANTY ,FERRY-LANDING>
+               <TELL "Leave them alone. They're not bothering you." CR>)
+              (<OR <IN? ,HERE ,WEASEL>
+                   <IN? ,HERE ,JOHNNY>
+                   <IN? ,HERE ,PETE>
+                   <IN? ,HERE ,SPEAR-CARRIER>
+                   <IN? ,HERE ,DELIVERY-BOY>>
+               <TELL-REFER-INDIVIDUAL "s">)
+              (T <GLOBAL-NOT-HERE-PRINT ,PEOPLE>)>>
+
+<ROUTINE TELL-REFER-INDIVIDUAL (STR)
+        <TELL "Refer to individual" .STR "." CR>>
+
+<OBJECT WALLPAPER
+       (IN LOCAL-GLOBALS)
+       (DESC "wallpaper")
+       (SYNONYM WALLPA)
+       (ADJECTIVE FADED DRAB OFF-WH)
+       (TEXT "It's faded to a drab off-white.")>
+
+;<ROUTINE WALLPAPER-F ()
+        <COND (<VERB? EXAMINE>
+               <TELL "It's a drab off-white." CR>)>>
+
+<OBJECT CARPET
+       (IN LOCAL-GLOBALS)
+       (DESC "carpeting")
+       (SYNONYM CARPET RUG)
+       (ADJECTIVE DRAB WORN)
+       (TEXT "It's drab and worn.")>
+
+;<ROUTINE CARPET-F ()
+        <COND (<VERB? EXAMINE>
+               <TELL "It's drab and worn." CR>)>>
+
+<OBJECT GLOBAL-SURFACE ;"local that moves"
+       (IN RED-BOAR-INN)
+       ;(DESC "counter")
+       (SDESC "counter")
+       (SYNONYM TABLE DESK COUNTE DRAWER)
+       (FLAGS SURFACEBIT CONTBIT OPENBIT NDESCBIT)
+       (CAPACITY 10)
+       (ACTION GLOBAL-SURFACE-F)>
+
+<ROUTINE GLOBAL-SURFACE-F ()
+        <COND (<VERB? OPEN>
+               <TELL <PICK-ONE ,YUKS> CR>)>>
+
+<GLOBAL SHARED-OBJECT-TABLE
+       <TABLE 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+              0 0 0 0 0 0 0 0 0 0 0 0 0 0 0>>
+<GLOBAL LAST-S-O-T-PLACE <>>
+
+<ROUTINE MOVE-SHARED-OBJECTS (PLACE "AUX" (CTR 0) (SURFACE? T))
+        <COND (<==? .PLACE ,LAST-S-O-T-PLACE>
+               <RFALSE>)
+              (<EQUAL? ,LAST-S-O-T-PLACE ,MM-CREW-QTRS ,NW-CREW-QTRS>
+               <SET SURFACE? <>>
+               <UNLOAD ,UNDER-BUNK>
+               <UNLOAD ,BUNK>)
+              (<EQUAL? ,LAST-S-O-T-PLACE ,MM-GALLEY ,NW-GALLEY>
+               <UNLOAD ,STOVE>)
+              (<EQUAL? ,LAST-S-O-T-PLACE ,MM-LOUNGE ,NW-LOUNGE>
+               <UNLOAD ,LOUNGE-CHAIR>)>
+        <COND (.SURFACE?
+               <UNLOAD ,GLOBAL-SURFACE>)>
+        <COND (<NOT <EQUAL? .PLACE ,MM-CREW-QTRS ,NW-CREW-QTRS>>
+               <MOVE ,GLOBAL-SURFACE ,PLACE>)>
+        <SETG LAST-S-O-T-PLACE .PLACE>
+        <REPEAT ()
+                <COND (<G? .CTR 44> <RETURN>)
+                      (<==? <GET ,SHARED-OBJECT-TABLE <+ .CTR 1>> .PLACE>
+                       <MOVE <GET ,SHARED-OBJECT-TABLE .CTR>
+                             <GET ,SHARED-OBJECT-TABLE <+ .CTR 2>>>
+                       <PUT ,SHARED-OBJECT-TABLE .CTR 0>
+                       <PUT ,SHARED-OBJECT-TABLE <+ .CTR 1> 0>
+                       <PUT ,SHARED-OBJECT-TABLE <+ .CTR 2> 0>)>
+                <SET CTR <+ .CTR 3>>>>
+
+<ROUTINE UNLOAD (OBJ "AUX" F N)
+        <COND (<SET F <FIRST? .OBJ>>
+               <SET N <NEXT? .F>>
+               <PUT-IN-TABLE .F ,LAST-S-O-T-PLACE .OBJ>
+               <REPEAT ()
+                       <COND (<NOT .N> <RETURN>)>
+                       <SET F .N>
+                       <SET N <NEXT? .F>>
+                       <PUT-IN-TABLE .F ,LAST-S-O-T-PLACE .OBJ>>)>>
+
+<ROUTINE PUT-IN-TABLE (OBJ RM SURF "AUX" (CTR 0))
+        <COND (<==? .OBJ ,PLAYER> <RFALSE>)>
+        <REPEAT ()
+                <COND (<G? .CTR 44> <RETURN>)
+                      (<==? <GET ,SHARED-OBJECT-TABLE .CTR> 0>
+                       <PUT ,SHARED-OBJECT-TABLE .CTR .OBJ>
+                       <PUT ,SHARED-OBJECT-TABLE <+ .CTR 1> .RM>
+                       <PUT ,SHARED-OBJECT-TABLE <+ .CTR 2> .SURF>
+                       <MOVE .OBJ ,LOCAL-GLOBALS>
+                       <RFALSE>)
+                      (T <SET CTR <+ .CTR 3>>)>>
+        <TELL "[BUG: Too much on surfaces.]" CR>>
+
+<OBJECT GLOBAL-BANK
+       (IN GLOBAL-OBJECTS)
+       (SYNONYM BANK TRUST)
+       (ADJECTIVE MARINE TRUST)
+       (DESC "bank")
+       (ACTION GLOBAL-BANK-F)>
+
+<ROUTINE GLOBAL-BANK-F ()
+        <COND (<EQUAL? ,HERE ,BANK>
+               <COND (<VERB? EXAMINE>
+                      <PERFORM ,V?LOOK>
+                      <SETG P-IT-OBJECT ,GLOBAL-BANK>
+                      <RTRUE>)
+                     (<VERB? ROB>
+                      <ROBBERY-ENDING>)
+                     (<VERB? DROP EXIT>
+                      <DO-WALK ,P?OUT>
+                      <RTRUE>)
+                     (<VERB? MUNG>
+                      <TELL "This isn't Monte Carlo." CR>
+                      <RTRUE>)>)
+               (<EQUAL? ,HERE ,SHORE-ROAD-2>
+                <COND (<VERB? THROUGH>
+                       <DO-WALK ,P?IN>
+                       <RTRUE>)
+                      (<VERB? EXAMINE>
+                       <TELL 
+"The " D ,BANK " is an imposing granite building." CR>
+                       <RTRUE>)
+                      (<VERB? ROB>
+                       <COND (,BUSINESS-HOURS?
+                              <ROBBERY-ENDING>)
+                             (T <ROBBERY-ENDING <>>)>)>)
+               (<OR <AND <VERB? ASK-ABOUT>
+                         <PRSI? ,GLOBAL-BANK>>
+                    <AND <VERB? FIND WALK-TO>
+                         <PRSO? ,GLOBAL-BANK>>>
+                <RFALSE>)
+               (T <GLOBAL-NOT-HERE-PRINT ,GLOBAL-BANK>)>>
+
+<ROUTINE ROBBERY-ENDING ("OPTIONAL" (INSIDE? T))
+        <COND (.INSIDE?
+               <TELL 
+"The teller trips the alarm, and policemen come and drag you away.
+As you contemplate a stretch in prison, you consider that
+crime might not pay." CR>)
+              (T
+               <TELL 
+"You don't realize your attempts have set off a silent alarm
+until the police arrive. At that point, you can only wonder if
+attempted robbery wasn't such a bright idea." CR>)>
+        <CRLF>
+        <FINISH>>
+
+<OBJECT GLOBAL-MONEY
+       (IN GLOBAL-OBJECTS)
+       (SYNONYM MONEY CASH \$)
+       (DESC "money")
+       (ACTION GLOBAL-MONEY-F)>
+
+<ROUTINE GLOBAL-MONEY-F ()
+        <COND (<VERB? ASK-FOR ASK-ABOUT STEP WHAT FOLLOW>
+               <RFALSE>)
+              (<VERB? FIND>
+               <TELL-NOT-EASY>
+               <RTRUE>)
+              (<G? ,POCKET-CHANGE 0>
+               <COND (<OR <FSET? ,WET-SUIT ,WORNBIT>
+                          <FSET? ,DEEP-SUIT ,WORNBIT>>
+                      <TELL-CANT-REACH "it">)
+                     (<VERB? COUNT>
+                      <TELL "You are carrying $" N ,POCKET-CHANGE "." CR>)
+                     (<VERB? EXAMINE>
+                      <TELL "It looks a lot like $" N ,POCKET-CHANGE "." CR>)
+                     (<NOT <VERB? TAKE>>
+                      <TELL-FLASHING-CASH>)>)
+              (<EQUAL? ,HERE ,BANK>
+               <TELL 
+"Not surprisingly, the money here is not easily accessible." CR>
+               <RTRUE>)
+              (T <GLOBAL-NOT-HERE-PRINT ,GLOBAL-MONEY>)>>
+
+<ROUTINE TELL-FLASHING-CASH ()
+        <TELL "Flashing your bankroll is not a good idea." CR>>
+
+<OBJECT FERRY-TOKEN
+       (IN GLOBAL-OBJECTS)
+       (SYNONYM TOKEN)
+       (ADJECTIVE FERRY)
+       (DESC "ferry token")
+       (ACTION FERRY-TOKEN-F)>
+
+<ROUTINE FERRY-TOKEN-F ()
+        <COND (<AND <IN? ,SPEAR-CARRIER ,HERE>
+                    <OR <AND <VERB? ASK-ABOUT ASK-FOR>
+                             <PRSO? ,SPEAR-CARRIER>>
+                        <VERB? BUY>>>
+               <NO-TOKENS ,HERE>)
+              (<AND <VERB? ASK-ABOUT>
+                    <FSET? ,PRSO ,PERSON>>
+               <TELL "\"You need them for the ferry.\"" CR>)
+              (<VERB? FIND ASK-FOR>
+               <RFALSE>)
+              (T <GLOBAL-NOT-HERE-PRINT ,FERRY-TOKEN>)>>
+
+<ROUTINE NO-TOKENS (PLACE)
+        <COND (<==? .PLACE ,BANK>
+               <TELL 
+"The teller says, \"We're out. Try Outfitters.\"">)
+              (T <TELL
+"The