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

Function blessorcurse

src/mkobj.c:1840–1854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1838}
1839
1840void
1841blessorcurse(struct obj *otmp, int chance)
1842{
1843 if (otmp->blessed || otmp->cursed)
1844 return;
1845
1846 if (!rn2(chance)) {
1847 if (!rn2(2)) {
1848 curse(otmp);
1849 } else {
1850 bless(otmp);
1851 }
1852 }
1853 return;
1854}
1855
1856int
1857bcsign(struct obj *otmp)

Callers 3

mksobj_initFunction · 0.85
create_objectFunction · 0.85
seffect_remove_curseFunction · 0.85

Calls 3

rn2Function · 0.85
curseFunction · 0.85
blessFunction · 0.85

Tested by

no test coverage detected