Commit Graph

947 Commits

Author SHA1 Message Date
Barry Nelson
09cb9e2425 Fixed corridor symbols in Enhanced1 PR #1503
This is the Enhanced1 symbols changes that were part of
GitHub pull request #1503
https://github.com/NetHack/NetHack/pull/1503

This is not the full pull request.
2026-04-22 21:33:50 -04:00
PatR
84ddf85cb4 new composite status conditions: weaponstatus,\
armorstatus, and terrainstatus

This adds three special status items to show at a glance what the hero
is wielding, wearing, and standing on.

Each of the three items has its own boolean option rather than try to
fix them in with the existing opttional status conditions.  After a
lot of testing, I think the weapon and armor ones will prove useful
but the terrain one probably won't be.

Presently it is implemented for tty and curses.  When I developed it
six years ago, it was also working for X11 but I'm not able to test
the resurrection of that part so have left it out.
2026-04-16 13:35:08 -07:00
Alex Smith
45e8305918 True rumor and oracularity update
This removes or updates several true rumors that have become
misleading or inaccurate due to changes to the mechanics they were
describing, and adds several new rumors describing mechanics that
are either new, or are intended to be a larger part of the game
than they were in previous versions.

More oracularities describing the new mechanics are needed, but I
haven't managed to get into the write frame of mind to write in the
Oracle's voice yet...
2026-04-14 20:35:40 +01:00
Alex Smith
acfbd6d0e4 Add rolling boulder traps in Sokoban to reduce wrist strain
When playtesting NetHack heavily, I observed that most of the time
it wasn't placing much strain on my wrists, but Sokoban was an
exception: travel, farmove, etc. can normally be used to avoid the
need to spam keys, but they don't work while pushing a boulder, and
the boulders often need to be pushed along precise routes, so you
have to tap out every movement. This becomes particularly straining
when pushing in the last few boulders, as you have to push them a
long way along the goal corridor.

This commit adds rolling boulder traps to Sokoban that will
automatically roll boulders along the goal corridor, meaning that
you don't have to push them there manually. This considerably
reduces the number of keystrokes needed to solve Sokoban, without
making any significant change to the difficulty of the levels.
Some of the designs had to change slightly in order to make room
for them, but not in a way that meaningfully changes the solution.
2026-04-14 12:47:13 +01:00
Pasi Kallinen
f68f15e3b5 Simplify some special level lua
These were generated by a script that converted the des-file
format to lua.
2026-03-30 18:27:10 +03:00
PatR
11f27226cb 'pauper' documentation
The LaTeX Guidebook has been updated but not tested.  It's unlikely that
this small change has introduced any problems though.
2026-03-25 11:18:15 -07:00
nhmall
aa90cd5cd8 Merge branch 'amiga-port' of https://github.com/ingpaschke/NetHack into NetHack-3.7 2026-03-24 05:37:17 -04:00
Ingo Paschke
cb0b11be11 Add portable utilities for creating tiles, add AmigaFont to symbols
- bmp2iff_host: convert nhtiles.bmp to Amiga IFF tile files. Uses
  the AMIV UI palette in pens 0-15, remaining pens filled with tile
  colors sorted by frequency.
  Usage: bmp2iff_host -planes N input.bmp output.iff

- xpm2iff_host: convert XPM to IFF for tomb.iff (RIP screen).
  Adapted from xpm2iff.c, Copyright (c) 1995 Gregg Wonderly.

- Auto-select tiles32.iff (5 planes) or tiles16.iff (4 planes)
  based on screen color depth at runtime.

- Fix NO_GLYPH in amiv_lprint_glyph: return early to prevent
  blitting with uninitialised data (caused black spots).

- Add AmigaFont symbol set to dat/symbols for AMII text mode.
2026-03-23 21:11:56 +01:00
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
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
Alex Smith
62a50413d3 New debug command #wizobjprobs for listing item probabilities
As of the change to allow for item probabilities that don't add up
to 1000, it's become a little difficult to figure out the exact
probabilities from the source code, which makes it hard to balance
item generation. Adding a tool to list the probabilities helps.

