Commit Graph

5468 Commits

Author SHA1 Message Date
PatR
a05cca16ef fixes entry for PR #1408, typos in tribute names
Pull request from rbsec:  a couple of character names had misspellings.

Closes #1408
2025-04-12 10:43:32 -07:00
Pasi Kallinen
8f7258dc35 Buff Grimtooth with poison
Grimtooth is now permanently poisoned, protects the wielder from
poison, and can be invoked to throw poison.

Permapoison code comes from xNetHack by copperwater <aosdict@gmail.com>.
2025-04-12 19:24:36 +03:00
PatR
1fd27044b7 github PR #1384 - THEMERM and ThEMERMFILL
Pull request from copperwater:  reorganize the theme rooms data so
that a room or a fill can be chosen by name, and when in wizard mode,
consult environment variables THEMERM and THEMERMFILL during level
creation to provide control over which theme rooms/room fills to
generate.

I reverted a commit that did a bunch of reformatting to themerms.lua
because to caused substantial merge conflicts.  I will redo at least
part of it.

Closes #1384
2025-04-11 16:29:08 -07:00
Pasi Kallinen
7138af00ba Praying on an altar with pet statue on it can revive the pet 2025-04-10 23:38:44 +03:00
Pasi Kallinen
fa229439d4 Fixes entry for silver mace
Fixes #1405
2025-04-09 21:05:59 +03:00
Pasi Kallinen
2065d2d392 Avoid premapping outside Sokoban map to prevent showing stone glyphs
If user has changed the stone glyph to something other than a space
(or uses a tileset), Sokoban levels showed the unreachable stone outside
the map area.  Prevent marking those areas as seen, so the stone
glyphs aren't shown.
2025-04-09 18:41:00 +03:00
nhmall
9e2a0f977e fixes entry update 2025-03-20 14:39:04 -04:00
PatR
90717ca633 more chest->tknown handling
Disarming a chest trap was setting obj->tknown = 0 even though the
hero just discovered that it isn't trapped.

Triggering a chest trap behaved similarly.  Since there are no
repeating chest traps, hero should know that the chest whose trap
just went off is no longer trapped.

chest_trap() didn't document its return value but was clearly meant
to return True if the chest was destroyed.  It didn't handle that
correctly when the chest was being carried.  However, none of the
callers actually use the return value.  [This fix tracks whether the
chest gets deleted; a better fix would be to destroy an exploding
chest even when it is being carried.]
2025-03-13 13:54:56 -07:00
nhkeni
67dc6662ac remove bogus content from template file 2025-03-13 12:48:07 -04:00
PatR
1d22a396d4 fixes3-7-0 typo 2025-03-10 21:54:22 -07:00
nhmall
d6829cdcd2 fixes entry for musl libc build, rather than glibc
We've had reports of a couple of issues building against musl libc.

Issues reported:
  - build procedures utilize col for Guidebook-creation, and col
    is deprecated in distros that use musl libc

  - some of the CRASHREPORT code is using library functions that
    are not available in the musl libc environment. The reported
    functions were backtrace() and backtrace_symbols(), which use
    header file /usr/include/execinfo.h.

So we'll try to accommodate this. Since we don't have a means of
autodetecting the musl libc situation during the build (as of yet), the
builder will have to specify 'make musl=1' on the make command line.

Specifying 'musl=1' on the make command line will:
1. ensure that NOCRASHREPORT gets defined in the C preprocessor.
2. set COLCMD to be '../util/stripbs' instead of 'col -bx'.

Related to GitHub #1393
2025-03-10 19:54:12 -04:00
PatR
719166f9ec fix issue #1377 - Forcefight vs displacer beasts
Issue reported by elunna:  Using the 'F' prefix against a displacer
beast prevented swapping places.

This doesn't use the suggested fix.  It is quite short but there is
a large diff due to change in indentation and reformatting several
comments because of that.

Attacking a displacer beast either with or without 'F' might miss,
hit, or swap places.  It won't "harmlessly attack thin air."

Fixes #1377
2025-03-10 09:17:41 -07:00
copperwater
01cdf51993 Add a bit of detail in selection.room() documentation
It wasn't clear to me how selection.room() handles room edges and
unusual terrain in the room, so I looked at the code and wrote down how
it behaves for posterity.

