Commit Graph

611 Commits

Author SHA1 Message Date
Michael Meyer
e427063560 Enable 'dropped_nopick' by default 2023-12-08 15:20:20 -08:00
Michael Meyer
1736f3caaa Add 'pickup_stolen' option
Add pickup_stolen option to autopick items stolen from you by a nymph or
monkey, even if they don't match your normal autopickup settings.
Replace was_dropped, was_thrown with a 2-bit bitfield that can contain
values LOST_DROPPED, LOST_THROWN, and LOST_STOLEN (or 0), since they
should all be mutually exclusive anyway as they track the most recent
way the item left the hero's inventory.

[Rebase/merge conflict fixed up.  PR]
2023-12-08 15:19:54 -08:00
Michael Meyer
e2e89cb93e Rename/invert 'pickup_dropped' to 'dropped_nopick' 2023-12-08 15:19:05 -08:00
Michael Meyer
d7d1c1476d Add option to exclude dropped items from autopick
This is based on a feature in UnNetHack (and I think some other variants
as well).  If the hero intentionally drops an item with 'pickup_dropped'
disabled, don't autopick it back up when walking over that square again.

Typically when the player drops an item, it's because she doesn't want
it in her inventory any more, and this option stops autopickup from
defeating that goal (especially useful for tasks like stash management
without a container).  Players have come up with workarounds to this
problem like toggling autopickup when approaching their stash pile or
adding name-based autopickup exceptions to allow them to exclude
individual items from autopickup, but this behavior should reduce the
need for those things.

I think 'pickup_dropped' is a little unfortunate because it suggests
equivalence to 'pickup_thrown' (i.e. any dropped items will be
automatically picked up regardless of autopickup exceptions).  Calling
it something like 'nopick_dropped' might be better, but as far as I can
tell options cannot start with the word 'no' because it's interpreted as
a negation of the rest of the option name.
2023-12-08 15:19:04 -08:00
PatR
e6a7eb25d4 item actions for '* ) [ = " (' commands
Make the various item-in-use commands put up a menu--which allows
choosing an item for context-sensitive item action--if/when preceded
by the 'm' prefix.  Some of them do that even without the prefix ('*',
'[', or '=' when more than one ring is worn).  By default '(' shows
primary weapon, then secondary one if dual-wielding.  'm (' shows a
menu of primary, alternate whether dual-wielding it or not, and quiver.
2023-11-28 00:31:21 -08:00
nhmall
31a46e72c0 Guidebook date stamp 2023-11-13 07:46:17 -05:00
Pasi Kallinen
dd5ca5b058 Change menu_headings to accept color and attribute
Instead of just accepting an attribute, it's now possible to
use a color, or both color and attribute, for example:

OPTIONS=menu_headings:inverse
OPTIONS=menu_headings:red
OPTIONS=menu_headings:red&underline

Default is still just inverse.
This lets the player change the menu heading color without
needing to use menu colors for them.

Also makes it so the core uses NO_COLOR instead of 0, for all
the menu lines which don't have any prefedefined color.

Tested for tty, curses, x11, qt, and win32
2023-11-13 07:33:56 +02: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
1a64ee1c28 github PR #259 - paranoid_confirmation:trap
Fairly old pull request from copperwater:  add new paranoid_confirm
setting 'trap'.

The old commit suffered from bit rot and merging needed too much
fixing up despite there not being many bands of change in the commit's
diffs.  I ultimately redid it from scratch, although the two biggest
chunks of code started with copy+paste of the pull request's commit.

It operates like paranoid:pray.  Setting paranoid:trap adds a new
"Really step into <trap>?" y/n prompt when attempting to move
into/onto a known trap, even if an object covers it on the map.
Setting both 'paranoid:Confirm trap' turns that into a yes/no prompt.
(Adding 'Confirm' affects other paranoid confirmations; in addition
to requiring yes<return> rather than just y to accept, it also forces
no<return> to reject.)

However, moving into a known trap that is considered to be harmless
behaves as if no trap was present.  Some of the trap classification
might be out of date; several types of traps have undergone changes
since implementation of the original pull request, notably anti-magic
field.  When the hero is hallucinating, all known traps are considered
harmful since the map no longer reliably describes them.

Preceding a movement command with the 'm' prefix also behaves as if
no trap was present, bypassing confirmation for that move, similar to
how paranoid:swim currently behaves.  Being stunned or confused also
behaves as if no trap was present, taking priority over hallucination.

This updates the documentation.

Supersedes #259
Closes #259
2023-09-08 15:55:31 -07:00
nhkeni
8c095b009a Add CRASHREPORT, show contact form on panic/impossible
When calling panic() or impossible(), create the option
of opening a browser window with most of the fields
already populated.  Code for MacOS and linux is included;
other ports are affected by argument change to early_init
which are done but not tested.

