Lev vs Fly via #wizintrinsic
I noticed that Qt status showed both Lev and Fly at the same time when they should be mutually exclusive (Levitation overrides Flying). I wasted a bunch of time trying to track down a Qt problem but it turned out to be a core issue. If Flying is set first (which won't happen if both are set in the same #wizinstrinsic operation), setting Levitation via #wizintrinsic was attempting to update the flag that indicates that Flying is blocked, but doing so too soon and failing. Setting Lev via other means while Fly was already set didn't have this problem so it wouldn't occur during normal play. Also, #timeout lists timed properties which can have a timeout value in normal play, then a separator, followed by properties that can only become timed due to #wizintrinsic. Move Displacement from the second group to the first now that it can be obtained as a timed value by eating a displacer beast corpse.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.267 $ $NHDT-Date: 1596283876 2020/08/01 12:11:16 $
|
||||
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.268 $ $NHDT-Date: 1596287474 2020/08/01 13:11:14 $
|
||||
|
||||
General Fixes and Modified Features
|
||||
-----------------------------------
|
||||
@@ -238,6 +238,8 @@ splitting a stack of candy bars gave new wrapper text depending upon the
|
||||
(side-effect: separate candy bars usually won't merge anymore)
|
||||
describing tin variety (deep fried, pureed, &c) relied on the 'contents known'
|
||||
flag but object identification wasn't setting obj->cknown for tins
|
||||
wizard mode #wizintrinsic: setting Levitation wouldn't block Flying as
|
||||
intended because the check for that was being made too soon
|
||||
|
||||
|
||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||
@@ -306,6 +308,8 @@ enabling wizard mode 'sanity_check' option would complain about invalid mhpmax
|
||||
disable that extra check because gremlim HP split after cloning triggers it
|
||||
some versions of tiles processing (not X11's) complained about the rename of
|
||||
"{acid,blinding} venom" to "splash of {acid,blinding} venom"
|
||||
wizard mode #timeout changed to show timed Displacement in 'can be timed in
|
||||
normal play' section instead of 'timed via #wizintrinsic only' section
|
||||
|
||||
tty: redraw unexplored locations as S_unexplored rather than <space> after
|
||||
map has been partially overwritten by popup menu or text display
|
||||
|
||||
23
src/cmd.c
23
src/cmd.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1587317999 2020/04/19 17:39:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.418 $ */
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1596287474 2020/08/01 13:11:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.420 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1564,6 +1564,9 @@ wiz_intrinsic(VOID_ARGS)
|
||||
continue;
|
||||
}
|
||||
if (p == FIRE_RES) {
|
||||
/* FIRE_RES and properties beyond it (in the propertynames[]
|
||||
ordering, not their numerical PROP values), can only be
|
||||
set to timed values here so show a separator */
|
||||
any.a_int = 0;
|
||||
add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, "--",
|
||||
MENU_ITEMFLAGS_NONE);
|
||||
@@ -1642,23 +1645,23 @@ wiz_intrinsic(VOID_ARGS)
|
||||
}
|
||||
goto def_feedback;
|
||||
case GLIB:
|
||||
/* slippery fingers applies to gloves if worn at the time
|
||||
so persistent inventory might need updating */
|
||||
/* slippery fingers might need a persistent inventory update
|
||||
so needs more than simple incr_itimeout() but we want
|
||||
the pline() issued with that */
|
||||
make_glib((int) newtimeout);
|
||||
goto def_feedback;
|
||||
case LEVITATION:
|
||||
case FLYING:
|
||||
float_vs_flight();
|
||||
/*FALLTHRU*/
|
||||
default:
|
||||
def_feedback:
|
||||
pline("Timeout for %s %s %d.", propertynames[i].prop_name,
|
||||
oldtimeout ? "increased by" : "set to", amt);
|
||||
if (p != GLIB)
|
||||
incr_itimeout(&u.uprops[p].intrinsic, amt);
|
||||
g.context.botl = 1; /* have pline() do a status update */
|
||||
pline("Timeout for %s %s %d.", propertynames[i].prop_name,
|
||||
oldtimeout ? "increased by" : "set to", amt);
|
||||
break;
|
||||
}
|
||||
g.context.botl = 1; /* probably not necessary... */
|
||||
/* this has to be after incr_timeout() */
|
||||
if (p == LEVITATION || p == FLYING)
|
||||
float_vs_flight();
|
||||
}
|
||||
if (n >= 1)
|
||||
free((genericptr_t) pick_list);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 timeout.c $NHDT-Date: 1582925432 2020/02/28 21:30:32 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.112 $ */
|
||||
/* NetHack 3.6 timeout.c $NHDT-Date: 1596287475 2020/08/01 13:11:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.117 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2018. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -46,6 +46,8 @@ const struct propname {
|
||||
{ DETECT_MONSTERS, "monster detection" },
|
||||
{ SEE_INVIS, "see invisible" },
|
||||
{ INVIS, "invisible" },
|
||||
{ DISPLACED, "displaced" }, /* timed amount possible via eating a
|
||||
* displacer beast corpse */
|
||||
/* properties beyond here don't have timed values during normal play,
|
||||
so there's not much point in trying to order them sensibly;
|
||||
they're either on or off based on equipment, role, actions, &c */
|
||||
@@ -70,7 +72,6 @@ const struct propname {
|
||||
{ SEARCHING, "searching" },
|
||||
{ INFRAVISION, "infravision" },
|
||||
{ ADORNED, "adorned (+/- Cha)" },
|
||||
{ DISPLACED, "displaced" },
|
||||
{ STEALTH, "stealthy" },
|
||||
{ AGGRAVATE_MONSTER, "monster aggravation" },
|
||||
{ CONFLICT, "conflict" },
|
||||
|
||||
Reference in New Issue
Block a user