more thitu() and Half_physical_damage

As commented in:
https://github.com/NetHack/NetHack/issues/1459#issuecomment-4280354364

This also fixes a minor typo in the related doc/fixes3-7-0.txt paragraph.
This commit is contained in:
nhmall
2026-04-21 05:40:52 -04:00
parent 32acb80174
commit 0ef54e364e
2 changed files with 4 additions and 3 deletions

View File

@@ -2203,7 +2203,7 @@ mounted hero was able to deliver joust hits when trapped
timer sanity check for melting ice gave false complaint about non-ice for timer sanity check for melting ice gave false complaint about non-ice for
frozen moat under open drawbridge frozen moat under open drawbridge
mhitm_ad_phys() was not applying Half_physical_damage when hero was target mhitm_ad_phys() was not applying Half_physical_damage when hero was target
callers of thitu() were not applyibg Half_physical_damage either callers of thitu() were not applying Half_physical_damage either
throwing crystal plate mail or helm of brilliance up against the ceiling could throwing crystal plate mail or helm of brilliance up against the ceiling could
result in the item being cracked and then vanishing result in the item being cracked and then vanishing
yn_function (used all over the place) sometimes triggered an impossible() yn_function (used all over the place) sometimes triggered an impossible()

View File

@@ -737,7 +737,8 @@ m_throw(
hitv += 8 + singleobj->spe; hitv += 8 + singleobj->spe;
if (dam < 1) if (dam < 1)
dam = 1; dam = 1;
hitu = thitu(hitv, dam, &singleobj, (char *) 0); hitu = thitu(hitv, Maybe_Half_Phys(dam),
&singleobj, (char *) 0);
} }
} }
if (hitu && singleobj->opoisoned && is_poisonable(singleobj)) { if (hitu && singleobj->opoisoned && is_poisonable(singleobj)) {
@@ -1233,7 +1234,7 @@ thrwmu(struct monst *mtmp)
if (dam < 1) if (dam < 1)
dam = 1; dam = 1;
(void) thitu(hitv, dam, &otmp, (char *) 0); (void) thitu(hitv, Maybe_Half_Phys(dam), &otmp, (char *) 0);
stop_occupation(); stop_occupation();
return; return;
} else if ((arw = autoreturn_weapon(otmp)) != 0 && !mwelded(otmp)) { } else if ((arw = autoreturn_weapon(otmp)) != 0 && !mwelded(otmp)) {