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

Function minuhpmax

src/attrib.c:1146–1152  ·  view source on GitHub ↗

minimum value for uhpmax is ulevel but for life-saving it is always at least 10 if ulevel is less than that */

Source from the content-addressed store, hash-verified

1144/* minimum value for uhpmax is ulevel but for life-saving it is always at
1145 least 10 if ulevel is less than that */
1146int
1147minuhpmax(int altmin)
1148{
1149 if (altmin < 1)
1150 altmin = 1;
1151 return max(u.ulevel, altmin);
1152}
1153
1154/* update u.uhpmax or u.mhmax and values of other things that depend upon
1155 whichever of them is relevant */

Callers 7

savelifeFunction · 0.85
losexpFunction · 0.85
touch_of_deathFunction · 0.85
losestrFunction · 0.85
poisonedFunction · 0.85
dofiretrapFunction · 0.85
hitmuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected