diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 513f78178..c6de9e03b 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.76 $ $NHDT-Date: 1580043420 2020/01/26 12:57:00 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.80 $ $NHDT-Date: 1580254093 2020/01/28 23:28:13 $ General Fixes and Modified Features ----------------------------------- @@ -76,6 +76,8 @@ data.base lookup of an entry with any blank lines would falsely claim that "'data' file in wrong fromat or corrupted" after some extra checks were added while investigating tab handling anomalies using nhl_error() to report a Lua processing problem would clobber the stack +level teleporation's "You materialize on a different level!" could be given + out of sequence with other arrival messages Platform- and/or Interface-Specific Fixes @@ -95,12 +97,12 @@ savefile: add support to deconstruct internal data structures down into their individual fields and save those fields instead of the entire struct savefile: use little-endian format for fields where that makes a difference replace build-time level compiler and dungeon compiler with run-time loading of - the dungeon and level descriptions and interpreting them via LUA + the dungeon and level descriptions and interpreting them via Lua split off some of the functionality that was in makedefs (compiled-in options build date/time, etc) so that it can be built by a cross-compiler and accessed on the target platform replace quest.txt and associated conversion to quest.dat via makedefs with - lua quest texts loaded at runtime + Lua quest texts loaded at runtime some altars are displayed in different colors (for tty and curses at least) add 'quick_farsight' option to provide some control over random clairvoyance where pausing to be able to browse temporarily visible aspects of the @@ -122,6 +124,9 @@ tiny chance for randomly created spellbooks to be Discworld novels instead wearing a wet towel confers "half damage from poison gas" attribute for end of game disclosure and dumplog, show 'achievements' (previously only available as an encoded value in xlogfile) along with 'conduct' +more grades of self-appearance than beautiful or handsome vs ugly +when 'color' if Off and 'use_inverse' is On, draw ice on the map in inverse + video if it uses the same character as room floor or as dark floor Platform- and/or Interface-Specific New Features diff --git a/include/hack.h b/include/hack.h index f0f8608bf..4a987d9d9 100644 --- a/include/hack.h +++ b/include/hack.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 hack.h $NHDT-Date: 1559227823 2019/05/30 14:50:23 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.105 $ */ +/* NetHack 3.6 hack.h $NHDT-Date: 1580252122 2020/01/28 22:55:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.127 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2017. */ /* NetHack may be freely redistributed. See license for details. */ @@ -83,15 +83,16 @@ enum dismount_types { #define MG_FLAG_NOOVERRIDE 0x01 /* Special returns from mapglyph() */ -#define MG_CORPSE 0x01 -#define MG_INVIS 0x02 -#define MG_DETECT 0x04 -#define MG_PET 0x08 -#define MG_RIDDEN 0x10 -#define MG_STATUE 0x20 -#define MG_OBJPILE 0x40 /* more than one stack of objects */ -#define MG_BW_LAVA 0x80 /* 'black & white lava': highlight lava if it - can't be distringuished from water by color */ +#define MG_CORPSE 0x0001 +#define MG_INVIS 0x0002 +#define MG_DETECT 0x0004 +#define MG_PET 0x0008 +#define MG_RIDDEN 0x0010 +#define MG_STATUE 0x0020 +#define MG_OBJPILE 0x0040 /* more than one stack of objects */ +#define MG_BW_LAVA 0x0080 /* 'black & white lava': highlight lava if it + can't be distringuished from water by color */ +#define MG_BW_ICE 0x0100 /* similar for ice vs floor */ /* sellobj_state() states */ #define SELL_NORMAL (0) diff --git a/src/apply.c b/src/apply.c index 08b39c31e..8c6fe07c8 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 apply.c $NHDT-Date: 1578187332 2020/01/05 01:22:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.310 $ */ +/* NetHack 3.6 apply.c $NHDT-Date: 1580244571 2020/01/28 20:49:31 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.314 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -815,14 +815,25 @@ register xchar x, y; } } +/* charisma is supposed to include qualities like leadership and personal + magnetism rather than just appearance, but it has devolved to this... */ const char * beautiful() { - return ((ACURR(A_CHA) > 14) - ? ((poly_gender() == 1) - ? "beautiful" - : "handsome") - : "ugly"); + const char *res; + int cha = ACURR(A_CHA); + + /* don't bother complaining about the sexism; nethack is not real life */ + res = ((cha >= 25) ? "sublime" /* 25 is the maximum possible */ + : (cha >= 19) ? "splendorous" /* note: not "splendiferous" */ + : (cha >= 16) ? ((poly_gender() == 1) ? "beautiful" : "handsome") + : (cha >= 14) ? ((poly_gender() == 1) ? "winsome" : "amiable") + : (cha >= 11) ? "cute" + : (cha >= 9) ? "plain" + : (cha >= 6) ? "homely" + : (cha >= 4) ? "ugly" + : "hideous"); /* 3 is the minimum possible */ + return res; } static const char look_str[] = "look %s."; diff --git a/src/do.c b/src/do.c index 0f0a08a30..69734ed6c 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do.c $NHDT-Date: 1577063925 2019/12/23 01:18:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.220 $ */ +/* NetHack 3.6 do.c $NHDT-Date: 1580254093 2020/01/28 23:28:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.221 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1615,6 +1615,13 @@ boolean at_stairs, falling, portal; * Move all plines beyond the screen reset. */ + /* deferred arrival message for level teleport looks odd if given + after the various messages below so give it before them */ + if (g.dfr_post_msg && !strncmpi(g.dfr_post_msg, "You materialize", 15)) { + pline("%s", g.dfr_post_msg); + free((genericptr_t) g.dfr_post_msg), g.dfr_post_msg = 0; + } + /* special levels can have a custom arrival message */ deliver_splev_message(); @@ -1699,9 +1706,11 @@ boolean at_stairs, falling, portal; || g.quest_status.leader_is_dead)) { if (!u.uevent.qcalled) { u.uevent.qcalled = 1; - com_pager("quest_portal"); /* main "leader needs help" message */ - } else { /* reminder message */ - com_pager(Role_if(PM_ROGUE) ? "quest_portal_demand" : "quest_portal_again"); + /* main "leader needs help" message */ + com_pager("quest_portal"); + } else { /* reminder message */ + com_pager(Role_if(PM_ROGUE) ? "quest_portal_demand" + : "quest_portal_again"); } } } diff --git a/src/mapglyph.c b/src/mapglyph.c index 59d01010b..900279451 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mapglyph.c $NHDT-Date: 1575830186 2019/12/08 18:36:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.60 $ */ +/* NetHack 3.6 mapglyph.c $NHDT-Date: 1580252137 2020/01/28 22:55:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.62 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -162,6 +162,12 @@ unsigned mgflags; || g.showsyms[idx] == g.showsyms[S_water + SYM_OFF_P])) { special |= MG_BW_LAVA; + /* similar for floor [what about empty doorway?] and ice */ + } else if (!iflags.use_color && offset == S_ice + && (g.showsyms[idx] == g.showsyms[S_room + SYM_OFF_P] + || g.showsyms[idx] + == g.showsyms[S_darkroom + SYM_OFF_P])) { + special |= MG_BW_ICE; } else if (offset == S_altar && iflags.use_color) { int amsk = altarmask_at(x, y); /* might be a mimic */ diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 82645cee2..827546870 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -688,12 +688,12 @@ curses_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph, if ((special & MG_OBJPILE) && iflags.hilite_pile) { if (iflags.wc_color) color = 16 + (color * 2) + 1; - else + else /* if (iflags.use_inverse) */ attr = A_REVERSE; } /* water and lava look the same except for color; when color is off, render lava in inverse video so that they look different */ - if ((special & MG_BW_LAVA) && iflags.use_inverse) { + if ((special & (MG_BW_LAVA | MG_BW_ICE)) != 0 && iflags.use_inverse) { attr = A_REVERSE; /* mapglyph() only sets this if color is off */ } } diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 46a378088..b251057c1 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 wintty.c $NHDT-Date: 1578947635 2020/01/13 20:33:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.244 $ */ +/* NetHack 3.6 wintty.c $NHDT-Date: 1580252140 2020/01/28 22:55:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.248 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -3391,7 +3391,7 @@ int glyph; int bkglyph UNUSED; { int ch; - boolean reverse_on = FALSE; + boolean inverse_on = FALSE; int color; unsigned special; @@ -3429,13 +3429,16 @@ int bkglyph UNUSED; } #endif /* TEXTCOLOR */ - /* must be after color check; term_end_color may turn off inverse too */ - if (((special & MG_PET) && iflags.hilite_pet) - || ((special & MG_OBJPILE) && iflags.hilite_pile) - || ((special & MG_DETECT) && iflags.use_inverse) - || ((special & MG_BW_LAVA) && iflags.use_inverse)) { + /* must be after color check; term_end_color may turn off inverse too; + BW_LAVA and BW_ICE won't ever be set when color is on; + (tried bold for ice but it didn't look very good; inverse is easier + to see although the Valkyrie quest ends up being hard on the eyes) */ + if (((special & MG_PET) != 0 && iflags.hilite_pet) + || ((special & MG_OBJPILE) != 0 && iflags.hilite_pile) + || ((special & (MG_DETECT | MG_BW_LAVA | MG_BW_ICE)) != 0 + && iflags.use_inverse)) { term_start_attr(ATR_INVERSE); - reverse_on = TRUE; + inverse_on = TRUE; } #if defined(USE_TILES) && defined(MSDOS) @@ -3445,10 +3448,12 @@ int bkglyph UNUSED; #endif g_putch(ch); /* print the character */ - if (reverse_on) { + if (inverse_on) { term_end_attr(ATR_INVERSE); #ifdef TEXTCOLOR - /* turn off color as well, ATR_INVERSE may have done this already */ + /* turn off color as well, turning off ATR_INVERSE may have done + this already and if so, we won't know the current state unless + we do it explicitly */ if (ttyDisplay->color != NO_COLOR) { term_end_color(); ttyDisplay->color = NO_COLOR;