From 04d222f4d73f54788556281eabb2e09aae7ff20d Mon Sep 17 00:00:00 2001 From: haranp Date: Sun, 29 Apr 2007 08:23:53 +0000 Subject: Fix for (part of) 1709375: monsters dying not because of you always got "dies" (instead of testing wounded_damage() for constructs, etc.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1391 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index b8d6467fda..ebfcaebf5e 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -623,7 +623,10 @@ void monster_die(monsters *monster, char killer, int i, bool silent) case KILL_MON: /* Monster kills in combat */ case KILL_MON_MISSILE: /* Monster kills by missile or beam */ if (!silent) - simple_monster_message(monster, " dies!", MSGCH_MONSTER_DAMAGE, + simple_monster_message(monster, + wounded_damaged(monster->type) ? + " is destroyed!" : " dies!", + MSGCH_MONSTER_DAMAGE, MDAM_DEAD); // no piety loss if god gifts killed by other monsters @@ -639,7 +642,7 @@ void monster_die(monsters *monster, char killer, int i, bool silent) const bool anon = (i == ANON_FRIENDLY_MONSTER); gain_exp(exper_value( monster ) / 2 + 1); - int targ_holy = mons_holiness(monster), + const mon_holy_type targ_holy = mons_holiness(monster), attacker_holy = anon? MH_NATURAL : mons_holiness(&menv[i]); if (attacker_holy == MH_UNDEAD) @@ -713,7 +716,10 @@ void monster_die(monsters *monster, char killer, int i, bool silent) /* Monster killed by trap/inanimate thing/itself/poison not from you */ case KILL_MISC: if (!silent) - simple_monster_message(monster, " dies!", MSGCH_MONSTER_DAMAGE, + simple_monster_message(monster, + wounded_damaged(monster->type) ? + " is destroyed!" : " dies!", + MSGCH_MONSTER_DAMAGE, MDAM_DEAD); break; @@ -1338,7 +1344,7 @@ void print_wounds(monsters *monster) bool wounded_damaged(int wound_class) { // this schema needs to be abstracted into real categories {dlb}: - const int holy = mons_class_holiness(wound_class); + const mon_holy_type holy = mons_class_holiness(wound_class); if (holy == MH_UNDEAD || holy == MH_NONLIVING || holy == MH_PLANT) return (true); -- cgit v1.2.3-54-g00ecf