Commit Graph

18303 Commits

Author SHA1 Message Date
PatR
b074657f2b Guidebook.tex tidbit
This should eliminate an unwanted space.

Untested.
2026-02-12 07:37:31 -08:00
Pasi Kallinen
bbc3eea066 Make sure negatively enchanted boomerang hits anything 2026-02-12 14:32:58 +02:00
nhmall
cccb0303ed update tested versions of Visual Studio 2026-02-12 2026-02-12 07:01:52 -05:00
nhmall
a55ca3ab87 Guidebook.txt update 2026-02-12 06:30:54 -05:00
nhw_cron
2487be72f6 This is cron-daily v1-Jan-12-2026. 005manpages updated: makedefs.txt 2026-02-12 06:28:32 -05:00
PatR
3e24fbcc4e Guidebook.tex Artifacts and Relics
Match recent Guidebook.mn addition of two new subsections for Objects.

Untested.
2026-02-11 15:30:40 -08:00
nhmall
fcd9f5468c some coordxy follow-up
Return a couple of variables that actually held a direction back
to int from coordxy.

bhit() takes int params instead of coordxy.

boomhit() takes int params instead of coordxy.

xytod() renamed to xytodir(), and takes int params (promotion will handle
coordxy params).

dtoxy(coord *, int) renamed to dirtocoord(coord *, int).
2026-02-11 09:40:25 -05:00
Pasi Kallinen
db36ee35de Fix the healer knife bonus
dmgval is also used for monster attacks; move the healer knife
bonus to actual hero-specific code, and make sure it only
applies to hand-to-hand combat.
2026-02-11 08:22:02 +02:00
PatR
1135f5ffe5 Guidebook 'Relics'
List the three invocation items in the same order as the oracularity
about them does.
2026-02-10 13:50:01 -08:00
nhmall
b76d4338be avoid a reported obuf reuse in use_misc()
Report: https://github.com/NetHack/NetHack/issues/1486

Resolves #1486
2026-02-09 08:39:21 -05:00
Pasi Kallinen
4b30e3fab8 Healers may get tiny damage increase with knives
Styled as anatomy knowledge, a healer attacking a monster in melee
with a knife gets +1 damage per 6 dead monsters of that type,
capped at +3 damage.

Handwaving away the fact we're not keeping track who actually
killed the monsters...

Idea from aosdict.
2026-02-08 18:11:06 +02:00
Pasi Kallinen
3877e142e7 Add more bustle to bustling town 2026-02-08 17:19:53 +02:00
nhkeni
525ca734ae add checksum for lua 5.5.0 2026-02-07 21:39:03 -05:00
Pasi Kallinen
63dd80f5ec More code style nits 2026-02-07 17:03:54 +02:00
nhmall
8833e670cd Merge branch 'NetHack-3.7-prepare-for-groff-1.24' of https://github.com/g-branden-robinson/NetHack into NetHack-3.7 2026-02-07 08:07:30 -05:00
Pasi Kallinen
74390fb690 Split ray bouncing dir into separate function 2026-02-07 14:51:03 +02:00
g-branden-robinson
2fdfebde0d Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7-prepare-for-groff-1.24 2026-02-07 05:03:15 -06:00
G. Branden Robinson
a8253dda00 Update Unix hints to revise groff detection
The existing detection logic was not working on any groff since at least
1.22.3 (November 2014), as could be seen by uncommenting the "$(info
...)" line.  The regex used to match "nroff --version" output was
insufficiently flexible.

Fixes:
$ (cd doc && rm -f Guidebook && PATH=$HOME/groff-1.22.3/usr/bin:/bin make Guidebook) | grep NROFF
NROFFISGROFF=
$ (cd doc && rm -f Guidebook && PATH=$HOME/groff-1.22.4/usr/bin:/bin make Guidebook) | grep NROFF
NROFFISGROFF=
$ (cd doc && rm -f Guidebook && PATH=$HOME/groff-1.23.0/usr/bin:/bin make Guidebook) | grep NROFF
NROFFISGROFF=
$ (cd doc && rm -f Guidebook && PATH=$HOME/groff-HEAD/usr/bin:/bin make Guidebook) | grep NROFF
NROFFISGROFF=

Use a different approach in Make to recording groff detection.  Use
"grep -c" (which is POSIX-conforming) to count the number of matches so
that we can use the contents of the Make macro `NROFFISGROFF` as a sort
of Boolean, which reads more idiomatically (in my opinion).

