diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-10 15:53:50 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-10 15:53:50 +0000 |
commit | b9ec191e5b920fa949a4b82084d15337274e8640 (patch) | |
tree | 535470a79edb41283c774d3138ac64b8b5879258 /crawl-ref/source/beam.cc | |
parent | 49acbb9fe34fcd43074bc243569c7f3bfe064986 (diff) | |
download | crawl-ref-b9ec191e5b920fa949a4b82084d15337274e8640.tar.gz crawl-ref-b9ec191e5b920fa949a4b82084d15337274e8640.zip |
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
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 14 |
1 files changed, 11 insertions, 3 deletions
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 |