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

Function eye_of_newt_buzz

src/eat.c:1102–1123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1100}
1101
1102staticfn void
1103eye_of_newt_buzz(void)
1104{
1105 /* MRKR: "eye of newt" may give small magical energy boost */
1106 if (rn2(3) || 3 * u.uen <= 2 * u.uenmax) {
1107 int old_uen = u.uen;
1108
1109 u.uen += rnd(3);
1110 if (u.uen > u.uenmax) {
1111 if (!rn2(3)) {
1112 u.uenmax++;
1113 if (u.uenmax > u.uenpeak)
1114 u.uenpeak = u.uenmax;
1115 }
1116 u.uen = u.uenmax;
1117 }
1118 if (old_uen != u.uen) {
1119 You_feel("a mild buzz.");
1120 disp.botl = TRUE;
1121 }
1122 }
1123}
1124
1125DISABLE_WARNING_FORMAT_NONLITERAL
1126

Callers 1

cpostfxFunction · 0.85

Calls 3

rn2Function · 0.85
rndFunction · 0.85
You_feelFunction · 0.85

Tested by

no test coverage detected