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

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