disclose refinements:

- allow spaces between the different possibilities
- add a missing null at the end of the list of prefixes to prevent index()
  from going crazy
- slight re-wording of the Guidebook
This commit is contained in:
nethack.allison
2002-01-28 12:58:45 +00:00
parent 39f24cda78
commit 6fea907683
3 changed files with 20 additions and 14 deletions

View File

@@ -1653,13 +1653,13 @@ The possibilities are:
.si
i - disclose your inventory.
a - disclose your attributes.
v - summarizing monsters that have been vanquished.
g - listing monster species that have been genocided.
c - displaying your conduct.
v - summarize monsters that have been vanquished.
g - list monster species that have been genocided.
c - display your conduct.
.ei
.ed
Each disclosure possibility can optionally be preceded by a prefix which
let you refine how it behaves. Here are some of the prefixes:
let you refine how it behaves. Here are the valid prefixes:
.sd
.si
y - prompt you and default to yes on the prompt.
@@ -1668,8 +1668,7 @@ n - prompt you and default to no on the prompt.
- - do not disclose it and do not prompt.
.ei
.ed
Note that the vanquished monsters list includes all monsters killed by
traps and each other as well as by you.(ex. ``disclose:yina+v-g-c'')
(ex. ``disclose:yi na +v -g -c'')
The example sets
.op inventory
to prompt and default to yes,
@@ -1681,6 +1680,8 @@ to disclose without prompting,
to not disclose and not to prompt,
.op conduct
to not disclose and not to prompt.
Note that the vanquished monsters list includes all monsters killed by
traps and each other as well as by you.
.lp dogname
Name your starting dog (ex. ``dogname:Fang'').
Cannot be set with the `O' command.

View File

@@ -2075,14 +2075,14 @@ The possibilities are:
%.si
{\tt i} --- disclose your inventory.\\
{\tt a} --- disclose your attributes.\\
{\tt v} --- summarizing monsters that have been vanquished.\\
{\tt g} --- listing monster species that have been genocided.\\
{\tt c} --- displaying your conduct.
{\tt v} --- summarize monsters that have been vanquished.\\
{\tt g} --- list monster species that have been genocided.\\
{\tt c} --- display your conduct.
%.ei
%.ed
Each disclosure possibility can optionally be preceded by a prefix which
let you refine how it behaves. Here are some of the prefixes:
let you refine how it behaves. Here are the valid prefixes:
%.sd
%.si
@@ -2093,13 +2093,14 @@ let you refine how it behaves. Here are some of the prefixes:
%.ei
%.ed
Note that the vanquished monsters list includes all monsters killed by
traps and each other as well as by you. (ex.\ ``{\tt disclose:yina+v-g-c}'')
(ex.\ ``{\tt disclose:yi na +v -g -c}'')
The example sets {\it inventory\/} to {\it prompt\/} and default to {\it yes\/},
{\it attributes\/} to {\it prompt\/} and default to {\it no\/},
{\it vanquished\/} to {\it disclose without prompting\/},
{\it genocided\/} to {\it not disclose\/} and not to {\it prompt\/}, and
{\it conduct\/} to {\it not disclose\/} and not to {\it prompt\/}.
Note that the vanquished monsters list includes all monsters killed by
traps and each other as well as by you.
%.lp
\item[\ib{dogname}]
Name your starting dog (ex.\ ``{\tt dogname:Fang}'').

View File

@@ -1555,7 +1555,7 @@ goodfruit:
}
/* things to disclose at end of game */
if (match_optname(opts, "disclose", 4, TRUE)) {
if (match_optname(opts, "disclose", 7, TRUE)) {
/*
* The order that the end_disclore options are stored:
* inventory, attribs, vanquished, genocided, conduct
@@ -1604,7 +1604,8 @@ goodfruit:
DISCLOSE_PROMPT_DEFAULT_YES,
DISCLOSE_PROMPT_DEFAULT_NO,
DISCLOSE_YES_WITHOUT_PROMPT,
DISCLOSE_NO_WITHOUT_PROMPT
DISCLOSE_NO_WITHOUT_PROMPT,
'\0'
};
c = lowc(*op);
if (c == 'k') c = 'v'; /* killed -> vanquished */
@@ -1623,6 +1624,8 @@ goodfruit:
flags.end_disclose[idx] = DISCLOSE_YES_WITHOUT_PROMPT;
} else if (index(valid_settings, c)) {
prefix_val = c;
} else if (c == ' ') {
/* do nothing */
} else
badopt = TRUE;
op++;
@@ -2402,6 +2405,7 @@ char *buf;
else if (!strcmp(optname, "disclose")) {
for (i = 0; i < NUM_DISCLOSURE_OPTIONS; i++) {
char topt[2];
if (i) Strcat(buf," ");
topt[1] = '\0';
topt[0] = flags.end_disclose[i];
Strcat(buf, topt);