Further, instead of trying to lexically analyze a matched line in the
output of "nroff --version" and parse components of a version number out
of it, use GNU troff's built-in facility for extracting its minor
version number by storing the output of a tiny *roff document that
reports that datum (and nothing else).

Ignore warnings in category "scale" in any version of groff, because the
`tmac.n` macro package provokes them.

Clarify comments.
2026-02-07 05:00:22 -06:00
G. Branden Robinson
b4bd6fb2b8 Guidebook: Improve package loading for groff 1.24
groff 1.24 is in its second release candidate of this writing and
features a noteworthy revision to its syntax.

---snip---
NEWS:
*  If your roff(7) documents follow any of the requests ... `so`, ...
   with a comment after their file name argument, and did not place that
   comment immediately after the file name, you are likely to get a
   diagnostic message resembling the following.

    warning: cannot open macro file 'e.tmac ': No such file or directory

   Or, less likely, the formatter will open the wrong file, one with
   spaces at the end of its name.  That is because these requests are
   now able to process file names containing space characters.  (This
   change also makes the request syntax consistent with that of `ds`,
   `as`, and others.)  A quick fix is to place the comment escape
   sequence as early as possible.  For example, we would change:

     .mso e.tmac \" Load Eric Allman's package.

   to:

     .mso e.tmac\" Load Eric Allman's package.

   to tell the formatter to load the "e.tmac" file rather than
   "e.tmac ".  See the items below for further details.
---end snip---

Work around this change while maintaining with older groff and other
*roff formatters.

1.  Stop using space to separate comments from the argument to `so`.
2.  Temporarily define a `So` macro to wrap the `soquiet` request (for
    groff 1.23 and later) or `so` request (for everything else).
3.  Abort formatting with an error diagnostic if the `nh` macro package
    the Guidebook requires cannot be located.

Fixes:
$ (cd doc && rm -f Guidebook && make Guidebook)
troff:<standard input>:34: error: cannot open 'tmac.nh ': No such file or directory
troff:<standard input>:35: error: cannot open 'doc/tmac.nh': No such file or directory
2026-02-07 05:00:22 -06:00
G. Branden Robinson
6a8edddcb9 doc/tmac.nh: Drop space after \c escape sequence
Fixes warning in category "syntax" from the forthcoming groff 1.24.

troff:<standard input>:790: warning: ignoring a space on input line after output line continuation escape sequence
[94 more occurrences]
2026-02-07 05:00:22 -06:00
G. Branden Robinson
f021aca3f7 doc/makedefs.6: Fix formatting error
Starting a text line with leading spaces causes a break when filling.
Usually this is not what is intended.

