]> granicus.if.org Git - nethack/commitdiff
another grammar bit
authorcohrs <cohrs>
Sun, 25 May 2003 23:21:20 +0000 (23:21 +0000)
committercohrs <cohrs>
Sun, 25 May 2003 23:21:20 +0000 (23:21 +0000)
My e-mail archive shows this was originally reported as one of several
items in R871.  Clean up a hit message when wielding cream pies.

src/uhitm.c

index bb0454c862b1cc16792212526b5cab7fbe78bdf9..7027ab05b4adae73cc62cb5d49f9b1e8563e73b0 100644 (file)
@@ -839,12 +839,16 @@ int thrown;
                                          mon->mcansee ? "" : " further");
                            } else {
                                char *whom = mon_nam(mon);
+                               char *what = The(xname(obj));
+                               if (!thrown && obj->quan > 1)
+                                   what = An(singular(obj, xname));
                                /* note: s_suffix returns a modifiable buffer */
                                if (haseyes(mdat)
                                    && mdat != &mons[PM_FLOATING_EYE])
-                                   whom = strcat(s_suffix(whom), " face");
-                               pline_The("%s splashes over %s!",
-                                         xname(obj), whom);
+                                   whom = strcat(strcat(s_suffix(whom), " "),
+                                                 mbodypart(mon, FACE));
+                               pline("%s %s over %s!",
+                                     what, vtense(what, "splash"), whom);
                            }
                            setmangry(mon);
                            mon->mcansee = 0;