]> granicus.if.org Git - nethack/commitdiff
autodig bit
authornethack.rankin <nethack.rankin>
Wed, 6 Feb 2002 07:04:34 +0000 (07:04 +0000)
committernethack.rankin <nethack.rankin>
Wed, 6 Feb 2002 07:04:34 +0000 (07:04 +0000)
src/hack.c

index f14753aa476c52c371dcce4f0e13c98943593393..8810578e4d793c3375647808e119de1550254e18 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)hack.c     3.4     2001/06/02      */
+/*     SCCS Id: @(#)hack.c     3.4     2002/02/05      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -544,8 +544,8 @@ boolean test_only;
        } else if (tunnels(youmonst.data) && !needspick(youmonst.data)) {
            /* Eat the rock. */
            if (!test_only && still_chewing(x,y)) return FALSE;
-       } else if (flags.autodig && !flags.run && !flags.nopick && uwep &&
-                  (uwep->otyp == PICK_AXE || uwep->otyp == DWARVISH_MATTOCK)) {
+       } else if (flags.autodig && !flags.run && !flags.nopick &&
+                  uwep && is_pick(uwep)) {
        /* MRKR: Automatic digging when wielding the appropriate tool */
            if (!test_only)
                use_pick_axe2(uwep);