From 879381b4e68347b743d5fd69b4ccfa9dfd5162bb Mon Sep 17 00:00:00 2001 From: haranp Date: Thu, 31 Jul 2008 21:24:37 +0000 Subject: 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 --- crawl-ref/source/spl-cast.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/spl-cast.cc') 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: -- cgit v1.2.3-54-g00ecf