From 22e375d42eabd760283d4e0d8ea42c65e66108af Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 10 Jun 2008 10:28:10 +0000 Subject: Modify Evaporate and Stinking Cloud to prompt when firing through allies. Note: This does still not handle the actual clouds, just the basic beam. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5701 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spl-cast.cc | 10 ++++++---- 1 file changed, 6 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 f202254d83..065c549315 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -938,9 +938,10 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) (testbits(flags, SPFLAG_HELPFUL) ? TARG_FRIEND : TARG_ENEMY); targeting_type dir = - (testbits( flags, SPFLAG_TARGET ) ? DIR_TARGET : - testbits( flags, SPFLAG_GRID ) ? DIR_TARGET : - testbits( flags, SPFLAG_DIR ) ? DIR_DIR : DIR_NONE); + (testbits( flags, SPFLAG_TARGET ) ? DIR_TARGET : + testbits( flags, SPFLAG_GRID ) ? DIR_TARGET : + testbits( flags, SPFLAG_DIR ) ? DIR_DIR + : DIR_NONE); const char *prompt = get_spell_target_prompt(spell); if (spell == SPELL_EVAPORATE) @@ -1235,7 +1236,8 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) break; case SPELL_MEPHITIC_CLOUD: - stinking_cloud(powc, beam); + if (!stinking_cloud(powc, beam)) + return (SPRET_ABORT); break; case SPELL_RING_OF_FLAMES: -- cgit v1.2.3-54-g00ecf