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

Function peffect_full_healing

src/potion.c:1143–1162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1141}
1142
1143staticfn void
1144peffect_full_healing(struct obj *otmp)
1145{
1146 You_feel("completely healed.");
1147 healup(400, 4 + 4 * bcsign(otmp), !otmp->cursed, TRUE);
1148 /* Restore one lost level if blessed */
1149 if (otmp->blessed && u.ulevel < u.ulevelmax) {
1150 /* when multiple levels have been lost, drinking
1151 multiple potions will only get half of them back */
1152 u.ulevelmax -= 1;
1153 pluslvl(FALSE);
1154 }
1155 (void) make_hallucinated(0L, TRUE, 0L);
1156 exercise(A_STR, TRUE);
1157 exercise(A_CON, TRUE);
1158 /* blessed potion heals wounded legs even when riding (so heals steed's
1159 legs--it's magic); uncursed potion heals hero's legs unless riding */
1160 if (Wounded_legs && (otmp->blessed || (!otmp->cursed && !u.usteed)))
1161 heal_legs(0);
1162}
1163
1164staticfn void
1165peffect_levitation(struct obj *otmp)

Callers 1

peffectsFunction · 0.85

Calls 7

You_feelFunction · 0.85
healupFunction · 0.85
bcsignFunction · 0.85
pluslvlFunction · 0.85
make_hallucinatedFunction · 0.85
exerciseFunction · 0.85
heal_legsFunction · 0.85

Tested by

no test coverage detected