diff options
-rw-r--r-- | crawl-ref/source/abl-show.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/spells3.cc | 19 | ||||
-rw-r--r-- | crawl-ref/source/spells3.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 2 |
4 files changed, 13 insertions, 14 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index cc4c24f954..8bd24d35a2 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -1471,8 +1471,8 @@ static bool _do_ability(const ability_def& abil) case ABIL_YRED_ANIMATE_CORPSE: mpr("You call on the dead to walk for you..."); - animate_a_corpse(you.x_pos, you.y_pos, CORPSE_BODY, BEH_FRIENDLY, - you.pet_target, GOD_YREDELEMNUL); + animate_a_corpse(you.pos(), CORPSE_BODY, BEH_FRIENDLY, you.pet_target, + GOD_YREDELEMNUL); exercise(SK_INVOCATIONS, 2 + random2(4)); break; diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 94ee3c6755..6f253178e9 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -805,7 +805,7 @@ static void _equip_undead(int x, int y, int corps, int monster, int monnum) #endif } -static bool _raise_corpse(int x, int y, int corps, beh_type beha, +static bool _raise_corpse(const coord_def &a, int corps, beh_type beha, unsigned short hitting, god_type god, bool actual) { const item_def& item = mitm[corps]; @@ -841,7 +841,7 @@ static bool _raise_corpse(int x, int y, int corps, beh_type beha, const int monster = create_monster( mgen_data(mon, beha, 0, - coord_def(x, y), hitting, + a, hitting, 0, god, zombie_type, number)); @@ -859,7 +859,7 @@ static bool _raise_corpse(int x, int y, int corps, beh_type beha, menv[monster].mname = "Blork"; } - _equip_undead(x, y, corps, monster, monnum); + _equip_undead(a.x, a.y, corps, monster, monnum); destroy_item(corps); @@ -869,7 +869,7 @@ static bool _raise_corpse(int x, int y, int corps, beh_type beha, return (false); } -bool animate_a_corpse(int x, int y, corpse_type class_allowed, +bool animate_a_corpse(const coord_def &a, corpse_type class_allowed, beh_type beha, unsigned short hitting, god_type god, bool actual, bool quiet) @@ -877,7 +877,7 @@ bool animate_a_corpse(int x, int y, corpse_type class_allowed, bool success = false; // Search all the items on the ground for a corpse. - for (stack_iterator si(igrd[x][y]); si; ++si) + for (stack_iterator si(a); si; ++si) { if (_is_animatable_corpse(*si) && (class_allowed == CORPSE_BODY @@ -885,8 +885,7 @@ bool animate_a_corpse(int x, int y, corpse_type class_allowed, { const bool was_butchering = is_being_butchered(*si); - success = _raise_corpse(x, y, si.link(), beha, hitting, god, - actual); + success = _raise_corpse(a, si.link(), beha, hitting, god, actual); if (actual && success) { @@ -895,7 +894,7 @@ bool animate_a_corpse(int x, int y, corpse_type class_allowed, if (was_butchering) mpr("The corpse you are butchering rises to attack!"); - if (is_terrain_seen(x, y)) + if (is_terrain_seen(a)) mpr("The dead are walking!"); } @@ -965,8 +964,8 @@ int animate_dead(actor *caster, int pow, beh_type beha, unsigned short hitting, if (is_being_butchered(*si, false)) was_butchering = true; - if (animate_a_corpse(a.x, a.y, CORPSE_BODY, beha, - hitting, god, actual, true)) + if (animate_a_corpse(a, CORPSE_BODY, beha, hitting, god, + actual, true)) { number_raised++; diff --git a/crawl-ref/source/spells3.h b/crawl-ref/source/spells3.h index 58ffefcbe5..a8485037c2 100644 --- a/crawl-ref/source/spells3.h +++ b/crawl-ref/source/spells3.h @@ -131,7 +131,7 @@ bool cast_summon_horrible_things(int pow, god_type god = GOD_NO_GOD); /* *********************************************************************** * called from: ability - spell * *********************************************************************** */ -bool animate_a_corpse(int x, int y, corpse_type class_allowed, +bool animate_a_corpse(const coord_def &a, corpse_type class_allowed, beh_type beha, unsigned short hitting, god_type god = GOD_NO_GOD, bool actual = true, bool quiet = false); diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 49ea215d71..2e093a05f0 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1510,7 +1510,7 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) case SPELL_ANIMATE_SKELETON: mpr("You attempt to give life to the dead..."); - animate_a_corpse(you.x_pos, you.y_pos, CORPSE_SKELETON, BEH_FRIENDLY, + animate_a_corpse(you.pos(), CORPSE_SKELETON, BEH_FRIENDLY, you.pet_target, god); break; |