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:
@@ -221,7 +221,8 @@ choke(food) /* To a full belly all food is bad. (It.) */
|
||||
killer = food_xname(food, FALSE);
|
||||
if (food->otyp == CORPSE &&
|
||||
(mons[food->corpsenm].geno & G_UNIQ)) {
|
||||
killer = the(killer);
|
||||
if (!type_is_pname(&mons[food->corpsenm]))
|
||||
killer = the(killer);
|
||||
killer_format = KILLED_BY;
|
||||
}
|
||||
}
|
||||
|
||||
11
src/mhitu.c
11
src/mhitu.c
@@ -1151,8 +1151,17 @@ dopois:
|
||||
&& !(poly_when_stoned(youmonst.data) &&
|
||||
polymon(PM_STONE_GOLEM))) {
|
||||
Stoned = 5;
|
||||
killer_format = KILLED_BY_AN;
|
||||
delayed_killer = mtmp->data->mname;
|
||||
if (mtmp->data->geno & G_UNIQ) {
|
||||
if (!type_is_pname(mtmp->data)) {
|
||||
static char buf[BUFSZ];
|
||||
|
||||
/* "the" buffer may be reallocated */
|
||||
Strcpy(buf, the(delayed_killer));
|
||||
delayed_killer = buf;
|
||||
}
|
||||
killer_format = KILLED_BY;
|
||||
} else killer_format = KILLED_BY_AN;
|
||||
return(1);
|
||||
/* You("turn to stone..."); */
|
||||
/* done_in_by(mtmp); */
|
||||
|
||||
11
src/mon.c
11
src/mon.c
@@ -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;
|
||||
}
|
||||
|
||||
@@ -468,6 +468,10 @@ const char *in_str;
|
||||
(str[m_i_len] == ' ' ||
|
||||
!strcmpi(&str[m_i_len], "s") ||
|
||||
!strncmpi(&str[m_i_len], "s ", 2) ||
|
||||
!strcmpi(&str[m_i_len], "'") ||
|
||||
!strncmpi(&str[m_i_len], "' ", 2) ||
|
||||
!strcmpi(&str[m_i_len], "'s") ||
|
||||
!strncmpi(&str[m_i_len], "'s ", 3) ||
|
||||
!strcmpi(&str[m_i_len], "es") ||
|
||||
!strncmpi(&str[m_i_len], "es ", 3))) {
|
||||
mntmp = i;
|
||||
|
||||
@@ -246,16 +246,11 @@ nh_timeout()
|
||||
if ((m_idx = name_to_mon(killer)) >= LOW_PM) {
|
||||
if (type_is_pname(&mons[m_idx])) {
|
||||
killer_format = KILLED_BY;
|
||||
}
|
||||
#if 0 /* at present, there aren't any monster
|
||||
poisoners with titles rather than names */
|
||||
else if (mons[m_idx].geno & G_UNIQ) {
|
||||
char buf[BUFSZ];
|
||||
Sprintf(buf, "the %s", killer);
|
||||
Strcpy(u.usick_cause, buf);
|
||||
} else if (mons[m_idx].geno & G_UNIQ) {
|
||||
killer = the(killer);
|
||||
Strcpy(u.usick_cause, killer);
|
||||
killer_format = KILLED_BY;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
u.usick_type = 0;
|
||||
done(POISONING);
|
||||
|
||||
@@ -595,7 +595,7 @@ boolean so;
|
||||
if (!strncmp(t1->death, "quit", 4)) {
|
||||
Strcat(linebuf, "quit");
|
||||
second_line = FALSE;
|
||||
} else if (!strncmp(t1->death, "starv", 5)) {
|
||||
} else if (!strncmp(t1->death, "died of st", 10)) {
|
||||
Strcat(linebuf, "starved to death");
|
||||
second_line = FALSE;
|
||||
} else if (!strncmp(t1->death, "choked", 6)) {
|
||||
|
||||
Reference in New Issue
Block a user