Prevent multiple assigment to game.bonus in blast

This commit is contained in:
NHOrus 2017-07-06 18:18:31 +03:00
parent adab8e2190
commit 0a04293f23

View file

@ -230,15 +230,16 @@ static int bigwords(long id)
static void blast(void) static void blast(void)
/* Blast. No effect unless you've got dynamite, which is a neat trick! */ /* Blast. No effect unless you've got dynamite, which is a neat trick! */
{ {
if (game.prop[ROD2] < 0 || if (game.prop[ROD2] == STATE_NOTFOUND ||
!game.closed) !game.closed)
rspeak(REQUIRES_DYNAMITE); rspeak(REQUIRES_DYNAMITE);
else { else {
game.bonus = VICTORY_MESSAGE;
if (game.loc == LOC_NE)
game.bonus = DEFEAT_MESSAGE;
if (HERE(ROD2)) if (HERE(ROD2))
game.bonus = SPLATTER_MESSAGE; game.bonus = SPLATTER_MESSAGE;
else if (game.loc == LOC_NE)
game.bonus = DEFEAT_MESSAGE;
else
game.bonus = VICTORY_MESSAGE;
rspeak(game.bonus); rspeak(game.bonus);
terminate(endgame); terminate(endgame);
} }