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

Function init_uhunger

src/eat.c:125–135  ·  view source on GitHub ↗

used for hero init, life saving (if choking), and prayer results of fix starving, fix weak from hunger, or golden glow boon (if u.uhunger < 900) */

Source from the content-addressed store, hash-verified

123/* used for hero init, life saving (if choking), and prayer results of fix
124 starving, fix weak from hunger, or golden glow boon (if u.uhunger < 900) */
125void
126init_uhunger(void)
127{
128 disp.botl = (u.uhs != NOT_HUNGRY || ATEMP(A_STR) < 0);
129 u.uhunger = 900;
130 u.uhs = NOT_HUNGRY;
131 if (ATEMP(A_STR) < 0) {
132 ATEMP(A_STR) = 0;
133 encumber_msg();
134 }
135}
136
137/* tin types [SPINACH_TIN = -1, overrides corpsenm, nut==600] */
138static const struct {

Callers 5

savelifeFunction · 0.85
nhl_gamestateFunction · 0.85
fix_worst_troubleFunction · 0.85
pleasedFunction · 0.85
u_init_miscFunction · 0.85

Calls 1

encumber_msgFunction · 0.85

Tested by

no test coverage detected