covetous monster tactics on completely full level

If a covetous monster tried to teleport adjacent to the hero but the
level was too full to move it from its current spot, it would be
sent off level to wait for the hero to leave and return instead just
staying put.
This commit is contained in:
PatR
2024-01-15 14:25:06 -08:00
parent 1c16ef68eb
commit 8111a7aff2
2 changed files with 8 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1353 $ $NHDT-Date: 1704316439 2024/01/03 21:13:59 $
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1361 $ $NHDT-Date: 1705357506 2024/01/15 22:25:06 $
General Fixes and Modified Features
-----------------------------------
@@ -1349,6 +1349,9 @@ if polymorphing a potion turned it into oil, dipping potions produced oil
an engulfer capable of passing through iron bars could do so even when hero
was engulfed
some uses of mons[obj->corpsenm] weren't excluding obj->corpsenm==NON_PM (-1)
if a covetous monster tried to teleport next to the hero but the level was
completely full, it would be booted off the level (set to migrate
back if the hero left and returned) instead of just staying put
Fixes to 3.7.0-x General Problems Exposed Via git Repository

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 wizard.c $NHDT-Date: 1646688073 2022/03/07 21:21:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.85 $ */
/* NetHack 3.7 wizard.c $NHDT-Date: 1705357487 2024/01/15 22:24:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.105 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2016. */
/* NetHack may be freely redistributed. See license for details. */
@@ -418,7 +418,9 @@ tactics(struct monst *mtmp)
}
if (u_at(tx, ty) || where == STRAT_PLAYER) {
/* player is standing on it (or has it) */
mnexto(mtmp, RLOC_MSG);
mx = mtmp->mx, my = mtmp->my;
if (!mnearto(mtmp, tx, ty, FALSE, RLOC_MSG))
rloc_to(mtmp, mx, my); /* no room? stay put */
return 0;
}
if (where == STRAT_GROUND) {