MCPcopy Index your code
hub / github.com/NetHack/NetHack / healup

Function healup

src/potion.c:1427–1458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1425}
1426
1427void
1428healup(int nhp, int nxtra, boolean curesick, boolean cureblind)
1429{
1430 if (nhp) {
1431 if (Upolyd) {
1432 u.mh += nhp;
1433 if (u.mh > u.mhmax)
1434 u.mh = (u.mhmax += nxtra);
1435 } else {
1436 u.uhp += nhp;
1437 if (u.uhp > u.uhpmax) {
1438 u.uhp = (u.uhpmax += nxtra);
1439 if (u.uhpmax > u.uhppeak)
1440 u.uhppeak = u.uhpmax;
1441 }
1442 }
1443 }
1444 if (cureblind) {
1445 /* 3.6.1: it's debatable whether healing magic should clean off
1446 mundane 'dirt', but if it doesn't, blindness isn't cured */
1447 u.ucreamed = 0;
1448 make_blinded(0L, TRUE);
1449 /* heal deafness too */
1450 make_deaf(0L, TRUE);
1451 }
1452 if (curesick) {
1453 make_vomiting(0L, TRUE);
1454 make_sick(0L, (char *) 0, TRUE, SICK_ALL);
1455 }
1456 disp.botl = TRUE;
1457 return;
1458}
1459
1460void
1461strange_feeling(struct obj *obj, const char *txt)

Callers 9

peffect_waterFunction · 0.85
peffect_boozeFunction · 0.85
peffect_healingFunction · 0.85
peffect_extra_healingFunction · 0.85
peffect_full_healingFunction · 0.85
artifact_hitFunction · 0.85
healmonFunction · 0.85
zapyourselfFunction · 0.85
spelleffectsFunction · 0.85

Calls 4

make_blindedFunction · 0.85
make_deafFunction · 0.85
make_vomitingFunction · 0.85
make_sickFunction · 0.85

Tested by

no test coverage detected