summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-31 21:24:37 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-31 21:24:37 +0000
commit879381b4e68347b743d5fd69b4ccfa9dfd5162bb (patch)
tree6613b946fa5ab7f419b53beb122ae6f0ad3762e7 /crawl-ref/source/spl-cast.cc
parent630b860361ef96c367743da0da276f320209e61d (diff)
downloadcrawl-ref-879381b4e68347b743d5fd69b4ccfa9dfd5162bb.tar.gz
crawl-ref-879381b4e68347b743d5fd69b4ccfa9dfd5162bb.zip
Fix 2032476: improve interface for Lee's Rapid Deconstruction.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6742 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 3997032251..8416d55c61 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -989,8 +989,8 @@ static void _try_monster_cast(spell_type spell, int powc,
// Others are currently unused or unimplemented.
spret_type your_spells(spell_type spell, int powc, bool allow_fail)
{
- struct dist spd;
- struct bolt beam;
+ dist spd;
+ bolt beam;
// [dshaligram] Any action that depends on the spellcasting attempt to have
// succeeded must be performed after the switch().
@@ -1009,7 +1009,7 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
if ((flags & SPFLAG_TARGETING_MASK)
&& spell != SPELL_BURN && spell != SPELL_FREEZE
&& spell != SPELL_CRUSH && spell != SPELL_ARC
- && spell != SPELL_FRAGMENTATION && spell != SPELL_PORTAL_PROJECTILE)
+ && spell != SPELL_PORTAL_PROJECTILE)
{
targ_mode_type targ =
(testbits(flags, SPFLAG_HELPFUL) ? TARG_FRIEND : TARG_ENEMY);
@@ -1447,7 +1447,8 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
break;
case SPELL_FRAGMENTATION:
- cast_fragmentation(powc);
+ if (!cast_fragmentation(powc, spd))
+ return (SPRET_ABORT);
break;
case SPELL_FAR_STRIKE: