summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-26 22:07:34 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-26 22:07:34 +0000
commit94d3e573a336deca5557a3357a1d29786d14a617 (patch)
tree93b414213dfb9adbb2db5cff19c8bca43671f48f /crawl-ref/source/monstuff.cc
parent10512047039742a698a15dcfad41dea0e086975d (diff)
downloadcrawl-ref-94d3e573a336deca5557a3357a1d29786d14a617.tar.gz
crawl-ref-94d3e573a336deca5557a3357a1d29786d14a617.zip
Fix erroneous "is destroyed" message when a monster kills e.g. a
non-abjurable dancing weapon. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4681 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-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. */