digging land mines sequel (trunk only)

Axes can't dig through the floor, but attempting to dig down with one
shouldn't just "scratch the floor" if there is an armed land mine present.
Have it set off a land mine or bear trap, in addition to the possibility
of chopping your way out of being stuck in a bear trap (a recent change).
This commit is contained in:
nethack.rankin
2006-04-22 04:39:17 +00:00
parent 0478af02b8
commit 234fe26ab1

View File

@@ -1108,8 +1108,10 @@ struct obj *obj;
/* might escape trap and still be teetering at brink */
if (!u.utrap) cant_reach_floor(u.ux, u.uy, FALSE, TRUE);
} else if (!ispick &&
/* can only dig down with an axe if stuck in a bear trap */
(!trap || !u.utrap || u.utraptype != TT_BEARTRAP)) {
/* can only dig down with an axe when doing so will
trigger or disarm a trap here */
(!trap || (trap->ttyp != LANDMINE &&
trap->ttyp != BEAR_TRAP))) {
pline("%s merely scratches the %s.",
Yobjnam2(obj, (char *)0), surface(u.ux,u.uy));
u_wipe_engr(3);