summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-clouds.cc
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2013-01-22 21:55:28 +0000
committerChris Campbell <chriscampbell89@gmail.com>2013-01-22 22:09:41 +0000
commitc463e898c0e5c416f742eb8b9b4c6d591a755cbf (patch)
treea1474481b09c2085a080ee8927415096ada4c7b6 /crawl-ref/source/spl-clouds.cc
parentd3a955ca4d61bbcf8a60f625ccead57c4188c8c9 (diff)
downloadcrawl-ref-c463e898c0e5c416f742eb8b9b4c6d591a755cbf.tar.gz
crawl-ref-c463e898c0e5c416f742eb8b9b4c6d591a755cbf.zip
Add a prompt for casting Corpse Rot if standing on a corpse
Diffstat (limited to 'crawl-ref/source/spl-clouds.cc')
-rw-r--r--crawl-ref/source/spl-clouds.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-clouds.cc b/crawl-ref/source/spl-clouds.cc
index a9e546a21e..6327fce14c 100644
--- a/crawl-ref/source/spl-clouds.cc
+++ b/crawl-ref/source/spl-clouds.cc
@@ -263,6 +263,18 @@ void manage_fire_shield(int delay)
spret_type cast_corpse_rot(bool fail)
{
+ if (!you.res_rotting())
+ {
+ for (stack_iterator si(you.pos()); si; ++si)
+ {
+ if (si->base_type == OBJ_CORPSES && si->sub_type == CORPSE_BODY)
+ {
+ if (!yesno(("Really cast Corpse Rot while standing on " + si->name(DESC_A) + "?").c_str(), false, 'n'))
+ return SPRET_ABORT;
+ break;
+ }
+ }
+ }
fail_check();
corpse_rot(&you);
return SPRET_SUCCESS;