I don't believe the one room currently capable of getting a random fill
while already containing some odd terrain, "Blocked center", actually
has unusual terrain in the room fill. This is because filler_region
creates an irregular region (i.e. a room containing the ROOM points in a
square ring around the blocked center). The points in the middle don't
share the same roomno, so they won't be returned in the selection
created by selection.room(). But there's no reason a room couldn't be
added in the future which does specify some nonstandard terrain and then
a themeroom fill.
2025-03-04 18:46:31 +02:00
PatR
6c42180cfc fix issue #1383 - chopping boulder at tree spot
Reported by k21971:  applying an axe toward a location that contained
both a tree and a boulder (or statue) would use the axe to break the
boulder/statue rather than chop down the tree.

Different code is used to finish the dig/chop than is used to decide
whether the tool is appropriate for its target.

Fixes #1383
2025-02-26 12:15:13 -08:00
nhkeni
e358f37863 Merge remote-tracking branch 'origin/keni-fetchdocs' into NetHack-3.7 2025-02-07 15:36:19 -05:00
PatR
a311f4b467 fix issue #1362 - carrying Mitre of Holiness
Issue reported by elunna:  the definition of the Mitre of Holiness
specifies that carrying it should confer fire resistance but that
didn't work.

The Mitre's definition (added in 3.1.0) has always included that,
but such a capability had never been implemented.  Wearing it didn't
confer fire resistance either--its definition doesn't bother to
specify a 'defend' attribute since the 'carry' one should cover that.

This adds carrying capability for damage types fire, cold, sleep,
disintegration, electrity, poison, acid, and petrification.  Fire is
still specified by the Mitre; none of the others are currently used.

