git issue #994 - killed by a touch of death

Issue reported by vultur-cadens:  cause of death reason for touch
of death and death due to loss of strength only showed the cause,
not the monster spellcaster who was responsible.

This changes
|Killed by a touch of death.
to
|Killed by the touch of death inflicted by the Wizard of Yendor.
and
|Killed by terminal fraility.
to
|Killed by strength loss inflicted by a chameleon imitating an arch-lich.
(The 'imitating' part doesn't fit on the tombstone but will be present
in logfile/xlogfile.)

Noticed while implemented this:  touch of death was modifying u.uhpmax
and basing death vs damage on that even when hero was polymorphed.
It now rehumanizes the hero in that situation.

Closes #994
This commit is contained in:
PatR
2023-03-05 15:11:25 -08:00
parent f6562f39b7
commit b3d5158e64
6 changed files with 72 additions and 22 deletions

View File

@@ -3477,8 +3477,10 @@ mhitm_ad_pest(struct monst *magr, struct attack *mattk,
}
void
mhitm_ad_deth(struct monst *magr, struct attack *mattk UNUSED,
struct monst *mdef, struct mhitm_data *mhm)
mhitm_ad_deth(
struct monst *magr,
struct attack *mattk UNUSED,
struct monst *mdef, struct mhitm_data *mhm)
{
struct permonst *pd = mdef->data;
@@ -3501,7 +3503,7 @@ mhitm_ad_deth(struct monst *magr, struct attack *mattk UNUSED,
case 18:
case 17:
if (!Antimagic) {
touch_of_death();
touch_of_death(magr);
mhm->damage = 0;
return;
}