Suggestion from entrez: If dipping something in a sink while hands
are slippery happens to cause that sink to break, only remind player
about still being Glib if the item was '-' or uarmg.
Redo one of the fixes entries: dipping a potion into a sink does not
dilute it. The potion is used up and gives a hint about what it does
so player might discover it.
If hero has slippery hands, include '-' among likely candidates for
item to #dip when dipping at a pool, fountain, or sink location.
When dipping an item (including hands), have a modest chance for the
sink to be destroyed--which turns it into a fountain--each time so
that it can't be used to blank scrolls an unlimited number of items.
(Pools can already be used for that, but you need to obtain water
walking ability or else drop most of your stuff and enter the water;
sinks weren't imposing any such requirements or risks.)
Pull request from entrez: when at a fountain, pool, or sink location,
the #dip command will allow #dip to pick terrain and player to choose
pseudo-item '-' for hands. Also allow dipping actual items in sinks.
Closes#1112
Pull request from entrez: the mstate field in struct mon defines many
bits but didn't use some of them consistently.
Initially they were intended to be examined via debugger, where being
inconsistent might lead to confusion but not have a negative impact on
gameplay. However, some of them have morphed into affecting gameplay.
Closes#1116
One can observe the following problems when generating or viewing plain
text versions of the Guidebook. (There are three; "Guidebook" and
"Guidebook.txt" are identical, and are paginated; "Guidebook.dat" is not
paginated.)
1. The line "(Edited and expanded for NetHack 3.7.0 by Mike Stephenson
and others)" is overset.
2. So are Figures 1 and 2, by one character cell, when rendered with
groff 1.23.0 because of the way it handles boxed tables and those
with vertical rules at table boundaries.
https://git.savannah.gnu.org/cgit/groff.git/commit/?id=8f066786ea3cb5e1dbade1149e7d50ae978da202
3. When viewing the Guidebook in an 80-column terminal, the left and
right margins are asymmetric; you get 10 columns on the left but
only 5 on the right.
So:
* doc/Guidebook.mn: In nroff mode, set page offset to 5n and increase
line and title line lengths by 5n to 70n.
Now, the margins are symmetric, there's ample room for the figures, and
the expansion credit fits.
(One diagnostic remains when formatting with groff 1.23.0.
troff:tmac.n:762: error: cannot load font 'S' for emboldening
This is a groff bug and will be fixed in the next release. The
diagnostic is spurious and can be ignored.
See <https://savannah.gnu.org/bugs/?64866>.)
Explain behavior of GNU tbl when setting boxed tables on terminals.
Drop reference to bug fixed in groff 1.23.0
<https://savannah.gnu.org/bugs/?49390>.
There's not much to say about other tbls except that they handle boxed
tables _terribly_ on terminals.
$ cat ./hello-table.roff
.TS
box;
L.
hello
.TE
$ ./bin/tbl ./hello-table.roff|./bin/nroff|cat -s # Heirloom Doctools
_______
hello
_______
|
| |
DWB tbl behaves the same way. I expect all System V Unix-descended
tbls/nroffs do the same.
This is my attempt to revise the figure by working _with_ tbl(1)
and nroff(1)/troff(1) features instead of fighting them or enduring
suffering and significant maintenance challenges.
* Stop using mn(7) display macros; the other two figures didn't and they
don't appear to be buying much.
* Use `tr` character translation feature to temporarily remap characters
for clarity of input. It's convenient to input ordinary characters
here since the table's contents are (mostly) character-cell art.
Remap `-` to minus sign and `@` to the "reverse solidus" special
character. (`\` is the default *roff escape character. It can be
changed, but attempting that seems hopeless inside a tbl(1) table.)
Revert the translations after the table. (There's nothing special
about `@`; you could choose any other character that isn't otherwise
needed in the table.)
* Use `box` region option as with Figures 1 and 2. Perhaps this wasn't
done because those are meant to depict a terminal window, but Figure 2
depicts only part of one, so its top border is a fib.
* Use `expand` region option to obtain roughly the same spread-out
effect that the table was laboriously using empty columns and the `e`
column modifier for.
* Consequently, reduce the column count to 2; both have real content.
* Annotate both keycap diagrams--in part for clarity, but also to make
it more obvious that the columns will balance in width.
These changes don't require GNU extensions to *roff or tbl except,
arguably, the \(rs special character. But support for that special
character identifier is easily added to any device-independent troff;
see §23.2 of CSTR #54 (Kernighan 1992 revision) or groff_font(5). Or I
can prepare a patch--just ask me. But given that no one seems to have
complained about the disaster that AT&T tbl/nroff must have been making
of Figures 1 and 2 for decades, I'm guessing this isn't a practical
concern. Any if it _is_ a problem, `\e` can be used instead of `\(rs`.
(I didn't use it because what is wanted is the backslash glyph
specifically [to mirror `/`], not "the escape character". But given the
constraints imposed by use of tbl(1), it's an academic point.)
On my system, the figure captions in Guidebook.ps were getting set in
Courier roman. This was clearly unintentional. Here's why it didn't
work.
1. Figures 1 and 2 selected the previous font, but only after a table
had been set. But tbl(1) does not preserve identity of the previous
font. I investigated, and none of GNU, Heirloom Doctools, nor
Documenter's Workbench tbl implementations preserve it. So the user
can't rely on it. See
<https://savannah.gnu.org/bugs/index.php?64862>.
2. Figure 3 attempted to select the roman font (typically Times), but
did so in a table cell that was empty of text. It therefore did not
have any visible effect.
* doc/Guidebook.mn: Explicitly select font `R` after setting tables. On
typesetters, put half a vee of space between the table's box border
and the figure caption.
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
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
'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" :-).
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
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.
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.
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
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.
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
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.
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.)
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.
"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.
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.
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.
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.
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.
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.
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().
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.
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
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.