summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-10 10:28:10 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-10 10:28:10 +0000
commit22e375d42eabd760283d4e0d8ea42c65e66108af (patch)
treec960394e8309f301773b38212a679eab3d303747 /crawl-ref/source/misc.cc
parentc48e3fbe888d67a5abf206614ca7655629840dda (diff)
downloadcrawl-ref-22e375d42eabd760283d4e0d8ea42c65e66108af.tar.gz
crawl-ref-22e375d42eabd760283d4e0d8ea42c65e66108af.zip
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
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 90879d3d75..fadc4b16b3 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -2721,6 +2721,9 @@ std::string your_hand(bool plural)
bool stop_attack_prompt(const monsters *mon, bool beam_attack,
bool beam_target)
{
+ if (you.confused())
+ return (false);
+
bool retval = false;
bool prompt = false;
@@ -2734,7 +2737,7 @@ bool stop_attack_prompt(const monsters *mon, bool beam_attack,
if (isFriendly)
{
- // listed in the form: "your rat", "Blork the orc"
+ // Listed in the form: "your rat", "Blork the orc".
snprintf(info, INFO_SIZE, "Really %s %s%s?",
(beam_attack) ? (beam_target) ? "fire at"
: "fire through"
@@ -2769,7 +2772,7 @@ bool stop_attack_prompt(const monsters *mon, bool beam_attack,
prompt = true;
}
- if (!you.confused() && prompt)
+ if (prompt)
retval = !yesno(info, false, 'n');
return (retval);