Commit Graph
17999 Commits
Author SHA1 Message Date
nhmall 8d0b284dc6 update tested versions of Visual Studio 2025-06-04 2025-06-04 07:37:34 -04:00
nhmall b8aa0a507c warning in cfgfiles.c while building sfctool
../src/cfgfiles.c:457:9: warning: variable 'nsep' set but not used [-Wunused-but-set-variable]
  457 |     int nsep = 1;
      |         ^
1 warning generated.
2025-06-04 05:51:03 -04:00
PatR 45f751989a fix #K4331 - sticking from distance
Stop attacking if target isn't there anymore.  Already handled for
two-weapon in normal form, not for multi-attacks in poly'd form and
for multi-attack monster vs hero or monster vs other monster.

I didn't attempt to reproduce the reported problem.  This fix is
based on code inspection.

Also prevent monsters that have hug or engulf attacks from knocking
target back with other attacks since that prohibits the grab/engulf
from being able to hit.
2025-06-03 22:13:22 -07:00
nhmall 28af1d6410 whitespace cleanup in sfbase.c 2025-06-03 20:45:08 -04:00
nhmall 356f451b1b prevent a double free() 2025-06-03 07:35:34 -04:00
nhmall 6c6d8afb8f fix a warning during sfctool build 2025-06-02 22:37:48 -04:00
nhmall cb12423a2e sys/unix/Makefile.utl update for sfctool 2025-06-02 21:52:38 -04:00
nhmall d25e016140 typo fix again 2025-06-02 21:38:21 -04:00
nhmall c85b3f87d1 GNUmakefile follow-up 2025-06-02 21:33:05 -04:00
nhmall 34c010579b update sys/windows/Makefile.nmake for sfctool 2025-06-02 21:20:47 -04:00
nhmall 5d9656c801 typo fix in sys/windows/GNUmakefile 2025-06-02 21:17:40 -04:00
nhmall 1fb403f299 sfctool MSYS2 build 2025-06-02 21:08:38 -04:00
PatR 1aafd7dfcd monster weapon sanity check
In the context of sanity checking, an extra pass though the inventory
of every monster wielding a weapon is completely negligible, but it
is trivial to avoid so take it out.
2025-06-02 13:20:55 -07:00
nhmall f385f36c06 more Windows CI testing 2025-06-02 12:35:31 -04:00
nhmall 436b26c699 Revert "CI remove msbuild@1 task"
This reverts commit c7484730cc.
2025-06-02 12:32:28 -04:00
nhmall c7484730cc CI remove msbuild@1 task
Per https://devblogs.microsoft.com/devops/upcoming-updates-for-azure-pipelines-agents-images/
2025-06-02 12:25:30 -04:00
nhmall e33cf7a6d6 more CI, GNUmakefile interaction 2025-06-02 12:07:11 -04:00
nhmall 4fcbd91d22 fix a CI warning
-> ##[warning]The windows-2019 runner image is being deprecated, consider switching to windows-2022(windows-latest) or windows-2025 instead. For more details see https://github.com/actions/runner-images/issues/12045.
2025-06-02 12:03:30 -04:00
nhmall f262b8b015 CI mingw update 2025-06-02 12:00:42 -04:00
nhmall 4e93cfc825 CI update for mingw 2025-06-02 11:13:43 -04:00
nhmall 40c1842010 update Windows Makefile.nmake 2025-06-02 10:42:21 -04:00
nhmall a9c0cd624f a build fix, due to compile issue for pdcursesmod
GCC15 switched its default to -std=gnu23 and there's a bug in
pdcursesmod as a result. That impacts MSYS2/Mingw64 NetHack builds.
See: https://github.com/Bill-Gray/PDCursesMod/issues/333

The suggestion there is to force --std=gnu17 as a workaround.
2025-06-02 10:32:36 -04:00
nhmall afafc69eed MSYS2 build fixes 2025-06-02 08:50:10 -04:00
nhmall a0da9168b7 remove a debugging bit in restore.c 2025-06-01 22:43:34 -04:00
nhmall 8d5ffbd6e3 permapoisoned follow-up
otmp can be 0 in mk_artifact. In fact, it is explicitly
being set to 0 three lines above the recently added call
to permapoisoned().

The static analyzer was griping also.
2025-06-01 22:31:09 -04:00
Michael Allison 2414e56646 Xcode project update to include: cfgfiles.c sfbase.c 2025-06-01 22:04:44 -04:00
nhmall 66007e6783 remove duplicated code from sfctool.c, sftags.c
Link with hacklib to provide them instead
2025-06-01 15:32:55 -04:00
PatR 79be47b1ad montraits of weapon-wielding monsters
Have save_mtraits() clear wielded weapon when attaching monster
attributes to a corpse object.

And have monster sanity check verify that wielded weapon is in the
monster's inventory.
2025-05-31 16:41:43 -07:00
PatR 468be966fe wishing for "<shape> amulet"
I saw a mimic disguised as an octagonal amulet and wished for an
amulet of that shape to see what it was trying to tempt me with.
I got a random amulet instead of one with the requested description.
That was happening for any valid shape (it's expected behavior for
invalid descriptions, where only "amulet" matches).
2025-05-31 09:15:25 -07:00
nhmall 32e8aa1068 more descriptive message in sfctool for outdated savefile 2025-05-31 11:19:46 -04:00
Michael Allison 3aef3eef86 try to prevent a segfault on macOS 2025-05-31 10:55:06 -04:00
nhmall 31369c2101 more free_nhfile() will already call init_nhfile() 2025-05-31 07:36:44 -04:00
nhmall c05766e99f get_freeing_nhfile() comment 2025-05-31 07:17:40 -04:00
nhmall aa50f30653 free_nhfile() will already call init_nhfile() 2025-05-31 07:11:36 -04:00
PatR d2810a4bcd fix github issue #1413 - mimic feedback for gold
Issue reported by ars3niy:  if a mimic was given the shape of a
gold piece it gets reported as 2 gold pieces but the message was
|A gold pieces appears next to you.

