Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2018-09-07 08:30:20 -04:00
4 changed files with 44 additions and 19 deletions

View File

@@ -111,6 +111,9 @@ add window port status_update() value BL_RESET to use as a flag to
redraw all status fields, distinguished from BL_FLUSH which now only redraw all status fields, distinguished from BL_FLUSH which now only
specifies that the bot() call has completed so any buffered changes specifies that the bot() call has completed so any buffered changes
should now be rendered should now be rendered
for hilite_status of string status fields (title, dungeon-level, alignment),
the types value-goes-up and -down aren't meaningful; treat them as
value-changed if from config file and don't offer as choices with 'O'
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
@@ -146,6 +149,7 @@ windows: Added ntassert() mechanism for Windows based port use
tty: significant optimizations for performance and per field rendering tty: significant optimizations for performance and per field rendering
tty: use WC2_FLUSH_STATUS to buffer changes until BL_FLUSH is received tty: use WC2_FLUSH_STATUS to buffer changes until BL_FLUSH is received
tty: support BL_RESET in status_update to force an update to all status fields tty: support BL_RESET in status_update to force an update to all status fields
tty: stop hitpointbar from jumping to 100% health at zero hit points
unix: Makefile.src and Makefile.utl inadvertently relied on a 'gnu make' unix: Makefile.src and Makefile.utl inadvertently relied on a 'gnu make'
extension when using $(VERBOSEMAKE) to reduce build-time feedback; extension when using $(VERBOSEMAKE) to reduce build-time feedback;
replace with $(QUIETCC) which operates the same but defaults to replace with $(QUIETCC) which operates the same but defaults to
@@ -165,7 +169,7 @@ sortloot option has been enhanced to improve object ordering; primarily,
items of undiscovered type come out before items of discovered type items of undiscovered type come out before items of discovered type
within each class or sub-class of objects within each class or sub-class of objects
YAFM when stumbling on an undetected monster while hallucinating YAFM when stumbling on an undetected monster while hallucinating
Make it clear when a leprechaun dodges your attack make it clear when a leprechaun dodges your attack
wizard mode #wizidentify can now select individual items for permanent wizard mode #wizidentify can now select individual items for permanent
identification and don't display the selection to permanently identification and don't display the selection to permanently
identify everything if everything is already fully identified identify everything if everything is already fully identified

View File

@@ -1851,7 +1851,13 @@ boolean from_configfile;
if (*s[sidx + 1] == '\0') if (*s[sidx + 1] == '\0')
sidx--; sidx--;
} else if (!strcmpi(s[sidx], "up") || !strcmpi(s[sidx], "down")) { } else if (!strcmpi(s[sidx], "up") || !strcmpi(s[sidx], "down")) {
if (!strcmpi(s[sidx], "down")) if (initblstats[fld].anytype == ANY_STR)
/* ordered string comparison is supported but LT/GT for
the string fields (title, dungeon-level, alignment)
is pointless; treat 'up' or 'down' for string fields
as 'changed' rather than rejecting them outright */
;
else if (!strcmpi(s[sidx], "down"))
down = TRUE; down = TRUE;
else else
up = TRUE; up = TRUE;
@@ -2054,8 +2060,6 @@ boolean from_configfile;
return TRUE; return TRUE;
} }
const struct condmap valid_conditions[] = { const struct condmap valid_conditions[] = {
{"stone", BL_MASK_STONE}, {"stone", BL_MASK_STONE},
{"slime", BL_MASK_SLIME}, {"slime", BL_MASK_SLIME},
@@ -3039,12 +3043,22 @@ choose_value:
hilite.rel = lt_gt_eq; hilite.rel = lt_gt_eq;
hilite.value = aval; hilite.value = aval;
} else if (behavior == BL_TH_UPDOWN) { } else if (behavior == BL_TH_UPDOWN) {
boolean ltok = (fld != BL_TIME), gtok = TRUE; if (initblstats[fld].anytype != ANY_STR) {
boolean ltok = (fld != BL_TIME), gtok = TRUE;
lt_gt_eq = status_hilite_menu_choose_updownboth(fld, (char *)0, lt_gt_eq = status_hilite_menu_choose_updownboth(fld, (char *)0,
ltok, gtok); ltok, gtok);
if (lt_gt_eq == NO_LTEQGT) if (lt_gt_eq == NO_LTEQGT)
goto choose_behavior; goto choose_behavior;
} else { /* ANY_STR */
/* player picked '<field> value changes' in outer menu;
ordered string comparison is supported but LT/GT for the
string status fields (title, dungeon level, alignment)
is pointless; rather than calling ..._choose_updownboth()
with ltok==False plus gtok=False and having a menu with a
single choice, skip it altogether and just use 'changed' */
lt_gt_eq = EQ_VALUE;
}
Sprintf(colorqry, "Choose a color for when %s %s:", Sprintf(colorqry, "Choose a color for when %s %s:",
initblstats[fld].fldname, initblstats[fld].fldname,
(lt_gt_eq == EQ_VALUE) ? "changes" (lt_gt_eq == EQ_VALUE) ? "changes"

View File

@@ -2486,7 +2486,7 @@ int final;
else if (u.moreluck < 0) else if (u.moreluck < 0)
you_have("reduced luck", ""); you_have("reduced luck", "");
if (carrying(LUCKSTONE) || stone_luck(TRUE)) { if (carrying(LUCKSTONE) || stone_luck(TRUE)) {
ltmp = stone_luck(0); ltmp = stone_luck(FALSE);
if (ltmp <= 0) if (ltmp <= 0)
enl_msg("Bad luck ", "does", "did", " not time out for you", ""); enl_msg("Bad luck ", "does", "did", " not time out for you", "");
if (ltmp >= 0) if (ltmp >= 0)

View File

@@ -4244,16 +4244,23 @@ render_status(VOID_ARGS)
} }
} }
if (iflags.hilite_delta) { if (iflags.hilite_delta) {
char *s = bar;
tty_putstatusfield(nullfield, "[", x++, y); tty_putstatusfield(nullfield, "[", x++, y);
if (hpbar_color != NO_COLOR && coloridx != CLR_MAX) if (hpbar_percent > 0) {
term_start_color(hpbar_color); if (hpbar_color != NO_COLOR && coloridx != CLR_MAX)
term_start_attr(ATR_INVERSE); term_start_color(hpbar_color);
tty_putstatusfield(nullfield, bar, x, y); term_start_attr(ATR_INVERSE);
x += (int) strlen(bar); }
term_end_attr(ATR_INVERSE); if (hpbar_percent == 0)
if (hpbar_color != NO_COLOR && coloridx != CLR_MAX) s = text;
term_end_color(); tty_putstatusfield(nullfield, s, x, y);
if (twoparts) { x += (int) strlen(s);
if (hpbar_percent > 0) {
term_end_attr(ATR_INVERSE);
if (hpbar_color != NO_COLOR && coloridx != CLR_MAX)
term_end_color();
}
if (twoparts && hpbar_percent > 0) {
*bar2 = savedch; *bar2 = savedch;
tty_putstatusfield(nullfield, bar2, x, y); tty_putstatusfield(nullfield, bar2, x, y);
x += (int) strlen(bar2); x += (int) strlen(bar2);