-long ABB[186], ATAB[331], ATLOC[186],
- DLOC[7], FIXED[101],
+long ABB[186], ATAB[331], ATLOC[186], BLKLIN = true, DFLAG,
+ DLOC[7], FIXED[101], HOLDNG,
KTAB[331], *LINES, LINK[201], LNLENG, LNPOSN,
PARMS[26], PLACE[101], PTEXT[101], RTEXT[278],
SETUP = 0, TABSIZ = 330;
KTAB[331], *LINES, LINK[201], LNLENG, LNPOSN,
PARMS[26], PLACE[101], PTEXT[101], RTEXT[278],
SETUP = 0, TABSIZ = 330;
-long ACTSPK[36], AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD,
+long ABBNUM, ACTSPK[36], AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, BONUS,
BOTTLE, CAGE, CAVE, CAVITY, CHAIN, CHASM, CHEST, CHLOC, CHLOC2,
BOTTLE, CAGE, CAVE, CAVITY, CHAIN, CHASM, CHEST, CHLOC, CHLOC2,
- CLAM, CLSHNT, CLSMAX = 12, CLSSES,
- COINS, COND[186], CONDS, CTEXT[13], CVAL[13], DALTLC,
- DOOR, DPRSSN, DRAGON, DSEEN[7], DWARF, EGGS,
- EMRALD, ENTER, ENTRNC, FIND, FISSUR, FIXD[101], FOOD,
+ CLAM, CLOCK1, CLOCK2, CLOSED, CLOSNG, CLSHNT, CLSMAX = 12, CLSSES,
+ COINS, COND[186], CONDS, CTEXT[13], CVAL[13], DALTLC, DETAIL,
+ DKILL, DOOR, DPRSSN, DRAGON, DSEEN[7], DTOTAL, DWARF, EGGS,
+ EMRALD, ENTER, ENTRNC, FIND, FISSUR, FIXD[101], FOOBAR, FOOD,
GRATE, HINT, HINTED[21], HINTLC[21], HINTS[21][5], HNTMAX,
GRATE, HINT, HINTED[21], HINTLC[21], HINTS[21][5], HNTMAX,
- HNTSIZ = 20, I, INVENT, IGO, J, JADE, K, K2, KEY[186], KEYS, KK,
- KNIFE, KQ, L, LAMP, LINSIZ = 12500, LINUSE, LL,
- LOC, LOCK, LOCSIZ = 185, LOCSND[186], LOOK, LTEXT[186],
+ HNTSIZ = 20, I, INVENT, IGO, IWEST, J, JADE, K, K2, KEY[186], KEYS, KK,
+ KNFLOC, KNIFE, KQ, L, LAMP, LIMIT, LINSIZ = 12500, LINUSE, LL,
+ LMWARN, LOC, LOCK, LOCSIZ = 185, LOCSND[186], LOOK, LTEXT[186],
- MESSAG, MIRROR, MXSCOR, NUGGET, NUL, OBJ, OBJSND[101],
- OBJTXT[101], ODLOC[7], OGRE, OIL, OYSTER,
- PEARL, PILLOW, PLAC[101], PLANT, PLANT2, PROP[101], PYRAM,
- RESER, ROD, ROD2, RTXSIZ = 277, RUBY, RUG, SAPPH, SAY,
+ MESSAG, MIRROR, MXSCOR,
+ NEWLOC, NOVICE, NUGGET, NUL, NUMDIE, OBJ, OBJSND[101],
+ OBJTXT[101], ODLOC[7], OGRE, OIL, OLDLC2, OLDLOC, OLDOBJ, OYSTER,
+ PANIC, PEARL, PILLOW, PLAC[101], PLANT, PLANT2, PROP[101], PYRAM,
+ RESER, ROD, ROD2, RTXSIZ = 277, RUBY, RUG, SAPPH, SAVED, SAY,
SCORE, SECT, SIGN, SNAKE, SPK, STEPS, STEXT[186], STICK,
STREAM, TABNDX, TALLY, THRESH, THROW, TK[21], TRAVEL[886], TRIDNT,
TRNDEX, TRNLUZ, TRNSIZ = 5, TRNVAL[6], TRNVLS, TROLL, TROLL2, TRVS,
TRVSIZ = 885, TTEXT[6], TURNS, URN, V1, V2, VASE, VEND, VERB,
VOLCAN, VRBSIZ = 35, VRSION = 25, WATER, WD1, WD1X, WD2, WD2X,
SCORE, SECT, SIGN, SNAKE, SPK, STEPS, STEXT[186], STICK,
STREAM, TABNDX, TALLY, THRESH, THROW, TK[21], TRAVEL[886], TRIDNT,
TRNDEX, TRNLUZ, TRNSIZ = 5, TRNVAL[6], TRNVLS, TROLL, TROLL2, TRVS,
TRVSIZ = 885, TTEXT[6], TURNS, URN, V1, V2, VASE, VEND, VERB,
VOLCAN, VRBSIZ = 35, VRSION = 25, WATER, WD1, WD1X, WD2, WD2X,
- * game.lmwarn says whether he's been warned about lamp going dim
- * game.novice says whether he asked for instructions at start-up
- * game.panic says whether he's found out he's trapped in the cave
- * game.wzdark says whether the loc he's leaving was dark */
+ * LMWARN says whether he's been warned about lamp going dim
+ * NOVICE says whether he asked for instructions at start-up
+ * PANIC says whether he's found out he's trapped in the cave
+ * WZDARK says whether the loc he's leaving was dark */
/* See if a dwarf has seen him and has come from where he wants to go. If so,
* the dwarf's blocking his way. If coming from place forbidden to pirate
* (dwarves rooted in place) let him get out (and attacked). */
/* See if a dwarf has seen him and has come from where he wants to go. If so,
* the dwarf's blocking his way. If coming from place forbidden to pirate
* (dwarves rooted in place) let him get out (and attacked). */
/* Dwarf stuff. See earlier comments for description of variables. Remember
* sixth dwarf is pirate and is thus very different except for motion rules. */
/* First off, don't let the dwarves follow him into a pit or a wall. Activate
* the whole mess the first time he gets as far as the hall of mists (loc 15).
/* Dwarf stuff. See earlier comments for description of variables. Remember
* sixth dwarf is pirate and is thus very different except for motion rules. */
/* First off, don't let the dwarves follow him into a pit or a wall. Activate
* the whole mess the first time he gets as far as the hall of mists (loc 15).
* bridge), bypass dwarf stuff. That way pirate can't steal return toll, and
* dwarves can't meet the bear. Also means dwarves won't follow him into dead
* end in maze, but c'est la vie. They'll wait for him outside the dead end. */
* bridge), bypass dwarf stuff. That way pirate can't steal return toll, and
* dwarves can't meet the bear. Also means dwarves won't follow him into dead
* end in maze, but c'est la vie. They'll wait for him outside the dead end. */
- if(LOC == 0 || FORCED(LOC) || CNDBIT(game.newloc,3)) goto L2000;
- if(game.dflag != 0) goto L6000;
- if(INDEEP(LOC))game.dflag=1;
+ if(LOC == 0 || FORCED(LOC) || CNDBIT(NEWLOC,3)) goto L2000;
+ if(DFLAG != 0) goto L6000;
+ if(INDEEP(LOC))DFLAG=1;
goto L2000;
/* When we encounter the first dwarf, we kill 0, 1, or 2 of the 5 dwarves. If
* any of the survivors is at loc, replace him with the alternate. */
goto L2000;
/* When we encounter the first dwarf, we kill 0, 1, or 2 of the 5 dwarves. If
* any of the survivors is at loc, replace him with the alternate. */
* they don't back up unless there's no alternative. If they don't have to
* move, they attack. And, of course, dead dwarves don't do much of anything. */
* they don't back up unless there's no alternative. If they don't have to
* move, they attack. And, of course, dead dwarves don't do much of anything. */
- if(game.newloc > 300 || !INDEEP(game.newloc) || game.newloc == ODLOC[I] || (J > 1 &&
- game.newloc == TK[x]) || J >= 20 || game.newloc == DLOC[I] ||
- FORCED(game.newloc) || (I == 6 && CNDBIT(game.newloc,3)) ||
+ if(NEWLOC > 300 || !INDEEP(NEWLOC) || NEWLOC == ODLOC[I] || (J > 1 &&
+ NEWLOC == TK[x]) || J >= 20 || NEWLOC == DLOC[I] ||
+ FORCED(NEWLOC) || (I == 6 && CNDBIT(NEWLOC,3)) ||
if(OBJ > 100)OBJ=OBJ-100;
if(OBJ == STEPS && TOTING(NUGGET)) goto L2008;
if(PROP[OBJ] >= 0) goto L2006;
if(OBJ > 100)OBJ=OBJ-100;
if(OBJ == STEPS && TOTING(NUGGET)) goto L2008;
if(PROP[OBJ] >= 0) goto L2006;
* if closing time, check for any objects being toted with PROP < 0 and set
* the prop to -1-PROP. This way objects won't be described until they've
* been picked up and put down separate from their respective piles. Don't
* if closing time, check for any objects being toted with PROP < 0 and set
* the prop to -1-PROP. This way objects won't be described until they've
* been picked up and put down separate from their respective piles. Don't
-L2605: game.wzdark=DARK(0);
- if(game.knfloc > 0 && game.knfloc != LOC)game.knfloc=0;
- I=RAN(1);
- GETIN(cmdin, WD1,WD1X,WD2,WD2X);
+L2605: WZDARK=DARK(0);
+ if(KNFLOC > 0 && KNFLOC != LOC)KNFLOC=0;
+ I=0;
+ if (!GETIN(cmdin, WD1,WD1X,WD2,WD2X))
+ return false;
if(TRNDEX <= TRNVLS)THRESH=MOD(TRNVAL[TRNDEX],100000)+1;
L2608: if(VERB == SAY && WD2 > 0)VERB=0;
if(VERB == SAY) goto L4090;
if(TRNDEX <= TRNVLS)THRESH=MOD(TRNVAL[TRNDEX],100000)+1;
L2608: if(VERB == SAY && WD2 > 0)VERB=0;
if(VERB == SAY) goto L4090;
- if(TALLY == 0 && INDEEP(LOC) && LOC != 33)game.clock1=game.clock1-1;
- if(game.clock1 == 0) goto L10000;
- if(game.clock1 < 0)game.clock2=game.clock2-1;
- if(game.clock2 == 0) goto L11000;
- if(PROP[LAMP] == 1)game.limit=game.limit-1;
- if(game.limit <= 30 && HERE(BATTER) && PROP[BATTER] == 0 && HERE(LAMP)) goto
+ if(TALLY == 0 && INDEEP(LOC) && LOC != 33)CLOCK1=CLOCK1-1;
+ if(CLOCK1 == 0) goto L10000;
+ if(CLOCK1 < 0)CLOCK2=CLOCK2-1;
+ if(CLOCK2 == 0) goto L11000;
+ if(PROP[LAMP] == 1)LIMIT=LIMIT-1;
+ if(LIMIT <= 30 && HERE(BATTER) && PROP[BATTER] == 0 && HERE(LAMP)) goto
L2610: if(V1 == 1000+CAGE && V2 == 1000+BIRD && HERE(CAGE) &&
HERE(BIRD))WD1=MAKEWD(301200308);
L2620: if(WD1 != MAKEWD(23051920)) goto L2625;
L2610: if(V1 == 1000+CAGE && V2 == 1000+BIRD && HERE(CAGE) &&
HERE(BIRD))WD1=MAKEWD(301200308);
L2620: if(WD1 != MAKEWD(23051920)) goto L2625;
/* Gee, I don't understand. */
L3000: SETPRM(1,WD1,WD1X);
/* Gee, I don't understand. */
L3000: SETPRM(1,WD1,WD1X);
- * Given the current location in "LOC", and a motion verb number in
- * "K", put the new location in "game.newloc". The current loc is
- * saved in "game.oldloc" in case he wants to retreat. The current
- * game.oldloc is saved in game.oldlc2, in case he dies. (if he
- * does, game.newloc will be limbo, and game.oldloc will be what
- * killed him, so we need game.oldlc2, which is the last place he was
- * safe.) */
+ * Given the current location in "LOC", and a motion verb number in "K", put
+ * the new location in "NEWLOC". The current loc is saved in "OLDLOC" in case
+ * he wants to retreat. The current OLDLOC is saved in OLDLC2, in case he
+ * dies. (if he does, NEWLOC will be limbo, and OLDLOC will be what killed
+ * him, so we need OLDLC2, which is the last place he was safe.) */
-L11: game.newloc=LL/1000;
- K=MOD(game.newloc,100);
- if(game.newloc <= 300) goto L13;
- if(PROP[K] != game.newloc/100-3) goto L16;
+L11: NEWLOC=LL/1000;
+ K=MOD(NEWLOC,100);
+ if(NEWLOC <= 300) goto L13;
+ if(PROP[K] != NEWLOC/100-3) goto L16;
-L14: if(game.newloc != 0 && !PCT(game.newloc)) goto L12;
-L16: game.newloc=MOD(LL,1000);
- if(game.newloc <= 300) return;
- if(game.newloc <= 500) goto L30000;
- RSPEAK(game.newloc-500);
- game.newloc=LOC;
- return;
+L14: if(NEWLOC != 0 && !PCT(NEWLOC)) goto L12;
+L16: NEWLOC=MOD(LL,1000);
+ if(NEWLOC <= 300) return true;
+ if(NEWLOC <= 500) goto L30000;
+ RSPEAK(NEWLOC-500);
+ NEWLOC=LOC;
+ return true;
* table must include "useless" entries going through passage, which can never
* be used for actual motion, but can be spotted by "go back". */
* table must include "useless" entries going through passage, which can never
* be used for actual motion, but can be spotted by "go back". */
* snide messages available. Each death results in a message (81, 83, etc.)
* which offers reincarnation; if accepted, this results in message 82, 84,
* etc. The last time, if he wants another chance, he gets a snide remark as
* snide messages available. Each death results in a message (81, 83, etc.)
* which offers reincarnation; if accepted, this results in message 82, 84,
* etc. The last time, if he wants another chance, he gets a snide remark as
* (presumably the last place prior to being killed) without change of props.
* the loop runs backwards to assure that the bird is dropped before the cage.
* (this kluge could be changed once we're sure all references to bird and cage
* (presumably the last place prior to being killed) without change of props.
* the loop runs backwards to assure that the bird is dropped before the cage.
* (this kluge could be changed once we're sure all references to bird and cage
* it in the cave). It is turned off and left outside the building (only if he
* was carrying it, of course). He himself is left inside the building (and
* heaven help him if he tries to xyzzy back into the cave without the lamp!).
* it in the cave). It is turned off and left outside the building (only if he
* was carrying it, of course). He himself is left inside the building (and
* heaven help him if he tries to xyzzy back into the cave without the lamp!).
-L99: if(game.closng) goto L95;
- game.numdie=game.numdie+1;
- if(!YES(cmdin,79+game.numdie*2,80+game.numdie*2,54)) score(0);
- if(game.numdie == MAXDIE) score(0);
+L99: if(CLOSNG) goto L95;
+ NUMDIE=NUMDIE+1;
+ if(!YES(cmdin,79+NUMDIE*2,80+NUMDIE*2,54)) score(0);
+ if(NUMDIE == MAXDIE) score(0);
SETPRM(1,HINTS[HINT][2],HINTS[HINT][2]);
RSPEAK(261);
HINTED[HINT]=YES(cmdin,175,HINTS[HINT][4],54);
SETPRM(1,HINTS[HINT][2],HINTS[HINT][2]);
RSPEAK(261);
HINTED[HINT]=YES(cmdin,175,HINTS[HINT][4],54);
PROP[ROD]=PUT(ROD,115,0);
PROP[DWARF]=PUT(DWARF,115,0);
LOC=115;
PROP[ROD]=PUT(ROD,115,0);
PROP[DWARF]=PUT(DWARF,115,0);
LOC=115;