From c1e22b9e7574320af412be07451b28019d8de8f9 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 22 Jul 2022 15:30:14 -0700 Subject: [PATCH] fixes entry for PR #821 - engulfer vs closed door Pull request from entrez: don't allow an amorphous engulfer who has swallowed the hero to move to a closed door location. If some hypothetical amorphous holder existed, it could move to such a spot while holding the hero adjacent. Closes #821 --- doc/fixes3-7-0.txt | 1 + src/mon.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index d3540e931..f724a6ba2 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -976,6 +976,7 @@ change Demonbane to a mace, make it the first sac gift for priests, and give it an invoke ability to banish demons wielding Giantslayer prevents knockback from larger monsters scared hostile monster which cannot move away will attack +prevent a fog cloud that has engulfed the hero from moving under closed doors Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/mon.c b/src/mon.c index 3d67227b1..583d71cba 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1885,8 +1885,10 @@ mfndpos( || dmgtype(mdat, AD_CORR))))) continue; if (IS_DOOR(ntyp) + /* an amorphous creature can only move under/through a + closed door if it doesn't currently have hero engulfed */ && !((amorphous(mdat) || can_fog(mon)) - && !(u.uswallow && mon == u.ustuck)) + && (mon != u.ustuck || !u.uswallow)) && (((levl[nx][ny].doormask & D_CLOSED) && !(flag & OPENDOOR)) || ((levl[nx][ny].doormask & D_LOCKED) && !(flag & UNLOCKDOOR))) && !thrudoor)