-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.348 $ $NHDT-Date: 1604620981 2020/11/06 00:03:01 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.349 $ $NHDT-Date: 1604880453 2020/11/09 00:07:33 $
General Fixes and Modified Features
-----------------------------------
can explicitly eat them via 'e' after moving onto their spot
monster hiding under an egg that hatched was kept hidden
restful sleep regenerates hit points
+attacking non-adjacent concealed mimic by applying a polearm would make the
+ hero be stuck to that mimic
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
-/* NetHack 3.7 mon.c $NHDT-Date: 1600933441 2020/09/24 07:44:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.348 $ */
+/* NetHack 3.7 mon.c $NHDT-Date: 1604880454 2020/11/09 00:07:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.351 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
set_ustuck(mtmp)
struct monst *mtmp;
{
+ if (iflags.sanity_check || iflags.debug_fuzzer) {
+ if (mtmp && distu(mtmp->mx, mtmp->my) > 2)
+ impossible("Sticking to %s at distu %d?",
+ mon_nam(mtmp), distu(mtmp->mx, mtmp->my));
+ }
+
g.context.botl = 1;
u.ustuck = mtmp;
}
-/* NetHack 3.7 uhitm.c $NHDT-Date: 1596498221 2020/08/03 23:43:41 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.240 $ */
+/* NetHack 3.7 uhitm.c $NHDT-Date: 1604880456 2020/11/09 00:07:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.242 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
/* if it was an invisible mimic, treat it as if we stumbled
* onto a visible mimic
*/
- if (M_AP_TYPE(mtmp) && !Protection_from_shape_changers
- /* applied pole-arm attack is too far to get stuck */
- && distu(mtmp->mx, mtmp->my) <= 2) {
- if (!u.ustuck && !mtmp->mflee && dmgtype(mtmp->data, AD_STCK))
+ if (M_AP_TYPE(mtmp) && !Protection_from_shape_changers) {
+ if (!u.ustuck && !mtmp->mflee && dmgtype(mtmp->data, AD_STCK)
+ /* applied pole-arm attack is too far to get stuck */
+ && distu(mtmp->mx, mtmp->my) <= 2)
set_ustuck(mtmp);
}
/* #H7329 - if hero is on engraved "Elbereth", this will end up
break;
}
case AD_STCK:
- if (!negated && !sticks(pd))
+ if (!negated && !sticks(pd) && distu(mdef->mx, mdef->my) <= 2)
u.ustuck = mdef; /* it's now stuck to you */
break;
case AD_WRAP:
{
const char *fmt = "Wait! That's %s!", *generic = "a monster", *what = 0;
- if (!u.ustuck && !mtmp->mflee && dmgtype(mtmp->data, AD_STCK))
+ if (!u.ustuck && !mtmp->mflee && dmgtype(mtmp->data, AD_STCK)
+ /* must be adjacent; attack via polearm could be from farther away */
+ && distu(mtmp->mx, mtmp->my) <= 2)
set_ustuck(mtmp);
if (Blind) {