Commit Graph

5102 Commits

Author SHA1 Message Date
G. Branden Robinson
363f8db139 Use *roffier method of producing Guidebook.dat
doc/Gbk-1pg-sfx.mn is already using one half of a sound technique: set
the page length to a very large value, guaranteed to overshoot the
vertical space required by the document's text.  The other half is to,
at the end of the document, set the page length to the current vertical
position, so that it ends immediately.

https://www.gnu.org/software/groff/manual/groff.html.node/Manipulating-Spacing.html
2023-11-06 14:43:50 -06:00
G. Branden Robinson
b35350d7d3 doc/Guidebook.mn: Drop junk argument to TS
The "S" argument has no meaning.  tbl(1) doesn't interpret it, and the
"n" and "nh" macro packages don't, either.
2023-11-06 14:43:47 -06:00
G. Branden Robinson
9a96e0a198 Fix *roff string usage nit
String definitions were being used with a pointless leading double
quote.  This syntax is used only to define strings containing leading
space characters.  (You might also use it defensively if you're defining
one string whose contents start with the interpolation of another, and
the latter might interpolate leading space--but that is not the case
here.)

Remove unnecessary leading quotes from string definitions.

* doc/Guidebook.mn: Do it.  Also annotate empty strings with comment.
* sys/unix/hints/include/gbdates-post.370: Don't put them back.

https://www.gnu.org/software/groff/manual/groff.html.node/Strings.html
2023-11-06 14:43:34 -06:00
nhw_cron
62ea71bd6b This is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt 2023-11-06 07:31:47 -05:00
PatR
6e137628fb perminv_mode in Guidebook
Tweak the new entry in Guidebook.mn and catch up with that entry in
Guidebook.tex (untested).
2023-11-06 00:46:18 -08:00
PatR
1b04533b35 fix #4027 - unix command line parsing bug
'nethack --show' is rejected, which is ok, but the feedback is
'prscore: bad arguments (2)' which is pretty confusing.

Reject any --s unless it's the start of --scores or --showpath[s].
'nethack --show' will be rejected as "Unknown option: --show."
'nethack -show' is still accepted and will report that it can't find
any scores for how as it always has (assuming that there aren't any
score entries for "how" :-).
2023-11-05 17:16:02 -08:00
nhw_cron
9d83152ced This is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt 2023-11-05 19:16:23 -05:00
PatR
e1b47e74e3 remainder of PR #1109 - named fruit lookup
Remainder of 'database-suggestions' pull request by entrez:  named
fruit lookup when checking for data.base entries.

I'll admit that not sure what this actually accomplishes and am not
interested enough to figure it out myself.

This is the first time I've ever managed to do something useful with
'git cherry-pick', although I haven't tried much after early failures.

The other part of the pull request was dealt with manually earlier,
commit bc9518ca16.

Closes #1109
2023-11-05 15:08:02 -08:00
Pasi Kallinen
8dc7a4882a Make spell menu work with repeat command 2023-11-05 13:49:04 +02:00
PatR
2ee7509945 replace getenv("TTYINV") with perminv_mode option
Add a new option 'perminv_mode' to augment perm_invent.  It handles
the same choices as the temporary TTYINV method:  show all items other
than gold, show full inventory including gold, or only show in-use
items (similar to the '*' command).

For tty, both the all-except-gold and full-inventory modes can add
the poorly named 'sparse' variation which populates unused slots in
its fixed grid with the inventory letter that would go in each.

For others, the default has been changed from full-inventory to
all-except-gold.  Note that gold is treated as part of 'all' or of
'in-use' if it is quivered because having the amount be shown on the
status line doesn't make that redundant.

Changing the default may mess up WinGUI if it assumes that perm_invent
is full inventory with gold.

Initially I was going to change perm_invent into a compound but this
leaves it as an on/off toggle and adds perminv_mode as a separate
option for how to show the inventory when the toggle is on.  It may
make sense to combine them since dual controls is a little confusing,
but right now setting perm_invent On when perminv_mode is 'none'
changes that to 'all' and changing perminv_mode away from 'none' when
perm_invent is Off toggles it to On.

Guidebook.mn has been updated but as usual Guidebook.tex is lagging.
2023-11-05 02:31:26 -08:00
Pasi Kallinen
738c2239c9 Lightning has a small chance of melting iron bars 2023-11-04 13:04:27 +02:00
PatR
bc9518ca16 part of PR #1109 - data.base entries
Part of the pull request by entrez, changing a few data.base entries
recently introduced by PR #1108.

Changes ice box to a different quote, but I've re-applied the prior
quote to ice terrain rather than delete it.  Also replace a UTF
apropostophe in the ice quote which escaped the previous purge of
such things.

