}
LL=LL/1000;
-L11:
- game.newloc=LL/1000;
- K=MOD(game.newloc,100);
- if (game.newloc <= 300) {
- if (game.newloc <= 100)
- goto L14;
- if (TOTING(K) || (game.newloc > 200 && AT(K)))
- goto L16;
- goto L12;
+ for (;;) {
+ game.newloc=LL/1000;
+ K=MOD(game.newloc,100);
+ if (game.newloc <= 300) {
+ if (game.newloc <= 100) {
+ if (game.newloc == 0 || PCT(game.newloc))
+ break;
+ /* else fall through */
+ } if (TOTING(K) || (game.newloc > 200 && AT(K)))
+ break;
+ /* else fall through */
+ }
+ else if (game.prop[K] != game.newloc/100-3)
+ break;
+ L12:
+ do {
+ if (TRAVEL[KK] < 0)BUG(25);
+ ++KK;
+ game.newloc=labs(TRAVEL[KK])/1000;
+ } while
+ (game.newloc == LL);
+ LL=game.newloc;
}
- if (game.prop[K] != game.newloc/100-3)
- goto L16;
-L12:
- do {
- if (TRAVEL[KK] < 0)BUG(25);
- ++KK;
- game.newloc=labs(TRAVEL[KK])/1000;
- } while
- (game.newloc == LL);
- LL=game.newloc;
- goto L11;
-L14:
- if (game.newloc != 0 && !PCT(game.newloc))
- goto L12;
-L16:
game.newloc=MOD(LL,1000);
- if (game.newloc <= 300) return true;
+ if (game.newloc <= 300)
+ return true;
if (game.newloc <= 500) {
game.newloc=game.newloc-300;
switch (game.newloc)
KK=STEXT[game.loc];
if (MOD(game.abbrev[game.loc],game.abbnum) == 0 || KK == 0)
KK=LTEXT[game.loc];
- if (!FORCED(game.loc) && DARK(0)) {
+ if (!FORCED(game.loc) && DARK(game.loc)) {
/* The easiest way to get killed is to fall into a pit in
* pitch darkness. */
if (game.wzdark && PCT(35)) {
if (TOTING(BEAR))RSPEAK(141);
SPEAK(KK);
K=1;
- if (FORCED(game.loc))
+ if (FORCED(game.loc)) {
goto L8;
+ }
if (game.loc == 33 && PCT(25) && !game.closng)RSPEAK(7);
/* Print out descriptions of objects at this location. If
* bear). These hacks are because game.prop=0 is needed to
* get full score. */
- if (DARK(0)) goto L2012;
+ if (DARK(game.loc)) goto L2012;
++game.abbrev[game.loc];
i=game.atloc[game.loc];
L2004: if (i == 0) goto L2012;
goto L2004;
L2009: K=54;
-L2010: SPK=K;
-L2011: RSPEAK(SPK);
-
+L2010: RSPEAK(K);
L2012: VERB=0;
game.oldobj=obj;
obj=0;
game.prop[i] = -1-game.prop[i];
}
}
- game.wzdark=DARK(0);
+ game.wzdark=DARK(game.loc);
if (game.knfloc > 0 && game.knfloc != game.loc)
game.knfloc=0;
game.clock1= -1;
game.closng=true;
goto L19999;
- }
- if (game.clock1 < 0)
+ } else if (game.clock1 < 0)
--game.clock2;
if (game.clock2 == 0) {
/* Once he's panicked, and clock2 has run out, we come here
game.prop[LAMP]=0;
if (HERE(LAMP))RSPEAK(184);
} else if (game.limit <= 30) {
- if (game.lmwarn || !HERE(LAMP)) goto L19999;
- game.lmwarn=true;
- SPK=187;
- if (game.place[BATTER] == 0)SPK=183;
- if (game.prop[BATTER] == 1)SPK=189;
- RSPEAK(SPK);
+ if (!game.lmwarn && HERE(LAMP)) {
+ game.lmwarn=true;
+ SPK=187;
+ if (game.place[BATTER] == 0)SPK=183;
+ if (game.prop[BATTER] == 1)SPK=189;
+ RSPEAK(SPK);
+ }
}
L19999: K=43;
if (LIQLOC(game.loc) == WATER)K=70;
case 2000: goto L2000;
case 2009: goto L2009;
case 2010: goto L2010;
- case 2011: goto L2011;
case 2012: goto L2012;
case 2600: goto L2600;
case 2607: goto L2607;
case 2630: goto L2630;
case 2800: goto L2800;
- case 8000: goto L8000;
- case 18999: goto L18999;
- case 19000: goto L19000;
+ case 8000:
+ /* Random intransitive verbs come here. Clear obj just in case
+ * (see attack()). */
+ SETPRM(1,WD1,WD1X);
+ RSPEAK(257);
+ obj=0;
+ goto L2600;
+ case 18999:
+ /* Oh dear, he's disturbed the dwarves. */
+ RSPEAK(SPK);
+ /* fall through */
+ case 19000:
+ RSPEAK(136);
+ score(0);
+ return true;
}
BUG(99);
- /* Random intransitive verbs come here. Clear obj just in case
- * (see attack()). */
-L8000: SETPRM(1,WD1,WD1X);
- RSPEAK(257);
- obj=0;
- goto L2600;
-
-
/* Figure out the new location */
L8: if (playermove(cmdin, VERB))
return true;
else
goto L2000;
-
-/* Cave closing and scoring */
-
-
-
-/* Oh dear, he's disturbed the dwarves. */
-
-L18999: RSPEAK(SPK);
-L19000: RSPEAK(136);
- score(0);
- return true;
}