]> granicus.if.org Git - nethack/commitdiff
poisoning prefix
authornethack.rankin <nethack.rankin>
Tue, 20 May 2003 07:33:30 +0000 (07:33 +0000)
committernethack.rankin <nethack.rankin>
Tue, 20 May 2003 07:33:30 +0000 (07:33 +0000)
     Fix a recent killer prefix fix....

src/mon.c

index d49b801dad02521e1f70ff88307b57cf48098736..669466c74cfdfcb53295ce40b25bfdcb88e87d97 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -1979,9 +1979,15 @@ int  typ, fatal;
                pline_The("poison doesn't seem to affect you.");
                return;
        }
+       /* suppress killer prefix if it already has one */
        if (!strncmpi(pname, "the ", 4) ||
                !strncmpi(pname, "an ", 3) ||
-               !strncmpi(pname, "a ", 2)) kprefix = KILLED_BY_AN;
+               !strncmpi(pname, "a ", 2) ||
+           /* ... or if it seems to be a proper name */
+               isupper(*pname)) {
+           /*[ does this need a plural check too? ]*/
+           kprefix = KILLED_BY;
+       }
        i = rn2(fatal + 20*thrown_weapon);
        if(i == 0 && typ != A_CHA) {
                u.uhp = -1;