Commit Graph
19061 Commits
Author SHA1 Message Date
Alex Smith 738aa5c076 Make monsters not scared of the Sokoban rolling boulder traps
They aren't initially loaded with boulders, thus aren't dangerous.

This is particularly relevant for pets, who would otherwise be very
reluctant to follow their owners up to the level above.
2026-06-08 04:41:31 +01:00
Alex Smith 9f7a9d2c88 Prevent off-map monsters banking turns
If a monster is marked as off the map, then it is included in
iterations over the monster list, but not allowed to move. This
meant that such monsters would gain movement points on every turn
but not spend them, which could lead to the monster taking a lot of
turns in a row when placed back onto the map.

This commit removes the movement allocation from monsters that are
flagged as dead or removed from the map, meaning that they neve
get more than one turn's worth of movement allocation.
2026-06-08 04:04:12 +01:00
nhmall 28cc7cb6bf Merge branch 'msdos-colors' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-06-07 17:29:42 -04:00
Ray Chason a160322aef MS-DOS: Fix custom colors in VESA BIOS mode
The basic colors are being displayed as black. Colors specified as RGB
are not being converted to the pixel format for the current mode.  This
manifests as walls in dungeon branches being drawn in black when the
symbol set is IBMgraphics, and in the wrong color when Enhanced1 is in
use and the display mode uses 15 or 16 bits per pixel. A particular
mode that shows this bug is 1024 by 768 under DOSBox.
2026-06-07 17:09:27 -04:00
0x0b1ade 4d590abac1 Add length checks in init_dungeon_dungeons 2026-06-07 22:02:20 +08:00
nhmall cbfd3aa944 placement for the added save_currentstate() call wasn't right
in gulpmu() that particular placement would result in u.uswallow = 0,
and u.ustuck set.

A better optimal location needs to be sought.
2026-06-07 01:52:54 -04:00
nhmall 51486d0c02 fix recover failure after unexpected exit
u.ustuck and u.usteed are handled differently in 5.0.0 than
in previous releases, and an unexpected halt to NetHack could
result in an inability to use recover to get the game back.

If the hero was engulfed, u.uswallow, could get saved to the
checkpoint file with a value of 1 without a corresponding
u.ustuck_mid value representing the m_id of the engulfing monster.

Recover had no information to use to restore the u.ustuck pointer
when loading the monsters on the level.

With u.uswallow set to 1, the game would proceed to enter if-blocks
based on that, and then crash/fault when it attempted to dereference
u.ustuck, during the recover attempt.

This updates the values of u.ustuck_mid immediately before saving
struct you during a checkpoint, so that the resulting file had
u.uswallow and u.ustuck_mid values that were in concert.

It does the same for u.usteed and u.usteed_mid.

This also now adds a save_currentstate() checkpoint call when
the swallowed/unswallowed status changes, that is whenever set_ustuck()
is called.
2026-06-07 01:31:19 -04:00
nhmall 1f4198c705 aklys message improvements 2026-06-06 15:01:54 -04:00
nhmall 498db90437 follow-up: fixes5-0-1.txt entry 2026-06-06 12:29:39 -04:00
nhmall 7f787a372a Merge branch 'pl_character-overflow' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-06-06 12:27:03 -04:00
Ray Chason 19c85c1987 Don't overflow svp.plname on restore 2026-06-06 12:10:15 -04:00
nhmall ed1b4af5cd fix build on Windows arm64 2026-06-06 10:36:47 -04:00
nhmall 393f42cd6f follow-up: grammar and format string 2026-06-05 20:17:48 -04:00
Ingo Paschke 78f59660d0 mac: drop the obsolete exit getreturn
The revived mac68k port (on the m68k-wip branch) removed it: it runs
an event loop after exit_nhwindows() has torn the windowing system
down and crashes; the tombstone already pauses.  Removing it here too
keeps the block from resurfacing in NetHack-5.0 <-> m68k-wip merges.
2026-06-05 19:46:05 +02:00
Ingo Paschke 28ca8b26c3 rename MACOS9 to MAC68K to avoid confusion with modern macOS 2026-06-05 16:30:09 +02:00
nhmall 2950bd85cb Revert "don't attempt with a blank host name in fetch-lua"
This reverts commit 9566605ba2.
2026-06-04 21:17:41 -04:00
nhmall f2fc324bef Revert "follow-up"
This reverts commit 0ea0de5301.
2026-06-04 21:17:15 -04:00
nhmall d1f9c17418 Revert "yet another follow-up for Makefile.top fetch-Lua"
This reverts commit 784692fd40.
2026-06-04 21:16:44 -04:00
nhmall c20f5acbb5 Revert "one more follow-up"
This reverts commit 1c649facea.
2026-06-04 21:16:17 -04:00
nhmall 1c649facea one more follow-up 2026-06-04 20:32:50 -04:00
nhmall 784692fd40 yet another follow-up for Makefile.top fetch-Lua 2026-06-04 20:22:50 -04:00
nhmall 0ea0de5301 follow-up 2026-06-04 20:14:29 -04:00
nhmall 9566605ba2 don't attempt with a blank host name in fetch-lua
After exhausting the three URL's for fetch-lua, exit with error,
don't try to connect to a URL with a blank host name.
2026-06-04 20:01:46 -04:00
nhmall cdd42b88a2 curl was not returning an error to shell on 404 error
Add the --fail option to curl to make it do so.
2026-06-04 19:21:26 -04:00
nhmall 19f0ae07cc follow-up: regression reported, so comment out until researched 2026-06-04 16:55:33 -04:00
nhmall 3d46ee9523 follow-up from yesterday: ascii_map done uniquely 2026-06-04 15:57:53 -04:00
nhmall 6c1d7c074d follow-up: do the flush_screen(0) at end always 2026-06-04 15:54:11 -04:00
nhmall 93e7928a6f follow-up: fixes5-0-1.txt update 2026-06-04 15:44:41 -04:00
nhmall 2edf27f0f0 aklys fixes
track which locations had updates that could be seen in tmp_at()
to aid in cleanup.

ensure that nothing is shown for places that the hero can't see
(internal buglist entry 3161).

adjust several aklys messages to better reflect the tethering
aspect.
2026-06-04 15:36:12 -04:00
nhmall ecfa78f974 cherry-pick for CROSS; use "?=" for MAKELUAFLAGS
Using "?=" allows a hints file to set that ahead of Makefile
2026-06-04 07:21:22 -04:00
Ingo Paschke 63cb04f410 hints: keep host CC for top-level lua in cross builds
LUAMAKEFLAGS uses TARGET_CC, which the cross hints override to the
target compiler.  The top-level liblua.a is a host-side prerequisite
of the generated include/nhlua.h; the target lua is built separately
under BUILD_TARGET_LUA.
2026-06-04 07:17:35 -04:00
nhmall 006867cf0d catch-up entry for fixes5-0-1.txt 2026-06-03 19:48:46 -04:00
nhmall fd0a4ec878 optlist.h maintenance
A very small number of boolean options had drifted, such that
their initval setting did not match its opt_in or opt_out value.

Correct that, by ensuring opt_in or opt_out reflects what was
actually happening.

The only option whose initial value is changing as a result
of this is timed_delay. It was listed as an opt_out option, but
was not being initialized as such. Now it is. This makes the
Mac X11 throwing animations work correctly with the earlier
timed_delay option adjustments for X11. There was nothing
displaying on Mac X11 after those earlier changes, unless
the timed_delay option was turned on.

Going forward, for boolean options, setting opt_in or opt_out
is all that is required, as that was the original intention
of those fields. It will take precedence if they fall out of
sync again.
2026-06-03 17:44:49 -04:00
nhmall cd047cc6b8 thinko in comment 2026-06-03 16:38:53 -04:00
nhmall 8182cf3982 required after TIMED_DELAY fix previously committed 2026-06-03 16:29:51 -04:00
Pasi Kallinen eb4d098717 X11: Obey timed_delay
I noticed a strange thing where the X11 windowport didn't show the tethered
thrown aklys animation correctly.  Interestingly, other stuff, such as zapped
wands did show the path.  I didn't bother trying to figure out what the core
was doing differently, as the animation worked in all the other windowports,
so instead fix the issue in X11, so it behaves the same as all the others.

The issue seems to be that the event loop exited on any(?) event, instead
of our specific timed event.  So, create our event with a magic id number,
and exit only when we encounter that.

Also: Obey the timed_delay option, and change the delay from 30ms to 50ms,
like in other windowports.
2026-06-03 23:06:30 +03:00
nhmall d4e2c577ba follow-up: CC override was in MAKELUAFLAGS
Just make sure it is uing the correct one
remove the addition in the previous commit
2026-06-03 13:49:43 -04:00
nhmall 4b65360d3c allow hints file to specify compiler for Lua 2026-06-03 13:45:49 -04:00
nhmall 49d3d5ecd8 Makefile.utl would allow hints file to specify TARGET_CC 2026-06-03 13:27:19 -04:00
Pasi Kallinen 4fadc7c96f Fix qt compile
Some recent Makefile hints reorg messed with the Qt compile,
it needs to be linked tiles
2026-06-03 10:54:16 +03:00
nhmall 0aba284106 better placement for ensuring graving vanishes
This is better placement for making the original
engraving vanish when told that it vanishes;
helps to ensure that it isn't showing for any
next steps.

also, a warning bit
2026-06-02 09:34:52 -04:00
nhmall 29c300b4e0 stale engraving marker still showing at prompt 2026-06-01 20:44:17 -04:00
nhmall a31a9cb152 Makefile.nmake updates for git_sha 2026-05-31 18:28:06 -04:00
nhmall c112e50afe follow-up: indentation bit 2026-05-31 13:57:56 -04:00
nhmall ef48aa3c18 Merge branch 'fix-libnh-glyphpiletop-constant' of https://github.com/avgas3/NetHack into NetHack-5.0 2026-05-31 13:46:23 -04:00
nhmall 055caaffbf revisit shop_keeper() readiness
During a restore from a savefiles is not the only
time that levels are processed by getlev() in NetHack.
They are read back in as the hero moves up and down
between levels and dungeons.

The previous fix checked for program_state.beyond_savefile_load,
but once set, that remains static through level changes.

It would be better to check the status of the level
being read, because those operations do placements as well.

Add the following:
    struct levelstatus level_status;
    level_status.making   - in the midst of makelevel processing
    level_status.loading  - in the midst of loading a level via getlev()
    level_status.ready    - the level is fully ready

    (all 3 of the above status settings are mutually exclusive)

    level_status.shkready - the level processing is far enough
                            along to allow shop keeper tests and actions

This also relocates the find_lev_obj() call in getlev() down several
lines, so that it falls after any set_residency() calls, so that it
has a better chance of carrying out what it was intending to do with
the shop_keeper() checks made by its subfunctions.
2026-05-31 13:26:34 -04:00
Housebot 3096da48fe libnh: export GLYPH_PILETOP_OFF constant
Expose GLYPH_PILETOP_OFF in libnh JS constants so embedding apps
can distinguish statue glyphs from piletop glyphs.
2026-05-31 11:21:25 -06:00
nhmall f72554a238 avoid shk interaction too early 2026-05-30 15:54:18 -04:00
nhmall b6b35a8d0f yet-another fixes5-0-1.txt update 2026-05-30 11:48:31 -04:00
nhmall 13ff430b14 Alter the fixes5-0-1.txt entry to match code 2026-05-30 11:45:20 -04:00