From 8a965b8cf9938c98a1e48ffd9f5e724c20a2adf9 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 24 Jan 2021 13:55:19 -0800 Subject: [PATCH] \#wizintrinsic timeout values Tell/remind wizard mode player how to specify timeout amounts when using #wizintrinsic to set temporary timeouts. --- doc/fixes37.0 | 3 ++- src/cmd.c | 14 +++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 810ad99fb..77642c8bc 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.434 $ $NHDT-Date: 1611522041 2021/01/24 21:00:41 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.435 $ $NHDT-Date: 1611525309 2021/01/24 21:55:09 $ General Fixes and Modified Features ----------------------------------- @@ -762,6 +762,7 @@ record number of encountered bones levels in xlogfile add bonesless to extended conducts field in xlogfile show bones levels information in enlightenment at end of game or in explore and wizmode +for #wizintrinsic, use any counts entered during menu selection Platform- and/or Interface-Specific New Features diff --git a/src/cmd.c b/src/cmd.c index f4233aa6a..c672d6632 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 cmd.c $NHDT-Date: 1610138674 2021/01/08 20:44:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.445 $ */ +/* NetHack 3.7 cmd.c $NHDT-Date: 1611525309 2021/01/24 21:55:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.448 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1571,6 +1571,15 @@ wiz_intrinsic(VOID_ARGS) any = cg.zeroany; win = create_nhwindow(NHW_MENU); start_menu(win, MENU_BEHAVE_STANDARD); + if (iflags.cmdassist) { + /* start menu with a subtitle */ + Sprintf(buf, + "[Precede any selection with a count to increment by other than %d.]", + DEFAULT_TIMEOUT_INCR); + any.a_int = 0; + add_menu(win, &nul_glyphinfo, &any, 0, 0, ATR_NONE, buf, + MENU_ITEMFLAGS_NONE); + } for (i = 0; (propname = propertynames[i].prop_name) != 0; ++i) { p = propertynames[i].prop_num; if (p == HALLUC_RES) { @@ -1607,7 +1616,10 @@ wiz_intrinsic(VOID_ARGS) oldtimeout = u.uprops[p].intrinsic & TIMEOUT; amt = (pick_list[j].count == -1L) ? DEFAULT_TIMEOUT_INCR : (int) pick_list[j].count; + if (amt <= 0) /* paranoia */ + continue; newtimeout = oldtimeout + (long) amt; + switch (p) { case SICK: case SLIMED: -- 2.50.1