From b9ec191e5b920fa949a4b82084d15337274e8640 Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 10 Jul 2009 15:53:50 +0000 Subject: Implement [2805989]: Improve Yred's Enslave Soul ability. Remove the HD-dependent random resistance check, replace it with an Invocations-dependent timeout, and restrict it to monsters that are no worse than lightly wounded/damaged. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10134 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 2065139a9d..5fc30f14f2 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -4816,6 +4816,7 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon) } case BEAM_ENSLAVE_SOUL: + { #if DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "HD: %d; pow: %d", mon->hit_dice, ench_power); @@ -4827,13 +4828,20 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon) return (MON_OTHER); } - if (mon->hit_dice >= random2(ench_power / 2)) - return (MON_RESIST); + // The monster can be no more than lightly wounded/damaged, + // using the formula from monstuff.cc:mons_get_damage_level(). + if (mon->hit_points <= (mon->max_hit_points * 3) / 4) + { + simple_monster_message(mon, "'s soul is too badly injured."); + return (MON_OTHER); + } obvious_effect = true; - mon->flags |= MF_ENSLAVED_SOUL; + const int duration = 1 + you.skills[SK_INVOCATIONS] / 2; + mon->add_ench(mon_enchant(ENCH_SOUL_RIPE, 0, KC_YOU, duration * 10)); simple_monster_message(mon, "'s soul is now ripe for the taking."); return (MON_AFFECTED); + } case BEAM_ENSLAVE_DEMON: #if DEBUG_DIAGNOSTICS -- cgit v1.2.3-54-g00ecf