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

Function set_moreluck

src/attrib.c:440–451  ·  view source on GitHub ↗

there has just been an inventory change affecting a luck-granting item */

Source from the content-addressed store, hash-verified

438
439/* there has just been an inventory change affecting a luck-granting item */
440void
441set_moreluck(void)
442{
443 int luckbon = stone_luck(TRUE);
444
445 if (!luckbon && !carrying(LUCKSTONE))
446 u.moreluck = 0;
447 else if (luckbon >= 0)
448 u.moreluck = LUCKADD;
449 else
450 u.moreluck = -LUCKADD;
451}
452
453/* (not used) */
454void

Callers 6

addinv_core2Function · 0.85
freeinv_coreFunction · 0.85
blessFunction · 0.85
unblessFunction · 0.85
curseFunction · 0.85
uncurseFunction · 0.85

Calls 2

stone_luckFunction · 0.85
carryingFunction · 0.85

Tested by

no test coverage detected