projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
adab8e2
)
Prevent multiple assigment to game.bonus in blast
author
NHOrus
<jy6x2b32pie9@yahoo.com>
Thu, 6 Jul 2017 15:18:31 +0000
(18:18 +0300)
committer
NHOrus
<jy6x2b32pie9@yahoo.com>
Thu, 6 Jul 2017 15:18:31 +0000
(18:18 +0300)
actions.c
patch
|
blob
|
history
diff --git
a/actions.c
b/actions.c
index 2c28663b80cbd15b32d476d8ed0d6fd294e89906..ab3ccda319f9e26ab1802fad2378cecb1d0cb10a 100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-230,15
+230,16
@@
static int bigwords(long id)
static void blast(void)
/* Blast. No effect unless you've got dynamite, which is a neat trick! */
{
static void blast(void)
/* 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)
rspeak(REQUIRES_DYNAMITE);
else {
!game.closed)
rspeak(REQUIRES_DYNAMITE);
else {
- game.bonus = VICTORY_MESSAGE;
- if (game.loc == LOC_NE)
- game.bonus = DEFEAT_MESSAGE;
if (HERE(ROD2))
game.bonus = SPLATTER_MESSAGE;
if (HERE(ROD2))
game.bonus = SPLATTER_MESSAGE;
+ else if (game.loc == LOC_NE)
+ game.bonus = DEFEAT_MESSAGE;
+ else
+ game.bonus = VICTORY_MESSAGE;
rspeak(game.bonus);
terminate(endgame);
}
rspeak(game.bonus);
terminate(endgame);
}