From: PatR Date: Fri, 17 Jun 2016 00:39:00 +0000 (-0700) Subject: fix #H4401 - grammar bug when hallucinating X-Git-Tag: NetHack-3.6.1_RC01~669 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c8a359feba96fdc0eb9730201f93d94624518d9;p=nethack fix #H4401 - grammar bug when hallucinating You kill poor goblin. "poor" implies a pet; pet has a name; "the" is omitted for named creature; hallucination suppresses name, so "the" needs to be reinstated. You kill the poor goblin. --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 456c8772c..37ea2262c 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -186,6 +186,7 @@ wand/spell/breath zaps that reached the edge of the level on the Plane of Air stop amulets and other items which aren't affected by erosion damage from being subjected to erosion damage grammar bit: polyself w/ gender change yielded "you turn into a Elvenking" +grammar bit when hallucinating: "you kill poor goblin" ('the' missing for pet) some blindness cures ignored u.ucreamed some instances of stun or confusion timers were being overridden rather than incremented when new stun or confusion damage was suffered diff --git a/src/mon.c b/src/mon.c index 26a75b31b..b194470f2 100644 --- a/src/mon.c +++ b/src/mon.c @@ -2183,14 +2183,16 @@ int xkill_flags; /* 1: suppress message, 2: suppress corpse, 4: pacifist */ if (!noconduct) /* KMH, conduct */ u.uconduct.killer++; - if (!nomsg) + if (!nomsg) { + boolean namedpet = has_mname(mtmp) && !Hallucination; + You("%s %s!", nonliving(mtmp->data) ? "destroy" : "kill", !(wasinside || canspotmon(mtmp)) ? "it" : !mtmp->mtame ? mon_nam(mtmp) - : x_monnam(mtmp, has_mname(mtmp) ? ARTICLE_NONE : ARTICLE_THE, - "poor", has_mname(mtmp) ? SUPPRESS_SADDLE : 0, - FALSE)); + : x_monnam(mtmp, namedpet ? ARTICLE_NONE : ARTICLE_THE, + "poor", namedpet ? SUPPRESS_SADDLE : 0, FALSE)); + } if (mtmp->mtrapped && (t = t_at(x, y)) != 0 && (t->ttyp == PIT || t->ttyp == SPIKED_PIT)) {