From 81fef499e01e4fc1a509eadc8eff2af40d915705 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 30 Jun 2019 12:12:42 -0400 Subject: [PATCH 1/4] remove "bogus" bit :) --- win/win32/vs2017/NetHack.vcxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/win32/vs2017/NetHack.vcxproj b/win/win32/vs2017/NetHack.vcxproj index 9d03bf187..bc49f9efc 100644 --- a/win/win32/vs2017/NetHack.vcxproj +++ b/win/win32/vs2017/NetHack.vcxproj @@ -31,7 +31,7 @@ $(PDCURSES);%(AdditionalIncludeDirectories) - CURSES_GRAPHICS;CHTYPE_32;PDC_NCMOUSE;CURSES_DEFINE_ERASE_CHAR;%(PreprocessorDefinitions) + CURSES_GRAPHICS;CHTYPE_32;PDC_NCMOUSE;%(PreprocessorDefinitions) $(ToolsDir) From d4ec664b4f3f03bb1de53feb53a45988defc47f9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 30 Jun 2019 13:22:25 -0400 Subject: [PATCH 2/4] add pdcurses support to travis ci windows test builds pdcurses is obtained on-the-fly from the github source --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8ccc6a525..bef2f9891 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,6 +81,9 @@ matrix: - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB # - export + - git clone https://github.com/wmcbrine/PDCurses.git ../pdcurses + - export ADD_CURSES=Y + - export PDCURSES_TOP=../../pdcurses - cd src - cp ../sys/winnt/Makefile.msc ./Makefile - nmake install @@ -88,6 +91,9 @@ matrix: # install: choco install mingw env: HINTS=windows-mingw script: + - git clone https://github.com/wmcbrine/PDCurses.git ../pdcurses + - export ADD_CURSES=Y + - export PDCURSES_TOP=../../pdcurses - cd src - cp ../sys/winnt/Makefile.gcc ./Makefile - mingw32-make install @@ -104,4 +110,3 @@ notifications: recipients: # - devteam@nethack.org - From 93ddb5c6d884abe604d0c165bc3bff32d20c0a46 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 30 Jun 2019 10:51:00 -0700 Subject: [PATCH 3/4] attributes disclosure: experience points Wizard mode shows the number of points needed to reach the next level (unless already maxxed out at 30) for ^X and end of game disclosure. Do it in normal play for the latter too. (I think it would ok to do that for ^X too but haven't gone that far.) Even when it was wizard mode only, the phrasing for past tense had a minor grammar bug, and it could make the line a little too long for tty and curses (not sure about others) when level was high, resulting in wrapped text. That looked bad for tty, which first tries removing indentation (just 1 space in this case), making that line outdented as well as wrapped. So change the phrasing slightly when experience level is 'too high'. I had a version which formatted, measured, and re-formatted if necessary but that was overkill; simple hardcoded rephrasing suffices particularly when measuring was against assumed display width (80) rather than actual width. --- doc/fixes36.3 | 7 ++++++- src/cmd.c | 31 ++++++++++++++++++++----------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 648ef6902..d03090095 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.78 $ $NHDT-Date: 1561766416 2019/06/29 00:00:16 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.79 $ $NHDT-Date: 1561917056 2019/06/30 17:50:56 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -92,6 +92,8 @@ wizard mode ^I with 'perm_invent' On would unintentionally filter the content change #adjust to treat carrying only gold as not having anything to adjust saving bones with 'perm_invent' On could result in "Bad fruit #N" warnings update persistent inventory window immediately if 'sortpack' option is toggled +grammar bit for wizard mode final disclosure; attribute section could show + "You had N experience points, 1 more were needed to attain level X+1." Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository @@ -196,6 +198,9 @@ classify sources as released, beta, or work-in-progress via NH_DEVEL_STATUS rather than just released vs beta via BETA if you reach the edge of a level (relatively uncommon) and try to move off, report that you can't go farther if the 'mention_walls' option is set +'attributes' disclosure at end of game includes number of experience points + that were needed to reach the next experience level (new for normal + play and explore mode; previously only shown for wizard mode) wizard-mode: display effect to show where an unseen wished-for monster landed curses: enable latent mouse support curses: give menus and text windows a minimum size of 5x25 since tiny ones can diff --git a/src/cmd.c b/src/cmd.c index a3a1e60c5..c69bd4ff1 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1561017215 2019/06/20 07:53:35 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.337 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1561917056 2019/06/30 17:50:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.338 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1982,19 +1982,28 @@ int final; enlght_line(You_, "entered ", buf, ""); } if (!Upolyd) { - /* flags.showexp does not matter */ + int ulvl = (int) u.ulevel; + /* [flags.showexp currently does not matter; should it?] */ + /* experience level is already shown above */ Sprintf(buf, "%-1ld experience point%s", u.uexp, plur(u.uexp)); - if (wizard) { - if (u.ulevel < 30) { - int ulvl = (int) u.ulevel; - long nxtlvl = newuexp(ulvl); - /* long oldlvl = (ulvl > 1) ? newuexp(ulvl - 1) : 0; */ + /* TODO? + * Remove wizard-mode restriction since patient players can + * determine the numbers needed without resorting to spoilers + * (even before this started being disclosed for 'final'; + * just enable 'showexp' and look at normal status lines + * after drinking gain level potions or eating wraith corpses + * or being level-drained by vampires). + */ + if (ulvl < 30 && (final || wizard)) { + long nxtlvl = newuexp(ulvl), delta = nxtlvl - u.uexp; - Sprintf(eos(buf), ", %ld %s%sneeded to attain level %d", - (nxtlvl - u.uexp), (u.uexp > 0) ? "more " : "", - !final ? "" : "were ", (ulvl + 1)); - } + Sprintf(eos(buf), ", %ld %s%sneeded %s level %d", + delta, (u.uexp > 0) ? "more " : "", + /* present tense=="needed", past tense=="were needed" */ + !final ? "" : (delta == 1L) ? "was " : "were ", + /* "for": grammatically iffy but less likely to wrap */ + (ulvl < 18) ? "to attain" : "for", (ulvl + 1)); } you_have(buf, ""); } From 7cccf2e4d8b868c298ed0946099f828703826deb Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 30 Jun 2019 14:12:16 -0400 Subject: [PATCH 4/4] add --depth 1 to git clone for travis windows test --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bef2f9891..818b1bf5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,7 +81,7 @@ matrix: - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB # - export - - git clone https://github.com/wmcbrine/PDCurses.git ../pdcurses + - git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses - export ADD_CURSES=Y - export PDCURSES_TOP=../../pdcurses - cd src @@ -91,7 +91,7 @@ matrix: # install: choco install mingw env: HINTS=windows-mingw script: - - git clone https://github.com/wmcbrine/PDCurses.git ../pdcurses + - git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses - export ADD_CURSES=Y - export PDCURSES_TOP=../../pdcurses - cd src @@ -110,3 +110,4 @@ notifications: recipients: # - devteam@nethack.org +