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

Function unbless

src/mkobj.c:1766–1780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1764}
1765
1766void
1767unbless(struct obj *otmp)
1768{
1769 int old_light = 0;
1770
1771 if (otmp->lamplit)
1772 old_light = arti_light_radius(otmp);
1773 otmp->blessed = 0;
1774 if (carried(otmp) && confers_luck(otmp))
1775 set_moreluck();
1776 else if (otmp->otyp == BAG_OF_HOLDING)
1777 otmp->owt = weight(otmp);
1778 if (otmp->lamplit)
1779 maybe_adjust_light(otmp, old_light);
1780}
1781
1782void
1783curse(struct obj *otmp)

Callers 6

rndcurseFunction · 0.85
pickup_objectFunction · 0.85
cancel_itemFunction · 0.85
use_defensiveFunction · 0.85
doapplyFunction · 0.85
create_objectFunction · 0.85

Calls 5

arti_light_radiusFunction · 0.85
confers_luckFunction · 0.85
set_moreluckFunction · 0.85
weightFunction · 0.85
maybe_adjust_lightFunction · 0.85

Tested by

no test coverage detected