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

Function invoke_energy_boost

src/artifact.c:1817–1835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1815}
1816
1817staticfn int
1818invoke_energy_boost(struct obj *obj)
1819{
1820 int epboost = (u.uenmax + 1 - u.uen) / 2;
1821
1822 if (epboost > 120)
1823 epboost = 120; /* arbitrary */
1824 else if (epboost < 12)
1825 epboost = u.uenmax - u.uen;
1826 if (epboost) {
1827 u.uen += epboost;
1828 disp.botl = TRUE;
1829 You_feel("re-energized.");
1830 } else {
1831 nothing_special(obj);
1832 return ECMD_TIME;
1833 }
1834 return ECMD_TIME;
1835}
1836
1837staticfn int
1838invoke_untrap(struct obj *obj)

Callers 1

arti_invokeFunction · 0.85

Calls 2

You_feelFunction · 0.85
nothing_specialFunction · 0.85

Tested by

no test coverage detected