Commit Graph

4898 Commits

Author SHA1 Message Date
PatR
ecf247a2a6 tty_display_file()
For the !defined(DEF_PAGER) config, if the file to be displayed
can't be opened, refresh the screen after complaining about that
rather than when no complaint is issued.
2023-02-21 14:00:31 -08:00
PatR
923249085a fixes entry for PR #978 - suppress monster's name
for <new form> portion of messages "<old form> turns into <new form>"
to avoid named vampires yielding "Dracula turns into Dracula".

Pull request from entrez:  a couple of engulf messages used regular
monster naming for vamp-shifters transforming rather than dying.
3.6.1 had fixes for this for basic monster death but didn't handle
engulfing.

Fixes #978
2023-02-20 13:04:44 -08:00
nhmall
99d784795b fix issue in Guidebook.tex 2023-02-19 21:40:52 -05:00
nhmall
68b795483d Guidebook update 2023-02-19 10:52:56 -05:00
Pasi Kallinen
5d659cf1f6 Tips and option to disable them
Adds a more general way to handle gameplay tips, and adds
a boolean option "tips", which can be used to disable all
tips.  Adds a helpful longer message when the game goes
into the "farlook" mode.

Also adds a lua binding to easily show multi-line text
in a menu window.

Breaks save compat.
2023-02-19 15:56:18 +02:00
PatR
5fd6c02170 pyrolisk feedback
From a report 9 years ago, a pet pyrolisk was repeatedly gazing at a
grey-elf and nothing happened.  It turned out that the elf was wearing
an elven cloak which was negating damage some of the time (most of the
time back then) but with no indication that that's what was happening.

This makes many types of damage that are negated by MC say so.
Probably other types of damage should do likewise.
2023-02-17 14:40:26 -08:00
PatR
04ef7cba46 Address github issue #983 - getpos valid locations
Issue reported by entrez:  when getpos() is being used to have the
player pick a map location, if player types '$' (for some operations
like jumping or applying a polearm) then valid spots are highlighted
but the highlighting obscures what was shown on the map.  I'm not
sure whether this 'fixes' the issue but it's probably good enough.
Allow typing another '$' to toggle the highlighting back off,
redisplaying the map in the process, without needing to move the
cursor or type ^R to accomplish that.  Toggling seems more intuitive.

This is a lot more complicated than it needs to be because I assumed
that the background aspect of highlighting stayed visible when the
glyphs were reverted.  It doesn't work that way but I haven't thrown
out the effort to make toggling the highlights work sanely.  Prior
to this, typing '$' again just redrew the highlighting again, with
no visible effect.

Closes #983
2023-02-17 12:21:54 -08:00
PatR
6cf079b3f6 3.7: add doc/fixes36.7 as doc/fixes3-6-7.txt 2023-02-16 23:43:37 -08:00
nhmall
7aab1c0b76 Guidebook update 2023-02-16 20:56:33 -05:00
nhmall
288cc01f3a Merge branch 'naming-overflow-fix2' into NetHack-3.7 2023-02-16 18:52:47 -05:00
copperwater
9d0df0c9f0 Invert the behavior of selection.gradient
selection.gradient has some pretty unintuitive behavior, in that it
selects points that are NOT close to the defined center. I've used
gradient selections several times and so far all of them have had to be
negated, because I wanted to select points close to the center with a
decreasing probability further out.

This implements that behavior, and also fixes a bug in which the x,y
coordinates of the gradient center(s) were not converted properly when
used within a des.room or des.map. Also updated the lua documentation
for gradient.

I removed the "limited" argument, as it was previously used to control
whether the rest of the map outside the max given distance would be
included in the selection; now that the area beyond maxdist is naturally
never in the selection, it doesn't have much use. (And I can't think of
a reasonable use case for the inverse: wanting to select points close to
the center, with decreasing chance towards maxdist, but then select the
entire map beyond maxdist.)

Currently this does not affect any special levels or themed rooms
because none of them use selection.gradient.
2023-02-14 09:13:59 +02:00
PatR
382fd52fb7 fixes entry for #genocided 2023-02-11 11:49:12 -08:00
PatR
6fd0047784 add #genocided command
Comparable to #vanquished, be able to view info normally available
during end of game disclosure while the game is still in progress.
The new #genocided command lists all genocided and extincted types
of monsters.  Unlike #vanquished, there aren't any sorting choices.

Potential future enhancement:  provide a way to view the genocided
list at the "what do you want to genocide?" prompt.
2023-02-11 11:35:06 -08:00
nhw_cron
61bb25889c This is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt 2023-02-09 20:27:47 -05:00
G. Branden Robinson
ecd2e4dba1 Set up *roff hyphenation more carefully.
* doc/Guidebook.mn: Remove workaround, in favor of...
* doc/tmac.n: ...setting automatic hyphenation mode appropriate to
  hyphenation systems used by AT&T-descended troffs on the one hand
  ("suftab") and groff (TeX hyphenation patterns) on the other.

