From: nethack.allison Date: Mon, 15 Sep 2003 03:49:28 +0000 (+0000) Subject: buglist: autodig X-Git-Tag: MOVE2GIT~1780 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4b37dde2833c08ce07880cae89a53997998c322;p=nethack buglist: autodig > Would it be possible to make autodig also dig downward > when I press '>' while wielding an pick-axe? When digging for gold, > after casting detect objects, this would be convenient for getting > to buried gold and gems. > [] --- diff --git a/doc/fixes34.3 b/doc/fixes34.3 index e459b02d8..27dab1b01 100644 --- a/doc/fixes34.3 +++ b/doc/fixes34.3 @@ -36,6 +36,7 @@ win32gui: you couldn't specify an alignment in defaults.nh and have it stick General New Features -------------------- bones file compatibility info is now written into the dat/options file +extend autodig to work downwards via '>' Platform- and/or Interface-Specific New Features diff --git a/src/do.c b/src/do.c index 939356cf4..4b07de7cf 100644 --- a/src/do.c +++ b/src/do.c @@ -760,8 +760,14 @@ dodown() if (!(trap = t_at(u.ux,u.uy)) || (trap->ttyp != TRAPDOOR && trap->ttyp != HOLE) || !Can_fall_thru(&u.uz) || !trap->tseen) { - You_cant("go down here."); - return(0); + + if (flags.autodig && !flags.nopick && + uwep && is_pick(uwep)) { + return use_pick_axe2(uwep); + } else { + You_cant("go down here."); + return(0); + } } } if(u.ustuck) {