From: nethack.rankin Date: Sat, 5 Oct 2002 06:44:00 +0000 (+0000) Subject: fix B13007 - wrong article on hallucinogen-distorted ghost X-Git-Tag: MOVE2GIT~2391 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c0516ce1e0f976f9070b10cc4b41a8fffb3f09e;p=nethack fix B13007 - wrong article on hallucinogen-distorted ghost "Killed by _the_ hallucination-distorted ghost of Foo." Similar for invisible; ordinary ghosts already had "the" instead of "a". --- diff --git a/src/end.c b/src/end.c index d63a9aac6..246f6fc8c 100644 --- a/src/end.c +++ b/src/end.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)end.c 3.4 2002/08/22 */ +/* SCCS Id: @(#)end.c 3.4 2002/10/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -197,18 +197,19 @@ register struct monst *mtmp; Strcat(buf, "the "); killer_format = KILLED_BY; } + /* _the_ ghost of Dudley */ + if (mtmp->data == &mons[PM_GHOST] && mtmp->mnamelth) { + Strcat(buf, "the "); + killer_format = KILLED_BY; + } if (mtmp->minvis) Strcat(buf, "invisible "); if (distorted) Strcat(buf, "hallucinogen-distorted "); if(mtmp->data == &mons[PM_GHOST]) { - char *gn = NAME(mtmp); - if (!distorted && !mtmp->minvis && *gn) { - Strcat(buf, "the "); - killer_format = KILLED_BY; - } - Sprintf(eos(buf), (*gn ? "ghost of %s" : "ghost%s"), gn); + Strcat(buf, "ghost"); + if (mtmp->mnamelth) Sprintf(eos(buf), " of %s", NAME(mtmp)); } else if(mtmp->isshk) { Sprintf(eos(buf), "%s %s, the shopkeeper", (mtmp->female ? "Ms." : "Mr."), shkname(mtmp));