Part of the problem is that changing an item's probability without
balancing it elsewhere is usually wrong: doing that would in effect
take the probability equally from (or add the probability equally
to) all other items in the class, which might break the balancing
of those items due to the probability change.

As such, it is usually better to make an intentional decision about
which items should be less and which items should be more likely to
generate, then change them in a balancing way (meaning that the
probabilities of objects that weren't intentionally changed remain
unchanged). Doing a complex such change makes arithmetic errors
fairly likely, though, so it's useful to have a command that verifies
that it's been done correctly.

This command is primarily intended as a development aid, so it's
included only in debug builds and pre-release builds (the same as
other similar commands like #wizmondiff).
2026-03-21 05:05:48 +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
1c5cf5382b Hellfill variance 2026-03-17 17:29:43 +02:00
Pasi Kallinen
3877e142e7 Add more bustle to bustling town 2026-02-08 17:19:53 +02:00
Pasi Kallinen
40b39c1026 Bigroom 13: Add few more pillar arrangements 2026-01-10 17:47:34 +02:00
Pasi Kallinen
e504d44de2 Add "snake wall" to bigroom variant 1
Also increase the chances of having walls in bigrm-1 from 75% to 80%
2026-01-10 11:19:52 +02:00
Pasi Kallinen
99b893c786 Add a new bigroom variant "pillars"
Some variants have a bigroom variant called "Mines of Moria";
this one is very much that, but has several different arrangements
of the pillars.
2026-01-09 19:39:45 +02:00
Alex Smith
656f58b099 A basic version of starting character rerolling
This adds a "reroll" option that lets players reroll their
character's attributes and starting inventory. Although I generally
think doing this makes the game worse, a) some players are going to
do it regardless and b) if a player is going for a challenge game,
rather than to win, it may be required. So in the absence of an
option like this, players repeatedly start and quit games instead,
creating a large number of junk logfile entries and generally
causing problems for other players on the same shared machine
(because repeatedly reloading the game is very CPU-intensive).

This should in theory be windowport-agnostic (although in practice
it may not be). Tested on tty, X11 and curses; on tty and X11 it
works fine (although X11 treats the change in attributes as
something that needs a status highlight), on curses it is slightly
jankier in terms of what other windows are drawn in the background
(but still plays correctly and I suspect this is a pre-existing
bug).

To form a complete implementation, we will need to consider the
following:

- Should there be a delay on a) starting the game and/or b)
  rerolling? If so, what should it be (maybe configurable via
  sysconf?)

- Should we take more steps to discourage players from rerolling?
  It would be bad if players see the option exists and turn it on
  just because it exists, or (worse) treat it as condoning the
  particular style of play.

- Should we take steps to detect that players are rerolling
  manually and a) tell them to use the option instead, b) tell them
  that this is not an intended way to play (and may make the game
  less enjoyable and/or prevent them getting the practice they need
  to eventually win)?

Breaks save and bones files.
2025-11-30 06:49:14 +00:00
Aaron Lebahn
bdffed390c Fix typo in encyclopedia 2025-10-02 11:36:49 -05:00
PatR
4bde4b439d 'opthelp' tidbit
Data typo affecting '?' command's "longer explanation of game options".
Change the indication of menu_objsym's default value from [5] to [4]
since 4 is the actual default value in the code and the Guidebook.
2025-08-08 13:41:27 -07:00
Pasi Kallinen
e5bd185ab5 Tutorial: untrapping traps 2025-07-10 13:48:16 +03:00
Pasi Kallinen
588dc6b73f Tutorial: quaffing potions 2025-07-10 13:40:04 +03:00
Pasi Kallinen
06ab2ce604 Tutorial: Knight jumping 2025-07-10 11:07:45 +03:00
Pasi Kallinen
44b9ffe245 Tutorial: tip containers 2025-07-10 11:01:30 +03:00
Pasi Kallinen
3440193a5a Tutorial: spellcasting
Add some basic spellcasting stuff to the tutorial: read a spellbook,
cast a spell.  If the hero doesn't have enough energy, just adds
a note saying so.

Remove/restore the known spells when entering/leaving the tutorial.
2025-07-09 18:30:58 +03:00
Pasi Kallinen
76de716d2d Tutorial: squeezing through small gaps 2025-07-03 10:09:51 +03:00
Pasi Kallinen
79bbd33675 Add a false rumor
... but is it false?
2025-07-01 21:04:45 +03:00
Pasi Kallinen
47e95a126e Tutorial: wrong secret door
Some first time players have gotten stuck here. Give them a hint.
2025-07-01 16:19:01 +03:00
Pasi Kallinen
751b296e3b Tutorial: boulders and a trapdoor 2025-06-30 18:00:08 +03:00
Pasi Kallinen
2b0530a5ed Tutorial: iron bars to show hidden stairs
Seems like several new players did not find the "hidden" stairs.
Add iron bars to show a glimpse of them - the hero still needs
to find the secret door in to the room.
2025-06-30 12:41:20 +03:00
Pasi Kallinen
a89d6b3bae Tutorial: fix non-alt keys shown as alt-combos
Lua doesn't have regexes, and "-" has special meaning in match;
escape the minus with "%", so it actually matches a minus sign.
2025-06-30 12:34:47 +03:00
Pasi Kallinen
7122c0cb0a Add a literary reference to genetic engineer database entry 2025-06-19 12:01:00 +03: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
PatR
a587ccaa26 merge new use_menu_glyphs option with menu_objsyms
The two options are very similar but probably mutually exclusive
except when using look-here and look-into-container (both via ':')
with the default setting for 'sortloot', or with inventory when
'sortpack' has been toggled off.

This removes 'use_menu_glyphs' and changes 'menu_objsyms' from a
boolean to a compound taking six possible values:
| 0: no object symbols in menus,
| 1: append object class symbol to object header lines (same as old
|menu_objsyms boolean),
| 2: include object symbol in menu entry lines for objects (same as
|recently added use_menu_glyphs),
| 3: both 1 and 2,
| 4: display as #2 but only if the menu lacks class header lines,
| 5: if header lines are present, display as #1; if headers are not
|present, then display as #4 (which will implicitly be #2).
Default is #4.

Effectively replaces the options portion of pull request #1406 and
retains the functionality, but not as default for normal menus.

Guidebook.tex is only partially updated.  Someone else will need to
finish that.
2025-04-28 18:12:02 -07:00
Kestrel
9e1e032ea8 use_menu_glyphs 2025-04-26 12:50:18 -07:00
PatR
e26a496088 fix issue #1309 - secret doors in Garden rooms
Issue reported by elunna:  when a room gets converted into a theme
room with fill type Garden, its walls are changed to trees but any
secret doors in those walls are still displayed as regular walls.

This adds a new D_ARBOREAL flag for secret doors, used to force them
to be displayed as a tree instead of a wall.

Fixes #1309
2025-04-12 17:21:40 -07:00
PatR
efee4553b6 github PR #1394 - "Mine's End" epitaph
Pull request from chappg:  add "I have reached Mine's End" to the set
of epitaphs.

Blame the explantory comment on me.

Closes #1394
2025-04-12 12:19:50 -07:00
Greg Chappell
9821caf984 Add "I have reached Mine's End" epitaph 2025-04-12 12:10:11 -07:00
rbsec
6a74f46c25 Fix a couple of incorrect names in the Terry Pratchett tributes 2025-04-12 10:36:37 -07:00
PatR
ab8ab7b344 more THEMERM and THEMERMFILL
Give a little more information if environment variable THEMERM or
THEMERMFILL has an invalid value.
2025-04-12 10:22:52 -07:00
PatR
48d1b8617e themerms.lua formatting
Do some reformatting of dat/themerms.lua.  I didn't try to reproduce
the changes that were in the reverted commit, and didn't slow through
to the end.
2025-04-11 17:07:55 -07:00
copperwater
3427c43df2 Guard against no themed rooms or fills being eligible to generate
The themed room code previously assumed that on any given level, at
least one room or fill would resolve as OK to generate there. However,
that's not a great assumption to make, and if it happened to be broken,
the first themed room or fill would arbitrarily be executed, even though
it wasn't eligible. Fix that by setting the initial pick to nil, and
raising an impossible if it's still nil after trying to choose a random
room.
2025-04-11 16:27:34 -07:00
copperwater
47e6edc663 Enable generating specific themed rooms for debugging
A common pain point I encounter when working on themed rooms is making
specific rooms generate. The only ways to do this were mass commenting
out the rooms not being tested, or hacking in different room frequency
values (even more annoying when testing a fill, not a room, or testing
pure-function rooms/fills that have no frequency).

