]> granicus.if.org Git - nethack/commitdiff
B01011 can't #untrap container on trap
authornethack.allison <nethack.allison>
Sun, 30 Jun 2002 21:02:55 +0000 (21:02 +0000)
committernethack.allison <nethack.allison>
Sun, 30 Jun 2002 21:02:55 +0000 (21:02 +0000)
A chest on a [known] trapped square cannot be untrapped--game
will always attempt to disarm the trap on the square.

doc/fixes34.1
src/trap.c

index 14fa5185f78a7b0e88945b266593a8f90f7fbd8d..2d899581c4ac02986152eddfe18cd6cf4c689cac 100644 (file)
@@ -130,6 +130,7 @@ GOLDOBJ: don't call money2mon with 0 zero when killed by shopkeeper
 headstone writing was using the adjective "weird" when engraving with a wand 
        of digging.
 don't report "you were riding" if you die as a result of dismounting
+allow #untrapping of chests that are co-located with floor traps and hero
 
 
 Platform- and/or Interface-Specific Fixes
index e7d229fb1e7500988162f07c0d46a9ff9cf46a9c..d5cc2adf10742034c996018bc199fb1d2b6904ee 100644 (file)
@@ -3135,7 +3135,13 @@ boolean force;
                        You("cannot deal with traps while trapped!");
                        return 1;
                }
-               switch(ttmp->ttyp) {
+               There("is %s here.", an(defsyms[trap_to_defsym(ttmp->ttyp)].explanation));
+
+               switch (ynq(ttmp->ttyp == WEB ? "Remove it?" : "Disarm it?")) {
+                 case 'q': return(0);
+                 case 'n': trap_skipped = TRUE; break;
+                 case 'y':
+                   switch(ttmp->ttyp) {
                        case BEAR_TRAP:
                        case WEB:
                                return disarm_holdingtrap(ttmp);
@@ -3161,7 +3167,8 @@ boolean force;
                        default:
                                You("cannot disable %s trap.", (u.dx || u.dy) ? "that" : "this");
                                return 0;
-               } /* end switch */
+                   }
+               }
        } /* end if */
 
        if(!u.dx && !u.dy) {