Commit Graph

10428 Commits

Author SHA1 Message Date
Bart House
7e72bc0944 mklev() set xxstairs_room pointers back to NULL upon completion.
When mklev() is called multiple times, previous state stored in the
xxstairs_room pointers can be mistakenly used when making decisions about
the new level being constructed.  This caused non-deterministic level
creation behavior when replaying from a snapshot.
2019-07-06 14:18:02 -07:00
nhmall
a6f1d7c96a Merge branch 'master' into NetHack-3.7 2019-07-04 23:30:04 -04:00
nhmall
2e7655af40 Merge branch 'NetHack-3.6' part 2 2019-07-04 23:29:26 -04:00
nhmall
3b818da2cf Merge branch 'master' into NetHack-3.7 2019-07-04 22:53:28 -04:00
nhmall
4fbfbb07b1 Merge branch 'NetHack-3.6' 2019-07-04 22:53:06 -04:00
Bart House
f75deae0bc When fuzzing, use the number of moves as a proxy for the hour.
Every 1000 moves simulates one hour.
2019-07-04 18:06:56 -07:00
PatR
7b1c38499d curses prompting tweak
With 'popup_dialog' On, a prompt which exactly fills the available
width would start the next line with a space (to separate the prompt
from user's answer) and then have the cursor waiting after it.  That's
unlike other behavior in the curses interface where the line split
would be instead of the separating space rather than in addition to it.

Old:
|long prompt?|
| X__________|
New:
|long prompt?|
|X___________|
where the X represents the cursor sitting over the start of blank space
waiting for user's answer.
2019-07-04 15:56:08 -07:00
nhmall
46631edb68 Merge branch 'master' into NetHack-3.7 2019-07-03 22:38:19 -04:00
nhmall
2748cef8bb Merge branch 'NetHack-3.6' 2019-07-03 22:38:00 -04:00
PatR
79ff4cd9c3 fix github issue #202 - worn items inside engulfer
Fixes #202

When swallowed, you can take things from the engulfer's inventory, if
there are any, via pickup.  Items might be worn by the engulfer and
when "picked up" those weren't being unworn before being added to
hero's inventory.  Then they would be formatted as "(being worn)" and
could trigger warnings or worse.

Conceptually they should be worn on the outside and not be accessible
from the inside, so I've made attempts to pick up worn items fail
rather than fix up the unwearing.

Using ':' when swallowed to look at the engulfer's inventory describes
that inventory as "contents of <mon>'s stomach".  That's weird for any
worn items, but the situation is so rare I haven't made any attempt to
deal with it.
2019-07-03 18:30:55 -07:00
nhmall
c62db0de38 curses link fix in 3.7 2019-07-03 18:32:40 -04:00
nhmall
ddf816ba96 Merge branch 'master' into NetHack-3.7 2019-07-03 18:27:11 -04:00
nhmall
21de4c06ef Merge branch 'NetHack-3.6' 2019-07-03 18:25:55 -04:00
PatR
46b269fc0d 3.7 potential status conditions
Something else rescued from bit rot.  Just a comment...
2019-07-03 14:06:53 -07:00
PatR
8762c9498e couple of 3.7 build warnings 2019-07-03 14:05:19 -07:00
PatR
4a74968a58 shk doname for containers
Rescue some old code from bit rot.  It may be useful if the shop
side of things ever gets fixed.  (Itemized billing reveals container
contents.  I'm sure that it's in the bugzilla list but can't find it.)
2019-07-03 13:43:24 -07:00
PatR
88a48cd6ff makedefs dat/options TERMINFO
Noticed after building a curses-only binary; configuration setting
"terminal info library" is only of interest as an optional feature
when the build includes tty.  There were several other settings that
apply to some interfaces and not others but would be listed if the
feature was defined (possibly after building for an interface which
supported it, then left in place when switching to another which
doesn't).

I left most of those with commented out conditionals in case other
interfaces start supporting them.  So you might still get something
like "tiles file in XPM format" for a binary that doesn't support
tiles if USE_XPM has been defined for some reason.
2019-07-03 11:57:19 -07:00
nhmall
093e062de6 Merge branch 'master' into NetHack-3.7 2019-07-02 22:47:29 -04:00
nhmall
ca6dbd4b71 Merge branch 'NetHack-3.6' 2019-07-02 22:46:53 -04:00
Bart House
25ea6c8f3c Fix crash that can occur in decode_mixed.
If a player names an object with a name that ends in '\\', drops
that object on the floor nearby and does a look at nearby objects,
then the game will crash.  This is caused by stack corruption when
the decode loop skips over the decode string terminator.
2019-07-02 19:08:50 -07:00
nhmall
efbe179f64 fix the msdos build for NetHack-3.7 2019-07-02 22:05:36 -04:00
PatR
1e7fb839a3 status_hilite for Xp and Exp by percent rules
Extend support for highlight rules that specify percentages from HP
and spell power to experience level and experience points.  For both
of those, the percentage is based on progress from the start of the
current Xp level to the start of the next Xp level.  100% isn't
possible so is used to enable highlighting a special case:  1 point
shy of next level, most likely to occur after losing a level.

This is something I had in mind a long time ago and then forgot all
about until fiddling with the final disclosure of experience points
recently.  It turned out to be trickier than expected because it needs
to check whether Xp should have a status update when it hasn't changed
but Exp has gone up.  The latter might hit a percentage threshold that
switches to another highlight rule.  Fortunately changes to Exp, at
least that aren't part of level gain or loss (which always trigger
status updating), are all funnelled through a single place (I hope).
2019-07-02 17:39:23 -07:00
nhmall
4b2b2d5ba1 Merge branch 'master' into NetHack-3.7 2019-07-02 14:07:57 -04:00
nhmall
e6efc2a81b Merge branch 'NetHack-3.6' 2019-07-02 14:07:26 -04:00
nhmall
ad88205229 a bit that crept in from elsewhere 2019-07-02 14:06:14 -04:00
nhmall
1ac321eadc test and adjust for curses with msdos 2019-07-02 14:01:44 -04:00
PatR
8bb8d32625 tty status highlighting via attributes
Highlighting via attributes got broken three months ago.  May or
may not have been noticeable depending upon which attributes are
supported.  Too many variations of attribute designations...
2019-07-02 01:37:04 -07:00
nhmall
f4c3546ed6 Merge branch 'master' into NetHack-3.7 2019-07-01 00:21:33 -04:00
nhmall
6d0b6fe690 Merge branch 'NetHack-3.6' 2019-07-01 00:21:15 -04:00
nhmall
3e86b46f8a fix up Windows gcc Makefile 2019-06-30 22:19:37 -04:00
Bart House
1b0d47911f When restoring game we should not need to invoke rnd to test for hiding. 2019-06-30 16:41:24 -07:00
Bart House
c928cda775 Need to check ball and chain after we have procesed floor objects. 2019-06-30 16:34:41 -07:00
nhmall
062cdf1710 Merge branch 'master' into NetHack-3.7 2019-06-30 16:58:37 -04:00
nhmall
24eed9529a Merge branch 'NetHack-3.6' 2019-06-30 16:58:24 -04:00
nhmall
e35a216e51 last NetHack-3.6 travis build passed so re-enable notifications to devteam 2019-06-30 16:54:34 -04:00
PatR
4db3b55057 wishing vs EDIT_GETLIN
If you ask for help when wishing, don't leave "help" in the buffer
for EDIT_GETLIN to use as default answer on next retry.  It does still
leave anything rejected as unknown so that the player has a change to
review the spelling and conceivably add and/or remove from the end
witout having to retype everything.
2019-06-30 13:45:14 -07:00
PatR
18ae35ef39 curses message history vs dumplog message history
When I implemented getmsghistory()/putmsghistory() for curses I was
assuming that DUMPLOG would only be used with tty, but it is interface
neutral and can be used with curses (or others).  So curses message
history needs to behave like tty message history and be sure to pass
along messages that bypass pline() and the normal message window.
(Mainly one-line summaries of long quest messages, but also old
messages fetched from a save file and available to be re-saved without
having been shown if new session doesn't generate enough new messages
to flush them.)
2019-06-30 11:50:08 -07:00
nhmall
e05a79f302 Merge branch 'master' into NetHack-3.7 2019-06-30 14:48:50 -04:00
nhmall
4985d5d2b3 Merge branch 'NetHack-3.6' 2019-06-30 14:46:55 -04:00
nhmall
d352dd8d1a Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-06-30 14:12:48 -04:00
nhmall
7cccf2e4d8 add --depth 1 to git clone for travis windows test 2019-06-30 14:12:16 -04:00
PatR
93ddb5c6d8 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.
2019-06-30 10:51:00 -07:00
nhmall
d4ec664b4f add pdcurses support to travis ci windows test builds
pdcurses is obtained on-the-fly from the github source
2019-06-30 13:22:25 -04:00
nhmall
81fef499e0 remove "bogus" bit :) 2019-06-30 12:12:42 -04:00
nhmall
256ed2406a Merge branch 'master' into NetHack-3.7 2019-06-30 11:25:14 -04:00
nhmall
9bd9db8ed9 Merge branch 'NetHack-3.6' 2019-06-30 11:02:30 -04:00
nhmall
ae9d68d991 lower case windows in .travis.yml 2019-06-30 10:33:53 -04:00
nhmall
148b93a7c1 TRAVIS CI updated to include Windows and osx testing
TRAVIS CI added Windows to their platform list in late 2018.

Update the .travis.yml file to include a pair of Windows in
machines in the testing suite, one built with visual studio
command line tools and the other with mingw gcc tools.

The visual studio build is currently using nmake with the
sys/winnt/Makefile.msc Makefile from our distribution,
That's the same process we've been using for building
our binaries, pretty much.

BRH may be able to modernize it over the next couple of
weeks to use the msbuild process instead.

I went with the HINTS environment variable on windows
for consistent self-documenting purposes, even though
the environment variable isn't used on windows.

included:
   os: linux
   Compiler: gcc C
   HINTS=linux

   os: linux
   Compiler: clang C
   HINTS=linux

   os: linux
   Compiler: gcc C
   HINTS=linux-x11

   os: linux
   Compiler: gcc C
   HINTS=linux-qt5

   os: linux
   Compiler: gcc C
   HINTS=linux-minimal

   os: windows
   language: shell
   HINTS=Windows-visual-studio

   os: windows
   HINTS=Windows-mingw

excluded:
   os: osx
   Compiler: clang
   Xcode: xcode10.2 C
   HINTS=macosx10.14
2019-06-30 10:19:16 -04:00
nhmall
bef9799eb5 No PDCurses right out-of-the-box; requires an edit 2019-06-30 01:10:32 -04:00
nhmall
51f2d610e2 update Windows Makefiles to support TRAVIS CI builds 2019-06-30 01:09:41 -04:00