Replaces the C.S.Lewis quote for Demonbane with a one-liner from the
Bible.  I realized a bit late that Demonbane is no longer a sword and
never given to lawful Angels as starting gear anymore, consequently
the new quote doesn't fit very well.

The PR changed the helm of brilliance entry to be for all helms and
this rejects that.  Instead, it adds a few generic helmet descriptions
and changes the helm of brilliance quote--now misquote--to be useful
to players, describing it as crystal rather than steel.

Pull request 1109 is still open--there's a second commit in it dealing
with fruit name handling that this commit doesn't touch.
2023-11-03 13:26:53 -07:00
PatR
957b8ac601 fixes entry for PR #1103 - potion of sickness
Pull request from vultur-cadens:  make thrown potion of sickness more
consistently effective but less powerful.  It is no longer blocked
by a target monster's innate magic resistance but it now only halves
current HP without also halving maximum HP, and the message about the
target "looking rather ill" is skipped if it only has 1HP so doesn't
take any damage.

Closes #1103
2023-11-03 11:20:57 -07:00
PatR
8f1b1288cb pull request #1114 - NetHack.ad remarks about XPM
Pull request from bernhardreiter:  NetHack.ad has a comment about
needing to use an external tool such as XV or PBMplus rather than
the NetHack.double_tile_size resource if nethack is built with the
USE_XPM configuration.  Add some more detail since using 'hints' when
setting up the Makefiles can define that behind the builder's back.

The extra detail won't be useful to players who obtain prebuilt
binaries that incorporate the X11 interface.  The comment in config.h
(see preceding pull request) won't be either, and maybe should be
moved to NetHack.ad where such users will be able to see it.

Fixes #1114.
2023-11-03 11:04:35 -07:00
nhmall
75384b95d4 Merge branch 'NetHack-3.7' of https://github.com/g-branden-robinson/NetHack into NetHack-3.7 2023-11-02 16:42:38 -04:00
Pasi Kallinen
e6993f2ef1 Digging down on a magical trap causes it to explode 2023-11-02 19:18:18 +02:00
G. Branden Robinson
467a0180a6 doc/Guidebook.mn: Use idiomatic *roff features
Stop trying to deduce whether the document is being formatted for a
typesetter (a device that can use proportional fonts) or a terminal (a
device that generally can't) by asking the formatter to measure
formatted texts.  Instead, use the built-in `n` and `t` conditions that
nroff and troff have supported for this purpose since 1976 at the
latest.  All known troff implementations support these.

https://www.gnu.org/software/groff/manual/groff.html.node/Operators-in-Conditionals.html
2023-11-02 11:55:35 -05:00
G. Branden Robinson
462973ab53 doc/Guidebook.mn: Drop junk syntax
These *roff control lines were ill-formed.  `.fi` is a request to turn
on filling, not a closing bracket for an `if` request (*roff is not a
Bourne shell).

https://www.gnu.org/software/groff/manual/groff.html.node/Conditional-Blocks.html

Further, *roff generally does not accept more than one request per
input line.  Exceptions to this rule are the control structuring
requests (`if`, `ie`, `el`, and in GNU troff, `while`, `do` and `nop`).
But here, only one (`do`-nested) request is governed by the `if` anyway.
2023-11-02 11:55:22 -05:00
PatR
c1045cc18a sanity check: avoid "you over monster" impossible
I did this several months ago to avoid a sanity check warning (and
consequent fuzzer panic) when an engulfer expels the hero on a full
level.  I was hoping to refine it but never went back; install it
now before forgetting about it entirely.

If a chameleon changes from wall-phazer to engulfer while in a spot
the hero can't move onto and engulfs him/her, expelling the hero
after the engulfer has taken the hero's spot might be forced to put
the hero on top of the engulfer or another monster when unable to
use the engulfer's former spot.  Rather than try to figure out all
the possible ways this might happen and attempt to deal with each
of them, just prevent an engulf attack from succeeding if the hero
wouldn't be able to move to the engulfer's spot.  (Does not prevent
an air elemental over water from engulfing the hero.)
2023-11-02 09:12:37 -07:00
PatR
b73e4815fa Guidebook.txt: silence groff complaints about CR
Don't attempt to switch to CR font (used to get fixed-width characters
when generating output that uses proportional width ones) when output
is already fixed-width (plain text).

The most recent release of groff (version 1.23) complains when a font
can't be found, then keeps going.  Earlier versions just silently kept
going.  Failing to load the CR font when already producing fixed-width
chars makes 'keep going' acceptable but the font-load-failure warnings
are a nuisance.
2023-11-01 21:35:56 -07:00
PatR
fa0f3751a3 fix #K4026 - "object lost" panic during theft
"object lost" panic occurred when hero's worn amulet of magical
breathing was stolen.  This prevents drown() -> emergency_disrobe()
from dropping an item while in the midst of it being stolen, avoiding
the possibility of it no longer being in inventory when the theft
completes.  There may be variations other than drowning that lead to
unwear -> drop-or-destroy that are still vulnerable, and this fix can
potentially cause items to vanish from hangup save files.

