When a monster hit hero with an artifact with drain-life attack
(Stormbringer or The Staff of Aesculapius), and hero lost a level
and hero had more max hp in the lower xp level, the math made the
attacker lose hp. This could put the monster hp in the negative,
causing "dmonsfree: 1 removed doesn't match 0 pending"
}
losexp("life drainage");
if (magr && magr->mhp < magr->mhpmax) {
- magr->mhp += (oldhpmax - u.uhpmax + 1) / 2;
+ magr->mhp += (abs(oldhpmax - u.uhpmax) + 1) / 2;
if (magr->mhp > magr->mhpmax)
magr->mhp = magr->mhpmax;
}