Difference between revisions of "Template:ItemPropertiesInfoBox"

From ChatWars Wiki
Jump to: navigation, search
(minor bugfix for pages using this to get info of other pages)
 
(20 intermediate revisions by the same user not shown)
Line 135: Line 135:
 
             | !{{Emoticon|emoticon=Attack}}
 
             | !{{Emoticon|emoticon=Attack}}
 
               !{{Emoticon|emoticon=Attack}} (total)<!--
 
               !{{Emoticon|emoticon=Attack}} (total)<!--
               -->{{#vardefine: showAtkEnchant | 1 }}
+
               -->{{#vardefine: showAtkEnchant | 1 }}<!--
          }}
+
      -->}}<!--
          {{#ifexpr: {{#expr: {{#var: enchantDef1|0}} + <!-- checks if there is any defense enchantment bonus, only displays def column if true -->
+
      -->{{#ifexpr: {{#expr: {{#var: enchantDef1|0}} + <!-- checks if there is any defense enchantment bonus, only displays def column if true -->
 
                               {{#var: enchantDef2|0}} +
 
                               {{#var: enchantDef2|0}} +
 
                               {{#var: enchantDef3|0}} +
 
                               {{#var: enchantDef3|0}} +
 
                               {{#var: enchantDef4|0}}
 
                               {{#var: enchantDef4|0}}
 
                     }} > 0  
 
                     }} > 0  
             | <!-- empty line is important! -->
+
             | {{#ifexpr: {{#var: showAtkEnchant}} | ! }}!{{Emoticon|emoticon=Defend}}
              !{{Emoticon|emoticon=Defend}}
 
 
               !{{Emoticon|emoticon=Defend}} (total)<!--
 
               !{{Emoticon|emoticon=Defend}} (total)<!--
 
               -->{{#vardefine: showDefEnchant | 1 }}
 
               -->{{#vardefine: showDefEnchant | 1 }}
           }}
+
           }}<!--
          {{#ifexpr: {{#expr: {{#var: enchantMana1|0}} + <!-- checks if there is any mana enchantment bonus, only displays mana column if true -->
+
      -->{{#ifexpr: {{#expr: {{#var: enchantMana1|0}} + <!-- checks if there is any mana enchantment bonus, only displays mana column if true -->
 
                               {{#var: enchantMana2|0}} +
 
                               {{#var: enchantMana2|0}} +
 
                               {{#var: enchantMana3|0}} +
 
                               {{#var: enchantMana3|0}} +
 
                               {{#var: enchantMana4|0}}
 
                               {{#var: enchantMana4|0}}
 
                     }} > 0  
 
                     }} > 0  
             | <!-- empty line is important! -->
+
             | {{#ifexpr: {{#var: showAtkEnchant}} or {{#var: showDefEnchant}} | ! }}!{{Emoticon|emoticon=Mana}}
              !{{Emoticon|emoticon=Mana}}
 
 
               !{{Emoticon|emoticon=Mana}} (total)<!--
 
               !{{Emoticon|emoticon=Mana}} (total)<!--
 
               -->{{#vardefine: showManaEnchant | 1 }}
 
               -->{{#vardefine: showManaEnchant | 1 }}
Line 162: Line 160:
 
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantAtk1}} | {{#var: enchantAtk1}} | [[??]] }} <!-- atk bonus this enchant -->
 
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantAtk1}} | {{#var: enchantAtk1}} | [[??]] }} <!-- atk bonus this enchant -->
 
               {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantAtk1}} | {{#var: enchantAtk1}} | [[??]] }} <!-- total atk bonus to this level -->
 
               {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantAtk1}} | {{#var: enchantAtk1}} | [[??]] }} <!-- total atk bonus to this level -->
           }}
+
           }}<!--
          {{#ifexpr: {{#var: showDefEnchant}} != 0
+
      -->{{#ifexpr: {{#var: showDefEnchant}} != 0
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef1}} | {{#var: enchantDef1}} | [[??]] }} <!-- def bonus this enchant -->
+
             | {{#ifexpr: {{#var: showAtkEnchant}} | {{!}} }}{{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef1}} | {{#var: enchantDef1}} | [[??]] }} <!-- def bonus this enchant -->
 
               {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef1}} | {{#var: enchantDef1}} | [[??]] }} <!-- total def bonus to this level -->
 
               {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef1}} | {{#var: enchantDef1}} | [[??]] }} <!-- total def bonus to this level -->
 
           }}<!--
 
           }}<!--
 
       -->{{#ifexpr: {{#var: showManaEnchant}} != 0
 
       -->{{#ifexpr: {{#var: showManaEnchant}} != 0
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantMana1}} | {{#var: enchantMana1}} | [[??]] }} <!-- mana bonus this enchant -->
+
             | {{#ifexpr: {{#var: showAtkEnchant}} or {{#var: showDefEnchant}} | {{!}} }}{{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantMana1}} | {{#var: enchantMana1}} | [[??]] }} <!-- mana bonus this enchant -->
 
               {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantMana1}} | {{#var: enchantMana1}} | [[??]] }} <!-- total mana bonus to this level -->
 
               {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantMana1}} | {{#var: enchantMana1}} | [[??]] }} <!-- total mana bonus to this level -->
 
           }}             
 
           }}             
Line 180: Line 178:
 
           }}<!--
 
           }}<!--
 
       -->{{#ifexpr: {{#var: showDefEnchant}} != 0
 
       -->{{#ifexpr: {{#var: showDefEnchant}} != 0
             | <!-- empty line is important! -->
+
             | {{#ifexpr: {{#var: showAtkEnchant}} | {{!}} }}{{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef2}} | {{#var: enchantDef2}} | [[??]] }} <!-- def bonus this enchant -->
              {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef2}} | {{#var: enchantDef2}} | [[??]] }} <!-- def bonus this enchant -->
 
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantDef1}} |1 |0 }} and {{#if: {{#var: enchantDef2}} |1 |0 }} <!-- total def bonus to this level -->
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantDef1}} |1 |0 }} and {{#if: {{#var: enchantDef2}} |1 |0 }} <!-- total def bonus to this level -->
 
                                                         | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} }} | [[??]]  
 
                                                         | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} }} | [[??]]  
Line 187: Line 184:
 
           }}<!--
 
           }}<!--
 
       -->{{#ifexpr: {{#var: showManaEnchant}} != 0
 
       -->{{#ifexpr: {{#var: showManaEnchant}} != 0
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantMana2}} | {{#var: enchantMana2}} | [[??]] }} <!-- mana bonus this enchant -->
+
             | {{#ifexpr: {{#var: showAtkEnchant}} or {{#var: showDefEnchant}} | {{!}} }}{{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantMana2}} | {{#var: enchantMana2}} | [[??]] }} <!-- mana bonus this enchant -->
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantMana1}} |1 |0 }} and {{#if: {{#var: enchantMana2}} |1 |0 }} <!-- total mana bonus to this level -->
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantMana1}} |1 |0 }} and {{#if: {{#var: enchantMana2}} |1 |0 }} <!-- total mana bonus to this level -->
 
                                                         | {{#expr: {{#var: enchantMana1}} + {{#var: enchantMana2}} }} | [[??]]  
 
                                                         | {{#expr: {{#var: enchantMana1}} + {{#var: enchantMana2}} }} | [[??]]  
Line 201: Line 198:
 
           }}<!--
 
           }}<!--
 
       -->{{#ifexpr: {{#var: showDefEnchant}} != 0
 
       -->{{#ifexpr: {{#var: showDefEnchant}} != 0
             | <!-- empty line is important! -->
+
             | {{#ifexpr: {{#var: showAtkEnchant}} | {{!}} }}{{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef3}} | {{#var: enchantDef3}} | [[??]] }} <!-- def bonus this enchant -->
              {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef3}} | {{#var: enchantDef3}} | [[??]] }} <!-- def bonus this enchant -->
 
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantDef1}} |1 |0 }} and {{#if: {{#var: enchantDef2}} |1 |0 }} and {{#if: {{#var: enchantDef3}} |1 |0 }} <!-- total def bonus to this level -->
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantDef1}} |1 |0 }} and {{#if: {{#var: enchantDef2}} |1 |0 }} and {{#if: {{#var: enchantDef3}} |1 |0 }} <!-- total def bonus to this level -->
 
                                                         | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} + {{#var: enchantDef3}} }} | [[??]]  
 
                                                         | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} + {{#var: enchantDef3}} }} | [[??]]  
Line 208: Line 204:
 
           }}<!--
 
           }}<!--
 
       -->{{#ifexpr: {{#var: showManaEnchant}} != 0
 
       -->{{#ifexpr: {{#var: showManaEnchant}} != 0
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantMana3}} | {{#var: enchantMana3}} | [[??]] }} <!-- mana bonus this enchant -->
+
             | {{#ifexpr: {{#var: showAtkEnchant}} or {{#var: showDefEnchant}} | {{!}} }}{{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantMana3}} | {{#var: enchantMana3}} | [[??]] }} <!-- mana bonus this enchant -->
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantMana1}} |1 |0 }} and {{#if: {{#var: enchantMana2}} |1 |0 }} and {{#if: {{#var: enchantMana3}} |1 |0 }} <!-- total mana bonus to this level -->
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantMana1}} |1 |0 }} and {{#if: {{#var: enchantMana2}} |1 |0 }} and {{#if: {{#var: enchantMana3}} |1 |0 }} <!-- total mana bonus to this level -->
 
                                                         | {{#expr: {{#var: enchantMana1}} + {{#var: enchantMana2}} + {{#var: enchantMana3}} }} | [[??]]  
 
                                                         | {{#expr: {{#var: enchantMana1}} + {{#var: enchantMana2}} + {{#var: enchantMana3}} }} | [[??]]  
Line 222: Line 218:
 
           }}<!--
 
           }}<!--
 
       -->{{#ifexpr: {{#var: showDefEnchant}} != 0
 
       -->{{#ifexpr: {{#var: showDefEnchant}} != 0
             | <!-- empty line is important! -->
+
             | {{#ifexpr: {{#var: showAtkEnchant}} | {{!}} }}{{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef4}} | {{#var: enchantDef4}} | [[??]] }} <!-- def bonus this enchant -->
              {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef4}} | {{#var: enchantDef4}} | [[??]] }} <!-- def bonus this enchant -->
 
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantDef1}} |1 |0 }} and {{#if: {{#var: enchantDef2}} |1 |0 }} and {{#if: {{#var: enchantDef3}} |1 |0 }} and {{#if: {{#var: enchantDef4}} |1 |0 }} <!-- total def bonus to this level -->
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantDef1}} |1 |0 }} and {{#if: {{#var: enchantDef2}} |1 |0 }} and {{#if: {{#var: enchantDef3}} |1 |0 }} and {{#if: {{#var: enchantDef4}} |1 |0 }} <!-- total def bonus to this level -->
 
                                                         | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} + {{#var: enchantDef3}} + {{#var: enchantDef4}} }} | [[??]]  
 
                                                         | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} + {{#var: enchantDef3}} + {{#var: enchantDef4}} }} | [[??]]  
Line 229: Line 224:
 
           }}<!--
 
           }}<!--
 
       -->{{#ifexpr: {{#var: showManaEnchant}} != 0
 
       -->{{#ifexpr: {{#var: showManaEnchant}} != 0
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantMana4}} | {{#var: enchantMana4}} | [[??]] }} <!-- mana bonus this enchant -->
+
             | {{#ifexpr: {{#var: showAtkEnchant}} or {{#var: showDefEnchant}} | {{!}} }}{{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantMana4}} | {{#var: enchantMana4}} | [[??]] }} <!-- mana bonus this enchant -->
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantMana1}} |1 |0 }} and {{#if: {{#var: enchantMana2}} |1 |0 }} and {{#if: {{#var: enchantMana3}} |1 |0 }} and {{#if: {{#var: enchantMana4}} |1 |0 }} <!-- total mana bonus to this level -->
 
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantMana1}} |1 |0 }} and {{#if: {{#var: enchantMana2}} |1 |0 }} and {{#if: {{#var: enchantMana3}} |1 |0 }} and {{#if: {{#var: enchantMana4}} |1 |0 }} <!-- total mana bonus to this level -->
 
                                                         | {{#expr: {{#var: enchantMana1}} + {{#var: enchantMana2}} + {{#var: enchantMana3}} + {{#var: enchantMana4}} }} | [[??]]  
 
                                                         | {{#expr: {{#var: enchantMana1}} + {{#var: enchantMana2}} + {{#var: enchantMana3}} + {{#var: enchantMana4}} }} | [[??]]  
Line 240: Line 235:
 
   }}  
 
   }}  
 
|-
 
|-
{{#if: {{#show: {{#var: source}} |?Ammunition }} |
+
{{#if: {{GetAmmunition | source = {{#var: source}} }} |
 
{{!}}Ammunition
 
{{!}}Ammunition
{{!}} {{#show: {{#var: source}} |?Ammunition }}
+
{{!}} {{GetAmmunition | source = {{#var: source}} }}
 
{{!}}-
 
{{!}}-
 
}}
 
}}

Latest revision as of 01:13, 24 October 2019












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