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:
@@ -20,7 +20,6 @@ struct flag {
|
||||
boolean autodig; /* MRKR: Automatically dig */
|
||||
boolean autoquiver; /* Automatically fill quiver */
|
||||
boolean autoopen; /* open doors by walking into them */
|
||||
boolean autounlock; /* automatically apply unlocking tools */
|
||||
boolean beginner; /* True early in each game; affects feedback */
|
||||
boolean biff; /* enable checking for mail */
|
||||
boolean bones; /* allow saving/loading bones */
|
||||
@@ -63,6 +62,11 @@ struct flag {
|
||||
boolean tombstone; /* print tombstone */
|
||||
boolean verbose; /* max battle info */
|
||||
int end_top, end_around; /* describe desired score list */
|
||||
unsigned autounlock; /* locked door/chest action */
|
||||
#define AUTOUNLOCK_UNTRAP 1
|
||||
#define AUTOUNLOCK_APPLY_KEY 2
|
||||
#define AUTOUNLOCK_KICK 4
|
||||
#define AUTOUNLOCK_FORCE 8
|
||||
unsigned moonphase;
|
||||
unsigned long suppress_alert;
|
||||
#define NEW_MOON 0
|
||||
|
||||
Reference in New Issue
Block a user