diff options
author | Neil Moore <neil@s-z.org> | 2014-07-18 23:35:31 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-07-18 23:38:04 -0400 |
commit | b4cbbce6907c3fb076f0f0dddf6cc7aaaeec842e (patch) | |
tree | 1e24cc8a8fc4e33a6124a534bd198fcdbbd61955 /crawl-ref/source/mon-ench.cc | |
parent | 3000a8c17b790010a24a76b12d09f75646e0a443 (diff) | |
download | crawl-ref-b4cbbce6907c3fb076f0f0dddf6cc7aaaeec842e.tar.gz crawl-ref-b4cbbce6907c3fb076f0f0dddf6cc7aaaeec842e.zip |
Handle another engulf ender (#7437)
This time when your engulfer is trampled away. We don't handle the case
where a monster's engulfer is trampled away, sorry: if we want to do
that, we should generalise the constriction code and remove the engulf
enchantment/duration.
Make clear_far_engulf() public to support this change.
Diffstat (limited to 'crawl-ref/source/mon-ench.cc')
-rw-r--r-- | crawl-ref/source/mon-ench.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-ench.cc b/crawl-ref/source/mon-ench.cc index 713828826b..adbbf5cfc6 100644 --- a/crawl-ref/source/mon-ench.cc +++ b/crawl-ref/source/mon-ench.cc @@ -1238,6 +1238,12 @@ bool monster::decay_enchantment(enchant_type en, bool decay_degree) bool monster::clear_far_engulf(void) { + if (you.duration[DUR_WATER_HOLD] + && (mid_t) you.props["water_holder"].get_int() == mid) + { + you.clear_far_engulf(); + } + const mon_enchant& me = get_ench(ENCH_WATER_HOLD); if (me.ench == ENCH_NONE) return false; |