summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 00:50:56 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 00:50:56 +0000
commitec7ea4a920bbade1e2e0762e219ecc0ab24f9ddf (patch)
treea6db5c5597460e1144160035fa18ef1de4e6fd81 /crawl-ref/source/spells3.cc
parent672ac3157c954a43e2f6d996ec71f71cd86aab91 (diff)
downloadcrawl-ref-ec7ea4a920bbade1e2e0762e219ecc0ab24f9ddf.tar.gz
crawl-ref-ec7ea4a920bbade1e2e0762e219ecc0ab24f9ddf.zip
Add more miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5623 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc22
1 files changed, 20 insertions, 2 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 72d7fdf03e..b5a318829e 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -879,7 +879,7 @@ bool animate_a_corpse(int x, int y, corpse_type class_allowed,
&& (class_allowed == CORPSE_BODY
|| item.sub_type == CORPSE_SKELETON))
{
- bool was_butchering = is_being_butchered(item);
+ const bool was_butchering = is_being_butchered(item);
success = _raise_corpse(x, y, corps, beha, hitting, god_gift,
actual);
@@ -945,6 +945,8 @@ int animate_dead(actor *caster, int pow, beh_type beha, unsigned short hitting,
env_show_grid &los(caster == &you? env.no_trans_show : losgrid);
+ bool was_butchering = false;
+
coord_def a;
for (a.x = minx; a.x != maxx; a.x += xinc)
@@ -962,21 +964,37 @@ int animate_dead(actor *caster, int pow, beh_type beha, unsigned short hitting,
// corpse. Only one of a stack will be raised.
while (corps != NON_ITEM)
{
+ const item_def& item = mitm[corps];
+
if (animate_a_corpse(a.x, a.y, CORPSE_BODY, beha,
hitting, god_gift, actual, true))
{
number_raised++;
+
if (see_grid(env.show, you.pos(), a))
number_seen++;
+
+ if (is_being_butchered(item, false))
+ was_butchering = true;
+
break;
}
- corps = mitm[corps].link;
+ corps = item.link;
}
}
}
}
+ if (actual)
+ {
+ if (was_butchering)
+ mpr("The corpse you are butchering rises to attack!");
+
+ if (number_seen > 0)
+ mpr("The dead are walking!");
+ }
+
return (number_raised);
}