From 1580408b99a368ac21bf0719491ec62da39cbe0d Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 1 May 2008 03:35:32 +0000 Subject: 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 --- crawl-ref/source/fight.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/fight.cc') 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) -- cgit v1.2.3-54-g00ecf