Difference between revisions of "Template:Math/Overheal"
m (1 revision: Imported from TF2 Wiki.) |
m (Small cleanup -- no need for #if when you can default a parameter) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | <onlyinclude>{{#if: {{{1|}}} | {{#expr: | + | <onlyinclude>{{#if:{{{1|}}}|{{#expr:floor({{{1}}}*{{{factor|1.5}}}/5)*5}}|[[Template:Math/Overheal|'''?''']]}}</onlyinclude> |
{{Template doc}} | {{Template doc}} | ||
− | [[Category: | + | [[Category:Game mechanics|{{SUBPAGENAME}}]] |
− | |||
− |
Latest revision as of 07:53, 3 March 2023
This template multiplies a number passed to it using an algorithm that is consistent with the way Overheal is calculated in-game. Use it for calculating the maximum overheal value based on a classes max health.
Usage
{{Math/Overheal|175}}
This example yields 260.
Calculation factor
The default calculation factor for Overheal is 150% (1.5). To modify the factor, add a factor parameter like so:
{{Math/Overheal|175|factor=2}}
This example yields 350.
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).