-$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.35 $ $NHDT-Date: 1577190687 2019/12/24 12:31:27 $
+$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.39 $ $NHDT-Date: 1577662238 2019/12/29 23:30:38 $
General Fixes and Modified Features
-----------------------------------
worn +0 ring of protection should cause increased hunger if it is the only
source of extrinsic Protection
fix accessing mons[-1] when monster figures out if a tin cures stoning
+monster wielding Stormbringer or healer's Staff against another monster would
+ heal the hero instead of the wielding monster when draining life
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
-/* NetHack 3.6 artifact.c $NHDT-Date: 1553363416 2019/03/23 17:50:16 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.129 $ */
+/* NetHack 3.6 artifact.c $NHDT-Date: 1577662239 2019/12/29 23:30:39 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.152 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
*dmgptr = 0;
return TRUE;
}
- if (noncorporeal(g.youmonst.data) || amorphous(g.youmonst.data)) {
+ if (noncorporeal(g.youmonst.data)
+ || amorphous(g.youmonst.data)) {
pline("%s slices through your %s.", wepdesc,
body_part(NECK));
return TRUE;
mon_nam(mdef));
}
if (mdef->m_lev == 0) {
+ /* losing a level when at 0 is fatal */
*dmgptr = 2 * mdef->mhp + FATAL_DAMAGE_MODIFIER;
} else {
int drain = monhp_per_lvl(mdef);
mdef->mhpmax -= drain;
mdef->m_lev--;
drain /= 2;
- if (drain)
- healup(drain, 0, FALSE, FALSE);
+ if (drain) {
+ /* attacker heals in proportion to amount drained */
+ if (youattack) {
+ healup(drain, 0, FALSE, FALSE);
+ } else {
+ magr->mhp += drain;
+ if (magr->mhp > magr->mhpmax)
+ magr->mhp = magr->mhpmax;
+ }
+ }
}
return vis;
} else { /* youdefend */