summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-01 03:35:32 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-01 03:35:32 +0000
commit1580408b99a368ac21bf0719491ec62da39cbe0d (patch)
tree4c1f46c12b992674bdbce674f55f6ddf2b2c189c /crawl-ref/source/fight.cc
parent2697d75f081cb4566fc2d5467b4d041c1516e9b4 (diff)
downloadcrawl-ref-1580408b99a368ac21bf0719491ec62da39cbe0d.tar.gz
crawl-ref-1580408b99a368ac21bf0719491ec62da39cbe0d.zip
Fixed special damage from magical staves not being applied (Mariusz).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4789 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 9a650c722e..0002593197 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1754,7 +1754,7 @@ bool melee_attack::player_monattk_hit_effects(bool mondied)
player_apply_staff_damage();
// Returns true if the monster croaked.
- if (apply_damage_brand())
+ if (!special_damage && apply_damage_brand())
return (true);
if (!no_damage_message.empty())
@@ -1772,6 +1772,12 @@ bool melee_attack::player_monattk_hit_effects(bool mondied)
if (needs_message && !special_damage_message.empty())
mprf("%s", special_damage_message.c_str());
+#ifdef DEBUG_DIAGNOSTICS
+ mprf(MSGCH_DIAGNOSTICS, "Special damage to %s: %d",
+ defender->name(DESC_NOCAP_THE).c_str(),
+ special_damage);
+#endif
+
special_damage = hurt_monster(def, special_damage);
if (def->hit_points < 1)