Difference between revisions of "Template:Formulas/doc"

From Wildermyth Wiki
(Use game data. Add Technical details.)
Line 16: Line 16:
<pre><nowiki>
<pre><nowiki>
{{Formulas
{{Formulas
| damage = Damage: floor(max(1,(self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)))+(2*self.warriorDeck_broadswipes_upgrade)<br>Range: max(1.6,weapon.weaponMaxRange)+self.BONUS_RANGE
| damage = Damage: {{Data mathFormula|Witherbolt}} <-- this is flawed. mathFormula must provide the type, as not all formulas are "Damage:" -->
| note = Blah blah blah
| note = Blah blah blah
}}
}}
Line 22: Line 22:


{{Formulas
{{Formulas
| damage = Damage: floor(max(1,(self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)))+(2*self.warriorDeck_broadswipes_upgrade)<br>Range: max(1.6,weapon.weaponMaxRange)+self.BONUS_RANGE
| damage = Damage: {{Data mathFormula|Witherbolt}}
| note = Blah blah blah
| note = Blah blah blah
}}
== Technical details ==
{{See also|Template:Data mathFormula}}
To maintain a consistent design across all ability pages, the Formulas table is always visible, even when the game data returns no math formula.
{{Formulas
| damage = {{Data mathFormula|NoSuchAbility}}
}}
}}


<includeonly>[[Category:Template]]</includeonly>
<includeonly>[[Category:Template]]</includeonly>

Revision as of 11:32, 22 January 2022

This is a documentation subpage for Template:Formulas.

Usage

This template displays the formulas for an ability.

The Infobox uses the following parameters:

damage
(Mathematical) damage equation
note
Optional note(s) about the targets

Example

{{Formulas
| damage = Damage: {{Data mathFormula|Witherbolt}} <-- this is flawed. mathFormula must provide the type, as not all formulas are "Damage:" -->
| note = Blah blah blah
}}

Technical details

To maintain a consistent design across all ability pages, the Formulas table is always visible, even when the game data returns no math formula.