killer messages

Incorporate various killer message grammar fixes suggested by <Someone>.
Mostly these deal with using the proper killer_format and prefix ("the" or
no "the") for unique and type_is_pname monsters, or death to to eating
their corpses.
One case is handled by a general fix to name_to_mon to allow it to deal
with "Croesus' corpse".
The pre-3.4.1 topten behavior for "starved to death" messages is also restored.
This commit is contained in:
cohrs
2003-09-25 16:56:56 +00:00
parent db011864c0
commit 4375fc7846
6 changed files with 26 additions and 16 deletions

View File

@@ -1995,11 +1995,12 @@ int typ, fatal;
return;
}
/* suppress killer prefix if it already has one */
if (!strncmpi(pname, "the ", 4) ||
!strncmpi(pname, "an ", 3) ||
!strncmpi(pname, "a ", 2) ||
/* ... or if it seems to be a proper name */
isupper(*pname)) {
if ((i = name_to_mon(pname)) >= LOW_PM && mons[i].geno & G_UNIQ) {
kprefix = KILLED_BY;
if (!type_is_pname(&mons[i])) pname = the(pname);
} else if (!strncmpi(pname, "the ", 4) ||
!strncmpi(pname, "an ", 3) ||
!strncmpi(pname, "a ", 2)) {
/*[ does this need a plural check too? ]*/
kprefix = KILLED_BY;
}