summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/monstuff.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index ec07915f09..1a39df45e9 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -721,8 +721,6 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
const bool hard_reset = testbits(monster->flags, MF_HARD_RESET);
const bool gives_xp = !monster->has_ench(ENCH_ABJ);
- bool death_message = !silent && mons_near(monster)
- && player_monster_visible(monster);
bool in_transit = false;
bool drop_items = !hard_reset;
@@ -806,7 +804,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
{
simple_monster_message( monster, " dissipates!",
MSGCH_MONSTER_DAMAGE, MDAM_DEAD );
- death_message = false;
+ silent = true;
}
if (monster->type == MONS_FIRE_VORTEX)
@@ -825,7 +823,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
{
simple_monster_message( monster, " vapourises!",
MSGCH_MONSTER_DAMAGE, MDAM_DEAD );
- death_message = false;
+ silent = true;
}
place_cloud(CLOUD_COLD, monster->x, monster->y, 2 + random2(4),
@@ -842,7 +840,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
{
simple_monster_message( monster, " falls from the air.",
MSGCH_MONSTER_DAMAGE, MDAM_DEAD );
- death_message = false;
+ silent = true;
}
}
@@ -853,6 +851,9 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
}
}
+ bool death_message =
+ (!silent && mons_near(monster) && player_monster_visible(monster));
+
switch (killer)
{
case KILL_YOU: /* You kill in combat. */