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:
10
src/end.c
10
src/end.c
@@ -409,9 +409,8 @@ done_in_by(struct monst *mtmp, int how)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
struct permonst *mptr = mtmp->data,
|
||||
*champtr = ((mtmp->cham >= LOW_PM)
|
||||
? &mons[mtmp->cham]
|
||||
: mptr);
|
||||
*champtr = (mtmp->cham >= LOW_PM) ? &mons[mtmp->cham]
|
||||
: mptr;
|
||||
boolean distorted = (boolean) (Hallucination && canspotmon(mtmp)),
|
||||
mimicker = (M_AP_TYPE(mtmp) == M_AP_MONSTER),
|
||||
imitator = (mptr != champtr || mimicker);
|
||||
@@ -442,7 +441,7 @@ done_in_by(struct monst *mtmp, int how)
|
||||
if (imitator) {
|
||||
char shape[BUFSZ];
|
||||
const char *realnm = pmname(champtr, Mgender(mtmp)),
|
||||
*fakenm = pmname(mptr, Mgender(mtmp));
|
||||
*fakenm = pmname(mptr, Mgender(mtmp));
|
||||
boolean alt = is_vampshifter(mtmp);
|
||||
|
||||
if (mimicker) {
|
||||
@@ -498,7 +497,8 @@ done_in_by(struct monst *mtmp, int how)
|
||||
/* might need to fix up multi_reason if 'mtmp' caused the reason */
|
||||
if (gm.multi_reason
|
||||
&& gm.multi_reason > gm.multireasonbuf
|
||||
&& gm.multi_reason < gm.multireasonbuf + sizeof gm.multireasonbuf - 1) {
|
||||
&& gm.multi_reason
|
||||
< gm.multireasonbuf + sizeof gm.multireasonbuf - 1) {
|
||||
char reasondummy, *p;
|
||||
unsigned reasonmid = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user