]> granicus.if.org Git - nethack/commitdiff
B07004 camera breaks on shade
authornethack.allison <nethack.allison>
Tue, 20 Aug 2002 00:03:17 +0000 (00:03 +0000)
committernethack.allison <nethack.allison>
Tue, 20 Aug 2002 00:03:17 +0000 (00:03 +0000)
doc/fixes34.1
src/uhitm.c

index ad948b72ac89d3829a06f2eec3c14097757c39cf..df228ce3d20dc81aacffd2684eb1d178547a9ece 100644 (file)
@@ -210,6 +210,7 @@ remove TIMED_DELAY from the features checked for version compatibility
 rolling boulder hitting monster stuck in pit should stop even when mon survives
 don't see chest trap gas colors while Blind
 adjust fruit name in potion juice messages if it has the form "foo of bar"
+wielded camera passes harmlessly through shade
 
 
 Platform- and/or Interface-Specific Fixes
index 0b0f62757423a8e05ea8581a663fa24dcaf05a45..29d881de153fccf9b6d41bc01417ef8878739da6 100644 (file)
@@ -519,6 +519,7 @@ int thrown;
        int wtype;
        struct obj *monwep;
        char yourbuf[BUFSZ];
+       char *unconventional = (char *)0;       /* substituted for word "attack" in msg */
 
        wakeup(mon);
        if(!obj) {      /* attack with bare hands */
@@ -684,10 +685,13 @@ int thrown;
                        break;
 #ifdef TOURIST
                    case EXPENSIVE_CAMERA:
-                       You("succeed in destroying %s camera.  Congratulations!",
-                           shk_your(yourbuf, obj));
-                       useup(obj);
-                       return(TRUE);
+                       if (mdat != &mons[PM_SHADE]) {
+                           You("succeed in destroying %s camera.  Congratulations!",
+                               shk_your(yourbuf, obj));
+                           useup(obj);
+                           return(TRUE);
+                       } else unconventional = "camera";
+                       break;
 #endif
                    case CORPSE:                /* fixed by polder@cs.vu.nl */
                        if (touch_petrifies(&mons[obj->corpsenm])) {
@@ -892,7 +896,8 @@ int thrown;
            tmp = 0;
            if (mdat == &mons[PM_SHADE]) {
                if (!hittxt) {
-                   Your("attack passes harmlessly through %s.",
+                   Your("%s passes harmlessly through %s.",
+                       unconventional ? unconventional : "attack",
                        mon_nam(mon));
                    hittxt = TRUE;
                }