From 234fe26ab1ae9d2efd1243484bd7e048e83b16a6 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Sat, 22 Apr 2006 04:39:17 +0000 Subject: [PATCH] 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). --- src/dig.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dig.c b/src/dig.c index 2f949923e..44bcc7fce 100644 --- a/src/dig.c +++ b/src/dig.c @@ -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); -- 2.40.0