]> granicus.if.org Git - nethack/commitdiff
fix #H4401 - grammar bug when hallucinating
authorPatR <rankin@nethack.org>
Fri, 17 Jun 2016 00:39:00 +0000 (17:39 -0700)
committerPatR <rankin@nethack.org>
Fri, 17 Jun 2016 00:39:00 +0000 (17:39 -0700)
  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.

doc/fixes36.1
src/mon.c

index 456c8772cbe5932e43074f3625560ffdc42a77e7..37ea2262cfebb6b8ea9553b313c44a4997b65e08 100644 (file)
@@ -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
index 26a75b31b0c607a01155b291c4d1ae543f2336d4..b194470f26798a7561f9a291f18d5b57beaea5fe 100644 (file)
--- 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)) {