Difference between revisions of "Template:Damage"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(updated to load item data from Data page)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{:{{{1}}}|Damage1}}|{{c|{{:{{{1}}}|DamageType1}}|{{Translate|{{:{{{1}}}|DamageType1}}|Properties}}: {{:{{{1}}}|Damage1}}}}}}<!--
<includeonly><!--
 
-->{{#vardefine:Slashing Damage|{{:Data|{{{1}}}|Slashing Damage}}}}<!--
-->{{#if:{{:{{{1}}}|Damage2}}|{{c|{{:{{{1}}}|DamageType2}}|<br>{{Translate|{{:{{{1}}}|DamageType2}}|Properties}}: {{:{{{1}}}|Damage2}}}}}}<!--
-->{{#vardefine:Piercing Damage|{{:Data|{{{1}}}|Piercing Damage}}}}<!--
 
-->{{#vardefine:Crushing Damage|{{:Data|{{{1}}}|Crushing Damage}}}}<!--
-->{{#if:{{:{{{1}}}|Damage3}}|{{c|{{:{{{1}}}|DamageType3}}|<br>{{Translate|{{:{{{1}}}|DamageType3}}|Properties}}: {{:{{{1}}}|Damage3}}}}}}<!--
-->{{#vardefine:Rending Damage|{{:Data|{{{1}}}|Rending Damage}}}}<!--
 
-->{{#vardefine:Fire Damage|{{:Data|{{{1}}}|Fire Damage}}}}<!--
-->{{#if:{{:{{{1}}}|Damage4}}|{{c|{{:{{{1}}}|DamageType4}}|<br>{{Translate|{{:{{{1}}}|DamageType4}}|Properties}}: {{:{{{1}}}|Damage4}}}}}}</includeonly><noinclude>{{doc}}[[Category:Templates]]</noinclude>
-->{{#vardefine:Frost Damage|{{:Data|{{{1}}}|Frost Damage}}}}<!--
-->{{#vardefine:Shock Damage|{{:Data|{{{1}}}|Shock Damage}}}}<!--
-->{{#vardefine:Poison Damage|{{:Data|{{{1}}}|Poison Damage}}}}<!--
-->{{#vardefine:Caustic Damage|{{:Data|{{{1}}}|Caustic Damage}}}}<!--
-->{{#vardefine:Arcane Damage|{{:Data|{{{1}}}|Arcane Damage}}}}<!--
-->{{#vardefine:Sacred Damage|{{:Data|{{{1}}}|Sacred Damage}}}}<!--
-->{{#vardefine:Unholy Damage|{{:Data|{{{1}}}|Unholy Damage}}}}<!--
-->{{#vardefine:Psionic Damage|{{:Data|{{{1}}}|Psionic Damage}}}}<!--
--- Only display Damage types that have a value. ---
-->{{#if:{{#var:Slashing Damage}}|{{Translate|Slashing|Properties}}: {{#var:Slashing Damage}}<br>}}<!--
-->{{#if:{{#var:Piercing Damage}}|{{Translate|Piercing|Properties}}: {{#var:Piercing Damage}}<br>}}<!--
-->{{#if:{{#var:Crushing Damage}}|{{Translate|Crushing|Properties}}: {{#var:Crushing Damage}}<br>}}<!--
-->{{#if:{{#var:Rending Damage}}|{{Translate|Rending|Properties}}: {{#var:Rending Damage}}<br>}}<!--
-->{{#if:{{#var:Fire Damage}}|{{c|Fire|{{Translate|Fire|Properties}}: {{#var:Fire Damage}}}}<br>}}<!--
-->{{#if:{{#var:Frost Damage}}|{{c|Frost|{{Translate|Frost|Properties}}: {{#var:Frost Damage}}}}<br>}}<!--
-->{{#if:{{#var:Shock Damage}}|{{c|Shock|{{Translate|Shock|Properties}}: {{#var:Shock Damage}}}}<br>}}<!--
-->{{#if:{{#var:Poison Damage}}|{{c|Poison|{{Translate|Poison|Properties}}: {{#var:Poison Damage}}}}<br>}}<!--
-->{{#if:{{#var:Caustic Damage}}|{{c|Caustic|{{Translate|Caustic|Properties}}: {{#var:Caustic Damage}}}}<br>}}<!--
-->{{#if:{{#var:Arcane Damage}}|{{c|Arcane|{{Translate|Arcane|Properties}}: {{#var:Arcane Damage}}}}<br>}}<!--
-->{{#if:{{#var:Sacred Damage}}|{{c|Sacred|{{Translate|Sacred|Properties}}: {{#var:Sacred Damage}}}}<br>}}<!--
-->{{#if:{{#var:Unholy Damage}}|{{c|Unholy|{{Translate|Unholy|Properties}}: {{#var:Unholy Damage}}}}<br>}}<!--
-->{{#if:{{#var:Psionic Damage}}|{{c|Psionic|{{Translate|Psionic|Properties}}: {{#var:Psionic Damage}}}}<br>}}<!--
--></includeonly><noinclude>{{doc}}[[Category:Templates]]</noinclude>

Latest revision as of 19:41, 28 May 2022

Template-info.png Documentation

This template is used for listing all the damages of a particular weapon.

Only one parameter is used - Weapon's page name.

Usage:

{{Damage|Rusty Sword}}

Result: