diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index fc66d4e59..a3c1cf925 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.1435 $ $NHDT-Date: 1715984437 2024/05/17 22:20:37 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1442 $ $NHDT-Date: 1717570484 2024/06/05 06:54:44 $ General Fixes and Modified Features ----------------------------------- @@ -1415,6 +1415,9 @@ the tile for Ixoth (knight's quest nemesis) depicted a demon rather than a dragon; change it to be a red dragon untrapping containers or doors gives some experience only honor DEBUGFILES (for activating debugpline() calls) when in wizard mode +if hero is on scroll of scare monster or Elbereth, werecreature switching from + human to beast form or general monster polymorphing into a susceptible + form will become scared right away instead on its next move Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/mon.c b/src/mon.c index ad222c5a0..e544d68ab 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 mon.c $NHDT-Date: 1716588803 2024/05/24 22:13:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.568 $ */ +/* NetHack 3.7 mon.c $NHDT-Date: 1717570485 2024/06/05 06:54:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.573 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -5282,6 +5282,20 @@ newcham( if (mtmp == u.usteed) poly_steed(mtmp, olddata); + /* old form might not have been affected by Elbereth but perhaps the + new form is */ + if (gc.context.mon_moving) { + /* give 'mtmp' a new chance to pinpoint hero's location */ + if (!u_at(mtmp->mux, mtmp->muy)) + set_apparxy(mtmp); + /* if hero is on Elbereth or scare monster, mtmp in new form might + become scared */ + if (!mtmp->mpeaceful + && onscary(mtmp->mux, mtmp->muy, mtmp) + && monnear(mtmp, mtmp->mux, mtmp->muy)) + monflee(mtmp, rn1(9, 2), TRUE, TRUE); /* 2..10 turns */ + } + return 1; } diff --git a/src/were.c b/src/were.c index 196c66c4d..e78215ebf 100644 --- a/src/were.c +++ b/src/were.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 were.c $NHDT-Date: 1689448846 2023/07/15 19:20:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.34 $ */ +/* NetHack 3.7 were.c $NHDT-Date: 1717570494 2024/06/05 06:54:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.36 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -127,6 +127,13 @@ new_were(struct monst *mon) newsym(mon->mx, mon->my); mon_break_armor(mon, FALSE); possibly_unwield(mon, FALSE); + + /* vision capability isn't changing so we don't call set_apparxy() to + update mon's idea of where hero is; peaceful check is redundant */ + if (gc.context.mon_moving && !mon->mpeaceful + && onscary(mon->mux, mon->muy, mon) + && monnear(mon, mon->mux, mon->muy)) + monflee(mon, rn1(9, 2), TRUE, TRUE); /* 2..10 turns */ } /* were-creature (even you) summons a horde */