Commit Graph

5612 Commits

Author SHA1 Message Date
Pasi Kallinen
c0f5d2dd92 Allow monster level adjustments in special levels
Add a new parameter to des.monster, m_lev_adj, which is a level
adjustment for the monster.  This only applies to the monster's
level, so basically only affects the spellcasting, it does not
change the monster's hit die or inventory.

Change one of the shamans in Orctown to be 3 levels higher.
2026-03-23 12:51:50 +02:00
nhmall
e94a2f2bf2 doc/Guidebook.txt update Mar03-2026 2026-03-22 11:37:07 -04:00
nhmall
8ee179a594 Guidebook timestamp to reflect the most recent update 2026-03-22 09:30:16 -04:00
nhw_cron
dffb40c0e7 This is cron-daily v1-Jan-12-2026. 005guidebook updated: doc/Guidebook.txt 2026-03-21 18:01:37 -04:00
Pasi Kallinen
8e4c7f9fb5 Change some command keys
Change 'v' from #versionshort to #chronicle.
Change 'V' from #history to #versionshort.
History can still be accessed either directly with the extended command,
or via the help menu.
Versionshort now accepts the m-prefix, and then shows the longer version.
2026-03-21 17:56:37 +02:00
Pasi Kallinen
9fc1514253 Amulet of magical breathing increases energy regen
Normally energy regen is 1d2 or 1d3, so wearing the amulet increases
that to 1d4 or 1d5.  The only way to get energy regeneration is via
The Eye of the Aethiopica, so you cannot have both at the same time.
2026-03-21 13:20:14 +02:00
Pasi Kallinen
63a78edcfa Add toggle extended command
Allows the user to configure a key binding to toggle any boolean
option, for example:

BIND=':toggle(price_quotes)
BIND=v:toggle(autodig)

The option must be settable in-game.
2026-03-21 12:17:37 +02:00
nhw_cron
6cd742632c This is cron-daily v1-Jan-12-2026. 005guidebook updated: doc/Guidebook.txt 2026-03-19 11:36:11 -04:00
Alex Smith
e6d44c68e8 Overhaul of priest donations
The old code had two main problems: a) it was very difficult for
unspoiled players to figure out how it worked (because donating too
much got you a bad result, and the exact amount you needed depended
on magic numbers that weren't stated in game, and because you had to
hide your visible gold to get a good result); b) for players who
knew the mechanics, it was somewhat exploitable and also somewhat
tedious to make use of (due to needing to hide visible gold before
donating).

This change preserves the spirit of the previous code whilst making
things more transparent for new players and less tedious for existing
players: the donation amounts for the various effects are still
roughly the same (but randomized), but the amounts you need to donate
for clairvoyance and for protection are explicitly stated (and as
before, the alignment reset is done by donating an unnecessarily
large amount and isn't explicitly stated as an option).  If you have
a lot of visible gold, you still need to donate a sizeable proportion
of it to get a useful effect, but now you get a larger reward to
compensate for the larger donation (to the extent that doing this
gives comparable results to doing it as a series of small donations,
removing the incentive to hide your gold before donating).

There's also something here for those players who like to squeeze
every last point of optimality out of a game: the "obvious" donation
strategy gives decent results, but players who are really willing to
dig into the mechanics may be able to find a way to get slightly
better results on average (which if I've balanced this correctly,
will lead to a very long and complicated spoiler).

One other change is that this is now based on your peak rather than
current level, to fix an exploit in which the character was drained
down to level 1 to donate a very large amount of gold (improving by
20 AC points) and then immediately restored back to the previous
experience level using a blessed potion of restore ablity.

This breaks save compatibility, but is being pushed together with
other save-breaking changes to avoid the need for multiple bumps to
EDITLEVEL.
2026-03-19 05:10:09 +00:00
Alex Smith
4d043a6f9c Monsters require experience using wands before they can hit with them
It takes time for an early-game monster to acclimatize itself to the
power of an attack wand: in much the same way as a nervous human may
quite possibly miss with their first attempt to use a gun in combat,
an early-game monster will always miss on its first use of an attack
wand (but from then on will understand how they work and get over
their nerves, and will hit as normal).

This is a balance change based on observed results from tournaments:
guarding against deaths to early-game attack wands requires an
unusually cautious playstyle which isn't much fun (and might not
always be possible even for the best players), so it is quite common
for them to be the cause of random deaths that it wasn't worth trying
to avoid. Although trying to dodge a monster who found an attack wand
is fun, you only actually get that fun if something makes you aware
of the danger: the monster missing with the wand is a clear way to
demonstrate the danger and let the player know that now is the right
time to take precautions.

