reroll feedback
All the conduct feedback via "you ..." is directed at the character, so seeing "you have rerolled your character 3 times" in conduct disclosure looked strange. Change that to "your character was rerolled 3 times."
This commit is contained in:
+49
-54
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 insight.c $NHDT-Date: 1737384766 2025/01/20 06:52:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.128 $ */
|
/* NetHack 3.7 insight.c $NHDT-Date: 1777004419 2026/04/23 20:20:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.134 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -16,13 +16,14 @@
|
|||||||
|
|
||||||
staticfn void enlght_out(const char *);
|
staticfn void enlght_out(const char *);
|
||||||
staticfn void enlght_line(const char *, const char *, const char *,
|
staticfn void enlght_line(const char *, const char *, const char *,
|
||||||
const char *);
|
const char *);
|
||||||
staticfn char *enlght_combatinc(const char *, int, int, char *);
|
staticfn char *enlght_combatinc(const char *, int, int, char *);
|
||||||
staticfn void enlght_halfdmg(int, int);
|
staticfn void enlght_halfdmg(int, int);
|
||||||
staticfn boolean walking_on_water(void);
|
staticfn boolean walking_on_water(void);
|
||||||
staticfn boolean cause_known(int);
|
staticfn boolean cause_known(int);
|
||||||
staticfn char *attrval(int, int, char *);
|
staticfn char *attrval(int, int, char *);
|
||||||
staticfn char *fmt_elapsed_time(char *, int);
|
staticfn char *fmt_elapsed_time(char *, int);
|
||||||
|
staticfn char *N_times(long, char *) NONNULL NONNULLARG2;
|
||||||
staticfn void background_enlightenment(int, int);
|
staticfn void background_enlightenment(int, int);
|
||||||
staticfn void basics_enlightenment(int, int);
|
staticfn void basics_enlightenment(int, int);
|
||||||
staticfn void characteristics_enlightenment(int, int);
|
staticfn void characteristics_enlightenment(int, int);
|
||||||
@@ -356,6 +357,28 @@ fmt_elapsed_time(char *outbuf, int final)
|
|||||||
return outbuf;
|
return outbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* "once" vs "twice" vs "17 times", used in several places */
|
||||||
|
staticfn char *
|
||||||
|
N_times(long n, char *outbuf)
|
||||||
|
{
|
||||||
|
switch (n) {
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
Sprintf(outbuf, "%ld times", n);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Strcpy(outbuf, "once");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Strcpy(outbuf, "twice");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Strcpy(outbuf, "thrice");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return outbuf;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
enlightenment(
|
enlightenment(
|
||||||
int mode, /* BASICENLIGHTENMENT | MAGICENLIGHTENMENT (| both) */
|
int mode, /* BASICENLIGHTENMENT | MAGICENLIGHTENMENT (| both) */
|
||||||
@@ -1972,23 +1995,10 @@ attributes_enlightenment(
|
|||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
if (final < 2) { /* still in progress, or quit/escaped/ascended */
|
if (final < 2) { /* still in progress, or quit/escaped/ascended */
|
||||||
p = "survived after being killed ";
|
p = "survived after being killed ";
|
||||||
switch (u.umortality) {
|
if (!u.umortality)
|
||||||
case 0:
|
|
||||||
p = !final ? (char *) 0 : "survived";
|
p = !final ? (char *) 0 : "survived";
|
||||||
break;
|
else
|
||||||
case 1:
|
(void) N_times((long) u.umortality, buf);
|
||||||
Strcpy(buf, "once");
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
Strcpy(buf, "twice");
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
Strcpy(buf, "thrice");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
Sprintf(buf, "%d times", u.umortality);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else { /* game ended in character's death */
|
} else { /* game ended in character's death */
|
||||||
p = "are dead";
|
p = "are dead";
|
||||||
switch (u.umortality) {
|
switch (u.umortality) {
|
||||||
@@ -2093,13 +2103,26 @@ doconduct(void)
|
|||||||
void
|
void
|
||||||
show_conduct(int final)
|
show_conduct(int final)
|
||||||
{
|
{
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ], bufN[40];
|
||||||
int ngenocided;
|
int ngenocided;
|
||||||
|
|
||||||
/* Create the conduct window */
|
/* Create the conduct window */
|
||||||
ge.en_win = create_nhwindow(NHW_MENU);
|
ge.en_win = create_nhwindow(NHW_MENU);
|
||||||
putstr(ge.en_win, 0, "Voluntary challenges:");
|
putstr(ge.en_win, 0, "Voluntary challenges:");
|
||||||
|
|
||||||
|
/* rerolling; "You <this or that>" is about the character, rerolling
|
||||||
|
is about the player so phrase it differently;
|
||||||
|
also, always use past tense since the chance to do something with it
|
||||||
|
is gone by time player can issue #conduct command or see disclosure */
|
||||||
|
if (!u.uroleplay.reroll)
|
||||||
|
Strcpy(buf, " Character rerolling was not enabled.");
|
||||||
|
else if (!u.uroleplay.numrerolls)
|
||||||
|
Strcpy(buf, " Your character was not rerolled.");
|
||||||
|
else
|
||||||
|
Sprintf(buf, " Your character was rerolled %s.",
|
||||||
|
N_times(u.uroleplay.numrerolls, bufN));
|
||||||
|
enlght_out(buf);
|
||||||
|
|
||||||
if (u.uroleplay.blind)
|
if (u.uroleplay.blind)
|
||||||
you_have_been("blind from birth");
|
you_have_been("blind from birth");
|
||||||
if (u.uroleplay.deaf)
|
if (u.uroleplay.deaf)
|
||||||
@@ -2109,12 +2132,6 @@ show_conduct(int final)
|
|||||||
if (u.uroleplay.pauper)
|
if (u.uroleplay.pauper)
|
||||||
enl_msg(You_, gi.invent ? "started" : "are", "started out",
|
enl_msg(You_, gi.invent ? "started" : "are", "started out",
|
||||||
" without possessions", "");
|
" without possessions", "");
|
||||||
if (u.uroleplay.reroll) {
|
|
||||||
Sprintf(buf, "rerolled your character %ld time%s",
|
|
||||||
u.uroleplay.numrerolls, plur(u.uroleplay.numrerolls));
|
|
||||||
you_have_X(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* nudist is far more than a subset of possessionless, and a much
|
/* nudist is far more than a subset of possessionless, and a much
|
||||||
more impressive accomplishment, but showing "started out without
|
more impressive accomplishment, but showing "started out without
|
||||||
possessions" before "faithfully nudist" looks more logical */
|
possessions" before "faithfully nudist" looks more logical */
|
||||||
@@ -2214,25 +2231,13 @@ show_conduct(int final)
|
|||||||
if (sokoban_in_play()) {
|
if (sokoban_in_play()) {
|
||||||
const char *presentverb = "have violated", *pastverb = "violated";
|
const char *presentverb = "have violated", *pastverb = "violated";
|
||||||
|
|
||||||
Strcpy(buf, " the special Sokoban rules ");
|
if (!u.uconduct.sokocheat) {
|
||||||
switch (u.uconduct.sokocheat) {
|
|
||||||
case 0L:
|
|
||||||
presentverb = "have not violated";
|
presentverb = "have not violated";
|
||||||
pastverb = "did not violate";
|
pastverb = "did not violate";
|
||||||
Strcpy(buf, " any of the special Sokoban rules");
|
Strcpy(buf, " any of the special Sokoban rules");
|
||||||
break;
|
} else {
|
||||||
case 1L:
|
Strcpy(buf, " the special Sokoban rules ");
|
||||||
Strcat(buf, "once");
|
Strcat(buf, N_times(u.uconduct.sokocheat, bufN));
|
||||||
break;
|
|
||||||
case 2L:
|
|
||||||
Strcat(buf, "twice");
|
|
||||||
break;
|
|
||||||
case 3L:
|
|
||||||
Strcat(buf, "thrice");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
Sprintf(eos(buf), "%ld times", u.uconduct.sokocheat);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
enl_msg(You_, presentverb, pastverb, buf, "");
|
enl_msg(You_, presentverb, pastverb, buf, "");
|
||||||
}
|
}
|
||||||
@@ -2899,19 +2904,9 @@ list_vanquished(char defquery, boolean ask)
|
|||||||
Sprintf(buf, "%s%s",
|
Sprintf(buf, "%s%s",
|
||||||
!type_is_pname(&mons[i]) ? "the " : "",
|
!type_is_pname(&mons[i]) ? "the " : "",
|
||||||
mons[i].pmnames[NEUTRAL]);
|
mons[i].pmnames[NEUTRAL]);
|
||||||
if (nkilled > 1) {
|
if (nkilled > 1)
|
||||||
switch (nkilled) {
|
Sprintf(eos(buf), " (%s)",
|
||||||
case 2:
|
N_times((long) nkilled, buftoo));
|
||||||
Sprintf(eos(buf), " (twice)");
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
Sprintf(eos(buf), " (thrice)");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
Sprintf(eos(buf), " (%d times)", nkilled);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
was_uniq = TRUE;
|
was_uniq = TRUE;
|
||||||
} else {
|
} else {
|
||||||
if (uniq_header && was_uniq) {
|
if (uniq_header && was_uniq) {
|
||||||
|
|||||||
Reference in New Issue
Block a user