summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-10 15:53:50 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-10 15:53:50 +0000
commitb9ec191e5b920fa949a4b82084d15337274e8640 (patch)
tree535470a79edb41283c774d3138ac64b8b5879258 /crawl-ref/source/mon-util.cc
parent49acbb9fe34fcd43074bc243569c7f3bfe064986 (diff)
downloadcrawl-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/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index ad9bd09bd1..ed227e404c 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -982,8 +982,7 @@ bool mons_can_use_stairs(const monsters *mon)
bool mons_enslaved_body_and_soul(const monsters *mon)
{
- return (testbits(mon->flags, MF_ENSLAVED_SOUL)
- && mons_holiness(mon) == MH_NATURAL);
+ return (mon->has_ench(ENCH_SOUL_RIPE));
}
bool mons_enslaved_twisted_soul(const monsters *mon)
@@ -6989,6 +6988,14 @@ void monsters::remove_enchantment_effect(const mon_enchant &me, bool quiet)
}
break;
+ case ENCH_SOUL_RIPE:
+ if (!quiet)
+ {
+ simple_monster_message(this,
+ "'s soul is no longer ripe for the taking.");
+ }
+ break;
+
default:
break;
}
@@ -7076,7 +7083,7 @@ void monsters::timeout_enchantments(int levels)
case ENCH_SICK: case ENCH_SLEEPY: case ENCH_PARALYSIS:
case ENCH_PETRIFYING: case ENCH_PETRIFIED:
case ENCH_BATTLE_FRENZY: case ENCH_NEUTRAL:
- case ENCH_LOWERED_MR:
+ case ENCH_LOWERED_MR: case ENCH_SOUL_RIPE:
lose_ench_levels(i->second, levels);
break;
@@ -7217,6 +7224,7 @@ void monsters::apply_enchantment(const mon_enchant &me)
case ENCH_CHARM:
case ENCH_SLEEP_WARY:
case ENCH_LOWERED_MR:
+ case ENCH_SOUL_RIPE:
decay_enchantment(me);
break;
@@ -8233,7 +8241,7 @@ static const char *enchant_names[] =
"gloshifter", "shifter", "tp", "wary", "submerged",
"short-lived", "paralysis", "sick", "sleep", "fatigue", "held",
"blood-lust", "neutral", "petrifying", "petrified", "magic-vulnerable",
- "decay", "bug"
+ "soul-ripe", "decay", "bug"
};
static const char *_mons_enchantment_name(enchant_type ench)