autounlock overhaul

This gives the player more control over what autounlock does.  It is
now a compound option rather than a boolean, and takes values of
  autounlock:none
  !autounlock or noautounlock (shortcuts for none)
  autounlock:untrap + apply-key + kick + force (spaces are optional
    or can be used instead of plus-signs, but can't mix "foo bar+quux")
  autounlock (without a value, shortcut for autounlock:apply-key).
Default is autounlock:apply-key.

Untrap isn't implemented (feel free to jump in) so is suppressed from
the 'O' command's new sub-menu for autounlock.  It's parsed and
accepted from .nethackrc but won't accomplish anything.

[Just musing: it should be feasible to kick in direction '.' to break
open a container or #force to an adjacent spot to break open a door.
If that was done, autounlock:kick+force (or more likely autounlock:
apply-key+kick+force when lacking a key) would resort to force if hero
couldn't kick due to wounded legs or riding.

This changes struct flags so increments EDITLEVEL again.

This includes pull requests #750 from entrez and #751 from FIQ but was
entered from scratch rather than using use their commits.

Closes #750
Closes #751
This commit is contained in:
PatR
2022-05-04 19:13:28 -07:00
parent d1b14e08c4
commit 44d5be6eb4
9 changed files with 282 additions and 31 deletions

View File

@@ -9,8 +9,6 @@ autoopen walking into a door attempts to open it [True]
autopickup automatically pick up objects you move over [True]
autoquiver when firing with an empty quiver, select some [False]
suitable inventory weapon to fill the quiver
autounlock when opening a locked door or looting a locked [True]
container while carrying a key, offer to use it
BIOS allow the use of IBM ROM BIOS calls [False]
blind your character is permanently blind [False]
bones allow loading bones files [True]
@@ -150,6 +148,12 @@ Compound options are written as option_name:option_value.
Compound options which can be set during the game are:
autounlock when attempting to open a door or loot a [Apply-Key]
container that is locked, specifies an action to take:
can be None, or one or more of Apply-Key + Kick + Force;
Kick is only useful for doors and Force is only useful for
containers; either will only be attempted if Apply-Key is
omitted or you aren't carrying any unlocking tool
boulder override the default boulder symbol [`]
disclose the types of information you want [ni na nv ng nc no]
offered at the end of the game