Commit Graph
19282 Commits
Author SHA1 Message Date
PatR 27f6ae340b address issue #1490 - rolling boulder segfault
Issue reported by BartekCupial:  segfault occurred and was tracked to
behavior of a rolling boulder trap.  Suggested fix was included, but it
assumes that the destination spot is valid so is suspect.

A comment pointed out that the path is validated when a rolling boulder
trap is created so the segfault should be impossible.  I didn't find an
explanation but am adding a fix based on the one in the issue report.

Closes #1490
2026-04-25 13:14:33 -07:00
nhmall 89c7435b7a attempt macOS fix 2026-04-25 15:57:36 -04:00
nhmall 4cf78d8f31 add macuuid.m 2026-04-25 15:44:53 -04:00
nhmall b9a46107ef fix up some odd indentation in mcastu.c 2026-04-25 15:05:08 -04:00
nhmall 309afb2eb2 add support for a unique game identifier
A 37 character field for holding a unique identifier is added
to the save file, as well as to an ancestor field in bones files.

Since it requires installation of libuuid package on Linux,
it requires an exlicit WANT_NHUUID=1 on the Make command line there.
Without the libuuid support, the saved nhuuid is empty, which should
be harmless.

This also moves the save and restore of gm.moves higher up so that it
already has a value the first time it is used against a relative saved
timestamp.

Invalidates savefiles and bones files due to new fields.

I need to get this committed before I can test out the macOS portion,
so there may be some build issues there briefly (hopefully), and
follow-up commits to resolve them.

Increments EDITLEVEL.
2026-04-25 14:48:49 -04:00
nhmall 5b66ba4c99 change gy.youmonst
Add a pointer to struct you, and put umonst there. Eliminate
the youmonst struct in gy.

The naming convention better matches the other u related fields,
and u.umonst has the same level of indirection as other monst pointers.

The u.umonst pointer is cleared prior to saving the parent u (struct you),
and u.umonst is reestablished upon restore.

Invalidates existing saves and bones due to the presence of the added
pointer field in struct you.
2026-04-25 14:41:39 -04:00
nhmall 80c08334ab yet another Windows follow-up 2026-04-24 22:02:15 -04:00
nhmall 36df2315c9 another Windows console follow-up 2026-04-24 21:58:33 -04:00
nhmall 8982addb9d revert one Windows change
Windows stores things a bit differently.
Use a static function in consoletty.c to preserve that behavior,
but still utilize the core colortable[] array.
2026-04-24 21:44:48 -04:00
nhmall 15a9acbefb more colortable[] updates
declare colortable[] const and no longer static so it can be shared
by code in window ports..

get rid of the Windows console port rgbtable and use the
core colortable[] instead.

utilize function colortable_to_int32() in Windows console instead
of the rgbtable_to_long() in the Windows port.

delete the Windows rgbtable_to_long() function.
2026-04-24 21:15:48 -04:00
nhmall 88a47cc7b6 colortable[] formatting
remove unused hexval field (show it in a comment)

The rgb values should be the same as they were
previously, just expressed with hex values on the
table initialization.
2026-04-24 20:13:01 -04:00
nhmall b3d9ab5183 revisit the "Welcome back" message
Also takes helm into consideration now

Closes #537
2026-04-24 11:14:53 -04:00
karafruit dc920f6af4 Merge branch 'NetHack-3.7' into twitch-interact 2026-04-23 20:37:34 -07:00
nhmall bad3e02246 follow-up comment bit 2026-04-23 17:31:20 -04:00
Patric Mueller b051ce8fd9 Add Unicode glyphs to Enhanced1 symset comments 2026-04-23 22:51:13 +02:00
Patric Mueller 34b85dbea6 Partly revert changes to Enhanced1 symset
Keep Enhanced1 as a conservative symset that should work everywhere.

Added description on the scope of the different Unicode symsets.
2026-04-23 22:51:13 +02:00
PatR b196863bbd reroll feedback
All the conduct feedback via "you ..." is directed at the character, so
seeing "you have rerolled your character 3 times" in conduct disclosure
looked strange.  Change that to "your character was rerolled 3 times."
2026-04-23 13:31:56 -07:00
nhmall 1556aec451 formatting (line length) bit 2026-04-23 15:28:20 -04:00
PatR 020604291d display buglet: newsym(0,0)
Starting a new game as a monk was calling newsym(0,0).