modify results of pull request #977 to target tmac.nh instead.

Guidebook update to trigger the process following pull request 977.
2023-02-09 20:07:18 -05:00
nhmall
dbc148342b try work-around for Guidebook.txt nroff ver diffs 2023-02-07 21:40:36 -05:00
nhw_cron
57178b75ff This is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt 2023-02-07 17:56:59 -05:00
nhmall
ed83be4b26 update GB 2023-02-07 14:38:07 -05:00
Pasi Kallinen
b51d548b73 Add S_lavawall to Guidebook 2023-02-07 21:32:18 +02:00
nhmall
fbd9a7bae8 another update to the soundlib interface
sound_verbal(char *text, int32_t gender, int32_t tone, int32_t vol,
             int32_t moreinfo);
    -- NetHack will call this function when it wants to pass text of
       spoken language by a character or creature within the game.
    -- text is a transcript of what has been spoken.
    -- gender indicates MALE or FEMALE sounding voice.
    -- tone indicates the tone of the voice.
    -- vol is the volume (1% - 100%) for the sound.
    -- moreinfo is used to provide additional information to the soundlib.
    -- there may be some accessibility uses for this function.

It may be useful for accessibility purposes too.

A preliminary implementation has been attempted for macsound to test
the interface on macOS. No tinkering of the voices has been done.

Use of the test implementation requires the following at build time with make.
    WANT_SPEECH=1
That needs to be included on the make command line to enable the test code,
otherwise just the interface update is compiled in.

I don't know for certain when AVSpeechSynthesizer went into macOS, but older versions
likely don't support it, and would just leave off the WANT_SPEECH=1.

If built with WANT_SPEECH=1, the 'voices' NetHack option needs to be enabled.

It was a bit strange, when I first started up the test, to hear Asidonhopo,
the shopkeeper, talking to me as I entered his shop and interacted with him.
2023-02-07 00:44:36 -05:00
PatR
5d5445d85b fix github issue #972 - moving while trapped
Reported by elunna:  a monster trapped in a pit or web that was
adjacent to a polymorph trap could enter that trap to change shape.
It would remain flagged as trapped but there's no way to escape
from a polymorph trap so it would be stuck.

Fix supplied by entrez:  when a monster is picking MUSE strategy,
don't allow it choose "enter polymorph trap" if it is currently
trapped.

I entered the changes from the diff manually and added a bunch of
minor formatting bits.

Fixes #972
2023-02-06 15:50:39 -08:00
PatR
1d06fa62a9 attempt to fix github issue #965 - place_object
Issue reported for a hardfought player by k2:  dying in a shop wall
produced "place_object: <item> [0] off map <0,0>" when hero's invent
was dropped.  It happened in Mine Town where multiple shopkeepers are
present and it is possible to have two shops share a wall.

I could not reprouce the problem, even after setting up--and dying
various times at a gap in--a wall shared by two shops.

paybill() -> inherits() -> set_repo_loc() sets up the destination
prior to disclosure and finish_paybill() -> drop_upon_death() later
places invent at the spot iff bones are going to he saved.  inherits()
is convoluted and evidently took at least one path that failed to
call set_repo_loc().  Change it to always call set_repo_loc() when
returning 'True' so that the destination should always be set if
really_done() calls finish_paybill().

Some followups by entrez are probably still useful.

Closes #965
2023-02-06 11:47:37 -08:00
Pasi Kallinen
7401b44fa1 Walls of lava
Add "walls of lava", basically lava which blocks vision and
require a bit more than just levitation or flight to move through.

No levels use this yet, as testing isn't thorough enough.
2023-02-06 19:23:42 +02:00
nhmall
f6b135f3e1 fixes3-7-0.txt update 2023-02-05 11:45:05 -05:00
copperwater
50b18b1324 Fix: default lregion exclusion area occupied real space on the map
The intuitive behavior of des.levregion or des.teleport_region when
"exclude" is left unspecified is that there is no exclusion area.
However, this wasn't actually the case: since l_get_lregion defaulted
the exclusion area to (0,0,0,0) and exclude_islev to 0, this meant that
the 0,0 space on the map would always be excluded from regions. In cases
where a region was specified with its inclusion area constrained to the
0,0 space of the map, this would create a "Couldn't place lregion"
impossible message.

This fixes that issue by defaulting the exclusion area to (-1,-1,-1,-1),
and if the exclusion area is left unspecified, forces exclude_islev=1.
This means that the exclusion zone will be outside the walkable space of
the level where it can't cause any problems.