This change could theoretically have broken saves, but probably
doesn't due to there having been a spare bit in struct monst.  Just
in case, it is being pushed together with other save-breaking changes
to avoid the need for multiple bumps to EDITLEVEL.
2026-03-19 03:55:10 +00:00
Alex Smith
07fc4904c6 Add a new wand, the wand of stasis
A wand of stasis prevents teleportation (even in some cases where
it would normally not be prevented, e.g. the hero teleporting a
monster, or covetous monsters teleporting). This is intended to
provide an alternative tactic against covetous monsters (and their
AI has been adjusted to handle being under a stasis effect), but
might also be useful in other situations. It does not prevent
teleportation of objects, only the hero / monsters, and does not
at present prevent level teleportation (although I'm not sure about
this and it might well change in the future).

This breaks save compatibility, but is being pushed together with
other save-breaking changes to avoid the need for multiple bumps to
EDITLEVEL.
2026-03-19 01:16:30 +00:00
Alex Smith
6886b199be Teleport traps don't teleport you on no-teleport levels
In previous versions of NetHack, this wasn't a problem because
teleport traps didn't *generate* on such levels, but more recent
changes have made this situation possible (e.g. a demon lord
migrates to a Gehennom filler level that already had a teleport
trap on it).

This change causes a "wrenching sensation", like stepping onto a
teleport trap with magic resistance does.
2026-03-19 01:01:46 +00:00
Alex Smith
5d3a1e684b Add shields of shock resistance and of drain resistance
These both appear as "wooden shield" when unidentified; so does the
small shield.
2026-03-18 23:27:54 +00:00
Alex Smith
4fae45220e Remember price quotes that have been seen for types of item
These are displayed in discoveries, and a new 'price_quotes' option
allows them to be displayed for un-IDed objects in other contexts
too (the idea is that you turn on the option while identifying
objects and off for general play).

Invalidates existing save files.
2026-03-18 21:08:22 +00:00
Pasi Kallinen
9877e52025 Ring of stealth prevents hero from leaving tracks 2026-03-18 18:04:33 +02:00
Alex Smith
b6df17f342 Iron shoes protect / partially protect against certain trap types 2026-03-17 00:05:16 +00:00
Pasi Kallinen
619de1ec0e Make monster destroy armor -spell erode armor first
Instead of outright destroying the armor, the spell will instead
first erode the armor.  The spell hits 2-4 times, so if it hits
the same armor 4 times, it will get destroyed.  This does not
hit erodeproof armor.

Also change the scroll of destroy armor, so that blessed one will
destroy a cursed armor, if hero is only wearing that.
2026-03-16 11:24:19 +02:00
PatR
c30eea477d Shroedinger's dead cat
Give experience to the hero if opening Shroedinger's Box reveals a cat
corpse rather than releasing a live cat.

It feels a bit odd to assess a bonus rather than a penalty.
2026-03-12 13:12:42 -07:00
PatR
c47990d750 fixes3-7-0.txt typo 2026-03-06 13:43:51 -08:00
PatR
e19f4552e9 pull request #1403 - reset stat abuse/exercise
Pull request from greg-kennedy: when a characteristic is repaired via
restore ability, set exercise and abuse for that characteristic to 0.

Closes #1403
2026-02-17 14:56:52 -08:00
PatR
651a91f94c explain Amulet wish
In wizard mode, I used ^W to wish for the Amulet of Yendor and was
immediately prompted for another wish.  It was baffling and took a
while to figure out.  Give a message before initiating the wish.
2026-02-15 11:48:40 -08:00
Pasi Kallinen
78217c3ebd Allow rogues to backstab sleeping or paralyzed monsters 2026-02-13 12:53:21 +02:00
PatR
b074657f2b Guidebook.tex tidbit
This should eliminate an unwanted space.