It also has a side-effect of not being able to drop levitation boots
to lighten encumbrance enough to crawl out of water if the drowning
occurs while they are being taken off, not just when being stolen,
even though they should be easily droppable in such circumstance.  The
hero will just need to drop other things instead.
2023-11-01 01:54:32 -07:00
nhmall
56f8292579 move fixes entry to more appropriate section 2023-10-31 10:27:43 -04:00
nhmall
ae2bc073ad update fixes3-7-0.txt 2023-10-31 10:24:43 -04:00
PatR
6303141f1d fix #K4025 - #saveoptions vs cond_ options
Confusion between 'o_status_cond' and 'pfx_cond_'.  Still confusing
but I think now working as intended and expected.

If any cond_xyz option has been loaded from the RC file or changed via
'm O', #saveoptions still saves the full set rather than just the ones
that are different from their default value.
2023-10-31 01:19:20 -07:00
Pasi Kallinen
16ed7e49c3 Separate level flags for premapped and sokoban 2023-10-29 12:35:32 +02:00
PatR
04d6789c98 report ice's thaw state
Classify nearby ice as "solid" (no melt timer), "sturdy" (more than
1000 turns left), "steady" (101 to 1000 turns left), "unsteady" (51
to 100 turns left), "thin" (15 to 50 turns left), or "slushy" (1 to
14 turns left, matching walking on ice with the Warning attribute).
[I'm not thrilled with "steady" and particularly "unsteady".]

I was originally going to do this just for probing downward, but ended
up also doing it for look-here and getpos's autodescribe.  It nearly
got out of hand and touched more files than anticipated.

'mention_decor' ought to treat moving from ice firmer than thin to
thin or slushy, from thin to slushy, from slushy to any other, and
from thin to firmer as if moving onto different terrain but I haven't
attempted to tackle that.

The melt timer could work more like a candle's burn timer, triggering
at intermediate stages and resetting itself, so that ice which changes
to a weaker state under the hero could be reported to the player.  But
this doesn't implement that.
2023-10-25 13:26:03 -07:00
Pasi Kallinen
7bf3888118 Shopkeepers consider monster type for some items
Tins, eggs, and corpses will now cost different amounts
based on what intrinsics the monster type could give
2023-10-25 18:45:16 +03:00
Pasi Kallinen
614e6c9d5e MSDOS: implement inverse text attribute 2023-10-24 18:34:15 +03:00
PatR
1a5eaf78e6 probing vs underwater items
When probing is zapped downward while hero is at a water or lava spot
and hero isn't beneath the surface, show any objects 'hidden' by the
water or lava at that spot.
2023-10-23 13:07:15 -07:00
Pasi Kallinen
ff4f81af1b Make rolling boulders hit walls and trees
While testing something else, I noticed rolling boulders
just ignored walls and trees; in normal play this isn't
a problem - but should probably make boulders handle other
terrain too.  Lava and water is already handled correctly.
2023-10-21 18:42:43 +03:00
PatR
f7e5437746 fix #K4019 - "can not"
Report suggested that "can not" should be "cannot".  Both forms are
acceptable.  This switches them to use contractions for various "You
<verb> not subject" phrases:  "You can't subject", "hadn't", and so
forth.  Not exhaustively tested; there may be some sentences where the
informal contraction makes things worse rather than better.

The goal here was compactness rather than efficiency since the code
involved doesn't execute very often.
2023-10-21 03:40:56 -07:00
PatR
a31be02350 more wand of probing enhancements
Recent changes to wand of probing cause it to map unseen terrain when
zapped into the dark (or while blind) and also to reveal tin contents
if the beam hits such.  Extend that to discover secret doors, secret
corridors, and traps whether the spot can be seen or not, and also to
reveal egg contents.  Previously, secret corridors were converted into
regular corridors when they couldn't be seen but left as is if their
spot could be seen; now they're found and converted either way.

Issue the kaboom sound effect if zapping a magical trap with wand or
spell of cancellation causes it to go "Kaboom!"

A couple of chunks of code has been moved out of zap_updown() and
bhit() into new routine zap_map().
2023-10-19 00:28:19 -07:00
PatR
2476329b2c fix ^ as choice in / menu for tty and X11
It turned out that using '^' as a group accelerator (new behavior for
the 'whatis' command to view traps) already worked for curses and Qt.
Fix that for tty and X11.  I don't know the situation for WinGUI.

Offering any of the menu paging keystrokes as group accelerators
should be avoided if there's any chance that the menu will need more
that one page.  The menu for '/' is short though so losing "^ to go
back to first page" for it isn't an issue.
2023-10-14 17:24:39 -07:00
PatR
ef22d87e26 github pull request #1107 - flipping coins
Pull request from NullCGT:  applying gold from inventory will flip
one coin and report "heads" or "tails".  If impaired, that coin will
be dropped, otherwise it will remain part of the stack in inventory.
Can be done via 'a $' or with context-senstive item action via 'i $ a'.

I've used 'git merge --squash' and 'git commit -C <commit#>' to
flatten four commits into one and it seems to have accomplished what
I wanted, including retaining the log message from <commit#>.

I also changed
|You flip a gold piece.  The gold pieces slips between your fingers.
to
|You flip a gold piece.  It slips between your fingers.
when impaired and applying one from a stack.

Closes #1107
2023-10-14 01:13:24 -07:00
PatR
55650666ed \#overview vs temples and altars
Reported by entrez:  it was possible for #overview to show a line of
just "." if a temple was known and its altar was unknown and no other
features such as thrones or fountains were known on the level.

It now lists "M temples and N altars" when both are present and the
case that yielded "." becomes "a temple".  That's an improvement but
there might be edge cases it gets wrong.  A listing of "a temple and
an altar" is ambiguous because there isn't any way to tell whether the
altar it mentions is inside the temple.  That seems acceptable to me.

I think it should include more alignment information about temples and
altars, instead of just adding "to <your god>" when all known altars
are of hero's alignment, but this doesn't attempt to address that.
2023-10-14 00:01:33 -07:00
Pasi Kallinen
13ad9561f3 Buff scroll of confuse monster 2023-10-11 20:22:56 +03:00
Pasi Kallinen
dfac5fbf67 Buff blessed potion of monster detection 2023-10-11 19:52:31 +03:00
Pasi Kallinen
38546778d5 Bigroom 3 may have some walls replaced with other terrain 2023-10-06 12:07:07 +03:00
Pasi Kallinen
76de4f6ee9 Ice devils get a slowing touch 2023-10-04 20:06:12 +03:00
Pasi Kallinen
93b9467c08 Balrogs prefer bullwhip is hero is wielding something 2023-10-04 19:48:21 +03:00
Pasi Kallinen
3946c5a01d Give barbed devils a sticking attack 2023-10-04 11:09:25 +03:00
Pasi Kallinen
f83a57c5bf Tweak wand of make invisible and potion of invisibility
Wand of make invisible doesn't make you permanently invisible,
just for a short duration.  Potion of invisibility makes you
invisible for much longer period, or if blessed, has a small
chance of giving permanent invisibility.

This makes the wand actually useful, and improves the spell
too.
2023-10-03 21:04:15 +03:00
Pasi Kallinen
f0698e1dca Bone devils summon skeletons
Skeletons are extremely rare, and not generated at random,
and bone devils are basically just a speed bump when they appear.
Make both more interesting.

Idea by copperwater <aosdict@gmail.com>
2023-10-02 20:25:58 +03:00
Pasi Kallinen
9b4eaafe8c Fog clouds maintain any gas clouds 2023-10-02 13:05:15 +03:00
Pasi Kallinen
cf0eb8dfa0 Steam vortices leave steam clouds behind
Code via xnethack by copperwater <aosdict@gmail.com>
2023-10-01 20:30:54 +03:00
Pasi Kallinen
412a996da8 Wand of probing reveals tin contents 2023-10-01 14:49:00 +03:00
Pasi Kallinen
6e09c980d2 Use #monster to make dragon steed breathe 2023-09-30 22:44:46 +03:00
Pasi Kallinen
b1e3863b43 Stop occupation when timed levitation or choking issues a message 2023-09-30 21:15:20 +03:00
Pasi Kallinen
086f68187f Coughing due to stinking cloud wakes up neighbors 2023-09-29 10:56:17 +03:00
PatR
7c0ece5bd6 fix #H2736 - missing Samurai quest throne
Reported 11 years ago, the level definition for the Samurai quest
home level specifies a throne room and entering it gives the "opulent
throne room" message, but there isn't any throne.

Initially I was going to add a throne but decided that its lack is
probably intentional.  The throne room designation is used to give
periodic atomspheric messages.  That's my guess anyway.

Alter the room entry message there to omit "throne" from "you enter
an opulent throne room".  Add a no-throne comment to Sam-strt level
definition.

While in there, make Lord Sato's katana and splint mail explicitly
rustproof and either blessed or uncursed.  (The mail was already
implicitly rustproof because splint mail created on the Sam quest
home level always is, like for a Samurai's initial inventory.)
2023-09-28 13:25:20 -07:00