sorcerer/globals.zap
historicalsource 9be53d703b Final Revision
2019-04-13 21:15:11 -04:00

1056 lines
28 KiB
Plaintext

.FUNCT NOT-HERE-OBJECT-F,TBL,PRSO?=1,OBJ,X=0
EQUAL? PRSO,NOT-HERE-OBJECT \?ELS3
EQUAL? PRSI,NOT-HERE-OBJECT \?ELS3
PRINTR "Those things aren't here!"
?ELS3: EQUAL? PRSO,NOT-HERE-OBJECT \?ELS9
SET 'TBL,P-PRSO
JUMP ?CND1
?ELS9: SET 'TBL,P-PRSI
SET 'PRSO?,FALSE-VALUE
?CND1: ZERO? PRSO? /?ELS14
EQUAL? PRSA,V?FIND,V?FOLLOW,V?AIMFIZ /?THN19
EQUAL? PRSA,V?WHAT,V?WHERE,V?WHO /?THN19
EQUAL? PRSA,V?WAIT-FOR,V?SEND,V?WALK-TO /?THN19
EQUAL? PRSA,V?RESEARCH \?CND12
?THN19: SET 'X,TRUE-VALUE
CALL FIND-NOT-HERE,TBL,PRSO? >OBJ
ZERO? OBJ /FALSE
EQUAL? OBJ,NOT-HERE-OBJECT \TRUE
JUMP ?CND12
?ELS14: EQUAL? PRSA,V?AIMFIZ-TO \?ELS37
EQUAL? PRSO,ME /?THN34
?ELS37: EQUAL? PRSA,V?CAST \?CND12
EQUAL? PRSO,AIMFIZ-SPELL \?CND12
?THN34: SET 'X,TRUE-VALUE
CALL FIND-NOT-HERE,TBL,PRSO? >OBJ
ZERO? OBJ /FALSE
EQUAL? OBJ,NOT-HERE-OBJECT \TRUE
?CND12: ZERO? X /?ELS50
PRINTI "You'll have to be more specific, I'm afraid."
CRLF
JUMP ?CND48
?ELS50: EQUAL? WINNER,PROTAGONIST \?ELS55
PRINTI "You can't see "
EQUAL? P-XNAM,W?BELBOZ,W?HELIST,W?KRILL /?CND58
EQUAL? P-XNAM,W?FROBAR,W?JEEARR,W?FLATHE /?CND58
EQUAL? P-XNAM,W?DUNCAN,W?ENTHAR,W?THOLL /?CND58
EQUAL? P-XNAM,W?GURTH,W?MIZNIA,W?ACCARD /?CND58
EQUAL? P-XNAM,W?BORPHE,W?ANTHAR,W?MITHIC /?CND58
EQUAL? P-XNAM,W?GALEPA,W?MAREIL,W?THRIFF /?CND58
EQUAL? P-XNAM,W?ORKAN,W?BARBEL,W?CHEVAU \?ELS60
JUMP ?CND58
?ELS60: PRINTI "any "
?CND58: CALL NOT-HERE-PRINT,PRSO?
PRINTI " here!"
CRLF
JUMP ?CND48
?ELS55: PRINTI "Looking confused,"
CALL ARTICLE,WINNER,TRUE-VALUE
PRINTI " says, ""I don't see any "
CALL NOT-HERE-PRINT,PRSO?
PRINTI " here!"""
CRLF
?CND48: SET 'P-CONT,FALSE-VALUE
SET 'QUOTE-FLAG,FALSE-VALUE
RTRUE
.FUNCT FIND-NOT-HERE,TBL,PRSO?,M-F,OBJ
CALL MOBY-FIND,TBL >M-F
EQUAL? 1,M-F \?ELS5
ZERO? PRSO? /?ELS8
SET 'PRSO,P-MOBY-FOUND
RFALSE
?ELS8: SET 'PRSI,P-MOBY-FOUND
RFALSE
?ELS5: ZERO? PRSO? \?ELS13
PRINTI "You wouldn't find any "
CALL NOT-HERE-PRINT,PRSO?
PRINTR " there."
?ELS13: RETURN NOT-HERE-OBJECT
.FUNCT NOT-HERE-PRINT,PRSO?,?TMP1
EQUAL? P-XNAM,W?BELBOZ \?ELS5
PRINTI "Belboz"
RTRUE
?ELS5: EQUAL? P-XNAM,W?THOLL \?ELS9
PRINTI "Tholl"
RTRUE
?ELS9: EQUAL? P-XNAM,W?GURTH,W?MIZNIA,W?ACCARD /?THN14
EQUAL? P-XNAM,W?BORPHE,W?ANTHAR,W?MITHIC /?THN14
EQUAL? P-XNAM,W?GALEPA,W?MAREIL,W?THRIFF \?ELS13
?THN14: PRINTI "that place"
RTRUE
?ELS13: EQUAL? P-XNAM,W?HELIST,W?FROBAR,W?ORKAN /?THN20
EQUAL? P-XNAM,W?BARBEL,W?CHEVAU \?ELS19
?THN20: PRINTI "that person"
RTRUE
?ELS19: EQUAL? P-XNAM,W?JEEARR \?ELS25
PRINTI "Jeearr"
RTRUE
?ELS25: EQUAL? P-XNAM,W?KRILL \?ELS29
PRINTI "Krill"
RTRUE
?ELS29: EQUAL? P-XNAM,W?FLATHE \?ELS33
PRINTI "Flathead"
RTRUE
?ELS33: EQUAL? P-XNAM,W?DUNCAN,W?ENTHAR \?ELS37
PRINTI "that King"
RTRUE
?ELS37: ZERO? P-OFLAG /?ELS41
ZERO? P-XADJ /?CND43
PRINTB P-XADJN
?CND43: ZERO? P-XNAM /FALSE
PRINTB P-XNAM
RTRUE
?ELS41: ZERO? PRSO? /?ELS54
GET P-ITBL,P-NC1 >?TMP1
GET P-ITBL,P-NC1L
CALL BUFFER-PRINT,?TMP1,STACK,FALSE-VALUE
RSTACK
?ELS54: GET P-ITBL,P-NC2 >?TMP1
GET P-ITBL,P-NC2L
CALL BUFFER-PRINT,?TMP1,STACK,FALSE-VALUE
RSTACK
.FUNCT GROUND-F
EQUAL? PRSA,V?CLIMB-FOO,V?CLIMB-ON,V?CLIMB-UP /?THN6
EQUAL? PRSA,V?BOARD \?ELS5
?THN6: CALL V-SIT
RSTACK
?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS9
EQUAL? HERE,LAGOON \?ELS9
PRINTR "Through the water you can see sandy ground below."
?ELS9: EQUAL? PRSA,V?EXAMINE,V?LOOK-INSIDE,V?LOOK-UNDER \?ELS15
EQUAL? HERE,GLASS-MAZE \?ELS15
CALL PERFORM,V?EXAMINE,MAZE
RTRUE
?ELS15: EQUAL? PRSA,V?LOOK-UNDER \FALSE
PRINTR "You've never mastered an X-ray vision spell."
.FUNCT ROAD-F
EQUAL? PRSA,V?FOLLOW \FALSE
CALL V-WALK-AROUND
RSTACK
.FUNCT CORRIDOR-F
EQUAL? PRSA,V?WALK-TO,V?THROUGH \FALSE
CALL V-WALK-AROUND
RSTACK
.FUNCT WALLS-F
EQUAL? PRSA,V?READ \?ELS5
EQUAL? HERE,CHAMBER-OF-THE-CIRCLE \?ELS5
CALL PERFORM,V?READ,TENETS
RTRUE
?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS9
EQUAL? HERE,HALL-OF-CARVINGS \?ELS9
ZERO? DRAGON-MOVED \?ELS9
PRINTR "A dragon carving adorns the far wall."
?ELS9: EQUAL? HERE,SLIMY-ROOM \?ELS15
EQUAL? PRSA,V?EXAMINE \?ELS15
PRINTR "The walls are covered with moss and stuff."
?ELS15: EQUAL? HERE,GLASS-MAZE \FALSE
EQUAL? PRSA,V?LOOK-INSIDE,V?EXAMINE \FALSE
CALL PERFORM,V?EXAMINE,MAZE
RTRUE
.FUNCT CEILING-F
EQUAL? PRSA,V?EXAMINE \?ELS5
EQUAL? HERE,SLANTED-ROOM \?ELS10
PRINTR "The ceiling is slanted, making the room trapezoidal in shape."
?ELS10: EQUAL? HERE,PIT-OF-BONES \?ELS14
PRINTR "There's an opening in the ceiling."
?ELS14: EQUAL? HERE,CHAMBER-OF-THE-CIRCLE \FALSE
PRINTR "Other than its shape, there's nothing of interest."
?ELS5: EQUAL? HERE,GLASS-MAZE \?ELS22
EQUAL? PRSA,V?LOOK-INSIDE,V?EXAMINE \?ELS22
CALL PERFORM,V?EXAMINE,MAZE
RTRUE
?ELS22: EQUAL? PRSA,V?LOOK-UNDER \FALSE
CALL PERFORM,V?LOOK
RTRUE
.FUNCT STAIRS-F
EQUAL? PRSA,V?CLIMB-FOO,V?CLIMB-UP \?ELS5
CALL DO-WALK,P?UP
RSTACK
?ELS5: EQUAL? PRSA,V?CLIMB-DOWN \FALSE
CALL DO-WALK,P?DOWN
RSTACK
.FUNCT BAT-F
ZERO? FWEEPED /?ELS5
EQUAL? PRSO,BAT \?ELS11
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,ME,PRSI
RTRUE
?ELS11: SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,PRSO,ME
RTRUE
?ELS5: EQUAL? PRSA,V?RESEARCH /?ELS15
CALL YOU-CANT-SEE-ANY,STR?97
RSTACK
?ELS15: PRINTR "The entry about bats is long and uninteresting."
.FUNCT ME-F,OLIT
EQUAL? PRSA,V?TELL \?ELS5
PRINTI "Talking to yourself is said to be a sign of impending mental collapse."
CRLF
CALL STOP
RSTACK
?ELS5: EQUAL? PRSA,V?LISTEN \?ELS9
PRINTR "Yes?"
?ELS9: EQUAL? PRSA,V?ALARM \?ELS13
ZERO? SLEEPING /?ELS18
PRINTI "As you wake up, Frobar sticks his head in the door and invites you shopping. When you return late that evening, you find the Guild Hall sacked, and many fellow Enchanters slaughtered. Servants of evil, teeth smeared with blood, fall upon you as well. A menacing voice echoes about the room. ""Pathetic Enchanters ... Who can save you now?""
Some days it just doesn't pay to wake up."
CALL FINISH
RSTACK
?ELS18: PRINTR "You are obviously awake already."
?ELS13: EQUAL? PRSA,V?RESEARCH \?ELS27
PRINTR "You find several sentences mentioning your heroic defeat of the warlock Krill."
?ELS27: EQUAL? PRSA,V?AIMFIZ \?ELS31
PRINTI "You are suddenly "
ZERO? FLYING /?ELS36
PRINTI "floating"
JUMP ?CND34
?ELS36: PRINTI "standing"
?CND34: PRINTR " right next to your former location! Wow!!"
?ELS31: EQUAL? PRSA,V?VARDIK \?ELS47
SET 'VARDIKED,TRUE-VALUE
CALL QUEUE,I-UNVARDIK,12
PUT STACK,0,1
PRINTR "A feeling of warmth and protection fills your mind."
?ELS47: EQUAL? PRSA,V?YOMIN \?ELS51
PRINTR "You sense a mind concentrating on casting the yomin spell."
?ELS51: EQUAL? PRSA,V?GASPAR \?ELS55
SET 'RESURRECTION-ROOM,HERE
PRINTR "A sense of peace of mind passes over you."
?ELS55: EQUAL? PRSA,V?GOLMAC \?ELS59
ZERO? GOLMACKED /?CND60
CALL POOF
?CND60: SET 'GOLMACKED,TRUE-VALUE
FCLEAR KEROSENE-LAMP,OPENBIT
MOVE VARDIK-SCROLL,KEROSENE-LAMP
MOVE GOLMAC-SCROLL,SLANTED-ROOM
FCLEAR GOLMAC-SCROLL,ONBIT
MOVE ROPE,SHAFT-BOTTOM
MOVE BEAM,COAL-MINE-1
SET 'ROPE-PLACED,FALSE-VALUE
SET 'ROPE-TO-BEAM,FALSE-VALUE
SET 'CURRENT-SETTING,0
FCLEAR ROPE,TOUCHBIT
FCLEAR DIAL-DOOR,OPENBIT
SET 'DIAL-OPEN,FALSE-VALUE
PRINTI "You are surrounded by a puff of smoke, and feel disoriented for a moment. When the smoke clears, nothing seems to have changed"
EQUAL? HERE,SLANTED-ROOM \?CND66
PRINTI ", except that the kerosene lamp is now closed"
?CND66: PRINTR "."
?ELS59: EQUAL? PRSA,V?LOWER-INTO \?ELS74
EQUAL? PRSI,LOWER-CHUTE,UPPER-CHUTE \?ELS74
CALL DO-WALK,P?DOWN
RSTACK
?ELS74: EQUAL? PRSA,V?EXAMINE \?ELS78
ZERO? FWEEPED /?ELS83
PRINTR "You're batty! (And a rather large one, at that.)"
?ELS83: FSET? PROTAGONIST,ONBIT \FALSE
PRINTR "You seem to have been frotzed."
?ELS78: EQUAL? PRSA,V?FROTZ \?ELS92
FSET? PROTAGONIST,ONBIT /?ELS92
ZERO? SLEEPING /?ELS99
CALL V-SWANZO
RSTACK
?ELS99: SET 'OLIT,LIT
SET 'ALWAYS-LIT,TRUE-VALUE
FSET ME,ONBIT
FSET PROTAGONIST,ONBIT
FSET YOUNGER-SELF,ONBIT
PRINTI "You are bathed in a sickly yellow light, bright enough to read by."
CRLF
CALL LIT?,HERE >LIT
ZERO? OLIT \TRUE
ZERO? LIT /TRUE
CRLF
CALL V-LOOK
RTRUE
?ELS92: EQUAL? PRSA,V?GIVE \?ELS111
EQUAL? PRSI,ME \?ELS111
CALL HELD?,PRSO
ZERO? STACK /?ELS118
PRINTR "You already have it."
?ELS118: CALL PERFORM,V?TAKE,PRSO
RTRUE
?ELS111: EQUAL? PRSA,V?ATTACK,V?MUNG,V?KILL \?ELS124
CALL JIGS-UP,STR?98
RSTACK
?ELS124: EQUAL? PRSA,V?FIND \FALSE
PRINTR "You're right here!"
.FUNCT GRUE-F
EQUAL? HERE,GRUE-LAIR \?CND1
CALL THIS-IS-IT,MUTATED-GRUES
?CND1: EQUAL? PRSA,V?RAISE,V?RUB,V?EXAMINE /?THN9
EQUAL? PRSA,V?TAKE,V?KICK,V?LOWER /?THN9
EQUAL? PRSA,V?LOOK-UNDER \?ELS8
?THN9: PRINTR "You can't see any grue here (thankfully)."
?ELS8: EQUAL? PRSA,V?WHERE \?ELS14
PRINTR "There is no grue here, but I'm sure there is at least one lurking in the darkness nearby. I'd stay near a light source if I were you!"
?ELS14: EQUAL? PRSA,V?LISTEN \?ELS18
PRINTR "It makes no sound but is always lurking in the darkness nearby."
?ELS18: EQUAL? PRSA,V?FROTZ \?ELS22
EQUAL? HERE,GRUE-LAIR \?ELS27
PRINTI "There is a flash of light from nearby!"
CRLF
ZERO? LIT \?CND30
SET 'LIT,TRUE-VALUE
CALL V-LOOK
?CND30: FSET HERE,ONBIT
RTRUE
?ELS27: ZERO? LIT /?ELS34
PRINTR "There aren't any grues here -- it's light!"
?ELS34: PRINTR "There's a flash of light nearby, and you glimpse a horrible, multi-fanged creature, a look of sheer terror on its face. It charges away, gurgling in agony, tearing at its glowing fur."
?ELS22: EQUAL? PRSA,V?RESEARCH \FALSE
CALL PERFORM,V?RESEARCH,LOBBY
RTRUE
.FUNCT WATER-F
EQUAL? PRSA,V?DRINK-FROM,V?DRINK \?ELS5
PRINTR "It's dangerous to drink untested water!"
?ELS5: EQUAL? PRSA,V?LOOK-INSIDE \?ELS9
CALL MAKE-OUT
RSTACK
?ELS9: EQUAL? PRSA,V?FILL \?ELS11
FSET? PRSO,VIALBIT \?ELS11
PRINTR "A vial nymph appears to warn that water can destroy the delicate magic properties of potion vials. It wags a finger at you before vanishing."
?ELS11: EQUAL? WATER,PRSI \?ELS17
EQUAL? HERE,STAGNANT-POOL,HIDDEN-CAVE /?ELS17
CALL WATER-IS-PRSI
RSTACK
?ELS17: EQUAL? HERE,COVE,LAGOON,LAGOON-FLOOR \?ELS21
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,LAGOON-OBJECT,PRSI
RTRUE
?ELS21: EQUAL? HERE,OCEAN-NORTH,OCEAN-SOUTH,MOUTH-OF-RIVER \?ELS23
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,OCEAN,PRSI
RTRUE
?ELS23: EQUAL? HERE,DRAWBRIDGE \?ELS25
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,MOAT,PRSI
RTRUE
?ELS25: EQUAL? HERE,RIVER-BANK \?ELS27
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,RIVER,PRSI
RTRUE
?ELS27: EQUAL? HERE,FLUME \?ELS29
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,FLUME-OBJECT,PRSI
RTRUE
?ELS29: EQUAL? HERE,STAGNANT-POOL \?ELS31
EQUAL? PRSA,V?THROUGH \?ELS36
CALL DO-WALK,P?NW
RSTACK
?ELS36: EQUAL? PRSA,V?PULVER \FALSE
CALL JIGS-UP,STR?99
RSTACK
?ELS31: EQUAL? HERE,HIDDEN-CAVE \?ELS40
ZERO? RIVER-EVAPORATED /?ELS45
CALL YOU-CANT-SEE-ANY,STR?100
RSTACK
?ELS45: EQUAL? PRSA,V?PULVER \?ELS48
PRINTR "The water recedes for a moment, then swirls back."
?ELS48: EQUAL? PRSA,V?THROUGH \FALSE
CALL DO-WALK,P?OUT
RSTACK
?ELS40: EQUAL? HERE,RIVER-BED,TOP-OF-FALLS,STAGNANT-POOL \FALSE
PRINTR "Hardly enough water here to get a good pulveration going."
.FUNCT WATER-IS-PRSI
EQUAL? HERE,COVE,LAGOON,LAGOON-FLOOR \?ELS5
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,PRSO,LAGOON-OBJECT
RTRUE
?ELS5: EQUAL? HERE,OCEAN-NORTH,OCEAN-SOUTH,MOUTH-OF-RIVER \?ELS7
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,PRSO,OCEAN
RTRUE
?ELS7: EQUAL? HERE,DRAWBRIDGE \?ELS9
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,PRSO,MOAT
RTRUE
?ELS9: EQUAL? HERE,RIVER-BANK \?ELS11
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,PRSO,RIVER
RTRUE
?ELS11: EQUAL? HERE,FLUME \FALSE
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,PRSO,FLUME-OBJECT
RTRUE
.FUNCT SKY-F,EL
EQUAL? PRSA,V?EXAMINE \FALSE
FSET? HERE,INSIDEBIT \?ELS10
PRINTR "That would be difficult from here."
?ELS10: EQUAL? HERE,LAGOON-FLOOR \FALSE
PRINTR "The sky is blurry but visible."
.FUNCT BELBOZ-F
EQUAL? PRSA,V?ASK-FOR,V?ASK-ABOUT,V?TELL /?THN6
EQUAL? PRSA,V?GIVE \?ELS5
?THN6: PRINTI "Belboz is in some sort of trance."
CRLF
CALL STOP
RSTACK
?ELS5: EQUAL? PRSA,V?WHO \?ELS11
PRINTR "Belboz, your friend and mentor, is the head of the Circle of Enchanters. Recently, he has been acting oddly and seems to have been avoiding you."
?ELS11: EQUAL? PRSA,V?ALARM \?ELS15
CALL INT,I-BELBOZ-AWAKES
PUT STACK,0,0
CALL I-BELBOZ-AWAKES
RSTACK
?ELS15: EQUAL? PRSA,V?RESEARCH \?ELS17
PRINTR "There is a small entry about Belboz, mentioning that he is the Guildmaster of the Accardi Chapter of the Guild of Enchanters, and has served three terms as kingdomwide Secretary of the Guild."
?ELS17: EQUAL? PRSA,V?FIND,V?WHERE \?ELS21
IN? BELBOZ,HERE /?ELS21
PRINTR "You last saw Belboz a few days ago. You can't begin to guess where he is now."
?ELS21: EQUAL? PRSA,V?GASPAR \?ELS27
SET 'BELBOZ-GASPARED,TRUE-VALUE
RFALSE
?ELS27: EQUAL? PRSA,V?AIMFIZ \?ELS29
CALL AIMFIZ-BELBOZ-JEEARR
CALL GOTO,TWISTED-FOREST
ADD SCORE,20 >SCORE
CALL INT,I-PARROT
PUT STACK,0,0
CALL QUEUE,I-HELLHOUND,-1
PUT STACK,0,1
RTRUE
?ELS29: EQUAL? PRSA,V?YOMIN \?ELS31
PRINTR "You get a horrifying glimpse of a monstrous creature intertwined throughout Belboz's mind. You concentrate, attempting to translate this image into visual terms, and imagine a giant spider with millions of legs, wrapped around and feasting upon the body and spirit of Belboz. The image fades, and you stagger backwards."
?ELS31: EQUAL? PRSA,V?KILL \?ELS35
EQUAL? PRSI,KNIFE \?ELS35
CALL KILL-BELBOZ
RSTACK
?ELS35: EQUAL? PRSA,V?SWANZO \FALSE
CALL SWANZO-BELBOZ
RSTACK
.FUNCT AIMFIZ-BELBOZ-JEEARR
PRINTI "After a momentary dizziness, you realize that your location has changed, although "
PRINTD PRSO
PRINTI " is not in sight..."
CRLF
CRLF
RTRUE
.FUNCT GLOBAL-ROOM-F
EQUAL? PRSA,V?LOOK-INSIDE,V?EXAMINE,V?LOOK \?ELS5
CALL V-LOOK
RTRUE
?ELS5: EQUAL? PRSA,V?EXIT,V?DROP,V?THROUGH \?ELS7
CALL V-WALK-AROUND
RSTACK
?ELS7: EQUAL? PRSA,V?WALK-AROUND \FALSE
PRINTR "Walking around the room reveals nothing new. If you want to move elsewhere, simply indicate the desired direction."
.FUNCT ARCHWAY-F
EQUAL? PRSA,V?CROSS,V?THROUGH \?ELS5
CALL V-WALK-AROUND
RSTACK
?ELS5: EQUAL? PRSA,V?LOOK-INSIDE \FALSE
CALL MAKE-OUT
RSTACK
.FUNCT HOLE-F
EQUAL? HERE,HOLLOW \?ELS5
SET 'PERFORMING-SPELL,TRUE-VALUE
EQUAL? HOLE,PRSO \?ELS10
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,BRICK-STRUCTURE,PRSI
RTRUE
?ELS10: SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,PRSO,BRICK-STRUCTURE
RTRUE
?ELS5: EQUAL? PRSA,V?CLIMB-UP,V?CLIMB-FOO,V?THROUGH /?THN15
EQUAL? PRSA,V?CLIMB-DOWN \?ELS14
?THN15: EQUAL? HERE,FOREST-EDGE \?ELS21
CALL DO-WALK,P?DOWN
RSTACK
?ELS21: EQUAL? HERE,SLIMY-ROOM \?ELS23
CALL DO-WALK,P?UP
RSTACK
?ELS23: EQUAL? HERE,HIDDEN-CAVE \?ELS25
CALL DO-WALK,P?DOWN
RSTACK
?ELS25: EQUAL? HERE,PIT-OF-BONES \?ELS27
CALL DO-WALK,P?UP
RSTACK
?ELS27: EQUAL? HERE,DUNGEON \?ELS29
CALL DO-WALK,P?DOWN
RSTACK
?ELS29: EQUAL? HERE,LOBBY \FALSE
CALL V-WALK-AROUND
RSTACK
?ELS14: EQUAL? PRSA,V?LOOK-INSIDE \FALSE
CALL MAKE-OUT
RSTACK
.FUNCT FOREST-F
EQUAL? PRSA,V?MEEF \?ELS5
PRINTR "You're too late -- this forest dried up eons ago."
?ELS5: EQUAL? PRSA,V?THROUGH \FALSE
EQUAL? HERE,MINE-FIELD,FOREST-EDGE \?ELS14
CALL DO-WALK,P?WEST
RSTACK
?ELS14: EQUAL? HERE,TWISTED-FOREST,TREE-BRANCH \?ELS16
CALL LOOK-AROUND-YOU
RSTACK
?ELS16: CALL CANT-ENTER,FOREST
RSTACK
.FUNCT CASTLE-F
EQUAL? PRSA,V?RESEARCH \?ELS5
PRINTR "Egreth was the castle of King Duncanthrax."
?ELS5: EQUAL? PRSA,V?THROUGH \FALSE
EQUAL? HERE,DRAWBRIDGE,RUINS \?ELS14
CALL DO-WALK,P?EAST
RSTACK
?ELS14: CALL LOOK-AROUND-YOU
RSTACK
.FUNCT CAVE-F
EQUAL? PRSA,V?THROUGH \?ELS5
EQUAL? HERE,MOUTH-OF-RIVER,GRUE-LAIR \?ELS10
CALL DO-WALK,P?WEST
RSTACK
?ELS10: EQUAL? HERE,RIVER-BED \?ELS12
CALL DO-WALK,P?NE
RSTACK
?ELS12: EQUAL? HERE,PIT-OF-BONES \?ELS14
CALL DO-WALK,P?UP
RSTACK
?ELS14: EQUAL? HERE,BELBOZ-HIDEOUT \?ELS16
CALL DO-WALK,P?EAST
RSTACK
?ELS16: CALL LOOK-AROUND-YOU
RSTACK
?ELS5: EQUAL? PRSA,V?LOOK-INSIDE \FALSE
CALL MAKE-OUT
RSTACK
.FUNCT HELISTAR-F
EQUAL? PRSA,V?WHO \?ELS5
PRINTR "Helistar is an old and powerful member of the Circle. Although a skilled and experienced magic-user, she is humorless to the point of being grim. Despite this personality flaw, Helistar is the most likely candidate to become the next Guildmaster of the Circle."
?ELS5: EQUAL? PRSA,V?WHERE \?ELS9
PRINTR "Helistar has gone on her annual two-week vacation. She usually goes to the southlands, Gurth and Mithicus."
?ELS9: EQUAL? PRSA,V?AIMFIZ \FALSE
CALL AIMFIZ-LOSE
CALL PICK-ONE,HELISTARISMS
PRINT STACK
CALL JIGS-UP,STR?71
RSTACK
.FUNCT FROBAR-F
EQUAL? PRSA,V?WHO \?ELS5
PRINTR "Frobar is the most loyal and hard-working member of the Guild. However, he is somewhat dull and lacks imagination. It is doubtful that he would ever succeed Belboz as head of the Circle."
?ELS5: EQUAL? PRSA,V?WHERE \?ELS9
PRINTR "Perhaps he's gone into town to perform some errands."
?ELS9: EQUAL? PRSA,V?AIMFIZ \FALSE
CALL AIMFIZ-LOSE
CALL PICK-ONE,FROBARISMS
PRINT STACK
CALL JIGS-UP,STR?71
RSTACK
.FUNCT AIMFIZ-LOSE
PRINTI "When you recover from a brief dizziness, you notice "
PRINTD PRSO
PRINTI " nearby, looking surprised to see you. A moment later, you realize that "
PRINTD PRSO
PRINTI " is "
RTRUE
.FUNCT IMPLEMENTOR-F
EQUAL? PRSA,V?AIMFIZ \?ELS5
CALL JIGS-UP,STR?108
RSTACK
?ELS5: EQUAL? PRSA,V?RESEARCH \FALSE
PRINTR "Possibly the largest entry in the volume, detailing the facts and the myths about the man known as the Bearded Oracle of Yonkers."
.FUNCT JEEARR-F
EQUAL? PRSA,V?RESEARCH \?ELS5
PRINTR "There's a long write-up in the mythology section. The evil force called Jeearr once spread pestilence and terror across many lands. Only the combined magic of many kings and wizards stopped him, even as he was preparing his final assault. He was imprisoned in the void beyond our world, his jailors warning future generations that his exile might not be permanent."
?ELS5: EQUAL? PRSA,V?SWANZO \?ELS9
SET 'PERFORMING-SPELL,TRUE-VALUE
CALL PERFORM,PRSA,BELBOZ
RTRUE
?ELS9: EQUAL? PRSA,V?AIMFIZ \FALSE
CALL AIMFIZ-BELBOZ-JEEARR
CALL GOTO,TWISTED-FOREST
ADD SCORE,20 >SCORE
CALL INT,I-PARROT
PUT STACK,0,0
CALL QUEUE,I-HELLHOUND,-1
PUT STACK,0,1
RTRUE
.FUNCT SPELL-BOOK-F,F
FIRST? SPELL-BOOK >F /?KLU41
?KLU41: EQUAL? PRSA,V?EXAMINE \?ELS5
PRINTI "This is the spell book given to you by Belboz after your original book was lost during your battle with Krill. "
FSET? SPELL-BOOK,MUNGBIT \?ELS12
CALL BOOK-DAMP
RSTACK
?ELS12: PRINTR "There are several spells written in the book, with marginal notes about their effects and how to cast them."
?ELS5: EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS18
PRINTR "Thanks to its magic properties, the spell book is always open to the right place at the right time, but it is also always closed. This innovation eliminates tedious leafing and hunting for spells in tight situations. Many wizardly lives have been saved by this advance in magical technology."
?ELS18: EQUAL? PRSA,V?LOOK-INSIDE,V?READ \FALSE
FSET? SPELL-BOOK,MUNGBIT \?ELS25
CALL BOOK-DAMP
RTRUE
?ELS25: ZERO? LIT \?CND23
ZERO? BLORTED \?CND23
PRINTI "Though it is dark, the magic writing of your spells casts enough light that you can read them."
CRLF
?CND23: CRLF
PRINTI "My Spell Book"
CRLF
CRLF
?PRG34: ZERO? F /TRUE
PRINTI "The "
PRINTD F
PRINTI " ("
GETP F,P?TEXT
PRINT STACK
PRINTI ")."
CRLF
NEXT? F >F /?KLU42
?KLU42: JUMP ?PRG34
.FUNCT I-FLY
SET 'FLYING,FALSE-VALUE
CRLF
EQUAL? HERE,GLASS-MAZE \?ELS3
CALL NO-FLOOR?
ZERO? STACK /?ELS3
CALL JIGS-UP,STR?114
JUMP ?CND1
?ELS3: EQUAL? HERE,TREE-BRANCH \?ELS7
CALL SETTLE-ONTO-BRANCH
JUMP ?CND1
?ELS7: EQUAL? HERE,LAGOON \?ELS9
CALL SPLASH-INTO-WATER
JUMP ?CND1
?ELS9: PRINTI "You settle gently to the ground."
CRLF
?CND1: GRTR? AWAKE,8 \FALSE
CALL I-TIRED
RSTACK
.FUNCT SCROLL-F,SPELL
EQUAL? PRSA,V?TAKE \?ELS5
FIRST? PRSO >SPELL /?KLU37
?KLU37: FSET SPELL,TOUCHBIT
FCLEAR PRSO,TRYTAKEBIT
EQUAL? PRSO,SWANZO-SCROLL \?ELS8
ZERO? MAZE-CROSSED \?ELS8
FSET PRSO,TOUCHBIT
SET 'MAZE-CROSSED,TRUE-VALUE
CALL REARRANGE-MAZE-TABLE
MOVE PRSO,PROTAGONIST
PRINTR "As you take the scroll, a deep and evil laugh rumbles around the hollow. You hear a sliding, grinding noise and turn just in time to catch a flicker of light from within the glass maze, indicating that its transparent panels have shifted around."
?ELS8: EQUAL? PRSO,FWEEP-SCROLL \FALSE
FCLEAR PRSO,TRYTAKEBIT
FCLEAR BAT-GUANO,NDESCBIT
RFALSE
?ELS5: FIRST? PRSO /?ELS16
FIRST? PRSI /?ELS16
PRINTR "Bug #72"
?ELS16: EQUAL? PRSA,V?GNUSTO \?ELS22
FIRST? PRSO >SPELL /?KLU38
?KLU38: CALL PERFORM,V?GNUSTO,SPELL
RTRUE
?ELS22: EQUAL? PRSA,V?READ,V?EXAMINE \FALSE
FSET? PRSO,MUNGBIT \?CND25
PRINTR "The scroll is wet and the spell illegible."
?CND25: FIRST? PRSO >SPELL /?KLU39
?KLU39: PRINTI "The scroll reads """
PRINTD SPELL
PRINTI ": "
GETP SPELL,P?TEXT
PRINT STACK
PRINTI """."
EQUAL? SPELL,AIMFIZ-SPELL,YONK-SPELL \?CND32
PRINTI " The spell seems very long and extremely complicated."
?CND32: CRLF
RTRUE
.FUNCT ALWAYS-MEMORIZED,SPELL
EQUAL? SPELL,GNUSTO-SPELL,FROTZ-SPELL,REZROV-SPELL \FALSE
RTRUE
.FUNCT SPELL-F,MEM?,FORGET=0
EQUAL? PRSA,V?RESEARCH \?ELS5
PRINTI "A spell produced by "
CALL PICK-ONE,MANUFACTURERS
PRINT STACK
PRINTR "."
?ELS5: EQUAL? PRSA,V?READ \?ELS9
IN? PRSO,SPELL-BOOK /?ELS14
LOC PRSO
IN? STACK,PROTAGONIST /?ELS14
PRINTR "You can't do that without having the spell in your book or on a scroll in your hand."
?ELS14: LOC PRSO
FSET? STACK,MUNGBIT \?ELS20
CALL PERFORM,V?READ,SPELL-BOOK
CALL THIS-IS-IT,PRSO
RTRUE
?ELS20: PRINTI "The spell reads """
GETP PRSO,P?TEXT
PRINT STACK
PRINTR """."
?ELS9: EQUAL? PRSA,V?LEARN \?ELS30
CALL ALWAYS-MEMORIZED,PRSO
ZERO? STACK /?ELS35
PRINTR "You already know that spell by heart."
?ELS35: IN? PRSO,SPELL-BOOK /?ELS39
LOC PRSO
IN? STACK,PROTAGONIST \?ELS44
PRINTR "You can't memorize a spell until you've written it into your spell book."
?ELS44: CALL V-LEARN
RSTACK
?ELS39: IN? SPELL-BOOK,PROTAGONIST /?ELS50
PRINTR "You don't have your spell book. How do you expect to learn a spell without a spell book?"
?ELS50: ZERO? LIT \?ELS54
ZERO? BLORTED \?ELS54
PRINTR "You can't learn it in the dark."
?ELS54: FSET? SPELL-BOOK,MUNGBIT \?ELS60
CALL PERFORM,V?READ,SPELL-BOOK
CALL THIS-IS-IT,PRSO
RTRUE
?ELS60: GETP PRSO,P?COUNT >MEM?
ZERO? SPELL-ROOM \?ELS65
EQUAL? SPELL-MAX,1 \?ELS68
PRINTR "You can't concentrate well enough to learn the spell."
?ELS68: EQUAL? MEM?,SPELL-MAX \?ELS72
PRINTR "You try and try, but you just can't memorize those complex syllables again. They slip playfully out of your memory as soon as you cram them in."
?ELS72: CALL FORGET-SPELL,PRSO
INC 'MEM?
PUTP PRSO,P?COUNT,MEM?
SET 'FORGET,TRUE-VALUE
JUMP ?CND63
?ELS65: DEC 'SPELL-ROOM
INC 'MEM?
PUTP PRSO,P?COUNT,MEM?
?CND63: PRINTI "Using your best study habits, you learn the "
PRINTD PRSO
GRTR? MEM?,1 \?CND81
PRINTI " yet another time"
?CND81: PRINTI "."
CRLF
ZERO? FORGET /TRUE
PRINTR "You have so much buzzing around in your head, though, that it's likely that something may have been forgotten in the shuffle."
?ELS30: CALL VISIBLE?,PRSO
ZERO? STACK \?ELS95
EQUAL? PRSA,V?CAST /?ELS95
PRINTR "You can't see that spell here!"
?ELS95: EQUAL? PRSA,V?THROW,V?DROP,V?TAKE \FALSE
CALL PICK-ONE,YUKS
PRINT STACK
CRLF
RTRUE
.FUNCT FORGET-SPELL,SPL,NSPL,F,CNT,TBL,NUM=0,SP=0
FIRST? SPELL-BOOK >F /?KLU26
?KLU26: SET 'TBL,FORGET-TBL
?PRG1: ZERO? F \?ELS5
JUMP ?REP2
?ELS5: GETP F,P?COUNT >CNT
GRTR? CNT,0 \?CND3
?PRG8: SET 'SP,F
PUT TBL,1,F
INC 'NUM
ADD TBL,2 >TBL
DLESS? 'CNT,1 \?PRG8
?CND3: NEXT? F >F /?KLU27
?KLU27: JUMP ?PRG1
?REP2: GRTR? NUM,0 \?CND13
GETP SP,P?COUNT
EQUAL? STACK,NUM \?CND13
SUB NUM,1
PUTP SP,P?COUNT,STACK
RTRUE
?CND13: PUT FORGET-TBL,0,NUM
ZERO? NUM /TRUE
?PRG21: CALL PICK-ONE,FORGET-TBL >NSPL
EQUAL? NSPL,SPL /?PRG21
GETP NSPL,P?COUNT
SUB STACK,1
PUTP NSPL,P?COUNT,STACK
RTRUE
.FUNCT FORGET-ALL,F
SET 'SPELL-ROOM,SPELL-MAX
FIRST? SPELL-BOOK >F /?KLU8
?KLU8:
?PRG1: ZERO? F /TRUE
PUTP F,P?COUNT,0
NEXT? F >F /?KLU9
?KLU9: JUMP ?PRG1
.FUNCT WEAR-OFF-SPELLS
SET 'UNDER-INFLUENCE,FALSE-VALUE
SET 'FLYING,FALSE-VALUE
SET 'FWEEPED,FALSE-VALUE
SET 'VARDIKED,FALSE-VALUE
SET 'VILSTUED,FALSE-VALUE
SET 'BLORTED,FALSE-VALUE
SET 'FOOBLED,FALSE-VALUE
CALL INT,I-FLY
PUT STACK,0,0
CALL INT,I-UNFWEEP
PUT STACK,0,0
CALL INT,I-UNVARDIK
PUT STACK,0,0
CALL INT,I-BREATHE
PUT STACK,0,0
CALL INT,I-UNBLORT
PUT STACK,0,0
CALL INT,I-UNFOOBLE
PUT STACK,0,0
SET 'GNOME-SLEEPING,TRUE-VALUE
CALL INT,I-GNOME
PUT STACK,0,0
MOVE PARK-GNOME,DIAL
CALL INT,I-PARK-GNOME
PUT STACK,0,0
RTRUE
.FUNCT READ-ABOUT-POTIONS,NUM,MAKER
GET POTION-MAKERS,NUM >MAKER
PRINTI "A potion made by "
PRINT MAKER
PRINTR "."
.FUNCT POTION-POUR,VIAL
CALL HELD?,VIAL
ZERO? STACK \?CND1
CALL THIS-IS-IT,VIAL
PRINT YNH
CALL ARTICLE,VIAL,TRUE-VALUE
PRINTR "."
?CND1: MOVE PRSO,DIAL
PRINTI "The potion evaporates before it even reaches"
ZERO? PRSI /?ELS14
CALL ARTICLE,PRSI,TRUE-VALUE
PRINTR "."
?ELS14: PRINTR " the ground."
.FUNCT TWO-POTIONS
PRINTI "Uh oh. The "
PRINTD PRSO
PRINTI " seems to be having an unpleasant reaction with the "
PRINTD UNDER-INFLUENCE
PRINTI ". "
CALL PICK-ONE,POTION-REACTIONS
PRINT STACK
CALL JIGS-UP,STR?71
RSTACK
.FUNCT GLOBAL-SLEEP-F
EQUAL? PRSA,V?TAKE,V?WALK-TO \?ELS5
IN? PROTAGONIST,YOUR-QUARTERS \?CND6
MOVE PROTAGONIST,BED
?CND6: CALL PERFORM,V?SLEEP
RTRUE
?ELS5: EQUAL? PRSA,V?FIND \FALSE
PRINTR "Sleep anywhere."
.FUNCT I-TIRED,FORG=0
IN? PROTAGONIST,BED \?CND1
CRLF
PRINTI "The bed is comfortable and you are becoming tired."
CRLF
INC 'AWAKE
CALL V-SLEEP,TRUE-VALUE
RETURN 2
?CND1: GRTR? LOAD-ALLOWED,10 \?CND8
SUB LOAD-ALLOWED,10 >LOAD-ALLOWED
?CND8: GRTR? FUMBLE-NUMBER,1 \?CND11
DEC 'FUMBLE-NUMBER
?CND11: GRTR? SPELL-MAX,1 \?CND14
DEC 'SPELL-MAX
ZERO? SPELL-ROOM /?CND17
DEC 'SPELL-ROOM
?CND17: ZERO? SPELL-ROOM \?CND14
SET 'FORG,TRUE-VALUE
?CND14: CALL QUEUE,I-TIRED,8
PUT STACK,0,1
INC 'AWAKE
GRTR? AWAKE,8 \?ELS27
ZERO? FLYING /?CND28
CALL QUEUE,I-TIRED,14
PUT STACK,0,1
RFALSE
?CND28: CRLF
PRINTI "You drop in your tracks from exhaustion."
CRLF
CRLF
CALL V-SLEEP
RETURN 2
?ELS27: CRLF
PRINTI "You are "
GET TIRED-TELL,AWAKE
PRINT STACK
ZERO? FORG /?CND40
PRINTI " and the spells you've memorized are becoming confused"
?CND40: PRINTR "."
.FUNCT I-HUNGER
ZERO? BERZIOED /?ELS5
SET 'HUNGER-LEVEL,0
RANDOM 80
ADD 580,STACK
CALL QUEUE,I-HUNGER,STACK
PUT STACK,0,1
RFALSE
?ELS5: EQUAL? HUNGER-LEVEL,6 \?ELS8
SET 'THIRST-LEVEL,6
CALL I-THIRST
RSTACK
?ELS8: CALL QUEUE,I-HUNGER,11
PUT STACK,0,1
CALL HUNGER-THIRST-WARNING,HUNGER-LEVEL,TRUE-VALUE
INC 'HUNGER-LEVEL
RETURN HUNGER-LEVEL
.FUNCT I-THIRST
ZERO? BERZIOED /?ELS5
SET 'THIRST-LEVEL,0
RANDOM 100
ADD 540,STACK
CALL QUEUE,I-THIRST,STACK
PUT STACK,0,1
RFALSE
?ELS5: EQUAL? THIRST-LEVEL,6 \?ELS8
CRLF
CALL JIGS-UP,STR?136,TRUE-VALUE
RSTACK
?ELS8: CALL QUEUE,I-THIRST,9
PUT STACK,0,1
CALL HUNGER-THIRST-WARNING,THIRST-LEVEL
INC 'THIRST-LEVEL
RETURN THIRST-LEVEL
.FUNCT HUNGER-THIRST-WARNING,LEVEL,HUNGRY=0
CRLF
PRINTI "You are now "
GET HUNGER-THIRST-TABLE,LEVEL
PRINT STACK
ZERO? HUNGRY /?ELS5
PRINTI " hungry"
JUMP ?CND3
?ELS5: PRINTI " thirsty"
?CND3: PRINTR "."
.FUNCT SPELL-CHECK,TBL,WRD,OBJ=0
EQUAL? WRD,W?GNUSTO \?ELS3
SET 'OBJ,GNUSTO-SPELL
JUMP ?CND1
?ELS3: EQUAL? WRD,W?FROTZ \?ELS5
SET 'OBJ,FROTZ-SPELL
JUMP ?CND1
?ELS5: EQUAL? WRD,W?REZROV \?ELS7
SET 'OBJ,REZROV-SPELL
JUMP ?CND1
?ELS7: EQUAL? WRD,W?IZYUK \?ELS9
SET 'OBJ,IZYUK-SPELL
JUMP ?CND1
?ELS9: EQUAL? WRD,W?AIMFIZ \?ELS11
SET 'OBJ,AIMFIZ-SPELL
JUMP ?CND1
?ELS11: EQUAL? WRD,W?FWEEP \?ELS13
SET 'OBJ,FWEEP-SPELL
JUMP ?CND1
?ELS13: EQUAL? WRD,W?SWANZO \?ELS15
SET 'OBJ,SWANZO-SPELL
JUMP ?CND1
?ELS15: EQUAL? WRD,W?GOLMAC \?ELS17
SET 'OBJ,GOLMAC-SPELL
JUMP ?CND1
?ELS17: EQUAL? WRD,W?VARDIK \?ELS19
SET 'OBJ,VARDIK-SPELL
JUMP ?CND1
?ELS19: EQUAL? WRD,W?PULVER \?ELS21
SET 'OBJ,PULVER-SPELL
JUMP ?CND1
?ELS21: EQUAL? WRD,W?MEEF \?ELS23
SET 'OBJ,MEEF-SPELL
JUMP ?CND1
?ELS23: EQUAL? WRD,W?VEZZA \?ELS25
SET 'OBJ,VEZZA-SPELL
JUMP ?CND1
?ELS25: EQUAL? WRD,W?GASPAR \?ELS27
SET 'OBJ,GASPAR-SPELL
JUMP ?CND1
?ELS27: EQUAL? WRD,W?YOMIN \?ELS29
SET 'OBJ,YOMIN-SPELL
JUMP ?CND1
?ELS29: EQUAL? WRD,W?YONK \?ELS31
SET 'OBJ,YONK-SPELL
JUMP ?CND1
?ELS31: EQUAL? WRD,W?MALYON \?CND1
SET 'OBJ,MALYON-SPELL
?CND1: ZERO? OBJ /TRUE
CALL OBJ-FOUND,OBJ,TBL
RTRUE
.ENDI