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

Function change_luck

src/attrib.c:410–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408}
409
410void
411change_luck(schar n)
412{
413 u.uluck += n;
414 if (u.uluck < 0 && u.uluck < LUCKMIN)
415 u.uluck = LUCKMIN;
416 if (u.uluck > 0 && u.uluck > LUCKMAX)
417 u.uluck = LUCKMAX;
418}
419
420/* decide whether there are more blessed luckstones (plus luck-conferring
421 artifacts) than cursed ones; optionally combine uncursed with blessed */

Callers 15

ready_weaponFunction · 0.85
moveloop_preambleFunction · 0.85
throne_sit_effectFunction · 0.85
Helmet_onFunction · 0.85
Helmet_offFunction · 0.85
hmon_hitmon_misc_objFunction · 0.85
passiveFunction · 0.85
offer_fake_amuletFunction · 0.85
sacrifice_your_raceFunction · 0.85
offer_corpseFunction · 0.85
prayer_doneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected