Difference between revisions of "Template:ItemPropertiesInfoBox"

From ChatWars Wiki
Jump to: navigation, search
(removed a bunch of whitespace (new indentation level))
Line 61: Line 61:
 
|Enchantment Slot
 
|Enchantment Slot
 
| {{#ifeq: {{#show: {{PAGENAME}} |?BoolEnchantment }} | true
 
| {{#ifeq: {{#show: {{PAGENAME}} |?BoolEnchantment }} | true
  | yes {{#switch: {{#show: {{PAGENAME}} |?LevelEquipRequirement }}
+
    | yes {{#switch: {{#show: {{PAGENAME}} |?LevelEquipRequirement }}
          | 15 = ({{Emoticon|emoticon=Bookred}})
+
            | 15 = ({{Emoticon|emoticon=Bookred}})
          | 25 = ({{Emoticon|emoticon=Bookgreen}})
+
            | 25 = ({{Emoticon|emoticon=Bookgreen}})
          | 35 = ({{Emoticon|emoticon=Bookblue}})
+
            | 35 = ({{Emoticon|emoticon=Bookblue}})
          | 45 = ({{Emoticon|emoticon=Bookorange}})
+
            | 45 = ({{Emoticon|emoticon=Bookorange}})
        }}
+
          }}
    {{#ifexpr: {{#expr: {{#var: enchantAtk1}} + <!-- checks if this should be displayed at all (if any of the enchantment values are != 0-->
+
      {{#ifexpr: {{#expr: {{#var: enchantAtk1|0}} + <!-- checks if this should be displayed at all (if any of the enchantment values are != 0-->
                                {{#var: enchantAtk2}} +
+
                          {{#var: enchantAtk2|0}} +
                                {{#var: enchantAtk3}} +
+
                          {{#var: enchantAtk3|0}} +
                                {{#var: enchantAtk4}} +
+
                          {{#var: enchantAtk4|0}} +
                                {{#var: enchantDef1}} +
+
                          {{#var: enchantDef1|0}} +
                                {{#var: enchantDef2}} +
+
                          {{#var: enchantDef2|0}} +
                                {{#var: enchantDef3}} +
+
                          {{#var: enchantDef3|0}} +
                                {{#var: enchantDef4}}
+
                          {{#var: enchantDef4|0}}
  }} > 0
+
                }} > 0
              | {{!}}-
+
        | {{!}}-
    {{!}}Enchant Levels
+
          {{!}}Enchant Levels
    {{!}}
+
          {{!}}
    {{{!}} 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 -->
                                    {{#var: enchantAtk2}} +
+
                              {{#var: enchantAtk2}} +
                                    {{#var: enchantAtk3}} +
+
                              {{#var: enchantAtk3}} +
                                    {{#var: enchantAtk4}}
+
                              {{#var: enchantAtk4}}
  }} > 0  
+
                    }} > 0  
                  | !{{Emoticon|emoticon=Attack}}
+
            | !{{Emoticon|emoticon=Attack}}
                    !{{Emoticon|emoticon=Attack}} (total)<!--
+
              !{{Emoticon|emoticon=Attack}} (total)<!--
                    -->{{#vardefine: showAtkEnchant | 1 }}
+
              -->{{#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 -->
                                    {{#var: enchantDef2}} +
+
                              {{#var: enchantDef2}} +
                                    {{#var: enchantDef3}} +
+
                              {{#var: enchantDef3}} +
                                    {{#var: enchantDef4}}
+
                              {{#var: enchantDef4}}
  }} > 0  
+
                    }} > 0  
                  | !{{Emoticon|emoticon=Defend}}
+
            | !{{Emoticon|emoticon=Defend}}
                    !{{Emoticon|emoticon=Defend}} (total)<!--
+
              !{{Emoticon|emoticon=Defend}} (total)<!--
                    -->{{#vardefine: showDefEnchant | 1 }}
+
              -->{{#vardefine: showDefEnchant | 1 }}
                }}
+
          }}
                {{!}}-
+
          {{!}}-
                {{!}} style="text-align: center" {{!}} 1
+
          {{!}} style="text-align: center" {{!}} 1
                {{#ifexpr: {{#var: showAtkEnchant}} != 0
+
          {{#ifexpr: {{#var: showAtkEnchant}} != 0
                  | {{!}} 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 -->
+
            | {{!}} 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 -->
                }}                 
+
          }}                 
                {{!}}-
+
          {{!}}-
                {{!}} style="text-align: center" {{!}} 2
+
          {{!}} style="text-align: center" {{!}} 2
                {{#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: {{#var: enchantAtk1}} and {{#var: enchantAtk2}} | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} }} | ? }} <!-- total atk bonus to this level -->
+
              {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantAtk1}} and {{#var: enchantAtk2}} | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} }} | ? }} <!-- total atk bonus to this level -->
                }}
+
          }}
                {{#ifexpr: {{#var: showDefEnchant}} != 0
+
          {{#ifexpr: {{#var: showDefEnchant}} != 0
                  | {{!}} 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: {{#var: enchantDef1}} and {{#var: enchantDef2}} | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} }} | ? }} <!-- total def bonus to this level -->
+
              {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantDef1}} and {{#var: enchantDef2}} | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} }} | ? }} <!-- total def bonus to this level -->
                }}
+
          }}
                {{!}}-
+
          {{!}}-
                {{!}} style="text-align: center" {{!}} 3
+
          {{!}} style="text-align: center" {{!}} 3
                {{#ifexpr: {{#var: showAtkEnchant}} != 0
+
          {{#ifexpr: {{#var: showAtkEnchant}} != 0
                  | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantAtk3}} | {{#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}} and {{#var: enchantAtk2}} and {{#var: enchantAtk3}} | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} + {{#var: enchantAtk3}} }} | ? }} <!-- total atk bonus to this level -->
+
              {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantAtk1}} and {{#var: enchantAtk2}} and {{#var: enchantAtk3}} | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} + {{#var: enchantAtk3}} }} | ? }} <!-- total atk bonus to this level -->
                }}
+
          }}
                {{#ifexpr: {{#var: showDefEnchant}} != 0
+
          {{#ifexpr: {{#var: showDefEnchant}} != 0
                  | {{!}} 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: {{#var: enchantDef1}} and {{#var: enchantDef2}} and {{#var: enchantDef3}} | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} + {{#var: enchantDef3}} }} | ? }} <!-- total def bonus to this level -->
+
              {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantDef1}} and {{#var: enchantDef2}} and {{#var: enchantDef3}} | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} + {{#var: enchantDef3}} }} | ? }} <!-- total def bonus to this level -->
                }}
+
          }}
                {{!}}-
+
          {{!}}-
                {{!}} style="text-align: center" {{!}} 4
+
          {{!}} style="text-align: center" {{!}} 4
                {{#ifexpr: {{#var: showAtkEnchant}} != 0
+
          {{#ifexpr: {{#var: showAtkEnchant}} != 0
                  | {{!}} style="text-align: center" {{!}} +{{#if: {{#var: enchantAtk4}} | {{#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}} and {{#var: enchantAtk2}} and {{#var: enchantAtk3}} and {{#var: enchantAtk4}} | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} + {{#var: enchantAtk3}} + {{#var: enchantAtk4}} }} | ? }} <!-- total atk bonus to this level -->
+
              {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantAtk1}} and {{#var: enchantAtk2}} and {{#var: enchantAtk3}} and {{#var: enchantAtk4}} | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} + {{#var: enchantAtk3}} + {{#var: enchantAtk4}} }} | ? }} <!-- total atk bonus to this level -->
                }}
+
          }}
                {{#ifexpr: {{#var: showDefEnchant}} != 0
+
          {{#ifexpr: {{#var: showDefEnchant}} != 0
                  | {{!}} 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: {{#var: enchantDef1}} and {{#var: enchantDef2}} and {{#var: enchantDef3}} and {{#var: enchantDef4}} | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} + {{#var: enchantDef3}} + {{#var: enchantDef4}} }} | ? }} <!-- total def bonus to this level -->
+
              {{!}} style="text-align: center" {{!}} +{{#ifexpr: {{#var: enchantDef1}} and {{#var: enchantDef2}} and {{#var: enchantDef3}} and {{#var: enchantDef4}} | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} + {{#var: enchantDef3}} + {{#var: enchantDef4}} }} | ? }} <!-- total def bonus to this level -->
                }}
+
          }}
                {{!}}-
+
          {{!}}-
                {{!}}}
+
          {{!}}}
            }}
+
      }}
  | no
+
    | no
}}  
+
  }}  
 
|-
 
|-
 
{{#if: {{#show: {{PAGENAME}} |?Ammunition }} |
 
{{#if: {{#show: {{PAGENAME}} |?Ammunition }} |

Revision as of 04:11, 12 August 2018








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