mirror vs looking glass

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.
This commit is contained in:
nethack.rankin
2012-04-21 01:25:47 +00:00
parent 6f1df20db8
commit 8a288949d6

View 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*/