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

Function uncurse

src/mkobj.c:1821–1838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1819}
1820
1821void
1822uncurse(struct obj *otmp)
1823{
1824 int old_light = 0;
1825
1826 if (otmp->lamplit)
1827 old_light = arti_light_radius(otmp);
1828 otmp->cursed = 0;
1829 if (carried(otmp) && confers_luck(otmp))
1830 set_moreluck();
1831 else if (otmp->otyp == BAG_OF_HOLDING)
1832 otmp->owt = weight(otmp);
1833 else if (otmp->otyp == FIGURINE && otmp->timed)
1834 (void) stop_timer(FIG_TRANSFORM, obj_to_any(otmp));
1835 if (otmp->lamplit)
1836 maybe_adjust_light(otmp, old_light);
1837 return;
1838}
1839
1840void
1841blessorcurse(struct obj *otmp, int chance)

Callers 13

chweponFunction · 0.85
retouch_equipmentFunction · 0.85
fix_curse_troubleFunction · 0.85
fix_worst_troubleFunction · 0.85
pleasedFunction · 0.85
bestow_artifactFunction · 0.85
cancel_itemFunction · 0.85
create_objectFunction · 0.85
priestiniFunction · 0.85
rechargeFunction · 0.85
seffect_enchant_armorFunction · 0.85
seffect_remove_curseFunction · 0.85

Calls 7

arti_light_radiusFunction · 0.85
confers_luckFunction · 0.85
set_moreluckFunction · 0.85
weightFunction · 0.85
stop_timerFunction · 0.85
obj_to_anyFunction · 0.85
maybe_adjust_lightFunction · 0.85

Tested by

no test coverage detected