To enable, define CRASHREPORT in config.h and set
CRASHREPORTURL in sysconf to (for the moment at least)
http[s]://www.nethack.org/common/contactcr.html

Adds --grep-defined option to makedefs for Makefiles.

Adds "bid" (binary identifier), an MD4 of the main nethack
binary.  This is ONLY for helping (in the future) contact.html
to set the "NetHack from" field automatically for our own
binaries.  This can be faked, but the user can lie so nothing
lost.  There's nothing magic about MD4; other ports can use
anything that prodcues a long apparently random string we can
match against.

- new option --bidshow for us to get the MD4 of a
  released binary so I can add it to the website.
  Only available in wizard mode and not in nethack.6.
- typo macos -> macosx in hints file

No support for packaging builds as I'm not sure what that
would look like.

Adds a javascript helper for MacOS.
Adds a lua helper for linux (and builds and installs
 nhlua).
2023-09-06 12:27:13 -04:00
PatR
c7865f7588 PR #1071 again - highlighting critical HP
Update the documentation for
OPTIONS=status_hilite:hitpoints/criticalhp/<color&attributes>
A criticalhp rule now overrides up/down/changed rules as well as
absolute/percentage/always rules.
2023-08-05 11:05:07 -07:00
PatR
cb03790759 fix #K3966 - Guidebook error for encumbrance
The 'status' section early in the Guidebook says that encumbrance is
one of "Unencumbered, Encumbered, Stressed" and so on.  The second in
the list should say "Burdened" rather than "Encumbered".
2023-07-31 23:13:14 -07:00
PatR
4eadab380a Guidebook.tex bit
Backslash doesn't need to be escaped by backslash inside a verbatim
block (presumably the first character is an exception).  The doubled
backslashes in SOUNDDIR example were producing doubled backslashes in
the output.

There didn't seem to be any other instances of this.
2023-07-14 14:15:11 -07:00
PatR
2ff91032e0 Guidebook update
Have Guidebook.tex catch up with Guidebook.mn for hilite 'criticalhp'.

Tweak a couple of things in Guidebook.mn.
2023-07-13 23:49:07 -07:00
PatR
4fc96b0218 another paranoid_confirmation revision
Add support for
 |OPTIONS=paranoid_confirm:+foo !bar
to enable confirmation for foo and disable it for bar while leaving
other settings intact.  Drop support for
 |OPTIONS=!paranoid_confirm:bar
since paranoid_confirm:-bar and paranoid_confirm:+!bar accomplish the
same thing.  !paranoid_confirm still works as paranoid_confirm:none.

Update the documentation for paranoid_confirmation.  It doesn't spell
out all the ins and outs but should cover enough for actual use.

The revised Guidebook.tex is untested.
2023-07-10 23:38:18 -07:00
PatR
6cef49ed54 Guidebook update; mostly paranoid_confirmation
add paranoid_confirmation:AutoAll
update paranoid_confirmation:pray (for paranoid_confirm:Confirm)
update paranoid_confirmation:swim (reorder, and on by default)

update menustyle:full (for paranoid_confirm:AutoAll)

Guidebook.tex is updated but not tested.
2023-06-25 15:51:41 -07:00
PatR
e475dca209 add 'montelecontrol' option (wizard-mode only)
Add a new debugging option, 'montelecontrol', that allows a wizard-
mode player to choose a teleporting monster's destination.  If player
picks a bad spot, confirmation will be requested.  If accepted, the
spot will be used even though the consequences could be bad; that's
on the player.  If rejected, the destination will be assigned as if
no control had been attempted rather than try again.

The fuzzer isn't allowed to override a bad spot if it tries to pick
one.  That would probably trigger a sanity_check warning; the fuzzer
causes impossible warnings to behave as if panic, so accepting a bad
spot would just be fuzzer suicide.  It is allowed to randomly set the
option and maybe--though extremely unlikely--randomly pick a valid
controlled destination.
2023-06-09 00:56:53 -07:00
nhmall
2de3409113 Guidebook change follow-up 2023-05-07 07:38:22 -04:00
nhmall
2986d03adc Guidebook fix 2023-05-07 07:33:18 -04:00
PatR
01df119ae6 Guidebook.tex catchup
Add Guidebook.mn's recent #genocided changes to Guidebook.tex.
Not tested.
2023-05-07 01:22:43 -07:00
PatR
4d681eed46 new #overview menu
Require the 'm' prefix to treat #overview as a menu with selectable
entries.  During end-of-game disclosure it shows every level that was
visited, but during play it only shows levels which have annotations
(typically automatically generated ones).  The menu wasn't offering
any chance to add an annotation to levels without such, so force
'm #overview' to show every visited level.  Continue to avoid that
(and also avoid the clutter introduced by menu entry selector letters)
for normal #overview.
2023-04-19 02:30:32 -07:00
Pasi Kallinen
ffb61612e3 Option to create the character deaf
Allows creating your character permanently deaf,
for that added challenge.

