summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/abl-show.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-04 11:48:03 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-04 11:48:03 +0000
commit5be9c59587164c09a41da05a8de9e0d3588412ab (patch)
treee754dccbffe678ce3067306ca3dadc8668038eea /crawl-ref/source/abl-show.cc
parent09aad943f1aae98c6f0fd03c94583ad2afc65e09 (diff)
downloadcrawl-ref-5be9c59587164c09a41da05a8de9e0d3588412ab.tar.gz
crawl-ref-5be9c59587164c09a41da05a8de9e0d3588412ab.zip
Take range information from the beam if applicable in spell_direction().
Implements [2553289]. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8889 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/abl-show.cc')
-rw-r--r--crawl-ref/source/abl-show.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 0d290f460e..0264ed4001 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -1204,7 +1204,7 @@ static bool _do_ability(const ability_def& abil)
else
{
beam.range = _calc_breath_ability_range(abil.ability);
- if (!spell_direction(abild, beam, DIR_NONE, TARG_ENEMY, beam.range))
+ if (!spell_direction(abild, beam))
return (false);
}
@@ -1408,7 +1408,7 @@ static bool _do_ability(const ability_def& abil)
case ABIL_THROW_FROST:
// Taking ranges from the equivalent spells.
beam.range = (abil.ability == ABIL_THROW_FLAME ? 7 : 8);
- if (!spell_direction(abild, beam, DIR_NONE, TARG_ENEMY, beam.range))
+ if (!spell_direction(abild, beam))
return (false);
if (!zapping((abil.ability == ABIL_THROW_FLAME ? ZAP_FLAME : ZAP_FROST),
@@ -1421,7 +1421,7 @@ static bool _do_ability(const ability_def& abil)
case ABIL_BOLT_OF_DRAINING:
// Taking range from Bolt of Draining.
beam.range = 6;
- if (!spell_direction(abild, beam, DIR_NONE, TARG_ENEMY, beam.range))
+ if (!spell_direction(abild, beam))
return (false);
if (!zapping(ZAP_NEGATIVE_ENERGY, you.experience_level * 6, beam, true))
@@ -1521,7 +1521,7 @@ static bool _do_ability(const ability_def& abil)
case ABIL_KIKU_ENSLAVE_UNDEAD:
{
god_acting gdact;
- beam.range = 8;
+ beam.range = LOS_RADIUS;
if (!spell_direction(spd, beam))
return (false);
@@ -1578,7 +1578,7 @@ static bool _do_ability(const ability_def& abil)
case ABIL_YRED_ENSLAVE_SOUL:
{
god_acting gdact;
- beam.range = 8;
+ beam.range = LOS_RADIUS;
if (!spell_direction(spd, beam))
return (false);
@@ -1610,7 +1610,7 @@ static bool _do_ability(const ability_def& abil)
break;
case ABIL_MAKHLEB_MINOR_DESTRUCTION:
- if (!spell_direction(spd, beam, DIR_NONE, TARG_ENEMY, 8))
+ if (!spell_direction(spd, beam))
return (false);
power = you.skills[SK_INVOCATIONS]
@@ -1763,7 +1763,8 @@ static bool _do_ability(const ability_def& abil)
break;
case ABIL_LUGONU_BANISH:
- if (!spell_direction(spd, beam, DIR_NONE, TARG_ENEMY))
+ beam.range = LOS_RADIUS;
+ if (!spell_direction(spd, beam))
return (false);
if (beam.target == you.pos())
@@ -1771,7 +1772,6 @@ static bool _do_ability(const ability_def& abil)
mpr("You cannot banish yourself!");
return (false);
}
- beam.range = 8;
if (!zapping(ZAP_BANISHMENT, 16 + you.skills[SK_INVOCATIONS] * 8, beam,
true))
{