From e57804a45359004fd95f29cc015481ea124376e6 Mon Sep 17 00:00:00 2001 From: historicalsource Date: Sat, 13 Apr 2019 21:51:43 -0400 Subject: [PATCH] Final Revision --- 2actions.zap | 3957 +++++++++++++++ 2actions.zil | 159 +- 2dungeon.zap | 109 + 2dungeon.zil | 51 +- gclock.zap | 55 + gclock.zil | 8 +- gglobals.zap | 137 + gglobals.zil | 74 +- gmacros.zap | 39 + gmacros.zil | 4 +- gmain.zap | 238 + gmain.zil | 139 +- gparser.zap | 1612 ++++++ gparser.zil | 1134 +++-- gsyntax.diffs | 117 + gsyntax.zap | 2 + gsyntax.zil | 78 +- gverbs.diffs | 392 ++ gverbs.zap | 2397 +++++++++ gverbs.zil | 444 +- zork2.chart | 16 + zork2.errors | 31 + zork2.record | 923 ++++ zork2.serial | 1 + zork2.zap | 13 + zork2.zil | 46 +- zork2.zip | Bin 89912 -> 92524 bytes zork2dat.zap | 12851 +++++++++++++++++++++++++++++++++++++++++++++++ zork2freq.xzap | 200 + zork2str.zap | 419 ++ 30 files changed, 24830 insertions(+), 816 deletions(-) create mode 100644 2actions.zap create mode 100644 2dungeon.zap create mode 100644 gclock.zap create mode 100644 gglobals.zap create mode 100644 gmacros.zap create mode 100644 gmain.zap create mode 100644 gparser.zap create mode 100644 gsyntax.diffs create mode 100644 gsyntax.zap create mode 100644 gverbs.diffs create mode 100644 gverbs.zap create mode 100644 zork2.chart create mode 100644 zork2.errors create mode 100644 zork2.record create mode 100644 zork2.serial create mode 100644 zork2.zap create mode 100644 zork2dat.zap create mode 100644 zork2freq.xzap create mode 100644 zork2str.zap diff --git a/2actions.zap b/2actions.zap new file mode 100644 index 0000000..6cd4d9b --- /dev/null +++ b/2actions.zap @@ -0,0 +1,3957 @@ + + + .FUNCT SWORD-FCN + EQUAL? PRSA,V?TAKE \FALSE + EQUAL? WINNER,ADVENTURER \FALSE + CALL QUEUE,I-SWORD,-1 + PUT STACK,0,1 + RFALSE + + + .FUNCT I-SWORD,DEM,NG=0,G,P,TX,L + CALL INT,I-SWORD >DEM + SET 'G,SWORD-GLOW + IN? SWORD,ADVENTURER \?ELS5 + CALL INFESTED?,HERE + ZERO? STACK /?ELS8 + SET 'NG,2 + JUMP ?CND6 +?ELS8: SET 'P,0 +?PRG11: NEXTP HERE,P >P + ZERO? P \?ELS15 + JUMP ?CND6 +?ELS15: LESS? P,LOW-DIRECTION /?PRG11 + GETPT HERE,P >TX + PTSIZE TX >L + EQUAL? L,UEXIT,CEXIT,DEXIT \?PRG11 + GETB TX,0 + CALL INFESTED?,STACK + ZERO? STACK /?PRG11 + SET 'NG,1 +?CND6: EQUAL? NG,G /FALSE + EQUAL? NG,2 \?ELS28 + PRINTI "Your sword has begun to glow very brightly." + CRLF + JUMP ?CND24 +?ELS28: EQUAL? NG,1 \?ELS32 + PRINTI "Your sword is glowing with a faint blue glow." + CRLF + JUMP ?CND24 +?ELS32: ZERO? NG \?CND24 + PRINTI "Your sword is no longer glowing." + CRLF +?CND24: SET 'SWORD-GLOW,NG + RTRUE +?ELS5: PUT DEM,C-ENABLED?,0 + RFALSE + + + .FUNCT INFESTED?,R,F + FIRST? R >F /?KLU12 +?KLU12: +?PRG1: ZERO? F /FALSE + FSET? F,ACTORBIT \?ELS7 + FSET? F,INVISIBLE /?ELS7 + EQUAL? F,ROBOT /?ELS7 + RETURN F +?ELS7: NEXT? F >F /?PRG1 + RFALSE + + + .FUNCT CAROUSEL-ROOM-FCN,RARG + EQUAL? RARG,M-LOOK \?ELS5 + PRINTI "You are in a large circular room whose high ceiling is lost in gloom. Eight identical passages leave the room." + CRLF + ZERO? CAROUSEL-FLIP-FLAG \TRUE + PRINTR "A loud whirring sound comes from all around, and you feel sort of disoriented in here." +?ELS5: ZERO? CAROUSEL-FLIP-FLAG \FALSE + EQUAL? RARG,M-BEG \FALSE + EQUAL? PRSA,V?WALK \FALSE + EQUAL? PRSO,P?UP,P?DOWN /FALSE + EQUAL? PRSO,P?OUT \?ELS22 + PRINTI "Feeling dizzy, you pick a direction at random." + CRLF + CRLF + SET 'PRSO,P?EAST + JUMP ?CND20 +?ELS22: PRINTI "You're not sure which direction is which. This room is very disorienting." + CRLF + CRLF +?CND20: EQUAL? PRSO,P?WEST /?THN32 + RANDOM 100 + GRTR? 80,STACK \?CND29 +?THN32: RANDOM 7 + SUB STACK,1 + GET EIGHT-DIRECTIONS,STACK >PRSO +?CND29: CALL V-WALK + RTRUE + + + .FUNCT VIOLIN-FCN + EQUAL? PRSA,V?PLAY \FALSE + EQUAL? PRSO,VIOLIN \FALSE + PRINTR "An amazingly offensive noise issues from the violin." + + + .FUNCT OPEN-CLOSE,OBJ,STROPN,STRCLS + EQUAL? PRSA,V?OPEN \?ELS5 + FSET? OBJ,OPENBIT \?ELS8 + CALL RANDOM-ELEMENT,DUMMY + PRINT STACK + JUMP ?CND6 +?ELS8: PRINT STROPN + FSET OBJ,OPENBIT +?CND6: CRLF + RTRUE +?ELS5: EQUAL? PRSA,V?CLOSE \FALSE + FSET? OBJ,OPENBIT \?ELS19 + PRINT STRCLS + FCLEAR OBJ,OPENBIT + JUMP ?CND17 +?ELS19: CALL RANDOM-ELEMENT,DUMMY + PRINT STACK + CRLF +?CND17: CRLF + RTRUE + + + .FUNCT BALLOON-FCN,RARG=0,M,R,RC + EQUAL? RARG,M-LOOK \?ELS5 + ZERO? BINF-FLAG /?ELS8 + PRINTI "The cloth bag is inflated and " + FSET? RECEPTACLE,OPENBIT \?ELS14 + PRINTI "there is a " + PRINTD BINF-FLAG + PRINTI " burning in the receptacle." + JUMP ?CND6 +?ELS14: PRINTI "some smoke is leaking out of the closed receptacle." + JUMP ?CND6 +?ELS8: PRINTI "The cloth bag is draped over the side of the basket. Directly in the middle of the basket is a metal receptacle which is " + FSET? RECEPTACLE,OPENBIT \?ELS27 + PRINTI "open" + FIRST? RECEPTACLE >RC /?KLU148 +?KLU148: ZERO? RC /?CND25 + PRINTI ". A " + PRINTD RC + PRINTI " is " + EQUAL? BINF-FLAG,RC \?ELS40 + PUSH STR?204 + JUMP ?CND36 +?ELS40: PUSH STR?205 +?CND36: PRINT STACK + PRINTI " inside" + JUMP ?CND25 +?ELS27: PRINTI "closed" +?CND25: PRINTI "." +?CND6: ZERO? BTIE-FLAG /?ELS51 + PRINTR " The balloon is tied to a hook by the braided wire." +?ELS51: PRINTR " A braided wire is dangling over the side of the basket." +?ELS5: EQUAL? RARG,M-OBJDESC \?ELS60 + PRINTI "There is a large and extremely heavy wicker basket here. An enormous cloth bag " + ZERO? BINF-FLAG /?ELS65 + PRINTI "attached to the basket is inflated. A metal receptacle is fastened to the center of the basket. " + FSET? RECEPTACLE,OPENBIT \?ELS71 + PRINTI "In it is a burning " + PRINTD BINF-FLAG + JUMP ?CND63 +?ELS71: PRINTI "Some smoke leaks out around its closed lid" + JUMP ?CND63 +?ELS65: PRINTI "is draped over the side and is firmly attached to the basket. A metal receptacle is fastened to the center of the basket" +?CND63: ZERO? BTIE-FLAG /?ELS86 + PRINTR ". A piece of wire tied to a hook holds the balloon in place." +?ELS86: PRINTR ". Dangling from the basket is a piece of braided wire." +?ELS60: EQUAL? RARG,M-BEG \FALSE + EQUAL? PRSA,V?WALK \?ELS100 + GETPT HERE,PRSO >M + ZERO? M /?ELS105 + ZERO? BTIE-FLAG /?ELS110 + PRINTR "You are tied to the ledge." +?ELS110: PTSIZE M + EQUAL? STACK,1 \?ELS117 + GETB M,0 >R + FSET? R,RMUNGBIT /?ELS117 + SET 'BLOC,R +?ELS117: CALL QUEUE,I-BALLOON,3 + PUT STACK,0,1 + RFALSE +?ELS105: PRINTR "You can't control the balloon this way." +?ELS100: EQUAL? PRSA,V?OPEN \?ELS123 + ZERO? BINF-FLAG /?ELS123 + EQUAL? PRSO,RECEPTACLE \?ELS123 + FIRST? RECEPTACLE \?ELS123 + PRINTI "Opening it reveals a burning " + PRINTD BINF-FLAG + PRINTI "." + CRLF + FSET RECEPTACLE,OPENBIT + RTRUE +?ELS123: EQUAL? PRSA,V?TAKE \?ELS129 + EQUAL? BINF-FLAG,PRSO \?ELS129 + PRINTI "You don't really want to hold a burning " + PRINTD PRSO + PRINTR "." +?ELS129: EQUAL? PRSA,V?PUT \?ELS135 + EQUAL? PRSI,RECEPTACLE \?ELS135 + FIRST? RECEPTACLE \?ELS135 + PRINTR "The receptacle is already occupied." +?ELS135: EQUAL? PRSA,V?PUT \?ELS141 + EQUAL? PRSI,RECEPTACLE \?ELS141 + FSET PRSO,NDESCBIT + RFALSE +?ELS141: EQUAL? PRSA,V?INFLATE \FALSE + PRINTR "It takes more than words to inflate a balloon." + + + .FUNCT I-BALLOON + FSET? RECEPTACLE,OPENBIT \?ELS5 + ZERO? BINF-FLAG /?ELS5 + CALL RISE-AND-SHINE + RSTACK +?ELS5: EQUAL? HERE,LEDGE-1,LEDGE-2 \?ELS9 + CALL RISE-AND-SHINE + RSTACK +?ELS9: CALL DECLINE-AND-FALL + RSTACK + + + .FUNCT BALLOON-BURN + PRINTI "The " + PRINTD PRSO + PRINTI " burns inside the receptacle." + CRLF + GETP PRSO,P?SIZE + MUL STACK,20 + CALL QUEUE,I-BURNUP,STACK + PUT STACK,0,1 + FSET PRSO,FLAMEBIT + FSET PRSO,ONBIT + FCLEAR PRSO,TAKEBIT + FCLEAR PRSO,READBIT + ZERO? BINF-FLAG \TRUE + PRINTI "The cloth bag inflates as it fills with hot air." + CRLF + ZERO? BLAB-FLAG \?CND13 + PRINTI "A small label drops from the bag into the basket." + CRLF + MOVE BALLOON-LABEL,BALLOON +?CND13: SET 'BLAB-FLAG,TRUE-VALUE + SET 'BINF-FLAG,PRSO + CALL QUEUE,I-BALLOON,3 + PUT STACK,0,1 + RTRUE + + + .FUNCT PUT-BALLOON,THERE,STR + EQUAL? HERE,LEDGE-1,LEDGE-2,VOLCANO-BOTTOM \?CND1 + PRINTI "You watch as the balloon slowly " + PRINT STR + CRLF +?CND1: MOVE BALLOON,THERE + SET 'BLOC,THERE + RETURN BLOC + + + .FUNCT RISE-AND-SHINE,IN,R + IN? WINNER,BALLOON /?PRD1 + PUSH 0 + JUMP ?PRD2 +?PRD1: PUSH 1 +?PRD2: SET 'IN,STACK + CALL QUEUE,I-BALLOON,3 + PUT STACK,0,1 + EQUAL? BLOC,VAIR-4 \?ELS7 + CALL INT,I-BURNUP + PUT STACK,0,0 + CALL INT,I-BALLOON + PUT STACK,0,0 + REMOVE BALLOON + ZERO? IN /?ELS10 + CALL JIGS-UP,STR?206 + JUMP ?CND8 +?ELS10: EQUAL? HERE,LEDGE-1,LEDGE-2,VOLCANO-BOTTOM \?CND8 + PRINTI "You watch the balloon drift out over the rim and away on the wind." + CRLF +?CND8: SET 'BLOC,VOLCANO-BOTTOM + RETURN BLOC +?ELS7: CALL LKP,BLOC,BALLOON-UPS >R + ZERO? R /?ELS17 + ZERO? IN /?ELS22 + PRINTI "The balloon ascends." + CRLF + CRLF + SET 'BLOC,R + CALL GOTO,R + RSTACK +?ELS22: CALL PUT-BALLOON,R,STR?207 + RSTACK +?ELS17: CALL LKP,BLOC,BALLOON-FLOATS >R + ZERO? R /?ELS29 + ZERO? IN /?ELS34 + PRINTI "The balloon leaves the ledge." + CRLF + CRLF + SET 'BLOC,R + CALL GOTO,R + RSTACK +?ELS34: CALL QUEUE,I-GNOME,10 + PUT STACK,0,1 + CALL PUT-BALLOON,R,STR?208 + FSET RECEPTACLE,OPENBIT + RTRUE +?ELS29: ZERO? IN /?ELS41 + SET 'BLOC,VAIR-1 + PRINTI "The balloon rises slowly from the ground." + CRLF + CRLF + CALL GOTO,VAIR-1 + RSTACK +?ELS41: CALL PUT-BALLOON,VAIR-1,STR?209 + RSTACK + + + .FUNCT DECLINE-AND-FALL,IN,R + IN? WINNER,BALLOON /?PRD1 + PUSH 0 + JUMP ?PRD2 +?PRD1: PUSH 1 +?PRD2: SET 'IN,STACK + CALL QUEUE,I-BALLOON,3 + PUT STACK,0,1 + EQUAL? BLOC,VAIR-1 \?ELS7 + ZERO? IN /?ELS12 + SET 'BLOC,VOLCANO-BOTTOM + ZERO? BINF-FLAG /?ELS18 + PRINTI "The balloon has landed." + CRLF + CRLF + CALL GOTO,VOLCANO-BOTTOM + RSTACK +?ELS18: REMOVE BALLOON + MOVE DEAD-BALLOON,BLOC + MOVE WINNER,HERE + CALL INT,I-BALLOON + PUT STACK,0,0 + PRINTI "You have landed, but the balloon did not survive." + CRLF + CRLF + CALL GOTO,VOLCANO-BOTTOM + RSTACK +?ELS12: CALL PUT-BALLOON,VOLCANO-BOTTOM,STR?210 + RSTACK +?ELS7: CALL LKP,BLOC,BALLOON-DOWNS >R + ZERO? R /FALSE + ZERO? IN /?ELS34 + PRINTI "The balloon descends." + CRLF + CRLF + SET 'BLOC,R + CALL GOTO,R + RSTACK +?ELS34: CALL PUT-BALLOON,R,STR?211 + RSTACK + + + .FUNCT BCONTENTS + EQUAL? PRSA,V?TAKE \?ELS5 + PRINTI "The " + PRINTD PRSO + PRINTI " is an integral part of the basket and cannot be removed." + EQUAL? PRSO,BRAIDED-WIRE \?CND8 + PRINTI " The wire might possibly be tied, though." +?CND8: CRLF + RTRUE +?ELS5: EQUAL? PRSO,CLOTH-BAG \?ELS14 + EQUAL? PRSA,V?OPEN,V?LOOK-INSIDE \?ELS14 + EQUAL? PRSA,V?OPEN \?ELS21 + PRINTR "The bag is enormous. The concept of opening it here is ludicrous." +?ELS21: PRINTR "It doesn't appear that there's anything inside." +?ELS14: EQUAL? PRSA,V?EXAMINE \?ELS29 + EQUAL? PRSO,RECEPTACLE \?ELS29 + PRINTI "The receptacle is " + FSET? PRSO,OPENBIT \?ELS38 + PRINTR "open." +?ELS38: PRINTR "closed." +?ELS29: EQUAL? PRSA,V?EXAMINE,V?FIND \FALSE + PRINTI "The " + PRINTD PRSO + PRINTR " is part of the basket. It may be manipulated within the basket but cannot be removed." + + + .FUNCT WIRE-FCN + EQUAL? PRSA,V?EXAMINE,V?FIND,V?TAKE \?ELS5 + CALL BCONTENTS + RSTACK +?ELS5: EQUAL? PRSA,V?TIE \?ELS7 + EQUAL? PRSO,BRAIDED-WIRE \FALSE + EQUAL? PRSI,HOOK-1,HOOK-2 \FALSE + SET 'BTIE-FLAG,PRSI + FSET PRSI,NDESCBIT + CALL INT,I-BALLOON + PUT STACK,0,0 + PRINTR "The balloon is fastened to the hook." +?ELS7: EQUAL? PRSA,V?UNTIE \FALSE + EQUAL? PRSO,BRAIDED-WIRE \FALSE + ZERO? BTIE-FLAG /?ELS25 + CALL QUEUE,I-BALLOON,3 + PUT STACK,0,1 + FCLEAR BTIE-FLAG,NDESCBIT + SET 'BTIE-FLAG,FALSE-VALUE + PRINTR "The wire falls off of the hook." +?ELS25: PRINTR "The wire is not tied to anything." + + + .FUNCT I-BURNUP,OBJ + FIRST? RECEPTACLE >OBJ /?KLU6 +?KLU6: EQUAL? HERE,BLOC \?CND1 + PRINTI "The " + PRINTD OBJ + PRINTI " has now burned out, and the cloth bag starts to deflate." + CRLF +?CND1: REMOVE OBJ + SET 'BINF-FLAG,FALSE-VALUE + RTRUE + + + .FUNCT SAFE-ROOM-FCN,RARG + EQUAL? RARG,M-LOOK \FALSE + PRINTI "You are in a dusty old room which is featureless, except for an exit on the north side." + CRLF + ZERO? SAFE-FLAG \?ELS12 + PRINTR "Imbedded in the far wall is a rusty box. It appears to be somewhat damaged, since an oblong hole has been chipped out of the front of it." +?ELS12: PRINTR "On the far wall is a rusty box, whose door has been blown off." + + + .FUNCT SAFE-FCN + EQUAL? PRSA,V?TAKE \?ELS5 + EQUAL? PRSO,SAFE \?ELS5 + PRINTR "The box is imbedded in the wall." +?ELS5: EQUAL? PRSA,V?OPEN \?ELS11 + ZERO? SAFE-FLAG /?ELS16 + PRINTR "The box has no door!" +?ELS16: PRINTR "The box is rusted and will not open." +?ELS11: EQUAL? PRSA,V?CLOSE \FALSE + ZERO? SAFE-FLAG /?ELS30 + PRINTR "The box has no door!" +?ELS30: PRINTR "The box isn't open!" + + + .FUNCT BRICK-FCN + EQUAL? PRSA,V?BURN \FALSE + REMOVE BRICK + CALL JIGS-UP,OTHER-PROPERTIES + RSTACK + + + .FUNCT FUSE-FCN + EQUAL? PRSA,V?BURN /?THN6 + EQUAL? PRSA,V?LAMP-ON \FALSE + IN? MATCH,WINNER \FALSE + FSET? MATCH,ONBIT \FALSE +?THN6: PRINTI "The string starts to burn." + CRLF + CALL QUEUE,I-FUSE,2 + PUT STACK,0,1 + RTRUE + + + .FUNCT I-FUSE,BRICK-ROOM,F + LOC BRICK >BRICK-ROOM + IN? FUSE,BRICK \?ELS3 +?PRG4: ZERO? BRICK-ROOM /FALSE + IN? BRICK-ROOM,ROOMS \?ELS10 + JUMP ?REP5 +?ELS10: LOC BRICK-ROOM >BRICK-ROOM + JUMP ?PRG4 +?REP5: MOVE EXPLOSION,BRICK-ROOM + FCLEAR BRICK-ROOM,TOUCHBIT + EQUAL? BRICK-ROOM,HERE \?ELS15 + CALL MUNG-ROOM,BRICK-ROOM,STR?213 + CALL JIGS-UP,OTHER-PROPERTIES + JUMP ?CND13 +?ELS15: EQUAL? BRICK-ROOM,SAFE-ROOM \?ELS17 + CALL QUEUE,I-SAFE,5 + PUT STACK,0,1 + SET 'MUNGED-ROOM,SAFE-ROOM + PRINTI "There is an explosion nearby." + CRLF + IN? BRICK,SLOT \?CND13 + FSET SLOT,INVISIBLE + FSET SAFE,OPENBIT + FCLEAR SAFE-ROOM,TOUCHBIT + SET 'SAFE-FLAG,TRUE-VALUE + JUMP ?CND13 +?ELS17: PRINTI "There is an explosion nearby." + CRLF + CALL QUEUE,I-SAFE,5 + PUT STACK,0,1 + SET 'MUNGED-ROOM,BRICK-ROOM + FIRST? BRICK-ROOM >F \?CND13 +?PRG30: FSET? F,TAKEBIT \?CND32 + FSET F,INVISIBLE +?CND32: NEXT? F >F /?PRG30 +?CND13: REMOVE BRICK + JUMP ?CND1 +?ELS3: LOC FUSE + EQUAL? STACK,WINNER,HERE \?CND1 + PRINTI "The string rapidly burns into nothingness." + CRLF +?CND1: REMOVE FUSE + RTRUE + + + .FUNCT I-SAFE + EQUAL? HERE,MUNGED-ROOM \?ELS3 + CALL JIGS-UP,STR?214 + JUMP ?CND1 +?ELS3: ZERO? DEAD \?CND1 + PRINTI "You may recall that recent explosion. Probably as a result of it, you hear an ominous rumbling, as if a nearby room had collapsed." + CRLF + EQUAL? MUNGED-ROOM,SAFE-ROOM \?CND1 + CALL QUEUE,I-LEDGE,8 + PUT STACK,0,1 +?CND1: CALL MUNG-ROOM,MUNGED-ROOM,STR?213 + RSTACK + + + .FUNCT I-LEDGE,RM=LEDGE-2 + EQUAL? HERE,LEDGE-2 \?ELS3 + IN? WINNER,BALLOON \?ELS6 + ZERO? BTIE-FLAG /?ELS9 + SET 'BLOC,VOLCANO-BOTTOM + REMOVE BALLOON + MOVE DEAD-BALLOON,VOLCANO-BOTTOM + SET 'BTIE-FLAG,FALSE-VALUE + SET 'BINF-FLAG,FALSE-VALUE + CALL INT,I-BALLOON + PUT STACK,0,0 + CALL INT,I-BURNUP + PUT STACK,0,0 + CALL JIGS-UP,STR?215 + JUMP ?CND1 +?ELS9: PRINTI "The ledge collapses, leaving you with no place to land." + CRLF + JUMP ?CND1 +?ELS6: CALL JIGS-UP,STR?216 + JUMP ?CND1 +?ELS3: ZERO? DEAD \?CND1 + PRINTI "The ledge collapses. (That was a narrow escape!)" + CRLF +?CND1: CALL MUNG-ROOM,RM,STR?217 + RSTACK + + + .FUNCT LEDGE-FCN,RARG + EQUAL? RARG,M-LOOK \FALSE + PRINTI "You are on a wide ledge high in the volcano. The rim of the volcano is about 200 feet above and there is a precipitous drop to the bottom." + FSET? SAFE-ROOM,RMUNGBIT \?ELS12 + PRINTR " The way to the south is blocked by rubble." +?ELS12: PRINTR " There is a small door to the south." + + + .FUNCT I-GNOME + EQUAL? HERE,LEDGE-1,LEDGE-2 \?ELS5 + PRINTI "A volcano gnome seems to walk straight out of the wall and " + IN? WAND,WINNER \?ELS12 + PRINTR "noticing the wand, straight back in." +?ELS12: PRINTI "says ""I have a busy appointment schedule and little time to waste on trespassers, but for a small fee I'll show you the way out."" You notice the gnome nervously glancing at his watch." + CRLF + MOVE GNOME,HERE + RTRUE +?ELS5: CALL QUEUE,I-GNOME,1 + PUT STACK,0,1 + RFALSE + + + .FUNCT GNOME-FCN + EQUAL? PRSA,V?TELL \?ELS5 + SET 'P-CONT,FALSE-VALUE + SET 'QUOTE-FLAG,FALSE-VALUE + ZERO? GNOME-FLAG \?CND6 + CALL QUEUE,I-NERVOUS,5 + PUT STACK,0,1 +?CND6: SET 'GNOME-FLAG,TRUE-VALUE + PRINTR "The gnome appears increasingly nervous." +?ELS5: EQUAL? PRSA,V?THROW,V?GIVE \?ELS12 + EQUAL? PRSI,GNOME \?ELS12 + GETPT PRSO,P?VALUE + ZERO? STACK /?ELS19 + PRINTI """Thank you very much for the " + PRINTD PRSO + PRINTI ". I don't believe I've ever seen one as beautiful. Follow me,"" he says, and a door appears on the west end of the ledge. Through the door, you can see a narrow chimney sloping steeply downward. The gnome moves quickly, and disappears from sight." + CRLF + REMOVE PRSO + REMOVE GNOME + SET 'GNOME-DOOR-FLAG,TRUE-VALUE + RETURN GNOME-DOOR-FLAG +?ELS19: CALL BOMB?,PRSO + ZERO? STACK /?ELS23 + MOVE BRICK,HERE + REMOVE GNOME + CALL INT,I-GNOME + PUT STACK,0,0 + CALL INT,I-NERVOUS + PUT STACK,0,0 + PRINTR """That certainly wasn't what I had in mind,"" he says, and disappears." +?ELS23: CALL REMOVE-CAREFULLY,PRSO + PRINTI """That wasn't quite what I had in mind,"" he says, crunching the " + PRINTD PRSO + PRINTR " in his rock-hard hands." +?ELS12: PRINTI "The gnome appears increasingly nervous." + CRLF + ZERO? GNOME-FLAG \?CND34 + CALL QUEUE,I-NERVOUS,5 + PUT STACK,0,1 +?CND34: SET 'GNOME-FLAG,TRUE-VALUE + RETURN GNOME-FLAG + + + .FUNCT I-NERVOUS + IN? GNOME,HERE \?CND1 + PRINTI "The gnome glances at his watch. ""Oops. I'm late for an appointment!"" He disappears, leaving you alone on the ledge." + CRLF +?CND1: REMOVE GNOME + RTRUE + + + .FUNCT PURPLE-BOOK-FCN + EQUAL? PRSA,V?READ \?ELS5 + IN? STAMP,PURPLE-BOOK \?ELS5 + FSET? PURPLE-BOOK,OPENBIT /?ELS5 + GETP PURPLE-BOOK,P?TEXT + PRINT STACK + CRLF + CALL PERFORM,V?OPEN,PURPLE-BOOK + RTRUE +?ELS5: CALL RANDOM-BOOK + RSTACK + + + .FUNCT RANDOM-BOOK + EQUAL? PRSA,V?PUT,V?MOVE,V?TAKE \FALSE + FSET WHITE-BOOK,TOUCHBIT + FSET PURPLE-BOOK,TOUCHBIT + FSET GREEN-BOOK,TOUCHBIT + FSET BLUE-BOOK,TOUCHBIT + RFALSE + + + .FUNCT HEAD-FCN + EQUAL? PRSA,V?HELLO \?ELS5 + PRINTR "The Flatheads are dead; therefore they do not respond." +?ELS5: EQUAL? PRSA,V?RUB,V?ATTACK,V?KICK /?THN10 + EQUAL? PRSA,V?BURN,V?TAKE,V?OPEN \FALSE +?THN10: CALL JIGS-UP,STR?218 + RSTACK + + + .FUNCT CRYPT-ANTEROOM-FCN,RARG + EQUAL? RARG,M-LOOK \FALSE + PRINTI "The anteroom is large and empty. Marble bas reliefs depict the stirring times and afterlife of the Flatheads (the latter a bit optimistically). The exit is to the west. A huge marble door stands to the south. " + PRINTI "The door is " + FSET? CRYPT-DOOR,OPENBIT \?ELS12 + PRINTI "open." + JUMP ?CND10 +?ELS12: PRINTI "closed." +?CND10: PRINTR " Above the door is the cryptic inscription: ""Feel Free""." + + + .FUNCT CRYPT-ROOM-FCN,RARG,CLIT? + EQUAL? RARG,M-LOOK \?ELS5 + FCLEAR HERE,ONBIT + CALL LIT?,HERE + ZERO? STACK /?ELS8 + PRINTI "The room contains the earthly remains of the mighty Flatheads, twelve somewhat flat heads mounted securely on poles. While the room might be expected to contain funerary urns or other evidence of the ritual practices of the ancient Zorkers, it is empty of all such objects. There is writing carved on the crypt. The only apparent exit is to the north through the door to the anteroom. The door is " + FSET? CRYPT-DOOR,OPENBIT \?ELS13 + PRINTI "open." + JUMP ?CND11 +?ELS13: PRINTI "closed." +?CND11: CRLF + FSET? DIM-DOOR,INVISIBLE /?CND6 + PRINTI "Looking closely at the south wall, you can see the dim outline of a secret door labelled with the letter ""F""." + CRLF + JUMP ?CND6 +?ELS8: CALL DIM-DOOR-APPEARS +?CND6: FSET HERE,ONBIT + RTRUE +?ELS5: EQUAL? RARG,M-END \FALSE + SET 'CLIT?,CRYPT-LIT? + FCLEAR CRYPT-ROOM,ONBIT + CALL LIT?,CRYPT-ROOM >CRYPT-LIT? + ZERO? CLIT? /?CND29 + ZERO? CRYPT-LIT? \?CND29 + CALL DIM-DOOR-APPEARS +?CND29: FSET CRYPT-ROOM,ONBIT + RTRUE + + + .FUNCT DIM-DOOR-APPEARS + PRINTI "It is dark, but on the south wall is a faint outline of a rectangle, as though light were shining around a doorway. You can also make out a faintly glowing letter in the center of this area. It might be an ""F""." + CRLF + FCLEAR DIM-DOOR,INVISIBLE + RTRUE + + + .FUNCT CRYPT-OBJECT + EQUAL? PRSA,V?OPEN \?ELS5 + PRINTR "The crypt is sealed for all time." +?ELS5: EQUAL? PRSA,V?RUB \FALSE + PRINTR "The marble is cool." + + + .FUNCT CRYPT-DOOR-FCN + EQUAL? PRSA,V?CLOSE,V?OPEN \FALSE + CALL OPEN-CLOSE,PRSO,STR?219,STR?220 + RSTACK + + + .FUNCT TOMB-PSEUDO + EQUAL? PRSA,V?THROUGH \FALSE + CALL DO-WALK,P?EAST + RTRUE + + + .FUNCT DIM-DOOR-FCN + EQUAL? PRSA,V?KNOCK \?ELS5 + PRINTR "A hollow echo responds." +?ELS5: EQUAL? PRSA,V?CLOSE,V?OPEN \FALSE + EQUAL? PRSA,V?OPEN \?ELS12 + SET 'DIM-DOOR-FLAG,TRUE-VALUE + JUMP ?CND10 +?ELS12: SET 'DIM-DOOR-FLAG,FALSE-VALUE +?CND10: CALL OPEN-CLOSE,PRSO,STR?221,STR?222 + RSTACK + + + .FUNCT REPELLENT-FCN + EQUAL? PRSA,V?SHAKE \?ELS5 + ZERO? SPRAY-USED? /?ELS10 + PRINTR "The can seems empty." +?ELS10: PRINTR "There is a sloshing sound from inside." +?ELS5: EQUAL? PRSA,V?PUT,V?SPRAY \FALSE + EQUAL? PRSO,REPELLENT \FALSE + ZERO? SPRAY-USED? /?ELS26 + PRINTR "The repellent is all gone." +?ELS26: ZERO? PRSI \?ELS31 + SET 'SPRAY-USED?,TRUE-VALUE + PRINTR "The spray stinks amazingly for a few moments, then drifts away." +?ELS31: EQUAL? PRSI,ME \?CND36 + CALL QUEUE,I-SPRAY,8 + PUT STACK,0,1 + SET 'SPRAYED?,TRUE-VALUE +?CND36: SET 'SPRAY-USED?,TRUE-VALUE + PRINTR "The spray smells like a mixture of old socks and burning rubber. If I were a grue I'd sure stay clear!" + + + .FUNCT I-SPRAY + SET 'SPRAYED?,FALSE-VALUE + PRINTR "That horrible smell is much less pungent now." + + + .FUNCT ZORK3-FCN,RARG + EQUAL? RARG,M-LOOK \FALSE + PRINTI "Beyond the door is a roughly hewn staircase leading down into darkness. The landing on which you stand is covered with carefully drawn magical runes like those sketched upon the workbench of the Wizard of Frobozz. These have been overlaid with sweeping green lines of enormous power, which undulate back and forth across the landing. " + IN? WAND,WINNER \?ELS12 + PRINTI "The wand begins to vibrate in harmony with the motion of the lines. You feel yourself compelled downward, and you yield, stepping onto the staircase. As you pass the green lines, they flare and disappear with a burst of light, and you tumble down the staircase! + +At the bottom, a vast red-lit hall stretches off into the distance. Sinister statues guard the entrance to a dimly visible room far ahead. With courage and cunning you have conquered the Wizard of Frobozz and become the master of his domain, but the final challenge awaits! + +(The ultimate adventure concludes in ""Zork III: The Dungeon Master"".) + +" + CRLF + SET 'WON-FLAG,TRUE-VALUE + CALL FINISH + RSTACK +?ELS12: CALL JIGS-UP,STR?223 + RSTACK + + + .FUNCT I-BUCKET + IN? WATER,BUCKET \FALSE + SET 'EVAPORATED,TRUE-VALUE + REMOVE WATER + RFALSE + + + .FUNCT WATER-FCN,AV,W,PI? + EQUAL? PRSA,V?SGIVE /FALSE + EQUAL? PRSA,V?THROUGH \?ELS5 + CALL PERFORM,V?SWIM,PRSO + RTRUE +?ELS5: EQUAL? PRSA,V?FILL \?ELS7 + SET 'W,PRSI + SET 'PRSA,V?PUT + SET 'PRSI,PRSO + SET 'PRSO,W + SET 'PI?,FALSE-VALUE + JUMP ?CND1 +?ELS7: EQUAL? PRSO,GLOBAL-WATER,WATER \?ELS9 + SET 'W,PRSO + SET 'PI?,FALSE-VALUE + JUMP ?CND1 +?ELS9: ZERO? PRSI /?CND1 + SET 'W,PRSI + SET 'PI?,TRUE-VALUE +?CND1: EQUAL? W,GLOBAL-WATER \?CND13 + SET 'W,WATER + EQUAL? PRSA,V?PUT,V?TAKE \?CND13 + REMOVE W +?CND13: ZERO? PI? /?ELS21 + SET 'PRSI,W + JUMP ?CND19 +?ELS21: SET 'PRSO,W +?CND19: LOC WINNER >AV + FSET? AV,VEHBIT /?CND25 + SET 'AV,FALSE-VALUE +?CND25: EQUAL? PRSA,V?PUT,V?TAKE \?ELS32 + ZERO? PI? \?ELS32 + ZERO? AV /?ELS39 + EQUAL? AV,PRSI \?ELS39 + CALL PUDDLE,AV + RSTACK +?ELS39: ZERO? AV /?ELS43 + ZERO? PRSI \?ELS43 + IN? W,AV /?ELS43 + CALL PUDDLE,AV + RSTACK +?ELS43: ZERO? PRSI /?ELS47 + EQUAL? PRSI,TEAPOT /?ELS47 + PRINTI "The water leaks out of the " + PRINTD PRSI + PRINTI " and evaporates immediately." + CRLF + REMOVE W + RTRUE +?ELS47: IN? TEAPOT,WINNER \?ELS53 + FIRST? TEAPOT /?ELS58 + EQUAL? HERE,POOL-ROOM \?ELS61 + MOVE SALTY-WATER,TEAPOT + JUMP ?CND59 +?ELS61: MOVE WATER,TEAPOT +?CND59: PRINTR "The teapot is now full of water." +?ELS58: PRINTR "The teapot isn't currently empty." +?ELS53: IN? PRSO,TEAPOT \?ELS71 + EQUAL? PRSA,V?TAKE \?ELS71 + ZERO? PRSI \?ELS71 + SET 'PRSO,TEAPOT + CALL ITAKE + SET 'PRSO,W + RETURN PRSO +?ELS71: PRINTR "The water slips through your fingers." +?ELS32: ZERO? PI? /?ELS79 + PRINTR "Nice try." +?ELS79: EQUAL? PRSA,V?GIVE,V?DROP \?ELS84 + EQUAL? PRSO,WATER \?CND85 + CALL HELD?,WATER + ZERO? STACK \?CND85 + PRINTR "You don't have any water." +?CND85: REMOVE WATER + ZERO? AV /?ELS96 + CALL PUDDLE,AV + RSTACK +?ELS96: PRINTI "The water spills to the floor and evaporates." + CRLF + REMOVE WATER + RTRUE +?ELS84: EQUAL? PRSA,V?THROW \FALSE + PRINTI "The water splashes on the walls and evaporates." + CRLF + REMOVE WATER + RTRUE + + + .FUNCT PUDDLE,AV + PRINTI "There is now a puddle in the bottom of the " + PRINTD AV + PRINTI "." + CRLF + MOVE PRSO,AV + RTRUE + + + .FUNCT BUCKET-FCN,RARG=M-BEG + EQUAL? RARG,M-BEG \?ELS5 + EQUAL? PRSA,V?BURN \?ELS10 + EQUAL? PRSO,BUCKET \?ELS10 + PRINTR "The bucket is fireproof, and won't burn." +?ELS10: EQUAL? PRSA,V?PUT,V?DROP \?ELS16 + EQUAL? PRSO,WATER \?ELS16 + EQUAL? PRSI,BUCKET \?ELS16 + IN? BUCKET,WELL-BOTTOM \?ELS16 + IN? WINNER,BUCKET /?ELS16 + PRINTI "The bucket swiftly rises up, and is gone." + CRLF + MOVE BUCKET,WELL-TOP + MOVE WATER,BUCKET + SET 'BUCKET-TOP-FLAG,TRUE-VALUE + CALL QUEUE,I-BUCKET,100 + PUT STACK,0,1 + RTRUE +?ELS16: EQUAL? PRSA,V?KICK \FALSE + CALL JIGS-UP,STR?224 + RSTACK +?ELS5: EQUAL? RARG,M-END \?ELS24 + IN? WATER,BUCKET \?ELS29 + ZERO? BUCKET-TOP-FLAG \?ELS29 + PRINTI "The bucket rises and comes to a stop." + CRLF + CRLF + SET 'BUCKET-TOP-FLAG,TRUE-VALUE + SET 'EVAPORATED,FALSE-VALUE + CALL PASS-THE-BUCKET,WELL-TOP + CALL QUEUE,I-BUCKET,100 + PUT STACK,0,1 + RTRUE +?ELS29: ZERO? BUCKET-TOP-FLAG /FALSE + IN? WATER,BUCKET /FALSE + ZERO? EVAPORATED /?ELS40 + PRINTI "The last of the water evaporates, and the bucket descends." + CRLF + CRLF + JUMP ?CND38 +?ELS40: PRINTI "The bucket descends and comes to a stop." + CRLF + CRLF +?CND38: SET 'BUCKET-TOP-FLAG,FALSE-VALUE + CALL PASS-THE-BUCKET,WELL-BOTTOM + RSTACK +?ELS24: EQUAL? PRSA,V?CLIMB-ON \FALSE + CALL PERFORM,V?BOARD,PRSO + RTRUE + + + .FUNCT PASS-THE-BUCKET,R + MOVE BUCKET,R + IN? WINNER,BUCKET \FALSE + CALL GOTO,R + RSTACK + + + .FUNCT POSTS-ROOM-FCN,RARG + EQUAL? RARG,M-BEG \FALSE + EQUAL? PRSA,V?TAKE \FALSE + FSET? PRSO,NONLANDBIT \FALSE + PRINTI "The " + PRINTD PRSO + PRINTR " is now much larger than you are. You have no hope of taking it." + + + .FUNCT EATME-FCN,F,N + EQUAL? PRSA,V?EAT \?ELS5 + EQUAL? PRSO,EAT-ME-CAKE \?ELS5 + EQUAL? HERE,TEA-ROOM \?ELS5 + PRINTI "Suddenly, the room appears to have become very large (although everything you are carrying seems to be its normal size)." + CRLF + CRLF + REMOVE EAT-ME-CAKE + FSET ROBOT,INVISIBLE + FSET ALICE-TABLE,INVISIBLE + FIRST? HERE >F /?KLU24 +?KLU24: +?PRG10: ZERO? F \?ELS14 + JUMP ?REP11 +?ELS14: NEXT? F >N /?KLU25 +?KLU25: EQUAL? F,ADVENTURER /?CND12 + FSET? F,TAKEBIT \?CND12 + FSET F,NONLANDBIT + FSET F,TRYTAKEBIT + MOVE F,POSTS-ROOM +?CND12: SET 'F,N + JUMP ?PRG10 +?REP11: CALL GOTO,POSTS-ROOM + RSTACK +?ELS5: CALL CAKE-CRUMBLE + RSTACK + + + .FUNCT CAKE-CRUMBLE,CAKE + FSET? PRSO,FOODBIT \?ELS3 + SET 'CAKE,PRSO + JUMP ?CND1 +?ELS3: SET 'CAKE,PRSI +?CND1: EQUAL? HERE,TEA-ROOM,POSTS-ROOM,POOL-ROOM /FALSE + EQUAL? HERE,MACHINE-ROOM,MAGNET-ROOM,CAGE-ROOM /FALSE + EQUAL? HERE,WELL-TOP,IN-CAGE /FALSE + REMOVE CAKE + PRINTI "The " + PRINTD CAKE + PRINTR " has crumbled to dust." + + + .FUNCT CAKE-FCN,F,N + EQUAL? PRSA,V?READ \?ELS5 + FSET? PRSO,NONLANDBIT \?ELS10 + PRINTR "The cake is much too tall now for you to read the lettering." +?ELS10: ZERO? PRSI /?ELS14 + EQUAL? PRSI,PALANTIR-1,PALANTIR-2,PALANTIR-3 \?ELS20 + CALL PERFORM,V?LOOK-INSIDE,PRSI + RSTACK +?ELS20: EQUAL? PRSI,FLASK \?ELS22 + PRINTI "The letters, now visible, say """ + EQUAL? PRSO,RED-ICING \?ELS27 + PRINTI "Evaporate" + JUMP ?CND25 +?ELS27: EQUAL? PRSO,ORANGE-ICING \?ELS31 + PRINTI "Explode" + JUMP ?CND25 +?ELS31: PRINTI "Enlarge" +?CND25: PRINTR """." +?ELS22: PRINTR "You can't see through that!" +?ELS14: PRINTR "The first letter is a capital E. The rest is too small to read." +?ELS5: EQUAL? PRSA,V?EAT \?ELS49 + EQUAL? HERE,TEA-ROOM,POSTS-ROOM,POOL-ROOM \?ELS49 + EQUAL? PRSO,ORANGE-ICING \?ELS56 + REMOVE PRSO + CALL ICEBOOM + RSTACK +?ELS56: EQUAL? PRSO,RED-ICING \?ELS58 + REMOVE PRSO + CALL JIGS-UP,STR?225 + RSTACK +?ELS58: EQUAL? PRSO,BLUE-ICING \FALSE + REMOVE PRSO + PRINTI "The room around you seems to be getting smaller." + CRLF + CRLF + EQUAL? HERE,POSTS-ROOM \?ELS67 + FCLEAR ROBOT,INVISIBLE + FCLEAR ALICE-TABLE,INVISIBLE + FSET POSTS,INVISIBLE + FIRST? HERE >F /?KLU99 +?KLU99: +?PRG68: ZERO? F \?ELS72 + JUMP ?REP69 +?ELS72: NEXT? F >N /?KLU100 +?KLU100: EQUAL? F,ADVENTURER /?CND70 + FSET? F,TAKEBIT \?CND70 + FCLEAR F,NONLANDBIT + FCLEAR F,TRYTAKEBIT + MOVE F,TEA-ROOM +?CND70: SET 'F,N + JUMP ?PRG68 +?REP69: CALL GOTO,TEA-ROOM + RSTACK +?ELS67: CALL JIGS-UP,STR?226 + RSTACK +?ELS49: EQUAL? PRSA,V?PUT,V?THROW \?ELS83 + EQUAL? PRSO,ORANGE-ICING \?ELS83 + EQUAL? HERE,TEA-ROOM,POSTS-ROOM,POOL-ROOM \?ELS83 + REMOVE PRSO + CALL ICEBOOM + RSTACK +?ELS83: EQUAL? PRSA,V?PUT,V?THROW \?ELS87 + EQUAL? PRSO,RED-ICING,BLUE-ICING,ORANGE-ICING \?ELS87 + EQUAL? PRSI,POOL \?ELS87 + EQUAL? PRSO,BLUE-ICING,ORANGE-ICING \?CND90 + PRINTI "The cake sinks majestically into the pool." + CRLF + REMOVE PRSO + RTRUE +?CND90: MOVE PRSO,HERE + REMOVE PRSI + PRINTI "Most of the pool evaporates, revealing a (slightly damp but still valuable) package of rare candies. The red cake must be pretty strong stuff, since it remains intact!" + CRLF + FCLEAR CANDY,INVISIBLE + RTRUE +?ELS87: CALL CAKE-CRUMBLE + RSTACK + + + .FUNCT CANDY-FCN + EQUAL? PRSA,V?READ,V?EXAMINE \?ELS5 + CALL FIXED-FONT-ON + PRINTI " Frobozz Magic Candy Company + >>Special Assortment<< + Candied Grasshoppers + Chocolated Ants + Worms Glacee +(By Appointment to His Majesty, Dimwit I) +" + CALL FIXED-FONT-OFF + RTRUE +?ELS5: EQUAL? PRSA,V?OPEN,V?EAT \FALSE + PRINTR "Such rich food would probably not be good for you." + + + .FUNCT TOP-ETCHINGS-F + EQUAL? PRSA,V?READ,V?EXAMINE \FALSE + CALL FIXED-FONT-ON + PRINTI " o b o + r z +f M A G I C z +c W E L L y + o n + m p a +" + CALL FIXED-FONT-OFF + RTRUE + + + .FUNCT BOTTOM-ETCHINGS-F + EQUAL? PRSA,V?READ,V?EXAMINE \FALSE + CALL FIXED-FONT-ON + PRINTI " o b o + + A G I + E L + + m p a +" + CALL FIXED-FONT-OFF + RTRUE + + + .FUNCT CUBE-F + EQUAL? PRSA,V?READ,V?EXAMINE \FALSE + CALL FIXED-FONT-ON + PRINTI " Bank of Zork + VAULT + *722 GUE* + Frobozz Magic Vault Company +" + CALL FIXED-FONT-OFF + RTRUE + + + .FUNCT FIXED-FONT-ON + GET 0,8 + BOR STACK,2 + PUT 0,8,STACK + RTRUE + + + .FUNCT FIXED-FONT-OFF + GET 0,8 + BAND STACK,-3 + PUT 0,8,STACK + RTRUE + + + .FUNCT POOL-FCN + EQUAL? PRSA,V?DRINK \?ELS5 + PRINTR "The water is extremely salty." +?ELS5: EQUAL? PRSA,V?LOOK-UNDER \?ELS9 + PRINTR "You'd probably have to enter the pool to see what's below the surface." +?ELS9: EQUAL? PRSA,V?THROUGH \FALSE + CALL JIGS-UP,STR?227 + RSTACK + + + .FUNCT FLASK-FCN + EQUAL? PRSA,V?LOOK-INSIDE \?ELS5 + PRINTR "You notice that objects behind the flask appear to be magnified. You might try looking at something through the flask." +?ELS5: EQUAL? PRSA,V?READ \?ELS9 + EQUAL? PRSI,FLASK \?ELS9 + PRINTI "The flask distorts and magnifies the " + PRINTD PRSO + PRINTI ", showing details not noticed earlier." + CRLF + RFALSE +?ELS9: EQUAL? PRSA,V?OPEN \?ELS15 + CALL MUNG-ROOM,HERE,STR?228 + CALL JIGS-UP,FATAL-VAPORS + RSTACK +?ELS15: EQUAL? PRSA,V?THROW,V?MUNG \FALSE + PRINTI "The flask breaks into pieces." + CRLF + REMOVE PRSO + CALL JIGS-UP,FATAL-VAPORS + RSTACK + + + .FUNCT PLEAK + EQUAL? PRSA,V?TAKE \?ELS5 + CALL PICK-ONE,YUKS + PRINT STACK + CRLF + RTRUE +?ELS5: EQUAL? PRSA,V?PLUG \FALSE + PRINTR "The leak is too high above you to reach." + + + .FUNCT ICEBOOM + CALL MUNG-ROOM,HERE,STR?230 + CALL JIGS-UP,STR?231 + RSTACK + + + .FUNCT MAGNET-ROOM-FCN,RARG + EQUAL? RARG,M-LOOK \?ELS5 + PRINTR "You are in a circular room with a low ceiling. There are exits to the east and southeast." +?ELS5: EQUAL? RARG,M-ENTER \FALSE + ZERO? CAROUSEL-FLIP-FLAG /FALSE + ZERO? CAROUSEL-ZOOM-FLAG /?ELS16 + EQUAL? ADVENTURER,WINNER \?ELS22 + PUSH STR?232 + JUMP ?CND18 +?ELS22: PUSH STR?233 +?CND18: CALL JIGS-UP,STACK + RSTACK +?ELS16: EQUAL? WINNER,ADVENTURER \FALSE + PRINTI "As you enter, your compass starts spinning wildly." + CRLF + ZERO? COMPASS-KLUDGE \?CND29 + PRINTI "What compass, you ask? The one which allows you to specify compass directions for movement." + SET 'COMPASS-KLUDGE,TRUE-VALUE +?CND29: CRLF + RTRUE + + + .FUNCT MAGNET-ROOM-EXIT + ZERO? CAROUSEL-FLIP-FLAG /?ELS5 + EQUAL? WINNER,ADVENTURER \?ELS5 + PRINTI "You cannot get your bearings..." + CRLF + CRLF + RANDOM 100 + GRTR? 50,STACK \?ELS14 + RETURN MACHINE-ROOM +?ELS14: RETURN TEA-ROOM +?ELS5: EQUAL? PRSO,P?EAST \?ELS18 + RETURN MACHINE-ROOM +?ELS18: EQUAL? PRSO,P?SE /?THN21 + EQUAL? PRSO,P?OUT \?ELS20 +?THN21: RETURN TEA-ROOM +?ELS20: PRINTI "You can't go that way." + CRLF + RFALSE + + + .FUNCT BUTTONS + EQUAL? PRSA,V?PUSH \FALSE + EQUAL? WINNER,ADVENTURER \?ELS10 + CALL JIGS-UP,STR?234 + RSTACK +?ELS10: EQUAL? PRSO,SQUARE-BUTTON \?ELS12 + ZERO? CAROUSEL-ZOOM-FLAG /?ELS17 + PRINTR "Nothing seems to happen." +?ELS17: SET 'CAROUSEL-ZOOM-FLAG,TRUE-VALUE + PRINTR "The whirring increases in intensity." +?ELS12: EQUAL? PRSO,ROUND-BUTTON \?ELS26 + ZERO? CAROUSEL-ZOOM-FLAG /?ELS31 + SET 'CAROUSEL-ZOOM-FLAG,FALSE-VALUE + PRINTR "The whirring decreases in intensity." +?ELS31: PRINTR "Nothing seems to happen." +?ELS26: EQUAL? PRSO,TRIANGULAR-BUTTON \FALSE + ZERO? CAROUSEL-FLIP-FLAG \?PRD41 + PUSH 1 + JUMP ?PRD42 +?PRD41: PUSH 0 +?PRD42: SET 'CAROUSEL-FLIP-FLAG,STACK + IN? IRON-BOX,CAROUSEL-ROOM \?ELS47 + PRINTI "A dull thump is heard in the distance." + CRLF + FSET? IRON-BOX,INVISIBLE \?ELS52 + FCLEAR IRON-BOX,INVISIBLE + JUMP ?CND50 +?ELS52: FSET IRON-BOX,INVISIBLE +?CND50: FSET? IRON-BOX,INVISIBLE /TRUE + FCLEAR CAROUSEL-ROOM,TOUCHBIT + RTRUE +?ELS47: PRINTR "Click." + + + .FUNCT SPHERE-FCN,FL + ZERO? CAGE-SOLVE-FLAG \?ELS3 + EQUAL? PRSA,V?PUT,V?MOVE,V?TAKE \?ELS3 + SET 'FL,TRUE-VALUE + JUMP ?CND1 +?ELS3: SET 'FL,FALSE-VALUE +?CND1: ZERO? FL /?ELS12 + EQUAL? ADVENTURER,WINNER \?ELS12 + PRINTI "As you reach for the sphere, a solid steel cage falls from the ceiling to entrap you. To make matters worse, poisonous gas starts coming into the room." + CRLF + CRLF + IN? ROBOT,HERE \?CND17 + MOVE ROBOT,IN-CAGE + FSET ROBOT,NDESCBIT +?CND17: CALL GOTO,IN-CAGE + MOVE CAGE,HERE + FSET CAGE,NDESCBIT + FCLEAR CAGE,INVISIBLE + CALL QUEUE,I-SPHERE,6 + PUT STACK,0,1 + RTRUE +?ELS12: ZERO? FL /?ELS21 + FSET PALANTIR-1,INVISIBLE + REMOVE ROBOT + FSET PRSO,INVISIBLE + MOVE CAGE,CAGE-ROOM + FCLEAR CAGE,INVISIBLE + CALL JIGS-UP,STR?235 + RTRUE +?ELS21: EQUAL? PRSA,V?EXAMINE,V?LOOK-INSIDE \FALSE + CALL PALANTIR + RSTACK + + + .FUNCT I-SPHERE + EQUAL? HERE,CAGE-ROOM,IN-CAGE \FALSE + FSET PALANTIR-1,INVISIBLE + CALL MUNG-ROOM,CAGE-ROOM,STR?236 + CALL JIGS-UP,STR?237 + RSTACK + + + .FUNCT IN-CAGE-FCN,RARG + ZERO? CAGE-SOLVE-FLAG /FALSE + SET 'HERE,CAGE-ROOM + RETURN HERE + + + .FUNCT ROBOT-FCN,RARG=M-OBJECT + EQUAL? WINNER,ROBOT \?ELS5 + EQUAL? PRSA,V?SGIVE /FALSE + EQUAL? PRSA,V?FOLLOW \?ELS12 + PRINTR """My memory circuits are not that advanced. I can move as directed, though.""" +?ELS12: EQUAL? PRSA,V?MOVE,V?TAKE,V?RAISE \?ELS16 + EQUAL? PRSO,CAGE \?ELS16 + PRINTI "The cage shakes and is hurled across the room. It's hard to say, but the robot appears to be smiling." + CRLF + CRLF + CALL INT,I-SPHERE + PUT STACK,0,0 + SET 'WINNER,ADVENTURER + CALL GOTO,CAGE-ROOM + MOVE MANGLED-CAGE,CAGE-ROOM + FCLEAR ROBOT,NDESCBIT + FSET PALANTIR-1,TAKEBIT + MOVE ROBOT,CAGE-ROOM + SET 'CAGE-SOLVE-FLAG,TRUE-VALUE + RETURN CAGE-SOLVE-FLAG +?ELS16: EQUAL? PRSA,V?DRINK,V?EAT \?ELS22 + IN? ADVENTURER,HERE \TRUE + PRINTR """I am sorry but that is difficult for a being with no mouth.""" +?ELS22: RANDOM 100 + GRTR? 2,STACK \?ELS29 + CALL META-LOC,ADVENTURER + EQUAL? STACK,HERE \?ELS29 + PRINTR """Buzz! Buzz! Buzz! My circuits are getting rusty. Try again.""" +?ELS29: EQUAL? PRSA,V?EXAMINE,V?READ \?ELS35 + CALL META-LOC,ADVENTURER + EQUAL? STACK,HERE \TRUE + PRINTR """My vision is not sufficiently acute to do that.""" +?ELS35: EQUAL? PRSA,V?THROW,V?PUT,V?DROP \?ELS42 + CALL META-LOC,ADVENTURER + EQUAL? STACK,HERE \FALSE + IN? PRSO,ROBOT \?ELS49 + PRINTI """Whirr, buzz, click!""" + CRLF + RFALSE +?ELS49: PRINTR """Click! I don't have that. Buzz! Whirr!""" +?ELS42: EQUAL? PRSA,V?WALK /?THN58 + EQUAL? PRSA,V?TURN,V?PUSH,V?TAKE \?ELS57 + FSET? PRSO,ACTORBIT /?ELS57 +?THN58: CALL META-LOC,ADVENTURER + EQUAL? STACK,HERE \FALSE + RANDOM 100 + GRTR? 80,STACK \?ELS66 + PRINTI """Whirr, buzz, click!""" + CRLF + RFALSE +?ELS66: PRINTI """Buzz, click, whirr!""" + CRLF + RFALSE +?ELS57: CALL META-LOC,ADVENTURER + EQUAL? STACK,HERE \TRUE + PRINTR """My programming is insufficient to allow me to perform that task.""" +?ELS5: EQUAL? PRSA,V?CLOSE,V?LOOK-INSIDE,V?OPEN \?ELS81 + PRINTR "There's no access panel or door on the robot." +?ELS81: EQUAL? PRSA,V?GIVE \?ELS85 + EQUAL? PRSI,ROBOT \?ELS85 + MOVE PRSO,ROBOT + PRINTI "The robot gladly takes the " + PRINTD PRSO + PRINTR " and nods his head-like appendage in thanks." +?ELS85: EQUAL? PRSA,V?MUNG,V?THROW \FALSE + PRINTI "The robot falls to the ground and (being of shoddy construction) disintegrates before your eyes." + CRLF + EQUAL? PRSA,V?THROW \?ELS98 + PUSH PRSI + JUMP ?CND94 +?ELS98: ZERO? PRSO /?PRD96 + PUSH 1 + JUMP ?CND94 +?PRD96: PUSH 0 +?CND94: REMOVE STACK + RTRUE + + + .FUNCT BILLS-OBJECT + SET 'BANK-SOLVE-FLAG,TRUE-VALUE + EQUAL? PRSA,V?BURN \?ELS5 + PRINTI "Nothing like having money to burn!" + CRLF + RFALSE +?ELS5: EQUAL? PRSA,V?EAT \FALSE + PRINTR "Talk about eating rich foods!" + + + .FUNCT BKLEAVEE,RM=TELLER-EAST + CALL HELD?,BILLS + ZERO? STACK \?THN6 + CALL HELD?,PORTRAIT + ZERO? STACK /?ELS5 +?THN6: PRINTI "An alarm rings briefly, and an invisible force bars your way." + CRLF + RFALSE +?ELS5: RETURN RM + + + .FUNCT BKLEAVEW + CALL BKLEAVEE,TELLER-WEST + RSTACK + + + .FUNCT DEPOSITORY-FCN,RARG + EQUAL? RARG,M-ENTER \FALSE + CALL LKP,PRSO,SCOL-ROOMS >SCOL-ROOM + RETURN SCOL-ROOM + + + .FUNCT TELLER-ROOM,RARG + EQUAL? RARG,M-LOOK \FALSE + PRINTI "You are in a small room, which was used by a bank officer who retrieved safety deposit boxes for the customer. On the north side of the room is a sign which reads ""Viewing Room"". On the " + EQUAL? HERE,TELLER-WEST \?ELS10 + PRINTI "west" + JUMP ?CND8 +?ELS10: PRINTI "east" +?CND8: PRINTR " side of the room, above an open door, is a sign reading: + + BANK PERSONNEL ONLY +" + + + .FUNCT SCOL-OBJECT,OBJ=0 + EQUAL? PRSA,V?TAKE,V?MOVE,V?PUSH /?THN6 + EQUAL? PRSA,V?RUB \?ELS5 +?THN6: PRINTR "As you try, your hand seems to go through it." +?ELS5: EQUAL? PRSA,V?ATTACK \?ELS11 + ZERO? PRSI /?ELS11 + PRINTI "The " + PRINTD PRSI + PRINTR " goes through it." +?ELS11: EQUAL? PRSA,V?OVERBOARD,V?THROW \FALSE + EQUAL? PRSI,CURTAIN,OBJ \FALSE + IN? PRSO,WINNER \?ELS24 + CALL V-THROUGH,PRSO + RSTACK +?ELS24: PRINTR "You don't have that!" + + + .FUNCT GET-WALL,RM,W + SET 'W,SCOL-WALLS +?PRG1: GET W,0 + EQUAL? STACK,RM \?ELS5 + RETURN W +?ELS5: ADD W,6 >W + JUMP ?PRG1 + + + .FUNCT SCOLWALL + EQUAL? PRSA,V?PUT,V?OVERBOARD,V?THROW \FALSE + EQUAL? HERE,SCOL-ACTIVE \FALSE + CALL GET-WALL,HERE + GET STACK,1 + EQUAL? PRSI,STACK \FALSE + CALL SCOL-OBJECT,PRSI + RSTACK + + + .FUNCT SCOL-GO,OBJ + SET 'SCOL-ACTIVE,SCOL-ROOM + ZERO? OBJ /?ELS5 + CALL SCOL-OBJ,OBJ,0,SCOL-ROOM + RSTACK +?ELS5: CALL SCOL-THROUGH,12,SCOL-ROOM + RSTACK + + + .FUNCT SCOL-OBJ,OBJ,CINT,RM + CALL QUEUE,I-CURTAIN,CINT + PUT STACK,0,1 + MOVE OBJ,RM + EQUAL? RM,DEPOSITORY \?ELS5 + PRINTI "The " + PRINTD OBJ + PRINTR " passes through the wall and vanishes." +?ELS5: PRINTI "The curtain dims slightly as the " + PRINTD OBJ + PRINTI " passes through." + CRLF + SET 'SCOL-ROOM,FALSE-VALUE + RTRUE + + + .FUNCT SCOL-THROUGH,CINT,RM + CALL QUEUE,I-CURTAIN,CINT + PUT STACK,0,1 + PRINTI "You feel somewhat disoriented as you pass through..." + CRLF + CRLF + CALL GOTO,RM + RSTACK + + + .FUNCT I-CURTAIN + SET 'SCOL-ACTIVE,FALSE-VALUE + EQUAL? HERE,VAULT \?ELS5 + CALL JIGS-UP,STR?238 + RSTACK +?ELS5: EQUAL? HERE,VIEWING-EAST,VIEWING-WEST,SMALL-ROOM \FALSE + PRINTI "You hear a faint voice say ""Curtain Door Closed.""" + CRLF + EQUAL? HERE,SMALL-ROOM \FALSE + ZERO? ZGNOME-FLAG \TRUE + CALL QUEUE,I-ZGNOME,3 + PUT STACK,0,1 + SET 'ZGNOME-FLAG,TRUE-VALUE + RETURN ZGNOME-FLAG + + + .FUNCT I-ZGNOME + EQUAL? HERE,SMALL-ROOM \FALSE + CALL QUEUE,I-ZGNOME-OUT,12 + PUT STACK,0,1 + PRINTI "An epicene gnome of Zurich wearing a three-piece suit and carrying a safety deposit box materializes in the room." + IN? WAND,WINNER \?ELS12 + PRINTR " He notices the wand and dematerializes speedily." +?ELS12: PRINTI " ""You seem to have forgotten to deposit your valuables,"" he says, tapping the lid of the box impatiently. ""We don't usually allow customers to use the boxes here, but we can make this ONE exception, I suppose..."" He looks askance at you over his wire-rimmed bifocals." + CRLF + MOVE GNOME-OF-ZURICH,HERE + RTRUE + + + .FUNCT BOX-F + PRINTR "The gnome clutches it possessively." + + + .FUNCT ZGNOME-FCN + EQUAL? PRSA,V?TELL \?ELS5 + SET 'P-CONT,FALSE-VALUE + SET 'QUOTE-FLAG,FALSE-VALUE + PRINTR "The gnome appears increasingly impatient." +?ELS5: EQUAL? PRSA,V?THROW,V?GIVE \?ELS9 + EQUAL? PRSI,GNOME-OF-ZURICH \?ELS9 + GETPT PRSO,P?VALUE + ZERO? STACK /?ELS16 + PRINTI "The gnome carefully places the " + PRINTD PRSO + PRINTI " in the deposit box. ""Let me show you the way out,"" he says, making it clear he will be pleased to see the last of you. Then, you are momentarily disoriented, and when you recover you are back at the Bank Entrance." + CRLF + REMOVE GNOME-OF-ZURICH + REMOVE PRSO + CALL INT,I-ZGNOME-OUT + PUT STACK,0,0 + CALL GOTO,BANK-ENTRANCE + RTRUE +?ELS16: CALL BOMB?,PRSO + ZERO? STACK /?ELS20 + REMOVE GNOME-OF-ZURICH + MOVE PRSO,HERE + CALL INT,I-ZGNOME + PUT STACK,0,0 + CALL INT,I-ZGNOME-OUT + PUT STACK,0,0 + PRINTR """You are so very gracious. I really cannot accept."" he says. He disappears, a wry smile on his lips." +?ELS20: PRINTI """I wouldn't put THAT in a safety deposit box,"" remarks the gnome with disdain, tossing it over his shoulder, where it disappears with an understated ""pop""." + CRLF + CALL REMOVE-CAREFULLY,PRSO + RTRUE +?ELS9: EQUAL? PRSA,V?ATTACK \?ELS28 + PRINTI "The gnome says ""Well, I never..."" and disappears with a snap of his fingers, leaving you alone." + CRLF + REMOVE GNOME-OF-ZURICH + CALL INT,I-ZGNOME-OUT + PUT STACK,0,0 + RTRUE +?ELS28: PRINTR "The gnome appears increasingly impatient." + + + .FUNCT I-ZGNOME-OUT + REMOVE GNOME-OF-ZURICH + EQUAL? HERE,SMALL-ROOM \FALSE + PRINTR "The gnome looks impatient: ""I may have another customer waiting; you'll just have to fend for yourself, I'm afraid."" He disappears, leaving you alone." + + + .FUNCT BOMB?,O + EQUAL? O,BRICK \FALSE + IN? FUSE,BRICK \FALSE + CALL INT,I-FUSE + GET STACK,C-ENABLED? + ZERO? STACK /FALSE + RTRUE + + + .FUNCT GO&LOOK,RM,OHERE,OLIT,OSEEN=0 + SET 'OHERE,HERE + FSET? OHERE,TOUCHBIT \?CND1 + SET 'OSEEN,TRUE-VALUE +?CND1: SET 'OLIT,LIT + SET 'HERE,RM + CALL LIT?,RM >LIT + CALL PERFORM,V?LOOK + ZERO? OSEEN \?CND4 + FCLEAR OHERE,TOUCHBIT +?CND4: SET 'HERE,OHERE + SET 'LIT,OLIT + RTRUE + + + .FUNCT TINY-ROOM-FCN,RARG + EQUAL? RARG,M-LOOK \?ELS5 + PRINTI "This is a tiny room carved out of the wall of the ravine. There is an exit down a precarious climb. " + CALL P-DOOR,STR?239,LID-1,KEYHOLE-1 + RTRUE +?ELS5: EQUAL? PRSA,V?LOOK /FALSE + CALL PCHECK + RFALSE + + + .FUNCT DREARY-ROOM-FCN,RARG,?TMP1 + EQUAL? RARG,M-LOOK \?CND1 + PRINTI "This is a small and rather dreary room, eerily illuminated by a red glow emanating from a crack in one wall. The light falls upon a dusty wooden table in the center of the room. " + CALL P-DOOR,STR?240,LID-2,KEYHOLE-2 + RTRUE +?CND1: CALL PCHECK >?TMP1 + RFALSE + + + .FUNCT PCHECK,LID + CALL PLID >LID + SET 'PLOOK-FLAG,FALSE-VALUE + IN? KEY,KEYHOLE-1 /?THN4 + IN? KEY,KEYHOLE-2 \?ELS3 +?THN4: FSET KEY,NDESCBIT + JUMP ?CND1 +?ELS3: FCLEAR KEY,NDESCBIT +?CND1: CALL HELD?,PLACE-MAT + ZERO? STACK /?CND8 + SET 'MUD-FLAG,FALSE-VALUE +?CND8: ZERO? MUD-FLAG /?ELS15 + MOVE PLACE-MAT,HERE + FSET PLACE-MAT,NDESCBIT + RTRUE +?ELS15: FCLEAR PLACE-MAT,NDESCBIT + RTRUE + + + .FUNCT P-DOOR,STR,LID,KEYHOLE,F + ZERO? PLOOK-FLAG /?CND1 + SET 'PLOOK-FLAG,FALSE-VALUE + RFALSE +?CND1: PRINTI "On the " + PRINT STR + PRINTI " side of the room is a massive wooden door, which has a small window barred with iron. A formidable bolt lock is set within the door frame. A keyhole " + FSET? LID,OPENBIT /?CND7 + PRINTI "covered by a thin metal lid " +?CND7: PRINTI "lies within the lock." + FIRST? KEYHOLE >F \?CND14 + PRINTI " A " + PRINTD F + PRINTI " is in place within the keyhole." +?CND14: ZERO? MUD-FLAG /?CND19 + PRINTI " The edge of a place mat is visible under the door." + ZERO? MATOBJ /?CND19 + PRINTI " Lying on the place mat is a " + PRINTD MATOBJ + PRINTI "." +?CND19: CRLF + RTRUE + + + .FUNCT PLID,OBJ1=LID-1,OBJ2=LID-2 + IN? OBJ1,HERE \?ELS5 + RETURN OBJ1 +?ELS5: RETURN OBJ2 + + + .FUNCT PKH,KEYHOLE,THIS=0 + EQUAL? KEYHOLE,KEYHOLE-1 \?ELS5 + ZERO? THIS \?ELS5 + RETURN KEYHOLE-2 +?ELS5: EQUAL? KEYHOLE,KEYHOLE-1 /?ELS9 + ZERO? THIS /?ELS9 + RETURN KEYHOLE-2 +?ELS9: RETURN KEYHOLE-1 + + + .FUNCT PKH-FCN,OBJ,KH + EQUAL? PRSA,V?LOOK-INSIDE \?ELS5 + FSET? LID-1,OPENBIT \?ELS10 + FSET? LID-2,OPENBIT \?ELS10 + FIRST? KEYHOLE-1 /?ELS10 + FIRST? KEYHOLE-2 /?ELS10 + EQUAL? HERE,DREARY-ROOM \?ELS17 + PUSH TINY-ROOM + JUMP ?CND13 +?ELS17: PUSH DREARY-ROOM +?CND13: CALL LIT?,STACK + ZERO? STACK /?ELS10 + PRINTR "You can see a lighted room at the other end." +?ELS10: PRINTR "No light can be seen through the keyhole." +?ELS5: EQUAL? PRSA,V?PUT \FALSE + CALL PLID + FSET? STACK,OPENBIT \?ELS32 + CALL PKH,PRSI,TRUE-VALUE + FIRST? STACK \?ELS37 + PRINTR "The keyhole is blocked." +?ELS37: EQUAL? PRSO,LETTER-OPENER,KEY \?ELS41 + CALL PKH,PRSI >KH + FIRST? KH \FALSE + PRINTI "There is a faint noise from behind the door and a small cloud of dust rises from beneath it." + CRLF + FIRST? KH >OBJ /?KLU61 +?KLU61: REMOVE OBJ + ZERO? MUD-FLAG /FALSE + SET 'MATOBJ,OBJ + RFALSE +?ELS41: PRINTI "The " + PRINTD PRSO + PRINTR " doesn't fit." +?ELS32: PRINTR "The lid is in the way." + + + .FUNCT PLID-FCN + EQUAL? PRSA,V?MOVE,V?RAISE,V?OPEN \?ELS5 + FSET? PRSO,OPENBIT \?ELS8 + CALL RANDOM-ELEMENT,DUMMY + PRINT STACK + CRLF + JUMP ?CND6 +?ELS8: PRINTI "The lid is now open." + CRLF +?CND6: FSET PRSO,OPENBIT + RTRUE +?ELS5: EQUAL? PRSA,V?LOWER,V?CLOSE \?ELS16 + EQUAL? HERE,DREARY-ROOM \?ELS26 + PUSH KEYHOLE-2 + JUMP ?CND22 +?ELS26: PUSH KEYHOLE-1 +?CND22: FIRST? STACK \?ELS21 + PRINTR "The keyhole is occupied." +?ELS21: PRINTI "The lid covers the keyhole." + CRLF + FCLEAR PRSO,OPENBIT + RTRUE +?ELS16: EQUAL? PRSA,V?LOOK-BEHIND \FALSE + PRINTR "There's a keyhole behind the lid." + + + .FUNCT ROOM?,OBJ,NOBJ +?PRG1: LOC OBJ >NOBJ + ZERO? NOBJ /FALSE + EQUAL? NOBJ,WINNER /FALSE + EQUAL? NOBJ,ROOMS \?CND3 + RETURN OBJ +?CND3: SET 'OBJ,NOBJ + JUMP ?PRG1 + + + .FUNCT PALANTIR + EQUAL? PRSA,V?LOOK-INSIDE \?ELS5 + EQUAL? PRSO,PALANTIR-1 \?ELS10 + PUSH PALANTIR-2 + JUMP ?CND6 +?ELS10: EQUAL? PRSO,PALANTIR-2 \?ELS12 + PUSH PALANTIR-3 + JUMP ?CND6 +?ELS12: EQUAL? PRSO,PALANTIR-3 \?ELS14 + PUSH PALANTIR-1 + JUMP ?CND6 +?ELS14: PUSH PALANTIR-4 +?CND6: CALL PALANTIR-LOOK,STACK + RSTACK +?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS18 + PRINTR "There is something misty in the sphere. Perhaps if you were to look into it..." +?ELS18: EQUAL? PRSA,V?TAKE \FALSE + EQUAL? PRSO,PALANTIR-3 \FALSE + PUTP PRSO,P?LDESC,FALSE-VALUE + RFALSE + + + .FUNCT DEAD-PALANTIR,RARG,P + EQUAL? RARG,M-LOOK \?ELS5 + PRINTI "You are inside a huge crystalline sphere filled with thin " + EQUAL? HERE,DEAD-PALANTIR-1 \?ELS12 + SET 'P,PALANTIR-1 + PUSH STR?241 + JUMP ?CND8 +?ELS12: EQUAL? HERE,DEAD-PALANTIR-2 \?ELS14 + SET 'P,PALANTIR-2 + PUSH STR?242 + JUMP ?CND8 +?ELS14: SET 'P,PALANTIR-3 + PUSH STR?243 +?CND8: PRINT STACK + PRINTI " mist. The mist becomes " + EQUAL? HERE,DEAD-PALANTIR-1 \?ELS21 + PUSH STR?242 + JUMP ?CND17 +?ELS21: EQUAL? HERE,DEAD-PALANTIR-2 \?ELS23 + PUSH STR?243 + JUMP ?CND17 +?ELS23: PUSH STR?244 +?CND17: PRINT STACK + PRINTI " to the west." + CRLF + PRINTI "You strain to look out through the mist... " + CRLF + FSET? P,TOUCHBIT \?ELS30 + CALL PALANTIR-LOOK,P,TRUE-VALUE + RTRUE +?ELS30: EQUAL? P,PALANTIR-1 \?ELS32 + PRINTR "You see a small room with a sign on the wall, but it is too blurry to read." +?ELS32: EQUAL? P,PALANTIR-2 \?ELS36 + PRINTR "You look out into a large, dreary room with a great door and a huge table. There is an odd glow to the mist." +?ELS36: EQUAL? P,PALANTIR-3 \TRUE + PRINTI "A strange blurry room is barely visible." + IN? SERPENT,AQUARIUM \?CND43 + RANDOM 100 + GRTR? 25,STACK \?CND43 + PRINTI " An odd sinuous shadow crosses the mist as you look." +?CND43: CRLF + RTRUE +?ELS5: EQUAL? RARG,M-ENTER \FALSE + EQUAL? HERE,DEAD-PALANTIR-4 \FALSE + PRINTI "You follow a corridor of black mist into a black walled spherical room." + IN? GENIE,PENTAGRAM-ROOM \?CND56 + PRINTI " The room is empty. A huge face looks down on you from outside and laughs sardonically. It doesn't look like you're getting out of this predicament!" + CRLF + CALL FINISH +?CND56: PRINTI " As you enter, a huge and horrible face materializes out of the mist. + +""What brings you here to trouble my imprisonment, wanderer?"" it asks. Hearing no immediate answer, it studies you for a moment." + CRLF + LESS? DEATHS,3 /?ELS67 + PRINTI """Not you again! This is getting tedious. You'll obviously never be much help to me. Better luck next time, oh wondrous adventurer."" The face disappears and everything goes black." + CRLF + CALL FINISH + RSTACK +?ELS67: PRINTI """Perhaps you may be of some use to me in gaining my freedom from this place. Return to your foolish quest! I shall not destroy you this time. Mayhap you will repay this favor in kind someday."" The face vanishes and the mist begins to swirl. When it clears you are returned to the world of life." + CRLF + SET 'DEAD,FALSE-VALUE + CALL GOTO,INSIDE-BARROW + RTRUE + + + .FUNCT GLOBAL-PALANTIRS + EQUAL? PRSA,V?EXAMINE,V?LOOK-INSIDE \?ELS5 + CALL DEAD-PALANTIR,M-LOOK + RSTACK +?ELS5: EQUAL? PRSA,V?MUNG \FALSE + PRINTR "The sphere is unbreakable." + + + .FUNCT PALANTIR-LOOK,OBJ,INSIDE?=0,RM,OHERE + EQUAL? OBJ,PALANTIR-4 \?CND1 + PRINTR "As you peer into the sphere, a strange vision takes shape...a huge and fearful face with yellow eyes. The face peers out at you expectantly." +?CND1: EQUAL? HERE,OBJ /?PRD6 + PUSH 0 + JUMP ?PRD7 +?PRD6: PUSH 1 +?PRD7: SET 'RM,STACK + ZERO? RM /?THN11 + CALL LIT?,RM + ZERO? STACK \?ELS10 +?THN11: PRINTR "You see only darkness." +?ELS10: IN? OBJ,RM /?THN17 + LOC OBJ + CALL SEE-INSIDE?,STACK + ZERO? STACK /?ELS16 +?THN17: SET 'OHERE,HERE + ZERO? INSIDE? /?ELS21 + PRINTI "As you peer through the mist, a strangely colored vision of a huge room takes shape..." + CRLF + CRLF + JUMP ?CND19 +?ELS21: PRINTI "As you peer into the sphere, a strange vision takes shape of a distant room, which can be described clearly...." + CRLF + CRLF +?CND19: FSET OBJ,INVISIBLE + CALL GO&LOOK,RM + EQUAL? OHERE,RM \?CND29 + PRINTI "An astonished adventurer is staring into a crystal sphere." + CRLF +?CND29: FCLEAR OBJ,INVISIBLE + ZERO? INSIDE? \TRUE + PRINTR "The vision fades, revealing only an ordinary crystal sphere." +?ELS16: PRINTR "You see only darkness." + + + .FUNCT PWINDOW-FCN + EQUAL? PRSA,V?LOOK-INSIDE \?ELS5 + SET 'PLOOK-FLAG,TRUE-VALUE + FSET? PDOOR,OPENBIT \?ELS10 + PRINTR "The door is open, dummy." +?ELS10: EQUAL? HERE,DREARY-ROOM \?ELS14 + CALL GO&LOOK,TINY-ROOM + RSTACK +?ELS14: CALL GO&LOOK,DREARY-ROOM + RSTACK +?ELS5: EQUAL? PRSA,V?THROUGH \FALSE + PRINTR "Perhaps if you were diced...." + + + .FUNCT PDOOR-FCN,K + EQUAL? PRSA,V?LOOK-UNDER \?ELS5 + ZERO? MUD-FLAG /?ELS5 + PRINTR "The place mat is under the door." +?ELS5: EQUAL? PRSA,V?UNLOCK \?ELS11 + EQUAL? PRSI,KEY \?ELS16 + CALL PLID,KEYHOLE-1,KEYHOLE-2 + FIRST? STACK >K \?ELS21 + EQUAL? K,KEY /?ELS21 + PRINTR "The keyhole is blocked." +?ELS21: PRINTI "The door is now unlocked." + CRLF + SET 'PUNLOCK-FLAG,TRUE-VALUE + RETURN PUNLOCK-FLAG +?ELS16: EQUAL? PRSI,GOLD-KEY \?ELS31 + PRINTR "It doesn't fit the lock." +?ELS31: PRINTR "It can't be unlocked with that." +?ELS11: EQUAL? PRSA,V?LOCK \?ELS39 + EQUAL? PRSI,KEY \?ELS44 + PRINTI "The door is locked." + CRLF + SET 'PUNLOCK-FLAG,FALSE-VALUE + RTRUE +?ELS44: EQUAL? PRSI,GOLD-KEY \?ELS48 + PRINTR "It doesn't fit the lock." +?ELS48: PRINTR "It can't be locked with that." +?ELS39: EQUAL? PRSA,V?PUT-UNDER \?ELS56 + EQUAL? PRSO,ROBOT-LABEL \?ELS61 + PRINTI "The paper is very small and vanishes under the door." + CRLF + EQUAL? HERE,TINY-ROOM \?ELS68 + PUSH DREARY-ROOM + JUMP ?CND64 +?ELS68: PUSH TINY-ROOM +?CND64: MOVE PRSO,STACK + RTRUE +?ELS61: EQUAL? PRSO,NEWSPAPER \FALSE + PRINTR "The newspaper crumples up and won't go under the door." +?ELS56: EQUAL? PRSA,V?CLOSE,V?OPEN \FALSE + ZERO? PUNLOCK-FLAG /?ELS81 + CALL OPEN-CLOSE,PRSO,STR?245,STR?246 + RSTACK +?ELS81: PRINTR "The door is locked." + + + .FUNCT PKEY-FCN + EQUAL? PRSA,V?TURN \FALSE + ZERO? PUNLOCK-FLAG /?ELS10 + CALL PERFORM,V?LOCK,PDOOR,PRSO + RSTACK +?ELS10: CALL PERFORM,V?UNLOCK,PDOOR,PRSO + RSTACK + + + .FUNCT PLACE-MAT-FCN + EQUAL? PRSA,V?PUT-UNDER \?ELS5 + EQUAL? PRSI,PDOOR \?ELS10 + PRINTI "The place mat fits easily under the door." + CRLF + MOVE PRSO,HERE + SET 'MUD-FLAG,TRUE-VALUE + RETURN MUD-FLAG +?ELS10: EQUAL? PRSI,WIZ-DOOR,RIDDLE-DOOR,CRYPT-DOOR \FALSE + PRINTR "There's not enough room under this door." +?ELS5: EQUAL? PRSA,V?MOVE,V?TAKE \FALSE + ZERO? MATOBJ /FALSE + MOVE MATOBJ,HERE + PRINTI "As the place mat is moved, a " + PRINTD MATOBJ + PRINTI " falls from it and onto the floor." + CRLF + SET 'MATOBJ,FALSE-VALUE + SET 'MUD-FLAG,FALSE-VALUE + RTRUE + + + .FUNCT WISH-FCN + EQUAL? PRSA,V?MAKE \FALSE + EQUAL? HERE,WELL-BOTTOM \?ELS10 + IN? COIN,HERE \?ELS10 + PRINTI "A whispering voice replies: ""Water makes the bucket go."" Unfortunately, wishing makes the coin go...." + CRLF + REMOVE COIN + RTRUE +?ELS10: PRINTR "No one is listening." + + + .FUNCT WELL-FCN + FSET? PRSO,TAKEBIT \?ELS5 + EQUAL? PRSA,V?DROP,V?PUT,V?THROW \?ELS5 + PRINTI "The " + PRINTD PRSO + PRINTI " is now sitting at the bottom of the well." + CRLF + MOVE PRSO,WELL-BOTTOM + RTRUE +?ELS5: EQUAL? PRSA,V?CLIMB-FOO,V?CLIMB-DOWN,V?CLIMB-UP \FALSE + PRINTR "You can't climb the well." + + + .FUNCT MATCH-FCN,CNT + EQUAL? PRSA,V?BURN,V?LAMP-ON \?ELS5 + EQUAL? PRSO,MATCH \?ELS5 + GRTR? MATCH-COUNT,0 \?CND8 + DEC 'MATCH-COUNT +?CND8: GRTR? MATCH-COUNT,0 /?ELS15 + PRINTR "I'm afraid you have run out of matches." +?ELS15: FSET MATCH,FLAMEBIT + FSET MATCH,ONBIT + CALL QUEUE,I-MATCH,2 + PUT STACK,0,1 + PRINTR "One of the matches starts to burn." +?ELS5: EQUAL? PRSA,V?LAMP-OFF \?ELS23 + FSET? MATCH,FLAMEBIT \?ELS23 + PRINTI "The match is out." + CRLF + FCLEAR MATCH,FLAMEBIT + FCLEAR MATCH,ONBIT + CALL QUEUE,I-MATCH,0 + RTRUE +?ELS23: EQUAL? PRSA,V?COUNT \?ELS29 + PRINTI "You have " + SUB MATCH-COUNT,1 >CNT + PRINTN CNT + PRINTI " match" + EQUAL? CNT,1 /?ELS36 + PRINTI "es." + JUMP ?CND34 +?ELS36: PRINTI "." +?CND34: CRLF + RTRUE +?ELS29: EQUAL? PRSA,V?EXAMINE \FALSE + FSET? MATCH,ONBIT \?ELS47 + PRINTI "A match is burning." + JUMP ?CND45 +?ELS47: PRINTI "No match is burning." +?CND45: CRLF + RTRUE + + + .FUNCT I-MATCH + PRINTI "The match has gone out." + CRLF + FCLEAR MATCH,FLAMEBIT + FCLEAR MATCH,ONBIT + RTRUE + + + .FUNCT LANTERN + EQUAL? PRSA,V?THROW \?ELS5 + EQUAL? PRSO,LAMP \?ELS5 + PRINTI "The lamp has smashed into the floor, and the light has gone out." + CRLF + CALL INT,I-LANTERN + PUT STACK,0,0 + REMOVE LAMP + MOVE BROKEN-LAMP,HERE + RTRUE +?ELS5: EQUAL? PRSA,V?LAMP-ON \?ELS11 + FSET? LAMP,RMUNGBIT \?ELS16 + PRINTR "A burned-out lamp won't light." +?ELS16: CALL INT,I-LANTERN + PUT STACK,0,1 + RFALSE +?ELS11: EQUAL? PRSA,V?LAMP-OFF \?ELS22 + FSET? LAMP,RMUNGBIT \?ELS27 + PRINTR "The lamp has already burned out." +?ELS27: CALL INT,I-LANTERN + PUT STACK,0,0 + RFALSE +?ELS22: EQUAL? PRSA,V?EXAMINE \FALSE + FSET? LAMP,RMUNGBIT \?ELS36 + PRINTI "The lamp has burned out." + JUMP ?CND34 +?ELS36: FSET? LAMP,ONBIT \?ELS40 + PRINTI "The lamp is on." + JUMP ?CND34 +?ELS40: PRINTI "The lamp is turned off." +?CND34: CRLF + RTRUE + + + .FUNCT I-LANTERN,TICK,TBL + VALUE 'LAMP-TABLE >TBL + GET TBL,0 >TICK + CALL QUEUE,I-LANTERN,TICK + PUT STACK,0,1 + CALL LIGHT-INT,LAMP,TBL,TICK + ZERO? TICK /FALSE + ADD TBL,4 >LAMP-TABLE + RETURN LAMP-TABLE + + + .FUNCT LIGHT-INT,OBJ,TBL,TICK + ZERO? TICK \?CND1 + FCLEAR OBJ,ONBIT + FSET OBJ,RMUNGBIT +?CND1: CALL HELD?,OBJ + ZERO? STACK \?THN9 + IN? OBJ,HERE \FALSE +?THN9: ZERO? TICK \?ELS15 + PRINTI "You'd better have more light than from the " + PRINTD OBJ + PRINTR "." +?ELS15: GET TBL,1 + PRINT STACK + CRLF + RTRUE + + + .FUNCT RIDDLE-ROOM-FCN,RARG + EQUAL? RARG,M-LOOK \?ELS5 + PRINTI "This is a room which is bare on all sides. There is an exit down in the northwest corner of the room. To the east is a great " + FSET? RIDDLE-DOOR,OPENBIT \?ELS10 + PRINTI "open" + JUMP ?CND8 +?ELS10: PRINTI "closed" +?CND8: PRINTI " door made of stone. Above the stone, the following words are written: ""No man shall pass this door without solving this riddle: + + What is tall as a house, + round as a cup, + and all the king's horses + can't draw it up?"" +" + RTRUE +?ELS5: EQUAL? RARG,M-BEG \FALSE + EQUAL? PRSA,V?SAY,V?ANSWER \FALSE + FSET? RIDDLE-DOOR,OPENBIT /FALSE + GET P-LEXV,P-CONT + EQUAL? STACK,W?WELL /?THN31 + ADD P-CONT,2 + GET P-LEXV,STACK + EQUAL? STACK,W?WELL \?ELS30 +?THN31: PRINTI "There is a deafening clap of thunder and the stone door quietly swings open to reveal a passageway beyond." + CRLF + CALL SCORE-UPD,5 + FSET RIDDLE-DOOR,OPENBIT + JUMP ?CND26 +?ELS30: PRINTI "A hollow laugh seems to come from the stone door." + CRLF +?CND26: SET 'P-CONT,FALSE-VALUE + SET 'QUOTE-FLAG,FALSE-VALUE + RTRUE + + + .FUNCT RIDDLE-DOOR-FCN + EQUAL? PRSA,V?OPEN \?ELS5 + FSET? RIDDLE-DOOR,OPENBIT \?ELS10 + PRINTR "It is open!" +?ELS10: PRINTR "The door can only be opened by answering the riddle." +?ELS5: EQUAL? PRSA,V?CLOSE \FALSE + FSET? RIDDLE-DOOR,OPENBIT \?ELS23 + PRINTR "Not a chance. The door weighs many tons." +?ELS23: PRINTR "It is closed!" + + + .FUNCT RIDDLE-PSEUDO + EQUAL? PRSA,V?EXAMINE \FALSE + PRINTR "Use the ""Look"" command." + + + .FUNCT MAGIC-ACTOR,V + ZERO? SPELL? /FALSE + EQUAL? SPELL?,S-FALL \?ELS11 + EQUAL? PRSA,V?CROSS,V?CLIMB-DOWN,V?CLIMB-UP /?THN17 + EQUAL? PRSA,V?WALK \?ELS16 + GETPT HERE,P?DOWN + ZERO? STACK /?ELS16 +?THN17: GETPT HERE,P?GLOBAL >V + PTSIZE V + CALL ZMEMQB,BRIDGE,V,STACK + ZERO? STACK /?ELS25 + CALL JIGS-UP,STR?252 + RSTACK +?ELS25: RANDOM 100 + GRTR? 25,STACK \?ELS27 + CALL JIGS-UP,STR?253 + RSTACK +?ELS27: PRINTR "You just tripped on an invisible cord, or perhaps your own feet. But this must be your lucky day, as you managed to regain your balance before what could have been a fatal fall." +?ELS16: EQUAL? PRSA,V?BOARD \FALSE + PRINTI "You get in the " + PRINTD PRSO + PRINTR " but you fall out again, almost as though an invisible hand had tipped it over." +?ELS11: EQUAL? SPELL?,S-FLOAT \?ELS37 + EQUAL? PRSA,V?WAIT,V?DIAGNOSE /FALSE + EQUAL? PRSA,V?WALK \?ELS44 + PRINTR "I suppose you plan to do that by flapping your arms?" +?ELS44: EQUAL? PRSA,V?DROP \?ELS48 + MOVE PRSO,HERE + PRINTI "The " + PRINTD PRSO + PRINTR " drops to the ground." +?ELS48: EQUAL? PRSA,V?TAKE \FALSE + IN? PRSO,HERE \FALSE + PRINTR "You can't reach that! It's on the ground." +?ELS37: EQUAL? SPELL?,S-FREEZE \?ELS58 + EQUAL? PRSA,V?WAIT,V?DIAGNOSE /FALSE + PRINTR "You are frozen solid. You might as well wait it out, because you can't do anything else in this state." +?ELS58: EQUAL? SPELL?,S-FENCE \?ELS69 + EQUAL? PRSA,V?WALK \?ELS69 + PRINTR "An invisible fence of magical force bars your way." +?ELS69: EQUAL? SPELL?,S-FIERCE \?ELS75 + CALL INFESTED?,HERE >V + ZERO? V /?ELS75 + EQUAL? PRSA,V?MUNG,V?ATTACK /FALSE + CALL FORCE-FIGHT,V + RTRUE +?ELS75: EQUAL? SPELL?,S-FERMENT \?ELS86 + EQUAL? PRSA,V?WALK \?ELS86 + IN? WINNER,HERE \?ELS86 + PRINTI "Oops, you seem a little unsteady... I'm not sure you got where you intended going." + CRLF + CRLF + CALL RANDOM-WALK + RSTACK +?ELS86: EQUAL? SPELL?,S-FEAR \FALSE + CALL INFESTED?,HERE >V + ZERO? V /FALSE + PRINTI "All at once, you are overcome by fear! There's is a " + PRINTD V + PRINTI " in here! Maybe it's after you! " + LOC WINNER + FSET? STACK,VEHBIT \?ELS101 + PRINTR "You huddle in the corner, terrified." +?ELS101: PRINTI "You run from the room screaming in terror!" + CRLF + CRLF + CALL RANDOM-WALK + RSTACK + + + .FUNCT RANDOM-WALK,P,TX,L,S,D=0 + SET 'P,0 +?PRG1: NEXTP HERE,P >P + LESS? P,LOW-DIRECTION \?ELS5 + ZERO? D /TRUE + SET 'S,SPELL? + SET 'SPELL?,FALSE-VALUE + SET 'WINNER,ADVENTURER + MOVE WINNER,HERE + CALL DO-WALK,D + SET 'SPELL?,S + RTRUE +?ELS5: GETPT HERE,P >TX + PTSIZE TX >L + EQUAL? L,UEXIT /?THN15 + EQUAL? L,CEXIT \?ELS18 + GETB TX,CEXITFLAG + VALUE STACK + ZERO? STACK \?THN15 +?ELS18: EQUAL? L,DEXIT \?PRG1 + GETB TX,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 FORCE-FIGHT,V,W + CALL FIND-IN,ADVENTURER,WEAPONBIT >W + ZERO? W \?CND1 + SET 'W,HANDS +?CND1: PRINTI "You are maddened by an overwhelming ferocity, and attack the " + PRINTD V + PRINTI " instead." + CRLF + CALL PERFORM,V?ATTACK,V,W + RSTACK + + + .FUNCT DWINDOW-DESC + PRINTI "On the floor is a very small diamond shaped window which is " + ZERO? DIAMOND-SOLVE /?ELS5 + PRINTI "glowing serenely" + JUMP ?CND3 +?ELS5: GET DWDESCS,DIAMOND-COUNT + PRINT STACK +?CND3: PRINTR "." + + + .FUNCT DWINDOW-FCN + EQUAL? PRSA,V?TAKE \?ELS5 + PRINTR "The window is an integral part of the floor." +?ELS5: EQUAL? PRSA,V?MUNG \?ELS9 + PRINTR "The window is diamond-hard and cannot be broken." +?ELS9: EQUAL? PRSA,V?LOOK-INSIDE,V?EXAMINE \FALSE + CALL DWINDOW-DESC + RSTACK + + + .FUNCT DIAMOND-MOTION,RARG,DC,DIR,RM + EQUAL? RARG,M-LOOK \?ELS5 + PRINTI "This is a room with oddly angled walls and passages in all directions. The walls are made of some glassy substance." + CRLF + EQUAL? HERE,DIAMOND-5 \?ELS10 + PRINTI "A marble stairway leads upward." + ZERO? DIAMOND-SOLVE /?CND13 + PRINTI " The floor has swung down at the end of the stairway to reveal a secret passage leading down into unrelieved darkness." +?CND13: CRLF + RTRUE +?ELS10: CALL DWINDOW-DESC + RTRUE +?ELS5: EQUAL? RARG,M-FLASH \?ELS22 + CALL DWINDOW-DESC + RTRUE +?ELS22: EQUAL? RARG,M-BEG \FALSE + EQUAL? PRSA,V?WALK \FALSE + ZERO? DIAMOND-SOLVE \FALSE + EQUAL? HERE,DIAMOND-2,DIAMOND-4 /?THN32 + EQUAL? HERE,DIAMOND-6,DIAMOND-8 \?ELS31 +?THN32: SUB DIAMOND-COUNT,1 + GET DIDIRS,STACK >DIR + EQUAL? PRSO,DIR \?ELS36 + INC 'DIAMOND-COUNT + GRTR? DIAMOND-COUNT,DIAMOND-BASE \?CND37 + SET 'DIAMOND-BASE,DIAMOND-COUNT + SET 'DIAMOND-MOVES,0 +?CND37: EQUAL? DIAMOND-COUNT,5 \?CND40 + PRINTI "You hear a strange rusty squeal echoing in the distance." + CRLF + FCLEAR DIAMOND-5,TOUCHBIT + CALL SCORE-UPD,5 + SET 'DIAMOND-SOLVE,TRUE-VALUE +?CND40: EQUAL? HERE,DIAMOND-2 \?ELS47 + SET 'DIR,DIAMOND-4 + JUMP ?CND45 +?ELS47: EQUAL? HERE,DIAMOND-4 \?ELS49 + SET 'DIR,DIAMOND-8 + JUMP ?CND45 +?ELS49: EQUAL? HERE,DIAMOND-8 \?ELS51 + SET 'DIR,DIAMOND-6 + JUMP ?CND45 +?ELS51: EQUAL? HERE,DIAMOND-6 \?CND45 + SET 'DIR,DIAMOND-2 +?CND45: CALL GOTO,DIR + RTRUE +?ELS36: CALL DIAMOND-LOSS + RTRUE +?ELS31: EQUAL? HERE,DIAMOND-5 \?ELS57 + EQUAL? PRSO,P?UP /FALSE +?ELS57: SET 'DIAMOND-COUNT,0 + RANDOM 100 + GRTR? 33,STACK \?ELS66 + PRINTR "There is no way to go in that direction." +?ELS66: RANDOM 100 + GRTR? 25,STACK \?ELS70 + CALL DIAMOND-LOSS + RTRUE +?ELS70: SET 'DIAMOND-COUNT,1 + GRTR? DIAMOND-COUNT,DIAMOND-BASE \?CND73 + SET 'DIAMOND-BASE,DIAMOND-COUNT + SET 'DIAMOND-MOVES,0 +?CND73: RANDOM 4 + SUB STACK,1 + GET DIAMOND-ROOMS,STACK >RM + FSET? BAT,INVISIBLE \?CND76 + FCLEAR BAT,INVISIBLE + MOVE BAT,RM +?CND76: CALL GOTO,RM + RTRUE + + + .FUNCT DIAMOND-LOSS + INC 'DIAMOND-MOVES + EQUAL? DIAMOND-MOVES,20 \?CND1 + PRINTI "As you thrash about in the maze, the mirthful voice of the Wizard taunts you: ""Fool! You'll never get past " + GET BASES,DIAMOND-BASE + PRINT STACK + PRINTI " base at this rate!""" + CRLF +?CND1: RANDOM 5 + ADD 3,STACK + GET DIAMOND-ROOMS,STACK + CALL GOTO,STACK + RSTACK + + + .FUNCT CERBERUS-FCN + EQUAL? PRSA,V?RAISE,V?RUB,V?WAVE \?ELS5 + EQUAL? PRSO,WAND \?ELS5 + PRINTI "The dog looks puzzled." + CRLF + RFALSE +?ELS5: ZERO? WAND-ON /?ELS11 + EQUAL? PRSA,V?INCANT,V?SAY /FALSE +?ELS11: CALL HELLO?,CERBERUS + ZERO? STACK /?ELS15 + ZERO? CERBERUS-LEASHED /?ELS20 + PRINTR """Arf! Arf! Arf!""" +?ELS20: PRINTR """Grrrr!""" +?ELS15: EQUAL? PRSA,V?STAB,V?MUNG,V?ATTACK \?ELS29 + ZERO? CERBERUS-LEASHED /?ELS34 + REMOVE CERBERUS + PRINTR "With a quiet bark of disappointment, the creature expires. Its six eyes look at you reproachfully. As it dies, it collapses into a small pile of dust which blows away into nothing." +?ELS34: RANDOM 100 + GRTR? 50,STACK \?ELS39 + CALL JIGS-UP,STR?263 + RSTACK +?ELS39: PRINTR "The maddened dog-thing snaps viciously at you." +?ELS29: EQUAL? PRSA,V?PUT-ON,V?PUT \?ELS45 + EQUAL? PRSO,COLLAR \?ELS45 + MOVE COLLAR,CERBERUS + FSET COLLAR,NDESCBIT + FSET COLLAR,TRYTAKEBIT + PUTP CERBERUS,P?LDESC,STR?264 + SET 'CERBERUS-LEASHED,TRUE-VALUE + PRINTR "The creature whines happily, then the center head licks your face (which is roughly like experiencing a sandpaper washcloth). The other two heads look about, as though the monster felt a sudden need to find a pair of slippers somewhere. Its huge tail wags enthusiastically, knocking small rocks around and almost blowing you over from the breeze it creates." +?ELS45: EQUAL? PRSA,V?ENCHANT \?ELS51 + EQUAL? SPELL-USED,W?FLOAT \?ELS56 + SET 'SPELL-HANDLED?,TRUE-VALUE + PRINTR "The huge dog rises about an inch off the ground, for a moment." +?ELS56: EQUAL? SPELL-USED,W?FIERCE \?ELS60 + SET 'SPELL-HANDLED?,TRUE-VALUE + CALL JIGS-UP,STR?265 + RSTACK +?ELS60: EQUAL? SPELL-USED,W?FEEBLE \FALSE + PRINTR "What an effect! He now has the strength of just one elephant, rather than ten!" +?ELS51: ZERO? CERBERUS-LEASHED \?ELS66 + PRINTR "The three-headed dog snaps at you viciously!" +?ELS66: ZERO? CERBERUS-LEASHED /FALSE + EQUAL? PRSA,V?RUB \FALSE + PRINTR "The dog is now insanely happy, slobbering all over the place and whining with uncontained doggish joy." + + + .FUNCT COLLAR-FCN + EQUAL? PRSA,V?TAKE \?ELS5 + ZERO? CERBERUS-LEASHED /?ELS5 + CALL JIGS-UP,STR?266 + RSTACK +?ELS5: EQUAL? PRSA,V?ENCHANT \FALSE + EQUAL? SPELL-USED,W?FLOAT \FALSE + CALL PERFORM,V?ENCHANT,CERBERUS + RTRUE + + + .FUNCT GLACIER-FCN + EQUAL? PRSA,V?MELT \FALSE + PRINTR "This is a big glacier; you'll need a lot of heat." + + + .FUNCT GLACIER-ROOM-FCN,RARG + EQUAL? RARG,M-LOOK \FALSE + PRINTI "This is a large hall of ancient lava, since worn smooth by the movement of a glacier. A large passage exits to the east and an upward lava tube is at the top of a jumble of fallen rocks." + CRLF + ZERO? ICE-MELTED /TRUE + PRINTR "A damp and scorched passage leads west. It is still partly full of steam." + + + .FUNCT DRAGON-FCN + CALL QUEUE,I-DRAGON,-1 + PUT STACK,0,1 + CALL HELLO?,DRAGON + ZERO? STACK /?ELS5 + PRINTI "The dragon looks amused. He speaks in a voice so deep you feel it rather than hear it, but the tongue is unknown to you. You find yourself almost hypnotized." + CRLF + ADD DRAGON-ANGER,2 >DRAGON-ANGER + RETURN DRAGON-ANGER +?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS9 + PRINTI "He turns and looks back at you, his cat's eyes yellow in the gloom. You start to feel weak, and quickly turn away." + CRLF + INC 'DRAGON-ANGER + RETURN DRAGON-ANGER +?ELS9: EQUAL? PRSA,V?KICK,V?MUNG,V?ATTACK /?THN14 + EQUAL? PRSA,V?LAMP-ON \?ELS13 +?THN14: EQUAL? PRSA,V?LAMP-ON /?THN19 + EQUAL? PRSA,V?ATTACK \?ELS18 + ZERO? PRSI \?ELS18 +?THN19: PRINTI "With your bare hands? I doubt the dragon even noticed." + CRLF + JUMP ?CND16 +?ELS18: CALL RANDOM-ELEMENT,DRAGON-ATTACKS + PRINT STACK + CRLF +?CND16: ADD DRAGON-ANGER,4 >DRAGON-ANGER + RETURN DRAGON-ANGER +?ELS13: EQUAL? PRSA,V?GIVE \?ELS30 + EQUAL? PRSI,DRAGON \?ELS30 + INC 'DRAGON-ANGER + GETPT PRSO,P?VALUE + ZERO? STACK /?ELS37 + MOVE PRSO,CHEST + PRINTR "The dragon is pleased by your gift, excuses himself for a moment, and returns without it." +?ELS37: CALL BOMB?,PRSO + ZERO? STACK /?ELS41 + ADD DRAGON-ANGER,2 >DRAGON-ANGER + REMOVE BRICK + PRINTR "The dragon snakes his long red tongue around the bomb and politely swallows it. A few moments later he belches and smoke curls out of his nostrils." +?ELS41: PRINTR "The dragon refuses your gift." +?ELS30: EQUAL? PRSA,V?WALK \FALSE + EQUAL? HERE,DRAGON-ROOM \FALSE + EQUAL? PRSO,P?NORTH \FALSE + ADD DRAGON-ANGER,3 >DRAGON-ANGER + PRINTR "The dragon puts out a claw, grins (all of his sword-sharp teeth glinting in the light), and blocks your way." + + + .FUNCT HELLO?,WHO + EQUAL? WINNER,WHO /?THN6 + EQUAL? PRSA,V?REPLY,V?ANSWER,V?TELL /?THN6 + EQUAL? PRSA,V?INCANT,V?HELLO,V?SAY \FALSE +?THN6: EQUAL? PRSA,V?SAY,V?ANSWER,V?TELL /?THN11 + EQUAL? PRSA,V?REPLY,V?INCANT \TRUE +?THN11: SET 'P-CONT,FALSE-VALUE + SET 'QUOTE-FLAG,FALSE-VALUE + RTRUE + + + .FUNCT FIND-TARGET,TARGET,P,TX,L,ROOM + IN? TARGET,HERE \?ELS5 + RETURN HERE +?ELS5: SET 'P,0 +?PRG8: NEXTP HERE,P >P + ZERO? P /FALSE + LESS? P,LOW-DIRECTION /?PRG8 + GETPT HERE,P >TX + PTSIZE TX >L + EQUAL? L,UEXIT,CEXIT,DEXIT \?PRG8 + GETB TX,0 >ROOM + IN? TARGET,ROOM \?PRG8 + RETURN ROOM + + + .FUNCT I-DRAGON,ROOM + GRTR? DRAGON-ANGER,6 \?ELS3 + PRINTI "The dragon tires of this game. With an almost bored yawn, he opens his mouth and " + EQUAL? SPELL?,S-FIREPROOF \?ELS8 + PRINTI "blasts you with a great gout of fire, but it washes over you harmlessly." + CRLF + JUMP ?CND1 +?ELS8: CALL DRAGON-LEAVES + CALL JIGS-UP,STR?272 + JUMP ?CND1 +?ELS3: IN? WINNER,DRAGON-ROOM \?ELS14 + IN? DRAGON,DRAGON-ROOM /?ELS14 + MOVE DRAGON,DRAGON-ROOM + PRINTI "The dragon doubles back and charges into the room, maddened by your attempt to sneak past him. His eyes glow with a white heat of anger." + CRLF + EQUAL? SPELL?,S-FIREPROOF \?ELS21 + CALL JIGS-UP,STR?273 + JUMP ?CND1 +?ELS21: CALL JIGS-UP,STR?274 + JUMP ?CND1 +?ELS14: GRTR? DRAGON-ANGER,0 /?ELS25 + RANDOM 100 + GRTR? 50,STACK \?ELS28 + IN? DRAGON,HERE \?ELS28 + PRINTI "The dragon looks bored." + CRLF + JUMP ?CND1 +?ELS28: CALL DRAGON-LEAVES + EQUAL? HERE,GLACIER-ROOM \?ELS37 + PRINTI "The dragon is no longer around. He must have become bored with you." + CRLF + JUMP ?CND1 +?ELS37: EQUAL? HERE,OLD-HERE \?CND1 + PRINTI "The dragon seems to have lost interest in you." + EQUAL? OLD-HERE,DRAGON-ROOM \?ELS46 + CRLF + JUMP ?CND1 +?ELS46: PRINTI " He wanders off." + CRLF + JUMP ?CND1 +?ELS25: CALL FIND-TARGET,WINNER >ROOM + ZERO? ROOM \?ELS55 + RANDOM 100 + GRTR? 25,STACK \?CND53 + CALL DRAGON-LEAVES + JUMP ?CND53 +?ELS55: EQUAL? ROOM,CAROUSEL-ROOM,TINY-ROOM /?THN61 + EQUAL? ROOM,RAVINE-LEDGE,FRESCO-ROOM \?ELS60 +?THN61: RANDOM 100 + GRTR? 25,STACK \?CND63 + CALL DRAGON-LEAVES +?CND63: PRINTI "The dragon will follow no further." + CRLF + JUMP ?CND1 +?ELS60: EQUAL? ROOM,GLACIER-ROOM \?ELS69 + CRLF + PRINTI "As the dragon enters, he sees his reflection on the icy surface of the glacier at its western end. He becomes enraged: There is another dragon here, behind that glass, he thinks! Dragons are smart, but sometimes naive, and this one has never seen ice before. He rears up to his full height to challenge this intruder into his territory. He roars a challenge! The intruder responds! The dragon takes a deep breath, and out of his mouth pours a massive gout of flame. It washes over the ice, which melts rapidly, sending out torrents of water and a huge cloud of steam! You manage to clamber up to a small shelf, but the dragon is terrified! A huge splash goes down his throat! There is a muffled explosion and the dragon, a puzzled expression on his face, dies. He is carried away by the water. + +When the flood recedes you climb gingerly down. While no trace of the dragon can be found, the melting of the ice has revealed a passage leading west." + CRLF + REMOVE DRAGON + REMOVE ICE + MOVE DEAD-DRAGON,DEEP-FORD + CALL INT,I-DRAGON + PUT STACK,0,0 + CALL SCORE-UPD,5 + SET 'ICE-MELTED,TRUE-VALUE + JUMP ?CND1 +?ELS69: EQUAL? ROOM,OLD-HERE /?ELS76 + MOVE DRAGON,ROOM + PRINTI "The dragon follows you, out of mingled curiosity and anger." + CRLF + JUMP ?CND74 +?ELS76: PRINTI "The dragon continues to watch you carefully." + CRLF +?CND74: GRTR? DRAGON-ANGER,0 /?CND53 + SET 'DRAGON-ANGER,0 + CALL INT,I-DRAGON + PUT STACK,0,0 +?CND53: +?CND1: LOC DRAGON >OLD-HERE + SUB DRAGON-ANGER,2 >DRAGON-ANGER + LESS? DRAGON-ANGER,0 \TRUE + SET 'DRAGON-ANGER,0 + RTRUE + + + .FUNCT DRAGON-LEAVES + LOC DEAD-DRAGON + ZERO? STACK \FALSE + MOVE DRAGON,DRAGON-ROOM + SET 'DRAGON-ANGER,0 + CALL INT,I-DRAGON + PUT STACK,0,0 + RTRUE + + + .FUNCT I-GARDEN + EQUAL? HERE,GARDEN-NORTH,GAZEBO-ROOM /?THN6 + EQUAL? HERE,TOPIARY-ROOM,FORMAL-GARDEN \?ELS5 +?THN6: IN? UNICORN,GARDEN-NORTH \?ELS12 + RANDOM 100 + GRTR? 33,STACK \?ELS12 + REMOVE UNICORN + EQUAL? HERE,TOPIARY-ROOM /FALSE + PRINTR "The unicorn bounds lightly away." +?ELS12: IN? PRINCESS,DRAGON-LAIR \?ELS23 + IN? UNICORN,GARDEN-NORTH /?ELS23 + RANDOM 100 + GRTR? 25,STACK \?ELS23 + EQUAL? HERE,TOPIARY-ROOM /?ELS23 + ZERO? UNICORN-FRIGHTENED /?CND26 + SET 'UNICORN-FRIGHTENED,FALSE-VALUE + RFALSE +?CND26: MOVE UNICORN,GARDEN-NORTH + EQUAL? HERE,GARDEN-NORTH \?ELS34 + CALL RANDOM-ELEMENT,UNICORN-MSGS + PRINT STACK + CRLF + RTRUE +?ELS34: PRINTR "A unicorn is peacefully cropping grass at the north end of the garden. There is something hanging around its neck." +?ELS23: EQUAL? HERE,TOPIARY-ROOM \FALSE + ZERO? TOPIARY-MOVED \?ELS47 + RANDOM 100 + GRTR? 12,STACK \?ELS47 + SET 'TOPIARY-MOVED,TRUE-VALUE + PRINTR "You look around, and strangely, the topiary animals seem to have changed position slightly." +?ELS47: ZERO? TOPIARY-MOVED /?ELS53 + ZERO? TOPIARY-NEAR \?ELS53 + RANDOM 100 + GRTR? 8,STACK \?ELS53 + SET 'TOPIARY-NEAR,TRUE-VALUE + PRINTR "The topiary animals seem to close in on you. You turn and they are very close. They seem to be leering at you." +?ELS53: ZERO? TOPIARY-NEAR /FALSE + RANDOM 100 + GRTR? 4,STACK \FALSE + SET 'TOPIARY-MOVED,FALSE-VALUE + SET 'TOPIARY-NEAR,FALSE-VALUE + CALL JIGS-UP,STR?275 + RSTACK +?ELS5: REMOVE UNICORN + CALL INT,I-GARDEN + PUT STACK,0,0 + RFALSE + + + .FUNCT GARDEN-ROOM-FCN,RARG + EQUAL? RARG,M-ENTER \FALSE + CALL QUEUE,I-GARDEN,-1 + PUT STACK,0,1 + RTRUE + + + .FUNCT GLOBAL-UNICORN-FCN + IN? UNICORN,GARDEN-NORTH \?ELS5 + PRINTR "The unicorn is way up at the north end of the garden." +?ELS5: EQUAL? PRSA,V?FOLLOW,V?FIND \?ELS9 + FSET? UNICORN,TOUCHBIT \?ELS14 + PRINTR "I don't know where it is now." +?ELS14: PRINTR "The unicorn is a mythical beast." +?ELS9: PRINTR "Unicorn? What unicorn?" + + + .FUNCT UNICORN-FCN + CALL HELLO?,UNICORN + ZERO? STACK /?ELS5 + PRINTR "The unicorn listens distractedly, then goes back to cropping grass." +?ELS5: EQUAL? PRSA,V?FOLLOW \?ELS9 + PRINTR "The unicorn shies away as you approach." +?ELS9: EQUAL? PRSA,V?EXAMINE \?ELS13 + EQUAL? PRSO,UNICORN \?ELS13 + PRINTR "The unicorn shies away as you approach for a closer look, but you do notice a tiny gold key hanging from a red satin ribbon looped around the animal's neck." +?ELS13: EQUAL? PRSA,V?EXAMINE \?ELS19 + PRINTR "The unicorn shies away as you approach." +?ELS19: EQUAL? PRSA,V?RUB,V?PUT,V?TAKE /?THN24 + EQUAL? PRSA,V?ATTACK,V?MUNG \FALSE +?THN24: REMOVE UNICORN + SET 'UNICORN-FRIGHTENED,TRUE-VALUE + PRINTR "The unicorn, unsurprised by this evidence that you are indeed the uncouth sort of vagabond it suspected you were, melts into the hedges and is gone." + + + .FUNCT GAZEBO-FCN + EQUAL? HERE,GARDEN-NORTH \?ELS5 + EQUAL? PRSA,V?THROUGH \?ELS5 + CALL DO-WALK,P?IN + RTRUE +?ELS5: EQUAL? HERE,GAZEBO-ROOM \?ELS9 + EQUAL? PRSA,V?THROUGH \?ELS9 + PRINTR "You're already in it." +?ELS9: EQUAL? HERE,GAZEBO-ROOM \FALSE + EQUAL? PRSA,V?EXIT,V?LEAVE \FALSE + CALL DO-WALK,P?OUT + RTRUE + + + .FUNCT CHEST-FCN + EQUAL? PRSA,V?OPEN \FALSE + RANDOM 100 + GRTR? 25,STACK \?ELS8 + CALL V-OPEN + IN? PRINCESS,HERE \?CND6 + ZERO? PRINCESS-AWAKE \?CND6 + PRINTI "The opening of the squeaky lid startles the young woman." + CRLF + JUMP ?CND6 +?ELS8: PRINTI "The hinges are very rusty, but they seem to be starting to give. You can probably open it if you try again. There is something bumping around inside." + IN? PRINCESS,HERE \?CND20 + ZERO? PRINCESS-AWAKE \?CND20 + PRINTI " All this rummaging around has startled the young woman." +?CND20: CRLF +?CND6: PUTP CHEST,P?ACTION,0 + IN? PRINCESS,HERE \TRUE + ZERO? PRINCESS-AWAKE \TRUE + CALL PERFORM,V?ALARM,PRINCESS + RTRUE + + + .FUNCT PRINCESS-FCN,DEM + CALL INT,I-PRINCESS >DEM + EQUAL? PRSA,V?FOLLOW \?ELS5 + IN? PRINCESS,HERE \?ELS8 + PRINTR "You can't follow her until she leaves..." +?ELS8: ZERO? PRFOLLOW /?ELS12 + CALL DO-WALK,PRFOLLOW + RTRUE +?ELS12: PRINTR "I seem to have lost track of her." +?ELS5: IN? PRINCESS,HERE /?ELS19 + PRINTR "There is no princess here." +?ELS19: EQUAL? PRSA,V?RAPE,V?MUNG,V?ATTACK \?ELS23 + REMOVE PRINCESS + PRINTI "The princess screams as you approach. ""Won't someone deliver me from this awful fate?"" she cries. " + IN? WIZARD,HERE \?ELS28 + PRINTI "Shocked, the Wizard of Frobozz turns toward you." + JUMP ?CND26 +?ELS28: PRINTI "Just in time, the Wizard of Frobozz appears, seeming to unroll himself out of nothing like a window shade." +?CND26: PRINTI " ""Fry!"" he intones, and a massive bolt of lightning reduces you to a pile of smoking ashes. (Serves you right, too, if you ask me.)" + CALL JIGS-UP + RSTACK +?ELS23: CALL HELLO?,PRINCESS + ZERO? STACK \?THN39 + EQUAL? PRSA,V?EXAMINE,V?KISS,V?ALARM /?THN39 + EQUAL? PRSA,V?RUB \?ELS38 +?THN39: IN? PRINCESS,DRAGON-LAIR \?ELS45 + GET DEM,C-ENABLED? + ZERO? STACK \?ELS45 + PUTP PRINCESS,P?LDESC,STR?280 + CALL QUEUE,I-PRINCESS,2 + PUT STACK,0,1 + SET 'PRINCESS-AWAKE,TRUE-VALUE + PRINTR "The princess (for she is obviously one) shakes herself awake, then notices you for the first time. She smiles. ""Thank you for rescuing me from that horrid worm,"" she says. ""I must depart. My parents will be worried about me."" With that, she arises, looking purposefully out of the lair." +?ELS45: PRINTI "The princess ignores you. She looks about the room, but her eyes fix on the " + EQUAL? HERE,GAZEBO-ROOM \?ELS56 + PRINTI "garden outside" + JUMP ?CND54 +?ELS56: EQUAL? HERE,GARDEN-NORTH \?ELS60 + PRINTI "gazebo" + JUMP ?CND54 +?ELS60: EQUAL? HERE,RAVINE-LEDGE \?ELS64 + PRINTI "ledge" + JUMP ?CND54 +?ELS64: MUL PRCOUNT,4 + GET PRDIRS,STACK + PRINT STACK +?CND54: PRINTR "." +?ELS38: ZERO? PRINCESS-AWAKE \FALSE + PRINTR "She's in a trance!" + + + .FUNCT I-PRINCESS,DEM,OLDP,PC + CALL INT,I-PRINCESS >DEM + LOC PRINCESS >OLDP + MUL PRCOUNT,4 >PC + ADD PC,1 + GET PRDIRS,STACK + MOVE PRINCESS,STACK + SET 'PRFOLLOW,FALSE-VALUE + IN? PRINCESS,STREAM-PATH \?ELS3 + IN? WINNER,MARBLE-HALL \?ELS3 + PRINTI "The princess presses a loose piece of marble in the wall and a large section of the wall slides away, revealing a passage to the east. She enters it." + CRLF + IN? WINNER,OLDP \?CND8 + ADD PC,3 + GET PRDIRS,STACK >PRFOLLOW +?CND8: SET 'SECRET-DOOR,TRUE-VALUE + JUMP ?CND1 +?ELS3: IN? PRINCESS,STREAM-PATH \?ELS12 + IN? WINNER,STREAM-PATH \?ELS12 + SET 'SECRET-DOOR,TRUE-VALUE + PRINTI "The princess appears from behind some rocks, as though she had walked through a wall." + CRLF + JUMP ?CND1 +?ELS12: IN? WINNER,OLDP \?ELS18 + ADD PC,3 + GET PRDIRS,STACK >PRFOLLOW + EQUAL? OLDP,GARDEN-NORTH \?ELS21 + PRINTI "The princess enters the gazebo" + FSET? GAZEBO-ROOM,RMUNGBIT \?CND24 + PRINTI ", although you would never get past the debris. She must be magically protected." +?CND24: PRINTI "." + CRLF + JUMP ?CND1 +?ELS21: EQUAL? OLDP,RAVINE-LEDGE \?ELS32 + PRINTI "The princess climbs daintily down the rock face." + CRLF + JUMP ?CND1 +?ELS32: PRINTI "The princess walks " + GET PRDIRS,PC + PRINT STACK + PRINTI ". She glances back at you as she goes." + CRLF + JUMP ?CND1 +?ELS18: IN? PRINCESS,HERE \?CND1 + EQUAL? HERE,GAZEBO-ROOM \?ELS47 + PRINTI "The princess joins you in the gazebo." + CRLF + JUMP ?CND1 +?ELS47: EQUAL? HERE,DEEP-FORD \?ELS51 + PRINTI "The princess climbs down the rock wall onto the beach." + CRLF + JUMP ?CND1 +?ELS51: PRINTI "The princess enters from the " + ADD 2,PC + GET PRDIRS,STACK + PRINT STACK + PRINTI ". She seems surprised to see you." + CRLF +?CND1: IN? PRINCESS,GAZEBO-ROOM \?ELS64 + PUT DEM,0,0 + CALL QUEUE,I-UNICORN,6 + PUT STACK,0,1 + RTRUE +?ELS64: INC 'PRCOUNT + RANDOM 100 + GRTR? 75,STACK \?ELS71 + PUSH 1 + JUMP ?CND67 +?ELS71: PUSH 2 +?CND67: CALL QUEUE,I-PRINCESS,STACK + PUT STACK,0,1 + RTRUE + + + .FUNCT I-UNICORN + EQUAL? HERE,GAZEBO-ROOM,GARDEN-NORTH \?ELS5 + MOVE ROSE,WINNER + FCLEAR GOLD-KEY,NDESCBIT + MOVE GOLD-KEY,WINNER + CALL SCORE-OBJ,GOLD-KEY + PUTP GOLD-KEY,P?ACTION,0 + PRINTI "Shyly, a unicorn peeks out of the hedges. It notices the princess and seems captivated. It approaches her and bows its head as though curtseying to her. Around its neck is a red satin ribbon on which is strung a delicate gold key. The princess takes the ribbon and uses it to tie up her hair. She looks at you and then, smiling, hands you the key and a fresh rose which she plucks from the arbor. ""You may have use of such a thing,"" she says. ""It is the least I can do for one who rescued me from a fate I dare not contemplate."" With that, she mounts the unicorn (side-saddle, of course) and rides off into the gloom." + CRLF + REMOVE PRINCESS + RTRUE +?ELS5: REMOVE PRINCESS + MOVE ROSE,GAZEBO-ROOM + RFALSE + + + .FUNCT MENHIR-ROOM-FCN,RARG + EQUAL? RARG,M-FLASH \?ELS5 + ZERO? MENHIR-POSITION /?ELS5 + CALL DESCRIBE-MENHIR + RSTACK +?ELS5: EQUAL? RARG,M-LOOK \FALSE + PRINTI "This is a large room which was evidently used once as a quarry. Many large limestone chunks lie helter-skelter around the room. Some are rough-hewn and unworked, others smooth and well-finished. One side of the room appears to have been used to quarry building blocks, the other to produce menhirs (standing stones). Obvious passages lead north and south." + CRLF + IN? MENHIR,LOCAL-GLOBALS \TRUE + CALL DESCRIBE-MENHIR + RTRUE + + + .FUNCT DESCRIBE-MENHIR + EQUAL? HERE,MENHIR-ROOM \?ELS5 + EQUAL? MENHIR-POSITION,FALSE-VALUE \?ELS8 + PRINTI "One particularly large menhir, at least twenty feet tall and eight feet thick, is leaning against the wall blocking a dark opening leading southwest. On this side of the menhir is carved an ornate letter ""F""." + CRLF + JUMP ?CND6 +?ELS8: EQUAL? MENHIR-POSITION,1 \?ELS12 + PRINTI "There is a huge menhir lying on the floor near a southwest passage." + CRLF + JUMP ?CND6 +?ELS12: EQUAL? MENHIR-POSITION,2 \?ELS16 + PRINTI "A dark opening leads southwest." + CRLF + JUMP ?CND6 +?ELS16: EQUAL? MENHIR-POSITION,3 \?ELS20 + PRINTI "There is a huge menhir here." + CRLF + JUMP ?CND6 +?ELS20: PRINTI "There is a huge menhir floating like a feather in midair here. A passage to the southwest opens beneath it." + CRLF +?CND6: EQUAL? HERE,MUNGED-ROOM \TRUE + PRINTR "The explosion appears to have had no effect on the menhir." +?ELS5: PRINTR "A dark opening leads southwest." + + + .FUNCT MENHIR-FCN + EQUAL? PRSA,V?LOOK-BEHIND,V?LOOK-UNDER \?ELS5 + ZERO? MENHIR-POSITION /?ELS10 + PRINTR "Behind the menhir is some air and then a wall." +?ELS10: PRINTR "The gap between the menhir and the wall is very narrow, but it is clear that there is a sizeable room in there. Your light only reveals a part of the far wall." +?ELS5: EQUAL? PRSA,V?TURN,V?MOVE,V?TAKE \?ELS19 + PRINTR "The menhir weighs many tons and is eight feet wide. You can't even get a grip on it, much less move it." +?ELS19: EQUAL? PRSA,V?READ \?ELS23 + PRINTR """F""" +?ELS23: EQUAL? PRSA,V?EXAMINE \?ELS27 + PRINTR "It is nicely finished, and the letter ""F"" on it is particularly well carved." +?ELS27: EQUAL? PRSA,V?ENCHANT \?ELS31 + EQUAL? SPELL-USED,W?FLOAT \?ELS31 + PRINTI "The menhir floats majestically into the air, rising about ten feet. The passage beneath it beckons invitingly." + CRLF + SET 'MENHIR-POSITION,3 + RETURN MENHIR-POSITION +?ELS31: EQUAL? PRSA,V?DISENCHANT \FALSE + EQUAL? SPELL-USED,W?FLOAT \FALSE + SET 'MENHIR-POSITION,FALSE-VALUE + EQUAL? HERE,MENHIR-ROOM,KENNEL \FALSE + PRINTR "The menhir sinks to the ground." + + + .FUNCT DOOR-KEEPER-FCN + EQUAL? PRSA,V?ALARM \?ELS5 + ZERO? GUARDIAN-FED /?ELS5 + PRINTR "Try as you may, you can't wake it." +?ELS5: EQUAL? PRSA,V?GIVE \?ELS11 + EQUAL? PRSI,DOOR-KEEPER \?ELS11 + ZERO? GUARDIAN-FED /?ELS18 + PRINTR "He is asleep, at least for the moment." +?ELS18: EQUAL? PRSO,CANDY \?ELS23 + SET 'GUARDIAN-FED,TRUE-VALUE + REMOVE CANDY + PRINTR "The guardian greedily wolfs down the candy, including the package. (It seemed to enjoy the grasshoppers particularly.) It then becomes quiet and its eyes close. (Lizards are known to sleep a long time while digesting their meals.)" +?ELS23: EQUAL? PRSO,FLASK \?ELS27 + PRINTR "The lizard sniffs it experimentally, then looks at you angrily, hissing and snapping." +?ELS27: CALL BOMB?,PRSO + ZERO? STACK /?ELS31 + REMOVE PRSO + PRINTR "The guardian greedily wolfs it down. After a while, you hear a very small pop and the guardian's eyes bulge out. It hisses nastily at you." +?ELS31: EQUAL? PRSO,PALANTIR-1,PALANTIR-2,PALANTIR-3 \?ELS35 + PRINTI "The guardian greedily gobbles the sphere, but finds it unchewable. He then tries repeatedly to swallow it whole, with disappointing results. Finally, he spits it on the ground." + CRLF + MOVE PRSO,HERE + RTRUE +?ELS35: REMOVE PRSO + PRINTI "The lizard wolfs down the " + PRINTD PRSO + PRINTR ", crunching greedily." +?ELS11: EQUAL? PRSA,V?MUNG,V?ATTACK \FALSE + PRINTR "The guardian seems impervious to your attack. In fact, your blows don't even seem to be landing." + + + .FUNCT WIZ-DOOR-FCN + ZERO? GUARDIAN-FED \?ELS5 + EQUAL? PRSA,V?OPEN \?ELS10 + PRINTR "The lizard comes to life and snaps at you as you reach for the handle." +?ELS10: EQUAL? PRSA,V?UNLOCK \FALSE + PRINTI "The lizard door keeper comes awake and bites at your hand. You jerk away just in time." + EQUAL? PRSI,GOLD-KEY \?ELS21 + RANDOM 100 + GRTR? 5,STACK \?ELS21 + REMOVE GOLD-KEY + PRINTR " The guardian does get the key, though. It grins maniacally." +?ELS21: RANDOM 100 + GRTR? 20,STACK \?ELS27 + MOVE GOLD-KEY,HERE + PRINTR " You drop the key, though." +?ELS27: CRLF + RTRUE +?ELS5: EQUAL? PRSA,V?UNLOCK \?ELS33 + ZERO? WIZ-DOOR-FLAG /?ELS38 + PRINTR "It is already!" +?ELS38: EQUAL? PRSI,GOLD-KEY \?ELS43 + SET 'WIZ-DOOR-FLAG,TRUE-VALUE + PRINTR "The key turns and the bolt clicks. The door is unlocked." +?ELS43: SET 'WIZ-DOOR-FLAG,FALSE-VALUE + PRINTR "That won't unlock it." +?ELS33: EQUAL? PRSA,V?LOCK \?ELS51 + ZERO? WIZ-DOOR-FLAG \?ELS56 + PRINTR "It is locked already." +?ELS56: EQUAL? PRSI,GOLD-KEY \?ELS60 + PRINTI "The door is now locked." + CRLF + SET 'WIZ-DOOR-FLAG,FALSE-VALUE + RTRUE +?ELS60: PRINTR "That won't lock it." +?ELS51: EQUAL? PRSA,V?CLOSE,V?OPEN \FALSE + ZERO? WIZ-DOOR-FLAG /?ELS73 + CALL OPEN-CLOSE,PRSO,STR?287,STR?288 + RSTACK +?ELS73: EQUAL? PRSA,V?OPEN \FALSE + PRINTR "The door is locked!" + + + .FUNCT GUARDIAN-ROOM-FCN,RARG + EQUAL? RARG,M-LOOK \FALSE + PRINTI "This room is cobwebby and musty, but tracks in the dust show that it has seen visitors recently. At the south end of the room is a stained and battered (but very strong-looking) door. To the north, a corridor exits." + CRLF + FSET? WIZ-DOOR,OPENBIT \?CND8 + PRINTI "The door is open." + CRLF +?CND8: ZERO? GUARDIAN-FED \?ELS17 + PRINTI "Imbedded in the door is a nasty-looking lizard head, with sharp teeth and beady eyes. " + IN? CANDY,WINNER \?ELS24 + PRINTR "The lizard is sniffing at you." +?ELS24: PRINTR "The eyes move to watch you approach." +?ELS17: PRINTR "A sleepy-looking lizard head is mounted on the door." + + + .FUNCT WORKSHOP-FCN,RARG + EQUAL? RARG,M-LOOK \FALSE + PRINTI "You are standing in the entry hall of the Wizard's Workshop. Dark corridors lead west and south from here. The corridor to the west smells slightly of incense or candle smoke." + FSET? WIZ-DOOR,OPENBIT \?CND8 + PRINTI " The workshop door is open." +?CND8: CRLF + RTRUE + + + .FUNCT ARCANA-PSEUDO + EQUAL? PRSA,V?TAKE \FALSE + PRINTR "The stuff on the bench appears to be so much junk, and you decide that it would only get in your way if you took it." + + + .FUNCT TROPHY-PSEUDO + EQUAL? PRSA,V?READ /FALSE + EQUAL? PRSA,V?RUB,V?TAKE \FALSE + PRINTR "As your fingers near it, you get a nasty shock (but fortunately not a fatal one)." + + + .FUNCT STAND-FCN + EQUAL? PRSA,V?TAKE \?ELS5 + PRINTI "The " + PRINTD PRSO + PRINTR " is firmly attached to the bench." +?ELS5: EQUAL? PRSA,V?PUT-ON,V?PUT \FALSE + EQUAL? PRSO,PALANTIR-1,PALANTIR-2,PALANTIR-3 \FALSE + EQUAL? PRSI,STAND-1,STAND-2,STAND-3 \FALSE + CALL V-PUT + IN? PALANTIR-1,STAND-1 \TRUE + IN? PALANTIR-2,STAND-2 \TRUE + IN? PALANTIR-3,STAND-3 \TRUE + REMOVE PALANTIR-1 + REMOVE PALANTIR-2 + REMOVE PALANTIR-3 + MOVE STAND-4,WORKBENCH + PRINTI "As you place the " + PRINTD PRSO + PRINTI " in the " + PRINTD PRSI + PRINTI ", a low humming noise begins, and you can feel the hairs on the back of your neck begin to stand up. The three spheres begin to vibrate, faster and faster, as the noise becomes higher and higher pitched. Three puffs of smoke, one red, one blue, one white, rise up from empty stands. The spheres are gone! But in the center of the triangle formed by the stands is now a black stand of obsidian in which rests a strange black sphere." + CRLF + RTRUE + + + .FUNCT IN-AQUARIUM-FCN,RARG + EQUAL? RARG,M-LOOK \?ELS5 + PRINTI "There is a sandy floor here, and your vision seems murky and blurred. The wall you are looking at is nicely dressed stone." + CRLF + IN? SERPENT,AQUARIUM \TRUE + RANDOM 100 + GRTR? 25,STACK \?ELS13 + PRINTR "While you watch a shadow seems to pass overhead." +?ELS13: RANDOM 100 + GRTR? 5,STACK \TRUE + PRINTI "The head of some horrible serpent pokes into view, its beady green eyes almost seeming to see you." + CRLF + RTRUE +?ELS5: EQUAL? RARG,M-ENTER \FALSE + IN? SERPENT,AQUARIUM \?ELS26 + CALL JIGS-UP,STR?289 + RSTACK +?ELS26: CALL JIGS-UP,STR?290 + RSTACK + + + .FUNCT AQUARIUM-FCN,OBJ + EQUAL? PRSA,V?THROUGH,V?BOARD \?ELS5 + CALL DO-WALK,P?IN + RTRUE +?ELS5: EQUAL? PRSA,V?LOOK-INSIDE \?ELS7 + IN? SERPENT,AQUARIUM \?ELS7 + PRINTR "In the aquarium is a baby sea-serpent who eyes you suspiciously. His scaly body writhes about in the huge tank." +?ELS7: EQUAL? PRSA,V?ATTACK,V?MUNG \?ELS17 + EQUAL? PRSO,AQUARIUM /?THN14 +?ELS17: EQUAL? PRSA,V?THROW \FALSE + EQUAL? PRSI,AQUARIUM \FALSE +?THN14: EQUAL? PRSO,AQUARIUM \?ELS22 + ZERO? PRSI /FALSE + SET 'OBJ,PRSI + JUMP ?CND20 +?ELS22: SET 'OBJ,PRSO +?CND20: MOVE OBJ,HERE + IN? DEAD-SERPENT,HERE \?ELS34 + PRINTR "The aquarium is already broken!" +?ELS34: EQUAL? OBJ,FLASK \?ELS38 + CALL JIGS-UP,STR?291 + RTRUE +?ELS38: CALL BOMB?,OBJ + ZERO? STACK /?ELS40 + CALL INT,I-FUSE + PUT STACK,0,0 + RTRUE +?ELS40: FSET? OBJ,WEAPONBIT /?THN43 + GETP OBJ,P?SIZE + GRTR? STACK,10 \?ELS42 +?THN43: REMOVE SERPENT + MOVE PALANTIR-3,AQUARIUM + FCLEAR PALANTIR-3,NDESCBIT + PUTP AQUARIUM,P?LDESC,STR?292 + MOVE DEAD-SERPENT,HERE + PRINTI "The " + PRINTD OBJ + PRINTI " shatters the glass wall of the aquarium, spilling out an impressive amount of salt water and wet sand. It also spills out an extremely annoyed sea serpent who bites angrily at the " + PRINTD OBJ + PRINTI ", and then at you. He is having difficulty breathing, and he seems to hold you responsible for his current problem." + EQUAL? PRSA,V?MUNG \?ELS51 + PRINTI " He manages to rend you limb from limb before he drowns in the air." + CRLF + CALL JIGS-UP,STR?293 + RSTACK +?ELS51: PRINTR " He tries to slither across the stone floor towards you. Fortunately, he expires mere inches away from biting off your foot. A clear crystal sphere sits amid the sand and broken glass on the bottom of the aquarium." +?ELS42: PRINTI "The " + PRINTD OBJ + PRINTR " bounces harmlessly off the glass." + + + .FUNCT SERPENT-FCN + EQUAL? SERPENT,WINNER \?ELS5 + PRINTR "The serpent only stares hungrily at you." +?ELS5: EQUAL? PRSA,V?MUNG,V?ATTACK \?ELS9 + PRINTR "He swims towards you with a powerful stroke of his flippers, dagger-like teeth dripping. Fortunately, he doesn't want to crash into the aquarium wall, and contents himself with splashing you with water." +?ELS9: EQUAL? PRSA,V?PUT \?ELS13 + EQUAL? PRSO,SERPENT \?ELS13 + PRINTR "Impossible for many reasons." +?ELS13: EQUAL? PRSA,V?GIVE,V?TAKE \FALSE + CALL JIGS-UP,STR?294 + RSTACK + + + .FUNCT DEAD-SERPENT-FCN + EQUAL? PRSA,V?TAKE \FALSE + PRINTR "This may only be a baby sea serpent, but it's as big as a small whale." + + + .FUNCT GENIE-FCN,RARG=M-OBJECT,V,HOARD + EQUAL? PRSA,V?HELLO \?ELS5 + PRINTR "The genie grins demonically, but says nothing." +?ELS5: EQUAL? WINNER,GENIE \?ELS9 + ZERO? GENIE-READY? \?ELS14 + PRINTI """My fee is not paid! I perform no tasks for free! We demons have a strong union these days.""" + CRLF + RETURN 2 +?ELS14: EQUAL? PRSA,V?SGIVE /FALSE + GET P-PRSO,0 + GRTR? STACK,1 /?THN23 + GET P-PRSI,0 + GRTR? STACK,1 \?ELS22 +?THN23: PRINTI """I will do one thing only, oh gracious master!""" + CRLF + RETURN 2 +?ELS22: EQUAL? PRSA,V?MOVE \?ELS30 + EQUAL? PRSO,GLOBAL-MENHIR \?ELS30 + SET 'MENHIR-POSITION,1 + PRINTI "The demon is gone for a moment. ""A trifle... My little finger alone was enough.""" + CRLF + CALL GENIE-LEAVES + RSTACK +?ELS30: EQUAL? PRSA,V?TAKE \?ELS36 + EQUAL? PRSO,GLOBAL-MENHIR \?ELS41 + REMOVE MENHIR + SET 'MENHIR-POSITION,2 + PRINTI "The demon flashes away for a second. ""I have little use for such a thing, but perhaps as a doorstop...""" + CRLF + CALL GENIE-LEAVES + RSTACK +?ELS41: EQUAL? PRSO,WAND \?ELS45 + PRINTI """This I do gladly, oh fool!"" cackles the demon gleefully. He stretches out an enormous hand towards the wand and taking it like a toothpick (this is a large demon), points it at himself. ""Free!"" he commands, and the demon and his wand vanish forever." + CRLF + CALL GENIE-LEAVES,FALSE-VALUE + REMOVE WAND + RTRUE +?ELS45: FSET? PRSO,TAKEBIT \?ELS49 + CALL GENIE-LEAVES,FALSE-VALUE + REMOVE PRSO + PRINTI "The demon snaps his fingers, the " + PRINTD PRSO + PRINTR " spins wildly in the air in front of him, then he and it depart." +?ELS49: PRINTR """I fear that I cannot take such a thing.""" +?ELS36: EQUAL? PRSA,V?GIVE \?ELS57 + EQUAL? PRSI,ME \?ELS57 + EQUAL? PRSO,WAND \?ELS64 + PRINTI """I hear and obey!"" says the demon. He stretches out an enormous hand towards the wand. The Wizard is unsure what to do, pointing it threateningly at the demon, then at you. ""Fudge!"" he cries, but aside from a strong odor of chocolate in the air, there is no effect. The demon plucks the wand out of his hand (it's about toothpick-size to him) and gingerly lays it before you. He fades into the smoke, which disperses. The wizard runs from the room in terror." + CRLF + REMOVE WIZARD + CALL GENIE-LEAVES,FALSE-VALUE + FCLEAR WAND,NDESCBIT + MOVE WAND,HERE + RTRUE +?ELS64: EQUAL? PRSO,GLOBAL-MENHIR \?ELS68 + MOVE MENHIR,PENTAGRAM-ROOM + FCLEAR MENHIR,NDESCBIT + FCLEAR MENHIR,TAKEBIT + SET 'MENHIR-POSITION,3 + PRINTI "He waves his hands, and the menhir drops softly at your feet." + CRLF + CALL GENIE-LEAVES + RSTACK +?ELS68: FSET? PRSO,TAKEBIT \?ELS72 + MOVE PRSO,PENTAGRAM-ROOM + PRINTI "The " + PRINTD PRSO + PRINTI " appears before you and settles to the ground." + CRLF + CALL GENIE-LEAVES + RSTACK +?ELS72: PRINTR """Were it possible, this would be my fondest wish, but alas...""" +?ELS57: EQUAL? PRSA,V?ATTACK \?ELS80 + EQUAL? PRSO,GLOBAL-CERBERUS \?ELS85 + PRINTR """This may prove taxing, but we'll see. Perhaps I'll tame him for a pup instead."" The demon disappears for an instant, then reappears. He looks rather gnawed and scratched. He winces. ""Too much for me. Puppy dog, indeed. You're welcome to him. Never did like dogs anyway... Any other orders, oh beneficent one?""" +?ELS85: EQUAL? PRSO,WIZARD \?ELS89 + PRINTI "The demon grins hideously. ""This has been my desire e'er since this charlatan bent me to his service. I perform this deed with pleasure!"" The demon forms himself back into a cloud of greasy smoke. The cloud envelops the Wizard, who waves his wand fruitlessly, mumbling various phrases which begin with ""F"". A horrible scream is heard, and the smoke begins to clear. Nothing remains of the Wizard but his wand." + CRLF + REMOVE WIZARD + FCLEAR WAND,NDESCBIT + MOVE WAND,HERE + CALL GENIE-LEAVES + RSTACK +?ELS89: EQUAL? PRSO,ME \?ELS93 + CALL GENIE-LEAVES,FALSE-VALUE + SET 'WINNER,ADVENTURER + CALL JIGS-UP,STR?295 + RSTACK +?ELS93: PRINTI """I know no way to kill a " + PRINTD PRSO + PRINTR ".""" +?ELS80: EQUAL? PRSA,V?EXAMINE,V?FIND \?ELS99 + PRINTI """I am not permitted to " + EQUAL? PRSA,V?FIND \?ELS104 + PRINTI "answer questions" + JUMP ?CND102 +?ELS104: PRINTI "perform such menial tasks" +?CND102: PRINTR ". The terms of my contract are explicit on this matter, learned one. Surely you would not wish to violate my contract?"" He licks his lips with a forked tongue like a snake's. ""The penalty clauses are ... hmm ... devilish.""" +?ELS99: PRINTR """Apologies, oh master, but even for such a one as I this is not possible."" He seems somewhat chagrined to have to admit this." +?ELS9: EQUAL? PRSA,V?MUNG,V?ATTACK,V?EXORCISE \?ELS118 + PRINTR "The demon laughs uproariously." +?ELS118: EQUAL? PRSA,V?GIVE \FALSE + EQUAL? PRSI,GENIE \FALSE + EQUAL? PRSO,IRON-BOX \?CND125 + IN? VIOLIN,PRSO \?CND125 + PRINTI "The genie frowns briefly, then " + FSET? PRSO,OPENBIT \?ELS134 + PRINTI "looks inside" + JUMP ?CND132 +?ELS134: PRINTI "opens" +?CND132: PRINTI " the box. He smiles horribly." + CRLF + CALL REMOVE-CAREFULLY,IRON-BOX + SET 'PRSO,VIOLIN +?CND125: GETPT PRSO,P?VALUE + ZERO? STACK /?ELS147 + EQUAL? PRSO,SWORD /?ELS147 + CALL REMOVE-CAREFULLY,PRSO + INC 'GENIE-HOARD + CALL SCORE-UPD,2 + CALL CASE-WORTH + ADD GENIE-HOARD,STACK >HOARD + LESS? HOARD,TREASURES-MAX /?ELS154 + SET 'GENIE-READY?,TRUE-VALUE + PUTP WIZARD,P?LDESC,STR?296 + PRINTR """This will do for my fee. 'Tis a paltry hoard, but as you have done me a small service by loosing me from this wizard, it will suffice.""" +?ELS154: PRINTI """" + GET GENIE-THANKS,HOARD + PRINT STACK + PRINTI """" + CRLF + EQUAL? HOARD,8 \TRUE + PRINTR "The Wizard looks at you as if you are a madman. He tears his beard and stares at you fearfully." +?ELS147: CALL BOMB?,PRSO + ZERO? STACK /?ELS167 + CALL GENIE-LEAVES,FALSE-VALUE + PRINTR """I fear that this violates my contract, oh foolish one. Thus, I am free to depart.""" +?ELS167: CALL REMOVE-CAREFULLY,PRSO + PRINTI "The demon gladly takes the " + PRINTD PRSO + PRINTR " and smiles balefully, revealing enormous fangs." + + + .FUNCT GENIE-LEAVES,NOISY?=1 + FSET GENIE,INVISIBLE + ZERO? NOISY? /?CND1 + PRINTI "The genie departs, his agreement fulfilled." + CRLF +?CND1: SET 'P-CONT,FALSE-VALUE + RETURN 2 + + + .FUNCT CASE-WORTH,F,W=0 + FIRST? WIZARD-CASE >F /?KLU9 +?KLU9: +?PRG1: ZERO? F \?CND3 + RETURN W +?CND3: GETPT F,P?VALUE + ZERO? STACK /?CND6 + INC 'W +?CND6: NEXT? F >F /?KLU10 +?KLU10: JUMP ?PRG1 + + + .FUNCT PENTAGRAM-FCN,RARG=M-BEG + EQUAL? RARG,M-BEG \FALSE + EQUAL? PRSA,V?BOARD,V?THROUGH \?ELS10 + PRINTR "You try to enter the pentagram, but are forced back by an invisible power." +?ELS10: EQUAL? PRSA,V?PUT-ON,V?PUT \FALSE + EQUAL? PRSO,PALANTIR-4 \FALSE + REMOVE PALANTIR-4 + FCLEAR GENIE,INVISIBLE + MOVE GENIE,PENTAGRAM-ROOM + PRINTR "A cold wind blows outward from the sphere. The candles flicker, and a low moan, almost inaudible, is heard. It rises in volume and pitch until it becomes a high-pitched keening. A dim shape becomes visible in the air above the sphere. The shape resolves into a large and somewhat formidable looking demon. He looks around, tests the walls of the pentagram experimentally, then sees you! ""Hmm, a new master..."" he says under his breath. ""Greetings, oh master! Wouldst desire a service, as our contract stateth? For some pittance of wealth, some trifle, I will gratify thy desires to the utmost limit of my powers, and they are not inconsiderable."" He makes a pass with his massive arms and the walls begin to shake a little. Another pass and the shaking stops. ""A nice effect... I find it makes for a better relationship to give such a demonstration early on."" He grins vilely." + + + .FUNCT WIZARD-FCN,RARG=M-OBJECT,OLIT + EQUAL? WINNER,WIZARD \?ELS5 + EQUAL? PRSA,V?GIVE \?ELS10 + PRINTR "The Wizard replies ""Foolishment!""" +?ELS10: PRINTR "The Wizard considers your statement carefully. His expression indicates he regards it as fanciful." +?ELS5: EQUAL? PRSA,V?GIVE \?ELS18 + EQUAL? PRSI,WIZARD \?ELS18 + SET 'OLIT,LIT + CALL REMOVE-CAREFULLY,PRSO + CALL BOMB?,PRSO + ZERO? STACK /?ELS25 + IN? GENIE,PENTAGRAM-ROOM \?ELS30 + MOVE PRSO,HERE + PRINTR "The wizard accepts this final folly resignedly." +?ELS30: REMOVE WIZARD + PRINTR """Hmm..."" The Wizard mutters something, then waves his wand over the bomb. It transforms into a bouquet of flowers. Both Wizard and flowers disappear." +?ELS25: ZERO? OLIT /?ELS38 + ZERO? LIT \?ELS38 + PRINTI """Thank you."" As the Wizard places the " + PRINTD PRSO + PRINTR " under his robe, the room becomes dark." +?ELS38: PRINTR """Thank you.""" +?ELS18: CALL HELLO?,WIZARD + ZERO? STACK /?ELS48 + PRINTR "The Wizard seems surprised, much as you might be if a dog talked." +?ELS48: EQUAL? PRSA,V?MUNG,V?ATTACK \FALSE + REMOVE WIZARD + IN? WAND,WIZARD \?ELS55 + PRINTI "The Wizard retreats, waving his wand and chanting. He says ""Fear!"" " + JUMP ?CND53 +?ELS55: PRINTI "The Wizard tries to cast the ""Fear!"" spell, but without his wand! " +?CND53: FSET? GENIE,INVISIBLE /?ELS66 + PRINTR "Nothing happens! With a terrified glance at the demon, the wizard runs past you and out of the room." +?ELS66: PRINTI "You are suddenly terrified. The Wizard seems huge and terrible, looming over you. You flee, terrified. He chuckles, snaps his fingers, and disappears." + CRLF + CRLF + SET 'SPELL?,S-FEAR + PUTP ADVENTURER,P?ACTION,MAGIC-ACTOR + CALL QUEUE,I-WIZARD,10 + PUT STACK,0,1 + CALL RANDOM-WALK + RSTACK + + + .FUNCT I-WIZARD,CAST-PROB,PCNT=0,F,WLOC + LOC WINNER >WLOC + CALL QUEUE,I-WIZARD,4 + PUT STACK,0,1 + ZERO? DEAD \FALSE + ZERO? SPELL? /?CND1 + EQUAL? SPELL?,S-FLOAT \?ELS10 + EQUAL? HERE,WELL-TOP \?ELS13 + CALL JIGS-UP,STR?306 + RTRUE +?ELS13: FSET? HERE,NONLANDBIT \?CND8 + EQUAL? HERE,WELL-BOTTOM,VOLCANO-BOTTOM /?CND8 + CALL JIGS-UP,STR?307 + RTRUE +?ELS10: EQUAL? SPELL?,S-FEEBLE \?ELS19 + SET 'LOAD-ALLOWED,LOAD-MAX + JUMP ?CND8 +?ELS19: EQUAL? SPELL?,S-FIERCE \?ELS21 + SET 'SWORD-GLOW,0 + JUMP ?CND8 +?ELS21: EQUAL? SPELL?,S-FUMBLE \?CND8 + SET 'FUMBLE-NUMBER,7 + SET 'FUMBLE-PROB,8 +?CND8: GET SPELL-STOPS,SPELL? + ZERO? STACK /?CND24 + GET SPELL-STOPS,SPELL? + PRINT STACK + CRLF +?CND24: PUTP ADVENTURER,P?ACTION,0 + SET 'SPELL?,FALSE-VALUE + RTRUE +?CND1: IN? GENIE,PENTAGRAM-ROOM \?CND29 + CALL INT,I-WIZARD + PUT STACK,0,0 + IN? WIZARD,PENTAGRAM-ROOM /TRUE + MOVE WIZARD,PENTAGRAM-ROOM + IN? WINNER,PENTAGRAM-ROOM \TRUE + PRINTI "Suddenly the Wizard materializes in the room. He is astonished by what he sees: his servant in deep conversation with a common adventurer! He draws forth his wand, waves it frantically, and incants ""Frobizz! Frobozzle! Frobnoid!"" The demon laughs heartily. ""You no longer control the Black Crystal, hedge-wizard! Your wand is powerless! Your doom is sealed!"" The demon turns to you, expectantly." + CRLF + RTRUE +?CND29: ZERO? LIT \?CND40 + FSET? LAMP,RMUNGBIT \?CND40 + GRTR? SCORE,200 \?CND40 + SET 'ALWAYS-LIT,TRUE-VALUE + SET 'LIT,TRUE-VALUE + PRINTR "In the darkness you hear the voice of the Wizard. ""Dear me, you seem to have gotten into quite a pickle."" He chuckles. ""Fluoresce!"" he incants. It is no longer dark." +?CND40: LOC WIZARD + ZERO? STACK /?CND47 + RANDOM 100 + GRTR? 80,STACK \?CND47 + ZERO? LIT /?CND52 + IN? WIZARD,HERE \?CND52 + PRINTI "The Wizard vanishes." + CRLF +?CND52: REMOVE WIZARD + RTRUE +?CND47: RANDOM 100 + GRTR? 10,STACK \FALSE + ZERO? LIT \?ELS66 + PRINTI "You feel a slight outrush of air as something moves nearby." + CRLF + JUMP ?CND64 +?ELS66: EQUAL? HERE,POSTS-ROOM,POOL-ROOM \?ELS70 + PRINTI "A huge and terrible wizard appears before you, as large as the largest tree! He looks down on you as you would look upon a gnat!" + CRLF + JUMP ?CND64 +?ELS70: FSET? HERE,NONLANDBIT \?ELS74 + PRINTI "The Wizard appears, floating nonchalantly in the air beside you. He grins sideways at you." + CRLF + JUMP ?CND64 +?ELS74: PRINTI "A strange little man in a long cloak appears suddenly in the room. He is wearing a high pointed hat embroidered with astrological signs. He has a long, stringy, and unkempt beard." + CRLF +?CND64: IN? PALANTIR-4,ADVENTURER \?ELS83 + ZERO? LIT /?ELS86 + PRINTI "The Wizard notices that you carry the Black Crystal, and with an unseemly haste, he disappears." + CRLF + JUMP ?CND84 +?ELS86: PRINTI "You feel a sudden inrush of air as though something disappeared." + CRLF +?CND84: REMOVE WIZARD + RTRUE +?ELS83: RANDOM 100 + GRTR? 20,STACK \?CND81 + ZERO? LIT /?ELS98 + PRINTI "He mutters something (muffled by his beard) and disappears as suddenly as he came." + CRLF + JUMP ?CND96 +?ELS98: PRINTI "You hear low, confused muttering." + CRLF +?CND96: REMOVE WIZARD + RTRUE +?CND81: IN? PALANTIR-1,ADVENTURER \?CND106 + INC 'PCNT +?CND106: IN? PALANTIR-2,ADVENTURER \?CND109 + INC 'PCNT +?CND109: IN? PALANTIR-3,ADVENTURER \?CND112 + INC 'PCNT +?CND112: MUL PCNT,20 + SUB 80,STACK >CAST-PROB + ZERO? LIT /?ELS117 + PRINTI "The Wizard draws forth his wand and waves it in your direction. It begins to glow with a faint blue glow." + CRLF + JUMP ?CND115 +?ELS117: PRINTI "Suddenly, illuminated by the faint blue glow of a magic wand pointed in your direction, you see the Wizard!" + CRLF +?CND115: RANDOM 100 + GRTR? CAST-PROB,STACK \?ELS129 + MOVE WIZARD,HERE + RANDOM SPELLS >SPELL? + PUTP ADVENTURER,P?ACTION,MAGIC-ACTOR + MUL 5,PCNT + SUB 30,STACK + RANDOM STACK + ADD 5,STACK + CALL QUEUE,I-WIZARD,STACK + PUT STACK,0,1 + RANDOM 100 + GRTR? 75,STACK \?ELS132 + PRINTI "The Wizard, in a deep and resonant voice, speaks the word """ + GET SPELL-NAMES,SPELL? + PRINT STACK + PRINTI "!"" He then vanishes, cackling gleefully." + CRLF + JUMP ?CND130 +?ELS132: PRINTI "The Wizard, almost inaudibly, whispers a word beginning with ""F,"" and then disappears, chuckling nastily." + CRLF +?CND130: REMOVE WIZARD + GET SPELL-HINTS,SPELL? + ZERO? STACK /?CND139 + GET SPELL-HINTS,SPELL? + PRINT STACK + CRLF +?CND139: EQUAL? SPELL?,S-FALL \?ELS146 + FSET? WLOC,VEHBIT \TRUE + PRINTI "You suddenly fall headlong out of the " + PRINTD WLOC + PRINTI " as though someone had flipped it over." + CRLF + EQUAL? HERE,WELL-TOP \?ELS154 + CALL JIGS-UP,STR?308 + RTRUE +?ELS154: FSET? HERE,NONLANDBIT \?ELS156 + EQUAL? HERE,VOLCANO-BOTTOM,WELL-BOTTOM /?ELS156 + CALL JIGS-UP,STR?309 + RTRUE +?ELS156: MOVE WINNER,HERE + RTRUE +?ELS146: EQUAL? SPELL?,S-FLOAT \?ELS162 + FSET? WLOC,VEHBIT \?ELS165 + PRINTI " You rise majestically out of the " + PRINTD WLOC + PRINTI ", coming to a stop about five feet above it and to one side." + CRLF + MOVE WINNER,HERE + RTRUE +?ELS165: PRINTR "Slowly, you and all your belongings rise into the air, stopping after about five feet." +?ELS162: EQUAL? SPELL?,S-FEEBLE \?ELS173 + SET 'LOAD-ALLOWED,50 + FIRST? WINNER >F \TRUE + PRINTI "In fact, you feel so weak that you drop the " + PRINTD F + PRINTI "." + CRLF + MOVE F,WLOC + RTRUE +?ELS173: EQUAL? SPELL?,S-FEAR \?ELS180 + FSET? WLOC,VEHBIT \?ELS183 + PRINTI "You cower in the corner of the " + PRINTD WLOC + PRINTR ", hoping the wizard won't see you." +?ELS183: CRLF + CALL RANDOM-WALK + RTRUE +?ELS180: EQUAL? SPELL?,S-FUMBLE \?ELS189 + SET 'FUMBLE-NUMBER,3 + SET 'FUMBLE-PROB,25 + FIRST? ADVENTURER >F \TRUE + PRINTI "Ooops! You dropped the " + PRINTD F + PRINTI "." + CRLF + MOVE F,WLOC + RTRUE +?ELS189: EQUAL? SPELL?,S-FILCH \?ELS196 + CALL ROB,WINNER,WIZARD-CASE + ZERO? STACK /TRUE + PRINTR "Something you are carrying has disappeared!" +?ELS196: EQUAL? SPELL?,S-FIERCE \TRUE + PRINTR "The Wizard mumbles something under his breath, and just before you reach him, he vanishes." +?ELS129: RANDOM 100 + GRTR? 50,STACK \?ELS207 + REMOVE WIZARD + PRINTR "There is a loud crackling noise. Blue smoke rises from out of the Wizard's sleeve. He sighs and disappears." +?ELS207: RANDOM 100 + GRTR? 50,STACK \?ELS211 + REMOVE WIZARD + PRINTI "The Wizard incants """ + CALL RANDOM-ELEMENT,SPELL-NAMES + PRINT STACK + PRINTR "!"" but nothing happens. He shakes the wand. Nothing happens. With a slightly embarrassed glance in your direction, he vanishes." +?ELS211: MOVE WIZARD,HERE + PRINTR "The Wizard seems about to say something, but thinks better of it, and peers at you from under his bushy eyebrows." + + + .FUNCT ROB,WHO,WHERE,N,X,ROBBED?=0 + FIRST? WHO >X /?KLU9 +?KLU9: +?PRG1: ZERO? X \?CND3 + RETURN ROBBED? +?CND3: NEXT? X >N /?KLU10 +?KLU10: CALL RIPOFF,X,WHERE + ZERO? STACK /?CND6 + SET 'ROBBED?,TRUE-VALUE +?CND6: SET 'X,N + JUMP ?PRG1 + + + .FUNCT RIPOFF,X,WHERE + FSET? X,INVISIBLE /FALSE + GETPT X,P?VALUE + ZERO? STACK /FALSE + EQUAL? X,PALANTIR-1 /FALSE + EQUAL? X,PALANTIR-2 /FALSE + EQUAL? X,PALANTIR-3 /FALSE + EQUAL? X,GOLD-KEY /FALSE + EQUAL? X,CANDY /FALSE + MOVE X,WHERE + FSET X,TOUCHBIT + RTRUE + + + .FUNCT WIZARD-CASE-FCN + EQUAL? WINNER,GENIE \?ELS5 + EQUAL? PRSA,V?OPEN,V?MUNG \FALSE + REMOVE WIZARD-CASE + MOVE BROKEN-CASE,TROPHY-ROOM + PRINTR "The demon smashes the case into smithereens. Everything in it smashes as well." +?ELS5: EQUAL? PRSA,V?ENCHANT \?ELS14 + EQUAL? SPELL-USED,W?FILCH \?ELS14 + CALL ROB,WIZARD-CASE,HERE + SET 'SPELL-HANDLED?,TRUE-VALUE + PRINTR "The contents of the case are arrayed at your feet." +?ELS14: EQUAL? PRSA,V?CLOSE,V?MUNG,V?OPEN /?THN21 + EQUAL? PRSA,V?TAKE \FALSE +?THN21: PRINTR "The case is protected by a fearful spell. You cannot touch it in any way." + + + .FUNCT WAND-FCN + EQUAL? PRSA,V?GIVE,V?PUT,V?TAKE \?ELS5 + IN? WAND,WIZARD \?ELS5 + EQUAL? WINNER,ADVENTURER \?ELS12 + PRINTR "The Wizard snatches it away." +?ELS12: EQUAL? WINNER,ROBOT \FALSE + CALL JIGS-UP,STR?333 + RSTACK +?ELS5: EQUAL? PRSA,V?WAVE \?ELS18 + EQUAL? PRSI,GRUE \?ELS18 + PRINTR "There is no grue in sight, but a hissing sound issues forth from the darkness." +?ELS18: EQUAL? PRSA,V?RAISE,V?RUB,V?WAVE \FALSE + EQUAL? PRSO,WAND \?ELS27 + IN? WAND,WINNER /?ELS27 + PRINTR "You don't have the wand!" +?ELS27: ZERO? WAND-ON \?THN34 + ZERO? SPELL-USED \?THN34 + ZERO? SPELL-VICTIM /?ELS33 +?THN34: RANDOM 100 + GRTR? 5,STACK \?ELS38 + CALL JIGS-UP,STR?334 + RTRUE +?ELS38: PRINTR "A lot you know about magic! A magic wand takes a while to recharge after use! You might cause it to short-circuit!" +?ELS33: EQUAL? PRSA,V?WAVE \?ELS44 + EQUAL? PRSO,WAND \?ELS47 + ZERO? PRSI /?ELS47 + SET 'WAND-ON,PRSI + SET 'WAND-ON-LOC,HERE + JUMP ?CND25 +?ELS47: PRINTR "At what?" +?ELS44: EQUAL? PRSA,V?RUB \?ELS55 + EQUAL? PRSI,WAND \?ELS58 + ZERO? PRSO /?ELS58 + SET 'WAND-ON,PRSO + JUMP ?CND25 +?ELS58: PRINTR "Touch what?" +?ELS55: EQUAL? PRSA,V?RAISE \?CND25 + PRINTR "The wand grows warm and seems to vibrate." +?CND25: ZERO? WAND-ON /TRUE + SET 'SPELL-USED,FALSE-VALUE + SET 'SPELL-VICTIM,FALSE-VALUE + EQUAL? WAND-ON,ME,WAND \?ELS75 + SET 'WAND-ON,FALSE-VALUE + PRINTI "Fortunately a safety interlock prevents the fatal feedback loop that this would cause." + CRLF + JUMP ?CND73 +?ELS75: PRINTI "The wand grows warm, the " + PRINTD WAND-ON + PRINTI " seems to glow dimly with magical essences, and you feel suffused with power." + CRLF +?CND73: CALL QUEUE,I-WAND,2 + PUT STACK,0,1 + RTRUE + + + .FUNCT I-WAND + ZERO? WAND-ON /?ELS5 + EQUAL? WAND-ON-LOC,HERE /?THN8 + IN? WAND-ON,WINNER \?ELS5 +?THN8: PRINTI "The " + PRINTD WAND-ON + PRINTI " stops glowing and the power within you weakens." + CRLF + SET 'WAND-ON,FALSE-VALUE + RTRUE +?ELS5: SET 'WAND-ON,FALSE-VALUE + RFALSE + + + .FUNCT WIZARD-QUARTERS-FCN,RARG,PICK,L + EQUAL? RARG,M-LOOK,M-FLASH \FALSE + PRINTI "This is where the Wizard of Frobozz lives. The room is " + GET WIZQDESCS,0 >L + RANDOM L >PICK + EQUAL? PICK,WIZQLAST \?CND8 + EQUAL? PICK,L \?ELS13 + DEC 'PICK + JUMP ?CND8 +?ELS13: INC 'PICK +?CND8: SET 'WIZQLAST,PICK + GET WIZQDESCS,PICK + PRINT STACK + CRLF + RTRUE + + + .FUNCT BRIDGE-FCN + EQUAL? PRSA,V?CROSS \?ELS5 + CALL DO-WALK,P?CROSS + RSTACK +?ELS5: EQUAL? PRSA,V?LEAP \FALSE + CALL JIGS-UP,STR?343 + RSTACK + + + .FUNCT STREAM-FCN + EQUAL? PRSA,V?THROUGH,V?SWIM \?ELS5 + PRINTR "You can't swim in the stream." +?ELS5: EQUAL? PRSA,V?CROSS \FALSE + PRINTR "You'll have to find a ford or a bridge." + + + .FUNCT CHASM-FCN + EQUAL? PRSA,V?LEAP /?THN6 + EQUAL? PRSA,V?PUT \?ELS5 + EQUAL? PRSO,ME \?ELS5 +?THN6: PRINTR "For a change, you look before leaping. You realize you would never survive." +?ELS5: EQUAL? PRSA,V?CROSS \?ELS13 + PRINTR "You'll have to find a bridge." +?ELS13: EQUAL? PRSA,V?PUT \FALSE + EQUAL? PRSI,PSEUDO-OBJECT \FALSE + PRINTI "The " + PRINTD PRSO + PRINTI " drops out of sight into the chasm." + CRLF + REMOVE PRSO + RTRUE + + + .FUNCT TUNNEL-OBJECT + EQUAL? PRSA,V?THROUGH \?ELS5 + GETPT HERE,P?IN + ZERO? STACK /?ELS5 + CALL DO-WALK,P?IN + RTRUE +?ELS5: CALL PATH-OBJECT + RSTACK + + + .FUNCT STALA-PSEUDO + EQUAL? PRSA,V?MUNG,V?TAKE \FALSE + PRINTR "The only ones you can reach are too large to successfully break off." + + + .FUNCT MOSS-FCN + EQUAL? PRSA,V?RUB,V?TAKE \FALSE + PRINTR "Some of the moss rubs off on you, but it stops glowing very quickly once plucked from its environment." + + + .FUNCT ROSE-BUSH-FCN + EQUAL? PRSA,V?TAKE \FALSE + PRINTR "You prick your finger trying to take a rose, and jump back annoyed. The rose almost seemed to move its thorns into your path." + + + .FUNCT I-SPELL + ZERO? SPELL-HANDLED? \?CND1 + ZERO? SPELL-VICTIM /?CND1 + CALL PERFORM,V?DISENCHANT,SPELL-VICTIM +?CND1: SET 'SPELL-HANDLED?,FALSE-VALUE + SET 'WAND-ON,FALSE-VALUE + SET 'SPELL-USED,FALSE-VALUE + SET 'SPELL-VICTIM,FALSE-VALUE + RETURN SPELL-VICTIM + + + .FUNCT V-DIAGNOSE + ZERO? DEAD /?ELS3 + PRINTI "You are dead." + JUMP ?CND1 +?ELS3: EQUAL? SPELL?,S-FERMENT \?ELS8 + PRINTI "You are drunk." + JUMP ?CND1 +?ELS8: EQUAL? SPELL?,S-FEEBLE \?ELS12 + PRINTI "You seem unusually weak right now." + JUMP ?CND1 +?ELS12: EQUAL? SPELL?,S-FLOAT \?ELS16 + PRINTI "You seem somewhat light." + JUMP ?CND1 +?ELS16: EQUAL? SPELL?,S-FREEZE \?ELS20 + PRINTI "You are frozen stiff." + JUMP ?CND1 +?ELS20: PRINTI "You are in perfect health." +?CND1: CRLF + ZERO? DEATHS /FALSE + PRINTI "You have been killed " + EQUAL? DEATHS,1 \?ELS36 + PRINTI "once." + JUMP ?CND34 +?ELS36: EQUAL? DEATHS,2 \?ELS40 + PRINTI "twice." + JUMP ?CND34 +?ELS40: PRINTI "an awful lot." +?CND34: CRLF + RTRUE + + + .FUNCT V-SCORE,ASK?=1 + PRINTI "Your score " + ZERO? ASK? /?ELS5 + PRINTI "would be " + JUMP ?CND3 +?ELS5: PRINTI "is " +?CND3: PRINTN SCORE + PRINTI " (total of 400 points), in " + PRINTN MOVES + EQUAL? MOVES,1 \?ELS21 + PRINTI " move." + JUMP ?CND19 +?ELS21: PRINTI " moves." +?CND19: CRLF + PRINTI "This score gives you the rank of " + EQUAL? SCORE,400 \?ELS32 + PRINTI "Master Adventurer" + ZERO? WON-FLAG \?CND30 + PRINTI ", but somehow you don't feel done" + JUMP ?CND30 +?ELS32: GRTR? SCORE,360 \?ELS41 + PRINTI "Wizard" + JUMP ?CND30 +?ELS41: GRTR? SCORE,320 \?ELS45 + PRINTI "Master" + JUMP ?CND30 +?ELS45: GRTR? SCORE,240 \?ELS49 + PRINTI "Adventurer" + JUMP ?CND30 +?ELS49: GRTR? SCORE,160 \?ELS53 + PRINTI "Junior Adventurer" + JUMP ?CND30 +?ELS53: GRTR? SCORE,80 \?ELS57 + PRINTI "Novice Adventurer" + JUMP ?CND30 +?ELS57: GRTR? SCORE,40 \?ELS61 + PRINTI "Amateur Adventurer" + JUMP ?CND30 +?ELS61: PRINTI "Beginner" +?CND30: PRINTI "." + CRLF + RETURN SCORE + + + .FUNCT JIGS-UP,DESC=0,PLAYER?=0 + ZERO? DESC /?CND1 + PRINT DESC + CRLF +?CND1: EQUAL? ADVENTURER,WINNER /?CND7 + PRINTI " + **** The " + PRINTD WINNER + PRINTI " has died **** + +" + REMOVE WINNER + SET 'WINNER,ADVENTURER + LOC WINNER >HERE + RETURN 2 +?CND7: CALL SCORE-UPD,-10 + PRINTI " + **** You have died **** + +" + SET 'DEAD,TRUE-VALUE + SET 'SPELL?,FALSE-VALUE + PUTP ADVENTURER,P?ACTION,0 + INC 'DEATHS + MOVE WINNER,HERE + PRINTI "Now, let's take a look here... Well, you probably deserve another chance. I can't quite fix you up completely, but you can't have everything." + CRLF + CRLF + FCLEAR DEAD-PALANTIR-1,TOUCHBIT + FCLEAR DEAD-PALANTIR-2,TOUCHBIT + FCLEAR DEAD-PALANTIR-3,TOUCHBIT + CALL RANDOMIZE-OBJECTS + CALL GOTO,DEAD-PALANTIR-1 + SET 'P-CONT,FALSE-VALUE + CALL KILL-INTERRUPTS + RETURN 2 + + + .FUNCT RANDOMIZE-OBJECTS,R=0,F,N,L + IN? LAMP,WINNER \?CND1 + MOVE LAMP,INSIDE-BARROW +?CND1: FIRST? WINNER >N /?KLU24 +?KLU24: +?PRG4: SET 'F,N + ZERO? F /TRUE + NEXT? F >N /?KLU25 +?KLU25: EQUAL? F,BILLS,PORTRAIT \?ELS11 + EQUAL? HERE,VAULT,DEPOSITORY,OFFICE /?THN14 + EQUAL? HERE,SMALL-ROOM \?ELS11 +?THN14: MOVE F,HERE + JUMP ?PRG4 +?ELS11: EQUAL? F,GOLD-KEY /?THN18 + EQUAL? F,CANDY /?THN18 + EQUAL? F,PALANTIR-1 /?THN18 + EQUAL? F,PALANTIR-2 /?THN18 + EQUAL? F,PALANTIR-3 \?ELS17 +?THN18: MOVE F,CAROUSEL-ROOM + JUMP ?PRG4 +?ELS17: FSET? F,STAGGERED \?ELS21 + MOVE F,WIZARD-CASE + JUMP ?PRG4 +?ELS21: MOVE F,GAZEBO-ROOM + JUMP ?PRG4 + + + .FUNCT KILL-INTERRUPTS + CALL INT,I-GNOME + PUT STACK,0,0 + CALL INT,I-LEDGE + PUT STACK,0,0 + CALL INT,I-NERVOUS + PUT STACK,0,0 + CALL INT,I-ZGNOME-OUT + PUT STACK,0,0 + CALL INT,I-ZGNOME + PUT STACK,0,0 + CALL DRAGON-LEAVES + CALL INT,I-MATCH + PUT STACK,0,0 + RTRUE + + + .FUNCT FIND-WEAPON,O,W + FIRST? O >W /?KLU11 +?KLU11: ZERO? W /FALSE +?PRG4: EQUAL? W,SWORD \?ELS8 + RETURN W +?ELS8: NEXT? W >W /?PRG4 + RFALSE + + + .FUNCT BUCKET-CONT + EQUAL? PRSA,V?TAKE \FALSE + IN? WINNER,BUCKET /FALSE + PRINTR "You'll need to get in the bucket to reach it." + + .ENDI diff --git a/2actions.zil b/2actions.zil index 9e93a8e..bec062c 100644 --- a/2actions.zil +++ b/2actions.zil @@ -395,7 +395,7 @@ damaged, since an oblong hole has been chipped out of the front of it." CR>) "On the far wall is a rusty box, whose door has been blown off." CR>)>)>> + > ) ( ) @@ -506,7 +506,7 @@ about 200 feet above and there is a precipitous drop to the bottom."> ) (T )>)>> -) (T )>> @@ -532,7 +532,15 @@ notice the gnome nervously glancing at his watch." CR> > > + + > + > + + >)> + + ) + ( > ) (T )>)>> +"The green curves begin to vibrate toward you, as if searching for +something. One by one your possessions glow bright green. Finally, you +are attacked by these magical wardens, and destroyed!">)>)>> \ @@ -1156,7 +1164,8 @@ for movement."> ( ) - ( + (ELSE + )>) ( "\"I am sorry but that is difficult for a being with no mouth.\"" CR>)> ) ( - > + ,HERE>> ) ( - + ,HERE> )> ) ( - > + ,HERE>> ) ( @@ -1267,8 +1276,10 @@ say, but the robot appears to be smiling." CR CR> (T )>) - ( - > + ( + + >>> + ,HERE>> ) ( ) @@ -1276,7 +1287,7 @@ say, but the robot appears to be smiling." CR CR> )> ) (T - + ,HERE> )> )>) @@ -1357,9 +1368,9 @@ safety deposit boxes for the customer. On the north side of the room is a sign which reads \"Viewing Room\". On the "> ) (T )> - )>> )) @@ -1448,8 +1459,16 @@ here, but we can make this ONE exception, I suppose...\" He looks askance at you over his wire-rimmed bifocals." CR> )>)>> +> + > + + > + > + ) + ( > )> )>> -) TICK) +)) + >>> + + > + >)>> + + + + )> + > + + ) + (T + CR>)>)>> + +;) TICK) #DECL ((OBJ) OBJECT (TBLNAM INTNAM) ATOM (TBL) (TICK) FIX) >>> @@ -2521,9 +2557,10 @@ leading west." CR> T> - - >> + > + + + >)>> @@ -2673,12 +2710,19 @@ the young woman.">)> ) ( - ) +me from this awful fate?\" she cries. "> + + ) + (ELSE + )> + + ) ( > 0>> @@ -2834,7 +2878,7 @@ southwest. On this side of the menhir is carved an ornate letter \"F\"." CR>) ) (T )> )>) "The " D .OBJ " bounces harmlessly off the glass." CR>)>)>> + + ) + ( ) ( > - > + + > +"The genie frowns briefly, then "> + ) + (ELSE )> + + )> - + + >> > @@ -3327,6 +3380,7 @@ and are not great services bought at great price?" power." CR>) ( > + )> > - + > )> )> - + + ) + ( ) @@ -3470,15 +3527,23 @@ grins sideways at you." CR>) He is wearing a high pointed hat embroidered with astrological signs. He has a long, stringy, and unkempt beard." CR>)> - +unseemly haste, he disappears." CR>) + (ELSE + )> ) ( - +as he came." CR>) + (ELSE + )> )> @@ -3488,9 +3553,14 @@ as he came." CR> >)> >> - +begins to glow with a faint blue glow." CR>) + (ELSE + )> > @@ -3501,7 +3571,7 @@ begins to glow with a faint blue glow." CR> "!\" He cackles gleefully." CR>) + "!\" He then vanishes, cackling gleefully." CR>) (T )> > - )> + )> >> )>> ,SCORE> -)) - #DECL ((DESC) STRING (PLAYER?) ) - +) (PLAYER? <>)) + #DECL ((PLAYER?) ) + )> > ) F N L) )> - > diff --git a/2dungeon.zap b/2dungeon.zap new file mode 100644 index 0000000..2180400 --- /dev/null +++ b/2dungeon.zap @@ -0,0 +1,109 @@ + + + .FUNCT GO +START:: + +?FCN: PUTB P-LEXV,0,59 + CALL QUEUE,I-WIZARD,4 + PUT STACK,0,1 + CALL QUEUE,I-LANTERN,200 + PUTP BALLOON,P?VTYPE,NONLANDBIT + PUTP BUCKET,P?VTYPE,NONLANDBIT + PUTP SEWL,P?SIZE,P?EAST + PUTP SWWL,P?SIZE,P?WEST + PUTP SSWL,P?SIZE,P?SOUTH + PUTP SNWL,P?SIZE,P?NORTH + SET 'LIT,TRUE-VALUE + SET 'WINNER,ADVENTURER + SET 'PLAYER,ADVENTURER + SET 'HERE,INSIDE-BARROW + SET 'P-IT-OBJECT,FALSE-VALUE + FSET? HERE,TOUCHBIT /?CND1 + CALL V-VERSION + CRLF +?CND1: MOVE WINNER,HERE + CALL V-LOOK + CALL MAIN-LOOP + JUMP ?FCN + + + .FUNCT HEDGES-F + EQUAL? PRSA,V?EXAMINE \FALSE + PRINTR "The hedges are shaped like various animals: dogs, serpents, dragons, and the like, and they are vaguely troubling to look at." + + + .FUNCT LT-CRACK-PSEUDO + EQUAL? PRSA,V?THROUGH,V?BOARD \?ELS5 + CALL DO-WALK,P?SOUTH + RTRUE +?ELS5: CALL CC-CRACK-PSEUDO + RSTACK + + + .FUNCT CC-CRACK-PSEUDO + EQUAL? PRSA,V?BOARD,V?THROUGH \?ELS5 + CALL DO-WALK,P?NORTH + RTRUE +?ELS5: PRINTR "The crack is fairly wide. You should be able to get into it." + + + .FUNCT GLOBAL-MENHIR-F + PRINTR "It's not here." + + + .FUNCT GLOBAL-CERBERUS-F + PRINTR "He's not here." + + + .FUNCT CRACK-PSEUDO + EQUAL? PRSA,V?EXAMINE \FALSE + PRINTR "It is a small crack (as advertised) with no redeeming value." + + + .FUNCT ALICE-HOLE + EQUAL? PRSA,V?EXAMINE \?ELS5 + PRINTR "The hole is very small. You could never enter it." +?ELS5: EQUAL? PRSA,V?LOOK-INSIDE \?ELS9 + PRINTR "You can't see what's beyond the hole from here." +?ELS9: EQUAL? PRSA,V?PUT \FALSE + EQUAL? PRSI,PSEUDO-OBJECT \FALSE + PRINTR "It doesn't fit through the hole." + + + .FUNCT SLOT-F + EQUAL? PRSA,V?LOOK-INSIDE \?ELS5 + FIRST? SLOT /?ELS5 + PRINTR "There's nothing in the hole." +?ELS5: EQUAL? PRSA,V?EXAMINE \FALSE + PRINTR "The oblong hole has been chipped out of the box, probably by someone wanting whatever is inside the box. The attempt was a pathetic failure, however." + + + .FUNCT TEAPOT-F + EQUAL? PRSA,V?CLOSE \FALSE + PRINTR "The teapot has no lid." + + + .FUNCT ROSE-F + EQUAL? PRSA,V?SMELL \?ELS5 + PRINTR "Unlike your efforts here, it comes out smelling like a rose." +?ELS5: EQUAL? PRSA,V?EXAMINE \FALSE + PRINTR "A rose is a rose is a rose...." + + + .FUNCT FOOTPAD-F + EQUAL? PRSA,V?EXAMINE \FALSE + PRINTR "A footpad is a thief." + + + .FUNCT COMPASS-F + EQUAL? PRSA,V?FIND \?ELS5 + PRINTR "It's on your person. And lucky for you, or you would become hopelessly lost." +?ELS5: EQUAL? PRSA,V?OVERBOARD,V?THROW,V?DROP \?ELS9 + PRINTR "You can't get rid of it. It is an extension of yourself." +?ELS9: EQUAL? PRSA,V?EXAMINE \?ELS13 + PRINTR "It's one of those gizmos with a needle and a card with the eight major compass directions. Simple, but effective." +?ELS13: EQUAL? PRSA,V?READ \?ELS17 + PRINTR "It doesn't make very interesting reading - just the compass directions." +?ELS17: PRINTR "You can't do that. And don't bother to ask why." + + .ENDI diff --git a/2dungeon.zil b/2dungeon.zil index 5eda480..df95baa 100644 --- a/2dungeon.zil +++ b/2dungeon.zil @@ -5,6 +5,7 @@ ;"put interrupts on clock chain" > @@ -20,7 +21,6 @@ - > > @@ -656,11 +656,15 @@ On the wall is crudely chiseled the number \"8\".") (SYNONYM MENHIR ROCK STONE) (ADJECTIVE HUGE HEAVY ENORMOUS) (FLAGS NDESCBIT READBIT) + (ACTION GLOBAL-MENHIR-F) (DESC "enormous menhir")> +> + +> + | | @@ -1595,7 +1603,7 @@ The way out (ornate but tasteful) is to the east. (IN ROOMS) (LDESC "This room was used by holders of safety deposit boxes to view -their contents. On the north side of the room is a sign which says| +their contents. On the north side of the room is a sign which says:| | \"Remain here while the teller retrieves your safety deposit box. When you are finished, leave the box, and exit to the south. @@ -1752,13 +1760,12 @@ Hello, Aviator!| To land your balloon, say LAND| Otherwise, you're on your own!| | -No warranty expressed or implied. -|")> +No warranty expressed or implied.")> @@ -1921,8 +1929,7 @@ simple household functions.| | >ROBOT, | | -At your service! -") > +At your service!") > (SYNONYM GNOME ZURICH) (ADJECTIVE ZURICH) (DESC "Gnome of Zurich") - (FLAGS ACTORBIT) + (FLAGS ACTORBIT CONTBIT OPENBIT) (ACTION ZGNOME-FCN) (LDESC "There is a Gnome of Zurich here.")> + + ;"PALANTIR SECTION" +Blank, and is (c) Copyright 1981, 1982, 1983 by Infocom, Inc.")> + (LDESC "There is a demon floating in midair here.")> + (SIZE 30)> CINT + PUT CINT,C-TICK,TICK + RETURN CINT + + + .FUNCT INT,RTN,DEMON=0,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 + ZERO? DEMON /?ELS7 + SUB C-DEMONS,C-INTLEN >C-DEMONS +?ELS7: 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 CLOCKER,C,E,TICK,FLG=0 + ZERO? CLOCK-WAIT /?CND1 + SET 'CLOCK-WAIT,FALSE-VALUE + RFALSE +?CND1: ZERO? P-WON /?ELS9 + PUSH C-INTS + JUMP ?CND5 +?ELS9: PUSH C-DEMONS +?CND5: ADD C-TABLE,STACK >C + ADD C-TABLE,C-TABLELEN >E +?PRG13: EQUAL? C,E \?ELS17 + INC 'MOVES + RETURN FLG +?ELS17: GET C,C-ENABLED? + ZERO? STACK /?CND15 + GET C,C-TICK >TICK + ZERO? TICK \?ELS22 + JUMP ?CND15 +?ELS22: SUB TICK,1 + PUT C,C-TICK,STACK + GRTR? TICK,1 /?CND20 + GET C,C-RTN + CALL STACK + ZERO? STACK /?CND20 + SET 'FLG,TRUE-VALUE +?CND20: +?CND15: ADD C,C-INTLEN >C + JUMP ?PRG13 + + .ENDI diff --git a/gclock.zil b/gclock.zil index 6fdf9f2..3bc1f0d 100644 --- a/gclock.zil +++ b/gclock.zil @@ -18,11 +18,6 @@ -) - > ,C-TICK .TICK> - .CINT> - ) > ,C-TICK .TICK> @@ -52,8 +47,7 @@ > - > 999> - )> + > ) (>> > diff --git a/gglobals.zap b/gglobals.zap new file mode 100644 index 0000000..a9de8f4 --- /dev/null +++ b/gglobals.zap @@ -0,0 +1,137 @@ + + + .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: SET 'P-CONT,FALSE-VALUE + SET 'QUOTE-FLAG,FALSE-VALUE + EQUAL? WINNER,PLAYER \?ELS14 + PRINTI "You can't see any " + CALL NOT-HERE-PRINT,PRSO? + PRINTR " here!" +?ELS14: PRINTI "The " + PRINTD WINNER + PRINTI " seems confused. ""I don't see any " + CALL NOT-HERE-PRINT,PRSO? + PRINTR " here!""" + + + .FUNCT NOT-HERE-PRINT,PRSO?,?TMP1 + ZERO? P-OFLAG /?ELS5 + ZERO? P-XADJ /?CND7 + PRINTB P-XADJN +?CND7: ZERO? P-XNAM /FALSE + PRINTB P-XNAM + RTRUE +?ELS5: ZERO? PRSO? /?ELS18 + GET P-ITBL,P-NC1 >?TMP1 + GET P-ITBL,P-NC1L + CALL BUFFER-PRINT,?TMP1,STACK,FALSE-VALUE + RSTACK +?ELS18: GET P-ITBL,P-NC2 >?TMP1 + GET P-ITBL,P-NC2L + CALL BUFFER-PRINT,?TMP1,STACK,FALSE-VALUE + RSTACK + + + .FUNCT NULL-F,A1,A2 + RFALSE + + + .FUNCT STAIRS-F + EQUAL? PRSA,V?THROUGH \FALSE + PRINTR "You should say whether you want to go up or down." + + + .FUNCT SAILOR-FCN + EQUAL? PRSA,V?TELL \?ELS5 + SET 'P-CONT,FALSE-VALUE + SET 'QUOTE-FLAG,FALSE-VALUE + PRINTR "You can't talk to the sailor that way." +?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS9 + PRINTR "There is no sailor to be seen." +?ELS9: EQUAL? PRSA,V?HELLO \FALSE + INC 'HS + MOD HS,20 + ZERO? STACK \?ELS18 + PRINTR "You seem to be repeating yourself." +?ELS18: MOD HS,10 + ZERO? STACK \?ELS22 + PRINTR "I think that phrase is getting a bit worn out." +?ELS22: PRINTR "Nothing happens here." + + + .FUNCT GROUND-FUNCTION + EQUAL? PRSA,V?PUT-ON,V?PUT \?ELS5 + EQUAL? PRSI,GROUND \?ELS5 + CALL PERFORM,V?DROP,PRSO + RTRUE +?ELS5: CALL NULL-F + ZERO? STACK \FALSE + EQUAL? PRSA,V?DIG \FALSE + PRINTR "The ground is too hard for digging here." + + + .FUNCT GRUE-FUNCTION + EQUAL? PRSA,V?EXAMINE \?ELS5 + PRINTR "The grue is a sinister, lurking presence in the dark places of the earth. Its favorite diet is adventurers, but its insatiable appetite is tempered by its fear of light. No grue has ever been seen by the light of day, and few have survived its fearsome jaws to tell the tale." +?ELS5: EQUAL? PRSA,V?FIND \?ELS9 + PRINTR "There is no grue here, but I'm sure there is at least one lurking in the darkness nearby. I wouldn't let my light go out if I were you!" +?ELS9: EQUAL? PRSA,V?LISTEN \FALSE + PRINTR "It makes no sound but is always lurking in the darkness nearby." + + + .FUNCT CRETIN-FCN + EQUAL? PRSA,V?TELL \?ELS5 + SET 'P-CONT,FALSE-VALUE + SET 'QUOTE-FLAG,FALSE-VALUE + PRINTR "Talking to yourself is said to be a sign of impending mental collapse." +?ELS5: EQUAL? PRSA,V?GIVE \?ELS9 + EQUAL? PRSI,ME \?ELS9 + CALL PERFORM,V?TAKE,PRSO + RTRUE +?ELS9: EQUAL? PRSA,V?MAKE \?ELS13 + PRINTR "Only you can do that." +?ELS13: EQUAL? PRSA,V?DISEMBARK \?ELS17 + PRINTR "You'll have to do that on your own." +?ELS17: EQUAL? PRSA,V?EAT \?ELS21 + PRINTR "Auto-cannibalism is not the answer." +?ELS21: EQUAL? PRSA,V?MUNG,V?ATTACK \?ELS25 + ZERO? PRSI /?ELS30 + FSET? PRSI,WEAPONBIT \?ELS30 + CALL JIGS-UP,STR?167 + RSTACK +?ELS30: PRINTR "Suicide is not the answer." +?ELS25: EQUAL? PRSA,V?THROW \?ELS38 + EQUAL? PRSO,ME \FALSE + PRINTR "Why don't you just walk like normal people?" +?ELS38: EQUAL? PRSA,V?TAKE \?ELS47 + PRINTR "How romantic!" +?ELS47: EQUAL? PRSA,V?EXAMINE \FALSE + CALL NULL-F + ZERO? STACK \TRUE + PRINTR "That's difficult unless your eyes are prehensile." + + + .FUNCT PATH-OBJECT + EQUAL? PRSA,V?FOLLOW,V?TAKE \?ELS5 + PRINTR "You must specify a direction to go." +?ELS5: EQUAL? PRSA,V?FIND \?ELS9 + PRINTR "I can't help you there...." +?ELS9: EQUAL? PRSA,V?DIG \FALSE + PRINTR "Not a chance." + + + .FUNCT ZORKMID-FUNCTION + EQUAL? PRSA,V?EXAMINE \?ELS5 + PRINTR "The zorkmid is the unit of currency of the Great Underground Empire." +?ELS5: EQUAL? PRSA,V?FIND \FALSE + PRINTR "The best way to find zorkmids is to go out and look for them." + + .ENDI diff --git a/gglobals.zil b/gglobals.zil index 43d9490..2d5992b 100644 --- a/gglobals.zil +++ b/gglobals.zil @@ -64,40 +64,40 @@ > > - + ) (T - + )> > - returns number of matches. If 1, then P-MOBY-FOUND is it. One may treat the 0 and >1 cases alike or different. It doesn't matter. Always return RFALSE (not handled) if you have resolved the problem." > - )> - ,P?GLOBAL>>> + ,P?GLOBAL>>> )> - )> + ;)> ) (T )> ) ( - + ) (T ,NOT-HERE-OBJECT)>> ->)> > > @@ -108,8 +108,8 @@ )> - )>) + )> + )>) (.PRSO? <>>) (T @@ -147,13 +147,26 @@ + + > + > + ) + ( + % + '> + + )>) + (ELSE T)> + ) + ( > % '> @@ -169,16 +182,17 @@ off toward the west, singing a lively, but somewhat uncouth, sailor song." CR> ) (T - )>)>) + )>) + (T )>) (T - ')> - > - ) - (<0? > - > + ) + (<0? > + ) - (T - )>)>> + (T + )>)>)>> ) ) (T )>) + ( + + )>) ( ) ( @@ -265,11 +283,19 @@ you!" CR>) '( > )) + (<==? ,ZORK-NUMBER 3> + '(,INVIS + )) (T '( ))> (T - )>)>> + % + ') + (ELSE + ')>)>)>> ) diff --git a/gmacros.zap b/gmacros.zap new file mode 100644 index 0000000..e3ca4d9 --- /dev/null +++ b/gmacros.zap @@ -0,0 +1,39 @@ + + + .FUNCT ZPROB,BASE + ZERO? LUCKY /?ELS5 + RANDOM 100 + GRTR? BASE,STACK /TRUE + RFALSE +?ELS5: RANDOM 300 + GRTR? BASE,STACK /TRUE + RFALSE + + + .FUNCT RANDOM-ELEMENT,FROB + GET FROB,0 + RANDOM STACK + GET FROB,STACK + RSTACK + + + .FUNCT PICK-ONE,FROB,L,CNT,RND,MSG,RFROB + GET FROB,0 >L + GET FROB,1 >CNT + DEC 'L + ADD FROB,2 >FROB + MUL CNT,2 + ADD FROB,STACK >RFROB + SUB L,CNT + RANDOM STACK >RND + GET RFROB,RND >MSG + GET RFROB,1 + PUT RFROB,RND,STACK + PUT RFROB,1,MSG + INC 'CNT + EQUAL? CNT,L \?CND1 + SET 'CNT,0 +?CND1: PUT FROB,0,CNT + RETURN MSG + + .ENDI diff --git a/gmacros.zil b/gmacros.zil index ee734df..dff4b13 100644 --- a/gmacros.zil +++ b/gmacros.zil @@ -45,11 +45,11 @@
>>)>)>) ( >) - ( + ( >) (ELSE )>>>>> -> TRASH + JUMP ?PRG1 + + + .FUNCT MAIN-LOOP-1,ICNT,OCNT,NUM,CNT,OBJ,TBL,V,PTBL,OBJ1,TMP,O,I + SET 'CNT,0 + SET 'OBJ,FALSE-VALUE + SET 'PTBL,TRUE-VALUE + CALL PARSER >P-WON + ZERO? P-WON /?ELS3 + GET P-PRSI,P-MATCHLEN >ICNT + GET P-PRSO,P-MATCHLEN >OCNT + ZERO? P-IT-OBJECT /?CND4 + CALL ACCESSIBLE?,P-IT-OBJECT + ZERO? STACK /?CND4 + SET 'TMP,FALSE-VALUE +?PRG9: IGRTR? 'CNT,ICNT \?ELS13 + JUMP ?REP10 +?ELS13: GET P-PRSI,CNT + EQUAL? STACK,IT \?PRG9 + PUT P-PRSI,CNT,P-IT-OBJECT + SET 'TMP,TRUE-VALUE +?REP10: ZERO? TMP \?CND19 + SET 'CNT,0 +?PRG22: IGRTR? 'CNT,OCNT \?ELS26 + JUMP ?CND19 +?ELS26: GET P-PRSO,CNT + EQUAL? STACK,IT \?PRG22 + PUT P-PRSO,CNT,P-IT-OBJECT +?CND19: SET 'CNT,0 +?CND4: ZERO? OCNT \?ELS36 + PUSH OCNT + JUMP ?CND32 +?ELS36: GRTR? OCNT,1 \?ELS38 + SET 'TBL,P-PRSO + ZERO? ICNT \?ELS41 + SET 'OBJ,FALSE-VALUE + JUMP ?CND39 +?ELS41: GET P-PRSI,1 >OBJ +?CND39: PUSH OCNT + JUMP ?CND32 +?ELS38: GRTR? ICNT,1 \?ELS45 + SET 'PTBL,FALSE-VALUE + SET 'TBL,P-PRSI + GET P-PRSO,1 >OBJ + PUSH ICNT + JUMP ?CND32 +?ELS45: PUSH 1 +?CND32: SET 'NUM,STACK + ZERO? OBJ \?CND48 + EQUAL? ICNT,1 \?CND48 + GET P-PRSI,1 >OBJ +?CND48: EQUAL? PRSA,V?WALK \?ELS55 + ZERO? P-WALK-DIR /?ELS55 + CALL PERFORM,PRSA,PRSO >V + JUMP ?CND53 +?ELS55: ZERO? NUM \?ELS59 + GETB P-SYNTAX,P-SBITS + BAND STACK,P-SONUMS + ZERO? STACK \?ELS62 + CALL PERFORM,PRSA >V + SET 'PRSO,FALSE-VALUE + JUMP ?CND53 +?ELS62: ZERO? LIT \?ELS64 + PRINTI "It's too dark to see." + CRLF + JUMP ?CND53 +?ELS64: PRINTI "It's not clear what you're referring to." + CRLF + SET 'V,FALSE-VALUE + JUMP ?CND53 +?ELS59: SET 'P-NOT-HERE,0 + SET 'P-MULT,FALSE-VALUE + GRTR? NUM,1 \?CND73 + SET 'P-MULT,TRUE-VALUE +?CND73: SET 'TMP,FALSE-VALUE +?PRG76: IGRTR? 'CNT,NUM \?ELS80 + GRTR? P-NOT-HERE,0 \?ELS83 + PRINTI "The " + EQUAL? P-NOT-HERE,NUM /?CND86 + PRINTI "other " +?CND86: PRINTI "object" + EQUAL? P-NOT-HERE,1 /?CND93 + PRINTI "s" +?CND93: PRINTI " that you mentioned " + EQUAL? P-NOT-HERE,1 /?ELS102 + PRINTI "are" + JUMP ?CND100 +?ELS102: PRINTI "is" +?CND100: PRINTI "n't here." + CRLF + JUMP ?REP77 +?ELS83: ZERO? TMP \?REP77 + PRINTI "There's nothing here you can take." + CRLF + JUMP ?REP77 +?ELS80: ZERO? PTBL /?ELS119 + GET P-PRSO,CNT >OBJ1 + JUMP ?CND117 +?ELS119: GET P-PRSI,CNT >OBJ1 +?CND117: ZERO? PTBL /?ELS127 + PUSH OBJ1 + JUMP ?CND123 +?ELS127: PUSH OBJ +?CND123: SET 'O,STACK + ZERO? PTBL /?ELS135 + PUSH OBJ + JUMP ?CND131 +?ELS135: PUSH OBJ1 +?CND131: SET 'I,STACK + GRTR? NUM,1 /?THN142 + GET P-ITBL,P-NC1 + GET STACK,0 + EQUAL? STACK,W?ALL \?CND139 +?THN142: LOC WINNER >V + EQUAL? O,NOT-HERE-OBJECT \?ELS146 + INC 'P-NOT-HERE + JUMP ?PRG76 +?ELS146: EQUAL? PRSA,V?TAKE \?ELS148 + ZERO? I /?ELS148 + GET P-ITBL,P-NC1 + GET STACK,0 + EQUAL? STACK,W?ALL \?ELS148 + IN? O,I /?ELS148 + JUMP ?PRG76 +?ELS148: EQUAL? P-GETFLAGS,P-ALL \?ELS152 + EQUAL? PRSA,V?TAKE \?ELS152 + LOC O + EQUAL? STACK,WINNER,HERE,V /?ELS158 + LOC O + EQUAL? STACK,I /?ELS158 + LOC O + FSET? STACK,SURFACEBIT \?PRG76 +?ELS158: FSET? O,TAKEBIT /?ELS152 + FSET? O,TRYTAKEBIT /?ELS152 + JUMP ?PRG76 +?ELS152: EQUAL? OBJ1,IT \?ELS165 + PRINTD P-IT-OBJECT + JUMP ?CND163 +?ELS165: PRINTD OBJ1 +?CND163: PRINTI ": " +?CND139: SET 'PRSO,O + SET 'PRSI,I + SET 'TMP,TRUE-VALUE + CALL PERFORM,PRSA,PRSO,PRSI >V + EQUAL? V,M-FATAL \?PRG76 + JUMP ?CND53 +?REP77: +?CND53: EQUAL? V,M-FATAL /?CND173 + LOC WINNER + GETP STACK,P?ACTION + CALL STACK,M-END >V +?CND173: EQUAL? V,M-FATAL \?CND1 + SET 'P-CONT,FALSE-VALUE + JUMP ?CND1 +?ELS3: SET 'P-CONT,FALSE-VALUE +?CND1: CALL NULL-F + ZERO? P-WON /FALSE + EQUAL? PRSA,V?SUPER-BRIEF,V?BRIEF,V?TELL /TRUE + EQUAL? PRSA,V?VERSION,V?SAVE,V?VERBOSE /TRUE + EQUAL? PRSA,V?SCORE,V?RESTART,V?QUIT /TRUE + EQUAL? PRSA,V?RESTORE,V?UNSCRIPT,V?SCRIPT /TRUE + CALL CLOCKER >V + RETURN V + + + .FUNCT PERFORM,A,O=0,I=0,V,OA,OO,OI + SET 'OA,PRSA + SET 'OO,PRSO + SET 'OI,PRSI + EQUAL? IT,I,O \?CND1 + CALL ACCESSIBLE?,P-IT-OBJECT + ZERO? STACK \?CND1 + PRINTI "I don't see what you are referring to." + CRLF + RETURN 2 +?CND1: EQUAL? O,IT \?CND10 + SET 'O,P-IT-OBJECT +?CND10: EQUAL? I,IT \?CND13 + SET 'I,P-IT-OBJECT +?CND13: SET 'PRSA,A + SET 'PRSO,O + ZERO? PRSO /?CND16 + EQUAL? PRSI,IT /?CND16 + EQUAL? PRSA,V?WALK /?CND16 + SET 'P-IT-OBJECT,PRSO +?CND16: SET 'PRSI,I + EQUAL? NOT-HERE-OBJECT,PRSO,PRSI \?ELS23 + CALL NOT-HERE-OBJECT-F >V + ZERO? V /?ELS23 + JUMP ?CND21 +?ELS23: SET 'O,PRSO + SET 'I,PRSI + GETP WINNER,P?ACTION + CALL STACK >V + ZERO? V /?ELS30 + JUMP ?CND21 +?ELS30: LOC WINNER + GETP STACK,P?ACTION + CALL STACK,M-BEG >V + ZERO? V /?ELS32 + JUMP ?CND21 +?ELS32: GET PREACTIONS,A + CALL STACK >V + ZERO? V /?ELS34 + JUMP ?CND21 +?ELS34: ZERO? I /?ELS36 + GETP I,P?ACTION + CALL STACK >V + ZERO? V /?ELS36 + JUMP ?CND21 +?ELS36: ZERO? O /?ELS40 + EQUAL? A,V?WALK /?ELS40 + LOC O + ZERO? STACK /?ELS40 + LOC O + GETP STACK,P?CONTFCN + CALL STACK >V + ZERO? V /?ELS40 + JUMP ?CND21 +?ELS40: ZERO? O /?ELS44 + EQUAL? A,V?WALK /?ELS44 + GETP O,P?ACTION + CALL STACK >V + ZERO? V /?ELS44 + JUMP ?CND21 +?ELS44: GET ACTIONS,A + CALL STACK >V + ZERO? V /?CND21 +?CND21: SET 'PRSA,OA + SET 'PRSO,OO + SET 'PRSI,OI + RETURN V + + .ENDI diff --git a/gmain.zil b/gmain.zil index 9cd6685..965fe1d 100644 --- a/gmain.zil +++ b/gmain.zil @@ -2,6 +2,8 @@ The ZORK Trilogy started on 7/28/83 by MARC" + + > > @@ -26,20 +28,42 @@ -> - ;"GO now lives in SPECIAL.ZIL" ->>> + + > > > + > + > + > + > .ICNT> + ) + (T + ,IT> + + + )>)>> + + + > .OCNT> + ) + (T + ,IT> + + )>)>>)> + )> >> .OCNT) + .OCNT) ( >) @@ -52,7 +76,9 @@ .ICNT) (T 1)>> <1? .ICNT>> >)> - >) + + >> + >) (<0? .NUM> ,P-SONUMS>> > @@ -83,51 +109,42 @@ ) ( )> +"There's nothing here you can take." CR>)> ) (T >) (T >)> - > - > - - - 0> - ,W?ALL>> - > - - > - ) - ( - ,PRSI - - 0> - ,W?ALL> - >> - ) - ( - - - ,WINNER - .V>> - - ,SURFACEBIT>>> - - >>>> - ) - (T - - ) - (T )> - )>)> + > + > + +;"multiple exceptions" + + 0> ,W?ALL>> + > + + > + ) + ( + .I + 0> ,W?ALL> + >> + ) + ( + + ,WINNER ,HERE .V>> + .I>> + ,SURFACEBIT>>> + + >>>> + ) + (ELSE + + ) + (T )> + )>)> +;"end multiple exceptions" + + > )>)>>)> @@ -135,7 +152,8 @@ ; ,PRSO> >)> ,P?ACTION> ,M-END>>)> - T) + ; T) (T @@ -143,17 +161,16 @@ >)>) (T >)> + % + ' + >>> + )>) + (ELSE ')> T) - (T >)>)>>> + (T >)>)>> -> - -> - -> - > @@ -163,7 +180,7 @@ % ') (I <>) "AUX" V OA OO OI) - % ') (T ' 1>>>)> @@ -175,7 +192,7 @@ - >> + >> )> )> @@ -183,8 +200,7 @@ > >> - - )> + )> >> .V) @@ -228,7 +244,7 @@ - >> + >> )> )> @@ -236,8 +252,7 @@ >> - - )> + )> >> .V) diff --git a/gparser.zap b/gparser.zap new file mode 100644 index 0000000..321571a --- /dev/null +++ b/gparser.zap @@ -0,0 +1,1612 @@ + + + .FUNCT PARSER,PTR=P-LEXSTART,WRD,VAL=0,VERB=0,OF-FLAG=0,OWINNER,OMERGED,LEN,DIR=0,NW=0,LW=0,CNT=-1,?TMP2,?TMP1 +?PRG1: IGRTR? 'CNT,P-ITBLLEN \?ELS5 + JUMP ?REP2 +?ELS5: ZERO? P-OFLAG \?CND8 + GET P-ITBL,CNT + PUT P-OTBL,CNT,STACK +?CND8: PUT P-ITBL,CNT,0 + JUMP ?PRG1 +?REP2: SET 'OWINNER,WINNER + SET 'OMERGED,P-MERGED + SET 'P-ADVERB,FALSE-VALUE + SET 'P-MERGED,FALSE-VALUE + SET 'P-END-ON-PREP,FALSE-VALUE + PUT P-PRSO,P-MATCHLEN,0 + PUT P-PRSI,P-MATCHLEN,0 + PUT P-BUTS,P-MATCHLEN,0 + ZERO? QUOTE-FLAG \?CND11 + EQUAL? WINNER,PLAYER /?CND11 + SET 'WINNER,PLAYER + CALL META-LOC,PLAYER >HERE + CALL LIT?,HERE >LIT +?CND11: ZERO? RESERVE-PTR /?ELS18 + SET 'PTR,RESERVE-PTR + CALL STUFF,RESERVE-LEXV,P-LEXV + ZERO? SUPER-BRIEF \?CND20 + EQUAL? PLAYER,WINNER \?CND20 + CRLF +?CND20: SET 'RESERVE-PTR,FALSE-VALUE + SET 'P-CONT,FALSE-VALUE + JUMP ?CND16 +?ELS18: ZERO? P-CONT /?ELS26 + SET 'PTR,P-CONT + ZERO? SUPER-BRIEF \?CND28 + EQUAL? PLAYER,WINNER \?CND28 + EQUAL? PRSA,V?SAY /?CND28 + CRLF +?CND28: SET 'P-CONT,FALSE-VALUE + JUMP ?CND16 +?ELS26: SET 'WINNER,PLAYER + SET 'QUOTE-FLAG,FALSE-VALUE + LOC WINNER + FSET? STACK,VEHBIT /?CND35 + LOC WINNER >HERE +?CND35: CALL LIT?,HERE >LIT + ZERO? SUPER-BRIEF \?CND38 + CRLF +?CND38: PRINTI ">" + READ P-INBUF,P-LEXV +?CND16: GETB P-LEXV,P-LEXWORDS >P-LEN + ZERO? P-LEN \?CND43 + PRINTI "I beg your pardon?" + CRLF + RFALSE +?CND43: GET P-LEXV,PTR >WRD + EQUAL? WRD,W?OOPS \?ELS50 + ADD PTR,P-LEXELEN + GET P-LEXV,STACK + EQUAL? STACK,W?PERIOD,W?COMMA \?CND51 + ADD PTR,P-LEXELEN >PTR + DEC 'P-LEN +?CND51: GRTR? P-LEN,1 /?ELS56 + PRINTI "I can't help your clumsiness." + CRLF + RFALSE +?ELS56: GET OOPS-TABLE,O-PTR + ZERO? STACK /?ELS60 + GRTR? P-LEN,2 \?ELS63 + ADD PTR,P-LEXELEN + GET P-LEXV,STACK + EQUAL? STACK,W?QUOTE \?ELS63 + PRINTI "Sorry, you can't correct mistakes in quoted text." + CRLF + RFALSE +?ELS63: GRTR? P-LEN,2 \?CND61 + PRINTI "Warning: only the first word after OOPS is used." + CRLF +?CND61: GET OOPS-TABLE,O-PTR >?TMP1 + ADD PTR,P-LEXELEN + GET P-LEXV,STACK + PUT AGAIN-LEXV,?TMP1,STACK + SET 'WINNER,OWINNER + MUL PTR,P-LEXELEN + ADD STACK,6 + GETB P-LEXV,STACK >?TMP2 + MUL PTR,P-LEXELEN + ADD STACK,7 + GETB P-LEXV,STACK >?TMP1 + GET OOPS-TABLE,O-PTR + MUL STACK,P-LEXELEN + ADD STACK,3 + CALL INBUF-ADD,?TMP2,?TMP1,STACK + CALL STUFF,AGAIN-LEXV,P-LEXV + GETB P-LEXV,P-LEXWORDS >P-LEN + GET OOPS-TABLE,O-START >PTR + CALL INBUF-STUFF,OOPS-INBUF,P-INBUF + JUMP ?CND48 +?ELS60: PUT OOPS-TABLE,O-END,FALSE-VALUE + PRINTI "There was no word to replace!" + CRLF + RFALSE +?ELS50: EQUAL? WRD,W?AGAIN,W?G /?CND78 + SET 'P-NUMBER,0 +?CND78: PUT OOPS-TABLE,O-END,FALSE-VALUE +?CND48: GET P-LEXV,PTR + EQUAL? STACK,W?AGAIN,W?G \?ELS83 + GETB OOPS-INBUF,1 + ZERO? STACK \?ELS86 + PRINTI "Beg pardon?" + CRLF + RFALSE +?ELS86: ZERO? P-OFLAG /?ELS90 + PRINTI "It's difficult to repeat fragments." + CRLF + RFALSE +?ELS90: ZERO? P-WON \?ELS95 + PRINTI "That would just repeat a mistake." + CRLF + RFALSE +?ELS95: GRTR? P-LEN,1 \?ELS99 + ADD PTR,P-LEXELEN + GET P-LEXV,STACK + EQUAL? STACK,W?PERIOD,W?COMMA,W?THEN /?THN103 + ADD PTR,P-LEXELEN + GET P-LEXV,STACK + EQUAL? STACK,W?AND \?ELS102 +?THN103: MUL 2,P-LEXELEN + ADD PTR,STACK >PTR + GETB P-LEXV,P-LEXWORDS + SUB STACK,2 + PUTB P-LEXV,P-LEXWORDS,STACK + JUMP ?CND84 +?ELS102: PRINTI "I couldn't understand that sentence." + CRLF + RFALSE +?ELS99: ADD PTR,P-LEXELEN >PTR + GETB P-LEXV,P-LEXWORDS + SUB STACK,1 + PUTB P-LEXV,P-LEXWORDS,STACK +?CND84: GETB P-LEXV,P-LEXWORDS + GRTR? STACK,0 \?ELS113 + CALL STUFF,P-LEXV,RESERVE-LEXV + SET 'RESERVE-PTR,PTR + JUMP ?CND111 +?ELS113: SET 'RESERVE-PTR,FALSE-VALUE +?CND111: SET 'WINNER,OWINNER + SET 'P-MERGED,OMERGED + CALL INBUF-STUFF,OOPS-INBUF,P-INBUF + CALL STUFF,AGAIN-LEXV,P-LEXV + SET 'CNT,-1 + SET 'DIR,AGAIN-DIR +?PRG116: IGRTR? 'CNT,P-ITBLLEN \?ELS120 + JUMP ?CND81 +?ELS120: GET P-OTBL,CNT + PUT P-ITBL,CNT,STACK + JUMP ?PRG116 +?ELS83: CALL STUFF,P-LEXV,AGAIN-LEXV + CALL INBUF-STUFF,P-INBUF,OOPS-INBUF + PUT OOPS-TABLE,O-START,PTR + MUL 4,P-LEN + PUT OOPS-TABLE,O-LENGTH,STACK + GETB P-LEXV,P-LEXWORDS + MUL P-LEXELEN,STACK + ADD PTR,STACK + MUL 2,STACK >LEN + SUB LEN,1 + GETB P-LEXV,STACK >?TMP1 + SUB LEN,2 + GETB P-LEXV,STACK + ADD ?TMP1,STACK + PUT OOPS-TABLE,O-END,STACK + SET 'RESERVE-PTR,FALSE-VALUE + SET 'LEN,P-LEN + SET 'P-DIR,FALSE-VALUE + SET 'P-NCN,0 + SET 'P-GETFLAGS,0 +?PRG125: DLESS? 'P-LEN,0 \?ELS129 + SET 'QUOTE-FLAG,FALSE-VALUE + JUMP ?CND81 +?ELS129: GET P-LEXV,PTR >WRD + ZERO? WRD \?THN132 + CALL NUMBER?,PTR >WRD + ZERO? WRD /?ELS131 +?THN132: ZERO? P-LEN \?ELS136 + SET 'NW,0 + JUMP ?CND134 +?ELS136: ADD PTR,P-LEXELEN + GET P-LEXV,STACK >NW +?CND134: EQUAL? WRD,W?TO \?ELS141 + EQUAL? VERB,ACT?TELL \?ELS141 + SET 'WRD,W?QUOTE + JUMP ?CND139 +?ELS141: EQUAL? WRD,W?THEN \?CND139 + GRTR? P-LEN,0 \?CND139 + ZERO? VERB \?CND139 + ZERO? QUOTE-FLAG \?CND139 + EQUAL? LW,0,W?PERIOD \?ELS150 + SET 'WRD,W?THE + JUMP ?CND139 +?ELS150: PUT P-ITBL,P-VERB,ACT?TELL + PUT P-ITBL,P-VERBN,0 + SET 'WRD,W?QUOTE +?CND139: EQUAL? WRD,W?THEN,W?PERIOD,W?QUOTE \?ELS155 + EQUAL? WRD,W?QUOTE \?CND156 + ZERO? QUOTE-FLAG /?ELS161 + SET 'QUOTE-FLAG,FALSE-VALUE + JUMP ?CND156 +?ELS161: SET 'QUOTE-FLAG,TRUE-VALUE +?CND156: ZERO? P-LEN /?THN165 + ADD PTR,P-LEXELEN >P-CONT +?THN165: PUTB P-LEXV,P-LEXWORDS,P-LEN + JUMP ?CND81 +?ELS155: CALL WT?,WRD,PS?DIRECTION,P1?DIRECTION >VAL + ZERO? VAL /?ELS168 + EQUAL? VERB,FALSE-VALUE,ACT?WALK \?ELS168 + EQUAL? LEN,1 /?THN171 + EQUAL? LEN,2 \?ELS174 + EQUAL? VERB,ACT?WALK /?THN171 +?ELS174: EQUAL? NW,W?THEN,W?PERIOD,W?QUOTE \?ELS176 + LESS? LEN,2 \?THN171 +?ELS176: ZERO? QUOTE-FLAG /?ELS178 + EQUAL? LEN,2 \?ELS178 + EQUAL? NW,W?QUOTE /?THN171 +?ELS178: GRTR? LEN,2 \?ELS168 + EQUAL? NW,W?COMMA,W?AND \?ELS168 +?THN171: SET 'DIR,VAL + EQUAL? NW,W?COMMA,W?AND \?CND181 + ADD PTR,P-LEXELEN + PUT P-LEXV,STACK,W?THEN +?CND181: GRTR? LEN,2 /?CND127 + SET 'QUOTE-FLAG,FALSE-VALUE + JUMP ?CND81 +?ELS168: CALL WT?,WRD,PS?VERB,P1?VERB >VAL + ZERO? VAL /?ELS188 + ZERO? VERB \?ELS188 + SET 'VERB,VAL + PUT P-ITBL,P-VERB,VAL + PUT P-ITBL,P-VERBN,P-VTBL + PUT P-VTBL,0,WRD + MUL PTR,2 + ADD STACK,2 >CNT + GETB P-LEXV,CNT + PUTB P-VTBL,2,STACK + ADD CNT,1 + GETB P-LEXV,STACK + PUTB P-VTBL,3,STACK + JUMP ?CND127 +?ELS188: CALL WT?,WRD,PS?PREPOSITION,0 >VAL + ZERO? VAL \?THN193 + EQUAL? WRD,W?ALL,W?ONE /?THN197 + CALL WT?,WRD,PS?ADJECTIVE + ZERO? STACK \?THN197 + CALL WT?,WRD,PS?OBJECT + ZERO? STACK /?ELS192 +?THN197: SET 'VAL,0 \?ELS192 +?THN193: GRTR? P-LEN,1 \?ELS201 + EQUAL? NW,W?OF \?ELS201 + ZERO? VAL \?ELS201 + EQUAL? WRD,W?ALL,W?ONE,W?A /?ELS201 + SET 'OF-FLAG,TRUE-VALUE + JUMP ?CND127 +?ELS201: ZERO? VAL /?ELS205 + ZERO? P-LEN /?THN208 + EQUAL? NW,W?THEN,W?PERIOD \?ELS205 +?THN208: SET 'P-END-ON-PREP,TRUE-VALUE + LESS? P-NCN,2 \?CND127 + PUT P-ITBL,P-PREP1,VAL + PUT P-ITBL,P-PREP1N,WRD + JUMP ?CND127 +?ELS205: EQUAL? P-NCN,2 \?ELS214 + PRINTI "There were too many nouns in that sentence." + CRLF + RFALSE +?ELS214: INC 'P-NCN + SET 'P-ACT,VERB + CALL CLAUSE,PTR,VAL,WRD >PTR + ZERO? PTR /FALSE + LESS? PTR,0 \?CND127 + SET 'QUOTE-FLAG,FALSE-VALUE + JUMP ?CND81 +?ELS192: EQUAL? WRD,W?OF \?ELS225 + ZERO? OF-FLAG /?THN229 + EQUAL? NW,W?PERIOD,W?THEN \?ELS228 +?THN229: CALL CANT-USE,PTR + RFALSE +?ELS228: SET 'OF-FLAG,FALSE-VALUE + JUMP ?CND127 +?ELS225: CALL WT?,WRD,PS?BUZZ-WORD + ZERO? STACK /?ELS234 + JUMP ?CND127 +?ELS234: EQUAL? VERB,ACT?TELL \?ELS236 + CALL WT?,WRD,PS?VERB,P1?VERB + ZERO? STACK /?ELS236 + EQUAL? WINNER,PLAYER \?ELS236 + PRINTI "Please consult your manual for the correct way to talk to other people or creatures." + CRLF + RFALSE +?ELS236: CALL CANT-USE,PTR + RFALSE +?ELS131: CALL UNKNOWN-WORD,PTR + RFALSE +?CND127: SET 'LW,WRD + ADD PTR,P-LEXELEN >PTR + JUMP ?PRG125 +?CND81: PUT OOPS-TABLE,O-PTR,FALSE-VALUE + ZERO? DIR /?ELS249 + SET 'PRSA,V?WALK + SET 'PRSO,DIR + SET 'P-OFLAG,FALSE-VALUE + SET 'P-WALK-DIR,DIR + SET 'AGAIN-DIR,DIR + RETURN AGAIN-DIR +?ELS249: ZERO? P-OFLAG /?CND253 + CALL ORPHAN-MERGE +?CND253: SET 'P-WALK-DIR,FALSE-VALUE + SET 'AGAIN-DIR,FALSE-VALUE + CALL SYNTAX-CHECK + ZERO? STACK /FALSE + CALL SNARF-OBJECTS + ZERO? STACK /FALSE + CALL MANY-CHECK + ZERO? STACK /FALSE + CALL TAKE-CHECK + ZERO? STACK /FALSE + RTRUE + + + .FUNCT STUFF,SRC,DEST,MAX=29,PTR=P-LEXSTART,CTR=1,BPTR + GETB SRC,0 + PUTB DEST,0,STACK + GETB SRC,1 + PUTB DEST,1,STACK +?PRG1: GET SRC,PTR + PUT DEST,PTR,STACK + MUL PTR,2 + ADD STACK,2 >BPTR + GETB SRC,BPTR + PUTB DEST,BPTR,STACK + MUL PTR,2 + ADD STACK,3 >BPTR + GETB SRC,BPTR + PUTB DEST,BPTR,STACK + ADD PTR,P-LEXELEN >PTR + IGRTR? 'CTR,MAX \?PRG1 + RTRUE + + + .FUNCT INBUF-STUFF,SRC,DEST,CNT + GETB SRC,0 + SUB STACK,1 >CNT +?PRG1: GETB SRC,CNT + PUTB DEST,CNT,STACK + DLESS? 'CNT,0 \?PRG1 + RTRUE + + + .FUNCT INBUF-ADD,LEN,BEG,SLOT,DBEG,CTR=0,TMP,?TMP1 + GET OOPS-TABLE,O-END >TMP + ZERO? TMP /?ELS3 + SET 'DBEG,TMP + JUMP ?CND1 +?ELS3: GET OOPS-TABLE,O-LENGTH >TMP + GETB AGAIN-LEXV,TMP >?TMP1 + ADD TMP,1 + GETB AGAIN-LEXV,STACK + ADD ?TMP1,STACK >DBEG +?CND1: ADD DBEG,LEN + PUT OOPS-TABLE,O-END,STACK +?PRG6: ADD DBEG,CTR >?TMP1 + ADD BEG,CTR + GETB P-INBUF,STACK + PUTB OOPS-INBUF,?TMP1,STACK + INC 'CTR + EQUAL? CTR,LEN \?PRG6 + PUTB AGAIN-LEXV,SLOT,DBEG + SUB SLOT,1 + PUTB AGAIN-LEXV,STACK,LEN + RTRUE + + + .FUNCT WT?,PTR,BIT,B1=5,OFFS=P-P1OFF,TYP + GETB PTR,P-PSOFF >TYP + BTST TYP,BIT \FALSE + GRTR? B1,4 /TRUE + BAND TYP,P-P1BITS >TYP + EQUAL? TYP,B1 /?CND13 + INC 'OFFS +?CND13: GETB PTR,OFFS + RSTACK + + + .FUNCT CLAUSE,PTR,VAL,WRD,OFF,NUM,ANDFLG=0,FIRST??=1,NW,LW=0,?TMP1 + SUB P-NCN,1 + MUL STACK,2 >OFF + ZERO? VAL /?ELS3 + ADD P-PREP1,OFF >NUM + PUT P-ITBL,NUM,VAL + ADD NUM,1 + PUT P-ITBL,STACK,WRD + ADD PTR,P-LEXELEN >PTR + JUMP ?CND1 +?ELS3: INC 'P-LEN +?CND1: ZERO? P-LEN \?CND6 + DEC 'P-NCN + RETURN -1 +?CND6: ADD P-NC1,OFF >NUM + MUL PTR,2 + ADD P-LEXV,STACK + PUT P-ITBL,NUM,STACK + GET P-LEXV,PTR + EQUAL? STACK,W?THE,W?A,W?AN \?CND9 + GET P-ITBL,NUM + ADD STACK,4 + PUT P-ITBL,NUM,STACK +?CND9: +?PRG12: DLESS? 'P-LEN,0 \?CND14 + ADD NUM,1 >?TMP1 + MUL PTR,2 + ADD P-LEXV,STACK + PUT P-ITBL,?TMP1,STACK + RETURN -1 +?CND14: GET P-LEXV,PTR >WRD + ZERO? WRD \?THN20 + CALL NUMBER?,PTR >WRD + ZERO? WRD /?ELS19 +?THN20: ZERO? P-LEN \?ELS24 + SET 'NW,0 + JUMP ?CND22 +?ELS24: ADD PTR,P-LEXELEN + GET P-LEXV,STACK >NW +?CND22: EQUAL? WRD,W?AND,W?COMMA \?ELS29 + SET 'ANDFLG,TRUE-VALUE + JUMP ?CND17 +?ELS29: EQUAL? WRD,W?ALL,W?ONE \?ELS31 + EQUAL? NW,W?OF \?CND17 + DEC 'P-LEN + ADD PTR,P-LEXELEN >PTR + JUMP ?CND17 +?ELS31: EQUAL? WRD,W?THEN,W?PERIOD /?THN37 + CALL WT?,WRD,PS?PREPOSITION + ZERO? STACK /?ELS36 + GET P-ITBL,P-VERB + ZERO? STACK /?ELS36 + ZERO? FIRST?? \?ELS36 +?THN37: INC 'P-LEN + ADD NUM,1 >?TMP1 + MUL PTR,2 + ADD P-LEXV,STACK + PUT P-ITBL,?TMP1,STACK + SUB PTR,P-LEXELEN + RSTACK +?ELS36: CALL WT?,WRD,PS?OBJECT + ZERO? STACK /?ELS42 + GRTR? P-LEN,0 \?ELS45 + EQUAL? NW,W?OF \?ELS45 + EQUAL? WRD,W?ALL,W?ONE /?ELS45 + JUMP ?CND17 +?ELS45: CALL WT?,WRD,PS?ADJECTIVE,P1?ADJECTIVE + ZERO? STACK /?ELS49 + ZERO? NW /?ELS49 + CALL WT?,NW,PS?OBJECT + ZERO? STACK /?ELS49 + JUMP ?CND17 +?ELS49: ZERO? ANDFLG \?ELS53 + EQUAL? NW,W?BUT,W?EXCEPT /?ELS53 + EQUAL? NW,W?AND,W?COMMA /?ELS53 + ADD NUM,1 >?TMP1 + ADD PTR,2 + MUL STACK,2 + ADD P-LEXV,STACK + PUT P-ITBL,?TMP1,STACK + RETURN PTR +?ELS53: SET 'ANDFLG,FALSE-VALUE + JUMP ?CND17 +?ELS42: ZERO? P-MERGED \?THN62 + ZERO? P-OFLAG \?THN62 + GET P-ITBL,P-VERB + ZERO? STACK /?ELS59 +?THN62: CALL WT?,WRD,PS?ADJECTIVE + ZERO? STACK \?CND17 + CALL WT?,WRD,PS?BUZZ-WORD + ZERO? STACK /?ELS59 + JUMP ?CND17 +?ELS59: ZERO? ANDFLG /?ELS67 + CALL WT?,WRD,PS?DIRECTION + ZERO? STACK \?THN70 + CALL WT?,WRD,PS?VERB + ZERO? STACK /?ELS67 +?THN70: SUB PTR,4 >PTR + ADD PTR,2 + PUT P-LEXV,STACK,W?THEN + ADD P-LEN,2 >P-LEN + JUMP ?CND17 +?ELS67: CALL WT?,WRD,PS?PREPOSITION + ZERO? STACK /?ELS73 + JUMP ?CND17 +?ELS73: CALL CANT-USE,PTR + RFALSE +?ELS19: CALL UNKNOWN-WORD,PTR + RFALSE +?CND17: SET 'LW,WRD + SET 'FIRST??,FALSE-VALUE + ADD PTR,P-LEXELEN >PTR + JUMP ?PRG12 + + + .FUNCT NUMBER?,PTR,CNT,BPTR,CHR,SUM=0,TIM=0,?TMP1 + MUL PTR,2 + ADD P-LEXV,STACK + GETB STACK,2 >CNT + MUL PTR,2 + ADD P-LEXV,STACK + GETB STACK,3 >BPTR +?PRG1: DLESS? 'CNT,0 \?ELS5 + JUMP ?REP2 +?ELS5: GETB P-INBUF,BPTR >CHR + EQUAL? CHR,58 \?ELS10 + SET 'TIM,SUM + SET 'SUM,0 + JUMP ?CND8 +?ELS10: GRTR? SUM,10000 /FALSE + LESS? CHR,58 \FALSE + GRTR? CHR,47 \FALSE + MUL SUM,10 >?TMP1 + SUB CHR,48 + ADD ?TMP1,STACK >SUM +?CND8: INC 'BPTR + JUMP ?PRG1 +?REP2: PUT P-LEXV,PTR,W?INTNUM + GRTR? SUM,1000 /FALSE + ZERO? TIM /?CND19 + LESS? TIM,8 \?ELS27 + ADD TIM,12 >TIM + JUMP ?CND25 +?ELS27: GRTR? TIM,23 /FALSE +?CND25: MUL TIM,60 + ADD SUM,STACK >SUM +?CND19: SET 'P-NUMBER,SUM + RETURN W?INTNUM + + + .FUNCT ORPHAN-MERGE,CNT=-1,TEMP,VERB,BEG,END,ADJ=0,WRD,?TMP1 + SET 'P-OFLAG,FALSE-VALUE + GET P-ITBL,P-VERBN + GET STACK,0 >WRD + CALL WT?,WRD,PS?VERB,P1?VERB >?TMP1 + GET P-OTBL,P-VERB + EQUAL? ?TMP1,STACK /?THN4 + CALL WT?,WRD,PS?ADJECTIVE + ZERO? STACK /?ELS3 +?THN4: SET 'ADJ,TRUE-VALUE + JUMP ?CND1 +?ELS3: CALL WT?,WRD,PS?OBJECT,P1?OBJECT + ZERO? STACK /?CND1 + ZERO? P-NCN \?CND1 + PUT P-ITBL,P-VERB,0 + PUT P-ITBL,P-VERBN,0 + ADD P-LEXV,2 + PUT P-ITBL,P-NC1,STACK + ADD P-LEXV,6 + PUT P-ITBL,P-NC1L,STACK + SET 'P-NCN,1 +?CND1: GET P-ITBL,P-VERB >VERB + ZERO? VERB /?ELS12 + ZERO? ADJ \?ELS12 + GET P-OTBL,P-VERB + EQUAL? VERB,STACK \FALSE +?ELS12: EQUAL? P-NCN,2 /FALSE + GET P-OTBL,P-NC1 + EQUAL? STACK,1 \?ELS18 + GET P-ITBL,P-PREP1 >TEMP + GET P-OTBL,P-PREP1 + EQUAL? TEMP,STACK /?THN22 + ZERO? TEMP \FALSE +?THN22: ZERO? ADJ /?ELS26 + ADD P-LEXV,2 + PUT P-OTBL,P-NC1,STACK + GET P-ITBL,P-NC1L + ZERO? STACK \?CND28 + ADD P-LEXV,6 + PUT P-ITBL,P-NC1L,STACK +?CND28: ZERO? P-NCN \?CND24 + SET 'P-NCN,1 + JUMP ?CND24 +?ELS26: GET P-ITBL,P-NC1 + PUT P-OTBL,P-NC1,STACK +?CND24: GET P-ITBL,P-NC1L + PUT P-OTBL,P-NC1L,STACK + JUMP ?CND10 +?ELS18: GET P-OTBL,P-NC2 + EQUAL? STACK,1 \?ELS39 + GET P-ITBL,P-PREP1 >TEMP + GET P-OTBL,P-PREP2 + EQUAL? TEMP,STACK /?THN43 + ZERO? TEMP \FALSE +?THN43: ZERO? ADJ /?CND45 + ADD P-LEXV,2 + PUT P-ITBL,P-NC1,STACK + GET P-ITBL,P-NC1L + ZERO? STACK \?CND45 + ADD P-LEXV,6 + PUT P-ITBL,P-NC1L,STACK +?CND45: GET P-ITBL,P-NC1 + PUT P-OTBL,P-NC2,STACK + GET P-ITBL,P-NC1L + PUT P-OTBL,P-NC2L,STACK + SET 'P-NCN,2 + JUMP ?CND10 +?ELS39: ZERO? P-ACLAUSE /?CND10 + EQUAL? P-NCN,1 /?ELS58 + ZERO? ADJ \?ELS58 + SET 'P-ACLAUSE,FALSE-VALUE + RFALSE +?ELS58: GET P-ITBL,P-NC1 >BEG + ZERO? ADJ /?CND63 + ADD P-LEXV,2 >BEG + SET 'ADJ,FALSE-VALUE +?CND63: GET P-ITBL,P-NC1L >END +?PRG67: GET BEG,0 >WRD + EQUAL? BEG,END \?ELS71 + ZERO? ADJ /?ELS74 + CALL ACLAUSE-WIN,ADJ + JUMP ?CND56 +?ELS74: SET 'P-ACLAUSE,FALSE-VALUE + RFALSE +?ELS71: ZERO? ADJ \?ELS79 + GETB WRD,P-PSOFF + BTST STACK,PS?ADJECTIVE /?THN82 + EQUAL? WRD,W?ALL,W?ONE \?ELS79 +?THN82: SET 'ADJ,WRD + JUMP ?CND69 +?ELS79: EQUAL? WRD,W?ONE \?ELS85 + CALL ACLAUSE-WIN,ADJ + JUMP ?CND56 +?ELS85: GETB WRD,P-PSOFF + BTST STACK,PS?OBJECT \?CND69 + EQUAL? WRD,P-ANAM \?ELS90 + CALL ACLAUSE-WIN,ADJ + JUMP ?CND10 +?ELS90: CALL NCLAUSE-WIN + JUMP ?CND10 +?CND69: ADD BEG,P-WORDLEN >BEG + ZERO? END \?PRG67 + SET 'END,BEG + SET 'P-NCN,1 + SUB BEG,4 + PUT P-ITBL,P-NC1,STACK + PUT P-ITBL,P-NC1L,BEG + JUMP ?PRG67 +?CND56: +?CND10: GET P-OVTBL,0 + PUT P-VTBL,0,STACK + GETB P-OVTBL,2 + PUTB P-VTBL,2,STACK + GETB P-OVTBL,3 + PUTB P-VTBL,3,STACK + PUT P-OTBL,P-VERBN,P-VTBL + PUTB P-VTBL,2,0 +?PRG96: IGRTR? 'CNT,P-ITBLLEN \?ELS100 + SET 'P-MERGED,TRUE-VALUE + RTRUE +?ELS100: GET P-OTBL,CNT + PUT P-ITBL,CNT,STACK + JUMP ?PRG96 + + + .FUNCT ACLAUSE-WIN,ADJ + GET P-OTBL,P-VERB + PUT P-ITBL,P-VERB,STACK + PUT P-CCTBL,CC-SBPTR,P-ACLAUSE + ADD P-ACLAUSE,1 + PUT P-CCTBL,CC-SEPTR,STACK + PUT P-CCTBL,CC-DBPTR,P-ACLAUSE + ADD P-ACLAUSE,1 + PUT P-CCTBL,CC-DEPTR,STACK + CALL CLAUSE-COPY,P-OTBL,P-OTBL,ADJ + GET P-OTBL,P-NC2 + ZERO? STACK /?ELS2 + SET 'P-NCN,2 +?ELS2: SET 'P-ACLAUSE,FALSE-VALUE + RTRUE + + + .FUNCT NCLAUSE-WIN + PUT P-CCTBL,CC-SBPTR,P-NC1 + PUT P-CCTBL,CC-SEPTR,P-NC1L + PUT P-CCTBL,CC-DBPTR,P-ACLAUSE + ADD P-ACLAUSE,1 + PUT P-CCTBL,CC-DEPTR,STACK + CALL CLAUSE-COPY,P-ITBL,P-OTBL + GET P-OTBL,P-NC2 + ZERO? STACK /?ELS2 + SET 'P-NCN,2 +?ELS2: SET 'P-ACLAUSE,FALSE-VALUE + RTRUE + + + .FUNCT WORD-PRINT,CNT,BUF +?PRG1: DLESS? 'CNT,0 /TRUE + GETB P-INBUF,BUF + PRINTC STACK + INC 'BUF + JUMP ?PRG1 + + + .FUNCT UNKNOWN-WORD,PTR,BUF,?TMP1 + PUT OOPS-TABLE,O-PTR,PTR + EQUAL? PRSA,V?SAY \?CND1 + PRINTI "Nothing happens." + CRLF + RFALSE +?CND1: PRINTI "I don't know the word """ + MUL PTR,2 >BUF + ADD P-LEXV,BUF + GETB STACK,2 >?TMP1 + ADD P-LEXV,BUF + GETB STACK,3 + CALL WORD-PRINT,?TMP1,STACK + PRINTI """." + CRLF + SET 'QUOTE-FLAG,FALSE-VALUE + SET 'P-OFLAG,FALSE-VALUE + RETURN P-OFLAG + + + .FUNCT CANT-USE,PTR,BUF,?TMP1 + EQUAL? PRSA,V?SAY \?CND1 + PRINTI "Nothing happens." + CRLF + RFALSE +?CND1: PRINTI "You used the word """ + MUL PTR,2 >BUF + ADD P-LEXV,BUF + GETB STACK,2 >?TMP1 + ADD P-LEXV,BUF + GETB STACK,3 + CALL WORD-PRINT,?TMP1,STACK + PRINTI """ in a way that I don't understand." + CRLF + SET 'QUOTE-FLAG,FALSE-VALUE + SET 'P-OFLAG,FALSE-VALUE + RETURN P-OFLAG + + + .FUNCT SYNTAX-CHECK,SYN,LEN,NUM,OBJ,DRIVE1=0,DRIVE2=0,PREP,VERB,TMP,?TMP2,?TMP1 + GET P-ITBL,P-VERB >VERB + ZERO? VERB \?CND1 + PRINTI "There was no verb in that sentence!" + CRLF + RFALSE +?CND1: SUB 255,VERB + GET VERBS,STACK >SYN + GETB SYN,0 >LEN + INC 'SYN +?PRG6: GETB SYN,P-SBITS + BAND STACK,P-SONUMS >NUM + GRTR? P-NCN,NUM \?ELS10 + JUMP ?CND8 +?ELS10: LESS? NUM,1 /?ELS12 + ZERO? P-NCN \?ELS12 + GET P-ITBL,P-PREP1 >PREP + ZERO? PREP /?THN15 + GETB SYN,P-SPREP1 + EQUAL? PREP,STACK \?ELS12 +?THN15: SET 'DRIVE1,SYN + JUMP ?CND8 +?ELS12: GETB SYN,P-SPREP1 >?TMP1 + GET P-ITBL,P-PREP1 + EQUAL? ?TMP1,STACK \?CND8 + EQUAL? NUM,2 \?ELS21 + EQUAL? P-NCN,1 \?ELS21 + SET 'DRIVE2,SYN + JUMP ?CND8 +?ELS21: GETB SYN,P-SPREP2 >?TMP1 + GET P-ITBL,P-PREP2 + EQUAL? ?TMP1,STACK \?CND8 + CALL SYNTAX-FOUND,SYN + RTRUE +?CND8: DLESS? 'LEN,1 \?ELS28 + ZERO? DRIVE1 \?REP7 + ZERO? DRIVE2 /?ELS31 + JUMP ?REP7 +?ELS31: PRINTI "That sentence isn't one I recognize." + CRLF + RFALSE +?ELS28: ADD SYN,P-SYNLEN >SYN + JUMP ?PRG6 +?REP7: ZERO? DRIVE1 /?ELS44 + GETB DRIVE1,P-SFWIM1 >?TMP2 + GETB DRIVE1,P-SLOC1 >?TMP1 + GETB DRIVE1,P-SPREP1 + CALL GWIM,?TMP2,?TMP1,STACK >OBJ + ZERO? OBJ /?ELS44 + PUT P-PRSO,P-MATCHLEN,1 + PUT P-PRSO,1,OBJ + CALL SYNTAX-FOUND,DRIVE1 + RSTACK +?ELS44: ZERO? DRIVE2 /?ELS48 + GETB DRIVE2,P-SFWIM2 >?TMP2 + GETB DRIVE2,P-SLOC2 >?TMP1 + GETB DRIVE2,P-SPREP2 + CALL GWIM,?TMP2,?TMP1,STACK >OBJ + ZERO? OBJ /?ELS48 + PUT P-PRSI,P-MATCHLEN,1 + PUT P-PRSI,1,OBJ + CALL SYNTAX-FOUND,DRIVE2 + RSTACK +?ELS48: EQUAL? VERB,ACT?FIND \?ELS52 + PRINTI "That question can't be answered." + CRLF + RFALSE +?ELS52: EQUAL? WINNER,PLAYER /?ELS56 + CALL CANT-ORPHAN + RSTACK +?ELS56: CALL ORPHAN,DRIVE1,DRIVE2 + PRINTI "What do you want to " + GET P-OTBL,P-VERBN >TMP + ZERO? TMP \?ELS63 + PRINTI "tell" + JUMP ?CND61 +?ELS63: GETB P-VTBL,2 + ZERO? STACK \?ELS67 + GET TMP,0 + PRINTB STACK + JUMP ?CND61 +?ELS67: GETB TMP,2 >?TMP1 + GETB TMP,3 + CALL WORD-PRINT,?TMP1,STACK + PUTB P-VTBL,2,0 +?CND61: ZERO? DRIVE2 /?CND70 + PRINTI " " + CALL THING-PRINT,TRUE-VALUE,TRUE-VALUE +?CND70: SET 'P-OFLAG,TRUE-VALUE + ZERO? DRIVE1 /?ELS80 + GETB DRIVE1,P-SPREP1 + JUMP ?CND76 +?ELS80: GETB DRIVE2,P-SPREP2 +?CND76: CALL PREP-PRINT,STACK + PRINTI "?" + CRLF + RFALSE + + + .FUNCT CANT-ORPHAN + PRINTI """I don't understand! What are you referring to?""" + CRLF + RFALSE + + + .FUNCT ORPHAN,D1,D2,CNT=-1 + ZERO? P-MERGED \?CND1 + PUT P-OCLAUSE,P-MATCHLEN,0 +?CND1: GET P-VTBL,0 + PUT P-OVTBL,0,STACK + GETB P-VTBL,2 + PUTB P-OVTBL,2,STACK + GETB P-VTBL,3 + PUTB P-OVTBL,3,STACK +?PRG4: IGRTR? 'CNT,P-ITBLLEN \?ELS8 + JUMP ?REP5 +?ELS8: GET P-ITBL,CNT + PUT P-OTBL,CNT,STACK + JUMP ?PRG4 +?REP5: EQUAL? P-NCN,2 \?CND11 + PUT P-CCTBL,CC-SBPTR,P-NC2 + PUT P-CCTBL,CC-SEPTR,P-NC2L + PUT P-CCTBL,CC-DBPTR,P-NC2 + PUT P-CCTBL,CC-DEPTR,P-NC2L + CALL CLAUSE-COPY,P-ITBL,P-OTBL +?CND11: LESS? P-NCN,1 /?CND14 + PUT P-CCTBL,CC-SBPTR,P-NC1 + PUT P-CCTBL,CC-SEPTR,P-NC1L + PUT P-CCTBL,CC-DBPTR,P-NC1 + PUT P-CCTBL,CC-DEPTR,P-NC1L + CALL CLAUSE-COPY,P-ITBL,P-OTBL +?CND14: ZERO? D1 /?ELS21 + GETB D1,P-SPREP1 + PUT P-OTBL,P-PREP1,STACK + PUT P-OTBL,P-NC1,1 + RTRUE +?ELS21: ZERO? D2 /FALSE + GETB D2,P-SPREP2 + PUT P-OTBL,P-PREP2,STACK + PUT P-OTBL,P-NC2,1 + RTRUE + + + .FUNCT THING-PRINT,PRSO?,THE?=0,BEG,END + ZERO? PRSO? /?ELS3 + GET P-ITBL,P-NC1 >BEG + GET P-ITBL,P-NC1L >END + JUMP ?CND1 +?ELS3: GET P-ITBL,P-NC2 >BEG + GET P-ITBL,P-NC2L >END +?CND1: CALL BUFFER-PRINT,BEG,END,THE? + RSTACK + + + .FUNCT BUFFER-PRINT,BEG,END,CP,NOSP=1,WRD,FIRST??=1,PN=0,Q?=0,?TMP1 +?PRG1: EQUAL? BEG,END /TRUE + GET BEG,0 >WRD + EQUAL? WRD,W?COMMA \?ELS10 + PRINTI ", " + JUMP ?CND8 +?ELS10: ZERO? NOSP /?ELS14 + SET 'NOSP,FALSE-VALUE + JUMP ?CND8 +?ELS14: PRINTI " " +?CND8: EQUAL? WRD,W?PERIOD,W?COMMA \?ELS22 + SET 'NOSP,TRUE-VALUE + JUMP ?CND3 +?ELS22: EQUAL? WRD,W?ME \?ELS24 + PRINTD ME + SET 'PN,TRUE-VALUE + JUMP ?CND3 +?ELS24: EQUAL? WRD,W?INTNUM \?ELS26 + PRINTN P-NUMBER + SET 'PN,TRUE-VALUE + JUMP ?CND3 +?ELS26: ZERO? FIRST?? /?CND29 + ZERO? PN \?CND29 + ZERO? CP /?CND29 + PRINTI "the " +?CND29: ZERO? P-OFLAG \?THN39 + ZERO? P-MERGED /?ELS38 +?THN39: PRINTB WRD + JUMP ?CND36 +?ELS38: EQUAL? WRD,W?IT \?ELS42 + CALL ACCESSIBLE?,P-IT-OBJECT + ZERO? STACK /?ELS42 + PRINTD P-IT-OBJECT + JUMP ?CND36 +?ELS42: GETB BEG,2 >?TMP1 + GETB BEG,3 + CALL WORD-PRINT,?TMP1,STACK +?CND36: SET 'FIRST??,FALSE-VALUE +?CND3: ADD BEG,P-WORDLEN >BEG + JUMP ?PRG1 + + + .FUNCT PREP-PRINT,PREP,WRD + ZERO? PREP /FALSE + PRINTI " " + CALL PREP-FIND,PREP >WRD + PRINTB WRD + RTRUE + + + .FUNCT CLAUSE-COPY,SRC,DEST,INSRT=0,BEG,END,?TMP1 + GET P-CCTBL,CC-SBPTR + GET SRC,STACK >BEG + GET P-CCTBL,CC-SEPTR + GET SRC,STACK >END + GET P-CCTBL,CC-DBPTR >?TMP1 + GET P-OCLAUSE,P-MATCHLEN + MUL STACK,P-LEXELEN + ADD STACK,2 + ADD P-OCLAUSE,STACK + PUT DEST,?TMP1,STACK +?PRG1: EQUAL? BEG,END \?ELS5 + GET P-CCTBL,CC-DEPTR >?TMP1 + GET P-OCLAUSE,P-MATCHLEN + MUL STACK,P-LEXELEN + ADD STACK,2 + ADD P-OCLAUSE,STACK + PUT DEST,?TMP1,STACK + RTRUE +?ELS5: ZERO? INSRT /?CND8 + GET BEG,0 + EQUAL? P-ANAM,STACK \?CND8 + CALL CLAUSE-ADD,INSRT +?CND8: GET BEG,0 + CALL CLAUSE-ADD,STACK +?CND3: ADD BEG,P-WORDLEN >BEG + JUMP ?PRG1 + + + .FUNCT CLAUSE-ADD,WRD,PTR + GET P-OCLAUSE,P-MATCHLEN + ADD STACK,2 >PTR + SUB PTR,1 + PUT P-OCLAUSE,STACK,WRD + PUT P-OCLAUSE,PTR,0 + PUT P-OCLAUSE,P-MATCHLEN,PTR + RTRUE + + + .FUNCT PREP-FIND,PREP,CNT=0,SIZE + GET PREPOSITIONS,0 + MUL STACK,2 >SIZE +?PRG1: IGRTR? 'CNT,SIZE /FALSE + GET PREPOSITIONS,CNT + EQUAL? STACK,PREP \?PRG1 + SUB CNT,1 + GET PREPOSITIONS,STACK + RSTACK + + + .FUNCT SYNTAX-FOUND,SYN + SET 'P-SYNTAX,SYN + GETB SYN,P-SACTION >PRSA + RETURN PRSA + + + .FUNCT GWIM,GBIT,LBIT,PREP,OBJ + EQUAL? GBIT,RMUNGBIT \?CND1 + RETURN ROOMS +?CND1: SET 'P-GWIMBIT,GBIT + SET 'P-SLOCBITS,LBIT + PUT P-MERGE,P-MATCHLEN,0 + CALL GET-OBJECT,P-MERGE,FALSE-VALUE + ZERO? STACK /?ELS8 + SET 'P-GWIMBIT,0 + GET P-MERGE,P-MATCHLEN + EQUAL? STACK,1 \FALSE + GET P-MERGE,1 >OBJ + PRINTI "(" + ZERO? PREP /?ELS18 + ZERO? P-END-ON-PREP \?ELS18 + CALL PREP-FIND,PREP >PREP + PRINTB PREP + EQUAL? PREP,W?OUT \?CND21 + PRINTI " of" +?CND21: PRINTI " " + EQUAL? OBJ,HANDS \?ELS30 + PRINTI "your hands" + JUMP ?CND28 +?ELS30: PRINTI "the " + PRINTD OBJ +?CND28: PRINTI ")" + CRLF + RETURN OBJ +?ELS18: PRINTD OBJ + PRINTI ")" + CRLF + RETURN OBJ +?ELS8: SET 'P-GWIMBIT,0 + RFALSE + + + .FUNCT SNARF-OBJECTS,OPTR,IPTR,L + PUT P-BUTS,P-MATCHLEN,0 + GET P-ITBL,P-NC2 >IPTR + ZERO? IPTR /?CND1 + GETB P-SYNTAX,P-SLOC2 >P-SLOCBITS + GET P-ITBL,P-NC2L + CALL SNARFEM,IPTR,STACK,P-PRSI + ZERO? STACK /FALSE +?CND1: GET P-ITBL,P-NC1 >OPTR + ZERO? OPTR /?CND6 + GETB P-SYNTAX,P-SLOC1 >P-SLOCBITS + GET P-ITBL,P-NC1L + CALL SNARFEM,OPTR,STACK,P-PRSO + ZERO? STACK /FALSE +?CND6: GET P-BUTS,P-MATCHLEN + ZERO? STACK /TRUE + GET P-PRSO,P-MATCHLEN >L + ZERO? OPTR /?CND14 + CALL BUT-MERGE,P-PRSO >P-PRSO +?CND14: ZERO? IPTR /TRUE + ZERO? OPTR /?THN23 + GET P-PRSO,P-MATCHLEN + EQUAL? L,STACK \TRUE +?THN23: CALL BUT-MERGE,P-PRSI >P-PRSI + RTRUE + + + .FUNCT BUT-MERGE,TBL,LEN,BUTLEN,CNT=1,MATCHES=0,OBJ,NTBL + GET TBL,P-MATCHLEN >LEN + PUT P-MERGE,P-MATCHLEN,0 +?PRG1: DLESS? 'LEN,0 \?ELS5 + JUMP ?REP2 +?ELS5: GET TBL,CNT >OBJ + CALL ZMEMQ,OBJ,P-BUTS + ZERO? STACK /?ELS7 + JUMP ?CND3 +?ELS7: ADD MATCHES,1 + PUT P-MERGE,STACK,OBJ + INC 'MATCHES +?CND3: INC 'CNT + JUMP ?PRG1 +?REP2: PUT P-MERGE,P-MATCHLEN,MATCHES + SET 'NTBL,P-MERGE + SET 'P-MERGE,TBL + RETURN NTBL + + + .FUNCT SNARFEM,PTR,EPTR,TBL,BUT=0,LEN,WV,WRD,NW,WAS-ALL=0 + SET 'P-AND,FALSE-VALUE + EQUAL? P-GETFLAGS,P-ALL \?CND1 + SET 'WAS-ALL,TRUE-VALUE +?CND1: SET 'P-GETFLAGS,0 + PUT TBL,P-MATCHLEN,0 + GET PTR,0 >WRD +?PRG4: EQUAL? PTR,EPTR \?ELS8 + ZERO? BUT /?ORP12 + PUSH BUT + JUMP ?THN9 +?ORP12: PUSH TBL +?THN9: CALL GET-OBJECT,STACK >WV + ZERO? WAS-ALL /?CND13 + SET 'P-GETFLAGS,P-ALL +?CND13: RETURN WV +?ELS8: ADD PTR,P-WORDLEN + EQUAL? EPTR,STACK \?ELS21 + SET 'NW,0 + JUMP ?CND19 +?ELS21: GET PTR,P-LEXELEN >NW +?CND19: EQUAL? WRD,W?ALL \?ELS26 + SET 'P-GETFLAGS,P-ALL + EQUAL? NW,W?OF \?CND24 + ADD PTR,P-WORDLEN >PTR + JUMP ?CND24 +?ELS26: EQUAL? WRD,W?BUT,W?EXCEPT \?ELS31 + ZERO? BUT /?ORP37 + PUSH BUT + JUMP ?THN34 +?ORP37: PUSH TBL +?THN34: CALL GET-OBJECT,STACK + ZERO? STACK /FALSE + SET 'BUT,P-BUTS + PUT BUT,P-MATCHLEN,0 + JUMP ?CND6 +?ELS31: EQUAL? WRD,W?A,W?ONE \?ELS39 + ZERO? P-ADJ \?ELS42 + SET 'P-GETFLAGS,P-ONE + EQUAL? NW,W?OF \?CND6 + ADD PTR,P-WORDLEN >PTR + JUMP ?CND6 +?ELS42: SET 'P-NAM,P-ONEOBJ + ZERO? BUT /?ORP53 + PUSH BUT + JUMP ?THN50 +?ORP53: PUSH TBL +?THN50: CALL GET-OBJECT,STACK + ZERO? STACK /FALSE + ZERO? NW /TRUE + JUMP ?CND6 +?ELS39: EQUAL? WRD,W?AND,W?COMMA \?ELS57 + EQUAL? NW,W?AND,W?COMMA /?ELS57 + SET 'P-AND,TRUE-VALUE + ZERO? BUT /?ORP65 + PUSH BUT + JUMP ?THN62 +?ORP65: PUSH TBL +?THN62: CALL GET-OBJECT,STACK + ZERO? STACK \?CND24 + RFALSE +?ELS57: CALL WT?,WRD,PS?BUZZ-WORD + ZERO? STACK /?ELS67 + JUMP ?CND6 +?ELS67: EQUAL? WRD,W?AND,W?COMMA \?ELS69 + JUMP ?CND6 +?ELS69: EQUAL? WRD,W?OF \?ELS71 + ZERO? P-GETFLAGS \?CND24 + SET 'P-GETFLAGS,P-INHIBIT + JUMP ?CND24 +?ELS71: CALL WT?,WRD,PS?ADJECTIVE,P1?ADJECTIVE >WV + ZERO? WV /?ELS76 + ZERO? P-ADJ \?ELS76 + SET 'P-ADJ,WV + SET 'P-ADJN,WRD + JUMP ?CND6 +?ELS76: CALL WT?,WRD,PS?OBJECT,P1?OBJECT + ZERO? STACK /?CND6 + SET 'P-NAM,WRD + SET 'P-ONEOBJ,WRD +?CND24: +?CND6: EQUAL? PTR,EPTR /?PRG4 + ADD PTR,P-WORDLEN >PTR + SET 'WRD,NW + JUMP ?PRG4 + + + .FUNCT GET-OBJECT,TBL,VRB=1,BITS,LEN,XBITS,TLEN,GCHECK=0,OLEN=0,OBJ + SET 'XBITS,P-SLOCBITS + GET TBL,P-MATCHLEN >TLEN + BTST P-GETFLAGS,P-INHIBIT /TRUE + ZERO? P-NAM \?CND4 + ZERO? P-ADJ /?CND4 + CALL WT?,P-ADJN,PS?OBJECT,P1?OBJECT + ZERO? STACK /?ELS11 + SET 'P-NAM,P-ADJN + SET 'P-ADJ,FALSE-VALUE + JUMP ?CND4 +?ELS11: CALL NULL-F + ZERO? STACK /?CND4 +?CND4: ZERO? P-NAM \?CND14 + ZERO? P-ADJ \?CND14 + EQUAL? P-GETFLAGS,P-ALL /?CND14 + ZERO? P-GWIMBIT \?CND14 + ZERO? VRB /FALSE + PRINTI "There seems to be a noun missing in that sentence!" + CRLF + RFALSE +?CND14: EQUAL? P-GETFLAGS,P-ALL \?THN28 + ZERO? P-SLOCBITS \?CND25 +?THN28: SET 'P-SLOCBITS,-1 +?CND25: SET 'P-TABLE,TBL +?PRG30: ZERO? GCHECK /?ELS34 + CALL GLOBAL-CHECK,TBL + JUMP ?CND32 +?ELS34: ZERO? LIT /?CND38 + FCLEAR PLAYER,TRANSBIT + CALL DO-SL,HERE,SOG,SIR + FSET PLAYER,TRANSBIT +?CND38: CALL DO-SL,PLAYER,SH,SC +?CND32: GET TBL,P-MATCHLEN + SUB STACK,TLEN >LEN + BTST P-GETFLAGS,P-ALL \?ELS44 + JUMP ?CND42 +?ELS44: BTST P-GETFLAGS,P-ONE \?ELS46 + ZERO? LEN /?ELS46 + EQUAL? LEN,1 /?CND49 + RANDOM LEN + GET TBL,STACK + PUT TBL,1,STACK + PRINTI "(How about the " + GET TBL,1 + PRINTD STACK + PRINTI "?)" + CRLF +?CND49: PUT TBL,P-MATCHLEN,1 + JUMP ?CND42 +?ELS46: GRTR? LEN,1 /?THN58 + ZERO? LEN \?CND42 + EQUAL? P-SLOCBITS,-1 /?CND42 +?THN58: EQUAL? P-SLOCBITS,-1 \?ELS64 + SET 'P-SLOCBITS,XBITS + SET 'OLEN,LEN + GET TBL,P-MATCHLEN + SUB STACK,LEN + PUT TBL,P-MATCHLEN,STACK + JUMP ?PRG30 +?ELS64: ZERO? LEN \?CND67 + SET 'LEN,OLEN +?CND67: EQUAL? WINNER,PLAYER /?ELS72 + CALL CANT-ORPHAN + RFALSE +?ELS72: ZERO? VRB /?ELS74 + ZERO? P-NAM /?ELS74 + CALL WHICH-PRINT,TLEN,LEN,TBL + EQUAL? TBL,P-PRSO \?ELS81 + PUSH P-NC1 + JUMP ?CND77 +?ELS81: PUSH P-NC2 +?CND77: SET 'P-ACLAUSE,STACK + SET 'P-AADJ,P-ADJ + SET 'P-ANAM,P-NAM + CALL ORPHAN,FALSE-VALUE,FALSE-VALUE + SET 'P-OFLAG,TRUE-VALUE + JUMP ?CND70 +?ELS74: ZERO? VRB /?CND70 + PRINTI "There seems to be a noun missing in that sentence!" + CRLF +?CND70: SET 'P-NAM,FALSE-VALUE + SET 'P-ADJ,FALSE-VALUE + RFALSE +?CND42: ZERO? LEN \?ELS91 + ZERO? GCHECK /?ELS91 + ZERO? VRB /?CND94 + SET 'P-SLOCBITS,XBITS + ZERO? LIT \?THN101 + EQUAL? PRSA,V?TELL \?ELS100 +?THN101: CALL OBJ-FOUND,NOT-HERE-OBJECT,TBL + SET 'P-XNAM,P-NAM + SET 'P-XADJ,P-ADJ + SET 'P-XADJN,P-ADJN + SET 'P-NAM,FALSE-VALUE + SET 'P-ADJ,FALSE-VALUE + SET 'P-ADJN,FALSE-VALUE + RTRUE +?ELS100: PRINTI "It's too dark to see!" + CRLF +?CND94: SET 'P-NAM,FALSE-VALUE + SET 'P-ADJ,FALSE-VALUE + RFALSE +?ELS91: ZERO? LEN \?CND89 + SET 'GCHECK,TRUE-VALUE + JUMP ?PRG30 +?CND89: SET 'P-SLOCBITS,XBITS + SET 'P-NAM,FALSE-VALUE + SET 'P-ADJ,FALSE-VALUE + RTRUE + + + .FUNCT WHICH-PRINT,TLEN,LEN,TBL,OBJ,RLEN + SET 'RLEN,LEN + PRINTI "Which " + ZERO? P-OFLAG \?THN6 + ZERO? P-MERGED \?THN6 + ZERO? P-AND /?ELS5 +?THN6: ZERO? P-NAM /?ELS12 + PUSH P-NAM + JUMP ?CND8 +?ELS12: ZERO? P-ADJ /?ELS15 + PUSH P-ADJN + JUMP ?CND8 +?ELS15: PUSH W?ONE +?CND8: PRINTB STACK + JUMP ?CND3 +?ELS5: EQUAL? TBL,P-PRSO /?PRD21 + PUSH 0 + JUMP ?PRD22 +?PRD21: PUSH 1 +?PRD22: CALL THING-PRINT,STACK +?CND3: PRINTI " do you mean, " +?PRG25: INC 'TLEN + GET TBL,TLEN >OBJ + PRINTI "the " + PRINTD OBJ + EQUAL? LEN,2 \?ELS31 + EQUAL? RLEN,2 /?CND32 + PRINTI "," +?CND32: PRINTI " or " + JUMP ?CND29 +?ELS31: GRTR? LEN,2 \?CND29 + PRINTI ", " +?CND29: DLESS? 'LEN,1 \?PRG25 + PRINTR "?" + + + .FUNCT GLOBAL-CHECK,TBL,LEN,RMG,RMGL,CNT=0,OBJ,OBITS,FOO + GET TBL,P-MATCHLEN >LEN + SET 'OBITS,P-SLOCBITS + GETPT HERE,P?GLOBAL >RMG + ZERO? RMG /?CND1 + PTSIZE RMG + SUB STACK,1 >RMGL +?PRG4: GETB RMG,CNT >OBJ + CALL THIS-IT?,OBJ,TBL + ZERO? STACK /?CND6 + CALL OBJ-FOUND,OBJ,TBL +?CND6: IGRTR? 'CNT,RMGL \?PRG4 +?CND1: GETPT HERE,P?PSEUDO >RMG + ZERO? RMG /?CND12 + PTSIZE RMG + DIV STACK,4 + SUB STACK,1 >RMGL + SET 'CNT,0 +?PRG15: MUL CNT,2 + GET RMG,STACK + EQUAL? P-NAM,STACK \?ELS19 + MUL CNT,2 + ADD STACK,1 + GET RMG,STACK + PUTP PSEUDO-OBJECT,P?ACTION,STACK + GETPT PSEUDO-OBJECT,P?ACTION + SUB STACK,5 >FOO + GET P-NAM,0 + PUT FOO,0,STACK + GET P-NAM,1 + PUT FOO,1,STACK + CALL OBJ-FOUND,PSEUDO-OBJECT,TBL + JUMP ?CND12 +?ELS19: IGRTR? 'CNT,RMGL \?PRG15 +?CND12: GET TBL,P-MATCHLEN + EQUAL? STACK,LEN \FALSE + SET 'P-SLOCBITS,-1 + SET 'P-TABLE,TBL + CALL DO-SL,GLOBAL-OBJECTS,1,1 + SET 'P-SLOCBITS,OBITS + GET TBL,P-MATCHLEN + ZERO? STACK \FALSE + EQUAL? PRSA,V?LOOK-INSIDE,V?SEARCH,V?EXAMINE \FALSE + CALL DO-SL,ROOMS,1,1 + RSTACK + + + .FUNCT DO-SL,OBJ,BIT1,BIT2,BTS + ADD BIT1,BIT2 + BTST P-SLOCBITS,STACK \?ELS5 + CALL SEARCH-LIST,OBJ,P-TABLE,P-SRCALL + RSTACK +?ELS5: BTST P-SLOCBITS,BIT1 \?ELS12 + CALL SEARCH-LIST,OBJ,P-TABLE,P-SRCTOP + RSTACK +?ELS12: BTST P-SLOCBITS,BIT2 \TRUE + CALL SEARCH-LIST,OBJ,P-TABLE,P-SRCBOT + RSTACK + + + .FUNCT SEARCH-LIST,OBJ,TBL,LVL,FLS,NOBJ + FIRST? OBJ >OBJ \FALSE +?PRG6: EQUAL? LVL,P-SRCBOT /?CND8 + GETPT OBJ,P?SYNONYM + ZERO? STACK /?CND8 + CALL THIS-IT?,OBJ,TBL + ZERO? STACK /?CND8 + CALL OBJ-FOUND,OBJ,TBL +?CND8: EQUAL? LVL,P-SRCTOP \?THN18 + FSET? OBJ,SEARCHBIT /?THN18 + FSET? OBJ,SURFACEBIT \?CND13 +?THN18: FIRST? OBJ >NOBJ \?CND13 + FSET? OBJ,OPENBIT /?THN20 + FSET? OBJ,TRANSBIT \?CND13 +?THN20: FSET? OBJ,SURFACEBIT \?ELS26 + PUSH P-SRCALL + JUMP ?CND22 +?ELS26: FSET? OBJ,SEARCHBIT \?ELS28 + PUSH P-SRCALL + JUMP ?CND22 +?ELS28: PUSH P-SRCTOP +?CND22: CALL SEARCH-LIST,OBJ,TBL,STACK >FLS +?CND13: NEXT? OBJ >OBJ /?PRG6 + RTRUE + + + .FUNCT OBJ-FOUND,OBJ,TBL,PTR + GET TBL,P-MATCHLEN >PTR + ADD PTR,1 + PUT TBL,STACK,OBJ + ADD PTR,1 + PUT TBL,P-MATCHLEN,STACK + RTRUE + + + .FUNCT TAKE-CHECK + GETB P-SYNTAX,P-SLOC1 + CALL ITAKE-CHECK,P-PRSO,STACK + ZERO? STACK /FALSE + GETB P-SYNTAX,P-SLOC2 + CALL ITAKE-CHECK,P-PRSI,STACK + RSTACK + + + .FUNCT ITAKE-CHECK,TBL,IBITS,PTR,OBJ,TAKEN + GET TBL,P-MATCHLEN >PTR + ZERO? PTR /TRUE + BTST IBITS,SHAVE /?THN8 + BTST IBITS,STAKE \TRUE +?THN8: +?PRG10: DLESS? 'PTR,0 /TRUE + ADD PTR,1 + GET TBL,STACK >OBJ + EQUAL? OBJ,IT \?CND17 + CALL ACCESSIBLE?,P-IT-OBJECT + ZERO? STACK \?ELS22 + PRINTI "I don't see what you're referring to." + CRLF + RFALSE +?ELS22: SET 'OBJ,P-IT-OBJECT +?CND17: CALL HELD?,OBJ + ZERO? STACK \?PRG10 + EQUAL? OBJ,HANDS,ME /?PRG10 + SET 'PRSO,OBJ + FSET? OBJ,TRYTAKEBIT \?ELS34 + SET 'TAKEN,TRUE-VALUE + JUMP ?CND32 +?ELS34: EQUAL? WINNER,ADVENTURER /?ELS36 + SET 'TAKEN,FALSE-VALUE + JUMP ?CND32 +?ELS36: BTST IBITS,STAKE \?ELS38 + CALL ITAKE,FALSE-VALUE + EQUAL? STACK,TRUE-VALUE \?ELS38 + SET 'TAKEN,FALSE-VALUE + JUMP ?CND32 +?ELS38: SET 'TAKEN,TRUE-VALUE +?CND32: ZERO? TAKEN /?ELS45 + BTST IBITS,SHAVE \?ELS45 + EQUAL? WINNER,ADVENTURER \?ELS45 + EQUAL? OBJ,NOT-HERE-OBJECT \?CND48 + PRINTI "You don't have that!" + CRLF + RFALSE +?CND48: PRINTI "You don't have the " + PRINTD OBJ + PRINTI "." + CRLF + RFALSE +?ELS45: ZERO? TAKEN \?PRG10 + EQUAL? WINNER,ADVENTURER \?PRG10 + PRINTI "(Taken)" + CRLF + JUMP ?PRG10 + + + .FUNCT MANY-CHECK,LOSS=0,TMP,?TMP1 + GET P-PRSO,P-MATCHLEN + GRTR? STACK,1 \?ELS3 + GETB P-SYNTAX,P-SLOC1 + BTST STACK,SMANY /?ELS3 + SET 'LOSS,1 + JUMP ?CND1 +?ELS3: GET P-PRSI,P-MATCHLEN + GRTR? STACK,1 \?CND1 + GETB P-SYNTAX,P-SLOC2 + BTST STACK,SMANY /?CND1 + SET 'LOSS,2 +?CND1: ZERO? LOSS /TRUE + PRINTI "You can't use multiple " + EQUAL? LOSS,2 \?CND18 + PRINTI "in" +?CND18: PRINTI "direct objects with """ + GET P-ITBL,P-VERBN >TMP + ZERO? TMP \?ELS27 + PRINTI "tell" + JUMP ?CND25 +?ELS27: ZERO? P-OFLAG \?THN32 + ZERO? P-MERGED /?ELS31 +?THN32: GET TMP,0 + PRINTB STACK + JUMP ?CND25 +?ELS31: GETB TMP,2 >?TMP1 + GETB TMP,3 + CALL WORD-PRINT,?TMP1,STACK +?CND25: PRINTI """." + CRLF + RFALSE + + + .FUNCT ZMEMQ,ITM,TBL,SIZE=-1,CNT=1 + ZERO? TBL /FALSE + LESS? SIZE,0 /?ELS6 + SET 'CNT,0 + JUMP ?CND4 +?ELS6: GET TBL,0 >SIZE +?CND4: +?PRG9: GET TBL,CNT + EQUAL? ITM,STACK \?ELS13 + MUL CNT,2 + ADD TBL,STACK + RSTACK +?ELS13: IGRTR? 'CNT,SIZE \?PRG9 + RFALSE + + + .FUNCT ZMEMQB,ITM,TBL,SIZE,CNT=0 +?PRG1: GETB TBL,CNT + EQUAL? ITM,STACK /TRUE + IGRTR? 'CNT,SIZE \?PRG1 + RFALSE + + + .FUNCT LIT?,RM,RMBIT=1,OHERE,LIT=0 + ZERO? ALWAYS-LIT /?CND1 + EQUAL? WINNER,PLAYER /TRUE +?CND1: SET 'P-GWIMBIT,ONBIT + SET 'OHERE,HERE + SET 'HERE,RM + ZERO? RMBIT /?ELS8 + FSET? RM,ONBIT \?ELS8 + SET 'LIT,TRUE-VALUE + JUMP ?CND6 +?ELS8: PUT P-MERGE,P-MATCHLEN,0 + SET 'P-TABLE,P-MERGE + SET 'P-SLOCBITS,-1 + EQUAL? OHERE,RM \?CND13 + CALL DO-SL,WINNER,1,1 + EQUAL? WINNER,PLAYER /?CND13 + IN? PLAYER,RM \?CND13 + CALL DO-SL,PLAYER,1,1 +?CND13: CALL DO-SL,RM,1,1 + GET P-TABLE,P-MATCHLEN + GRTR? STACK,0 \?CND6 + SET 'LIT,TRUE-VALUE +?CND6: SET 'HERE,OHERE + SET 'P-GWIMBIT,0 + RETURN LIT + + + .FUNCT THIS-IT?,OBJ,TBL,SYNS,?TMP1 + FSET? OBJ,INVISIBLE /FALSE + ZERO? P-NAM /?ELS5 + GETPT OBJ,P?SYNONYM >SYNS + PTSIZE SYNS + DIV STACK,2 + SUB STACK,1 + CALL ZMEMQ,P-NAM,SYNS,STACK + ZERO? STACK /FALSE +?ELS5: ZERO? P-ADJ /?ELS9 + GETPT OBJ,P?ADJECTIVE >SYNS + ZERO? SYNS /FALSE + PTSIZE SYNS + SUB STACK,1 + CALL ZMEMQB,P-ADJ,SYNS,STACK + ZERO? STACK /FALSE +?ELS9: ZERO? P-GWIMBIT /TRUE + FSET? OBJ,P-GWIMBIT /TRUE + RFALSE + + + .FUNCT ACCESSIBLE?,OBJ,L,?TMP1 + LOC OBJ >L + FSET? OBJ,INVISIBLE /FALSE + ZERO? L /FALSE + EQUAL? L,GLOBAL-OBJECTS /TRUE + EQUAL? L,LOCAL-GLOBALS \?ELS11 + CALL GLOBAL-IN?,OBJ,HERE + ZERO? STACK \TRUE +?ELS11: CALL META-LOC,OBJ >?TMP1 + LOC WINNER + EQUAL? ?TMP1,HERE,STACK \FALSE + LOC WINNER + EQUAL? L,WINNER,HERE,STACK /TRUE + FSET? L,OPENBIT \FALSE + CALL ACCESSIBLE?,L + ZERO? STACK /FALSE + RTRUE + + + .FUNCT META-LOC,OBJ +?PRG1: ZERO? OBJ /FALSE + IN? OBJ,GLOBAL-OBJECTS \?CND3 + RETURN GLOBAL-OBJECTS +?CND3: IN? OBJ,ROOMS \?ELS10 + RETURN OBJ +?ELS10: LOC OBJ >OBJ + JUMP ?PRG1 + + .ENDI diff --git a/gparser.zil b/gparser.zil index 31a6bf1..e99fdbc 100644 --- a/gparser.zil +++ b/gparser.zil @@ -2,145 +2,143 @@ The ZORK Trilogy started on 7/28/83 by MARC" -"WHICH and TRAP retrofixes installed" +;"WHICH and TRAP retrofixes installed" -"Parser global variable convention: All parser globals will +"Parser global variable convention: All parser globals will begin with 'P-'. Local variables are not restricted in any way. -" - - - -> - -> - -> +" + + +> +> > - - - - - - - - - - - - + + + + +> +;"pointers used by CLAUSE-COPY (source/destination beginning/end pointers)" + + + + + + + - - - -> -;"INBUF - Input buffer for READ" - -> -;"Parse-cont variable" - -> - + + + ;> + ;> + ;> +> + +;"INBUF - Input buffer for READ" + + + ;> + + ;> + <> <> <>>> + "word pointer to unknown token in P-LEXV" + "word pointer to sentence start in P-LEXV" + "byte length of unparsed tokens in P-LEXV" + "byte pointer to first free byte in OOPS-INBUF" + +;"Parse-cont variable" + +> > -> +;> -;"Orphan flag" - -> - +;"Orphan flag" + +> > - -> - -> - +> +> > ;"Parser variables and temporaries" - - - - - - -;"Byte offset to # of entries in LEXV" - - -;"Word offset to start of LEXV entries" - - -;"Number of words per LEXV entry" - - - - -;"Offset to parts of speech byte" - - -;"Offset to first part of speech" - - -;"First part of speech bit mask in PSOFF byte" - - - - - -> - -> - -> - - - - +;"Byte offset to # of entries in LEXV" + + ;"Word offset to start of LEXV entries" + ;"Number of words per LEXV entry" + + ;"Offset to parts of speech byte" + + ;"Offset to first part of speech" + ;"First part of speech bit mask in PSOFF byte" + + + +> +> +> +> + + + + - - - - + - - - - - - - - - - - + + + + + + > +> " Grovel down the input finding the verb, prepositions, and noun clauses. If the input is or , fall out immediately setting PRSA to ,V?WALK and PRSO to . Otherwise, perform - all required orphaning, syntax checking, and noun clause lookup." + all required orphaning, syntax checking, and noun clause lookup." -) - LEN (DIR <>) (NW 0) (LW 0) NUM SCNT (CNT -1)) +) (OF-FLAG <>) + OWINNER OMERGED LEN (DIR <>) (NW 0) (LW 0) (CNT -1)) > ,P-ITBLLEN> ) - (T )>> + (T + + >)> + )>> + + > > + > > - ,VEHBIT>> + > + ; ,VEHBIT>> >)> >)> - + + > + )> + > + >) + (,P-CONT - <==? ,PLAYER ,WINNER> + >> )> >) @@ -154,33 +152,124 @@ "> )> > - )> - - > - - - )> + > ,W?OOPS> + > + ,W?PERIOD ,W?COMMA> + > + >)> + > + + ) + ( + + > + ,W?QUOTE>> + + ) + ( + )> + + >> + ;"maybe fix oops vs. chars.?" + 6>> + 7>> + <+ <* ,P-LEXELEN> 3>> + + > + > + ) + (T + > + + )>) + (T + > + )> + >)> + ,W?AGAIN ,W?G> + > + + ) + (,P-OFLAG + + ) + ( + + ) + ( + > + ,W?PERIOD ,W?COMMA ,W?THEN> + > + ,W?AND>> + >> + 2>>) + (T + + )>) + (T + > + 1>>)> + 0> + + ) + (T + >)> + ;> + + + + + + + ) + (T >)>>) + (T + + + + > + >>>> + > + >>> + > + + > + + + > 0> > ) (> >> - + ) + (T >>)> + > ) - ( + ( + ;"Last NOT added 7/3"> - - - )> - - > + + ) + (ELSE + + + )>)> + >) (T )>)> - + >> ) @@ -189,18 +278,16 @@ ,PS?DIRECTION ,P1?DIRECTION>> ,ACT?WALK> - - + + > - >> + >> + > >>> @@ -219,42 +306,50 @@ 2>>>> - >>) + >>) (> - - - > - >> - - <==? > - ,W?OF> - <0? .VAL> - >>) - (> - - > - ,W?THEN ,W?PERIOD>>> + + + > + + + + > + ;>> + ) + (> + + >> + )>) - (<==? ,P-NCN 2> + ( ) (T > + > > > )>)>) + ( + + > + + ) + (T + >)>) () ( - > + + > @@ -266,43 +361,90 @@ or creatures." CR> )> - >> + >>)> + > + > - )> - > - )> - > - T)>> - + ) + (ELSE + )> + > + > + + + + > + T)>)>> +> > +> + +;"For AGAIN purposes, put contents of one LEXV table into another." +> + > + > + 2>> + > + 3>> + > + > + + )>>> + +;"Put contents of one INBUF into another" + 1>> + > + )>>> + +;"Put the word in the positions specified from P-INBUF to the end of +OOPS-INBUF, leaving the appropriate pointers in AGAIN-LEXV" +> + ) + (T + >> + >>>)> + > + >> + > + )>> + + .LEN>> ;"Check whether word pointed at by PTR is the correct part of speech. The second argument is the part of speech (,PS?). The 3rd argument (,P1?), if given, causes the value - for that part of speech to be returned." + for that part of speech to be returned." -> .BIT> ) (T > - > >)> + > >)> )>)>> ;" Scan through a noun clause, leave a pointer to its starting location" - -) (FIRST?? T) NW (LW 0)) + +) (FIRST?? T) NW (LW 0)) 2>> - > + > > .VAL> .WRD> >) (T >)> - > )> + > )> > >> ,W?THE ,W?A ,W?AN> 4>>)> @@ -312,11 +454,11 @@ or creatures." CR> )> > >> - ) + ) (T >>)> ) - ( - + ( + > >)>) ( @@ -337,7 +479,7 @@ or creatures." CR> ( - > + > >) ( > @@ -365,7 +507,7 @@ or creatures." CR> (T )> > - >>> + >>> )) > 2>> @@ -374,7 +516,7 @@ or creatures." CR> > 0> ) (T > - + ) ( ) @@ -392,44 +534,58 @@ or creatures." CR> ,W?INTNUM> + ;"New ORPHAN-MERGE for TRAP Retrofix 6/21/84" -) WRD) +) WRD) > - 0> ,PS?ADJECTIVE ,P1?ADJECTIVE> - )> - >>> + 0>> + ,PS?VERB ,P1?VERB> + > + >>> + ) + (>> + > + + + > + > + )> + >>> - >>> + >>> ) - (<==? ,P-NCN 2> ) - (<==? 1> - > + ( ) + ( 1> + > > - <0? .TEMP>> + > > - >) + > + >)> + )>) (T - > - >)>) + >)> + >) (T )>) - (<==? 1> - > + ( 1> + > > - <0? .TEMP>> + > > - >)> + > + >)>)> > > ) (T )>) (> - > > + > > > ) (T @@ -438,7 +594,7 @@ or creatures." CR> > > - + ) (T > )>) ( @@ -446,17 +602,26 @@ or creatures." CR> ,PS?ADJECTIVE> >> ) - ( ,PS?OBJECT> - <==? .WRD ,W?ONE>> - > - ) - (T )>)> + ( + + ) + ( ,PS?OBJECT> + + ) + (T + )> + )> > > )>>)>)> + > + > + > + + > ,P-ITBLLEN> @@ -466,16 +631,29 @@ or creatures." CR> ;"New ACLAUSE-WIN for TRAP retrofix 6/21/84" -> - - .ADJ> - 0>> > + + > + + > + + 0>> > + > + > + + + + + > + + 0>> > > > ;"Print undefined word in input. - PTR points to the unknown word in P-LEXV" + PTR points to the unknown word in P-LEXV" > >)>>> - )> @@ -495,7 +674,7 @@ or creatures." CR> > >> - )> @@ -509,33 +688,25 @@ or creatures." CR> ;" Perform syntax matching operations, using P-ITBL as the source of the verb and adjectives for this input. Returns false if no syntax matches, and does it's own orphaning. If return is true, - the syntax is saved in P-SYNTAX." - - - - - + the syntax is saved in P-SYNTAX." + + + + + - - - - - - - - - + + + + - - - - - - + + + ) (DRIVE2 <>) PREP VERB TMP) - >> + (DRIVE1 <>) (DRIVE2 <>) PREP VERB TMP) + >> )> >> @@ -545,14 +716,14 @@ or creatures." CR> ,P-SONUMS>> T) (> - <0? ,P-NCN> - >> - <==? .PREP >>> + + >> + >>> ) - (<==? > - <==? ,P-NCN 1>> + ( > + > ) - (<==? + ( > )>)> @@ -582,62 +753,97 @@ or creatures." CR> ( ) - (> + (> ) (T > - ) - (<0? > + ) + (> >) (T > )> )> + + )> ) (T )>> - )>> + )>> > - - + + )> + > + > + > ) (T >)>> - )> - > )> + + + + + + )> + > + + + + + )> > ) (.D2 > - )>> - - .THE?>> - -) WRD (FIRST?? T) (PN <>)) + )>> + +; .THE?>> + +) "AUX" BEG END) + > + >) + (ELSE + > + >)> + > + +) (Q? <>)) ) + ) (T - >) - (T )> - > ,W?PERIOD> ) + > + T) + ( + ) + (.NOSP >) + (ELSE )> + + ) + ( + + ) + ( + + ) (T .CP> )> ) - ( - <==? ,P-IT-LOC ,HERE>> + ( + > ) (T @@ -645,98 +851,101 @@ or creatures." CR> >)>)> >>> -> 32>> - 1> <+ 1>>> - -> +> - > - )>> - -) "AUX" BEG END) - > - > - + ) + (T + > + )>)>> + +) "AUX" BEG END) + >> + >> + ,P-LEXELEN> 2>>> - + ,P-LEXELEN> 2>>> ) (T - >> + >> )> >)> - >>> + >>> - 2>> .WRD> - > - -> + + 2>> ) - (<==? .PREP> - >>)>>> - - .PREP> + >>)>>> + + - >> - + >> + - - + + )> > - 1> - > ,ME> - )> + 1> + > - > + > + > >> - + )> - - ) + + + ) (T - )>)> - > + )> + ) + (ELSE )> .OBJ)>) - (T )>> - -> 0>> - > - ,P-PRSO> > - > - >>)> - > 0>> - > - ,P-PRSI> > - >> - 1> - >) - (T >)>)>)> - > + (T )>> + + + > 0>> + > + ,P-PRSI> >)> + > 0>> + > + ,P-PRSO> >)> + >> + > + >)> + + >>> + >)>)> + > -> - .NTBL> - -> - -> - -> + .NTBL> -> - -> - -> - -> - -> - +> +> +> +> +> +> +> +> > - - - - - - - - - - + + + + + -> -> + > -) LEN WV WRD NW) +) LEN WV WRD NW (WAS-ALL <>)) > + + )> - - - > >>) + + >> + )> + ) (T - > - + > + ) + (T >)> + - + >)>) ( > > @@ -806,12 +1005,12 @@ or creatures." CR> ( - + >)>) (T > > - >)>) + >)>) ( >> @@ -819,8 +1018,8 @@ or creatures." CR> T) () () - (<==? .WRD ,W?OF> - + ( + )>) (> > @@ -829,42 +1028,47 @@ or creatures." CR> ( )>)> - > + > > - )>>> - - - - - - - - - - - - - - - + )>>> + + + + + + + + + ) (OLEN 0) OBJ) > )> - ,P-ADJ > - - >)> + ,P-ADJ> + + + >) + % + '(> + > + + + + )) + (ELSE '( T))>>)> - > - <0? ,P-GWIMBIT>> + > + > )> )> - > <0? ,P-SLOCBITS>> + > > )> .TLEN>> ) ( - >> - > + >> + > >> > )> ) ( - >>> - + >>> + <- .LEN>> ) (T - )> - > + )> + > ) ( ,P-NC1) + ,P-NC1) (T ,P-NC2)>> @@ -913,10 +1117,12 @@ or creatures." CR> "There seems to be a noun missing in that sentence!" CR>)> > > - )>) - ( .GCHECK> + )>)> + .GCHECK> + > ;"Changed 6/10/83 - MARC" @@ -930,13 +1136,13 @@ or creatures." CR> > > ) - (<0? .LEN> )> + ( )> > > >> - @@ -957,25 +1163,27 @@ or creatures." CR> > .LEN> -> +;> > > > - - ) - (<==? .TBL ,P-PRSO> - >) - (T >)> + + + >) + (ELSE + >)> > > - - > )> + + > )> ) ( )> > 1> @@ -983,7 +1191,7 @@ or creatures." CR> )>>> -> > @@ -996,7 +1204,7 @@ or creatures." CR> 4> 1>> >> + >> 1>>> @@ -1007,16 +1215,16 @@ or creatures." CR> ) ( )>>)> - .LEN> + .LEN> - > + > > )>)>> - -> ) (T @@ -1024,22 +1232,20 @@ or creatures." CR> ) ( ) - (T )>)>> - - - - - - - -)>)>> + + + + + +> > + > > )> - > + > > > @@ -1053,18 +1259,18 @@ or creatures." CR> ( ,P-SRCALL) (T ,P-SRCTOP)>>>)> - >) (T )>>)>> - ->) (T )>>)>> + +> .OBJ> - >> - ->> + +> - >>> + >>> -) > @@ -1074,16 +1280,22 @@ or creatures." CR> > 0> ) (T >> - )> + + > + + ) + (T + )>)> > - >> + >> ) - (> + (> >) ( - <==? > T>> + > T>> >) (T )> ) ( - <==? ,WINNER ,ADVENTURER>> + > )>)>)>>) - (T)>> - -) TMP) + (T)>> + +) TMP) 1> ,SMANY>>> ) @@ -1113,34 +1325,37 @@ or creatures." CR> )> - )> + )> > - ) + ) ( >) (T >)> ) - (T)>> - -> + + )> > ) (ELSE >)> > ) - ( )>>> + > + >>) + ( )>>> -> ) - ( )>>> - + > + ) + ( + )>>> + > -)) +)) > )> @@ -1153,7 +1368,7 @@ or creatures." CR> - + > > @@ -1162,23 +1377,23 @@ or creatures." CR> 0> )>)> - .LIT> - - + +;> 0> ,W?IT>> + > 0> ,W?IT>> ) (T <>>)>> -> 0> ,W?IT>> + > 0> ,W?IT>> ) (T <>>)>> ;"former CRUFTY routine, re-written by SWG" - ) ( >> 1>>>>> ) - (> >> + (> >> )> - > \ No newline at end of file + > + +)) ;"can player TOUCH object?" + ;"revised 5/2/84 by SEM and SWG" + + ) + ;( + + ) + (T + )>) + ( + ) + ( + ) + ( + > + ) + ( ,HERE >> + ) + (> + ) + ( + > + ) + (T + )>> + + + ) + ( + )> + + ) + (T + >)>>> diff --git a/gsyntax.diffs b/gsyntax.diffs new file mode 100644 index 0000000..2074dda --- /dev/null +++ b/gsyntax.diffs @@ -0,0 +1,117 @@ + +;COMPARISON OF SS:GSYNTAX.ZIL.140 AND SS:GSYNTAX.ZIL.141 +;OPTIONS ARE /3 + +**** FILE SS:GSYNTAX.ZIL.140, 1-9 (143) + +**** FILE SS:GSYNTAX.ZIL.141, 1-9 (143) + + + )> +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-65 (1209) + +**** FILE SS:GSYNTAX.ZIL.141, 1-67 (1250) + + + + +; +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-83 (1536) + +**** FILE SS:GSYNTAX.ZIL.141, 1-93 (1724) +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-118 (2723) + + + +**** FILE SS:GSYNTAX.ZIL.141, 1-127 (2840) + + + +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-153 (4098) + + +GSYNTAX.ZIL.141, 1-162 (4176) + +GSYNTAX.ZIL.140, 1-188 (5237) + +**** FILE SS:GSYNTAX.ZIL.141, 1-196 (5283) + +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-204 (5855) + + +**** FILE SS:GSYNTAX.ZIL.141, 1-212 (5870) + + +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-254 (7326) + +**** FILE SS:GSYNTAX.ZIL.141, 1-262 (7321) +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-319 (9832) +**** FILE SS:GSYNTAX.ZIL.141, 1-325 (9756) + +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-418 (13394) + +**** FILE SS:GSYNTAX.ZIL.141, 1-426 (13380) + +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-450 (14333) +**** FILE SS:GSYNTAX.ZIL.141, 1-458 (14326) + +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-471 (15314) + +**** FILE SS:GSYNTAX.ZIL.141, 1-480 (15345) +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-494 (16312) + WITH OBJECT (FIND TOOLBIT) (ON-GROUND IN-ROOM HELD CARRIED HAVE) + = V-TURN PRE-TURN> +**** FILE SS:GSYNTAX.ZIL.141, 1-502 (16273) + WITH OBJECT (FIND RMUNGBIT) = V-TURN PRE-TURN> +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-512 (17130) + +**** FILE SS:GSYNTAX.ZIL.141, 1-519 (17052) + +*************** + +**** FILE SS:GSYNTAX.ZIL.140, 1-535 (18021) + + +**** FILE SS:GSYNTAX.ZIL.141, 1-542 (17935) + +*************** + diff --git a/gsyntax.zap b/gsyntax.zap new file mode 100644 index 0000000..a92e0b4 --- /dev/null +++ b/gsyntax.zap @@ -0,0 +1,2 @@ + + .ENDI diff --git a/gsyntax.zil b/gsyntax.zil index a7cb5eb..d3efab5 100644 --- a/gsyntax.zil +++ b/gsyntax.zil @@ -6,10 +6,16 @@ "Buzzwords, Prepositions and Directions" - + + + + + + ) + (<==? ,ZORK-NUMBER 3> + )> @@ -62,7 +68,15 @@ - + + + + + + + + +; ^L @@ -71,8 +85,8 @@ - - +; +; @@ -80,7 +94,10 @@ - + + )> + @@ -117,7 +134,7 @@ - + @@ -150,11 +167,11 @@ - - + + @@ -170,7 +187,7 @@ - +; @@ -185,7 +202,7 @@ - + - + (HELD CARRIED ON-GROUND IN-ROOM) = V-FILL PRE-FILL> @@ -219,11 +236,9 @@ TO OBJECT (FIND ACTORBIT) (ON-GROUND) = V-GIVE PRE-GIVE> - - + + )> @@ -237,8 +252,8 @@ - - +; +; @@ -251,7 +266,10 @@ - + + )> + @@ -312,9 +330,12 @@ + + + @@ -415,7 +436,7 @@ - + @@ -447,6 +468,7 @@ + @@ -456,7 +478,7 @@ - + + WITH OBJECT (FIND RMUNGBIT) = V-TURN PRE-TURN> @@ -518,6 +539,7 @@ + @@ -533,7 +555,7 @@ - + diff --git a/gverbs.diffs b/gverbs.diffs new file mode 100644 index 0000000..1a66173 --- /dev/null +++ b/gverbs.diffs @@ -0,0 +1,392 @@ + +;COMPARISON OF SS:GVERBS.ZIL.407 AND SS:GVERBS.ZIL.391 +;OPTIONS ARE /3 + +**** FILE SS:GVERBS.ZIL.407, 1-82 (1812) +Copyright (c) 1981, 1982, 1983 Infocom, Inc. ">) +**** FILE SS:GVERBS.ZIL.391, 1-82 (1812) +Copyright (c) 1981, 1982, 1983, 1984, 1985 Infocom, Inc. ">) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-86 (1984) +Copyright (c) 1981, 1982, 1983, 1984 Infocom, Inc. ">) +**** FILE SS:GVERBS.ZIL.391, 1-86 (1996) +Copyright (c) 1981, 1982, 1983 Infocom, Inc. ">) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-112 (2750) + + > + ) + (T + + )> + > +**** FILE SS:GVERBS.ZIL.391, 1-112 (2756) + + > +> + ) + (T + > + )>> + + > + + > +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-229 (5915) + + ) +**** FILE SS:GVERBS.ZIL.391, 1-238 (6054) +> + + ) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-245 (6360) + + + + ) +**** FILE SS:GVERBS.ZIL.391, 1-257 (6526) + + > + + + + + ) + (T )> + ) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-266 (6914) + + '( + )) + (T + '( + + ))> +**** FILE SS:GVERBS.ZIL.391, 1-283 (7216) + + + ) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-358 (9735) +**** FILE SS:GVERBS.ZIL.391, 1-371 (9913) + + + )> +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-373 (10192) + +**** FILE SS:GVERBS.ZIL.391, 1-390 (10493) + + ) + ( +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-440 (12400) + > > + +**** FILE SS:GVERBS.ZIL.391, 1-459 (12788) + > + > + ,WINNER>>> + ) + ( +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-452 (12816) + + > + ) + ( + ) + (> +**** FILE SS:GVERBS.ZIL.391, 1-474 (13308) + > + ) + ( + >> + ) + ( ;> +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-474 (13467) + + >> + )>> +**** FILE SS:GVERBS.ZIL.391, 1-496 (13979) + > +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-564 (16542) + > + >)> +**** FILE SS:GVERBS.ZIL.391, 1-584 (16967) + >)> +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-586 (17073) + + + ) + (T )>> +**** FILE SS:GVERBS.ZIL.391, 1-605 (17476) + > +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-596 (17299) + > + 1>>> + + ) + (> + + ) + (T + + )>)> + + ) +**** FILE SS:GVERBS.ZIL.391, 1-612 (17617) + > + 1>>> + + ) + (T + + )>) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-756 (21795) + ( + ) +**** FILE SS:GVERBS.ZIL.391, 1-767 (21960) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-960 (27706) + + )>> +**** FILE SS:GVERBS.ZIL.391, 1-968 (27765) + )>> +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1313 (37385) + % + '( + > + )) + (T + '( T))> +**** FILE SS:GVERBS.ZIL.391, 1-1320 (37425) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1351 (38471) + + > +**** FILE SS:GVERBS.ZIL.391, 1-1352 (38359) + + >> + +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1357 (38659) + (>> +**** FILE SS:GVERBS.ZIL.391, 1-1359 (38571) + ( >> +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1395 (40068) +**** FILE SS:GVERBS.ZIL.391, 1-1397 (39987) + (.OBJ + ) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1409 (40583) + (> +**** FILE SS:GVERBS.ZIL.391, 1-1413 (40557) + ( +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1413 (40731) + (T )>) + (T )>> +**** FILE SS:GVERBS.ZIL.391, 1-1417 (40693) + (T )>)>> +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1443 (41553) + > +**** FILE SS:GVERBS.ZIL.391, 1-1446 (41485) + + >> + ) + (> +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1503 (43288) + +**** FILE SS:GVERBS.ZIL.391, 1-1509 (43342) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1604 (45864) + > +**** FILE SS:GVERBS.ZIL.391, 1-1609 (45881) + > +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1650 (47403) + ( + > +**** FILE SS:GVERBS.ZIL.391, 1-1655 (47398) + ( +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1688 (48515) + "AUX" Y 1ST? AV STR (PV? <>) (INV? <>)) +**** FILE SS:GVERBS.ZIL.391, 1-1692 (48477) + "AUX" Y 1ST? SHIT AV STR (PV? <>) (INV? <>)) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1694 (48721) +**** FILE SS:GVERBS.ZIL.391, 1-1698 (48688) + +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1698 (48810) + + '( + + <==? ,SPELL? ,S-FANTASIZE> + > + + " here." CR> + >)> + >)) + (ELSE + '( + >))> +**** FILE SS:GVERBS.ZIL.391, 1-1703 (48793) + + ) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1718 (49441) +**** FILE SS:GVERBS.ZIL.391, 1-1712 (49096) + > +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1731 (49864) + >) +**** FILE SS:GVERBS.ZIL.391, 1-1726 (49544) + ) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1749 (50514) + >>> +**** FILE SS:GVERBS.ZIL.391, 1-1744 (50182) + >> + ) (T )>> +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1882 (53926) +"You try to pick it up, but with everything else you have, you can't manage +to hold onto it!" CR> +**** FILE SS:GVERBS.ZIL.391, 1-1878 (53645) +"You're holding too many things already!" CR> +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1887 (54075) + +**** FILE SS:GVERBS.ZIL.391, 1-1882 (53741) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-1984 (56471) + (AV <>) OLIT OHERE) + + +**** FILE SS:GVERBS.ZIL.391, 1-1978 (56109) + (AV <>) OLIT) + +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-2008 (57052) + > > + % + ') + (T + ' + ) + ( + )>)>)> +**** FILE SS:GVERBS.ZIL.391, 1-2001 (56663) + > + + > + )> +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-2054 (58530) + (> + > + ) + (> + )> + )>> +> + )>> +**** FILE SS:GVERBS.ZIL.391, 1-2042 (57947) + (> + ) + (.V? )> + )>> +;"0 -> no next, 1 -> success, 2 -> failed move" +> + > 2) + (T 1)>)>> +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-2121 (60321) + + )> +**** FILE SS:GVERBS.ZIL.391, 1-2109 (59729) +*************** + +**** FILE SS:GVERBS.ZIL.407, 1-2127 (60455) + + > +**** FILE SS:GVERBS.ZIL.391, 1-2113 (59811) + > +*************** + diff --git a/gverbs.zap b/gverbs.zap new file mode 100644 index 0000000..3544724 --- /dev/null +++ b/gverbs.zap @@ -0,0 +1,2397 @@ + + + .FUNCT V-VERBOSE + SET 'VERBOSE,TRUE-VALUE + SET 'SUPER-BRIEF,FALSE-VALUE + PRINTR "Maximum verbosity." + + + .FUNCT V-BRIEF + SET 'VERBOSE,FALSE-VALUE + SET 'SUPER-BRIEF,FALSE-VALUE + PRINTR "Brief descriptions." + + + .FUNCT V-SUPER-BRIEF + SET 'SUPER-BRIEF,TRUE-VALUE + PRINTR "Superbrief descriptions." + + + .FUNCT V-INVENTORY + FIRST? WINNER \?ELS5 + CALL PRINT-CONT,WINNER + RSTACK +?ELS5: PRINTR "You are empty-handed." + + + .FUNCT FINISH,WRD + CALL V-SCORE +?PRG1: CRLF + PRINTI "Would you like to restart the game from the beginning, restore a saved game position, or end this session of the game? +(Type RESTART, RESTORE, or QUIT): +>" + READ P-INBUF,P-LEXV + GET P-LEXV,1 >WRD + EQUAL? WRD,W?RESTART \?ELS7 + RESTART + PRINTI "Failed." + CRLF + JUMP ?PRG1 +?ELS7: EQUAL? WRD,W?RESTORE \?ELS11 + RESTORE \?ELS14 + PRINTI "Ok." + CRLF + JUMP ?PRG1 +?ELS14: PRINTI "Failed." + CRLF + JUMP ?PRG1 +?ELS11: EQUAL? WRD,W?QUIT,W?Q \?PRG1 + QUIT + JUMP ?PRG1 + + + .FUNCT V-QUIT,SCOR + CALL V-SCORE + PRINTI "Do you wish to leave the game? (Y is affirmative): " + CALL YES? + ZERO? STACK /?ELS7 + QUIT + RTRUE +?ELS7: PRINTR "Ok." + + + .FUNCT V-RESTART + CALL V-SCORE,TRUE-VALUE + PRINTI "Do you wish to restart? (Y is affirmative): " + CALL YES? + ZERO? STACK /FALSE + PRINTI "Restarting." + CRLF + RESTART + PRINTR "Failed." + + + .FUNCT V-RESTORE + RESTORE \?ELS5 + PRINTI "Ok." + CRLF + CALL V-FIRST-LOOK + RSTACK +?ELS5: PRINTR "Failed." + + + .FUNCT V-SAVE + SAVE \?ELS5 + PRINTR "Ok." +?ELS5: PRINTR "Failed." + + + .FUNCT V-SCRIPT + GET 0,8 + BOR STACK,1 + PUT 0,8,STACK + PRINTI "Here begins a transcript of interaction with" + CRLF + CALL V-VERSION + RTRUE + + + .FUNCT V-UNSCRIPT + PRINTI "Here ends a transcript of interaction with" + CRLF + CALL V-VERSION + GET 0,8 + BAND STACK,-2 + PUT 0,8,STACK + RTRUE + + + .FUNCT V-VERSION,CNT=17 + PRINTI "ZORK II: The Wizard of Frobozz +Infocom interactive fiction - a fantasy story +Copyright (c) 1981, 1982, 1983, 1986" + PRINTI " Infocom, Inc. All rights reserved." + CRLF + PRINTI "ZORK is a registered trademark of Infocom, Inc. +Release " + GET 0,1 + BAND STACK,2047 + PRINTN STACK + PRINTI " / Serial number " +?PRG9: IGRTR? 'CNT,23 \?ELS13 + JUMP ?REP10 +?ELS13: GETB 0,CNT + PRINTC STACK + JUMP ?PRG9 +?REP10: CRLF + RTRUE + + + .FUNCT V-VERIFY + PRINTI "Verifying disk..." + CRLF + VERIFY \?ELS7 + PRINTR "The disk is correct." +?ELS7: CRLF + PRINTR "** Disk Failure **" + + + .FUNCT V-COMMAND-FILE + DIRIN 1 + RTRUE + + + .FUNCT V-RANDOM + EQUAL? PRSO,INTNUM /?ELS5 + PRINTR "Illegal call to #RND." +?ELS5: SUB 0,P-NUMBER + RANDOM STACK + RTRUE + + + .FUNCT V-RECORD + DIROUT 4 + RTRUE + + + .FUNCT V-UNRECORD + DIROUT -4 + RTRUE + + + .FUNCT V-ADVENT + PRINTR "A hollow voice says ""Fool.""" + + + .FUNCT V-ALARM + FSET? PRSO,ACTORBIT \?ELS5 + CALL NULL-F + ZERO? STACK \TRUE + PRINTR "He's wide awake, or haven't you noticed..." +?ELS5: PRINTI "The " + PRINTD PRSO + PRINTR " isn't sleeping." + + + .FUNCT V-ANSWER + PRINTI "Nobody seems to be awaiting your answer." + CRLF + SET 'P-CONT,FALSE-VALUE + SET 'QUOTE-FLAG,FALSE-VALUE + RTRUE + + + .FUNCT V-ATTACK + FSET? PRSO,ACTORBIT /?ELS5 + PRINTI "I've known strange people, but fighting a " + PRINTD PRSO + PRINTR "?" +?ELS5: ZERO? PRSI /?THN10 + EQUAL? PRSI,HANDS \?ELS9 +?THN10: PRINTI "Trying to attack a " + PRINTD PRSO + PRINTR " with your bare hands is suicidal." +?ELS9: IN? PRSI,WINNER /?ELS15 + PRINTI "You aren't even holding the " + PRINTD PRSI + PRINTR "." +?ELS15: FSET? PRSI,WEAPONBIT /?ELS19 + PRINTI "Trying to attack the " + PRINTD PRSO + PRINTI " with a " + PRINTD PRSI + PRINTR " is suicidal." +?ELS19: PRINTR "You can't." + + + .FUNCT V-BACK + PRINTR "Sorry, my memory is poor. Please give a direction." + + + .FUNCT V-BLAST + PRINTR "You can't blast anything by using words." + + + .FUNCT PRE-BOARD,AV + LOC WINNER >AV + CALL NULL-F + ZERO? STACK \TRUE + FSET? PRSO,VEHBIT \?ELS5 + IN? PRSO,HERE /?ELS8 + PRINTI "The " + PRINTD PRSO + PRINTI " must be on the ground to be boarded." + CRLF + RETURN 2 +?ELS8: FSET? AV,VEHBIT \FALSE + PRINTI "You are already in the " + PRINTD AV + PRINTI "!" + CRLF + RETURN 2 +?ELS5: EQUAL? PRSO,WATER,GLOBAL-WATER \?ELS18 + CALL PERFORM,V?SWIM,PRSO + RTRUE +?ELS18: PRINTI "You have a theory on how to board a " + PRINTD PRSO + PRINTI ", perhaps?" + CRLF + RETURN 2 + + + .FUNCT V-BOARD,AV + PRINTI "You are now in the " + PRINTD PRSO + PRINTI "." + CRLF + MOVE WINNER,PRSO + GETP PRSO,P?ACTION + CALL STACK,M-ENTER + RTRUE + + + .FUNCT V-BREATHE + CALL PERFORM,V?INFLATE,PRSO,LUNGS + RSTACK + + + .FUNCT V-BRUSH + PRINTR "If you wish, but heaven only knows why." + + + .FUNCT V-BUG + PRINTR "Bug? Not in a flawless program like this! (Cough, cough)." + + + .FUNCT TELL-NO-PRSI + PRINTR "You didn't say with what!" + + + .FUNCT PRE-BURN + ZERO? PRSI \?ELS5 + CALL TELL-NO-PRSI + RSTACK +?ELS5: FSET? PRSI,FLAMEBIT \?ELS7 + FSET? PRSI,ONBIT /FALSE +?ELS7: PRINTI "With a " + PRINTD PRSI + PRINTR "??!?" + + + .FUNCT V-BURN + LOC PRSO + EQUAL? STACK,RECEPTACLE \?ELS5 + CALL BALLOON-BURN + RTRUE +?ELS5: FSET? PRSO,BURNBIT \?ELS7 + IN? PRSO,WINNER /?THN13 + IN? WINNER,PRSO \?ELS12 +?THN13: CALL REMOVE-CAREFULLY,PRSO + PRINTI "The " + PRINTD PRSO + PRINTI " catches fire. Unfortunately, you were " + IN? WINNER,PRSO \?ELS21 + PRINTI "in" + JUMP ?CND19 +?ELS21: PRINTI "holding" +?CND19: CALL JIGS-UP,STR?168 + RSTACK +?ELS12: CALL REMOVE-CAREFULLY,PRSO + PRINTI "The " + PRINTD PRSO + PRINTR " catches fire and is consumed." +?ELS7: PRINTI "You can't burn a " + PRINTD PRSO + PRINTR "." + + + .FUNCT V-CHOMP + PRINTR "Preposterous!" + + + .FUNCT V-CLIMB-DOWN + CALL V-CLIMB-UP,P?DOWN,PRSO + RSTACK + + + .FUNCT V-CLIMB-FOO + CALL V-CLIMB-UP,P?UP,PRSO + RSTACK + + + .FUNCT V-CLIMB-ON + FSET? PRSO,VEHBIT \?ELS5 + CALL PERFORM,V?BOARD,PRSO + RTRUE +?ELS5: PRINTI "You can't climb onto the " + PRINTD PRSO + PRINTR "." + + + .FUNCT V-CLIMB-UP,DIR=P?UP,OBJ=0,X,TX,?TMP1 + ZERO? OBJ /?CND1 + EQUAL? PRSO,ROOMS /?CND1 + SET 'OBJ,PRSO +?CND1: GETPT HERE,DIR >TX + ZERO? TX /?ELS10 + ZERO? OBJ /?CND11 + PTSIZE TX >X + EQUAL? X,NEXIT /?THN18 + EQUAL? X,CEXIT,DEXIT,UEXIT \?CND11 + GETB TX,0 + CALL GLOBAL-IN?,PRSO,STACK + ZERO? STACK \?CND11 +?THN18: PRINTI "The " + PRINTD OBJ + PRINTI " do" + EQUAL? OBJ,STAIRS /?CND24 + PRINTI "es" +?CND24: PRINTI "n't lead " + EQUAL? DIR,P?UP \?ELS33 + PRINTI "up" + JUMP ?CND31 +?ELS33: PRINTI "down" +?CND31: PRINTR "ward." +?CND11: CALL DO-WALK,DIR + RTRUE +?ELS10: ZERO? OBJ /?ELS43 + GETPT PRSO,P?SYNONYM >X + PTSIZE X + CALL ZMEMQ,W?WALL,X,STACK + ZERO? STACK /?ELS43 + PRINTR "Climbing the walls is to no avail." +?ELS43: CALL NULL-F + ZERO? STACK /?ELS49 + PRINTR "There are no climbable trees here." +?ELS49: EQUAL? OBJ,FALSE-VALUE,ROOMS \?ELS53 + PRINTR "You can't go that way." +?ELS53: PRINTR "You can't do that!" + + + .FUNCT V-CLOSE + FSET? PRSO,CONTBIT /?ELS5 + FSET? PRSO,DOORBIT /?ELS5 + PRINTI "You must tell me how to do that to a " + PRINTD PRSO + PRINTR "." +?ELS5: FSET? PRSO,SURFACEBIT /?ELS11 + GETP PRSO,P?CAPACITY + ZERO? STACK /?ELS11 + FSET? PRSO,OPENBIT \?ELS18 + FCLEAR PRSO,OPENBIT + PRINTI "Closed." + CRLF + ZERO? LIT /TRUE + CALL LIT?,HERE >LIT + ZERO? LIT \TRUE + PRINTR "It is now pitch black." +?ELS18: PRINTR "It is already closed." +?ELS11: FSET? PRSO,DOORBIT \?ELS33 + FSET? PRSO,OPENBIT \?ELS38 + FCLEAR PRSO,OPENBIT + PRINTI "The " + PRINTD PRSO + PRINTR " is now closed." +?ELS38: PRINTR "It is already closed." +?ELS33: PRINTR "You cannot close that." + + + .FUNCT V-COMMAND + FSET? PRSO,ACTORBIT \?ELS5 + PRINTI "The " + PRINTD PRSO + PRINTR " pays no attention." +?ELS5: PRINTR "You cannot talk to that!" + + + .FUNCT V-COUNT + EQUAL? PRSO,BLESSINGS \?ELS5 + PRINTR "Well, for one, you are playing Zork..." +?ELS5: PRINTR "You have lost your mind." + + + .FUNCT V-CROSS + PRINTR "You can't cross that!" + + + .FUNCT V-CURSES + ZERO? PRSO /?ELS5 + FSET? PRSO,ACTORBIT \?ELS11 + PRINTR "Insults of this nature won't help you." +?ELS11: PRINTR "What a loony!" +?ELS5: PRINTR "Such language in a high-class establishment like this!" + + + .FUNCT V-CUT + FSET? PRSO,ACTORBIT \?ELS5 + CALL PERFORM,V?ATTACK,PRSO,PRSI + RSTACK +?ELS5: FSET? PRSO,BURNBIT \?ELS7 + FSET? PRSI,WEAPONBIT \?ELS7 + IN? WINNER,PRSO \?CND10 + PRINTR "Not a bright idea, especially since you're in it." +?CND10: CALL REMOVE-CAREFULLY,PRSO + PRINTI "Your skillful " + PRINTD PRSI + PRINTI "smanship slices the " + PRINTD PRSO + PRINTR " into innumerable slivers which blow away." +?ELS7: FSET? PRSI,WEAPONBIT /?ELS18 + PRINTI "The ""cutting edge"" of a " + PRINTD PRSI + PRINTR " is hardly adequate." +?ELS18: PRINTI "Strange concept, cutting the " + PRINTD PRSO + PRINTR "...." + + + .FUNCT V-DEFLATE + PRINTR "Come on, now!" + + + .FUNCT V-DIG + ZERO? PRSI \?CND1 + SET 'PRSI,HANDS +?CND1: FSET? PRSI,TOOLBIT \?ELS8 + PRINTI "Digging with the " + PRINTD PRSI + PRINTR " is slow and tedious." +?ELS8: PRINTI "Digging with a " + PRINTD PRSI + PRINTR " is silly." + + + .FUNCT V-DISEMBARK + EQUAL? PRSO,ROOMS \?ELS5 + LOC WINNER + FSET? STACK,VEHBIT \?ELS5 + LOC WINNER + CALL PERFORM,V?DISEMBARK,STACK + RTRUE +?ELS5: LOC WINNER + EQUAL? STACK,PRSO /?ELS9 + PRINTI "You're not in that!" + CRLF + RETURN 2 +?ELS9: FSET? HERE,RLANDBIT \?ELS15 + PRINTI "You are on your own feet again." + CRLF + MOVE WINNER,HERE + RTRUE +?ELS15: PRINTI "You realize that getting out here would be fatal." + CRLF + RETURN 2 + + + .FUNCT V-DISENCHANT + IN? PRSO,HERE \TRUE + EQUAL? SPELL-USED,W?FEEBLE,W?FUMBLE,W?FEAR /?THN8 + EQUAL? SPELL-USED,W?FREEZE,W?FALL,W?FERMENT /?THN8 + EQUAL? SPELL-USED,W?FIERCE,W?FENCE,W?FANTASIZE \?ELS7 +?THN8: FSET? PRSO,ACTORBIT \FALSE + EQUAL? SPELL-USED,W?FEEBLE \?ELS19 + PRINTI "The " + PRINTD PRSO + PRINTR " seems stronger now." +?ELS19: EQUAL? SPELL-USED,W?FUMBLE \?ELS23 + PRINTI "The " + PRINTD PRSO + PRINTR " no longer appears clumsy." +?ELS23: EQUAL? SPELL-USED,W?FEAR \?ELS27 + PRINTI "The " + PRINTD PRSO + PRINTR " no longer appears afraid." +?ELS27: EQUAL? SPELL-USED,W?FREEZE \?ELS31 + PRINTI "The " + PRINTD PRSO + PRINTR " moves again." +?ELS31: EQUAL? SPELL-USED,W?FERMENT \?ELS35 + PRINTI "The " + PRINTD PRSO + PRINTR " stops swaying." +?ELS35: EQUAL? SPELL-USED,W?FIERCE \FALSE + PRINTI "The " + PRINTD PRSO + PRINTR " appears more peaceful." +?ELS7: EQUAL? SPELL-USED,W?FLOAT \?ELS43 + PRINTI "The " + PRINTD PRSO + PRINTR " sinks to the ground." +?ELS43: EQUAL? SPELL-USED,W?FUDGE \FALSE + PRINTR "The sweet smell has dispersed." + + + .FUNCT V-DRINK + CALL V-EAT + RSTACK + + + .FUNCT V-DRINK-FROM + PRINTR "How peculiar!" + + + .FUNCT PRE-DROP + LOC WINNER + EQUAL? PRSO,STACK \FALSE + CALL PERFORM,V?DISEMBARK,PRSO + RTRUE + + + .FUNCT V-DROP + CALL IDROP + ZERO? STACK /FALSE + PRINTR "Dropped." + + + .FUNCT V-EAT,EAT?=0,DRINK?=0,NOBJ=0 + FSET? PRSO,FOODBIT /?PRD6 + PUSH 0 + JUMP ?PRD7 +?PRD6: PUSH 1 +?PRD7: SET 'EAT?,STACK + ZERO? EAT? /?ELS5 + IN? PRSO,WINNER /?ELS10 + LOC PRSO + IN? STACK,WINNER /?ELS10 + PRINTI "You're not holding that." + CRLF + JUMP ?CND8 +?ELS10: EQUAL? PRSA,V?DRINK \?ELS16 + PRINTI "How can you drink that?" + JUMP ?CND8 +?ELS16: PRINTI "Thank you very much. It really hit the spot." + CALL REMOVE-CAREFULLY,PRSO +?CND8: CRLF + RTRUE +?ELS5: FSET? PRSO,DRINKBIT \?ELS24 + SET 'DRINK?,TRUE-VALUE + LOC PRSO >NOBJ + IN? PRSO,GLOBAL-OBJECTS /?THN30 + CALL GLOBAL-IN?,GLOBAL-WATER,HERE + ZERO? STACK \?THN30 + EQUAL? PRSO,PSEUDO-OBJECT \?ELS29 +?THN30: CALL HIT-SPOT + RSTACK +?ELS29: ZERO? NOBJ /?THN34 + CALL ACCESSIBLE?,NOBJ + ZERO? STACK \?ELS33 +?THN34: PRINTR "There isn't any water here." +?ELS33: CALL ACCESSIBLE?,NOBJ + ZERO? STACK /?ELS39 + PRINTI "You have to be holding the " + PRINTD NOBJ + PRINTR " first." +?ELS39: FSET? NOBJ,OPENBIT /?ELS43 + PRINTI "You'll have to open the " + PRINTD NOBJ + PRINTR " first." +?ELS43: CALL HIT-SPOT + RSTACK +?ELS24: ZERO? EAT? \FALSE + ZERO? DRINK? \FALSE + PRINTI "I don't think that the " + PRINTD PRSO + PRINTR " would agree with you." + + + .FUNCT HIT-SPOT + EQUAL? PRSO,WATER \?CND1 + CALL GLOBAL-IN?,GLOBAL-WATER,HERE + ZERO? STACK \?CND1 + CALL REMOVE-CAREFULLY,PRSO +?CND1: PRINTR "Thank you very much. I was rather thirsty (from all this talking, probably)." + + + .FUNCT V-ECHO,LST,MAX,ECH=0,CNT + PRINTR "echo echo ..." + + + .FUNCT V-ENCHANT + ZERO? WAND-ON /?CND1 + SET 'SPELL-VICTIM,WAND-ON +?CND1: ZERO? SPELL-VICTIM /?ELS9 + ZERO? SPELL-USED \?CND11 + PRINTR "You must be more specific." +?CND11: EQUAL? SPELL-USED,W?FEEBLE,W?FUMBLE,W?FEAR /?THN21 + EQUAL? SPELL-USED,W?FREEZE,W?FALL,W?FERMENT /?THN21 + EQUAL? SPELL-USED,W?FIERCE,W?FENCE,W?FANTASIZE \?ELS20 +?THN21: FSET? PRSO,ACTORBIT \?ELS27 + PRINTR "The wand stops glowing, but there is no other obvious effect." +?ELS27: PRINTI "That might have done something, but it's hard to tell with a " + PRINTD PRSO + PRINTR "." +?ELS20: EQUAL? SPELL-USED,W?FUDGE \?ELS35 + PRINTR "A strong odor of chocolate permeates the room." +?ELS35: EQUAL? SPELL-USED,W?FLUORESCE \?ELS39 + FSET PRSO,LIGHTBIT + FSET PRSO,ONBIT + SET 'LIT,TRUE-VALUE + PRINTI "The " + PRINTD PRSO + PRINTR " begins to glow." +?ELS39: EQUAL? SPELL-USED,W?FILCH \?ELS43 + SET 'SPELL-HANDLED?,TRUE-VALUE + FSET? PRSO,TAKEBIT \?ELS48 + MOVE PRSO,WINNER + CALL SCORE-OBJ,PRSO + PRINTR "Filched!" +?ELS48: PRINTI "You can't filch the " + PRINTD PRSO + PRINTR "!" +?ELS43: EQUAL? SPELL-USED,W?FLOAT \?ELS56 + FSET? PRSO,TAKEBIT \?ELS56 + EQUAL? SPELL-VICTIM,COLLAR \?CND59 + IN? COLLAR,CERBERUS \?CND59 + SET 'SPELL-VICTIM,CERBERUS +?CND59: PRINTI "The " + PRINTD PRSO + PRINTR " floats serenely in midair." +?ELS56: EQUAL? SPELL-USED,W?FRY \?ELS67 + FSET? PRSO,TAKEBIT \?ELS67 + SET 'SPELL-HANDLED?,TRUE-VALUE + CALL REMOVE-CAREFULLY,PRSO + PRINTI "The " + PRINTD PRSO + PRINTR " goes up in a puff of smoke." +?ELS67: SET 'SPELL-VICTIM,FALSE-VALUE + PRINTR "The wand stops glowing, but there is no other apparent effect." +?ELS9: SET 'SPELL-VICTIM,FALSE-VALUE + PRINTR "Nothing happens." + + + .FUNCT REMOVE-CAREFULLY,OBJ,OLIT + EQUAL? OBJ,P-IT-OBJECT \?CND1 + SET 'P-IT-OBJECT,FALSE-VALUE +?CND1: SET 'OLIT,LIT + REMOVE OBJ + CALL LIT?,HERE >LIT + ZERO? OLIT /TRUE + EQUAL? OLIT,LIT /TRUE + PRINTR "You are left in the dark..." + + + .FUNCT V-ENTER + CALL DO-WALK,P?IN + RSTACK + + + .FUNCT V-EXAMINE + GETP PRSO,P?TEXT + ZERO? STACK /?ELS5 + GETP PRSO,P?TEXT + PRINT STACK + CRLF + RTRUE +?ELS5: FSET? PRSO,CONTBIT /?THN10 + FSET? PRSO,DOORBIT \?ELS9 +?THN10: CALL V-LOOK-INSIDE + RSTACK +?ELS9: PRINTI "There's nothing special about the " + PRINTD PRSO + PRINTR "." + + + .FUNCT V-EXIT + EQUAL? PRSO,FALSE-VALUE,ROOMS \?ELS5 + LOC WINNER + FSET? STACK,VEHBIT \?ELS5 + LOC WINNER + CALL PERFORM,V?DISEMBARK,STACK + RTRUE +?ELS5: ZERO? PRSO /?ELS9 + IN? WINNER,PRSO \?ELS9 + CALL PERFORM,V?DISEMBARK,PRSO + RTRUE +?ELS9: CALL DO-WALK,P?OUT + RSTACK + + + .FUNCT V-EXORCISE + PRINTR "What a bizarre concept!" + + + .FUNCT PRE-FILL,TX + ZERO? PRSI \?CND1 + GETPT HERE,P?GLOBAL >TX + ZERO? TX /?ELS6 + PTSIZE TX + SUB STACK,1 + CALL ZMEMQB,GLOBAL-WATER,TX,STACK + ZERO? STACK /?ELS6 + CALL PERFORM,V?FILL,PRSO,GLOBAL-WATER + RTRUE +?ELS6: LOC WINNER + IN? WATER,STACK \?ELS10 + CALL PERFORM,V?FILL,PRSO,WATER + RTRUE +?ELS10: PRINTR "There is nothing to fill it with." +?CND1: EQUAL? PRSI,WATER /FALSE + EQUAL? PRSI,GLOBAL-WATER /FALSE + CALL PERFORM,V?PUT,PRSI,PRSO + RTRUE + + + .FUNCT V-FILL + ZERO? PRSI \?ELS5 + CALL GLOBAL-IN?,GLOBAL-WATER,HERE + ZERO? STACK /?ELS10 + CALL PERFORM,V?FILL,PRSO,GLOBAL-WATER + RTRUE +?ELS10: LOC WINNER + IN? WATER,STACK \?ELS12 + CALL PERFORM,V?FILL,PRSO,WATER + RTRUE +?ELS12: PRINTR "There's nothing to fill it with." +?ELS5: PRINTR "You may know how to do that, but I don't." + + + .FUNCT V-FIND,L + LOC PRSO >L + EQUAL? PRSO,HANDS,LUNGS \?ELS5 + PRINTR "Within six feet of your head, assuming you haven't left that somewhere." +?ELS5: EQUAL? PRSO,ME \?ELS9 + PRINTR "You're around here somewhere..." +?ELS9: EQUAL? L,GLOBAL-OBJECTS \?ELS13 + PRINTR "You find it." +?ELS13: IN? PRSO,WINNER \?ELS17 + PRINTR "You have it." +?ELS17: IN? PRSO,HERE /?THN22 + CALL GLOBAL-IN?,PRSO,HERE + ZERO? STACK \?THN22 + EQUAL? PRSO,PSEUDO-OBJECT \?ELS21 +?THN22: PRINTR "It's right here." +?ELS21: FSET? L,ACTORBIT \?ELS27 + PRINTI "The " + PRINTD L + PRINTR " has it." +?ELS27: FSET? L,SURFACEBIT \?ELS31 + PRINTI "It's on the " + PRINTD L + PRINTR "." +?ELS31: FSET? L,CONTBIT \?ELS35 + PRINTI "It's in the " + PRINTD L + PRINTR "." +?ELS35: PRINTR "Beats me." + + + .FUNCT V-FOLLOW + PRINTR "You're nuts!" + + + .FUNCT V-FROBOZZ + PRINTR "The FROBOZZ Corporation created, owns, and operates this dungeon." + + + .FUNCT PRE-GIVE + CALL HELD?,PRSO + ZERO? STACK \FALSE + PRINTI "That's easy for you to say since you don't even have the " + PRINTD PRSO + PRINTR "." + + + .FUNCT V-GIVE + FSET? PRSI,ACTORBIT /?ELS5 + PRINTI "You can't give a " + PRINTD PRSO + PRINTI " to a " + PRINTD PRSI + PRINTR "!" +?ELS5: PRINTI "The " + PRINTD PRSI + PRINTR " refuses it politely." + + + .FUNCT V-HATCH + PRINTR "Bizarre!" + + + .FUNCT V-HELLO + ZERO? PRSO /?ELS5 + FSET? PRSO,ACTORBIT \?ELS11 + PRINTI "The " + PRINTD PRSO + PRINTR " bows his head to you in greeting." +?ELS11: PRINTI "It's a well known fact that only schizophrenics say ""Hello"" to a " + PRINTD PRSO + PRINTR "." +?ELS5: CALL PICK-ONE,HELLOS + PRINT STACK + CRLF + RTRUE + + + .FUNCT V-INCANT + ZERO? SPELL-USED /?ELS3 + PRINTI "Nothing happens." + CRLF + JUMP ?CND1 +?ELS3: ZERO? WAND-ON /?ELS8 + SET 'SPELL-VICTIM,WAND-ON + GET P-LEXV,P-CONT >SPELL-USED + PRINTI "The wand glows very brightly for a moment." + CRLF + RANDOM 10 + ADD 10,STACK + CALL QUEUE,I-SPELL,STACK + PUT STACK,0,1 + SET 'WAND-ON,FALSE-VALUE + CALL PERFORM,V?ENCHANT,SPELL-VICTIM + JUMP ?CND1 +?ELS8: PRINTI "The incantation echoes back faintly, but nothing else happens." + CRLF +?CND1: SET 'QUOTE-FLAG,FALSE-VALUE + SET 'P-CONT,FALSE-VALUE + RTRUE + + + .FUNCT V-INFLATE + PRINTR "How can you inflate that?" + + + .FUNCT V-KICK + CALL HACK-HACK,STR?169 + RSTACK + + + .FUNCT V-KISS + PRINTR "I'd sooner kiss a pig." + + + .FUNCT V-KNOCK + FSET? PRSO,DOORBIT \?ELS5 + PRINTR "Nobody's home." +?ELS5: PRINTI "Why knock on a " + PRINTD PRSO + PRINTR "?" + + + .FUNCT V-LAMP-OFF + FSET? PRSO,LIGHTBIT \?ELS3 + FSET? PRSO,ONBIT /?ELS6 + PRINTR "It is already off." +?ELS6: FCLEAR PRSO,ONBIT + ZERO? LIT /?CND11 + CALL LIT?,HERE >LIT +?CND11: PRINTI "The " + PRINTD PRSO + PRINTI " is now off." + CRLF + ZERO? LIT \TRUE + PRINTI "It is now pitch black." + CRLF + RTRUE +?ELS3: PRINTR "You can't turn that off." + + + .FUNCT V-LAMP-ON + FSET? PRSO,LIGHTBIT \?ELS3 + FSET? PRSO,ONBIT \?ELS6 + PRINTR "It is already on." +?ELS6: FSET PRSO,ONBIT + PRINTI "The " + PRINTD PRSO + PRINTI " is now on." + CRLF + ZERO? LIT \TRUE + CALL LIT?,HERE >LIT + CRLF + CALL V-LOOK + RTRUE +?ELS3: FSET? PRSO,BURNBIT \?ELS17 + PRINTI "If you wish to burn the " + PRINTD PRSO + PRINTR ", you should say so." +?ELS17: PRINTR "You can't turn that on." + + + .FUNCT V-LAUNCH + FSET? PRSO,VEHBIT \?ELS5 + PRINTR "You can't launch that by saying ""launch""!" +?ELS5: PRINTR "That's pretty weird." + + + .FUNCT V-LEAN-ON + PRINTR "Getting tired?" + + + .FUNCT V-LEAP,TX,S + ZERO? PRSO /?ELS5 + IN? PRSO,HERE \?ELS11 + FSET? PRSO,ACTORBIT \?ELS16 + PRINTI "The " + PRINTD PRSO + PRINTR " is too big to jump over." +?ELS16: CALL V-SKIP + RSTACK +?ELS11: PRINTR "That would be a good trick." +?ELS5: GETPT HERE,P?DOWN >TX + ZERO? TX /?ELS26 + PTSIZE TX >S + EQUAL? S,2 /?THN32 + EQUAL? S,4 \?ELS31 + GETB TX,1 + VALUE STACK + ZERO? STACK \?ELS31 +?THN32: PRINTI "This was not a very safe place to try jumping." + CRLF + CALL PICK-ONE,JUMPLOSS + CALL JIGS-UP,STACK + RSTACK +?ELS31: CALL NULL-F + ZERO? STACK \TRUE + CALL V-SKIP + RSTACK +?ELS26: CALL V-SKIP + RSTACK + + + .FUNCT V-LEAVE + CALL DO-WALK,P?OUT + RSTACK + + + .FUNCT V-LISTEN + PRINTI "The " + PRINTD PRSO + PRINTR " makes no sound." + + + .FUNCT V-LOCK + PRINTR "It doesn't seem to work." + + + .FUNCT V-LOOK + CALL DESCRIBE-ROOM,TRUE-VALUE + ZERO? STACK /FALSE + CALL DESCRIBE-OBJECTS,TRUE-VALUE + RSTACK + + + .FUNCT V-LOOK-BEHIND + PRINTI "There is nothing behind the " + PRINTD PRSO + PRINTR "." + + + .FUNCT V-LOOK-INSIDE + FSET? PRSO,DOORBIT \?ELS5 + FSET? PRSO,OPENBIT \?ELS8 + PRINTI "The " + PRINTD PRSO + PRINTI " is open, but I can't tell what's beyond it." + JUMP ?CND6 +?ELS8: PRINTI "The " + PRINTD PRSO + PRINTI " is closed." +?CND6: CRLF + RTRUE +?ELS5: FSET? PRSO,CONTBIT \?ELS16 + FSET? PRSO,ACTORBIT \?ELS21 + PRINTR "There is nothing special to be seen." +?ELS21: CALL SEE-INSIDE?,PRSO + ZERO? STACK /?ELS25 + FIRST? PRSO \?ELS30 + CALL PRINT-CONT,PRSO + ZERO? STACK \TRUE +?ELS30: CALL NULL-F + ZERO? STACK \TRUE + PRINTI "The " + PRINTD PRSO + PRINTR " is empty." +?ELS25: PRINTI "The " + PRINTD PRSO + PRINTR " is closed." +?ELS16: PRINTI "You can't look inside a " + PRINTD PRSO + PRINTR "." + + + .FUNCT V-LOOK-ON + FSET? PRSO,SURFACEBIT \?ELS5 + CALL PERFORM,V?LOOK-INSIDE,PRSO + RTRUE +?ELS5: PRINTI "Look on a " + PRINTD PRSO + PRINTR "???" + + + .FUNCT V-LOOK-UNDER + PRINTR "There is nothing but dust there." + + + .FUNCT V-LOWER + CALL HACK-HACK,STR?173 + RSTACK + + + .FUNCT V-MAKE + PRINTR "You can't do that." + + + .FUNCT V-MELT + PRINTI "It's not clear that a " + PRINTD PRSO + PRINTR " can be melted." + + + .FUNCT PRE-MOVE + CALL HELD?,PRSO + ZERO? STACK /FALSE + PRINTR "You aren't an accomplished enough juggler." + + + .FUNCT V-MOVE + FSET? PRSO,TAKEBIT \?ELS5 + PRINTI "Moving the " + PRINTD PRSO + PRINTR " reveals nothing." +?ELS5: PRINTI "You can't move the " + PRINTD PRSO + PRINTR "." + + + .FUNCT V-MUMBLE + PRINTR "You'll have to speak up if you expect me to hear you!" + + + .FUNCT PRE-MUNG + CALL NULL-F + ZERO? STACK \TRUE + ZERO? PRSI /?THN8 + FSET? PRSI,WEAPONBIT /FALSE +?THN8: PRINTI "Trying to destroy the " + PRINTD PRSO + PRINTI " with " + ZERO? PRSI \?ELS14 + PRINTI "your bare hands" + JUMP ?CND12 +?ELS14: PRINTI "a " + PRINTD PRSI +?CND12: PRINTR " is futile." + + + .FUNCT V-MUNG + FSET? PRSO,ACTORBIT \?ELS5 + CALL PERFORM,V?ATTACK,PRSO + RTRUE +?ELS5: PRINTR "Nice try." + + + .FUNCT V-ODYSSEUS + CALL NULL-F + ZERO? STACK \TRUE + PRINTR "Wasn't he a sailor?" + + + .FUNCT V-OIL + PRINTR "You probably put spinach in your gas tank, too." + + + .FUNCT V-OPEN,F,STR + FSET? PRSO,CONTBIT \?ELS5 + GETP PRSO,P?CAPACITY + ZERO? STACK /?ELS5 + FSET? PRSO,OPENBIT \?ELS12 + PRINTR "It is already open." +?ELS12: FSET PRSO,OPENBIT + FSET PRSO,TOUCHBIT + FIRST? PRSO \?THN22 + FSET? PRSO,TRANSBIT \?ELS21 +?THN22: PRINTR "Opened." +?ELS21: FIRST? PRSO >F \?ELS27 + NEXT? F /?ELS27 + FSET? F,TOUCHBIT /?ELS27 + GETP F,P?FDESC >STR + ZERO? STR /?ELS27 + PRINTI "The " + PRINTD PRSO + PRINTI " opens." + CRLF + PRINT STR + CRLF + RTRUE +?ELS27: PRINTI "Opening the " + PRINTD PRSO + PRINTI " reveals " + CALL PRINT-CONTENTS,PRSO + PRINTR "." +?ELS5: FSET? PRSO,DOORBIT \?ELS41 + FSET? PRSO,OPENBIT \?ELS46 + PRINTR "It is already open." +?ELS46: PRINTI "The " + PRINTD PRSO + PRINTI " opens." + CRLF + FSET PRSO,OPENBIT + RTRUE +?ELS41: PRINTI "You must tell me how to do that to a " + PRINTD PRSO + PRINTR "." + + + .FUNCT V-OVERBOARD,LOCN + CALL NULL-F + ZERO? STACK \TRUE + LOC WINNER + FSET? STACK,VEHBIT \?ELS7 + CALL PERFORM,V?THROW,PRSO + RTRUE +?ELS7: PRINTR "Huh?" + + + .FUNCT V-PICK + PRINTR "You can't pick that." + + + .FUNCT V-PLAY + FSET? PRSO,ACTORBIT \?ELS5 + PRINTI "You become so engrossed in the role of the " + PRINTD PRSO + PRINTI " that you kill yourself, just as he might have done!" + CRLF + CALL JIGS-UP,STR?174 + RSTACK +?ELS5: PRINTR "That's silly!" + + + .FUNCT V-PLUG + PRINTR "This has no effect." + + + .FUNCT V-POUR-ON + EQUAL? PRSO,WATER \?ELS5 + CALL REMOVE-CAREFULLY,PRSO + FSET? PRSI,FLAMEBIT \?ELS10 + FSET? PRSI,ONBIT \?ELS10 + PRINTI "The " + PRINTD PRSI + PRINTI " is extinguished." + CRLF + EQUAL? PRSI,BINF-FLAG \?CND15 + SET 'BINF-FLAG,FALSE-VALUE +?CND15: FCLEAR PRSI,ONBIT + FCLEAR PRSI,FLAMEBIT + RTRUE +?ELS10: PRINTI "The water spills over the " + PRINTD PRSI + PRINTR ", to the floor, and evaporates." +?ELS5: CALL NULL-F + ZERO? STACK \TRUE + PRINTR "You can't pour that." + + + .FUNCT V-PRAY + CALL NULL-F + ZERO? STACK \TRUE + PRINTR "If you pray enough, your prayers may be answered." + + + .FUNCT V-PUMP + CALL NULL-F + ZERO? STACK \TRUE + CALL NULL-F + ZERO? STACK \TRUE + PRINTR "It's really not clear how." + + + .FUNCT V-PUSH + CALL HACK-HACK,STR?174 + RSTACK + + + .FUNCT V-PUSH-TO + PRINTR "You can't push things to that." + + + .FUNCT PRE-PUT + CALL NULL-F + ZERO? STACK \FALSE + CALL PRE-GIVE + RSTACK + + + .FUNCT V-PUT,?TMP1 + FSET? PRSI,OPENBIT /?CND1 + FSET? PRSI,DOORBIT /?CND1 + FSET? PRSI,CONTBIT /?CND1 + FSET? PRSI,VEHBIT \?ELS3 + JUMP ?CND1 +?ELS3: PRINTR "You can't do that." +?CND1: FSET? PRSI,OPENBIT /?ELS14 + PRINTI "The " + PRINTD PRSI + PRINTI " isn't open." + CRLF + CALL THIS-IS-IT,PRSI + RSTACK +?ELS14: EQUAL? PRSI,PRSO \?ELS18 + PRINTR "How can you do that?" +?ELS18: IN? PRSO,PRSI \?ELS22 + PRINTI "The " + PRINTD PRSO + PRINTI " is already in the " + PRINTD PRSI + PRINTR "." +?ELS22: CALL WEIGHT,PRSI >?TMP1 + CALL WEIGHT,PRSO + ADD ?TMP1,STACK >?TMP1 + GETP PRSI,P?SIZE + SUB ?TMP1,STACK >?TMP1 + GETP PRSI,P?CAPACITY + GRTR? ?TMP1,STACK \?ELS26 + PRINTR "There's no room." +?ELS26: CALL HELD?,PRSO + ZERO? STACK \?ELS30 + FSET? PRSO,TRYTAKEBIT \?ELS30 + PRINTI "You don't have the " + PRINTD PRSO + PRINTR "." +?ELS30: CALL HELD?,PRSO + ZERO? STACK \?ELS36 + CALL ITAKE + ZERO? STACK /TRUE +?ELS36: MOVE PRSO,PRSI + FSET PRSO,TOUCHBIT + CALL SCORE-OBJ,PRSO + PRINTR "Done." + + + .FUNCT V-PUT-BEHIND + PRINTR "That hiding place is too obvious." + + + .FUNCT V-PUT-ON + EQUAL? PRSI,GROUND \?ELS5 + CALL PERFORM,V?DROP,PRSO + RTRUE +?ELS5: FSET? PRSI,SURFACEBIT \?ELS7 + CALL V-PUT + RSTACK +?ELS7: PRINTI "There's no good surface on the " + PRINTD PRSI + PRINTR "." + + + .FUNCT V-PUT-UNDER + PRINTR "You can't do that." + + + .FUNCT V-RAISE + CALL V-LOWER + RSTACK + + + .FUNCT V-RAPE + PRINTR "What a (ahem!) strange idea." + + + .FUNCT PRE-READ + ZERO? LIT \?ELS5 + PRINTR "It is impossible to read in the dark." +?ELS5: ZERO? PRSI /FALSE + FSET? PRSI,TRANSBIT /FALSE + PRINTI "How does one look through a " + PRINTD PRSI + PRINTR "?" + + + .FUNCT V-READ + FSET? PRSO,READBIT /?ELS5 + PRINTI "How does one read a " + PRINTD PRSO + PRINTR "?" +?ELS5: GETP PRSO,P?TEXT + PRINT STACK + CRLF + RTRUE + + + .FUNCT V-READ-PAGE + CALL PERFORM,V?READ,PRSO + RTRUE + + + .FUNCT V-REPENT + PRINTR "It could very well be too late!" + + + .FUNCT V-REPLY + PRINTI "It is hardly likely that the " + PRINTD PRSO + PRINTI " is interested." + CRLF + SET 'P-CONT,FALSE-VALUE + SET 'QUOTE-FLAG,FALSE-VALUE + RTRUE + + + .FUNCT V-RING + PRINTR "How, exactly, can you ring that?" + + + .FUNCT V-RUB + CALL HACK-HACK,STR?175 + RSTACK + + + .FUNCT V-SAY,V + ZERO? SPELL-USED \?THN4 + ZERO? WAND-ON /?CND1 +?THN4: CALL PERFORM,V?INCANT + RTRUE +?CND1: CALL FIND-IN,HERE,ACTORBIT >V + ZERO? V /?ELS10 + PRINTI "You must address the " + PRINTD V + PRINTI " directly." + CRLF + SET 'QUOTE-FLAG,FALSE-VALUE + SET 'P-CONT,FALSE-VALUE + RETURN P-CONT +?ELS10: GET P-LEXV,P-CONT + EQUAL? STACK,W?HELLO \?ELS14 + SET 'QUOTE-FLAG,FALSE-VALUE + RTRUE +?ELS14: SET 'QUOTE-FLAG,FALSE-VALUE + SET 'P-CONT,FALSE-VALUE + PRINTR "Talking to yourself is a sign of impending mental collapse." + + + .FUNCT V-SEARCH + PRINTR "You find nothing unusual." + + + .FUNCT V-SEND + FSET? PRSO,ACTORBIT \?ELS5 + PRINTI "Why would you send for the " + PRINTD PRSO + PRINTR "?" +?ELS5: PRINTR "That doesn't make sends." + + + .FUNCT PRE-SGIVE + CALL PERFORM,V?GIVE,PRSI,PRSO + RTRUE + + + .FUNCT V-SGIVE + PRINTR "Foo!" + + + .FUNCT V-SHAKE + FSET? PRSO,ACTORBIT \?ELS5 + PRINTR "This seems to have no effect." +?ELS5: FSET? PRSO,TAKEBIT /?ELS9 + PRINTR "You can't take it; thus, you can't shake it!" +?ELS9: FSET? PRSO,CONTBIT \?ELS13 + FSET? PRSO,OPENBIT \?ELS18 + FIRST? PRSO \?ELS23 + CALL SHAKE-LOOP + PRINTI "The contents of the " + PRINTD PRSO + PRINTI " spill " + FSET? HERE,RLANDBIT /?ELS28 + PRINTI "out and disappears" + JUMP ?CND26 +?ELS28: PRINTI "to the ground" +?CND26: PRINTR "." +?ELS23: PRINTR "Shaken." +?ELS18: FIRST? PRSO \?ELS47 + PRINTI "It sounds like there is something inside the " + PRINTD PRSO + PRINTR "." +?ELS47: PRINTI "The " + PRINTD PRSO + PRINTR " sounds empty." +?ELS13: PRINTR "Shaken." + + + .FUNCT SHAKE-LOOP,X +?PRG1: FIRST? PRSO >X \TRUE + FSET X,TOUCHBIT + EQUAL? X,WATER \?ELS10 + PUSH PSEUDO-OBJECT + JUMP ?CND6 +?ELS10: FSET? HERE,RLANDBIT /?ELS12 + PUSH PSEUDO-OBJECT + JUMP ?CND6 +?ELS12: PUSH HERE +?CND6: MOVE X,STACK + JUMP ?PRG1 + + + .FUNCT V-SKIP + CALL PICK-ONE,WHEEEEE + PRINT STACK + CRLF + RTRUE + + + .FUNCT V-SMELL + PRINTI "It smells like a " + PRINTD PRSO + PRINTR "." + + + .FUNCT V-SPIN + PRINTR "You can't spin that!" + + + .FUNCT V-SPRAY + CALL V-SQUEEZE + RSTACK + + + .FUNCT V-SQUEEZE + FSET? PRSO,ACTORBIT \?ELS3 + PRINTI "The " + PRINTD PRSO + PRINTI " does not understand this." + JUMP ?CND1 +?ELS3: PRINTI "How singularly useless." +?CND1: CRLF + RTRUE + + + .FUNCT V-SSPRAY + CALL PERFORM,V?SPRAY,PRSI,PRSO + RSTACK + + + .FUNCT V-STAB,W + CALL FIND-WEAPON,WINNER >W + ZERO? W /?ELS5 + CALL PERFORM,V?ATTACK,PRSO,W + RTRUE +?ELS5: PRINTI "No doubt you propose to stab the " + PRINTD PRSO + PRINTR " with your pinky?" + + + .FUNCT V-STAND + LOC WINNER + FSET? STACK,VEHBIT \?ELS5 + LOC WINNER + CALL PERFORM,V?DISEMBARK,STACK + RTRUE +?ELS5: PRINTR "You are already standing, I think." + + + .FUNCT V-STAY + PRINTR "You will be lost without me!" + + + .FUNCT V-STRIKE + FSET? PRSO,ACTORBIT \?ELS5 + PRINTI "Since you aren't versed in hand-to-hand combat, you'd better attack the " + PRINTD PRSO + PRINTR " with a weapon." +?ELS5: CALL PERFORM,V?LAMP-ON,PRSO + RTRUE + + + .FUNCT V-SWIM + CALL GLOBAL-IN?,GLOBAL-WATER,HERE + ZERO? STACK /?ELS5 + PRINTI "Swimming isn't usually allowed in the " + EQUAL? PRSO,WATER,GLOBAL-WATER /?ELS10 + PRINTD PRSO + PRINTI "." + JUMP ?CND8 +?ELS10: PRINTI "dungeon." +?CND8: CRLF + RTRUE +?ELS5: CALL NULL-F + ZERO? STACK \FALSE + PRINTR "Go jump in a lake!" + + + .FUNCT V-SWING + ZERO? PRSI \?ELS5 + PRINTR "Whoosh!" +?ELS5: CALL PERFORM,V?ATTACK,PRSI,PRSO + RSTACK + + + .FUNCT PRE-TAKE + IN? PRSO,WINNER \?ELS5 + FSET? PRSO,WEARBIT \?ELS10 + PRINTR "You are already wearing it." +?ELS10: PRINTR "You already have that!" +?ELS5: LOC PRSO + FSET? STACK,CONTBIT \?ELS18 + LOC PRSO + FSET? STACK,OPENBIT /?ELS18 + PRINTR "You can't reach something that's inside a closed container." +?ELS18: ZERO? PRSI /?ELS24 + EQUAL? PRSI,GROUND \?CND26 + SET 'PRSI,FALSE-VALUE + RFALSE +?CND26: EQUAL? PRSO,DOOR-KEEPER \?CND29 + SET 'PRSI,FALSE-VALUE + RFALSE +?CND29: LOC PRSO + EQUAL? PRSI,STACK /?ELS36 + PRINTI "The " + PRINTD PRSO + PRINTI " isn't in the " + PRINTD PRSI + PRINTR "." +?ELS36: SET 'PRSI,FALSE-VALUE + RFALSE +?ELS24: LOC WINNER + EQUAL? PRSO,STACK \FALSE + PRINTR "You're inside of it!" + + + .FUNCT V-TAKE + CALL ITAKE + EQUAL? STACK,TRUE-VALUE \FALSE + FSET? PRSO,WEARBIT \?ELS10 + PRINTI "You are now wearing the " + PRINTD PRSO + PRINTR "." +?ELS10: PRINTR "Taken." + + + .FUNCT V-TELL + FSET? PRSO,ACTORBIT \?ELS5 + ZERO? P-CONT /?ELS10 + SET 'WINNER,PRSO + LOC WINNER >HERE + RETURN HERE +?ELS10: PRINTI "The " + PRINTD PRSO + PRINTR " pauses for a moment, perhaps thinking that you should reread the manual." +?ELS5: PRINTI "You can't talk to the " + PRINTD PRSO + PRINTI "!" + CRLF + SET 'QUOTE-FLAG,FALSE-VALUE + SET 'P-CONT,FALSE-VALUE + RETURN 2 + + + .FUNCT V-THROUGH,OBJ=0,M + FSET? PRSO,DOORBIT \?ELS5 + CALL OTHER-SIDE,PRSO >M + ZERO? M /?ELS5 + CALL DO-WALK,M + RTRUE +?ELS5: ZERO? OBJ \?ELS9 + FSET? PRSO,VEHBIT \?ELS9 + CALL PERFORM,V?BOARD,PRSO + RTRUE +?ELS9: ZERO? OBJ \?THN14 + FSET? PRSO,TAKEBIT /?ELS13 +?THN14: ZERO? SCOL-ROOM /?ELS18 + ZERO? OBJ \?THN21 + EQUAL? PRSO,CURTAIN \?ELS18 +?THN21: CALL SCOL-GO,OBJ + RTRUE +?ELS18: EQUAL? HERE,DEPOSITORY \?ELS24 + EQUAL? PRSO,SNWL \?ELS24 + ZERO? SCOL-ROOM /?ELS24 + CALL SCOL-GO,OBJ + RTRUE +?ELS24: EQUAL? HERE,SCOL-ACTIVE \?ELS28 + CALL GET-WALL,HERE >M + GET M,1 + EQUAL? PRSO,STACK \?ELS28 + GET M,2 >SCOL-ROOM + GETP PRSO,P?SIZE >PRSO + ZERO? OBJ /?ELS33 + CALL SCOL-OBJ,OBJ,0,DEPOSITORY + RTRUE +?ELS33: CALL SCOL-THROUGH,0,DEPOSITORY + RTRUE +?ELS28: EQUAL? PRSO,CURTAIN \?CND16 + PRINTR "You can't go more than part way through the curtain." +?CND16: PRINTI "You hit your head against the " + PRINTD PRSO + PRINTR " as you attempt this feat." +?ELS13: IN? PRSO,WINNER \?ELS44 + PRINTR "That would involve quite a contortion!" +?ELS44: CALL PICK-ONE,YUKS + PRINT STACK + CRLF + RTRUE + + + .FUNCT V-THROW + CALL IDROP + ZERO? STACK /?ELS5 + EQUAL? PRSI,ME \?ELS10 + PRINTI "A terrific throw! The " + PRINTD PRSO + SET 'WINNER,PLAYER + CALL JIGS-UP,STR?180 + RSTACK +?ELS10: ZERO? PRSI /?ELS14 + FSET? PRSI,ACTORBIT \?ELS14 + PRINTI "The " + PRINTD PRSI + PRINTI " ducks as the " + PRINTD PRSO + PRINTR " flies by and crashes to the ground." +?ELS14: PRINTR "Thrown." +?ELS5: PRINTR "Huh?" + + + .FUNCT V-THROW-OFF + PRINTR "You can't throw anything off of that!" + + + .FUNCT V-TIE + EQUAL? PRSI,WINNER \?ELS5 + PRINTR "You can't tie anything to yourself." +?ELS5: PRINTI "You can't tie the " + PRINTD PRSO + PRINTR " to that." + + + .FUNCT V-TIE-UP + PRINTR "You could certainly never tie it with that!" + + + .FUNCT V-TREASURE + CALL NULL-F + ZERO? STACK \TRUE + CALL NULL-F + ZERO? STACK \TRUE + PRINTR "Nothing happens." + + + .FUNCT PRE-TURN + EQUAL? PRSI,FALSE-VALUE,ROOMS \?ELS5 + PRINTR "Your bare hands don't appear to be enough." +?ELS5: FSET? PRSO,TURNBIT /FALSE + PRINTR "You can't turn that!" + + + .FUNCT V-TURN + PRINTR "This has no effect." + + + .FUNCT V-UNLOCK + CALL V-LOCK + RSTACK + + + .FUNCT V-UNTIE + PRINTR "This cannot be tied, so it cannot be untied!" + + + .FUNCT V-WAIT,NUM=3 + PRINTI "Time passes..." + CRLF +?PRG3: DLESS? 'NUM,0 \?ELS7 + JUMP ?REP4 +?ELS7: CALL CLOCKER + ZERO? STACK /?PRG3 +?REP4: SET 'CLOCK-WAIT,TRUE-VALUE + RETURN CLOCK-WAIT + + + .FUNCT V-WALK,PT,PTS,STR,OBJ,RM + ZERO? P-WALK-DIR \?ELS5 + CALL PERFORM,V?WALK-TO,PRSO + RTRUE +?ELS5: GETPT HERE,PRSO >PT + ZERO? PT /?ELS7 + PTSIZE PT >PTS + EQUAL? PTS,UEXIT \?ELS12 + GETB PT,REXIT + CALL GOTO,STACK + RSTACK +?ELS12: EQUAL? PTS,NEXIT \?ELS14 + GET PT,NEXITSTR + PRINT STACK + CRLF + RETURN 2 +?ELS14: EQUAL? PTS,FEXIT \?ELS20 + GET PT,FEXITFCN + CALL STACK >RM + ZERO? RM /?ELS25 + CALL GOTO,RM + RSTACK +?ELS25: CALL NULL-F + ZERO? STACK \FALSE + RETURN 2 +?ELS20: EQUAL? PTS,CEXIT \?ELS33 + GETB PT,CEXITFLAG + VALUE STACK + ZERO? STACK /?ELS38 + GETB PT,REXIT + CALL GOTO,STACK + RSTACK +?ELS38: GET PT,CEXITSTR >STR + ZERO? STR /?ELS40 + PRINT STR + CRLF + RETURN 2 +?ELS40: PRINTI "You can't go that way." + CRLF + RETURN 2 +?ELS33: EQUAL? PTS,DEXIT \FALSE + GETB PT,DEXITOBJ >OBJ + FSET? OBJ,OPENBIT \?ELS57 + GETB PT,REXIT + CALL GOTO,STACK + RSTACK +?ELS57: GET PT,DEXITSTR >STR + ZERO? STR /?ELS59 + PRINT STR + CRLF + RETURN 2 +?ELS59: PRINTI "The " + PRINTD OBJ + PRINTI " is closed." + CRLF + CALL THIS-IS-IT,OBJ + RETURN 2 +?ELS7: ZERO? LIT \?ELS71 + RANDOM 100 + GRTR? 80,STACK \?ELS71 + EQUAL? WINNER,ADVENTURER \?ELS71 + FSET? HERE,NONLANDBIT /?ELS71 + ZERO? SPRAYED? /?ELS78 + PRINTI "There are odd noises in the darkness, and there is no exit in that direction." + CRLF + RETURN 2 +?ELS78: CALL NULL-F + ZERO? STACK \FALSE + CALL JIGS-UP,STR?181 + RSTACK +?ELS71: PRINTI "You can't go that way." + CRLF + RETURN 2 + + + .FUNCT V-WALK-AROUND + PRINTR "Use compass directions for movement." + + + .FUNCT V-WALK-TO + ZERO? PRSO /?ELS5 + IN? PRSO,HERE /?THN8 + CALL GLOBAL-IN?,PRSO,HERE + ZERO? STACK /?ELS5 +?THN8: PRINTR "It's here!" +?ELS5: PRINTR "You should supply a direction!" + + + .FUNCT V-WAVE + CALL HACK-HACK,STR?182 + RSTACK + + + .FUNCT V-WEAR + FSET? PRSO,WEARBIT /?ELS5 + PRINTI "You can't wear the " + PRINTD PRSO + PRINTR "." +?ELS5: CALL PERFORM,V?TAKE,PRSO + RTRUE + + + .FUNCT V-WIN + PRINTR "Naturally!" + + + .FUNCT V-WIND + PRINTI "You cannot wind up a " + PRINTD PRSO + PRINTR "." + + + .FUNCT V-WISH + CALL PERFORM,V?MAKE,WISH + RSTACK + + + .FUNCT V-YELL + PRINTR "Aaaarrrrgggghhhh!" + + + .FUNCT V-ZORK + PRINTR "At your service!" + + + .FUNCT V-FIRST-LOOK + CALL DESCRIBE-ROOM + ZERO? STACK /FALSE + ZERO? SUPER-BRIEF \FALSE + CALL DESCRIBE-OBJECTS + RSTACK + + + .FUNCT DESCRIBE-ROOM,LOOK?=0,V?,STR,AV + ZERO? LOOK? /?ORP4 + PUSH LOOK? + JUMP ?THN1 +?ORP4: PUSH VERBOSE +?THN1: POP 'V? + ZERO? LIT \?CND5 + PRINTI "It is pitch black." + ZERO? SPRAYED? \?CND10 + PRINTI " You are likely to be eaten by a grue." +?CND10: CRLF + CALL NULL-F + RFALSE +?CND5: FSET? HERE,TOUCHBIT /?CND15 + FSET HERE,TOUCHBIT + SET 'V?,TRUE-VALUE +?CND15: CALL NULL-F + IN? HERE,ROOMS \?CND18 + PRINTD HERE + LOC WINNER >AV + FSET? AV,VEHBIT \?CND23 + PRINTI ", in the " + PRINTD AV +?CND23: CRLF +?CND18: ZERO? LOOK? \?THN31 + ZERO? SUPER-BRIEF /?THN31 + EQUAL? HERE,ZORK3 \TRUE +?THN31: LOC WINNER >AV + ZERO? V? /?ELS35 + GETP HERE,P?ACTION + CALL STACK,M-LOOK + ZERO? STACK \TRUE +?ELS35: ZERO? V? /?ELS39 + GETP HERE,P?LDESC >STR + ZERO? STR /?ELS39 + PRINT STR + CRLF + JUMP ?CND33 +?ELS39: GETP HERE,P?ACTION + CALL STACK,M-FLASH +?CND33: EQUAL? HERE,AV /TRUE + FSET? AV,VEHBIT \TRUE + GETP AV,P?ACTION + CALL STACK,M-LOOK + RTRUE + + + .FUNCT DESCRIBE-OBJECTS,V?=0 + ZERO? LIT /?ELS5 + FIRST? HERE \FALSE + ZERO? V? /?ORP15 + PUSH V? + JUMP ?THN12 +?ORP15: PUSH VERBOSE +?THN12: POP 'V? + CALL PRINT-CONT,HERE,V?,-1 + RSTACK +?ELS5: PRINTR "Only bats can see in the dark. And you're not one." + + + .FUNCT DESCRIBE-OBJECT,OBJ,V?,LEVEL,STR=0,AV + SET 'DESC-OBJECT,OBJ + ZERO? LEVEL \?ELS3 + GETP OBJ,P?DESCFCN + CALL STACK,M-OBJDESC + ZERO? STACK \TRUE +?ELS3: ZERO? LEVEL \?ELS7 + FSET? OBJ,TOUCHBIT /?ELS13 + GETP OBJ,P?FDESC >STR + ZERO? STR \?THN10 +?ELS13: GETP OBJ,P?LDESC >STR + ZERO? STR /?ELS7 +?THN10: PRINT STR + JUMP ?CND1 +?ELS7: ZERO? LEVEL \?ELS17 + PRINTI "There is a " + PRINTD OBJ + PRINTI " here" + FSET? OBJ,ONBIT \?CND20 + PRINTI " (providing light)" +?CND20: PRINTI "." + JUMP ?CND1 +?ELS17: GET INDENTS,LEVEL + PRINT STACK + PRINTI "A " + PRINTD OBJ + FSET? OBJ,ONBIT \?ELS35 + PRINTI " (providing light)" + JUMP ?CND1 +?ELS35: FSET? OBJ,WEARBIT \?CND1 + IN? OBJ,WINNER \?CND1 + PRINTI " (being worn)" +?CND1: EQUAL? OBJ,SPELL-VICTIM \?CND44 + EQUAL? SPELL-USED,W?FLOAT \?CND44 + PRINTI " (floating in midair)" +?CND44: ZERO? LEVEL \?CND51 + LOC WINNER >AV + ZERO? AV /?CND51 + FSET? AV,VEHBIT \?CND51 + PRINTI " (outside the " + PRINTD AV + PRINTI ")" +?CND51: CRLF + CALL SEE-INSIDE?,OBJ + ZERO? STACK /FALSE + FIRST? OBJ \FALSE + CALL PRINT-CONT,OBJ,V?,LEVEL + RSTACK + + + .FUNCT PRINT-CONTENTS,OBJ,F,N,1ST?=1,IT?=0,TWO?=0 + FIRST? OBJ >F \FALSE +?PRG6: NEXT? F >N /?KLU38 +?KLU38: ZERO? 1ST? /?ELS10 + SET '1ST?,FALSE-VALUE + JUMP ?CND8 +?ELS10: PRINTI ", " + ZERO? N \?CND8 + PRINTI "and " +?CND8: PRINTI "a " + PRINTD F + ZERO? IT? \?ELS25 + ZERO? TWO? \?ELS25 + SET 'IT?,F + JUMP ?CND23 +?ELS25: SET 'TWO?,TRUE-VALUE + SET 'IT?,FALSE-VALUE +?CND23: SET 'F,N + ZERO? F \?PRG6 + ZERO? IT? /TRUE + ZERO? TWO? \TRUE + CALL THIS-IS-IT,IT? + RTRUE + + + .FUNCT PRINT-CONT,OBJ,V?=0,LEVEL=0,Y,1ST?,SHIT,AV,STR,PV?=0,INV?=0 + FIRST? OBJ >Y \TRUE + LOC WINNER >AV + ZERO? AV /?ELS6 + FSET? AV,VEHBIT \?ELS6 + JUMP ?CND4 +?ELS6: SET 'AV,FALSE-VALUE +?CND4: SET '1ST?,TRUE-VALUE + SET 'SHIT,TRUE-VALUE + LOC OBJ + EQUAL? WINNER,OBJ,STACK \?ELS13 + SET 'INV?,TRUE-VALUE + JUMP ?CND11 +?ELS13: +?PRG16: ZERO? Y \?ELS20 + ZERO? LEVEL \?REP17 + EQUAL? SPELL?,S-FANTASIZE \?REP17 + RANDOM 100 + GRTR? 20,STACK \?REP17 + PRINTI "There is a " + CALL PICK-ONE,FANTASIES + PRINT STACK + PRINTI " here." + CRLF + SET '1ST?,FALSE-VALUE + JUMP ?REP17 +?ELS20: EQUAL? Y,AV \?ELS29 + SET 'PV?,TRUE-VALUE + JUMP ?CND18 +?ELS29: EQUAL? Y,WINNER \?ELS31 + JUMP ?CND18 +?ELS31: FSET? Y,INVISIBLE /?CND18 + FSET? Y,TOUCHBIT /?CND18 + GETP Y,P?FDESC >STR + ZERO? STR /?CND18 + FSET? Y,NDESCBIT /?CND36 + PRINT STR + CRLF + SET 'SHIT,FALSE-VALUE +?CND36: CALL SEE-INSIDE?,Y + ZERO? STACK /?CND18 + LOC Y + GETP STACK,P?DESCFCN + ZERO? STACK \?CND18 + FIRST? Y \?CND18 + CALL PRINT-CONT,Y,V?,0 + ZERO? STACK /?CND41 + SET '1ST?,FALSE-VALUE +?CND41: +?CND18: NEXT? Y >Y /?KLU96 +?KLU96: JUMP ?PRG16 +?REP17: +?CND11: FIRST? OBJ >Y /?KLU97 +?KLU97: +?PRG49: ZERO? Y \?ELS53 + ZERO? PV? /?REP50 + ZERO? AV /?REP50 + FIRST? AV \?REP50 + INC 'LEVEL + CALL PRINT-CONT,AV,V?,LEVEL + JUMP ?REP50 +?ELS53: EQUAL? Y,AV,ADVENTURER \?ELS60 + JUMP ?CND51 +?ELS60: FSET? Y,INVISIBLE /?CND51 + ZERO? INV? \?THN65 + FSET? Y,TOUCHBIT /?THN65 + GETP Y,P?FDESC + ZERO? STACK \?CND51 +?THN65: FSET? Y,NDESCBIT /?ELS69 + ZERO? 1ST? /?CND70 + CALL FIRSTER,OBJ,LEVEL + ZERO? STACK /?CND74 + LESS? LEVEL,0 \?CND74 + SET 'LEVEL,0 +?CND74: INC 'LEVEL + SET '1ST?,FALSE-VALUE +?CND70: LESS? LEVEL,0 \?CND80 + SET 'LEVEL,0 +?CND80: CALL DESCRIBE-OBJECT,Y,V?,LEVEL + JUMP ?CND51 +?ELS69: FIRST? Y \?CND51 + CALL SEE-INSIDE?,Y + ZERO? STACK /?CND51 + INC 'LEVEL + CALL PRINT-CONT,Y,V?,LEVEL + DEC 'LEVEL +?CND51: NEXT? Y >Y /?KLU98 +?KLU98: JUMP ?PRG49 +?REP50: ZERO? 1ST? /TRUE + ZERO? SHIT /TRUE + RFALSE + + + .FUNCT FIRSTER,OBJ,LEVEL + CALL NULL-F + ZERO? STACK \TRUE + EQUAL? OBJ,WINNER \?ELS7 + PRINTR "You are carrying:" +?ELS7: IN? OBJ,ROOMS /FALSE + GRTR? LEVEL,0 \?CND12 + GET INDENTS,LEVEL + PRINT STACK +?CND12: FSET? OBJ,SURFACEBIT \?ELS21 + PRINTI "Sitting on the " + PRINTD OBJ + PRINTR " is: " +?ELS21: FSET? OBJ,ACTORBIT \?ELS25 + PRINTI "The " + PRINTD OBJ + PRINTR " is holding: " +?ELS25: PRINTI "The " + PRINTD OBJ + PRINTR " contains:" + + + .FUNCT SEE-INSIDE?,OBJ + FSET? OBJ,INVISIBLE /FALSE + FSET? OBJ,TRANSBIT /TRUE + FSET? OBJ,OPENBIT /TRUE + RFALSE + + + .FUNCT SCORE-UPD,NUM + ADD BASE-SCORE,NUM >BASE-SCORE + ADD SCORE,NUM >SCORE + CALL NULL-F + RTRUE + + + .FUNCT SCORE-OBJ,OBJ,TEMP + GETP OBJ,P?VALUE >TEMP + GRTR? TEMP,0 \FALSE + CALL SCORE-UPD,TEMP + PUTP OBJ,P?VALUE,0 + RTRUE + + + .FUNCT YES? + PRINTI ">" + READ P-INBUF,P-LEXV + GET P-LEXV,1 + EQUAL? STACK,W?YES,W?Y \FALSE + RTRUE + + + .FUNCT ITAKE,VB=1,CNT,OBJ,?TMP1 + CALL NULL-F + ZERO? STACK \FALSE + FSET? PRSO,TAKEBIT /?ELS7 + ZERO? VB /FALSE + CALL PICK-ONE,YUKS + PRINT STACK + CRLF + RFALSE +?ELS7: EQUAL? PRSO,SPELL-VICTIM \?ELS15 + EQUAL? SPELL-USED,W?FLOAT,W?FREEZE \?ELS15 + EQUAL? SPELL-USED,W?FLOAT \?ELS20 + PRINTI "You can't reach that. It's floating above your head." + CRLF + RFALSE +?ELS20: PRINTI "It seems rooted to the spot." + CRLF + RFALSE +?ELS15: LOC PRSO + FSET? STACK,CONTBIT \?ELS28 + LOC PRSO + FSET? STACK,OPENBIT \FALSE +?ELS28: LOC PRSO + IN? STACK,WINNER /?ELS32 + CALL WEIGHT,PRSO >?TMP1 + CALL WEIGHT,WINNER + ADD ?TMP1,STACK + GRTR? STACK,LOAD-ALLOWED \?ELS32 + ZERO? VB /?CND35 + PRINTI "Your load is too heavy" + LESS? LOAD-ALLOWED,LOAD-MAX \?ELS43 + PRINTI ", especially in light of your condition." + JUMP ?CND41 +?ELS43: PRINTI "." +?CND41: CRLF +?CND35: RETURN 2 +?ELS32: EQUAL? PRSA,V?TAKE \?ELS53 + CALL CCOUNT,WINNER >CNT + GRTR? CNT,FUMBLE-NUMBER \?ELS53 + MUL CNT,FUMBLE-PROB >?TMP1 + RANDOM 100 + GRTR? ?TMP1,STACK \?ELS53 + PRINTI "You're holding too many things already!" + CRLF + RFALSE +?ELS53: MOVE PRSO,WINNER + FCLEAR PRSO,NDESCBIT + FSET PRSO,TOUCHBIT + EQUAL? SPELL?,S-FILCH \?CND60 + CALL RIPOFF,PRSO,WIZARD-CASE + ZERO? STACK /?CND60 + PRINTI "When you touch the " + PRINTD PRSO + PRINTI " it immediately disappears!" + CRLF + RFALSE +?CND60: CALL SCORE-OBJ,PRSO + RTRUE + + + .FUNCT IDROP + IN? PRSO,WINNER /?ELS5 + LOC PRSO + IN? STACK,WINNER /?ELS5 + PRINTI "You're not carrying the " + PRINTD PRSO + PRINTI "." + CRLF + RFALSE +?ELS5: IN? PRSO,WINNER /?ELS11 + LOC PRSO + FSET? STACK,OPENBIT /?ELS11 + PRINTI "The " + PRINTD PRSO + PRINTI " is closed." + CRLF + RFALSE +?ELS11: LOC WINNER + MOVE PRSO,STACK + RTRUE + + + .FUNCT CCOUNT,OBJ,CNT=0,X + FIRST? OBJ >X \?CND1 +?PRG4: FSET? X,WEARBIT /?CND6 + INC 'CNT +?CND6: NEXT? X >X /?PRG4 +?CND1: RETURN CNT + + + .FUNCT WEIGHT,OBJ,CONT,WT=0 + FIRST? OBJ >CONT \?CND1 +?PRG4: EQUAL? OBJ,PLAYER \?ELS8 + FSET? CONT,WEARBIT \?ELS8 + INC 'WT + JUMP ?CND6 +?ELS8: CALL WEIGHT,CONT + ADD WT,STACK >WT +?CND6: NEXT? CONT >CONT /?PRG4 +?CND1: GETP OBJ,P?SIZE + ADD WT,STACK + RSTACK + + + .FUNCT HACK-HACK,STR + IN? PRSO,GLOBAL-OBJECTS \?ELS5 + EQUAL? PRSA,V?LOWER,V?RAISE,V?WAVE \?ELS5 + PRINTI "The " + PRINTD PRSO + PRINTR " isn't here!" +?ELS5: PRINT STR + PRINTD PRSO + CALL PICK-ONE,HO-HUM + PRINT STACK + CRLF + RTRUE + + + .FUNCT NO-GO-TELL,AV,WLOC + ZERO? AV /?ELS3 + PRINTI "You can't go there in a " + PRINTD WLOC + PRINTI "." + JUMP ?CND1 +?ELS3: PRINTI "You can't go there without a vehicle." +?CND1: CRLF + RTRUE + + + .FUNCT GOTO,RM,V?=1,LB,WLOC,AV=0,OLIT,OHERE + FSET? RM,RLANDBIT /?PRD1 + PUSH 0 + JUMP ?PRD2 +?PRD1: PUSH 1 +?PRD2: SET 'LB,STACK + LOC WINNER >WLOC + SET 'OLIT,LIT + SET 'OHERE,HERE + FSET? WLOC,VEHBIT \?CND3 + GETP WLOC,P?VTYPE >AV +?CND3: ZERO? LB \?ELS10 + ZERO? AV \?ELS10 + CALL NO-GO-TELL,AV,WLOC + RFALSE +?ELS10: ZERO? LB \?ELS14 + FSET? RM,AV /?ELS14 + CALL NO-GO-TELL,AV,WLOC + RFALSE +?ELS14: FSET? HERE,RLANDBIT \?ELS18 + ZERO? LB /?ELS18 + ZERO? AV /?ELS18 + EQUAL? AV,RLANDBIT /?ELS18 + FSET? RM,AV /?ELS18 + CALL NO-GO-TELL,AV,WLOC + RFALSE +?ELS18: FSET? RM,RMUNGBIT \?ELS22 + GETP RM,P?LDESC + PRINT STACK + CRLF + RFALSE +?ELS22: ZERO? LB /?CND27 + FSET? HERE,RLANDBIT /?CND27 + ZERO? DEAD \?CND27 + FSET? WLOC,VEHBIT \?CND27 + EQUAL? WLOC,BALLOON \?ELS34 + PRINTI "The balloon lands." + CRLF + JUMP ?CND27 +?ELS34: FSET? WLOC,VEHBIT \?CND27 + PRINTI "The " + PRINTD WLOC + PRINTI " comes to a stop." + CRLF + CRLF +?CND27: ZERO? AV /?ELS43 + MOVE WLOC,RM + JUMP ?CND41 +?ELS43: MOVE WINNER,RM +?CND41: SET 'HERE,RM + CALL LIT?,HERE >LIT + ZERO? OLIT \?CND47 + ZERO? LIT \?CND47 + RANDOM 100 + GRTR? 80,STACK \?CND47 + ZERO? SPRAYED? /?ELS54 + PRINTI "There are sinister gurgling noises in the darkness all around you!" + CRLF + JUMP ?CND47 +?ELS54: CALL NULL-F + ZERO? STACK \FALSE + PRINTI "Oh, no! A lurking grue slithered into the " + LOC WINNER + FSET? STACK,VEHBIT \?ELS66 + LOC WINNER + PRINTD STACK + JUMP ?CND64 +?ELS66: PRINTI "room" +?CND64: CALL JIGS-UP,STR?191 + RTRUE +?CND47: ZERO? LIT \?CND73 + EQUAL? WINNER,ADVENTURER \?CND73 + PRINTI "You have moved into a dark place." + CRLF + SET 'P-CONT,FALSE-VALUE +?CND73: GETP HERE,P?ACTION + CALL STACK,M-ENTER + CALL SCORE-OBJ,RM + EQUAL? HERE,RM \TRUE + EQUAL? ADVENTURER,WINNER /?ELS84 + IN? ADVENTURER,OHERE \?ELS84 + PRINTI "The " + PRINTD WINNER + PRINTR " leaves the room." +?ELS84: CALL NULL-F + ZERO? STACK \TRUE + ZERO? V? /TRUE + EQUAL? WINNER,ADVENTURER \TRUE + CALL V-FIRST-LOOK + RTRUE + + + .FUNCT LKP,ITM,TBL,CNT=0,LEN + GET TBL,0 >LEN +?PRG1: IGRTR? 'CNT,LEN /FALSE + GET TBL,CNT + EQUAL? STACK,ITM \?PRG1 + EQUAL? CNT,LEN /FALSE + ADD CNT,1 + GET TBL,STACK + RSTACK + + + .FUNCT DO-WALK,DIR + SET 'P-WALK-DIR,DIR + CALL PERFORM,V?WALK,DIR + RSTACK + + + .FUNCT GLOBAL-IN?,OBJ1,OBJ2,TX + GETPT OBJ2,P?GLOBAL >TX + ZERO? TX /FALSE + PTSIZE TX + SUB STACK,1 + CALL ZMEMQB,OBJ1,TX,STACK + RSTACK + + + .FUNCT FIND-IN,WHERE,WHAT,W + FIRST? WHERE >W /?KLU13 +?KLU13: ZERO? W /FALSE +?PRG4: FSET? W,WHAT \?ELS8 + EQUAL? W,ADVENTURER /?ELS8 + RETURN W +?ELS8: NEXT? W >W /?PRG4 + RFALSE + + + .FUNCT HELD?,CAN +?PRG1: LOC CAN >CAN + ZERO? CAN /FALSE + EQUAL? CAN,WINNER \?PRG1 + RTRUE + + + .FUNCT OTHER-SIDE,DOBJ,P=0,TX +?PRG1: NEXTP HERE,P >P + LESS? P,LOW-DIRECTION /FALSE + GETPT HERE,P >TX + PTSIZE TX + EQUAL? STACK,DEXIT \?PRG1 + GETB TX,DEXITOBJ + EQUAL? STACK,DOBJ \?PRG1 + RETURN P + + + .FUNCT MUNG-ROOM,RM,STR + EQUAL? RM,INSIDE-BARROW /FALSE + FSET RM,RMUNGBIT + PUTP RM,P?LDESC,STR + RTRUE + + + .FUNCT THIS-IS-IT,OBJ + SET 'P-IT-OBJECT,OBJ + RETURN P-IT-OBJECT + + .ENDI diff --git a/gverbs.zil b/gverbs.zil index 62b1cbd..642b11f 100644 --- a/gverbs.zil +++ b/gverbs.zil @@ -1,4 +1,4 @@ - "Generic VERBS file for + "Generic VERBS file for The ZORK Trilogy started on 7/25/83 by SEM" @@ -22,7 +22,7 @@ - > + > ;"V-DIAGNOSE is in ACTIONS.ZIL" @@ -30,13 +30,33 @@ ) (T )>> - - + "> + + > + + + ) + ( + + ) + (T + )>) + ( + )>>> + + + - > - > + ) (ELSE )>> @@ -78,18 +98,19 @@ ') +Infocom interactive fiction - a fantasy story| +Copyright (c) 1981, 1982, 1983, 1984, 1985, 1986">) (<==? ,ZORK-NUMBER 2> ') - (T +Infocom interactive fiction - a fantasy story| +Copyright (c) 1981, 1982, 1983, 1986">) + (<==? ,ZORK-NUMBER 3> ')> - - 8> 0>> - )> +Infocom interactive fiction - a fantasy story| +Copyright 1982, 1983, 1984, 1986">)> + +Release "> *3777*>> (T )>> - - > - ) + + > + +> + ) (T - - )> - > + > + )>> + + + > + + + > ^L @@ -123,9 +153,9 @@ Version "> > -)) +;)) - ) + ) (T > @@ -190,7 +220,7 @@ Version "> > - '( + '( )) (T '( ))> @@ -202,6 +232,9 @@ Version "> ) (T )>) + ( + + ) (T )> @@ -223,9 +256,12 @@ Version "> > +> + - ) + ) ( ) (T @@ -239,11 +275,16 @@ Version "> (T '( ))> ( - + + > - ) + + + ) + (T )> + ) (T > > + % + ' + ,P?DOWN) + (T ,P?UP)> + T>) + (ELSE + ')>> - '( - )) - (T - '( - - ))> + + % + ') + (ELSE + ')> + ) (T )>> ) "AUX" X TX) - ,PRSO> + >> )> > )>)> ) - ( - ) (> >> ) + (% + '> + ,TREE> + >) + (ELSE ')> + + ) + ( ,ROOMS> + ) (T )>> @@ -352,6 +405,10 @@ Version "> ) ( > + + + )> ) @@ -367,13 +424,22 @@ Version "> )> + % + ' + + )>) + (ELSE T)> ) (T )>> ,PRSO>> + + ,VEHBIT>> + > + ) + ( ,PRSO>> ) ( @@ -434,8 +500,11 @@ Version "> )>> ) (DRINK? <>) (NOBJ <>)) - > > - + > + > + ,WINNER>>> + ) + ( ) (T @@ -445,14 +514,15 @@ Version "> > - > ) - ( + ( + >> ) - (> + ( + >> ) (> @@ -465,12 +535,12 @@ Version "> "I don't think that the " D ,PRSO " would agree with you." CR>)>> + >> + )> - - >> - )>> +probably)." CR>> (MAX CNT ECH) FIX) @@ -540,7 +610,7 @@ probably)." CR> > )> ) +"The " D ,PRSO " floats serenely in midair." CR>) ( > @@ -558,8 +628,7 @@ probably)." CR> - > - >)> + >)> > @@ -580,10 +649,15 @@ probably)." CR> )>> + ,ROOMS> + ,VEHBIT>> + > + ) + (> ) - (T )>> + (ELSE + )>> > @@ -606,6 +680,20 @@ probably)." CR> )>> +;"OLD ZORK1 PRE-FILL" +; + > + 1>>> + + ) + (T + + )>) + (> + + )>> + @@ -702,7 +790,7 @@ D ,PRSO "." CR>)>) > - @@ -833,6 +921,11 @@ killing yourself." CR CR> > ) + % + '( + )) + (ELSE '( ))> (T )>) (T @@ -953,14 +1046,21 @@ by knocking down the wall on the east of the room." CR> (T )>)) (T '( T))> - (T + ( ,VEHBIT> - )>> + ) + (T + )>> > > + + + ) + (ELSE )>> > @@ -970,6 +1070,10 @@ by knocking down the wall on the east of the room." CR> + % + ' + >)>) + (ELSE ')> ) (T @@ -1121,23 +1225,18 @@ by knocking down the wall on the east of the room." CR> )> )>) (T - ' - - ) - (T > )>>)> + ' + + )>)> + > > - > >) - ( ,W?HELLO> - > - ) - (T - > - > + ( ,W?HELLO>> + > )>> +"Talking to yourself is a sign of impending mental collapse." CR>)> + > > @@ -1164,8 +1263,11 @@ by knocking down the wall on the east of the room." CR> - - > + + + ') + (ELSE + '>)> ) (T )> @@ -1268,7 +1370,7 @@ D ,PRSO " with a weapon." CR>) <==? ,ZORK-NUMBER 2>> '( - > ) (T )> @@ -1306,14 +1408,14 @@ D ,PRSO " with a weapon." CR>) (,PRSI > - ) - % - '( + )> + % + ' > - )) - (T - '( T))> - (>> + )>) + (ELSE + ')> + >> ) (T > @@ -1335,7 +1437,7 @@ D ,PRSO " with a weapon." CR>) >) (T )>) (T @@ -1345,50 +1447,40 @@ the manual." CR>)>) ) "AUX" M) #DECL ((OBJ) (M) ) - - > + + >> + ) ( > ) (>> - - '(>> - - )) - (T - '( ))> - % - '( - - ,SCOL-ROOM> - - )) - (T - '( ))> - % - '( - > 1>>> - > - > - ) - (T - )> - )) - (T - '( ))> - % - '( - + '>> + + ) + ( + + ,SCOL-ROOM> + + ) + ( + > 1>>> + > + > + ) + (T + )> + ) + ( + - )) - (T - '( ))> - (T - )>) + )>) + (ELSE ')> + ) ( ) (T @@ -1399,6 +1491,7 @@ the manual." CR>)>) + ) "The " D ,PRSI " ducks as the " D ,PRSO " flies by and crashes to the ground." CR>) (T )>) - (T )>> + (ELSE )>> > @@ -1437,7 +1530,20 @@ CR>) )>> > + % + ' ,ROOMS> + > + + )>) + (ELSE T)> + + ' ,ROOMS> + >>) + (ELSE + ' ,ROOMS>)> + ) + (> )>> > - > + + >> ) (T )>> @@ -1583,7 +1690,7 @@ direction." CR> detect a dim light from the east." CR>)>) (T ')> - >)> + )> > )> @@ -1598,7 +1705,10 @@ detect a dim light from the east." CR>)>) > ,VEHBIT> )> )> - > + + ' >) + (ELSE + '>)> > ; )> @@ -1682,17 +1792,30 @@ long description (fdesc or ldesc), otherwise will print short." )>>)>> ) (LEVEL 0) - "AUX" Y 1ST? AV STR (PV? <>) (INV? <>)) + "AUX" Y 1ST? SHIT AV STR (PV? <>) (INV? <>)) >> )> > > T) (ELSE >)> + > ) (ELSE >) + + '( + + <==? ,SPELL? ,S-FANTASIZE> + > + + " here." CR> + >)> + )) + (ELSE + '( + ))> ( ) () (> @@ -1700,6 +1823,7 @@ long description (fdesc or ldesc), otherwise will print short." >> > + > ;>)> ,P?DESCFCN>> @@ -1713,7 +1837,7 @@ long description (fdesc or ldesc), otherwise will print short." > > ;"not in Zork III" )> - >) + ) () (> ) ( > > ;"not in Zork III" - )>)> - >>> + + > ;"not in Zork III")>)> + >> + ) (T )>> @@ -1787,10 +1913,6 @@ for the final secret.\"" CR>)>) )>> - - > - "> @@ -1864,8 +1986,7 @@ for the final secret.\"" CR>)>) > ,FUMBLE-NUMBER> >> +"You're holding too many things already!" CR> ) (T @@ -1936,7 +2057,8 @@ to hold onto it!" CR> CR> ) (T - > > + > + + > % ') - (T - ' + (<==? ,ZORK-NUMBER 2> + ' ) ( )>) + (<==? ,ZORK-NUMBER 3> + ' + )>)>)> ) @@ -2039,15 +2168,18 @@ stumbled into an authentic grue lair!">)) (> > ) + % + '( + ;"no double description" + > + )) + (ELSE + '( ))> (> )> )>> -> - )>> - )) > .LEN> @@ -2061,7 +2193,7 @@ stumbled into an authentic grue lair!">)) > -> <- 2> 1>>> @@ -2082,7 +2214,7 @@ stumbled into an authentic grue lair!">)) >)>>> - >> @@ -2103,17 +2235,19 @@ stumbled into an authentic grue lair!">)) )>)>>> - )> + % + ' + )>) + (ELSE T)> > - > + > -> + + >)> ZORK2.ZIL.18 +Input file: SS:GMACROS.ZIL.7 +Compiling routine: ZPROB +Compiling routine: RANDOM-ELEMENT +Compiling routine: PICK-ONE +Input file: SS:GSYNTAX.ZIL.154 +Input file: SS:2DUNGEON.ZIL.79 +Compiling routine: GO +Compiling routine: HEDGES-F +Compiling routine: LT-CRACK-PSEUDO +Compiling routine: CC-CRACK-PSEUDO +Compiling routine: GLOBAL-MENHIR-F +Compiling routine: GLOBAL-CERBERUS-F +Compiling routine: CRACK-PSEUDO +Compiling routine: ALICE-HOLE +Compiling routine: SLOT-F +Compiling routine: TEAPOT-F +Compiling routine: ROSE-F +Compiling routine: FOOTPAD-F +Compiling routine: COMPASS-F +Input file: SS:GGLOBALS.ZIL.67 +Compiling routine: NOT-HERE-OBJECT-F +Compiling routine: NOT-HERE-PRINT +Compiling routine: NULL-F +Compiling routine: STAIRS-F +Compiling routine: SAILOR-FCN +Compiling routine: GROUND-FUNCTION +Compiling routine: GRUE-FUNCTION +Compiling routine: CRETIN-FCN +Compiling routine: PATH-OBJECT +Compiling routine: ZORKMID-FUNCTION +Input file: SS:GCLOCK.ZIL.7 +Compiling routine: QUEUE +Compiling routine: INT +Compiling routine: CLOCKER +Input file: SS:GMAIN.ZIL.41 +Compiling routine: MAIN-LOOP +Compiling routine: MAIN-LOOP-1 +Compiling routine: PERFORM +Input file: SS:GPARSER.ZIL.41 +Compiling routine: PARSER +Compiling routine: STUFF +Compiling routine: INBUF-STUFF +Compiling routine: INBUF-ADD +Compiling routine: WT? +Compiling routine: CLAUSE +Compiling routine: NUMBER? +Compiling routine: ORPHAN-MERGE +Compiling routine: ACLAUSE-WIN +Compiling routine: NCLAUSE-WIN +Compiling routine: WORD-PRINT +Compiling routine: UNKNOWN-WORD +Compiling routine: CANT-USE +Compiling routine: SYNTAX-CHECK +Compiling routine: CANT-ORPHAN +Compiling routine: ORPHAN +Compiling routine: THING-PRINT +Compiling routine: BUFFER-PRINT +Compiling routine: PREP-PRINT +Compiling routine: CLAUSE-COPY +Compiling routine: CLAUSE-ADD +Compiling routine: PREP-FIND +Compiling routine: SYNTAX-FOUND +Compiling routine: GWIM +Compiling routine: SNARF-OBJECTS +Compiling routine: BUT-MERGE +Compiling routine: SNARFEM +Compiling routine: GET-OBJECT +Compiling routine: WHICH-PRINT +Compiling routine: GLOBAL-CHECK +Compiling routine: DO-SL +Compiling routine: SEARCH-LIST +Compiling routine: OBJ-FOUND +Compiling routine: TAKE-CHECK +Compiling routine: ITAKE-CHECK +Compiling routine: MANY-CHECK +Compiling routine: ZMEMQ +Compiling routine: ZMEMQB +Compiling routine: LIT? +Compiling routine: THIS-IT? +Compiling routine: ACCESSIBLE? +Compiling routine: META-LOC +Input file: SS:GVERBS.ZIL.440 +Compiling routine: V-VERBOSE +Compiling routine: V-BRIEF +Compiling routine: V-SUPER-BRIEF +Compiling routine: V-INVENTORY +Compiling routine: FINISH +Compiling routine: V-QUIT +Compiling routine: V-RESTART +Compiling routine: V-RESTORE +Compiling routine: V-SAVE +Compiling routine: V-SCRIPT +Compiling routine: V-UNSCRIPT +Compiling routine: V-VERSION +Compiling routine: V-VERIFY +Compiling routine: V-COMMAND-FILE +Compiling routine: V-RANDOM +Compiling routine: V-RECORD +Compiling routine: V-UNRECORD +Compiling routine: V-ADVENT +Compiling routine: V-ALARM +Compiling routine: V-ANSWER +Compiling routine: V-ATTACK +Compiling routine: V-BACK +Compiling routine: V-BLAST +Compiling routine: PRE-BOARD +Compiling routine: V-BOARD +Compiling routine: V-BREATHE +Compiling routine: V-BRUSH +Compiling routine: V-BUG +Compiling routine: TELL-NO-PRSI +Compiling routine: PRE-BURN +Compiling routine: V-BURN +Compiling routine: V-CHOMP +Compiling routine: V-CLIMB-DOWN +Compiling routine: V-CLIMB-FOO +Compiling routine: V-CLIMB-ON +Compiling routine: V-CLIMB-UP +Compiling routine: V-CLOSE +Compiling routine: V-COMMAND +Compiling routine: V-COUNT +Compiling routine: V-CROSS +Compiling routine: V-CURSES +Compiling routine: V-CUT +Compiling routine: V-DEFLATE +Compiling routine: V-DIG +Compiling routine: V-DISEMBARK +Compiling routine: V-DISENCHANT +Compiling routine: V-DRINK +Compiling routine: V-DRINK-FROM +Compiling routine: PRE-DROP +Compiling routine: V-DROP +Compiling routine: V-EAT +Compiling routine: HIT-SPOT +Compiling routine: V-ECHO +Compiling routine: V-ENCHANT +Compiling routine: REMOVE-CAREFULLY +Compiling routine: V-ENTER +Compiling routine: V-EXAMINE +Compiling routine: V-EXIT +Compiling routine: V-EXORCISE +Compiling routine: PRE-FILL +Compiling routine: V-FILL +Compiling routine: V-FIND +Compiling routine: V-FOLLOW +Compiling routine: V-FROBOZZ +Compiling routine: PRE-GIVE +Compiling routine: V-GIVE +Compiling routine: V-HATCH +Compiling routine: V-HELLO +Compiling routine: V-INCANT +Compiling routine: V-INFLATE +Compiling routine: V-KICK +Compiling routine: V-KISS +Compiling routine: V-KNOCK +Compiling routine: V-LAMP-OFF +Compiling routine: V-LAMP-ON +Compiling routine: V-LAUNCH +Compiling routine: V-LEAN-ON +Compiling routine: V-LEAP +Compiling routine: V-LEAVE +Compiling routine: V-LISTEN +Compiling routine: V-LOCK +Compiling routine: V-LOOK +Compiling routine: V-LOOK-BEHIND +Compiling routine: V-LOOK-INSIDE +Compiling routine: V-LOOK-ON +Compiling routine: V-LOOK-UNDER +Compiling routine: V-LOWER +Compiling routine: V-MAKE +Compiling routine: V-MELT +Compiling routine: PRE-MOVE +Compiling routine: V-MOVE +Compiling routine: V-MUMBLE +Compiling routine: PRE-MUNG +Compiling routine: V-MUNG +Compiling routine: V-ODYSSEUS +Compiling routine: V-OIL +Compiling routine: V-OPEN +Compiling routine: V-OVERBOARD +Compiling routine: V-PICK +Compiling routine: V-PLAY +Compiling routine: V-PLUG +Compiling routine: V-POUR-ON +Compiling routine: V-PRAY +Compiling routine: V-PUMP +Compiling routine: V-PUSH +Compiling routine: V-PUSH-TO +Compiling routine: PRE-PUT +Compiling routine: V-PUT +Compiling routine: V-PUT-BEHIND +Compiling routine: V-PUT-ON +Compiling routine: V-PUT-UNDER +Compiling routine: V-RAISE +Compiling routine: V-RAPE +Compiling routine: PRE-READ +Compiling routine: V-READ +Compiling routine: V-READ-PAGE +Compiling routine: V-REPENT +Compiling routine: V-REPLY +Compiling routine: V-RING +Compiling routine: V-RUB +Compiling routine: V-SAY +Compiling routine: V-SEARCH +Compiling routine: V-SEND +Compiling routine: PRE-SGIVE +Compiling routine: V-SGIVE +Compiling routine: V-SHAKE +Compiling routine: SHAKE-LOOP +Compiling routine: V-SKIP +Compiling routine: V-SMELL +Compiling routine: V-SPIN +Compiling routine: V-SPRAY +Compiling routine: V-SQUEEZE +Compiling routine: V-SSPRAY +Compiling routine: V-STAB +Compiling routine: V-STAND +Compiling routine: V-STAY +Compiling routine: V-STRIKE +Compiling routine: V-SWIM +Compiling routine: V-SWING +Compiling routine: PRE-TAKE +Compiling routine: V-TAKE +Compiling routine: V-TELL +Compiling routine: V-THROUGH +Compiling routine: V-THROW +Compiling routine: V-THROW-OFF +Compiling routine: V-TIE +Compiling routine: V-TIE-UP +Compiling routine: V-TREASURE +Compiling routine: PRE-TURN +Compiling routine: V-TURN +Compiling routine: V-UNLOCK +Compiling routine: V-UNTIE +Compiling routine: V-WAIT +Compiling routine: V-WALK +Compiling routine: V-WALK-AROUND +Compiling routine: V-WALK-TO +Compiling routine: V-WAVE +Compiling routine: V-WEAR +Compiling routine: V-WIN +Compiling routine: V-WIND +Compiling routine: V-WISH +Compiling routine: V-YELL +Compiling routine: V-ZORK +Compiling routine: V-FIRST-LOOK +Compiling routine: DESCRIBE-ROOM +Compiling routine: DESCRIBE-OBJECTS +Compiling routine: DESCRIBE-OBJECT +Compiling routine: PRINT-CONTENTS +Compiling routine: PRINT-CONT +Compiling routine: FIRSTER +Compiling routine: SEE-INSIDE? +Compiling routine: SCORE-UPD +Compiling routine: SCORE-OBJ +Compiling routine: YES? +Compiling routine: ITAKE +Compiling routine: IDROP +Compiling routine: CCOUNT +Compiling routine: WEIGHT +Compiling routine: HACK-HACK +Compiling routine: NO-GO-TELL +Compiling routine: GOTO +Compiling routine: LKP +Compiling routine: DO-WALK +Compiling routine: GLOBAL-IN? +Compiling routine: FIND-IN +Compiling routine: HELD? +Compiling routine: OTHER-SIDE +Compiling routine: MUNG-ROOM +Compiling routine: THIS-IS-IT +Input file: SS:2ACTIONS.ZIL.107 +Compiling routine: SWORD-FCN +Compiling routine: I-SWORD +Compiling routine: INFESTED? +Compiling routine: CAROUSEL-ROOM-FCN +Compiling routine: VIOLIN-FCN +Compiling routine: OPEN-CLOSE +Compiling routine: BALLOON-FCN +Compiling routine: I-BALLOON +Compiling routine: BALLOON-BURN +Compiling routine: PUT-BALLOON +Compiling routine: RISE-AND-SHINE +Compiling routine: DECLINE-AND-FALL +Compiling routine: BCONTENTS +Compiling routine: WIRE-FCN +Compiling routine: I-BURNUP +Compiling routine: SAFE-ROOM-FCN +Compiling routine: SAFE-FCN +Compiling routine: BRICK-FCN +Compiling routine: FUSE-FCN +Compiling routine: I-FUSE +Compiling routine: I-SAFE +Compiling routine: I-LEDGE +Compiling routine: LEDGE-FCN +Compiling routine: I-GNOME +Compiling routine: GNOME-FCN +Compiling routine: I-NERVOUS +Compiling routine: PURPLE-BOOK-FCN +Compiling routine: RANDOM-BOOK +Compiling routine: HEAD-FCN +Compiling routine: CRYPT-ANTEROOM-FCN +Compiling routine: CRYPT-ROOM-FCN +Compiling routine: DIM-DOOR-APPEARS +Compiling routine: CRYPT-OBJECT +Compiling routine: CRYPT-DOOR-FCN +Compiling routine: TOMB-PSEUDO +Compiling routine: DIM-DOOR-FCN +Compiling routine: REPELLENT-FCN +Compiling routine: I-SPRAY +Compiling routine: ZORK3-FCN +Compiling routine: I-BUCKET +Compiling routine: WATER-FCN +Compiling routine: PUDDLE +Compiling routine: BUCKET-FCN +Compiling routine: PASS-THE-BUCKET +Compiling routine: POSTS-ROOM-FCN +Compiling routine: EATME-FCN +Compiling routine: CAKE-CRUMBLE +Compiling routine: CAKE-FCN +Compiling routine: CANDY-FCN +Compiling routine: TOP-ETCHINGS-F +Compiling routine: BOTTOM-ETCHINGS-F +Compiling routine: CUBE-F +Compiling routine: FIXED-FONT-ON +Compiling routine: FIXED-FONT-OFF +Compiling routine: POOL-FCN +Compiling routine: FLASK-FCN +Compiling routine: PLEAK +Compiling routine: ICEBOOM +Compiling routine: MAGNET-ROOM-FCN +Compiling routine: MAGNET-ROOM-EXIT +Compiling routine: BUTTONS +Compiling routine: SPHERE-FCN +Compiling routine: I-SPHERE +Compiling routine: IN-CAGE-FCN +Compiling routine: ROBOT-FCN +Compiling routine: BILLS-OBJECT +Compiling routine: BKLEAVEE +Compiling routine: BKLEAVEW +Compiling routine: DEPOSITORY-FCN +Compiling routine: TELLER-ROOM +Compiling routine: SCOL-OBJECT +Compiling routine: GET-WALL +Compiling routine: SCOLWALL +Compiling routine: SCOL-GO +Compiling routine: SCOL-OBJ +Compiling routine: SCOL-THROUGH +Compiling routine: I-CURTAIN +Compiling routine: I-ZGNOME +Compiling routine: BOX-F +Compiling routine: ZGNOME-FCN +Compiling routine: I-ZGNOME-OUT +Compiling routine: BOMB? +Compiling routine: GO&LOOK +Compiling routine: TINY-ROOM-FCN +Compiling routine: DREARY-ROOM-FCN +Compiling routine: PCHECK +Compiling routine: P-DOOR +Compiling routine: PLID +Compiling routine: PKH +Compiling routine: PKH-FCN +Compiling routine: PLID-FCN +Compiling routine: ROOM? +Compiling routine: PALANTIR +Compiling routine: DEAD-PALANTIR +Compiling routine: GLOBAL-PALANTIRS +Compiling routine: PALANTIR-LOOK +Compiling routine: PWINDOW-FCN +Compiling routine: PDOOR-FCN +Compiling routine: PKEY-FCN +Compiling routine: PLACE-MAT-FCN +Compiling routine: WISH-FCN +Compiling routine: WELL-FCN +Compiling routine: MATCH-FCN +Compiling routine: I-MATCH +Compiling routine: LANTERN +Compiling routine: I-LANTERN +Compiling routine: LIGHT-INT +Compiling routine: RIDDLE-ROOM-FCN +Compiling routine: RIDDLE-DOOR-FCN +Compiling routine: RIDDLE-PSEUDO +Compiling routine: MAGIC-ACTOR +Compiling routine: RANDOM-WALK +Compiling routine: FORCE-FIGHT +Compiling routine: DWINDOW-DESC +Compiling routine: DWINDOW-FCN +Compiling routine: DIAMOND-MOTION +Compiling routine: DIAMOND-LOSS +Compiling routine: CERBERUS-FCN +Compiling routine: COLLAR-FCN +Compiling routine: GLACIER-FCN +Compiling routine: GLACIER-ROOM-FCN +Compiling routine: DRAGON-FCN +Compiling routine: HELLO? +Compiling routine: FIND-TARGET +Compiling routine: I-DRAGON +Compiling routine: DRAGON-LEAVES +Compiling routine: I-GARDEN +Compiling routine: GARDEN-ROOM-FCN +Compiling routine: GLOBAL-UNICORN-FCN +Compiling routine: UNICORN-FCN +Compiling routine: GAZEBO-FCN +Compiling routine: CHEST-FCN +Compiling routine: PRINCESS-FCN +Compiling routine: I-PRINCESS +Compiling routine: I-UNICORN +Compiling routine: MENHIR-ROOM-FCN +Compiling routine: DESCRIBE-MENHIR +Compiling routine: MENHIR-FCN +Compiling routine: DOOR-KEEPER-FCN +Compiling routine: WIZ-DOOR-FCN +Compiling routine: GUARDIAN-ROOM-FCN +Compiling routine: WORKSHOP-FCN +Compiling routine: ARCANA-PSEUDO +Compiling routine: TROPHY-PSEUDO +Compiling routine: STAND-FCN +Compiling routine: IN-AQUARIUM-FCN +Compiling routine: AQUARIUM-FCN +Compiling routine: SERPENT-FCN +Compiling routine: DEAD-SERPENT-FCN +Compiling routine: GENIE-FCN +Compiling routine: GENIE-LEAVES +Compiling routine: CASE-WORTH +Compiling routine: PENTAGRAM-FCN +Compiling routine: WIZARD-FCN + ** Note: Atomic argument to routine assumed constant - MAGIC-ACTOR + +Compiling routine: I-WIZARD + ** Note: Atomic argument to routine assumed constant - MAGIC-ACTOR + +Compiling routine: ROB +Compiling routine: RIPOFF +Compiling routine: WIZARD-CASE-FCN +Compiling routine: WAND-FCN +Compiling routine: I-WAND +Compiling routine: WIZARD-QUARTERS-FCN +Compiling routine: BRIDGE-FCN +Compiling routine: STREAM-FCN +Compiling routine: CHASM-FCN +Compiling routine: TUNNEL-OBJECT +Compiling routine: STALA-PSEUDO +Compiling routine: MOSS-FCN +Compiling routine: ROSE-BUSH-FCN +Compiling routine: I-SPELL +Compiling routine: V-DIAGNOSE +Compiling routine: V-SCORE +Compiling routine: JIGS-UP +Compiling routine: RANDOMIZE-OBJECTS +Compiling routine: KILL-INTERRUPTS +Compiling routine: FIND-WEAPON +Compiling routine: BUCKET-CONT + ** Warning: Undefined Routine: T + +Warnings: 1 + ** Note: OBJECT has no properties: GLOBAL-OBJECTS +Vocabulary: 689 +Prepositions: 18 + IN + TO + WITH + ON + UNDER + DOWN + UP + BEHIND + AROUND + FOR + AT + OFF + ACROSS + OVER + AWAY + FROM + OUT +Objects: 251 + PTABLE + AQUARIUM + PSEUDO-OBJECT + DRAGON-ROOM + LETTER-OPENER + COIN + CRYPT-DOOR + ROBOT-LABEL + TELLER-EAST + DIAMOND-4 + MANGLED-CAGE + STAIRWAY-TOP + GNOME + RIDDLE-ROOM + IN-AQUARIUM + WARNING-LABEL + GAZEBO + GARDEN-NORTH + AQUARIUM-ROOM + WHITE-BOOK + DEEP-FORD + ZORK3 + GENIE + DEAD-PALANTIR-3 + DEAD-PALANTIR-2 + DIAMOND-7 + BRICK + DEAD-PALANTIR-1 + SWORD + GLOBAL-WIZARD-CASE + TUNNEL + BANK-BROCHURE + STAND-2 + TOPIARY-ROOM + MOSS + DWINDOW + SALTY-WATER + REPELLENT + FUSE + STREAM-PATH + SWWL + DEAD-PALANTIR-4 + PENTAGRAM + GLOBAL-CERBERUS + ROOM-8 + COBWEBBY-CORRIDOR + FOOTPAD + VIEWING-WEST + ARCANA + DIAMOND-6 + DRAGON-LAIR + DEPOSITORY + SSWL + PURPLE-BOOK + STAND-4 + INTNUM + POSTS + CRYPT-ANTEROOM + NOT-HERE-OBJECT + DRAGON + TOP-ETCHINGS + TEA-ROOM + GROUND + GLOBAL-PALANTIR + MAGNET-ROOM + WATER + DIAMOND-1 + LAVA-TUBE + GREAT-CAVERN + SAFE-ROOM + NEWSPAPER + STAIRS + BILLS + GAZEBO-TABLE + VAIR-4 + VOLCANO-BOTTOM + DEGREE + GRUE + PWINDOW + COOL-ROOM + LEDGE-TUNNEL + BRAIDED-WIRE + BALLOON + NARROW-TUNNEL + BROKEN-LAMP + GLOBAL-MENHIR + WEST-WALL + LUNGS + SLOT + CERBERUS-ROOM + GLACIER-ROOM + CUBE + MENHIR-ROOM + DARK-TUNNEL + FORMAL-GARDEN + EAST-WALL + ALICE-TABLE + GLOBAL-UNICORN + BLESSINGS + TELLER-WEST + DIM-DOOR + PRINCESS + LAMP + NORTH-WALL + RED-ICING + CROWN + SEWL + CAROUSEL-ROOM + LEDGE-2 + DIAMOND-3 + FRESCO-ROOM + VIOLIN + WISH + BALLOON-LABEL + PDOOR + LIBRARY + COMPASS + PEARL + GNOME-OF-ZURICH + SAFE + CANDY + KEYHOLE-1 + WIZARD-CASE + KENNEL + GOLD-KEY + RECEPTACLE + CRYPT-ROOM + RAVINE-LEDGE + SAILOR + POSTS-ROOM + DIAMOND-2 + HEDGES + WELL-BOTTOM + HEADS + VOLCANO-VIEW + CRYPT + DEPOSIT-BOX + ZORKMID + VAIR-2 + LID-1 + ICE + ROSE + LID-2 + KEYHOLE-2 + TEAPOT + IN-CAGE + CHASM + STREAM + BLUE-ICING + VIEWING-EAST + EXPLOSION + PLACE-MAT + STAND-3 + ROBOT + RUBY + WANDS + DIAMOND-9 + WORKBENCH-ROOM + CLOTH-BAG + BANK-ENTRANCE + PENTAGRAM-ROOM + SOUTH-WALL + STAND-1 + HOOK-1 + MACHINE-ROOM + VAIR-3 + TROPHY-BOTTLES + MENHIR + EAT-ME-CAKE + POOL-ROOM + CHEST + STONE-BRIDGE + DOOR-KEEPER + STAMP + PCRACK + WORKBENCH + DIAMOND-8 + BRIDGE + RIBBON + COLLAR + PATHOBJ + GLOBAL-PRINCESS + WIZARDS-QUARTERS + BAT + BROKEN-CASE + IT + HOOK-2 + SMALL-ROOM + TROPHY-ROOM + GLOBAL-OBJECTS + BLUE-BOOK + DEAD-BALLOON + DREARY-ROOM + CERBERUS + DEAD-DRAGON + PORTRAIT + CARD + CAGE-ROOM + SHALLOW-FORD + BUCKET + INSIDE-BARROW + SNWL + OFFICE + ROSE-BUSH + LEAK + TINY-ROOM + WIZARDS-WORKSHOP + LOCAL-GLOBALS + WIZ-DOOR + FLASK + GREEN-BOOK + ADVENTURER + POOL + PEARL-ROOM + ROOMS + PALANTIR-4 + ORANGE-ICING + VAIR-1 + PALANTIR-2 + SERPENT + PALANTIR-3 + MARBLE-HALL + PALANTIR-1 + GUARDIAN-ROOM + SQUARE-BUTTON + UNICORN + ME + WAND + MATCH + IRON-BOX + FOOT-BRIDGE + CURTAIN + DIAMOND-5 + WIZARD + DEAD-SERPENT + GAZEBO-ROOM + LAVA-ROOM + KEY + LEDGE-1 + HANDS + CAGE + TROPHY-SWORD + BOTTOM-ETCHINGS + WELL-TOP + RIDDLE-DOOR + WELL + GLOBAL-WATER + TRIANGULAR-BUTTON + STATUETTE + VAULT + ROUND-BUTTON +Properties: 30 + P?NW + P?SW + P?SE + P?NE + P?SOUTH + P?EAST + P?NORTH + P?ADVFCN + P?CONTFCN + P?VTYPE + P?DESCFCN + P?TEXT + P?VALUE + P?CAPACITY + P?FDESC + P?PSEUDO + P?GLOBAL + P?LDESC + P?SIZE + P?ACTION + P?ADJECTIVE + P?SYNONYM + P?CROSS + P?LAND + P?OUT + P?IN + P?DOWN + P?UP + P?WEST +Globals: 161 + MATCH-COUNT + LAMP-TABLE + DIAMOND-SOLVE + DIAMOND-COUNT + DIAMOND-MOVES + DIAMOND-BASE + DWDESCS + BASES + DIAMOND-ROOMS + DIDIRS + CERBERUS-LEASHED + ICE-MELTED + DRAGON-ANGER + DRAGON-ATTACKS + OLD-HERE + TOPIARY-MOVED + TOPIARY-NEAR + UNICORN-MSGS + UNICORN-FRIGHTENED + PRINCESS-AWAKE + PRCOUNT + PRFOLLOW + PRDIRS + MENHIR-POSITION + GUARDIAN-FED + WIZ-DOOR-FLAG + GENIE-READY? + GENIE-HOARD + GENIE-THANKS + SPELL? + SPELL-NAMES + SPELL-HINTS + SPELL-STOPS + SPELL-HANDLED? + WAND-ON + SPELL-USED + SPELL-VICTIM + WAND-ON-LOC + WIZQLAST + WIZQDESCS + FANTASIES + SECRET-DOOR + CRYPT-LIT? + P-NCN + P-NOT-HERE + HELLOS + P-OVTBL + P-VTBL + P-OTBL + P-BUTS + P-PRSI + P-PRSO + P-MERGE + P-OCLAUSE + JUMPLOSS + RESERVE-LEXV + INDENTS + WHEEEEE + P-CCTBL + EIGHT-DIRECTIONS + DUMMY + YUKS + SWIMYUKS + HO-HUM + BALLOON-UPS + BALLOON-FLOATS + BALLOON-DOWNS + OTHER-PROPERTIES + FATAL-VAPORS + C-TABLE + P-LEXV + AGAIN-LEXV + P-INBUF + OOPS-INBUF + OOPS-TABLE + P-ITBL + COMPASS-KLUDGE + RESERVE-PTR + PRSI + CAROUSEL-ZOOM-FLAG + BLOC + P-IT-OBJECT + HS + CAGE-SOLVE-FLAG + AGAIN-DIR + P-ADJN + WINNER + BLAB-FLAG + P-OFLAG + P-NUMBER + FUMBLE-PROB + BINF-FLAG + GNOME-FLAG + DIM-DOOR-FLAG + P-GETFLAGS + LOAD-MAX + P-TABLE + QUOTE-FLAG + WON-FLAG + P-WON + DEATHS + SPRAY-USED? + DEAD + P-ONEOBJ + P-AND + PRSA + P-AADJ + P-XADJ + P-SYNTAX + C-DEMONS + P-GWIMBIT + P-MERGED + GNOME-DOOR-FLAG + BUCKET-TOP-FLAG + PRSO + SPRAYED? + LOAD-ALLOWED + C-INTS + P-LEN + P-ADJ + P-ACT + P-XADJN + LIT + BTIE-FLAG + MUNGED-ROOM + DESC-OBJECT + FUMBLE-NUMBER + P-DIRECTION + P-CONT + PLAYER + P-ANAM + P-WALK-DIR + SWORD-GLOW + P-XNAM + LUCKY + ALWAYS-LIT + P-NAM + P-MULT + CLOCK-WAIT + BASE-SCORE + P-ADVERB + P-MATCHLEN + P-SLOCBITS + P-ACLAUSE + P-DIR + EVAPORATED + VERBOSE + CAROUSEL-FLIP-FLAG + SAFE-FLAG + SUPER-BRIEF + P-END-ON-PREP + BANK-SOLVE-FLAG + SCOL-ROOMS + SCOL-WALLS + SCOL-ROOM + SCOL-ACTIVE + ZGNOME-FLAG + MUD-FLAG + MATOBJ + PUNLOCK-FLAG + PLOOK-FLAG \ No newline at end of file diff --git a/zork2.serial b/zork2.serial new file mode 100644 index 0000000..60d3b2f --- /dev/null +++ b/zork2.serial @@ -0,0 +1 @@ +15 diff --git a/zork2.zap b/zork2.zap new file mode 100644 index 0000000..5cf58c2 --- /dev/null +++ b/zork2.zap @@ -0,0 +1,13 @@ + .INSERT "ZORK2FREQ" + .INSERT "ZORK2DAT" ; DATA IS IN THIS FILE + .INSERT "GMACROS" + .INSERT "GSYNTAX" + .INSERT "2DUNGEON" + .INSERT "GGLOBALS" + .INSERT "GCLOCK" + .INSERT "GMAIN" + .INSERT "GPARSER" + .INSERT "GVERBS" + .INSERT "2ACTIONS" + .INSERT "ZORK2STR" + .END diff --git a/zork2.zil b/zork2.zil index 88dd9c5..e9520c9 100644 --- a/zork2.zil +++ b/zork2.zil @@ -2,55 +2,35 @@ Zork II: The Wizard of Frobozz (c) Copyright 1983 Infocom, Inc. All Rights Reserved." +ON!-INITIAL +OFF!-INITIAL + - - - - - - >> -) "AUX" (TIM