summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-07-30 06:26:13 -0400
committerNeil Moore <neil@s-z.org>2014-07-30 06:26:13 -0400
commit65d117d0c71acc14723c837e5c7a68edb1f0ee0b (patch)
tree12d37f8dd3e24db670299666bb88abb28e62cee8
parente7a3923bec3429ee8e1814dcca814d673bd8937d (diff)
downloadcrawl-ref-65d117d0c71acc14723c837e5c7a68edb1f0ee0b.tar.gz
crawl-ref-65d117d0c71acc14723c837e5c7a68edb1f0ee0b.zip
Fix explosive bolt hostiles-in-range check (#8815)
While we're at it, also correct a few power calculations to to take into account the possibility of rod spells.
-rw-r--r--crawl-ref/source/spl-util.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index 1f2d801c2e..41272af34f 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -1278,6 +1278,7 @@ bool spell_no_hostile_in_range(spell_type spell, bool rod)
bolt beam;
beam.flavour = BEAM_VISUAL;
+ beam.origin_spell = spell;
zap_type zap = spell_to_zap(spell);
if (spell == SPELL_FIREBALL)
@@ -1288,7 +1289,7 @@ bool spell_no_hostile_in_range(spell_type spell, bool rod)
if (zap != NUM_ZAPS)
{
beam.thrower = KILL_YOU_MISSILE;
- zappy(zap, calc_spell_power(spell, true), beam);
+ zappy(zap, calc_spell_power(spell, true, false, true, rod), beam);
}
else if (spell == SPELL_MEPHITIC_CLOUD)
{
@@ -1297,7 +1298,7 @@ bool spell_no_hostile_in_range(spell_type spell, bool rod)
beam.damage = dice_def(1, 1); // so that foe_info is populated
beam.hit = 20;
beam.thrower = KILL_YOU;
- beam.ench_power = calc_spell_power(spell, true);
+ beam.ench_power = calc_spell_power(spell, true, false, true, rod);
beam.is_beam = false;
beam.is_explosion = true;
}