Difference between revisions of "Template:Math/Quick-Fix Overheal"
(New template for the Quick-Fix Overheal, as it does not conform to the 'on the fives' clamping the normal one does.) |
m (Support custom overheal factor (for Fists of Steel)) |
||
Line 1: | Line 1: | ||
− | <onlyinclude>{{#if:{{{1|}}}|{{#expr:ceil({{{1}}}*1.25)+1}}|[[Template:Math/Quick-Fix Overheal|'''?''']]}}</onlyinclude> | + | <onlyinclude>{{#if:{{{1|}}}|{{#expr:ceil({{{1}}}*{{{factor|1.25}}})+1}}|[[Template:Math/Quick-Fix Overheal|'''?''']]}}</onlyinclude> |
{{Template doc}} | {{Template doc}} | ||
[[Category:Game mechanics|{{SUBPAGENAME}}]] | [[Category:Game mechanics|{{SUBPAGENAME}}]] |
Latest revision as of 07:54, 3 March 2023
This template multiplies a number passed to it using an algorithm that is consistent with the way the Quick-Fix Overheal is calculated in-game. Use this instead of the Template:Math/Overheal template as this accounts for the fact that the Quick-Fix doesn't heal to the lowest five health, as well as the 'one-more' bug.
Usage
{{Math/Quick-Fix Overheal|175}}
This example yields 220.
Calculation factor
The default calculation factor for Overheal is 125% (1.25). To modify the factor, add a factor parameter like so:
{{Math/Quick-Fix Overheal|175|factor=2}}
This example yields 351.
Errors
- This template will display ? if it is missing a max health number.
- This template will display an Expression error if it cannot interpret either the max health number or factor passed to it. Only include numeric characters (0-9).