B09001 - mhp > mhpmax after life drain
A monster hit by Stormbringer could take less damage to current HP than it took to max HP if attacker had sufficient penalties, so end up being healthier than its new maximum. This only applies to attacks by the player; attacks by monsters don't include the sorts of modifiers that can trigger it.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)uhitm.c 3.4 2002/02/17 */
|
||||
/* SCCS Id: @(#)uhitm.c 3.4 2002/08/21 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -932,7 +932,10 @@ int thrown;
|
||||
}
|
||||
|
||||
mon->mhp -= tmp;
|
||||
if(mon->mhp < 1)
|
||||
/* adjustments might have made tmp become less than what
|
||||
a level draining artifact has already done to max HP */
|
||||
if (mon->mhp > mon->mhpmax) mon->mhp = mon->mhpmax;
|
||||
if (mon->mhp < 1)
|
||||
destroyed = TRUE;
|
||||
if (mon->mtame && (!mon->mflee || mon->mfleetim) && tmp > 0) {
|
||||
abuse_dog(mon);
|
||||
|
||||
Reference in New Issue
Block a user