mon->mhpmax sanity check

The check for mon's max HP being at least as high as its level
turns out to be wishful thinking.  Just disable it.  Maybe we'll
flag critters who got or gave up HP during cloning and let them be
exceptions, then turn it back on, but not now.  Or maybe reduce
mon->m_lev when cloning.  That would weaken them though.

Keep the 1 extra HP that an earlier fix for this check gave to
monsters who rolled the minimum possible value while being created
(Nd8 that yielded N boosted to N+1, 1d4 for 1 boosted to 2).
This commit is contained in:
PatR
2020-08-01 05:11:20 -07:00
parent 308e7ededd
commit 9cb3fa9cf2
2 changed files with 10 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.266 $ $NHDT-Date: 1596236728 2020/07/31 23:05:28 $
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.267 $ $NHDT-Date: 1596283876 2020/08/01 12:11:16 $
General Fixes and Modified Features
-----------------------------------
@@ -303,6 +303,7 @@ if a monster removed a corpse from an ice box, the corpse would never rot away
monster creation on quest levels could make genocided creatures
enabling wizard mode 'sanity_check' option would complain about invalid mhpmax
value for level N monsters created with a d8 value of 1 for all N d8's
disable that extra check because gremlim HP split after cloning triggers it
some versions of tiles processing (not X11's) complained about the rename of
"{acid,blinding} venom" to "splash of {acid,blinding} venom"

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mon.c $NHDT-Date: 1594771374 2020/07/15 00:02:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.341 $ */
/* NetHack 3.6 mon.c $NHDT-Date: 1596283876 2020/08/01 12:11:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.342 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -56,6 +56,12 @@ const char *msg;
mtmp->mnum, mndx, msg);
mtmp->mnum = mndx;
}
#if 0 /*
* Gremlims don't obey the (mhpmax >= m_lev) rule so disable
* this check, at least for the time being. We could skip it
* when the cloned flag is set, but the original gremlim would
* still be an issue.
*/
/* check before DEADMONSTER() because dead monsters should still
have sane mhpmax */
if (mtmp->mhpmax < 1
@@ -66,6 +72,7 @@ const char *msg;
msg, (int) mtmp->m_lev,
mtmp->m_id, fmt_ptr((genericptr_t) mtmp),
mtmp->mhp, mtmp->mhpmax);
#endif
if (DEADMONSTER(mtmp)) {
#if 0
/* bad if not fmons list or if not vault guard */