From 8111a7aff26ddf0c5b34d6ce121d3fd1f86d2907 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 15 Jan 2024 14:25:06 -0800 Subject: [PATCH] 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. --- doc/fixes3-7-0.txt | 5 ++++- src/wizard.c | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 497676c6a..6e561aea0 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 diff --git a/src/wizard.c b/src/wizard.c index 0c720b25e..911dbed65 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -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) {