This change solves that problem by allowing a wizard-mode user to define
THEMERM or THEMERMFILL environment variables to make specific rooms or
fills generate.

The first part of this change is converting all themed rooms and fills
that were plain functions into tables, and converting their comment
names into actual names in those tables. The names are not intended to
be shown during gameplay, but instead serve as values that THEMERM or
THEMERMFILL can be matched to to generate those rooms. It's no longer
possible to have a function themeroom; this will raise an impossible.
As far as I'm concerned, this is a good change because it allows some
code simplification of themerooms_generate and makes it easier to add
difficulty or eligibility parameters to rooms.

The second part of this change is adding a new nh.debug_themerm function
to make the environment variable values accessible to themerms.lua. I
looked for an existing way to do this but didn't see one (nh.variable
is the closest but appears to be for variables that get saved).

The final part is inserting behavior into the actual themeroom
generation code that changes how they generate when either a room or a
fill is set. I don't think it's safe to generate every single room with
the requested type or fill - that might lead to cases where the stairs
or a magic portal cannot generate. So it creates ordinary rooms half of
the time, which still results in plenty of themed rooms on levels.

Another thing to note is that any themed room using filler_region will
still only pick a fill 30% of the time. If one specifies both a fill and
a room that uses filler_region, many of those rooms will appear without
a themed fill.
2025-04-11 16:27:34 -07:00
PatR
5a910f3df7 Revert "whitespace cleanup for themerms.lua"
This reverts commit eee5a1698b.
Easier to commit PR #1384.
2025-04-11 15:19:06 -07:00
PatR
eee5a1698b whitespace cleanup for themerms.lua
I hope this doesn't break anything.  There seemed to be one or two
misplaced 'end' statements, but after some massaging I'm not sure
about this anymore.

There were lots of wide lines; those are easy.  The Water-surrounded
vault had very inconsistent indentation so was harder to untangle.
2025-03-30 14:43:09 -07:00
copperwater
f228a790b0 Clean up hardcoded material constant in water vault themerm
This implements a TODO to return an object's material as text rather
than as an int when a Lua file requests all the details about an
object's objclass. That is as simple as looking it up in materialnm[].

With that done, it's possible to clean up the one use where a Lua file
looks up the material of an object it generated, in the
"water-surrounded vault" themed room, previously an inflexible 19 but
which can now be compared directly to "glass". It also enables
shortening the comments that follow since the branches of the if
statement are now obvious.
2025-02-09 13:57:25 +02:00
PatR
5cd20d5389 finding data.base entry for stairs
When testing the analyzer lint fixes for pager.c, I noticed that //
wasn't finding the data.base entry for stairs when examining the up
stairs on level 1.  It is labelled "branch stairs up" which doesn't
match "stair*".
2025-01-22 13:16:42 -08:00
copperwater
2a50234565 Remove dented pot encyclopedia matching on 'helmet'
Dented pots got their own encyclopedia entry, so they shouldn't still
match to "helmet". Even without this change, they match the "dented pot"
entry correctly, but only by virtue of it appearing earlier in the
encyclopedia.

Inverting the match to "~dented pot" isn't necessary since it isn't
something that would otherwise match "helmet", so just remove it.
2025-01-04 16:48:05 +02:00
copperwater
171d48c881 Fix: brides of Dracula not generating in their niches
When the des.monster() statements for the vampire ladies were changed to
use the lua-table form, the coordinate argument was not given the coord=
name in the table, so the lua loader was ignoring it and the vampire
ladies were placed on random spaces on the level. Fix this by supplying
the coord=; testing shows that they now appear back in the niches.

Also lowercase the monster species id "Vampire Lady" to "vampire lady".
The uppercase didn't affect the species being generated but having the
id be the same case as in monsters.h is consistent with how it's done
everywhere else.
2025-01-02 08:06:53 +02:00