fix github issue #1192 - engulfers vs iron bars
Issue reported by Umbire: an engulfing monster capable of passing through iron bars (vortices and air elemental) could do so while carrying the hero. Prevent an engulfer from doing that unless the hero happens to be polymorphed into a subset of the types of monsters that can move to iron bar locations. Fixes #1192
This commit is contained in:
@@ -1346,6 +1346,8 @@ if polymorphing a potion turned it into oil, dipping potions produced oil
|
||||
set of the original potion's age (turn it was created) and could burn
|
||||
for an arbitrarily long time if applied; conversely, polymophing oil
|
||||
into non-oil kept its relative age (no noticeable effect though)
|
||||
an engulfer capable of passing through iron bars could do so even when hero
|
||||
was engulfed
|
||||
|
||||
|
||||
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
||||
|
||||
@@ -1873,7 +1873,11 @@ mon_allowflags(struct monst* mtmp)
|
||||
allowflags |= OPENDOOR;
|
||||
if (can_unlock)
|
||||
allowflags |= UNLOCKDOOR;
|
||||
if (passes_bars(mtmp->data))
|
||||
if (passes_bars(mtmp->data)
|
||||
/* restrict engulfer or holder who might try to pass iron bars while
|
||||
carrying hero; accept small subset for poly'd hero passes_bars() */
|
||||
&& (mtmp != u.ustuck || (unsolid(gy.youmonst.data)
|
||||
|| verysmall(gy.youmonst.data))))
|
||||
allowflags |= ALLOW_BARS;
|
||||
#if 0 /* can't do this here; leave it for mfndpos() */
|
||||
if (is_displacer(mtmp->data))
|
||||
|
||||
Reference in New Issue
Block a user