\#genocided revision

The #genocided command was revealing extinct monster species when used
during normal play.  That was not intended, so stop.  Change to only
reveal them in wizard or explore modes and also during end-of-game
disclosure but suppress them during normal play.

The full description of #genocided is now dynamically updated for '# ?'
during normal play to remove its reference to extinctions.  Also, check
for skipping wizard mode commands before doing description searching.

\#genocided was out of alphabetical order in the full commands list.
Both it and #vanquished should have had the GENERALCMD flag; they
don't affect game state.

Change #genocided to use the sort order currently set for #vanquished,
and allow 'm #genocided' to put up the same menu as 'm #vanquished'.
(Not quite the same.  Sorting by count of monster deaths isn't
appropriate for listing genocides where an arbitrary number may have
been killed before the genocide occurred.  If the preferred order for
vanquished is set that way, alphabetical will be used for genocided.)

Setting the order via menu for either command sets the order for both,
but doing so via #genocided doesn't offer the count-high-to-low and
count-low-to-high choices.  During disclosure, you can answer 'a' when
asked whether to disclose genocided and extinct monster types and like
for vanquished monsters, that lets you choose an order at end-of-game.
Doing so won't affect disclosing of vanquished monsters--it'll be too
late for them.

A chunk of this diff is due to moving the #wizborn code out of the
middle of #vanquished handling.

Guidebook.ms has been updated but Guidebook.tex is lagging.
This commit is contained in:
PatR
2023-05-03 04:58:39 -07:00
parent 654b7d41b2
commit e48c6bdc00
5 changed files with 214 additions and 102 deletions

View File

@@ -1313,7 +1313,7 @@ optfn_disclose(int optidx, int req, boolean negated, char *opts, char *op)
* DISCLOSE_PROMPT_DEFAULT_NO ask with default answer no
* DISCLOSE_YES_WITHOUT_PROMPT always disclose and don't ask
* DISCLOSE_NO_WITHOUT_PROMPT never disclose and don't ask
* DISCLOSE_PROMPT_DEFAULT_SPECIAL for 'vanquished' only...
* DISCLOSE_PROMPT_DEFAULT_SPECIAL for 'vanq'/'genod' only...
* DISCLOSE_SPECIAL_WITHOUT_PROMPT ...to set up sort order.
*
* Those setting values can be used in the option
@@ -1367,7 +1367,7 @@ optfn_disclose(int optidx, int req, boolean negated, char *opts, char *op)
continue;
}
if (prefix_val != -1) {
if (*dop != 'v') {
if (*dop != 'v' && *dop != 'g') {
if (prefix_val == DISCLOSE_PROMPT_DEFAULT_SPECIAL)
prefix_val = DISCLOSE_PROMPT_DEFAULT_YES;
if (prefix_val == DISCLOSE_SPECIAL_WITHOUT_PROMPT)
@@ -3598,7 +3598,7 @@ optfn_sortvanquished(
uchar prev_sortmode = flags.vanq_sortmode;
/* return handler_sortvanquished(); */
(void) set_vanq_order(); /* insight.c */
(void) set_vanq_order(TRUE); /* insight.c */
pline("'%s' %s \"%s: %s\".", optname,
(flags.vanq_sortmode == prev_sortmode)
? "not changed, still"
@@ -5287,7 +5287,7 @@ handler_disclose(void)
"Always disclose, without prompting",
(c == any.a_char) ? MENU_ITEMFLAGS_SELECTED
: MENU_ITEMFLAGS_NONE);
if (*disclosure_names[i] == 'v') {
if (*disclosure_names[i] == 'v' || *disclosure_names[i] == 'g') {
any.a_char = DISCLOSE_SPECIAL_WITHOUT_PROMPT; /* '#' */
add_menu(tmpwin, &nul_glyphinfo, &any, 0,
any.a_char, ATR_NONE, clr,
@@ -5307,11 +5307,11 @@ handler_disclose(void)
"Prompt, with default answer of \"Yes\"",
(c == any.a_char) ? MENU_ITEMFLAGS_SELECTED
: MENU_ITEMFLAGS_NONE);
if (*disclosure_names[i] == 'v') {
if (*disclosure_names[i] == 'v' || *disclosure_names[i] == 'g') {
any.a_char = DISCLOSE_PROMPT_DEFAULT_SPECIAL; /* '?' */
add_menu(tmpwin, &nul_glyphinfo, &any, 0,
any.a_char, ATR_NONE, clr,
"Prompt, with default answer of \"Ask\" to request sort menu",
"Prompt, with default answer of \"Ask\" to request sort menu",
(c == any.a_char) ? MENU_ITEMFLAGS_SELECTED
: MENU_ITEMFLAGS_NONE);
}