summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-29 08:23:53 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-29 08:23:53 +0000
commit04d222f4d73f54788556281eabb2e09aae7ff20d (patch)
treea1f66b1b21a17dcbd879c37c86fcb613ef47932d
parent4e5a7a56ceae65af76743469eabd199d93a9e1d1 (diff)
downloadcrawl-ref-04d222f4d73f54788556281eabb2e09aae7ff20d.tar.gz
crawl-ref-04d222f4d73f54788556281eabb2e09aae7ff20d.zip
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
-rw-r--r--crawl-ref/source/monstuff.cc14
1 files 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);