Fixes:
$ nroff -ww -z -rCHECKSTYLE=4 -man doc/*.[67]
an.tmac:doc/makedefs.6:102: style: 1 leading space(s) on input line
2026-02-07 05:00:18 -06:00
Pasi Kallinen
79c688cc6b Code style nit 2026-02-06 17:26:54 +02:00
Pasi Kallinen
37168ab188 Boomerangs can hit multiple monsters
The number of monsters it can hit depends on the enchantment.
2026-02-04 22:35:22 +02:00
Pasi Kallinen
27adb7c71d Light-spell is clerical, if playing a priest
Ideally the spell adjustment should be in o_init, but by that time
hero's role has not yet been set.
2026-02-03 12:07:12 +02:00
PatR
deec8317ce git issue #1467 - selection.match() boundaries
Issue reported by copperwater:
| a = selection.match(some_mapfrag);
| b = selection.match(another_mapfrag);
| c = a + b;
Instead of being a union of all the points that match either mapfrag,
the resulting selection c is empty.

[Report included a choice of two possible fixes.]
I put both in, without adequate testing of either one.

I didn't hit any problems with the existing special levels but didn't
try many theme rooms.

Closes #1467
2026-01-30 14:17:53 -08:00
PatR
f7b3337ae1 fuzzer vs highlight menus
From nearly three months ago...
2026-01-30 14:00:32 -08:00
Pasi Kallinen
b34b7e08a4 Fix lua reset_level
The lua des.reset_level() call did not reset the special level
coder, so some values were kept and couldn't be changed.
Adjust the movement tests for this change.
2026-01-28 10:06:58 +02:00
Pasi Kallinen
060c3de8eb Lua tests: code coverage for applying some items
Add a new debug flag prevent_pline, which prevents all messages
from going out to the UI. This prevents the tests from stopping
for -more-.
Add rudimentary tests for applying whistles, camera, and stethoscope.
2026-01-27 17:33:08 +02:00
PatR
e18f4b65a9 cure sickness feedback
A thread on Reddit mentions that successfully casting the cure sickness
spell when not Sick doesn't provide any feedback.  Change it to report
|You are not ill.
in that situation.  Also, give "you are no longer ill" feedback when
actually curing sickness after status gets updated.
2026-01-26 15:27:54 -08:00
Pasi Kallinen
11bed1f55b Lua tests: generation of each object
Test generation of every object, both via des.object and obj.new.
Expose FIRST_OBJECT and LAST_OBJECT numbers to lua.
Add lua nh.int_to_objname, a function to convert integer value to
object base name and class.
Allow creating new nethack lua object by specifying id and class.
2026-01-26 18:00:33 +02:00
PatR
b5ca1a3ed8 fix comment typo 2026-01-25 11:40:08 -08:00
nhmall
2a0d3eea64 a warning bit
Visual Studio build:
src/nhlsel.c(970) : warning C4702: unreachable code
2026-01-25 11:49:36 -05:00
Pasi Kallinen
2dc95dae42 Actually use the lua argc 2026-01-25 18:38:52 +02:00
Pasi Kallinen
92a8d1dab3 Lua tests: monster creation coverage
Expose constants NUMMONS, LOW_PM, and HIGH_PM to lua.
Allow converting an int to monster type name.
Create one of each type of monster in the lua tests.
2026-01-25 18:32:46 +02:00
nhmall
62f3969899 another Lua version bump follow-up 2026-01-25 10:34:27 -05:00
nhmall
e1a3180535 update tested versions of Visual Studio 2026-01-25 2026-01-25 09:51:22 -05:00
Pasi Kallinen
f73d9ee704 Expose selection size description to lua 2026-01-25 15:18:51 +02:00
Pasi Kallinen
4bf1fb5c68 Lua tests: more special level code coverage 2026-01-25 14:50:02 +02:00
Pasi Kallinen
8ae3d0f6bc Lua tests: code coverage for selection room and gradient 2026-01-25 14:18:01 +02:00
Pasi Kallinen
68ba3955fd Lua tests: more code coverage for rooms 2026-01-25 13:49:10 +02:00
PatR
cb8de068ad fix #S15038 - cursed magic whistle
Reported via contact form but misclassified as spam.  Applyin a magic
has a chance to teleport the hero to be adjacent to a pet rather than
vice versa, but it could do so even on no-teleport levels.
2026-01-24 20:03:22 -08:00
nhmall
77ea8de105 attempt 6 to fix CI build issue 2026-01-24 10:51:40 -05:00
nhmall
da208a0ac4 attempt 5 to fix CI build issue 2026-01-24 10:49:42 -05:00
nhmall
c19fd7d7f8 attempt 4 to fix CI build issue 2026-01-24 10:30:25 -05:00
nhmall
f54fc4908f attempt 3 to fix CI build issue 2026-01-24 10:28:42 -05:00
nhmall
33413604a0 attempt 2 to fix CI build issue 2026-01-24 09:49:20 -05:00
nhmall
41ccf8ecb2 attempt 1 to fix CI build issue 2026-01-24 09:47:51 -05:00
nhmall
cd9ea45895 Pull request #1473 fixes3-7-0.txt entry 2026-01-24 09:08:16 -05:00
nhmall
7c4437437b Merge branch 'NetHack-3.7' of https://github.com/danielclow/NetHack into pr1473 2026-01-24 09:04:48 -05:00
PatR
595e4720cc Guidebook update: artifacts
Add "objects" subsections for Artifacts and for Relics (invocation
tools).  They aren't very detailed but fill a gap.

I did this a while back but couldn't preview the outcome (aside from
the plain text version).  I used to be able to execute the command
'open Guidebook.ps' to display it with the Preview program.  That
program is still there but Apple has dropped support for Postscript,
presumably to stop paying royalties to Adobe or whoever owns it.
I've used ghostview for this before but encountered unexplained
trouble this time.  It eventually worked; I don't know what changed.

I haven't attempted to update the LaTeX version of the Guidebook, in
order to avoid merge issues with the pending Pull Request in case
anyone decides to incorporate that.  (I won't; I still don't have
tools to test it.)
2026-01-24 00:20:24 -08:00