Untested.
2026-02-12 07:37:31 -08: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
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
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
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
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
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
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
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
Pasi Kallinen
f73d9ee704 Expose selection size description to lua 2026-01-25 15:18:51 +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
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
Pasi Kallinen
e9f57281f8 Expose flip_level to lua 2026-01-20 17:50:27 +02:00
Pasi Kallinen
eed952a095 Add more death drops to leather golems
In addition to the leather armor, leather golems can now drop
leather cloaks and saddles.
2026-01-15 19:02:44 +02:00
Pasi Kallinen
a4e032762f Rope golems may death drop grappling hooks 2026-01-15 18:44:46 +02:00
Alex Smith
5d7b7b823a Monster-slowing effects work better against faster enemies
Based on the principle that there should always be at least two
solutions to any given problem, this allows monster-slowing magic
to be an effective solution to fast low-monMR monsters (in
particular home-plane air elementals, who after recent commits
could reasonably be dealt with using good AC, but I want a second
good option to be available, in addition to the existing mediocre
options).  This helps to make playing with bad AC (for whatever
reason) more viable.
2026-01-15 01:01:07 +00:00
Alex Smith
b4a3ec49e4 Make the "totally digested" instadeath timer much faster
This is one of the fairest instadeaths in the game (it gives
multiple warnings and there are reliable ways to escape it), but
is also where most of the threat of purple worms comes from. It
was also pretty much nonfunctional: the previously used formula set
the timer to somewhere around 50 turns (for a typical character in
Gehennom, which is where purple worms are normally encountered).

This new formula (which affects only purple worms, as the only
monster that engulfs and digests) is based on the same inputs, but
produces much smaller numbers, meaning that the instadeath is
relevant sometimes. A typical character at purple worm depth will
be able to kill faster than the timer if they focus on the purple
worm and put some damage on it before they get engulfed, but it is
much closer if the purple worm gets the first hit in (possibly
requiring the use of escape items, but the common wand of digging
works).

Hopefully this brings purple worms closer to their intended threat
level: previously they were somewhat more nonthreatening than they
should have been.
2026-01-15 00:40:42 +00:00
Alex Smith
253aea33fc Elemental Planes balance adjustments
The previous commit caused air elementals to become almost totally
nonthreatening in the endgame (even the buffed ones on the Plane of
Air). This commit fixes that (whilst still leaving them somewhat
weaker than they were before against characters with good AC), by
doubling the damage of home-plane air elementals.

The damage of the other home-plane elementals was doubled too,
because they were mostly nonthreatening previously. On Fire, this
has no real effect as almost any character would be fire-resistant
by this point. On Earth, it makes the elementals more of a threat,
when they previously weren't.

However, it made Water too difficult (albeit more fun, because it
became important to avoid letting water elementals swam you). As
such, water elementals are made slightly slower to compensate.
(My own playtesting indicates that 6 is slightly too fast, but 4 is
too slow, so I'm hoping that 5 is the correct value.)
2026-01-15 00:10:59 +00:00
Alex Smith
7881d5b4b2 Make air elementals respect damage reduction from AC
Players of both 3.4.3 and 3.7 have observed for a long time that
air elementals are disproportionately dangerous compared to other
endgame threats. (In particular, playtester feedback from 3.7 was
that the Plane of Air was much more dangerous than it should be,
with playtesters treating it similarly to Astral with respect to
the use of high-quality escape items.)

It turns out that this was because damage from air elementals while
engulfed was entirely ignoring AC, meaning that regardless of your
stats, you would be taking around 16.5 damage per turn while
engulfed (half physical damage helped, but nothing else did).

This commit purely fixes the bug, but does not balance around it,
which means that it causes the endgame air elementals to become
almost entirely nonthreatening. In a future commit, I plan to
balance around this change.
2026-01-14 23:21:40 +00:00
nhmall
96fedbdeab update generated files from cron daily 2026-01-14 09:34:50 -05:00