Commit Graph

901 Commits

Author SHA1 Message Date
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
copperwater
292957407f Fix: ravens specified as hostile on Medusa's Island could be peaceful
Noticed when testing the recent bec de corbin change which makes ravens
generate as peaceful; if you happened to enter medusa-3 while wielding
one, all the ravens are peaceful. Even without one, if you entered the
level as a neutral character, some of them would randomly be peaceful
due to matching alignment. But in the medusa-3.lua file, the ravens are
all unconditionally flagged as hostile.

The reason for this behavior is that the lua loading code does not
recognize "hostile" (instead peaceful=0 needs to be set), so it does
nothing and leaves the ravens to generate as if it had been unspecified.
It appeared to affect only these ravens; no other des.monster() uses
hostile=1 instead of peaceful=0.

This bug has been around in the 3.7 development branch since the change
to Lua, but doesn't happen in 3.6 because the des parser does interpret
"hostile" as meaning never peaceful.

I considered augmenting lspo_monster so that it could handle "hostile"
and treat it like peaceful=0, but figure it's probably better not to
have two different booleans that control the same flag (what if someone
specified peaceful = 1 and hostile = 1?)
2025-01-02 08:05:31 +02:00
copperwater
41d95d4325 Fix some bigroom wall corners to how they display in-game
Noticed a few corners in some bigroom maps were | instead of -, which
doesn't have any gameplay effect but was mildly annoying for what I was
doing at the time (copying the maps out into documentation that is
supposed to show what the maps look like in-game).

There are other special levels out there that still use | for corners;
this doesn't address those, only the bigrooms.
2025-01-02 08:03:21 +02:00
Pasi Kallinen
8b11bda6cb Open cavern -style Gehennom filler level 2024-12-22 18:14:12 +02:00
nhmall
f12d755ba2 Makefile.nmake updates
Be more consistent in the use of path separators.

Add a second version of Makefile variables that contain paths,
one with a trailing separator, and one without (prefixed with R_
for use in Makefile rules).

Also, in dat/luahelper,

Updates due to correspond to the Makefile.nmake changes.

Add Makefile variable AWK to use $(AWK) instead of hardcoded awk.
2024-12-22 09:43:00 -05:00
Pasi Kallinen
f7e86aa150 Add a new bigroom variant "two hexagons" 2024-12-21 12:19:26 +02:00
Pasi Kallinen
e7a714849e luahelper doc nit 2024-12-21 12:06:20 +02:00
nhmall
d42c4faea0 suppress "Entering directory" messages from the output 2024-12-21 01:19:34 -05:00
nhmall
f490e54d88 update target all in dat/luahelper 2024-12-21 01:15:54 -05:00
nhmall
7c54d9e651 add support for vs files.props to dat/luahelper 2024-12-21 01:13:45 -05:00
nhmall
20511564f7 utility to help maintain lua files on platform builds
Use by:

  make -f dat/luahelper [target]

  Target examples:

      Visual Studio nmake  : make -f dat/luahelper devhelp-nmake >file.txt

      msys2 GNUmakefile    : make -f dat/luahelper devhelp-msys >file.txt

      Xcode project.pbxproj: make -f dat/luahelper devhelp-xcode >file.txt

      all: generate txt files for all the above
2024-12-21 00:47:18 -05:00
Pasi Kallinen
5eb7566eba Prevent two possible ways to die in the tutorial 2024-12-06 17:36:34 +02:00
Pasi Kallinen
4b15085bb1 Avoid naming Vlad's entourage if vampires are genocided 2024-12-05 16:16:55 +02:00
Pasi Kallinen
b73581b745 Looking around the map in tutorial 2024-12-05 15:42:15 +02:00
Pasi Kallinen
08be1bafdd Explain ctrl-key combos in tutorial
When tutorializing a command that uses a ^X notation, show Ctrl-X
instead.  Also show an explanation of the ^X nearby.

The only ctrl-key combination that can currently happen in the tutorial,
without rebinding keys, is the kick-command.

Fixes #1327
2024-12-05 15:36:30 +02:00
Pasi Kallinen
f12635ccd9 Prevent monster generation in the sokoban trap hallway
Makes Sokoban far less tedious when you don't have to worry about
monsters randomly popping up in the trap hallway while you're pushing
the boulder.

