Difference between revisions of "Template:Test"

From Stoneshard wiki
Jump to navigation Jump to search
(added Crit Avoidance and Max Health to Weapons)
(add check for Consumable, same as Weapons and Armor)
Line 1: Line 1:
<includeonly>{{#vardefine:FloatRight|{{#switch: {{ROOTPAGENAME}}
<!--
--- If we're NOT on a page from this list, define the variable that will float values to the right. ---
--><includeonly>{{#vardefine:FloatRight|{{#switch: {{ROOTPAGENAME}}
|Swords
|Swords
|Axes
|Axes
Line 23: Line 25:
|Tools & Traps =  
|Tools & Traps =  
|#default = float:right;
|#default = float:right;
}}}}{{#ifeq: {{:Weapon_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Weapon_data|{{{1}}}}}}}<!--
}}}}<!--
--- Load complete datastring into a variable - only load from the Weapon data page once. ---
-->{{#ifeq: {{:Weapon_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Weapon_data|{{{1}}}}}}}<!--
-->{{#switch: {{#explode: {{#var:Datastring}}|;|2}}
-->{{#switch: {{#explode: {{#var:Datastring}}|;|2}}
|Sword
|Sword
Line 84: Line 88:
-->{{#vardefine:Crit Avoidance|{{#explode: {{#var:Datastring}}|;|63}}}}<!--
-->{{#vardefine:Crit Avoidance|{{#explode: {{#var:Datastring}}|;|63}}}}<!--
-->{{#vardefine:Max Health|{{#explode: {{#var:Datastring}}|;|64}}}}
-->{{#vardefine:Max Health|{{#explode: {{#var:Datastring}}|;|64}}}}
}}}}{{#switch: {{:Consumable_data|{{{1}}}|ItemType}}
}}}}<!--
--- Load complete datastring into a variable - only load from the Consumable data page once. ---
-->{{#ifeq: {{:Consumable_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Consumable_data|{{{1}}}}}}}<!--
-->{{#switch: {{#explode: {{#var:Datastring}}|;|2}}
|Food
|Food
|Beverages
|Beverages
Line 122: Line 129:
-->{{#vardefine:Poison Resistance|{{:Consumable_data|{{{1}}}|Poison Resistance}}}}<!--
-->{{#vardefine:Poison Resistance|{{:Consumable_data|{{{1}}}|Poison Resistance}}}}<!--
-->{{#vardefine:Max Health|{{:Consumable_data|{{{1}}}|Max Health}}}}
-->{{#vardefine:Max Health|{{:Consumable_data|{{{1}}}|Max Health}}}}
}}<!--
}}}}<!--
--- Load complete datastring into a variable - to only load from the Armor data page once. ---
--- Load complete datastring into a variable - to only load from the Armor data page once. ---
-->{{#ifeq: {{:Armor_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Armor_data|{{{1}}}}}}}<!--
-->{{#ifeq: {{:Armor_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Armor_data|{{{1}}}}}}}<!--

Revision as of 18:55, 14 January 2025

This template has no documentation. If you know how to use this template, please add some.