Breaks saves.
2023-04-11 13:23:30 +03:00
nhmall
c70c9ec793 Guidebook datestamp to most recent Guidebook commit 2023-03-25 12:12:20 -04:00
PatR
0178ed81e1 fix #K3886 - "%USERPROFILE%\NetHack\" in Guidebook
Report was that recent Guidebook.txt contained a couple of instances
of spurious "(rq".  In Guidebook.mn, "\\%USERPROFILE%\\NetHack\\(rq"
needed three backslashes near the end, the first two to insert one
into the output and the third for intended "\(rq" directive.  It also
shouldn't have leading backslashes; expansion of %USERPROFILE% doesn't
need that.  "\%" would work but isn't necessary.

Also, prevent "%USERPROFILE\NetHack\" from being hyphenated, plus a
minor change in wording so that it won't be in position to warrant
that.
2023-03-16 22:34:58 -07:00
PatR
f35abea80b change 'm #tip' behavior
Using the 'm' prefix with #tip was putting up a menu to pick between
one or more floor containers and 'choose from invent', but that
interfered with choosing Tip as a context-sensitive item-action for
carried container.  Change 'm' to behave like it does with #eat and
\#quaff and several other commands:  skip possible candidates on the
floor and go directly to picking something from inventory.

That prevents using 'm' to force a menu of
|a - <floor container>
|i - pick a container being carried
for any menustyle when there is one floor container.  For menustyles
other than traditional, I think that's inconsequential; player needs
to answer 'n' for floor container and then get the choose-from-invent
prompt instead of 'i' and then choose.  When there are two or more
containers on hero's spot, 'm' prefix isn't needed to get that menu.

Unfortuately using 'm' to override menustyle:Traditional is still a
thing players might want to do.  Keep the prior behavior for that
style when multiple containers are present (dotip() already skipped
that menu despite 'm' when there was just one container).  Use the
new behavior (skip floor containers) when one (or none) is present.
That's inconsistent but seems more useful than alternatives.  It is
relatively unlikely that anyone who uses traditional non-menu item
selection will also use newfangled inventory item-actions so the menu
isn't likely to interfere with the latter.  Update the Guidebook to
describe how Traditional differs just in case.
2023-03-02 05:33:16 -08:00
Pasi Kallinen
fc7a32b86e Tutorial level
Add a tutorial level to teach commands to new players.
Very much a WIP.

Breaks save and bones compat.
2023-03-01 14:00:29 +02:00
nhkeni
c2f7e7a0ac Start using 3 part version numbers. 2023-02-27 10:18:14 -05:00
nhmall
4ac7725fde Guidebook update 2023-02-21 23:03:19 -05:00
nhmall
049ab7a5df remove some macgraphics references; some Amiga
Also closes #183
2023-02-21 22:54:56 -05: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
nhmall
7aab1c0b76 Guidebook update 2023-02-16 20:56:33 -05: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
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
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
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
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
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
nhmall
8755b3bb53 Guidebook update 2023-01-01 20:23:15 -05:00
PatR
11b72eb18b Guidebook typo
Fix misspelling of recently added "sortvanquished" option.
Copy+paste propagated it to from Guidebook.mn to Guidebook.tex.
2022-12-28 11:37:14 -08:00
nhmall
57dc8891d6 Guidebook datestamp 2022-12-27 21:03:41 -05:00
PatR
fcf2685cc3 'sortvanquished' option in Guidebook.tex
Not tested, but I tried to be more careful than last time....
2022-12-27 14:15:49 -08:00
nhmall
a4c9073a7c Guidebook datestamp; updated Guidebook.txt 2022-12-25 10:12:47 -05:00
nhmall
ca716c831b make some corrections to Guidebook.tex 2022-12-25 10:09:43 -05:00
PatR
4436d1eb4a doc update: 'role' changes for Guidebook.tex
Catch the LaTex Guidebook up with the nroff one for the role, race,
gender, and alignment options.

For both formats, comment out the decription of 'altmeta' on Amiga.
2022-12-24 14:29:58 -08:00
Michael Meyer
96343924ae Guidebook: formatting for '#repeat' heading
Minuscule change.  #repeat was not monospaced like the other extended
commands.
2022-12-20 23:38:33 -08:00