X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=main.c;h=e5859b613622cd108ebda83fbb0033b5e74cbac8;hb=0dd961701f645b9db2f03f433627818dd1ff2bd6;hp=6eb783ac46a1b715a4bb17f293e6bf74bc41d150;hpb=704b86afbbf1f60af53a3edd27dafc795674d694;p=open-adventure.git diff --git a/main.c b/main.c index 6eb783a..e5859b6 100644 --- a/main.c +++ b/main.c @@ -623,6 +623,7 @@ static bool playermove(FILE *cmdin, token_t verb, int motion) /* else fall through */ } else if (game.prop[motion] != game.newloc / 100 - 3) break; + L12: do { if (TRAVEL[kk] < 0)BUG(25); ++kk; @@ -645,10 +646,10 @@ static bool playermove(FILE *cmdin, token_t verb, int motion) * actual motion, but can be spotted by "go back". */ /* FIXME: Arithmetic on location numbers */ game.newloc = 99 + 100 - game.loc; - if (game.holdng == 0 || (game.holdng == 1 && TOTING(EMRALD))) - return true; - game.newloc = game.loc; - RSPEAK(MUST_DROP); + if (game.holdng > 1 || (game.holdng == 1 && !TOTING(EMRALD))) { + game.newloc = game.loc; + RSPEAK(MUST_DROP); + } return true; case 2: /* Travel 302. Plover transport. Drop the emerald (only use @@ -656,13 +657,7 @@ static bool playermove(FILE *cmdin, token_t verb, int motion) * plover-passage to get it out. Having dropped it, go back and * pretend he wasn't carrying it after all. */ DROP(EMRALD, game.loc); - do { - if (TRAVEL[kk] < 0)BUG(25); - ++kk; - game.newloc = labs(TRAVEL[kk]) / 1000; - } while - (game.newloc == scratchloc); - continue; /* back to top of do/while loop */ + goto L12; case 3: /* Travel 303. Troll bridge. Must be done only as special * motion so that dwarves won't wander across and encounter @@ -693,13 +688,12 @@ static bool playermove(FILE *cmdin, token_t verb, int motion) game.prop[BEAR] = 3; game.oldlc2 = game.newloc; croak(cmdin); - return false; } } BUG(20); } } while - (false); + (false); /* FIXME: Arithmetic on location number, becoming a message number */ RSPEAK(game.newloc - 500); game.newloc = game.loc; @@ -956,7 +950,7 @@ static bool do_command(FILE *cmdin) msg = arbitrary_messages[PITCH_DARK]; } if (TOTING(BEAR))RSPEAK(TAME_BEAR); - newspeak(msg); + speak(msg); if (FORCED(game.loc)) { if (playermove(cmdin, verb, 1)) return true; @@ -1003,7 +997,7 @@ L2607: game.foobar = (game.foobar > 0 ? -game.foobar : 0); ++game.turns; if (game.turns == game.thresh) { - newspeak(turn_threshold_messages[game.trndex]); + speak(turn_threshold_messages[game.trndex]); game.trnluz = game.trnluz + TRNVAL[game.trndex] / 100000; ++game.trndex; game.thresh = -1;