Commit Graph
19282 Commits
Author SHA1 Message Date
karafruit f981f44949 Merge branch 'NetHack-5.0' into twitch-interact 2026-09-22 08:36:33 -07:00
Pasi Kallinen c94fd5225b Vault guard shouldn't be heard from too far away
When you were asked for a name and teleported out of the vault without
any gold on you, the vault guard says "Well, begone" - which could be
heard from anywhere on the level.

Limit that verbalization to 10 tiles away.
2026-09-20 17:30:07 +03:00
Pasi Kallinen f11a4b168b More strict checking of dishonourable attacks
Move the caitiff check into thitmonst, the code responsible
for object hitting a monster, intead of checking the caitiff
in multiple places before calling that.

Previously there were some cases where caitiff was not checked,
eg. samurai could fire arrows at a peaceful monster without
the dishonourable behaviour check.

Now you will get the check even if you miss with the projectile.

This may need to be adjusted for throwing beneficial potions
at monsters...
2026-09-19 15:07:43 +03:00
Crissman Loomis c63ee6ac7e Account for pet hunger while away from a level 2026-09-14 15:57:14 +09:00
Crissman Loomis aec687db2c Qt: use idClicked(); buttonClicked(int) is gone in Qt 6
Closes #1670
2026-09-11 10:06:18 -04:00
Crissman Loomis 55769ca9f0 fix Qt use-after-free reading the player name
Closes #1673
2026-09-11 10:02:18 -04:00
Crissman Loomis 1106456195 Preserve inactive level clocks on save pr #1677
Close #1677
2026-09-11 09:37:45 -04:00
nhmall 02dda03f56 update tested versions of Visual Studio 2026-09-10 2026-09-10 08:09:09 -04:00
nhmall fc75a55d86 fix "killed by a died"
This is a follow-up to commit 9114a33 that was intended to fix a "killed by a died" situation.
In that commit, the generic case could be encountered with variable str set to "explosion",
but that never got copied to svk.killer.name, and svk.killer.name remained set to "died"
during testing.

svk.killer.format = KILLED_BY_AN; is done whether the generic case, or not.

Close #1676
2026-09-09 21:15:43 -04:00
nhmall 017fbcf510 follow-up 2026-09-09 20:00:58 -04:00
nhmall 3a496219f3 macOS generated tile build fix 2026-09-09 19:55:33 -04:00
nhmall 2d3aa59065 X11: support BMP, GIF and PNG tiles pr #1666
"This plugs into the same code that provides support for BMP and GIF tiles for MS-DOS, and also populates the stub to read PNG tiles.
PNG is a compile-time option, and depends on libpng."

pull request #1666 by chasonr
2026-09-09 11:25:38 -04:00
nhmall 96c564f09d Merge branch 'x11-bmp-gif' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-09-09 11:23:34 -04:00
nhmall 05d2e88950 style uppercase tidbit 2026-09-09 11:21:30 -04:00
nhmall 2c9600713d X11: several bug fixes pr #1668 by chasonr 2026-09-09 11:17:42 -04:00
nhmall 4efcce2995 Merge branch 'X11-bug-fixes' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-09-09 11:12:38 -04:00
nhmall 0d64c3f1fd attempt to fix a reported regression in consoletty.c 2026-09-08 09:21:29 -04:00
nhmall 50b868f67a remove obsolete VISION_TABLES reference
VISION_TABLES removed as part of commit 3ffd330c31.
2026-09-06 13:52:20 -04:00
Pasi Kallinen 8695c4959c Add some wishing aliases
Things people playing on NAO have wished for which should
give a correct item
2026-09-05 15:10:05 +03:00
nhmall 04834a9316 follow-up: Makefile.top was left out of previous commit 2026-09-01 13:48:47 -04:00
nhmall cc4768f1c9 adjust some Makefile dependencies
Reported by @benknoble in https://github.com/NetHack/NetHack/issues/1669

Some undeclared dependencies could arise when building with make --shuffle

