]> granicus.if.org Git - nethack/commitdiff
fix #H4383 - blasted twice by Excalibur
authorPatR <rankin@nethack.org>
Thu, 9 Jun 2016 18:42:34 +0000 (11:42 -0700)
committerPatR <rankin@nethack.org>
Thu, 9 Jun 2016 18:42:34 +0000 (11:42 -0700)
...when alignment was toggled by helm of opposite alignment.  The
touch/retouch code is quite convoluted, but I think this simple
change is the right fix.

doc/fixes36.1
src/artifact.c

index 1ebb8fdf5355f6be36d7e4a1c61f2cf6c8dfb091..7a87418db9e68e72b2aa5a46486b106d3b40c191 100644 (file)
@@ -286,6 +286,8 @@ show in inventory which monster a leash is attached to
 using /? to look up something by name, supplying multiple spaces (with no
        other characters) as the name triggered impossible "singular of null?"
 add support for the 'altmeta' option to the 'what-does' command ('&' or '?f')
+when wielded weapon becomes untouchable (after alignment change or polymorph)
+       hero could be 'blasted by its power' twice in succession
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
index 39525b8d04d47ef06596de69e1fb7d00ca54ccd2..113843e789f3438ebb0231fe981efcc0fe2e68b2 100644 (file)
@@ -1888,7 +1888,7 @@ boolean loseit;    /* whether to drop it if hero can longer touch it */
                 bane = bane_applies(get_artifact(obj), &youmonst);
 
         /* nothing else to do if hero can successfully handle this object */
-        if (!ag && !bane)
+        if (!ag && !bane && !touch_blasted)
             return 1;
 
         /* hero can't handle this object, but didn't get touch_artifact()'s