summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-ench.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-07-18 23:35:31 -0400
committerNeil Moore <neil@s-z.org>2014-07-18 23:38:04 -0400
commitb4cbbce6907c3fb076f0f0dddf6cc7aaaeec842e (patch)
tree1e24cc8a8fc4e33a6124a534bd198fcdbbd61955 /crawl-ref/source/mon-ench.cc
parent3000a8c17b790010a24a76b12d09f75646e0a443 (diff)
downloadcrawl-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.cc6
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;