From 75fed4b92b0921a44df7db89d74b11f21e1dfed6 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 21 Jan 2022 14:27:21 -0800 Subject: [PATCH] autodig '>' This fixes moving in direction '>' while wielding a pick-axe with the 'autodig' option On. Attempting to dig assumed size-to-side activity because u.dz wasn't being set, so the pick-axe was swung at thin air instead making a pit or turning an existing pit into a hole. dodown() and doup() should probably call set_move_cmd() instead of manipulating u.dz directly. But they would also need to suppress g.move_attempting or the game says "you can't get there from here..." after successfully digging or plunging into a pit. --- doc/fixes37.0 | 2 ++ src/do.c | 1 + 2 files changed, 3 insertions(+) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 96c85cfba..cc0d32d33 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -980,6 +980,8 @@ changing engraving to an occupation resulted in not dulling a weapon used to a change to wounded legs handling resulted in not recovering lost dexterity or receiving the "leg(s) feel better" message if wound time expired rather than having legs be explicitly healed +turning movement into commands interfered with using pick-axe plus autodig + in downward direction curses: 'msg_window' option wasn't functional for curses unless the binary also included tty support diff --git a/src/do.c b/src/do.c index d3a472b05..ba4a7cb7b 100644 --- a/src/do.c +++ b/src/do.c @@ -1070,6 +1070,7 @@ dodown(void) } else if (!trap || !is_hole(trap->ttyp) || !Can_fall_thru(&u.uz) || !trap->tseen) { if (flags.autodig && !g.context.nopick && uwep && is_pick(uwep)) { + u.dz = 1; /* the #down command doesn't call set_move_cmd() */ return use_pick_axe2(uwep); } else { You_cant("go down here.");