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:
@@ -1254,6 +1254,10 @@ rehumanize(void)
|
||||
gk.killer.format = NO_KILLER_PREFIX;
|
||||
Strcpy(gk.killer.name, "killed while stuck in creature form");
|
||||
done(DIED);
|
||||
/* can get to here if declining to die in explore or wizard
|
||||
mode; since we're wearing an amulet of unchanging we can't
|
||||
be wearing an amulet of life-saving */
|
||||
return; /* don't rehumanize after all */
|
||||
} else if (uamul && uamul->otyp == AMULET_OF_UNCHANGING) {
|
||||
Your("%s %s!", simpleonames(uamul), otense(uamul, "fail"));
|
||||
uamul->dknown = 1;
|
||||
@@ -1274,7 +1278,8 @@ rehumanize(void)
|
||||
/* can only happen if some bit of code reduces u.uhp
|
||||
instead of u.mh while poly'd */
|
||||
Your("old form was not healthy enough to survive.");
|
||||
Sprintf(gk.killer.name, "reverting to unhealthy %s form", gu.urace.adj);
|
||||
Sprintf(gk.killer.name, "reverting to unhealthy %s form",
|
||||
gu.urace.adj);
|
||||
gk.killer.format = KILLED_BY;
|
||||
done(DIED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user