If a level designer puts negative coordinates in their inclusion or
exclusion parameters, this might not work correctly, but negative region
coordinates aren't currently used anywhere and probably shouldn't be
supported anyway.
2023-02-05 07:49:19 +02:00
nhw_cron
da003c374a This is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt 2023-02-04 09:45:27 -05:00
nhmall
17aeee27a5 Guidebook update 2023-02-04 08:52:47 -05:00
Pasi Kallinen
2123602d3e Add chronicle and saveoptions to Guidebook 2023-02-04 15:14:28 +02:00
nhw_cron
25fab21cc8 This is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt 2023-02-03 17:28:47 -05:00
nhmall
72bae29bc0 Guidebook update 2023-02-03 16:50:38 -05:00
nhmall
0282e0b1fd doc error for .nethackrc location on Windows 2023-02-03 16:48:54 -05:00
nhmall
a5c7ca1a29 another follow-up: be consistent 2023-02-03 14:43:56 -05:00
nhmall
583848b04c minor wording change 2023-02-03 14:40:58 -05:00
nhmall
eda74d1d0d updated fixes3-7-0 with sound entries 2023-02-03 14:39:07 -05:00
nhmall
9931d05fc2 follow-up: a couple of documentation errors 2023-02-03 13:40:13 -05:00
nhmall
2acd8e7b29 update soundlib interface
Add SOUND_TRIGGER_AMBIENCE
2023-02-03 13:32:44 -05:00
Pasi Kallinen
1b5414c833 Add some variation to minefill levels
Randomize the number of objects and monsters a little bit,
they're still roughly the same as before.
2023-02-03 19:10:04 +02:00
Pasi Kallinen
0722a5c2dd Fix punishment iron ball yanking hero on top of a monster
When attached iron ball was in a pit (or a pool) with a monster,
and your levitation ended, you were put on top of the monster.

Add a sanity check for hero over monster.
2023-02-03 08:51:48 +02:00
nhw_cron
5bf0bc3ba4 This is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt 2023-01-30 12:37:14 -05:00
nhmall
9bbb2e17cf add a master off/on switch for sounds
sounds can be set in the config file or on the fly with the Options menu.

This also adds a mechanism for specifying a terminology preference
for a boolean option in the options menu.

The choices are: Term_False, Term_Off, Term_Disabled

Term_False, the default, will use the terms "false" and "true" in the
Options menu.
Term_Off will use the terms "off" and "on" in the Options menu.
Term_Disabled will use the terms "disabled" and "enabled" in the Options
menu.

I didn't review any of the existing options to see if one of the new
alternative terms might be a better fit. They were all left at the default.
2023-01-30 12:07:03 -05:00
Pasi Kallinen
744d64487b Helltweaks: improve lava river
The lava river will now draw another river, until a certain
amount of map locations have been turned into lava, so you don't
get a teensy "river" made out of 2 lava pools.

Add a lua selection method to count the number of locations
in the selection.
2023-01-30 17:10:39 +02:00
Pasi Kallinen
05f6a33092 Nazgul can see invisible 2023-01-29 18:07:03 +02:00
Pasi Kallinen
7c2c692ee5 Generate random eroded, erodeproof, or greased items
Items in initial hero inventory, or generated via lua in
special levels or themed rooms are not subject to this.

Code via xnethack by copperwater <aosdict@gmail.com>,
with some modifications.
2023-01-29 11:20:03 +02:00
PatR
b9bbf0205b Pending 3.7 edition of the naming overflow patch.
Like the 3.6.7 one, the original pieces have been combined into one
commit.  But it is separate from the one added to that version.
2023-01-28 13:02:46 -08:00
nhmall
90895330c5 soundlib terminology update - sound_triggers
Switch to using the term "sound triggers" for things that
result in a call to one of the soundlib routines.

SNDCAP_* renamed to SOUND_TRIGGER_*
sndcap field in the sound_procs struct changed to sound_triggers
2023-01-27 22:21:53 -05:00
nhmall
90425082ca counting to 10 2023-01-27 17:01:17 -05:00
nhmall
afb4d90989 typo fix 2023-01-27 16:58:45 -05:00
nhmall
f57f31335c document doc/sound.txt 2023-01-27 16:48:37 -05:00
nhmall
446044e1d5 1st of a few sequencing changes
rename display_gamewindows() to init_sound_and_display_gamewindows()
(I know that's getting pretty long-named).

move activate_chosen_soundlib() into init_sound_and_display_gamewindows()
from moveloop_preamble().

Also included was a missing break in a switch related to sounds.
2023-01-26 17:15:59 -05:00
Pasi Kallinen
f61e1e8e23 Tiny chance of breaking iron bars with war hammer
Also add some different sounds to hitting the iron bars,
and make it noisy.
2023-01-26 18:21:53 +02:00