Template:Math/Healthpack/doc

From Team Fortress Wiki
< Template:Math/Healthpack
Revision as of 14:49, 13 October 2014 by Darkid (talk | contribs) (Created page with "This template multiplies a number passed to it using an algorithm that is consistent with the way Health is calculated in-game. Use it for calculating the amount of health...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This template multiplies a number passed to it using an algorithm that is consistent with the way Health is calculated in-game. Use it for calculating the amount of health gained from a health pack based on a classes max health.

Usage

{{Math/Healthpack|175|small}}

This example yields 36.

Pack size

The size of the healthpack is passed as the second parameter. Valid parameters are small, medium, large:

{{Math/Healthpack|175|medium}}

This example yields 88.

Backscratcher

The backscratcher is not coded into {{Metrics/Health}}, since it does not affect base health. To account for this, pass the parameter backscratcher=yes.

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).