Difference between revisions of "Template:ItemPropertiesInfoBox"

From ChatWars Wiki
Jump to: navigation, search
Line 1: Line 1:
 +
{{#vardefine: enchantAtk1 | {{#show: {{PAGENAME}} |?EnchantAtk1# }} }}
 +
{{#vardefine: enchantAtk2 | {{#show: {{PAGENAME}} |?EnchantAtk2# }} }}
 +
{{#vardefine: enchantAtk3 | {{#show: {{PAGENAME}} |?EnchantAtk3# }} }}
 +
{{#vardefine: enchantAtk4 | {{#show: {{PAGENAME}} |?EnchantAtk4# }} }}
 +
 +
{{#vardefine: enchantDef1 | {{#show: {{PAGENAME}} |?EnchantDef1# }} }}
 +
{{#vardefine: enchantDef2 | {{#show: {{PAGENAME}} |?EnchantDef2# }} }}
 +
{{#vardefine: enchantDef3 | {{#show: {{PAGENAME}} |?EnchantDef3# }} }}
 +
{{#vardefine: enchantDef4 | {{#show: {{PAGENAME}} |?EnchantDef4# }} }}
 
<includeonly>
 
<includeonly>
 
|Craftable
 
|Craftable
| {{#if: {{#show: {{PAGENAME}} |?BoolCraft}} | {{#ifeq: {{#show: {{PAGENAME}} |?BoolCraft}} | true | yes | no}} | ? }}
+
| {{#if: {{#show: {{PAGENAME}} |?BoolCraft }} | {{#ifeq: {{#show: {{PAGENAME}} |?BoolCraft }} | true | yes | no}} | ? }}
 
|-
 
|-
 
|Tradeable (Auction)
 
|Tradeable (Auction)
| {{#if: {{#show: {{PAGENAME}} |?BoolAuction}} | {{#ifeq: {{#show: {{PAGENAME}} |?BoolAuction}} | true | yes | no}} | ? }}
+
| {{#if: {{#show: {{PAGENAME}} |?BoolAuction }} | {{#ifeq: {{#show: {{PAGENAME}} |?BoolAuction }} | true | yes | no}} | ? }}
 
|-
 
|-
 
|Shop prices (buy / sell)
 
|Shop prices (buy / sell)
| {{#if: {{#show: {{PAGENAME}} |?ShopBuyPrice}} | {{#show: {{PAGENAME}} |?ShopBuyPrice}}{{Emoticon|emoticon=Gold}} | ''Can't be bought''}} / {{#if: {{#show: {{PAGENAME}} |?ShopSellPrice}} | {{#show: {{PAGENAME}} |?ShopSellPrice}}{{Emoticon|emoticon=Gold}} | {{#if: {{#show: {{PAGENAME}} |?ShopBuyPrice}} | {{#ifexpr: {{#show: {{PAGENAME}} |?ShopBuyPrice}} < 4 | 0{{Emoticon|emoticon=Gold}} | ''Can't be sold'' }} | ''Can't be sold'' }} }}
+
| {{#if: {{#show: {{PAGENAME}} |?ShopBuyPrice }} | {{#show: {{PAGENAME}} |?ShopBuyPrice }}{{Emoticon|emoticon=Gold}} | ''Can't be bought''}} / {{#if: {{#show: {{PAGENAME}} |?ShopSellPrice }} | {{#show: {{PAGENAME}} |?ShopSellPrice }}{{Emoticon|emoticon=Gold}} | {{#if: {{#show: {{PAGENAME}} |?ShopBuyPrice }} | {{#ifexpr: {{#show: {{PAGENAME}} |?ShopBuyPrice }} < 4 | 0{{Emoticon|emoticon=Gold}} | ''Can't be sold'' }} | ''Can't be sold'' }} }}
 
|-
 
|-
 
|colspan="2" align="center"|'''Stats'''
 
|colspan="2" align="center"|'''Stats'''
Line 15: Line 24:
 
|-
 
|-
 
|Attack  
 
|Attack  
| +{{#if: {{#show: {{PAGENAME}} |?Attack}} | {{#show: {{PAGENAME}} |?Attack}} | ? }} {{Emoticon|emoticon=Attack}}
+
| +{{#if: {{#show: {{PAGENAME}} |?Attack }} | {{#show: {{PAGENAME}} |?Attack }} | ? }} {{Emoticon|emoticon=Attack}}
 
|-
 
|-
 
|Defense
 
|Defense
| +{{#if: {{#show: {{PAGENAME}} |?Defense}} | {{#show: {{PAGENAME}} |?Defense}} | ? }} {{Emoticon|emoticon=Defend}}
+
| +{{#if: {{#show: {{PAGENAME}} |?Defense }} | {{#show: {{PAGENAME}} |?Defense }} | ? }} {{Emoticon|emoticon=Defend}}
 
|-
 
|-
 
|Mana
 
|Mana
| +{{#if: {{#show: {{PAGENAME}} |?Mana}} | {{#show: {{PAGENAME}} |?Mana}} | ? }} {{Emoticon|emoticon=Mana}}
+
| +{{#if: {{#show: {{PAGENAME}} |?Mana }} | {{#show: {{PAGENAME}} |?Mana }} | ? }} {{Emoticon|emoticon=Mana}}
 
|-
 
|-
{{#if: {{#show: {{PAGENAME}} |?Stamina}} |
+
{{#if: {{#show: {{PAGENAME}} |?Stamina }} |
   {{#ifeq: {{#show: {{PAGENAME}} |?Stamina}} | 0 | |
+
   {{#ifeq: {{#show: {{PAGENAME}} |?Stamina }} | 0 | |
 
     {{!}}Stamina
 
     {{!}}Stamina
     {{!}} +{{#show: {{PAGENAME}} |?Stamina}} {{Emoticon|emoticon=Stamina}}
+
     {{!}} +{{#show: {{PAGENAME}} |?Stamina }} {{Emoticon|emoticon=Stamina}}
 
     {{!}}-
 
     {{!}}-
 
   }}
 
   }}
 
}}
 
}}
{{#if: {{#show: {{PAGENAME}} |?InventoryIncrease}} |
+
{{#if: {{#show: {{PAGENAME}} |?InventoryIncrease }} |
   {{#ifeq: {{#show: {{PAGENAME}} |?InventoryIncrease}} | 0 | |
+
   {{#ifeq: {{#show: {{PAGENAME}} |?InventoryIncrease }} | 0 | |
 
     {{!}}Inventory increase
 
     {{!}}Inventory increase
     {{!}} +{{#show: {{PAGENAME}} |?InventoryIncrease}} {{Emoticon|emoticon=Bag}}
+
     {{!}} +{{#show: {{PAGENAME}} |?InventoryIncrease }} {{Emoticon|emoticon=Bag}}
 
     {{!}}-
 
     {{!}}-
 
   }}
 
   }}
 
}}
 
}}
{{#if: {{#show: {{PAGENAME}} |?Luck}} |
+
{{#if: {{#show: {{PAGENAME}} |?Luck }} |
   {{#ifeq: {{#show: {{PAGENAME}} |?Luck}} | 0 | |
+
   {{#ifeq: {{#show: {{PAGENAME}} |?Luck }} | 0 | |
 
     {{!}}Stamina
 
     {{!}}Stamina
     {{!}} +{{#show: {{PAGENAME}} |?Luck}} {{Emoticon|emoticon=Luck}}
+
     {{!}} +{{#show: {{PAGENAME}} |?Luck }} {{Emoticon|emoticon=Luck}}
 
     {{!}}-
 
     {{!}}-
 
   }}
 
   }}
 
}}
 
}}
 
|Level Requirement
 
|Level Requirement
|{{#show: {{PAGENAME}} |?LevelEquipRequirement}} {{#switch: {{#show: {{PAGENAME}} |?LevelEquipRequirement}} | 15 = ({{Emoticon|emoticon=Bookred}}) | 25 = ({{Emoticon|emoticon=Bookgreen}}) | 35 = ({{Emoticon|emoticon=Bookblue}}) | 45 = ({{Emoticon|emoticon=Bookorange}}) }}
+
| {{#show: {{PAGENAME}} |?LevelEquipRequirement }} {{#switch: {{#show: {{PAGENAME}} |?LevelEquipRequirement }} | 15 = ({{Emoticon|emoticon=Bookred}}) | 25 = ({{Emoticon|emoticon=Bookgreen}}) | 35 = ({{Emoticon|emoticon=Bookblue}}) | 45 = ({{Emoticon|emoticon=Bookorange}}) }}
 
|-
 
|-
 
|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: ({{#show: {{PAGENAME}} |?EnchantAtk1 }} + {{#show: {{PAGENAME}} |?EnchantAtk2 }} + {{#show: {{PAGENAME}} |?EnchantAtk3 }} + {{#show: {{PAGENAME}} |?EnchantAtk4 }} + {{#show: {{PAGENAME}} |?EnchantDef1 }} + {{#show: {{PAGENAME}} |?EnchantDef2 }} + {{#show: {{PAGENAME}} |?EnchantDef3 }} + {{#show: {{PAGENAME}} |?EnchantDef4 }}) > 0
+
         }} {{#ifexpr: {{#expr: {{#var: enchantAtk1}} + <!-- checks if this should be displayed at all (if any of the enchantment values are != 0-->
 +
                                {{#var: enchantAtk2}} +
 +
                                {{#var: enchantAtk3}} +
 +
                                {{#var: enchantAtk4}} +
 +
                                {{#var: enchantDef1}} +
 +
                                {{#var: enchantDef2}} +
 +
                                {{#var: enchantDef3}} +
 +
                                {{#var: enchantDef4}}
 +
  }} > 0
 
               | {{!}}{{!}} {{{!}} class="wikitable"
 
               | {{!}}{{!}} {{{!}} class="wikitable"
 
                 !Level
 
                 !Level
                 {{#ifexpr: ({{#show: {{PAGENAME}} |?EnchantAtk1 }} + {{#show: {{PAGENAME}} |?EnchantAtk2 }} + {{#show: {{PAGENAME}} |?EnchantAtk3 }} + {{#show: {{PAGENAME}} |?EnchantAtk4 }}) > 0  
+
                 {{#ifexpr: {{#expr: {{#var: enchantAtk1}} + <!-- checks if there are any attack enchantment bonus, only displays atk column if true -->
 +
                                    {{#var: enchantAtk2}} +
 +
                                    {{#var: enchantAtk3}} +
 +
                                    {{#var: enchantAtk4}}
 +
  }} > 0  
 
                   | !{{Emoticon|emoticon=Attack}}
 
                   | !{{Emoticon|emoticon=Attack}}
 
                     !{{Emoticon|emoticon=Attack}} (cumulative)
 
                     !{{Emoticon|emoticon=Attack}} (cumulative)
 
                 }}
 
                 }}
                 {{#ifexpr: ({{#show: {{PAGENAME}} |?EnchantDef1 }} + {{#show: {{PAGENAME}} |?EnchantDef2 }} + {{#show: {{PAGENAME}} |?EnchantDef3 }} + {{#show: {{PAGENAME}} |?EnchantDef4 }}) > 0  
+
                 {{#ifexpr: {{#expr: {{#var: enchantDef1}} + <!-- checks if there are any defense enchantment bonus, only displays def column if true -->
 +
                                    {{#var: enchantDef2}} +
 +
                                    {{#var: enchantDef3}} +
 +
                                    {{#var: enchantDef4}}
 +
  }} > 0  
 
                   | !{{Emoticon|emoticon=Defend}}
 
                   | !{{Emoticon|emoticon=Defend}}
 
                     !{{Emoticon|emoticon=Defend}} (cumulative)
 
                     !{{Emoticon|emoticon=Defend}} (cumulative)
 
                 }}
 
                 }}
 
                 {{!}}-
 
                 {{!}}-
                 {{#ifexpr: ({{#show: {{PAGENAME}} |EnchantAtk1}} + {{#show: {{PAGENAME}} |EnchantDef1}}) > 0
+
                 {{!}} 1
                  | {{!}} 1 {{!}}{{!}} +{{#show: {{PAGENAME}} |EnchantAtk1}} {{!}}{{!}} +{{#show: {{PAGENAME}} |EnchantAtk1}} {{!}}{{!}} {{#show: {{PAGENAME}} |EnchantDef1}} {{!}}-
+
{{!}} +{{#if: {{#var: enchantAtk1}} | {{#var: enchantAtk1}} | ? }} <!-- atk bonus this enchant -->
                 }}
+
                {{!}} +{{#if: {{#var: enchantAtk1}} | {{#var: enchantAtk1}} | ? }} <!-- total atk bonus to this level -->
                {{#ifexpr: ({{#show: {{PAGENAME}} |EnchantAtk2}} + {{#show: {{PAGENAME}} |EnchantDef2}}) > 0
+
                {{!}} +{{#if: {{#var: enchantDef1}} | {{#var: enchantDef1}} | ? }} <!-- def bonus this enchant -->
                  | {{!}} 2 {{!}}{{!}} +{{#show: {{PAGENAME}} |EnchantAtk1}} {{!}}{{!}} +{{#expr: {{#show: {{PAGENAME}} |EnchantAtk1}} + {{#show: {{PAGENAME}} |EnchantAtk2}} }} {{!}}{{!}} {{#show: {{PAGENAME}} |EnchantDef2}} {{!}}-
+
                {{!}} +{{#if: {{#var: enchantDef1}} | {{#var: enchantDef1}} | ? }} <!-- total def bonus to this level -->
                 }}
+
{{!}}-
                {{#ifexpr: ({{#show: {{PAGENAME}} |EnchantAtk}} + {{#show: {{PAGENAME}} |EnchantDef3}}) > 0
+
                {{!}} 2
                  | {{!}} 3 {{!}}{{!}} +{{#show: {{PAGENAME}} |EnchantAtk1}} {{!}}{{!}} +{{#expr: {{#show: {{PAGENAME}} |EnchantAtk1}} + {{#show: {{PAGENAME}} |EnchantAtk2}} + {{#show: {{PAGENAME}} |EnchantAtk3}} }} {{!}}{{!}} {{#show: {{PAGENAME}} |EnchantDef3}} {{!}}-
+
{{!}} +{{#if: {{#var: enchantAtk2}} | {{#var: enchantAtk2}} | ? }} <!-- atk bonus this enchant -->
                 }}
+
                {{!}} +{{#ifexpr: {{#var: enchantAtk1}} and {{#var: enchantAtk2}} | {{#var: enchantAtk1}} + {{#var: enchantAtk2}} }} | ? }} <!-- total atk bonus to this level -->
                {{#ifexpr: ({{#show: {{PAGENAME}} |EnchantAtk4}} + {{#show: {{PAGENAME}} |EnchantDef4}}) > 0
+
                {{!}} +{{#if: {{#var: enchantDef2}} | {{#var: enchantDef2}} | ? }} <!-- def bonus this enchant -->
                  | {{!}} 4 {{!}}{{!}} +{{#show: {{PAGENAME}} |EnchantAtk1}} {{!}}{{!}} {{#show: {{PAGENAME}} |EnchantDef4}} {{!}}-
+
                 {{!}} +{{#ifexpr: {{#var: enchantDef1}} and {{#var: enchantDef2}} | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} }} | ? }} <!-- total def bonus to this level -->
                }}{{!}}}
+
{{!}}-
 +
                {{!}} 3
 +
{{!}} +{{#if: {{#var: enchantAtk3}} | {{#var: enchantAtk3}} | ? }} <!-- atk bonus this enchant -->
 +
                {{!}} +{{#ifexpr: {{#var: enchantAtk1}} and {{#var: enchantAtk2}} and {{#var: enchantAtk3}} | {{#expr: {{#var: enchantAtk1}} + {{#var: enchantAtk2}} + {{#var: enchantAtk3}} }} | ? }} <!-- total atk bonus to this level -->
 +
                {{!}} +{{#if: {{#var: enchantDef3}} | {{#var: enchantDef3}} | ? }} <!-- def bonus this enchant -->
 +
                 {{!}} +{{#ifexpr: {{#var: enchantDef1}} and {{#var: enchantDef2}} and {{#var: enchantDef3}} | {{#expr: {{#var: enchantDef1}} + {{#var: enchantDef2}} + {{#var: enchantDef3}} }} | ? }} <!-- total def bonus to this level -->
 +
{{!}}-
 +
                {{!}} 4
 +
{{!}} +{{#if: {{#var: enchantAtk4}} | {{#var: enchantAtk4}} | ? }} <!-- atk bonus this enchant -->
 +
                {{!}} +{{#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 -->
 +
                 {{!}} +{{#if: {{#var: enchantDef4}} | {{#var: enchantDef4}} | ? }} <!-- def bonus this enchant -->
 +
                {{!}} +{{#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 }} |
 
{{!}}Ammunition
 
{{!}}Ammunition
{{!}} {{#show: {{PAGENAME}} |?Ammunition}}
+
{{!}} {{#show: {{PAGENAME}} |?Ammunition }}
 
{{!}}-
 
{{!}}-
 
}}
 
}}

Revision as of 03:17, 12 August 2018







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