MCPcopy Create free account
hub / github.com/NetHack/NetHack / show_conduct

Function show_conduct

src/insight.c:2088–2236  ·  view source on GitHub ↗

display conducts; for doconduct(), also disclose() and dump_everything() */

Source from the content-addressed store, hash-verified

2086
2087/* display conducts; for doconduct(), also disclose() and dump_everything() */
2088void
2089show_conduct(int final)
2090{
2091 char buf[BUFSZ], bufN[40];
2092 int ngenocided;
2093
2094 /* Create the conduct window */
2095 ge.en_win = create_nhwindow(NHW_MENU);
2096 putstr(ge.en_win, 0, "Voluntary challenges:");
2097
2098 /* rerolling; "You <this or that>" is about the character, rerolling
2099 is about the player so phrase it differently;
2100 also, always use past tense since the chance to do something with it
2101 is gone by time player can issue #conduct command or see disclosure */
2102 if (!u.uroleplay.reroll)
2103 Strcpy(buf, " Character rerolling was not enabled.");
2104 else if (!u.uroleplay.numrerolls)
2105 Strcpy(buf, " Your character was not rerolled.");
2106 else
2107 Sprintf(buf, " Your character was rerolled %s.",
2108 N_times(u.uroleplay.numrerolls, bufN));
2109 enlght_out(buf);
2110
2111 if (u.uroleplay.blind)
2112 you_have_been("blind from birth");
2113 if (u.uroleplay.deaf)
2114 you_have_been("deaf from birth");
2115 /* note: we don't report "you are without possessions" unless the
2116 game started with the pauper option set */
2117 if (u.uroleplay.pauper)
2118 enl_msg(You_, gi.invent ? "started" : "are", "started out",
2119 " without possessions", "");
2120 /* nudist is far more than a subset of possessionless, and a much
2121 more impressive accomplishment, but showing "started out without
2122 possessions" before "faithfully nudist" looks more logical */
2123 if (u.uroleplay.nudist)
2124 you_have_been("faithfully nudist");
2125
2126 if (!u.uconduct.food)
2127 enl_msg(You_, "have gone", "went", " without food", "");
2128 /* but beverages are okay */
2129 else if (!u.uconduct.unvegan)
2130 you_have_X("followed a strict vegan diet");
2131 else if (!u.uconduct.unvegetarian)
2132 you_have_been("vegetarian");
2133
2134 if (!u.uconduct.gnostic)
2135 you_have_been("an atheist");
2136
2137 if (!u.uconduct.weaphit) {
2138 you_have_never("hit with a wielded weapon");
2139 } else if (wizard) {
2140 Sprintf(buf, "hit with a wielded weapon %ld time%s",
2141 u.uconduct.weaphit, plur(u.uconduct.weaphit));
2142 you_have_X(buf);
2143 }
2144 if (!u.uconduct.killer)
2145 you_have_been("a pacifist");

Callers 3

dump_everythingFunction · 0.85
discloseFunction · 0.85
doconductFunction · 0.85

Calls 6

N_timesFunction · 0.85
enlght_outFunction · 0.85
num_genocidesFunction · 0.85
eosFunction · 0.85
sokoban_in_playFunction · 0.85
show_achievementsFunction · 0.85

Tested by

no test coverage detected