summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fineff.cc
diff options
context:
space:
mode:
authorEd Gonzalez <ed.gonzalez3@gmail.com>2013-06-29 02:04:05 -0700
committerPete Hurst <pete@streamuniverse.tv>2013-06-29 13:06:28 +0100
commitf7d185e99151e10ac3ea320fc396b01b697d134b (patch)
tree2ee30ef18fe3803f3471f9a7535b34befcf9dd6b /crawl-ref/source/fineff.cc
parent3bbf07e665f48e08fc08194f26968ea76554b315 (diff)
downloadcrawl-ref-f7d185e99151e10ac3ea320fc396b01b697d134b.tar.gz
crawl-ref-f7d185e99151e10ac3ea320fc396b01b697d134b.zip
Fixed some effects being applied twice to damage.
When a deferred_damage_fineff is used, ::hurt is called twice. Once for the original target, and a second time for the shared target. Both calls would apply effects such as weakening from wretched and QUAD DAMAGE. While SIXTEEN TIMES damage is funny, the attacker's effects should only be applied once. Now ouch/hurt functions and the deferred_damage_fineff have an 'attacker_effects' parameter, which defaults to true. If false, then damage effects from the attacker are assumed to have already been applied. All existing uses of deferred_damage_fineff have been appropriately updated. Also applied to spectral weapon damage sharing.
Diffstat (limited to 'crawl-ref/source/fineff.cc')
-rw-r--r--crawl-ref/source/fineff.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/fineff.cc b/crawl-ref/source/fineff.cc
index 83f4277f6f..f62a84f573 100644
--- a/crawl-ref/source/fineff.cc
+++ b/crawl-ref/source/fineff.cc
@@ -282,7 +282,7 @@ void blood_fineff::fire()
void deferred_damage_fineff::fire()
{
if (actor *df = defender())
- df->hurt(attacker(), damage);
+ df->hurt(attacker(), damage, BEAM_MISSILE, true, attacker_effects);
}
void starcursed_merge_fineff::fire()