From: Pasi Kallinen Date: Wed, 6 Jan 2016 12:17:11 +0000 (+0200) Subject: Zapping wand of opening at yourself, unlock carried boxes X-Git-Tag: NetHack-3.6.1_RC01~1064^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72f55fedb554102a7d8aacb2bb214972a810788c;p=nethack Zapping wand of opening at yourself, unlock carried boxes --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 7fd5aec74..88bbeecb7 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -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 diff --git a/src/zap.c b/src/zap.c index 677921c2e..3295e690a 100644 --- 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;