]> granicus.if.org Git - nethack/commitdiff
Fix: 'you owe It for goods lost'
authorMichael Meyer <me@entrez.cc>
Wed, 1 Dec 2021 14:31:31 +0000 (09:31 -0500)
committerPatR <rankin@nethack.org>
Thu, 2 Dec 2021 02:34:20 +0000 (18:34 -0800)
Some messages about owing a shopkeeper money would use 'it' when blind,
with weird results such as "You owe It 267 zorkmids for goods lost."  It
seems maybe like these were missed in 6591f8b since they were outside of
shk.c/shknam.c.  Bring those messages into alignment with most other
shopkeeper-related messages, which use the shopkeeper's name even if the
hero is blind or can't see them at the moment.

Some of the 'it gets angry' ones don't seem so bad, but similar 'gets
angry' messages in shk.c use Shknam so I changed those as well for
consistency's sake.

src/dig.c
src/dokick.c
src/zap.c

index 8a38f71db01825f1b0e6b16759e686bc00c74992..1ed57b42851143996cbd7845d43b91e9d3b9771c 100644 (file)
--- a/src/dig.c
+++ b/src/dig.c
@@ -1912,7 +1912,7 @@ bury_objs(int x, int y)
     newsym(x, y);
 
     if (costly && loss) {
-        You("owe %s %ld %s for burying merchandise.", mon_nam(shkp), loss,
+        You("owe %s %ld %s for burying merchandise.", shkname(shkp), loss,
             currency(loss));
     }
 }
index b55395dcb8ffd0885b5b73a67447b844caf3c087..25026d5e6a6e5ca79f89af85351e36c7d63902ef 100644 (file)
@@ -434,7 +434,7 @@ container_impact_dmg(struct obj *obj, xchar x,
             You("caused %ld %s worth of damage!", loss, currency(loss));
             make_angry_shk(shkp, x, y);
         } else {
-            You("owe %s %ld %s for objects destroyed.", mon_nam(shkp), loss,
+            You("owe %s %ld %s for objects destroyed.", shkname(shkp), loss,
                 currency(loss));
         }
     }
@@ -1459,7 +1459,7 @@ impact_drop(struct obj *missile, /* caused impact, won't drop itself */
                 if (ESHK(shkp)->customer[0] == 0)
                     (void) strncpy(ESHK(shkp)->customer, g.plname, PL_NSIZ);
                 if (angry)
-                    pline("%s is infuriated!", Monnam(shkp));
+                    pline("%s is infuriated!", Shknam(shkp));
                 else
                     pline("\"%s, you are a thief!\"", g.plname);
             } else
@@ -1470,7 +1470,7 @@ impact_drop(struct obj *missile, /* caused impact, won't drop itself */
         }
         if (ESHK(shkp)->debit > debit) {
             long amt = (ESHK(shkp)->debit - debit);
-            You("owe %s %ld %s for goods lost.", Monnam(shkp), amt,
+            You("owe %s %ld %s for goods lost.", shkname(shkp), amt,
                 currency(amt));
         }
     }
index 0ae62798d34c91949864293f3b9c4108065eabbd..96ea5de3fa05165682e3bf39e52999fa2bc9a45f 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -1814,11 +1814,11 @@ poly_obj(struct obj *obj, int id)
                     && !costly_spot(u.ux, u.uy)) {
                     make_angry_shk(shkp, ox, oy);
                 } else {
-                    pline("%s gets angry!", Monnam(shkp));
+                    pline("%s gets angry!", Shknam(shkp));
                     hot_pursuit(shkp);
                 }
             } else
-                Norep("%s is furious!", Monnam(shkp));
+                Norep("%s is furious!", Shknam(shkp));
         }
     }
     delobj(obj);