rest/search refinement

When rest and search refuse to operate because a hostile monster is
adjacent, include a reminder of how to force them to operate.  Every
time if 'cmdassist' is On, or just once until after some subsequent
try actually does something.

This new rest and search behavior probably needs to be optional and
default to the old behavior.  It isn't uncommon to deliberately rest
while adjacent to a hostile monster if also adjacent to a peaceful
one and trying to wait for Stun or Confusion to time out, or maybe
search while next to such a monster hoping to find a secret door to
run away through.  A count prefix won't work and needing an extra
keystroke each time is going to be an annoyance.
This commit is contained in:
PatR
2020-04-13 14:58:12 -07:00
parent 124d39f4c5
commit caac70c5ec
4 changed files with 32 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 decl.c $NHDT-Date: 1583608833 2020/03/07 19:20:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.208 $ */
/* NetHack 3.6 decl.c $NHDT-Date: 1586815084 2020/04/13 21:58:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.209 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2009. */
/* NetHack may be freely redistributed. See license for details. */
@@ -357,6 +357,9 @@ const struct instance_globals g_init = {
#endif
UNDEFINED_VALUES, /* program_state */
/* detect.c */
0, /* already_found_flag */
/* dig.c */
UNDEFINED_VALUE, /* did_dig_msg */
@@ -369,6 +372,7 @@ const struct instance_globals g_init = {
FALSE, /* at_ladder */
NULL, /* dfr_pre_msg */
NULL, /* dfr_post_msg */
0, /* did_nothing_flag */
{ 0, 0 }, /* save_dlevel */
/* do_name.c */