summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 7ba9fe67a0..0e4a747391 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -2361,10 +2361,10 @@ bool monster_polymorph(monsters *monster, monster_type targetc,
// Allows for handling of submerged monsters which polymorph into
// monsters that can't submerge on this square.
- if (sub.ench != ENCH_NONE
+ if (monster->has_ench(ENCH_SUBMERGED)
&& !monster_can_submerge(monster, grd(monster->pos())))
{
- monster->del_ench(sub);
+ monster->del_ench(ENCH_SUBMERGED);
}
monster->ench_countdown = old_ench_countdown;