From ea57b9d8cac6324cc4961c874f1022564a732d89 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 1 Dec 2023 23:05:11 -0800 Subject: [PATCH] bones fix - clear monst->seen_resistance When saving bones, forget observations of current hero's resistances because they'll be stale when the bones are used in a future game. --- doc/fixes3-7-0.txt | 3 ++- src/bones.c | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 66f9c3d20..ed3668efe 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.1308 $ $NHDT-Date: 1700869710 2023/11/24 23:48:30 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1317 $ $NHDT-Date: 1701500708 2023/12/02 07:05:08 $ General Fixes and Modified Features ----------------------------------- @@ -1767,6 +1767,7 @@ when a tethered aklys gets caught in a web, make sure it doesn't return add 'X' as a potential context-sensitive item-action for uwep and uswapwep monsters weren't noticing hero's possession or lack of magic resistance when hero getting zapped by a wand of striking was or wasn't resisted +discard monsters' observations about hero's resistances when saving bones Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository diff --git a/src/bones.c b/src/bones.c index dc0639bca..063adbb21 100644 --- a/src/bones.c +++ b/src/bones.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 bones.c $NHDT-Date: 1654931350 2022/06/11 07:09:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.119 $ */ +/* NetHack 3.7 bones.c $NHDT-Date: 1701500709 2023/12/02 07:05:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.129 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -453,7 +453,8 @@ savebones(int how, time_t when, struct obj *corpse) struct obj *otmp; /* embed your possessions in your statue */ - otmp = mk_named_object(STATUE, &mons[u.umonnum], u.ux, u.uy, gp.plname); + otmp = mk_named_object(STATUE, &mons[u.umonnum], u.ux, u.uy, + gp.plname); drop_upon_death((struct monst *) 0, otmp, u.ux, u.uy); if (!otmp) @@ -507,6 +508,8 @@ savebones(int how, time_t when, struct obj *corpse) mtmp->mlstmv = 0L; if (mtmp->mtame) mtmp->mtame = mtmp->mpeaceful = 0; + /* observations about the current hero won't apply to future game */ + mtmp->seen_resistance = M_SEEN_NOTHING; } for (ttmp = gf.ftrap; ttmp; ttmp = ttmp->ntrap) { ttmp->madeby_u = 0;