Difference between revisions of "Template:ItemPropertiesInfoBox"

From ChatWars Wiki
Jump to: navigation, search
(bug fixes)
(replaced pagename reference with variable call to circumvent bug in mediawiki)
Line 1: Line 1:
{{#vardefine: enchantAtk1 | {{#show: {{PAGENAME}} |?EnchantAtk1 }} }}
+
{{#vardefine: source | {{{source|{{PAGENAME}} }}} }}
{{#vardefine: enchantAtk2 | {{#show: {{PAGENAME}} |?EnchantAtk2 }} }}
 
{{#vardefine: enchantAtk3 | {{#show: {{PAGENAME}} |?EnchantAtk3 }} }}
 
{{#vardefine: enchantAtk4 | {{#show: {{PAGENAME}} |?EnchantAtk4 }} }}
 
  
{{#vardefine: enchantDef1 | {{#show: {{PAGENAME}} |?EnchantDef1 }} }}
+
{{#vardefine: enchantAtk1 | {{#show: {{#var: source}} |?EnchantAtk1 }} }}
{{#vardefine: enchantDef2 | {{#show: {{PAGENAME}} |?EnchantDef2 }} }}
+
{{#vardefine: enchantAtk2 | {{#show: {{#var: source}} |?EnchantAtk2 }} }}
{{#vardefine: enchantDef3 | {{#show: {{PAGENAME}} |?EnchantDef3 }} }}
+
{{#vardefine: enchantAtk3 | {{#show: {{#var: source}} |?EnchantAtk3 }} }}
{{#vardefine: enchantDef4 | {{#show: {{PAGENAME}} |?EnchantDef4 }} }}
+
{{#vardefine: enchantAtk4 | {{#show: {{#var: source}} |?EnchantAtk4 }} }}
 +
 
 +
{{#vardefine: enchantDef1 | {{#show: {{#var: source}} |?EnchantDef1 }} }}
 +
{{#vardefine: enchantDef2 | {{#show: {{#var: source}} |?EnchantDef2 }} }}
 +
{{#vardefine: enchantDef3 | {{#show: {{#var: source}} |?EnchantDef3 }} }}
 +
{{#vardefine: enchantDef4 | {{#show: {{#var: source}} |?EnchantDef4 }} }}
  
 
{{#vardefine: showAtkEnchant | 0 }}
 
{{#vardefine: showAtkEnchant | 0 }}
Line 13: Line 15:
 
<includeonly>
 
<includeonly>
 
|Craftable
 
|Craftable
| {{#if: {{#show: {{PAGENAME}} |?BoolCraft }} | {{#ifeq: {{#show: {{PAGENAME}} |?BoolCraft }} | true | yes | no}} | [[??]] }}
+
| {{#if: {{#show: {{#var: source}} |?BoolCraft }} | {{#ifeq: {{#show: {{#var: source}} |?BoolCraft }} | true | yes | no}} | [[??]] }}
 
|-
 
|-
 
|Tradeable (Auction)
 
|Tradeable (Auction)
| {{#if: {{#show: {{PAGENAME}} |?BoolAuction }} | {{#ifeq: {{#show: {{PAGENAME}} |?BoolAuction }} | true | yes | no}} | [[??]] }}
+
| {{#if: {{#show: {{#var: source}} |?BoolAuction }} | {{#ifeq: {{#show: {{#var: source}} |?BoolAuction }} | true | yes | no}} | [[??]] }}
 
|-
 
|-
 
|Shop prices (buy / sell)
 
|Shop prices (buy / sell)
| {{#if: {{#show: {{PAGENAME}} |?ShopBuyPrice }}
+
| {{#if: {{#show: {{#var: source}} |?ShopBuyPrice }}
     | {{#show: {{PAGENAME}} |?ShopBuyPrice }}{{Emoticon|emoticon=Gold}}
+
     | {{#show: {{#var: source}} |?ShopBuyPrice }}{{Emoticon|emoticon=Gold}}
 
     | ''Can't be bought''
 
     | ''Can't be bought''
 
   }} / <!--
 
   }} / <!--
-->{{#if: {{#show: {{PAGENAME}} |?ShopSellPrice}}
+
-->{{#if: {{#show: {{#var: source}} |?ShopSellPrice}}
     | {{#show: {{PAGENAME}} |?ShopSellPrice }}{{Emoticon|emoticon=Gold}}
+
     | {{#show: {{#var: source}} |?ShopSellPrice }}{{Emoticon|emoticon=Gold}}
     | {{#if: {{#show: {{PAGENAME}} |?ShopBuyPrice }}
+
     | {{#if: {{#show: {{#var: source}} |?ShopBuyPrice }}
         | {{#ifexpr: {{#show: {{PAGENAME}} |?ShopBuyPrice }} < 4
+
         | {{#ifexpr: {{#show: {{#var: source}} |?ShopBuyPrice }} < 4
 
             | 0{{Emoticon|emoticon=Gold}}
 
             | 0{{Emoticon|emoticon=Gold}}
 
             | ''Can't be sold''
 
             | ''Can't be sold''
Line 40: Line 42:
 
|-
 
|-
 
|Attack  
 
|Attack  
| +{{#if: {{#show: {{PAGENAME}} |?Attack }} | {{#show: {{PAGENAME}} |?Attack }} | [[??]] }} {{Emoticon|emoticon=Attack}}
+
| +{{#if: {{#show: {{#var: source}} |?Attack }} | {{#show: {{#var: source}} |?Attack }} | [[??]] }} {{Emoticon|emoticon=Attack}}
 
|-
 
|-
 
|Defense
 
|Defense
| +{{#if: {{#show: {{PAGENAME}} |?Defense }} | {{#show: {{PAGENAME}} |?Defense }} | [[??]] }} {{Emoticon|emoticon=Defend}}
+
| +{{#if: {{#show: {{#var: source}} |?Defense }} | {{#show: {{#var: source}} |?Defense }} | [[??]] }} {{Emoticon|emoticon=Defend}}
 
|-
 
|-
 
|Mana
 
|Mana
| +{{#if: {{#show: {{PAGENAME}} |?Mana }} | {{#show: {{PAGENAME}} |?Mana }} | [[??]] }} {{Emoticon|emoticon=Mana}}
+
| +{{#if: {{#show: {{#var: source}} |?Mana }} | {{#show: {{#var: source}} |?Mana }} | [[??]] }} {{Emoticon|emoticon=Mana}}
 
|-
 
|-
{{#if: {{#show: {{PAGENAME}} |?Stamina }} |
+
{{#if: {{#show: {{#var: source}} |?Stamina }} |
   {{#ifeq: {{#show: {{PAGENAME}} |?Stamina }} | 0 | |
+
   {{#ifeq: {{#show: {{#var: source}} |?Stamina }} | 0 | |
 
     {{!}}Stamina
 
     {{!}}Stamina
     {{!}} +{{#show: {{PAGENAME}} |?Stamina }} {{Emoticon|emoticon=Stamina}}
+
     {{!}} +{{#show: {{#var: source}} |?Stamina }} {{Emoticon|emoticon=Stamina}}
 
     {{!}}-
 
     {{!}}-
 
   }}
 
   }}
 
}}
 
}}
{{#if: {{#show: {{PAGENAME}} |?InventoryIncrease }} |
+
{{#if: {{#show: {{#var: source}} |?InventoryIncrease }} |
   {{#ifeq: {{#show: {{PAGENAME}} |?InventoryIncrease }} | 0 | |
+
   {{#ifeq: {{#show: {{#var: source}} |?InventoryIncrease }} | 0 | |
 
     {{!}}Inventory increase
 
     {{!}}Inventory increase
     {{!}} +{{#show: {{PAGENAME}} |?InventoryIncrease }} {{Emoticon|emoticon=Bag}}
+
     {{!}} +{{#show: {{#var: source}} |?InventoryIncrease }} {{Emoticon|emoticon=Bag}}
 
     {{!}}-
 
     {{!}}-
 
   }}
 
   }}
 
}}
 
}}
{{#if: {{#show: {{PAGENAME}} |?Luck }} |
+
{{#if: {{#show: {{#var: source}} |?Luck }} |
   {{#ifeq: {{#show: {{PAGENAME}} |?Luck }} | 0 | |
+
   {{#ifeq: {{#show: {{#var: source}} |?Luck }} | 0 | |
 
     {{!}}Luck
 
     {{!}}Luck
     {{!}} +{{#show: {{PAGENAME}} |?Luck }} {{Emoticon|emoticon=Luck}}
+
     {{!}} +{{#show: {{#var: source}} |?Luck }} {{Emoticon|emoticon=Luck}}
 
     {{!}}-
 
     {{!}}-
 
   }}
 
   }}
 
}}
 
}}
 
|[[Skill]]
 
|[[Skill]]
| {{#switch: {{#show: {{PAGENAME}} |?ItemType# }}
+
| {{#switch: {{#show: {{#var: source}} |?ItemType# }}
     | Weapon = {{#ask: [[{{PAGENAME}}]]
+
     | Weapon = {{#ask: [[{{#var: source}}]]
 
                 |mainlabel=-
 
                 |mainlabel=-
 
                 |headers=hide
 
                 |headers=hide
Line 78: Line 80:
 
                 |?ItemSubType#
 
                 |?ItemSubType#
 
               }}
 
               }}
     | Protective Gear = {{#if: {{#show: {{PAGENAME}} |?ArmorClass# }}
+
     | Protective Gear = {{#if: {{#show: {{#var: source}} |?ArmorClass# }}
                           | {{#ask: [[{{PAGENAME}}]]
+
                           | {{#ask: [[{{#var: source}}]]
 
                               |mainlabel=-
 
                               |mainlabel=-
 
                               |headers=hide
 
                               |headers=hide
Line 92: Line 94:
 
|-
 
|-
 
|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: {{#var: source}} |?LevelEquipRequirement }} {{#switch: {{#show: {{#var: source}} |?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: {{#var: source}} |?BoolEnchantment }} | true
     | yes {{#switch: {{#show: {{PAGENAME}} |?LevelEquipRequirement }}
+
     | yes {{#switch: {{#show: {{#var: source}} |?LevelEquipRequirement }}
 
             | 15 = ({{Emoticon|emoticon=Bookred}})
 
             | 15 = ({{Emoticon|emoticon=Bookred}})
 
             | 25 = ({{Emoticon|emoticon=Bookgreen}})
 
             | 25 = ({{Emoticon|emoticon=Bookgreen}})
Line 192: Line 194:
 
   }}  
 
   }}  
 
|-
 
|-
{{#if: {{#show: {{PAGENAME}} |?Ammunition }} |
+
{{#if: {{#show: {{#var: source}} |?Ammunition }} |
 
{{!}}Ammunition
 
{{!}}Ammunition
{{!}} {{#show: {{PAGENAME}} |?Ammunition }}
+
{{!}} {{#show: {{#var: source}} |?Ammunition }}
 
{{!}}-
 
{{!}}-
 
}}
 
}}

Revision as of 10:48, 22 October 2018









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