From ce46c97e6e6749fc1107db64db7bc1475d00193b Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 22 Nov 2019 18:16:59 -0800 Subject: [PATCH 1/2] fix #H9375 - unintended Rider corpse suppression Don't let Riders swap places with something (fog or ooze, perhaps) located at a closed door spot because if it gets killed there, there won't be any corpse and it will stop auto-reviving. Just avoid moving to spots where mondied() won't place a corpse instead of worrying about whether a bargethrough creature (if there ever are any besides the Riders) might be able to survive at the destination (so ignore pass-walls, door-opening, swimming, &c). --- doc/fixes36.3 | 7 ++++++- src/monmove.c | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 978496348..e50f1b296 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.188 $ $NHDT-Date: 1574419578 2019/11/22 10:46:18 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.189 $ $NHDT-Date: 1574475416 2019/11/23 02:16:56 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -295,6 +295,11 @@ don't strip leading slash from hallucinatory monster name "/b/tard" quaffing unknown potion of see invisible resulted in asking what to call the potion while updated monster display was buffered so not yet shown, hence potentially noticeable effect was concealed from player +when Riders use their bargethrough capability, don't let them swap places with + something located at a spot where corpses can't be created (their + door opening ability was letting them exchange places with something + co-located with a closed door without opening it; if killed there, + there'd be no corpse so no auto-revive) unix: Fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix diff --git a/src/monmove.c b/src/monmove.c index 2f7ae6f5c..c4833c131 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 monmove.c $NHDT-Date: 1557094802 2019/05/05 22:20:02 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.113 $ */ +/* NetHack 3.6 monmove.c $NHDT-Date: 1574475416 2019/11/23 02:16:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.114 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1605,8 +1605,8 @@ register struct monst *mtmp; */ boolean undesirable_disp(mtmp, x, y) -struct monst *mtmp; -xchar x, y; +struct monst *mtmp; /* barging creature */ +xchar x, y; /* spot 'mtmp' is considering moving to */ { boolean is_pet = (mtmp && mtmp->mtame && !mtmp->isminion); struct trap *trap = t_at(x, y); @@ -1625,6 +1625,17 @@ xchar x, y; return TRUE; } + /* oversimplification: creatures that bargethrough can't do so when + target monster is in rock or closed door or water (in particular, + avoid moving to spots where mondied() won't leave a corpse) */ + if (!accessible(x, y) + /* mondied() allows ispool() as an exception to !accessible(), + but we'll only do that if both or neither of mtmp's spot and + destination spot are water so that we don't swap a water + critter onto land or the inverse */ + && (!is_pool(x, y) ^ !is_pool(mtmp->mx, mtmp->my))) + return TRUE; + return FALSE; } From 7de2a0d515064f469f7146be39bd6e5039cc807d Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 22 Nov 2019 23:41:21 -0500 Subject: [PATCH 2/2] Merge branch 'NetHack-3.7' part 2 --- doc/fixes37.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 08e5903a4..f35050e1a 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -31,6 +31,9 @@ savefile: add support to deconstruct internal data structures down into their savefile: use little-endian format for fields where that makes a difference replace build-time level compiler and dungeon compiler with run-time loading of the dungeon and level descriptions and interpreting them via LUA +split off some of the functionality that was in makedefs (compiled-in options + build date/time, etc) so that it can be built by a cross-compiler + and accessed on the target platform Platform- and/or Interface-Specific New Features