Difference between revisions of "Template:ItemPropertiesInfoBox"

From ChatWars Wiki
Jump to: navigation, search
(formatting and fully fixing aforementioned bug (0 interpreted as unknown))
Line 113: Line 113:
 
           {{#ifexpr: {{#var: showAtkEnchant}} != 0
 
           {{#ifexpr: {{#var: showAtkEnchant}} != 0
 
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantAtk2}} | {{#var: enchantAtk2}} | ? }} <!-- atk bonus this enchant -->
 
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantAtk2}} | {{#var: enchantAtk2}} | ? }} <!-- atk bonus this enchant -->
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantAtk1}} |1 |0 }} and {{#if: {{#var: enchantAtk2}} |1 |0 }} | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} }} | ? }} <!-- total atk bonus to this level -->
+
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantAtk1}} |1 |0 }} and {{#if: {{#var: enchantAtk2}} |1 |0 }} <!-- total atk bonus to this level -->
 +
                                                        | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} }} | ?
 +
                                                      }}
 
           }}
 
           }}
 
           {{#ifexpr: {{#var: showDefEnchant}} != 0
 
           {{#ifexpr: {{#var: showDefEnchant}} != 0
 
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef2|0}} | {{#var: enchantDef2}} | ? }} <!-- def bonus this enchant -->
 
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef2|0}} | {{#var: enchantDef2}} | ? }} <!-- def bonus this enchant -->
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantDef1}} |1 |0 }} and {{#if: {{#var: enchantDef2}} |1 |0 }} | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} }} | ? }} <!-- 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}} }} | ?
 +
                                                      }}
 
           }}
 
           }}
 
           {{!}}-
 
           {{!}}-
 
           {{!}} style="text-align: center" {{!}} 3
 
           {{!}} style="text-align: center" {{!}} 3
 
           {{#ifexpr: {{#var: showAtkEnchant}} != 0
 
           {{#ifexpr: {{#var: showAtkEnchant}} != 0
             | {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantAtk3|0}} | {{#var: enchantAtk3}} | ? }} <!-- atk bonus this enchant -->
+
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantAtk3}} | {{#var: enchantAtk3}} | ? }} <!-- atk bonus this enchant -->
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantAtk1|0}} and {{#var: enchantAtk2|0}} and {{#var: enchantAtk3|0}} | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} + {{#var: enchantAtk3}} }} | ? }} <!-- total atk bonus to this level -->
+
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantAtk1}} |1 |0 }} and {{#if: {{#var: enchantAtk2}} |1 |0 }} and {{#if: {{#var: enchantAtk3}} |1 |0 }} <!-- total atk bonus to this level -->
 +
                                                        | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} + {{#var: enchantAtk3}} }} | ?
 +
                                                      }}
 
           }}
 
           }}
 
           {{#ifexpr: {{#var: showDefEnchant}} != 0
 
           {{#ifexpr: {{#var: showDefEnchant}} != 0
             | {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantDef3|0}} | {{#var: enchantDef3}} | ? }} <!-- def bonus this enchant -->
+
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantDef3}} | {{#var: enchantDef3}} | ? }} <!-- def bonus this enchant -->
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantDef1|0}} and {{#var: enchantDef2|0}} and {{#var: enchantDef3|0}} | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} + {{#var: enchantDef3}} }} | ? }} <!-- 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}} }} | ?
 +
                                                      }}
 
           }}
 
           }}
 
           {{!}}-
 
           {{!}}-
 
           {{!}} style="text-align: center" {{!}} 4
 
           {{!}} style="text-align: center" {{!}} 4
 
           {{#ifexpr: {{#var: showAtkEnchant}} != 0
 
           {{#ifexpr: {{#var: showAtkEnchant}} != 0
             | {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantAtk4|0}} | {{#var: enchantAtk4}} | ? }} <!-- atk bonus this enchant -->
+
             | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantAtk4}} | {{#var: enchantAtk4}} | ? }} <!-- atk bonus this enchant -->
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantAtk1|0}} and {{#var: enchantAtk2|0}} and {{#var: enchantAtk3|0}} and {{#var: enchantAtk4|0}} | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} + {{#var: enchantAtk3}} + {{#var: enchantAtk4}} }} | ? }} <!-- total atk bonus to this level -->
+
               {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#if: {{#var: enchantAtk1}} |1 |0 }} and {{#if: {{#var: enchantAtk2}} |1 |0 }} and {{#if: {{#var: enchantAtk3}} |1 |0 }} and {{#if: {{#var: enchantAtk4}} |1 |0 }} <!-- total atk bonus to this level -->
 +
                                                        | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} + {{#var: enchantAtk3}} + {{#var: enchantAtk4}} }} | ?
 +
                                                      }}
 
           }}
 
           }}
 
           {{#ifexpr: {{#var: showDefEnchant}} != 0
 
           {{#ifexpr: {{#var: showDefEnchant}} != 0
             | {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#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: {{#var: enchantDef1|0}} and {{#var: enchantDef2|0}} and {{#var: enchantDef3|0}} and {{#var: enchantDef4|0}} | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} + {{#var: enchantDef3}} + {{#var: enchantDef4}} }} | ? }} <!-- 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}} }} | ?
 +
                                                      }}
 
           }}
 
           }}
 
           {{!}}-
 
           {{!}}-

Revision as of 11:37, 14 August 2018








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