summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-23 12:13:35 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-23 12:13:35 +0000
commit5868e750f1cf808282623db2d48eb04646b190f0 (patch)
tree849079c5cd4893936a1e7d8de500e0e511395411 /crawl-ref/source/spl-cast.cc
parent2aa047a8a3a6ce4ff16d8d309d91eb36b05b6048 (diff)
downloadcrawl-ref-5868e750f1cf808282623db2d48eb04646b190f0.tar.gz
crawl-ref-5868e750f1cf808282623db2d48eb04646b190f0.zip
Prompt if you target yourself with Mephitic Cloud and there are no
visible adjacent monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10382 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index e17370cdeb..2735db6f9a 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -30,6 +30,7 @@ REVISION("$Rev$");
#include "itemprop.h"
#include "macro.h"
#include "menu.h"
+#include "misc.h"
#include "message.h"
#include "monstuff.h"
#include "mstuff2.h"
@@ -1177,6 +1178,15 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
return (SPRET_ABORT);
}
+ if (spd.isMe && spell == SPELL_MEPHITIC_CLOUD)
+ {
+ if (i_feel_safe(false, false, true, 1)
+ && !yesno("Really target yourself?", false, 'n'))
+ {
+ return (SPRET_ABORT);
+ }
+ }
+
beam.range = _calc_spell_range(spell, powc, true);
if (testbits(flags, SPFLAG_NOT_SELF) && spd.isMe)