Avoid article "A" prefix, and use plural verb "appear" instead of
singular "appears", yielding
|Gold pieces appear next to you.

Fixes #1413
2025-05-30 22:20:21 -07:00
PatR 4533208473 killer ants and soldier bees
This started out as an indentation fix but ended up tweaking a couple
of comments.  The other value adjustments all use 'n += X' rather than
directly modify 'tmp', so this changed more than just the indentation.
2025-05-30 19:50:14 -07:00
nhmall 9ef5e886ee consistent ATTRNORETURN prefix and NORETURN suffix 2025-05-30 22:01:20 -04:00
nhmall 50e5715ca5 fix X11 warning with gcc-15
../win/X11/winX.c: In function ‘init_standard_windows’:
../win/X11/winX.c:2769:46: warning: passing argument 2 of ‘XtAppSetErrorHandler’ makes ‘__attribute__((noreturn))’ qualified function pointer from unqualified [-Wdiscarded-qualifiers]
 2769 |     (void) XtAppSetErrorHandler(app_context, X11_error_handler);
      |                                              ^~~~~~~~~~~~~~~~~
In file included from ../win/X11/winX.c:27:
/usr/include/X11/Intrinsic.h:1771:5: note: expected ‘__attribute__((noreturn)) void (*)(char *)’ but argument is of type ‘void (*)(char *)’
 1771 |     XtErrorHandler      /* handler */ _X_NORETURN
      |     ^
2025-05-30 21:17:07 -04:00
nhmall e365b5b18f more static analyzer adjustments 2025-05-30 14:01:41 -04:00
nhmall 1bf92496f4 follow-up 2025-05-30 10:00:42 -04:00
nhmall 8a2b8796cd file descriptor leak reported by analyzer 2025-05-30 09:46:19 -04:00
nhmall 9ed1e6201a try to help out onefile 2025-05-30 09:09:10 -04:00
Alex Smith 308c5ab237 The Amulet of Yendor gives a wish when initially picked up
Part 4 of implementing wish spreading. (This is now a complete
implementation, although the details are likely to change - but it
makes sense to commit something with the right balance properties,
and then tweak it based on feedback from playtesting.)

This helps to make the Amulet of Yendor feel special, and restores
approximately the same average number of wishes per game as existed
prior to the nerf to wands of wishing.

Placing the wish in allmain helps to avoid the wish happening at an
awkward place in the game's control flow, and is simpler than
testing every possible mechanism for gaining items for bugs (message
order is a common issue when trying to place it in addinv-related
functions, and this also avoids issues with the wished-for item
immediately invalidating an assumption that was made by the calling
code).

It is possible that this would be better as an invoke effect,
although I like the impact of picking up the Amulet and immediately
being given a wish.
2025-05-30 02:10:58 +01:00
Alex Smith a8800a9acd Add a potion of gain level to the Castle chest
This is partly for balance reasons (so that clearing the Castle
helps towards the level 14 Quest unlock) and partly as a clue to
players spoiled on previous versions that the Castle wand now works
differently.
2025-05-30 01:45:30 +01:00
Alex Smith b92b0bbc69 Add a random magic marker or magic lamp to Orcustown
Part 3 of implementing wish spreading. These items are each worth
most of a wish for non-illiterate games (most games wish for a
magic marker, and a magic lamp gives a wish 80% of the time).

The placement of the random item could be better (currently it is
purely random, which is occasionally interesting but often boring),
but this will serve as a base for experimenting with the balance
properties of the moved wishes.
2025-05-30 01:40:42 +01:00
Alex Smith 615edb1c76 Wands of wishing start at (0:1) and can recharge only one charge
Part 2 of implementing wish spreading. This reduces the average
number of wishes at the Castle from 6 to 3.
2025-05-30 01:23:43 +01:00
Alex Smith 3fd30c4ec8 Special effects for Vlad's throne
Part 1 of implementing wish spreading. Vlad's throne is now
guaranteed to eventually give a wish, but has a range of other
powerful (and mostly bad) effects, like removing intrinsics, that
can be much harder to deal with than typical throne effects.
2025-05-30 01:11:41 +01:00
Alex Smith 0e50adcc1e Restore monsters.h to its previous order
This causes the difficulties to get out of sequence, but we agreed
that this is a less important rule than keeping monster IDs stable.

Breaks save and bones files, because it changes monster IDs.
2025-05-29 19:14:10 +01:00
Alex Smith 2bf00395f1 Vault guards are more reluctant to turn up if they keep dying
This is primarily meant as a fix for a farming strategy, although
it also makes sense in terms of the decisions the guards would
likely make.
2025-05-29 19:04:42 +01:00
Alex Smith 45bd98f10e Change #wizmondiff to account for soldier ant, killer bee changes 2025-05-29 18:58:40 +01:00