From 5868e750f1cf808282623db2d48eb04646b190f0 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 23 Jul 2009 12:13:35 +0000 Subject: 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 --- crawl-ref/source/spl-cast.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (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 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) -- cgit v1.2.3-54-g00ecf