Commit Graph

18497 Commits

Author SHA1 Message Date
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
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
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
Alex Smith
acfbd6d0e4 Add rolling boulder traps in Sokoban to reduce wrist strain
When playtesting NetHack heavily, I observed that most of the time
it wasn't placing much strain on my wrists, but Sokoban was an
exception: travel, farmove, etc. can normally be used to avoid the
need to spam keys, but they don't work while pushing a boulder, and
the boulders often need to be pushed along precise routes, so you
have to tap out every movement. This becomes particularly straining
when pushing in the last few boulders, as you have to push them a
long way along the goal corridor.

This commit adds rolling boulder traps to Sokoban that will
automatically roll boulders along the goal corridor, meaning that
you don't have to push them there manually. This considerably
reduces the number of keystrokes needed to solve Sokoban, without
making any significant change to the difficulty of the levels.
Some of the designs had to change slightly in order to make room
for them, but not in a way that meaningfully changes the solution.
2026-04-14 12:47:13 +01:00
Alex Smith
bc94d7a355 More interesting rolling boulder traps
Rolling boulder traps now react to having boulders pushed onto them;
the boulder will roll until reaching the trap's launch spot
(resetting the trap if the boulder was removed), or until it hits a
wall otherwise.

Because they can now be reset, they aren't removed when stepping on
them with a misplaced boulder (although no boulder moves unless
there's one on the appropriate spot).
2026-04-14 12:19:48 +01:00
Pasi Kallinen
10a47c0713 Remove unused curses define 2026-04-13 16:54:44 +03:00
nhmall
8c8121eb3c move a pair of functions from save.c to restore.c
A utility that links only with restore.o needs to find them.
2026-04-13 09:08:53 -04:00
nhmall
efaabc3203 more storing only relative times in save & bones 2026-04-13 07:53:51 -04:00
nhmall
4bd3f8398e whitespace cleanup: tabs to spaces 2026-04-13 07:35:23 -04:00
nhmall
36c3f208a6 again store relative timestamps in save and bones 2026-04-13 07:32:54 -04:00
nhmall
c249de0c2a timestamp change in save files requires EDITLEVEL bump 2026-04-13 07:11:47 -04:00
nhmall
4665b6c13c follow-up
staticfn define caused test to succeed when it shouldn't have
2026-04-13 06:47:10 -04:00
nhmall
337c5189dd store relative timestamps in save and bones 2026-04-13 06:39:54 -04:00
PatR
7ed50f6ef8 wand of stasis tweaks
When wand of stasis is zapped multiple times, keep the longest duration
rather than replace duration with each zap.

When current level is under the effect of a wand of stasis, have the
wizard-mode command #timeout say so.
2026-04-12 21:03:21 -07:00
Pasi Kallinen
8d6ab2f9ab Allow m-prefixing #annotate
This is the same as m-prefixing #overview
2026-04-12 19:55:12 +03:00
Pasi Kallinen
635dca05d5 Shapeshifters change shape less
Non-vampire shapeshifters were changing shape a lot; often you
could have a chameleon turning into a different monster each turn.

Now monster shape changing is actually their "special" power,
and it takes 3-12 turns until they can do it again.
2026-04-12 19:01:20 +03:00
Pasi Kallinen
26453eaea0 Allow polearming a monster in unlit space
... as long as you can see the monster, eg. via infravision
2026-04-12 15:54:18 +03:00
PatR
c7ccd4ca5d add pet->droptime check to monster sanity check
I don't see where loading or saving bones makes any attempt to fix up
pet->droptime at all.
2026-04-11 17:35:35 -07:00
Pasi Kallinen
8cf6c62862 Don't put non-m-prefix command msg into history 2026-04-11 23:05:41 +03:00
nhmall
80cc5ecb29 some windows cleanup at end of game 2026-04-11 14:08:36 -04:00
Pasi Kallinen
9d27cfe8b8 Prevent selecting all options in #optionsfull menu
No-one ever intentionally selected all entries in the options
menu.  Prevent it from happening by accident.
2026-04-11 18:37:56 +03:00
nhmall
f6e341546d thinko 2026-04-11 11:10:47 -04:00
nhmall
f29cea4a35 another impossible() update for dog_eat() 2026-04-11 07:17:20 -04:00
nhmall
85f03deca9 refine a dog_eat impossible()
Have the impossible message indicate whether the pointed-to
edog struct itself is still intact (not overwritten somewhere,
such as misuse of a stale or bad pointer) versus the apport field
itself being assigned an out-of-whack value some place.
2026-04-11 06:37:10 -04:00
PatR
b264e17cf2 fix use-after-free bug in curses shutdown
A year ago a use-free-bug was reported for curses.  I don't use ASAN
so haven't reproduced it, but I think this should fix it.

If the RIP window is deleted after the map window has gone away, the
code from commit 5e572d3d5f (post 3.6.7)
would execute and access the internals of the deleted map window.
2026-04-11 01:02:42 -07:00
nhmall
45b01cdb9a nomenclature of a couple of tasks in CI 2026-04-10 11:30:46 -04:00
nhmall
e8290bc275 try testing a Windows 11 snapdragon build in CI 2026-04-10 11:14:22 -04:00
nhmall
3acb327115 resolve a warning on one platform 2026-04-10 10:53:53 -04:00
nhmall
fffbf4c2e5 Windows option update for map_mode
Ensure preference_update() is called
2026-04-10 10:36:36 -04:00
Pasi Kallinen
9172b7eb09 Add tutorial and tips to Windows nethackrc template 2026-04-10 16:39:16 +03:00
nhmall
832db5b9e1 define TTY_PERM_INVENT in Windows console build 2026-04-10 09:26:24 -04:00
nhmall
e005c26fbd another safestartup vestige 2026-04-10 09:24:10 -04:00
nhmall
4dd47db3ad yet more Windows startup; also safestartup vestige 2026-04-09 15:08:07 -04:00
nhmall
3b7c0e8a19 follow-up: more Windows startup 2026-04-09 14:14:49 -04:00
nhmall
335cd65d5a some further Windows startup tweaking 2026-04-09 14:04:28 -04:00