From 527145300902fc9a74574b6188814abb05473acb Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 6 Jul 2008 14:12:01 +0000 Subject: Fix [2011576]: The "Which direction?" prompt is no longer given twice for spells that are wrappers around burn_freeze() (e.g. Freeze). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6425 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells2.cc | 49 ++++++++++++++++++-------------------------- crawl-ref/source/spl-cast.cc | 5 ++++- 2 files changed, 24 insertions(+), 30 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 0c9d2244f9..34e7be81f5 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -888,39 +888,30 @@ char burn_freeze(int pow, beam_type flavour) pow = std::min(25, pow); - while (mgr == NON_MONSTER) - { - mpr("Which direction?", MSGCH_PROMPT); - direction(spd, DIR_DIR, TARG_ENEMY); - - if (!spd.isValid) - { - canned_msg(MSG_OK); - return (-1); - } + mpr("Which direction?", MSGCH_PROMPT); + direction(spd, DIR_DIR, TARG_ENEMY); - if (spd.isMe) - { - canned_msg(MSG_UNTHINKING_ACT); - return (-1); - } + if (!spd.isValid) + { + canned_msg(MSG_OK); + return (-1); + } - mgr = mgrd[you.x_pos + spd.dx][you.y_pos + spd.dy]; + if (spd.isMe) + { + canned_msg(MSG_UNTHINKING_ACT); + return (-1); + } - // Yes, this is strange, but it does maintain the original - // behaviour. Possibly to avoid giving information about - // invisible monsters? - if (mgr == NON_MONSTER) - { - mpr("There isn't anything close enough!"); - return (0); - } + mgr = mgrd[you.x_pos + spd.dx][you.y_pos + spd.dy]; - if (trans_wall_blocking(spd.tx, spd.ty)) - { - mpr("A translucent wall is in the way."); - return (0); - } + // Yes, this is strange, but it does maintain the original + // behaviour. Possibly to avoid giving information about invisible + // monsters? + if (mgr == NON_MONSTER) + { + mpr("There isn't anything close enough!"); + return (0); } monsters *monster = &menv[mgr]; diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 024c1af344..42d8de5c5f 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -996,7 +996,10 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) // there are others that do their own that will be missed by this // (and thus will not properly ESC without cost because of it). // Hopefully, those will eventually be fixed. -- bwr - if ((flags & SPFLAG_TARGETING_MASK) && spell != SPELL_PORTAL_PROJECTILE) + if ((flags & SPFLAG_TARGETING_MASK) + && spell != SPELL_BURN && spell != SPELL_FREEZE + && spell != SPELL_CRUSH && spell != SPELL_ARC + && spell != SPELL_PORTAL_PROJECTILE) { targ_mode_type targ = (testbits(flags, SPFLAG_HELPFUL) ? TARG_FRIEND : TARG_ENEMY); -- cgit v1.2.3-54-g00ecf