This attempts to resolve those.
2026-09-01 13:38:05 -04:00
Ray Chason 2f42bd7e27 Display tabs in the text window
Actually a menu, but menu windows convert to text if only displaying
text.
2026-08-30 19:03:45 -04:00
Ray Chason 393130a629 Handle tabs in the message window 2026-08-30 17:51:10 -04:00
Ray Chason 98815bc739 Tabify the #wizcustom menu 2026-08-30 16:44:44 -04:00
Ray Chason c88403f4ec Correct display of tabified PICK_NONE menu 2026-08-30 16:44:26 -04:00
Ray Chason 564affea88 Remove limit in size of widget_table
It is difficult, but possible, to exceed 1024 widgets. One way is to
set a very large Unicode symbol set, and then use #wizcustom. As there
is no limit to how many objects can occupy a square, this limit is a
possible hazard even to a normal game.
2026-08-30 15:52:15 -04:00
nhmall 1b752f0e11 follow-up 2026-08-30 10:29:53 -04:00
nhmall 9c8b8249eb Linux build doc and a comment update 2026-08-30 09:59:10 -04:00
nhmall 845be15439 follow-up: stale comment removed altogether
The external reference was moved out of files.c elsewhere,
so the comment was no longer accurate.
2026-08-28 11:19:00 -04:00
nhmall 988eaa44b4 relocate declaration of sounddir
It shouldn't have been located inside an #ifdef USER_SOUNDS block.
2026-08-28 10:46:50 -04:00
Ray Chason d9194cb4df Make hero visible at start
Scroll to make the hero visible when starting and when the main window
is resized.
2026-08-27 18:10:26 -04:00
nhmall ebe14f87d9 corpse age comment cleanup 2026-08-26 10:22:46 -04:00
nhmall 15a017c030 fix undead corpses being edible now
In 3.6.x, zombie corpses were always aged an extra 100:

NetHack/src/mon.c

Line 375 in 23d331a

 obj->age -= 100; /* this is an *OLD* corpse */
in 5.0.x, zombie corpses are always aged TAINT_AGE, which is only 50:

NetHack/src/mon.c

Line 648 in 97a6c13

 obj->age -= (TAINT_AGE + 1); /* this is an *OLD* corpse */

This is the result of commit 408321b.
The accompanying comment states that the purpose of that patch was meant to
just replace hard-coded numbers with symbolic values, but the commit set
two differing numeric values to the same symbol name, thus causing the
regression reported in:

https://github.com/NetHack/NetHack/issues/1664

Revert the values to match those of 3.6, and add the additional symbolic value.

Closes #1664
2026-08-24 21:56:18 -04:00
Ray Chason f3e0dc49b8 Adjust screen height to allow for a task bar 2026-08-24 12:02:35 -04:00
Ray Chason a575fccf08 Add PNG support 2026-08-24 12:02:35 -04:00
Ray Chason cc47605531 Add BMP and GIF support 2026-08-24 12:02:35 -04:00
nhmall 97a6c131a9 Merge branch 'menu-columns' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-08-24 07:28:33 -04:00
nhmall b67553ccc7 follow-up 2026-08-23 19:33:39 -04:00
nhmall 9b4a8dfb05 mon interaction with terrain was postponed
Fix #576

Reported initially by @copperwater for polymorphed monsters:
"observe how the [polymorphed-monster] hovers placidly above the water for
several turns like Wile E. Coyote before it gets a move, realizes it's
above water, and drowns. Ditto for lava."

A comment in the GitHub issue thread by @Tomsod pointed out that a
revived corpse could do the same.

This should set things up for other terrain fallout if discovered or
implemented in the future.
   - consume an additional bit in enum mon_terrain_effects (hack.h)
   - include the additional bit in TERRAIN_FALLOUT_MASK (monst.h)
   - add detection to maybe_set_terrain_effects (mon.c)
   - add action to terrain_effects (mon.c)

Implemented by stealing some upper unused mstate bits to avoid
invalidating existing save and bones.
2026-08-23 18:51:13 -04:00
Ray Chason b61aef834e Set menu font to proportional 2026-08-22 20:46:13 -04:00
Ray Chason 7840d75365 X11: set menu font to proportional
Menus that needed to be tabified now are.
2026-08-22 20:43:46 -04:00
Pasi Kallinen f913cb3704 X11: support tab-separated menu columns 2026-08-22 10:59:12 +03:00
Ray Chason db32a639a7 Extend last column to end of line
If a line in the menu has fewer columns than the others, the last one
is deemed to extend to the right margin, and does not count toward the
maximum width of that column.

Also, revert the change to NetHack.font_menu.
2026-08-22 10:57:25 +03:00
Ray Chason cadde6d317 Use text window for display_file
The text window is assumed to use a monospaced font.
2026-08-22 10:57:25 +03:00
Ray Chason 84bf23640c Line up selectable items 2026-08-22 10:57:24 +03:00
Ray Chason ffb08d3be6 Don't set columns for rows without tabs 2026-08-22 10:57:24 +03:00
Ray Chason bc14bd7f30 Adjust extra menu width 2026-08-22 10:57:24 +03:00
Ray Chason ae8b4bf12a Add support for tabbed menu columns 2026-08-22 10:57:24 +03:00
nhmall 44b04064be static analyzer: use of uninitialized value 'origarg'
../sys/unix/unixmain.c: In function ‘process_options’:
  ../sys/unix/unixmain.c:458:9: warning: use of uninitialized value ‘origarg’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
    458 |         config_error_add("Unknown option: %.60s", origarg);
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2026-08-21 09:36:17 -04:00
Ray Chason 94834df5d1 Revise the column width calculation
The last column in a line continues to the end of the line, and may
overhang any subsequent columns in other lines.
2026-08-21 08:19:04 -04:00