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.
This commit is contained in:
PatR
2016-06-16 17:39:00 -07:00
parent 1f4574b6c8
commit 2c8a359feb
2 changed files with 7 additions and 4 deletions

View 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

View File

@@ -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)) {