Template:CalcUnitStats

From Dead Ahead Wiki
Jump to navigation Jump to search

1


The above template is based on the following function: round((base * 1.1 ^ level),0), where:

  • base – starting value of a unit's health / damage, equal to 1 if not specified;
  • level – level of a unit, equal to 0 if not specified.

The template syntax:

{{CalcUnitStats|base=value|level=value}}

Examples:

  • {{CalcUnitStats|base=4|level=13}} gives 14;
  • {{CalcUnitStats|base=4}} gives 4;
  • {{CalcUnitStats|level=10}} gives 3.

The functions can parse non-integer and negative numbers, but realistically there's no need to ever use such values.

Entering a non-number value, or leaving a parameter field empty (i.e., {{CalcUnitStats|base=}}) will cause the function to return a whitespace.