Fixes #1362
2025-02-03 11:42:36 -08:00
nhmall
785f78c39b avoid "You fall down a deep shaft!" if flying down
Fixes #1371
2025-02-03 00:53:06 -05:00
nhkeni
cfe39900ca Demo for downloading formatted docs
Written for MacOS, more useful for Windows (but I'm not writing that).
2025-01-31 21:48:15 -05:00
Pasi Kallinen
c9abc92dd7 Fix lua.adoc 2025-01-24 19:04:17 +02:00
PatR
1acc272718 fix memory leak for knight's starting pony
makemon() has a 1% chance to bestow a worn saddle when creating any
rideable monster.  If that chance kicked in on a knight's starting
pony, an extra saddle would end up being created but not worn nor
in inventory nor on floor so not be freed when the game ended.

That 1% chance also overrode saddle suppression for pauper knights.
There wouldn't be any extra saddle but their pony could start with
one, against intent.

Have makedog() (which is only used for starting pet) tell makemon()
to suppress inventory when creating the initial pet.
2025-01-20 10:24:12 -08:00
nhmall
8ee014f5d1 update credits 2025-01-12 23:57:56 -05:00
Pasi Kallinen
256b820fe3 Fix impossible no_charge obj in untended shop
Sanity checking was complaining about a no_charge obj in untended shop.

Angry shopkeeper was accepting thrown items as no_charge objects:
To reproduce the impossible, kick down the shop door angering
the shopkeeper. While the shopkeeper is still in their shop,
throw an item they don't want into the shop. Wait for the shopkeeper
to get out of the shop.

Move the anger checking before the sell auto-accept code,
so the shopkeeper will charge for the object.
2025-01-08 12:59:08 +02:00
nhw_cron
9b71efe69e This is cron-daily v1-Apr-1-2024. 005manpages updated: recover.txt 2025-01-07 11:52:43 -05:00
nhmall
06e0eb0616 Merge pull request #1351 from https://github.com/g-branden-robinson/NetHack into NetHack-3.7 2025-01-07 10:43:37 -05:00
PatR
a118869262 rephrase a recent fixes entry 2025-01-06 11:01:18 -08:00
nhmall
be5143bb74 window-port updates
Remove start_screen() and end_screen() from the
Window-port interface.

They were only ever used by tty, and there was a comment
carried to several window-ports about how they "really
should go away. They are tty-specific"

term_start_screen() and term_end_screen() are part of
terminal/NO_TERMS supporting routines now.
2025-01-04 23:38:34 -05:00
nhmall
428665c613 fixes entry update for another part of commit 37758c7e 2025-01-04 19:16:02 -05:00
PatR
7982c72e8b fix github issue #1360 - autounlock=Kick
Issue reported by ostrosablin:  having Kick enabled as one of the
values for the 'autounlock' option succeeded it prompting "kick it?"
when walking into a locked closed door, but answering "yes" behaved
the same as answering "no".

There's bound to be a better way of fixing this, but this works.

Fixes #1360
2025-01-04 13:59:06 -08:00
PatR
ce947600e5 discoverying water walking boots
If water walking boots haven't been discovered yet and underwater
hero rises to the surface when putting a pair on, discover them.

(Sinking while removing such on water already discovers them.)
2025-01-02 23:12:15 -08:00
copperwater
2d4f9893ad Enable more ways to specify monster inventory in special levels
This originated with a bug in NerfHack in which the developer specified
an inventory for a quest nemesis, but neglected to include the Bell of
Opening in it. Since monsters' inventory contents from makemon() were
tossed out completely, this caused a situation where the Bell was
deleted and the game was unwinnable. The first part of this change is
guarding against that by adding mdrop_special_objs before discarding the
inventory. This does create a possibility where if the programmer *does*
specify a nemesis get the Bell item in their inventory, while neglecting
to remove its special case generation in makemon.c, it would generate
twice - but two Bells is better than none.

Working on that fix led me to think about a limitation of the current
sp_lev.c behavior. You could either have a monster generate with its
species-typical inventory by not specifying an inventory for it, or you
could have it generate with custom inventory but then have to use that
to clumsily reproduce the normal inventory's complex chances and
conditionals in mongets(). So the remainder of this commit implements
another flag for des.monster(), keep_default_invent, that allows for
more flexibility in two ways:

1. When des.monster() contains an inventory function and
   keep_default_invent is true, the monster will retain everything it
   gets from makemon() and the objects in the inventory function are in
   ADDITION to those. This is useful for augmenting a monster's default
   kit with something to make them more threatening, or just more loot.
2. When des.monster contains no inventory function and
   keep_default_invent is false, the monster will get NO inventory even
   if its species is normally supposed to. I'm not sure where exactly
   this would be used, but it doesn't hurt to have it available.

When keep_default_invent is not specified at all, the behavior remains
the same as it is now - if inventory is provided, default items are
discarded, and if not, they are kept.
2025-01-02 08:07:50 +02:00
Pasi Kallinen
0a58b7a540 Tweak tourist xp gain from new monsters
Remove the XP gain for tourist seeing a new type of monster
nearby, as it apparently made tourists a bit harder by forcing
early level gains.

Monsters next to hero are still marked as seen close-up, but
fix the code so it doesn't count undetected monsters.

Tourists still gain XP from "taking photos" of new types of monsters,
but only if they haven't seen the monster close up before.
(No actual photos are taken.)
2025-01-01 21:43:31 +02:00
keni
d329a4ce8a update tamc.nh docs (mnh.7) 2024-12-31 17:15:11 -05:00
G. Branden Robinson
a6a32170ee doc/dlb.6: Revise description
Content:
* Document that the command has a default file list.
* Demote "COMMANDS" section to "Operations" subsection.  The former term
  is (1) too easily confused with Unix commands and (2) not a widely
  used section heading in man pages.

Style:
* Italicize command names.
* Italicize file names.
* Use idiomatic man page cross references.
* Present operation and option letters in alphabetical order.
* Render option descriptions as full sentences.
* Set bug list as a bulleted list.

Markup:
* Break input lines at sentence boundaries.
* Favor use of man(7) font selection and alternation macros over roff(7)
  font selection escape sequences.
* Drop numerous extraneous paragraphing macro calls.  See subsection
  "Horizontal and vertical spacing" of groff_man(7).
* Replace use of *roff requests to break lines and vertically space with
  calls of paragraphing macros, which is what they're for.  Two things
  the page author didn't know: `.sp 1` already implies a break, so the
  preceding `.br` was redundant.  `.sp 1` without an argument already
  means to vertically space by 1 vee; that is, the "1" argument was
  superfluous.  It was a bad idea anyway because the default
  inter-paragraph spacing in man(7) is not one vee, but 0.4v--this
  matters when typesetting.  It has also been the case since 1979.
* Use `RS` and `RE` macros instead of a literal tab to achieve a
  relative inset.  Use of the macros is more idiomatic.
* Use `EX` and `EE` to attempt to set the examples in a monospaced font
  family.  These are extensions and are silently ignored by formatters
  that don't support them.

  groff_man(7):
     .EX
     .EE    Begin and end example.  After .EX, filling is disabled and a
            constant‐width (monospaced) font is selected.  Calling .EE
            enables filling and restores the previous font.

            .EX and .EE are extensions introduced in Ninth Edition Unix.
            Documenter’s Workbench, Heirloom Doctools, and Plan 9
            troffs, and mandoc (since 1.12.2) also support them.
            Solaris troff does not.  See subsection “Use of extensions”
            in groff_man_style(7).
* Kill off useless trailing space on input line.
2024-12-31 06:52:27 -06:00
G. Branden Robinson
0dc5d8c2f1 doc/dlb.6: Revise synopsis
Follow Unix idioms and the guidelines presented in groff_man_style(7).[1]

* Present multiple synopses since the command has multiple operation
  modes accessed via mutually inexpressible command letters.  See the
  POSIX standard for copious precedent.
* Stop implying that file name arguments are accepted alongside the `I`
  option; see line 236 of util/dlb_main.c.
* Stop spacing around synopsis punctuation where unnecessary.
* Set metasyntactic variables (parameters) in italics, not roman or
  bold.
* Spell ellipsis idiomatically for pleasant typesetting.
* Use `\c` escape sequence to force adjacency of tar-like option letters
  to the mandatory operation letter.
* Use singular, not plural, for repeatable argument.  The ellipsis does
  the grammatical work of pluralization for us.

[1] Full disclosure: I wrote much of (the current form of) that man page.
2024-12-31 06:52:27 -06:00
G. Branden Robinson
dc14fb131f doc/{dlb,recover}.6: Disable dead dynamic code
Portions of these man pages seem at one time to have been dynamically
selected, but the mechanism for doing so appears to be commented out in
the source tree: see "NHGREP" in sys/{unix,vms}/Makefile.doc.

Wrap them in *roff "ignore blocks" to keep their noise from cluttering
the man page actually seen by the users.
2024-12-31 06:52:27 -06:00
G. Branden Robinson
01b2ea12f7 doc/dlb.6: Use correct scaling unit for ems
In *roff numeric expressions, ems are spelled "m", not "em".

https://www.gnu.org/software/groff/manual/groff.html.node/Measurements.html
2024-12-31 06:52:27 -06:00
PatR
ecbb7cff4d fix issue #1339 - shop purchase warnings
Issue reported by ars3niy:  with the relatively new container
handling, buying multiple items when some were inside a container
sometimes triggered impossible "unpaid_cost: object wasn't on any
bill" warnings and not buy all intended items.  Once that occurred,
subsequent inventory display would repeat the warning.

A couple weeks back, I managed to produce a save file which would
reproduce the problem when 'p' was issued, but failed to figure
out why that was happening.  I accidentally deleted that save file
and it took quite a lot of further attempts to get another one.

I still don't understand why this fix is needed, but with it in
place the save file no longer triggers any problems.  I'm marking
the issue fixed but that could be premature.

Fixes #1339
2024-12-30 03:12:06 -08:00
nhkeni
bb57c38e24 Option formatting cleanup. 2024-12-27 18:17:49 -05:00
nhmall
e6e0913878 doc/* from cron job 2024-12-26 17:34:18 -05:00
keni
47ccaf3f26 more .gitattributes 2024-12-25 20:23:00 -05:00
keni
a331a667e5 3.7 setup for autodocs 2024-12-25 14:58:48 -05:00
nhkeni
09693f618f Fix header spelling error "DATE" -> "Date"; force update dates. 2024-12-24 19:24:15 -05:00
nhmall
4507323a42 more doc updates 2024-12-24 13:41:17 -05:00
nhkeni
bdff809099 Update hyphenation for *.mn and *.6 files. 2024-12-24 12:37:20 -05:00
nhmall
95cf46c102 update Guidebook and some generated files 2024-12-24 10:27:12 -05:00
nhmall
e32ac5a7c7 fixes3-7-0.txt update for showpaths option tweaks 2024-12-23 00:50:38 -05:00
Pasi Kallinen
0079bf87bb fixes update 2024-12-21 18:19:42 +02:00
nhmall
f6a5236beb follow-up to #1343 fix for telepathic hero
telepathic hero can discern which particular monster just
read a scroll, even though he cannot see the monster
2024-12-20 15:30:37 -05:00
nhmall
a35e5779f6 heard incantation: don't trump telepathy with 'I'
GitHub 1343 report by @ars3niy:
"When you are blind and see with telepathy a monster whom you then hear read
a scroll, said monster turns into an "I". While it reveals which one exactly
read the scroll, it is strange that you can no longer see it with telepathy
until it moves to another square."

Fixes #1343
2024-12-20 13:04:08 -05:00
PatR
1e431139b4 fix issue #1342 - garbled iron bars message
Issue reported by elunna:  the message given when zap_over_floor()
hits iron bars with lightning or acid was substituting a couple of
words or phrases in the wrong order, resulting in
|The {melt|dissolve} iron bars somewhat but remain intact.
when the iron bar location is flagged as non-diggable.  It should be
|The iron bars {melt|dissolve} somewhat but remain intact.

Not mentioned:  the corresponding message for locations that aren't
flagged as non-diggable used "melt" unconditionally.  Change it to
keep "melt" for lightning but switch to "corrode away" for acid.

Fixes #1342
2024-12-19 13:11:01 -08:00