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

Function bless

src/mkobj.c:1744–1764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1742 */
1743
1744void
1745bless(struct obj *otmp)
1746{
1747 int old_light = 0;
1748
1749 if (otmp->oclass == COIN_CLASS)
1750 return;
1751 if (otmp->lamplit)
1752 old_light = arti_light_radius(otmp);
1753 otmp->cursed = 0;
1754 otmp->blessed = 1;
1755 if (carried(otmp) && confers_luck(otmp))
1756 set_moreluck();
1757 else if (otmp->otyp == BAG_OF_HOLDING)
1758 otmp->owt = weight(otmp);
1759 else if (otmp->otyp == FIGURINE && otmp->timed)
1760 (void) stop_timer(FIG_TRANSFORM, obj_to_any(otmp));
1761 if (otmp->lamplit)
1762 maybe_adjust_light(otmp, old_light);
1763 return;
1764}
1765
1766void
1767unbless(struct obj *otmp)

Callers 13

fuzzer_savelifeFunction · 0.85
mk_mplayer_armorFunction · 0.85
impact_arti_lightFunction · 0.85
gcrownuFunction · 0.85
give_spellFunction · 0.85
pleasedFunction · 0.85
gain_guardian_angelFunction · 0.85
blessorcurseFunction · 0.85
m_initweapFunction · 0.85
create_objectFunction · 0.85
rechargeFunction · 0.85
seffect_enchant_armorFunction · 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