Visitar URL original
Bugfix: do not ask for confirmation for unambiguous char combos by aoeixsz4 · Pull Request #1667 · NetHack/NetHack · GitHub
Skip to content

Bugfix: do not ask for confirmation for unambiguous char combos - #1667

Open
aoeixsz4 wants to merge 1 commit into
NetHack:NetHack-5.0from
aoeixsz4:bugfix/prompt-unambiguous-role
Open

aoeixsz4 wants to merge 1 commit into
NetHack:NetHack-5.0from
aoeixsz4:bugfix/prompt-unambiguous-role

Conversation

@aoeixsz4

Copy link
Copy Markdown

It seems that the game will always ask "are you sure you want to play $combo? y/n" on start
in cases where, due to role or race restrictions, only one combination of race/role/align/gender is possible,
but the full combination has not been explicitly set in the rcfile.

Examples that will prompt (one or more property constrained implicitly):
OPTIONS=race:dwarf,role:valkyrie,gender:female
OPTIONS=race:dwarf,role:valkyrie,align:lawful
OPTIONS=race:dwarf,role:valkyrie
OPTIONS=race:gnome,role:wizard,gender:female

Examples that will not prompt:
OPTIONS=race:dwarf,role:valkyrie,gender:female,align:lawful
OPTIONS=race:gnome,role:wizard,gender:female,align:neutral

A possible fix for this is to re-compute picksomething in src/role.c after rigid_role_checks();

Add an additional re-computation of `picksomething` in
`src/role.c:genl_player_setup`, so that unambiguous combinations like
OPTIONS=role:valkyrie,race:dwarf do not require a prompt for confirmation,
when starting the game.
@aoeixsz4

Copy link
Copy Markdown
Author

proposed fix works in my local test, Gentoo Linux system, using:
cd sys/unix; sh setup.sh hints/linux.500; cd ..; WANT_WIN_CURSES=1 make all

nh rcfile: https://www.alt.org/nethack/userdata/a/aoei/aoei.nh500rc (fiddle with the comments at the top for fully-specified vs. implicitly-specified role combinations)

@aoeixsz4

aoeixsz4 commented Aug 29, 2026 •

Copy link
Copy Markdown
Author

bug report reference: #K4519 (submitted with online form at https://nethack.org/common/contact.html)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant