From ec7ea4a920bbade1e2e0762e219ecc0ab24f9ddf Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 9 Jun 2008 00:50:56 +0000 Subject: Add more miscellaneous minor fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5623 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells3.cc | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/spells3.cc') 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); } -- cgit v1.2.3-54-g00ecf