]> granicus.if.org Git - nethack/commitdiff
Zapping wand of opening at yourself, unlock carried boxes
authorPasi Kallinen <paxed@alt.org>
Wed, 6 Jan 2016 12:17:11 +0000 (14:17 +0200)
committerPasi Kallinen <paxed@alt.org>
Wed, 6 Jan 2016 12:17:11 +0000 (14:17 +0200)
doc/fixes36.1
src/zap.c

index 7fd5aec74ab54438a776c121abe1876d37397805..88bbeecb73b3a754b85d01b7bad15a6ec1374d53 100644 (file)
@@ -95,6 +95,7 @@ redraw map when hilite_pile is toggled to display the highlighting
 make commands that accept a count prefix for item selection
        show "Count:" like command repeating does
 allow picking a used inventory letter from menu when #adjusting
+zapping wand of opening at yourself, unlock carried boxes
 
 
 Platform- and/or Interface-Specific Fixes
index 677921c2e5d81e1d6217a15c0ac9bb58971f8b45..3295e690a6be4a4053a267a9b2f2d5314b734a88 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -2368,7 +2368,13 @@ boolean ordinary;
         }
         if (u.utrap) { /* escape web or bear trap */
             (void) openholdingtrap(&youmonst, &learn_it);
-        } else { /* trigger previously escaped trapdoor */
+        } else {
+            struct obj *otmp;
+            /* unlock carried boxes */
+            for (otmp = invent; otmp; otmp = otmp->nobj)
+                if (Is_box(otmp))
+                    (void) boxlock(otmp, obj);
+            /* trigger previously escaped trapdoor */
             (void) openfallingtrap(&youmonst, TRUE, &learn_it);
         }
         break;