fix #K112 - fumbling vs autoopen

Report complained that having autoopen not work when fumbling was
inconvenient and mentioned that the "ouch! you bump into a door"
result didn't take any time.  This updates the documentation to
state that autoopen won't work while fumbling (so the inconvenient
behavior persists) but changes movement so that bumping into a door
now takes time.  (Despite "ouch!", it doesn't inflict any damage.)

Also, document the recently added autounlock option.
This commit is contained in:
PatR
2020-01-07 17:57:38 -08:00
parent a49dcd1e12
commit df50d4cf17
5 changed files with 168 additions and 51 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 hack.c $NHDT-Date: 1576638500 2019/12/18 03:08:20 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.220 $ */
/* NetHack 3.6 hack.c $NHDT-Date: 1578448654 2020/01/08 01:57:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.239 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -784,7 +784,8 @@ int mode;
if (mode == DO_MOVE)
pline("There is an obstacle there.");
return FALSE;
} else if (tunnels(g.youmonst.data) && !needspick(g.youmonst.data)) {
} else if (tunnels(g.youmonst.data)
&& !needspick(g.youmonst.data)) {
/* Eat the door. */
if (mode == DO_MOVE && still_chewing(x, y))
return FALSE;
@@ -793,10 +794,10 @@ int mode;
if (amorphous(g.youmonst.data))
You(
"try to ooze under the door, but can't squeeze your possessions through.");
if (flags.autoopen && !g.context.run && !Confusion
&& !Stunned && !Fumbling) {
g.context.door_opened = g.context.move =
doopen_indir(x, y);
if (flags.autoopen && !g.context.run
&& !Confusion && !Stunned && !Fumbling) {
g.context.door_opened
= g.context.move = doopen_indir(x, y);
} else if (x == ux || y == uy) {
if (Blind || Stunned || ACURR(A_DEX) < 10
|| Fumbling) {
@@ -807,6 +808,13 @@ int mode;
pline("Ouch! You bump into a door.");
exercise(A_DEX, FALSE);
}
/* use current move; needed for the "ouch" case
but done for steed case too for consistency;
we haven't opened a door but we're going to
return False and without having 'door_opened'
set, 'move' would get reset by caller */
g.context.door_opened
= g.context.move = TRUE;
} else
pline("That door is closed.");
}
@@ -1036,7 +1044,7 @@ int mode;
continue;
if ((!Passes_walls && !can_ooze(&g.youmonst)
&& closed_door(x, y)) || sobj_at(BOULDER, x, y)
|| test_move(x, y, nx-x, ny-y, TEST_TRAP)) {
|| test_move(x, y, nx - x, ny - y, TEST_TRAP)) {
/* closed doors and boulders usually
* cause a delay, so prefer another path */
if (travel[x][y] > radius - 3) {