| 1815 | } |
| 1816 | |
| 1817 | staticfn int |
| 1818 | invoke_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 | |
| 1837 | staticfn int |
| 1838 | invoke_untrap(struct obj *obj) |
no test coverage detected