]> granicus.if.org Git - nethack/commitdiff
mirror vs looking glass
authornethack.rankin <nethack.rankin>
Sat, 21 Apr 2012 01:25:47 +0000 (01:25 +0000)
committernethack.rankin <nethack.rankin>
Sat, 21 Apr 2012 01:25:47 +0000 (01:25 +0000)
     People in the newsgroup are rehashing the entries on our bugs page
trying to figure out whether the bugs are still present in "NetHack 4",
and one is about messages for mirror actions which use hardcoded "mirror"
even when "looking glass" hasn't been discovered yet.  They mentioned
something for C343-118 (#M178, Sep 2005) which was overlooked:  wielded
mirror breaking when used to hit something.

src/uhitm.c

index dd7bb4247e829a8ec91cbde1ec517b07de72381a..568be33f831b9d1a17283f69ae4331a928194696 100644 (file)
@@ -563,8 +563,7 @@ int thrown;         /* HMON_xxx (0 => hand-to-hand, other => ranged) */
 #endif
        int wtype;
        struct obj *monwep;
-       char yourbuf[BUFSZ];
-       char unconventional[BUFSZ];     /* substituted for word "attack" in msg */
+       char unconventional[BUFSZ]; /* substituted for word "attack" in msg */
        char saved_oname[BUFSZ];
 
        unconventional[0] = '\0';
@@ -744,8 +743,8 @@ int thrown;         /* HMON_xxx (0 => hand-to-hand, other => ranged) */
                        break;
                    case MIRROR:
                        if (breaktest(obj)) {
-                           You("break %smirror.  That's bad luck!",
-                               shk_your(yourbuf, obj));
+                           You("break %s.  That's bad luck!",
+                               ysimple_name(obj));
                            change_luck(-2);
                            useup(obj);
                            obj = (struct obj *) 0;
@@ -757,8 +756,8 @@ int thrown;         /* HMON_xxx (0 => hand-to-hand, other => ranged) */
                        break;
 #ifdef TOURIST
                    case EXPENSIVE_CAMERA:
-                       You("succeed in destroying %scamera.  Congratulations!",
-                               shk_your(yourbuf, obj));
+                       You("succeed in destroying %s.  Congratulations!",
+                           ysimple_name(obj));
                        useup(obj);
                        return(TRUE);
                        /*NOTREACHED*/