B01011 can't #untrap container on trap

A chest on a [known] trapped square cannot be untrapped--game
	will always attempt to disarm the trap on the square.
This commit is contained in:
nethack.allison
2002-06-30 21:02:55 +00:00
parent c20cc0eb77
commit 2c4306b4f9
2 changed files with 10 additions and 2 deletions

View 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

View 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) {