<0,0> is within array bounds but off the map.  Have newsym() check the
coordinates it receives.
2026-04-23 12:07:31 -07:00
nhmall 93ab8405d8 some further startup, option processing bits 2026-04-23 14:31:43 -04:00
Pasi Kallinen 21f0e18595 Fix visual reset in simple options
Switching symset in simple options menu did not reset the
map glyphs corectly.  Just call the same routine for resetting
visuals as in the #optionsfull command.
2026-04-23 15:51:36 +03:00
karafruit eee77d0f1b Prevent teleport control from working on twitch redeems to teleport the player 2026-04-22 20:37:00 -07:00
Barry Nelson 25849ac5a2 enhanced2 unicode symset w/ double line symbols
This is from PR #1503 on GitHub, contributed by @abcbarryn.

Closes #1503
2026-04-22 21:48:30 -04:00
Barry Nelson 09cb9e2425 Fixed corridor symbols in Enhanced1 PR #1503
This is the Enhanced1 symbols changes that were part of
GitHub pull request #1503
https://github.com/NetHack/NetHack/pull/1503

This is not the full pull request.
2026-04-22 21:33:50 -04:00
nhmall 965e1bf99d make program_state initialization a discrete step
Having it rolled into decl_globals_init() was
causing some early options to misbehave because
those early options were trying to use program_state
fields to determine their behavior, but decl_globals_init()
was resetting the program_state fields that were being used
to do that.
2026-04-22 11:15:19 -04:00
PatR 0a51a9656e address issue #1499 - saving grace vs traps
Issue reported by Shrigis1:  hero at or close to full HP stepped on
a not-yet-discovered rolling boulder trap and was killed; end-of-game
disclosure reported "You could have avoided a one-shot death via
saving-grace."

Originally, saving grace was completely hidden, so the disclosure
line wouldn't have been included.  Once disclosure was incorporated,
having saving grace not work for traps triggered by the hero seems
counter-intuitive, regardless of whether player is aware of the trap.

This makes saving grace apply to any damage applied by losehp().  The
original purpose of unexpectedly survivng by the skin of one's teeth
is still maintained.

Aside from having more of a chance of surviving via saving-grace,
the main difference is that some players might try for "survived by
saving-grace" as an unofficial conduct.  As long as we don't start
tracking that as a conduct, I don't think this is a big deal.

Fixes #1499
2026-04-21 20:55:39 -07:00
PatR 2b74dce88c still more thitu() and Half_physical_damage
Half_physical_damage does not reduce damage from acid.
2026-04-21 11:33:09 -07:00
nhmall 0ef54e364e more thitu() and Half_physical_damage
As commented in:
https://github.com/NetHack/NetHack/issues/1459#issuecomment-4280354364

This also fixes a minor typo in the related doc/fixes3-7-0.txt paragraph.
2026-04-21 05:40:52 -04:00
nhmall 32acb80174 resolve some valid warnings on Windows
../sys/windows/windmain.c:226:12: warning: address of array 'gc.chosen_windowtype' will always
      evaluate to 'true' [-Wpointer-bool-conversion]
  226 |     if (gc.chosen_windowtype && *gc.chosen_windowtype)

