Difference between revisions of "Template:ItemPropertiesInfoBox"

From ChatWars Wiki
Jump to: navigation, search
Line 8: Line 8:
 
{{#vardefine: enchantDef3 | {{#show: {{PAGENAME}} |?EnchantDef3# }} }}
 
{{#vardefine: enchantDef3 | {{#show: {{PAGENAME}} |?EnchantDef3# }} }}
 
{{#vardefine: enchantDef4 | {{#show: {{PAGENAME}} |?EnchantDef4# }} }}
 
{{#vardefine: enchantDef4 | {{#show: {{PAGENAME}} |?EnchantDef4# }} }}
 +
 +
{{#vardefine: showAtkEnchant | 0 }}
 +
{{#vardefine: showDefEnchant | 0 }}
 
<includeonly>
 
<includeonly>
 
|Craftable
 
|Craftable
Line 72: Line 75:
 
                                 {{#var: enchantDef4}}
 
                                 {{#var: enchantDef4}}
 
  }} > 0
 
  }} > 0
               | {{!}}{{!}} {{{!}} class="wikitable"
+
               | {{!}}{{!}}
 +
    {{{!}} class="wikitable"
 
                 !Level
 
                 !Level
 
                 {{#ifexpr: {{#expr: {{#var: enchantAtk1}} + <!-- checks if there are any attack enchantment bonus, only displays atk column if true -->
 
                 {{#ifexpr: {{#expr: {{#var: enchantAtk1}} + <!-- checks if there are any attack enchantment bonus, only displays atk column if true -->
Line 80: Line 84:
 
  }} > 0  
 
  }} > 0  
 
                   | !{{Emoticon|emoticon=Attack}}
 
                   | !{{Emoticon|emoticon=Attack}}
                     !{{Emoticon|emoticon=Attack}} (cumulative)
+
                     !{{Emoticon|emoticon=Attack}} (cumulative)<!--
 +
-->{{#vardefine: showAtkEnchant | 1 }}
 
                 }}
 
                 }}
 
                 {{#ifexpr: {{#expr: {{#var: enchantDef1}} + <!-- checks if there are any defense enchantment bonus, only displays def column if true -->
 
                 {{#ifexpr: {{#expr: {{#var: enchantDef1}} + <!-- checks if there are any defense enchantment bonus, only displays def column if true -->
Line 88: Line 93:
 
  }} > 0  
 
  }} > 0  
 
                   | !{{Emoticon|emoticon=Defend}}
 
                   | !{{Emoticon|emoticon=Defend}}
                     !{{Emoticon|emoticon=Defend}} (cumulative)
+
                     !{{Emoticon|emoticon=Defend}} (cumulative)<!--
 +
-->{{#vardefine: showDefEnchant | 1 }}
 
                 }}
 
                 }}
 
                 {{!}}-
 
                 {{!}}-
 
                 {{!}} 1
 
                 {{!}} 1
{{!}} +{{#if: {{#var: enchantAtk1}} | {{#var: enchantAtk1}} | ? }} <!-- atk bonus this enchant -->
+
{{!}} +{{#ifexpr: {{#var: enchantAtk1}} and {{#var: showAtkEnchant}} | {{#var: enchantAtk1}} | ? }} <!-- atk bonus this enchant -->
                 {{!}} +{{#if: {{#var: enchantAtk1}} | {{#var: enchantAtk1}} | ? }} <!-- total atk bonus to this level -->
+
                 {{!}} +{{#ifexpr: {{#var: enchantAtk1}} and {{#var: showAtkEnchant}} | {{#var: enchantAtk1}} | ? }} <!-- total atk bonus to this level -->
                 {{!}} +{{#if: {{#var: enchantDef1}} | {{#var: enchantDef1}} | ? }} <!-- def bonus this enchant -->
+
                 {{!}} +{{#ifexpr: {{#var: enchantDef1}} and {{#var: showDefEnchant}} | {{#var: enchantDef1}} | ? }} <!-- def bonus this enchant -->
                 {{!}} +{{#if: {{#var: enchantDef1}} | {{#var: enchantDef1}} | ? }} <!-- total def bonus to this level -->
+
                 {{!}} +{{#ifexpr: {{#var: enchantDef1}} and {{#var: showDefEnchant}} | {{#var: enchantDef1}} | ? }} <!-- total def bonus to this level -->
 
{{!}}-
 
{{!}}-
 
                 {{!}} 2
 
                 {{!}} 2

Revision as of 03:28, 12 August 2018








This template is designed for being used inside Template:InfoOverview. It adds information on equippable Items to the general info overview