Adds a new exclusion zone for monster generation, and the goodpos
routine avoids the zones when GP_AVOID_MONPOS is used.
2024-10-18 13:30:51 +03:00
PatR
9a0fc62127 pauper legacy
Give a different introduction (the "legacy" text) when starting play
as a pauper.
2024-09-20 22:19:59 -07:00
PatR
796497015f tribute fix - Lords and Ladies, passage 6
Omitted word mistake occurred in the transcription, not in the book.
2024-09-19 22:14:49 -07:00
PatR
8e85561725 cursesgraphics fix - S_engroom character
I normally force DECgraphics for tty and for curses so hadn't noticed
this before.  I recently let curses default to 'cursesgraphics' and the
engraving-in-room character was crossed horizontal and vertical bars,
the crosswall character.  It certainly stood out in the middle of a
room, but the emphasis seems out of proportion for "engraving here".

There is no 'epsilon' among the DEC line drawing characters.  Curses
might be able to render one, but not with DEC-style rendering of 0xEE.
Comment out S_engroom so that curses inherits the default backtick.
2024-08-30 14:19:19 -07:00
Pasi Kallinen
951401e52a Allow fixed-destination teleport traps
Add a theme room with multiple visible teleportation traps
which will always teleport to specific locations in the same level.

Teleport trap change from xNetHack by copperwater <aosdict@gmail.com>.
2024-06-14 19:50:20 +03:00
PatR
d8aa4c0b1f still more brides of Dracula
Another tweak to PR #1240.  Vampires start out vampshifted to
bat/fog/wolf form.  Marking them as 'waiting' forces them back to
vampire form.  Testing that revealed one of the brides as a vampire
lord rather than a vampire lady.  That could probably be construed
as being politically correct but doesn't match the source material.

The reversion from vampshifted to vampire entailed a 10% chance of
toggling gender, comparable to hero self-polymorph.  Don't do that
for vampires.  From the player's perspective they change randomly but
from their own perspective, the change is controlled.
2024-06-01 02:08:06 -07:00
PatR
30f5f0055d more Brides of Dracula
Extend PR #1240 by giving the three brides names.

It looks a bit odd when they're in bat/fog/wolf form rather than in
base vampire lady form but I think that we can live with that.
2024-05-31 11:06:22 -07:00
Kestrel Gregorich-Trevor
d956ab502d pull request #1240 - Brides of Dracula
In the original Bram Stoker novel, Dracula has three brides,
colloquially referred to as the [Brides of Dracula]
(https://en.wikipedia.org/wiki/Brides_of_Dracula).  I thought it would
be a nice touch for NetHack to quietly reflect this by ensuring three
of the vampires of his court are vampire ladies.  While this
technically increases the difficulty of Vlad's Tower, the vampires in
Vlad's court are not necessary to fight, and the experience level of
a hero at this point in the game is likely to cause them to spawn as
vampire lords or ladies in any case.

No established names exist for these characters, so I have left them
unnamed.

[Cherry picked rather than merged into order to reformat the commit's
log message.  PatR]

Closes #1240
2024-05-31 10:38:05 -07:00
Pasi Kallinen
38a5dac08c Tutorial: add farlooking 2024-05-20 17:51:56 +03:00
PatR
d0bc457279 Perseus's statue location on medusa-3 and medusa-4
Coming up to medusa-3 from the level below revealed that Perseus's
statue was not there.  It was placed randomly in one of the three
chambers where Medusa might be rather than in the one where she
actually was.  Medusa-4 behaved similarly.

Initially I was forcing the statue to be adjacent to Medusa rather
than on her spot, but medusa-1 and medusa-2 don't do that so I've
gone with a simplified revision.
2024-05-19 14:44:10 -07:00
nhmall
38d2294257 revert 184c9e3b and re-commit partial
Reason: The following concern was raised:
"The trademark indicators were not out of sync.  The Guidebook
uses footnotes for that, 'history' uses "(tm)" in the text which
works better when nethack displays the text."
2024-05-13 14:12:38 -04:00
nhmall
5e765679c8 Revert "Merge branch 'update-history' of https://github.com/argrath/NetHack into"
This reverts commit 184c9e3b92, reversing
changes made to 8e6f3ccc7d.
2024-05-13 14:09:01 -04:00
nhmall
86bb71ef76 merge pr #1213
@Umbire wrote:
Very simple change code-wise - if he's gonna use a yumi a hunter of his expertise should presumably have the projectiles match.

Closes #1213.
2024-05-13 12:58:02 -04:00
nhmall
184c9e3b92 Merge branch 'update-history' of https://github.com/argrath/NetHack into
NetHack-3.7

@argrath reported that some of the text had fallen out of sync.

Closes #1225.
2024-05-13 12:52:07 -04:00
Pasi Kallinen
016ff166c0 Slightly more variance to hellfill maze v5 2024-05-11 10:02:23 +03:00
PatR
236ea3b99e fix #4131 - medusa-4 level layout
The medusa-3 and medusa-4 levels each have four possible locations
for Medusa.  medusa-3 forced the downstairs to have the same location
but medusa-4 was choosing Medusa's location independently from the
stair location.  So it was likly that the hero could go down to the
next level without having to deal with her.
2024-05-08 07:56:42 -07:00
Patric Mueller
edaf4ac438 Remove doubled definitive article from Monk quest texts 2024-05-03 13:19:32 +02:00
Pasi Kallinen
a429eed984 Add Garden themeroom
Contains some wood nymphs and fountains, and the room walls are trees.

Adds a new lua hook for themeroom generation, "post_level_generate",
which is called last when generating the level.
2024-04-20 19:27:48 +03:00
nhmall
f5c3445e80 a couple of level color tweaks 2024-03-24 15:56:45 -04:00
nhmall
19f1036672 add some custom color glyph definitions to a few symsets
Exercise the previous commit a little.

FIQ's suggested wildcard syntax would make this easier
and a lot less verbose, but that isn't available yet.

This updates (adds some colored walls on specific levels) to the following:

IBMgraphics
IBMgraphics_1
IBMgraphics_2
curses
DECgraphics
2024-03-23 15:41:48 -04:00
SHIRAKATA Kentaro
982e98a177 Update history to sync with the Guidebook 2024-03-20 04:29:05 +09:00
nhmall
6619d10d90 ENHANCED_SYMBOLS: store all CLR_ colors specially
The 0x1000000 bit (NH_BASIC_COLOR bit) was used to mark
CLR_BLACK when storing it in u->ucolor. Now, all of the basic CLR_*
colors are stored that way.

The NH_BASIC_COLOR bit indicates that the value in u->ucolor is
not an rgb value, rather it is one of the 0-15 basic NetHack colors.
The window-ports need to strip the NH_BASIC_COLOR bit off before using
it for color changes.
2024-03-03 18:31:11 -05:00
PatR
9a866688c5 engravings shown with symset:blank
Noticed when testing the OPTIONS=symset:blank fix, map spots holding
engravings weren't blank.

Are there any other relatively recently added symbols that need to be
added to the blank set?
2024-03-02 06:12:34 -08:00
RainRat
a3658f85ac fix typos 2024-02-28 20:15:56 -08:00
PatR
41a5565403 new 'showvers' option
Add options 'showvers' (boolean) and 'versinfo' (numeric mask) to
show nethack's version on the status lines during play.  It won't be
particularly interesting to ordinary players but should be useful
when making screenshots or video to be streamed, or for someone who
switches between git branches or between nethack and variants.

I worked on this several months back but it was combined with
unfinished changes to 'hitpointbar'.  I've separated it out so that
it can be put into use.  When enabled, one or more components of
"<name> <branch> <version>" will be shown right justified after
status conditions.  At present the default is "<branch>" if that is
available and overall status isn't 'released', or "<version>" if
'released' or if branch isn't available.  That might need some
refinement.

It works as intended for tty and curses, although some abbreviation
mechanism would be useful if/when the program resorts to abbreviating
status conditions to make things narrow enough to fit.

For X11, it works ok for fancy_status:True (the default, controlled
via NetHack.ad settings) but is messed up for tty-style status.  The
text is positioned correctly but there are gaps in it, making it
appear garbled, similar to what I saw when I tried and failed to
implement statuslines:3 for X11.  [It might be due to having empty
condition widgets be 1 pixel wide instead of being totally removed
but I don't think the situation is that simple.]

For Qt, if the text needs to be truncated in order to fit, the center
portion of the string will be shown, discarding parts from the left
and right.  That ought to discard from left and retain rightmost
portion instead.

For win32|mswin|Win GUI, no attempt to support it has been included.
Things should be ok when 'showvers' is left as False (the default)
but I don't know what will happen if that gets toggled to True.  At a
minimum, the version info won't be right justified.  The information,
or at least some of it, is displayed in the game window's title bar
so there isn't any pressing need to add it to status, but toggling
the option will need to behave sensibly if it doesn't already.
2024-02-28 11:47:16 -08:00
Umbire
9688c8b4d8 Give Orion ammo that fits launcher
Very simple change code-wise - if he's gonna use a yumi a hunter of his expertise should presumably have the projectiles match.
2024-02-21 16:15:00 -05:00
Pasi Kallinen
d42efcd04f Slightly randomize the spellbook in vlad's tower
Replace the guaranteed invisibility with a somewhat high-level
spell sort-of thematical to Vlad or vampires in general
2024-02-21 09:47:47 +02:00
nhkeni
3d3ce2369c Merge branch 'keni-wincw2' into NetHack-3.7
Lots of manually resolved conflicts.
2024-02-15 16:25:12 -05:00
PatR
bf8a634760 nethack --version:dump
Add the 'dump' argument to the existing '--version' command-line
option to display the magic numbers used when validating save and
bones files for compatibility.

Nothing exciting, just a line of 5 hex values.  I was going to also
list the values for however many save and bones files are specified
on the command line but it seems to need more effort than I care to
expend.  And I hadn't made up my mind whether that should be done by
nethack, recover, or some new standalone program.  [Single line of
relatively raw output is so that they could be compared more easily.]

nethack --version:bad-argument was writing a message to stdout and
then starting play--which immediately overwrites stdout.  Have it
quit instead.  Player wasn't trying to start a game and quitting is
what it does with --version:good-argument.
2024-02-13 15:58:10 -08:00
nhkeni
dbe5c98dca add CRASHREPORT directly to browser
add CRASHREPORT for Windows
add ^P info to report (via DUMPLOG)

new options: crash_email, crash_name, crash_urlmax
new game command: #bugreport
new config option: CRASHREPORT_EXEC_NOSTDERR
new command line option: --bidshow

deleted helper scripts:
    NetHackCrashReport.Javascript
    nhcrashreport.lua

misc:
    update CRASHREPORTURL (will need to be updated before release)
    update bitrot in winchain
    winchain for Windows
    add missing synch_wait for NetHackW --showpaths
    add PANICTRACE (and CRASHREPORT) in mdlib.c:build_opts

missing:
    packaging (Windows needs the pdb file)
    no testing with MSVC command line build

port status:
    linux: working, but glibc's backtrace doesn't show static functions
    Windows VS: working.  pdb file is large - looking into options
    MacOS: working
    msdos: not supported
    VMS: not supported
    MSVC: planned, but not attempted
    MSYS2: working, but libbacktrace not showing symbols (yet?)
2024-02-06 18:33:59 -05:00
Michael Meyer
3025e05579 Copyedit PYEC encyclopedia entry
I initially went in here to change the description of "unreadable" text
on the card, since it has been possible to read it in-game since commit
870b124 in 2015.  Then I also ended up making some edits to stylistic
issues I noticed, primarily varying vocabulary to eliminate the
repetition/reuse of words in phrases like "an /ancient/ artifact...
inscribed with /ancient/ runes" and "when /carried/, it grants the one
who /carries/ it ESP, and reduces all spell damage done to the
/carrier/".  The result is a little bit tighter and I think reads
somehwat better.
2024-01-22 17:13:13 -08:00
Pasi Kallinen
2212cf27ec Lua: Allow creating gas clouds
Use the gas clouds in the Clouds themeroom.
Use the existing visible_region_at() in the vision code.
2024-01-19 17:59:43 +02:00