../sys/windows/consoletty.c:873:27: warning: address of array 'back->utf8str' will always evaluate
      to 'true' [-Wpointer-bool-conversion]
  873 |                 if (back->utf8str && front->utf8str
      |                     ~~~~~~^~~~~~~ ~~
../sys/windows/consoletty.c:873:45: warning: address of array 'front->utf8str' will always evaluate
      to 'true' [-Wpointer-bool-conversion]
  873 |                 if (back->utf8str && front->utf8str
      |                                   ~~ ~~~~~~~^~~~~~~
2026-04-21 05:13:46 -04:00
nhmall 0ca6e6f16f stray tabs 2026-04-20 21:04:22 -04:00
nhmall 7d377a0f02 clang detection in unix hints
Closes #1500 but it does apply the pull request.
Hopefully, this makes things a little clearer.
2026-04-20 20:47:59 -04:00
nhmall b5e6840bea vestigal line removed
Closes #1502
2026-04-20 10:31:32 -04:00
karafruit 6642a731c7 Update submodules 2026-04-19 08:38:22 -07:00
karafruit 85cc045400 Merge branch 'NetHack-3.7' into twitch-interact 2026-04-19 08:36:20 -07:00
karafruit ebed555f0a streamhack hints file 2026-04-19 08:33:57 -07:00
PatR 84c7e96644 fix issue #1459 - Half_physical_damage vs missiles
Issue reported by Tomsod nearly six months ago: missile damage against
hero was not honoring the Half_physical_damage attribute when hero had
that.

Fixes #1459
2026-04-18 19:22:07 -07:00
PatR 2b88cf0475 new options vs O
Change the classification of new weaponstatus, armorstatus, and
terrainstatus from 'OptS_Status' to 'OptS_Advanced' to keep the menu
for the 'O' command shorter.  Doesn't affect 'mO'.

Including them in 'O' might make more players notice them though.
2026-04-17 10:06:23 -07:00
St4ckC00ki3 ea6ae3359e Fix windows-port crash on startup when showvers option is enabled 2026-04-17 17:59:03 +08:00
nhmall 3d5b3e35ea Guidebook.txt update (from NetHack daily cron) 2026-04-16 22:34:24 -04:00
nhmall fd1b8e60f8 quiet a new warning that recently appeared
[warning]NetHack\src\hack.c(3223,16): Warning C4389: '!=': signed/unsigned mismatch
2026-04-16 19:57:02 -04:00
nhmall 47892c1f22 update tested versions of Visual Studio 2026-04-16 2026-04-16 19:46:46 -04:00
nhmall bf7ba34a1e Guidebook datestamp update 2026-04-16 19:31:12 -04:00
PatR 84ddf85cb4 new composite status conditions: weaponstatus,\
armorstatus, and terrainstatus

This adds three special status items to show at a glance what the hero
is wielding, wearing, and standing on.

Each of the three items has its own boolean option rather than try to
fix them in with the existing opttional status conditions.  After a
lot of testing, I think the weapon and armor ones will prove useful
but the terrain one probably won't be.

Presently it is implemented for tty and curses.  When I developed it
six years ago, it was also working for X11 but I'm not able to test
the resurrection of that part so have left it out.
2026-04-16 13:35:08 -07:00
karafruit b7281f0b28 Merge branch 'NetHack-3.7' into twitch-interact 2026-04-15 18:02:20 -07:00
karafruit 71deeb0416 Rate limit checking twitch in fifo 2026-04-14 18:01:29 -07:00
Alex Smith 45e8305918 True rumor and oracularity update
This removes or updates several true rumors that have become
misleading or inaccurate due to changes to the mechanics they were
describing, and adds several new rumors describing mechanics that
are either new, or are intended to be a larger part of the game
than they were in previous versions.

More oracularities describing the new mechanics are needed, but I
haven't managed to get into the write frame of mind to write in the
Oracle's voice yet...
2026-04-14 20:35:40 +01:00
Alex Smith 620d889016 Correctly abbreviate a message to shrink executable size
No player-visible gameplay changes.
2026-04-14 17:53:58 +01:00
Alex Smith b67c624034 Vampires are not polymorphed by Vlad's throne
The throne was intended for one specific vampire, but the others are
"close enough" to not be warped into a different shape.
2026-04-14 17:48:49 +01:00
Alex Smith a5be241bd4 Fix polymorphing into a large monster while wearing unusual cloaks
Most cloaks have a clasp, but some don't, so they need different
messages (and occasionally different behaviour).
2026-04-14 17:42:03 +01:00
Alex Smith 89473216ae Iron footwear and traps balance fixes
Any sort of iron footwear now protects from traps, and polymorph
traps change one sort of iron footwear into a different sort of
iron footwear (removing any incentive to try to farm them, because
you will see both options very quickly).
2026-04-14 16:51:20 +01:00