Difference between revisions of "Template:Card"

From Unofficial Fantasica Wiki
Jump to: navigation, search
m (testing)
m
 
(73 intermediate revisions by 4 users not shown)
Line 6: Line 6:
 
Usage: <nowiki>{{Card|CardName}}</nowiki></noinclude><includeonly>{{#get_db_data:
 
Usage: <nowiki>{{Card|CardName}}</nowiki></noinclude><includeonly>{{#get_db_data:
 
db=fantawiki
 
db=fantawiki
|from=units
+
|from=units u1 left join units u2 on u2.name = CONCAT(u1.name, '_mlb')
|where=name='{{{1}}}'
+
|where=u1.name='{{{1}}}'
 
|limit=1
 
|limit=1
|data=name=`name`,fullname=`fullname`,gender=`gender`,rarity=`rarity`,type=`type`,cost=`cost`,speed=`speed`,speednum=`speednum`,range=`range`,land=`land`,air=`air`,sea=`sea`,arena=`arena`,land2=`landlb`,air2=`airlb`,sea2=`sealb`,arenalb=`arenalb`,skill1=`skill1`,skill2=`skill2`,arenaskill=`arenaskill`,source=`source`
+
|data=name=u1.`name`,fullname=u1.`fullname`,gender=u1.`gender`,rarity=u1.`rarity`,type=u1.`type`,cost=u1.`cost`,speed=u1.`speed`,speednum=u1.`speednum`,range=u1.`range`,land=u1.`land`,air=u1.`air`,sea=u1.`sea`,arena=u1.`arena`,land2=u1.`landlb`,air2=u1.`airlb`,sea2=u1.`sealb`,arenalb=u1.`arenalb`,skill1=u1.`skill1`,skill2=u1.`skill2`,arenaskill=u1.`arenaskill`,source=u1.`source`,evo=u1.`evo`,maxhp=u1.`maxhp`,mlbhp=u1.`mlbhp`,aschp=u1.`aschp`,ascland=u1.`ascland`,ascair=u1.`ascair`,ascsea=u1.`ascsea`,ascrng=u1.`ascrng`,asccost=u1.`asccost`,ascspd=u1.`ascspd`,namemlb=u2.`name`,fullnamemlb=u2.`fullname`,gendermlb=u2.`gender`,raritymlb=u2.`rarity`,typemlb=u2.`type`,costmlb=u2.`cost`,speedmlb=u2.`speed`,speednummlb=u2.`speednum`,rangemlb=u2.`range`,landmlb=u2.`land`,airmlb=u2.`air`,seamlb=u2.`sea`,arenamlb=u2.`arena`,land2mlb=u2.`landlb`,air2mlb=u2.`airlb`,sea2mlb=u2.`sealb`,arenalbmlb=u2.`arenalb`,skill1mlb=u2.`skill1`,skill2mlb=u2.`skill2`,arenaskillmlb=u2.`arenaskill`,sourcemlb=u2.`source`,evomlb=u2.`evo`,maxhpmlb=u2.`maxhp`,mlbhpmlb=u2.`mlbhp`,aschpmlb=u2.`aschp`,asclandmlb=u2.`ascland`,ascairmlb=u2.`ascair`,ascseamlb=u2.`ascsea`,ascrngmlb=u2.`ascrng`,asccostmlb=u2.`asccost`,ascspdmlb=u1.`ascspd`
}}
+
}}{{#ifexpr: {{#external_value:rarity}}=10 or {{#external_value:rarity}}=11 |
{{#ifexpr: {{#external_value:rarity}}<10 | {{Infobox_Card
+
<tabber>  
||name={{#external_value:name}}
+
Regular Form=  
||fullname={{#external_value:fullname}}
+
||rarity={{#external_value:rarity}}
+
||type={{#external_value:type}}
+
||cost={{#external_value:cost}}
+
||speed={{#external_value:speed}}
+
||range={{#external_value:range}}
+
||ground={{formatnum:{{#external_value:land}}}}
+
||arena={{formatnum:{{#external_value:arena}}}}
+
||air={{formatnum:{{#external_value:air}}}}
+
||sea={{formatnum:{{#external_value:sea}}}}
+
||total={{formatnum:{{#expr: {{#external_value:land|}}+{{#external_value:air|}}+{{#external_value:sea|}} }} }}
+
||ground2={{formatnum:{{#external_value:land2}}}}
+
||air2={{formatnum:{{#external_value:air2}}}}
+
||sea2={{formatnum:{{#external_value:sea2}}}}
+
||arenalb={{formatnum:{{#external_value:arenalb}}}}
+
||total2={{formatnum:{{#expr: {{#external_value:land2|0}}+{{#external_value:air2|0}}+{{#external_value:sea2|0}} }} }}
+
||skill={{#external_value:skill1}}{{#if: {{#external_value:skill2}} | , {{#external_value:skill2}}}}{{#if: {{#external_value:arenaskill}} | , |{{#external_value:arenaskill}}}}
+
||source={{#external_value:source}}
+
|}}
+
|{{Card_artwork|{{#external_value:name}}}} | <tabber>
+
10 Unit =
+
 
{{Infobox_Card
 
{{Infobox_Card
 
|name={{#external_value:name}}
 
|name={{#external_value:name}}
Line 52: Line 31:
 
|arenalb={{formatnum:{{#external_value:arenalb}}}}
 
|arenalb={{formatnum:{{#external_value:arenalb}}}}
 
|total2={{formatnum:{{#expr: {{#external_value:land2|0}}+{{#external_value:air2|0}}+{{#external_value:sea2|0}} }} }}
 
|total2={{formatnum:{{#expr: {{#external_value:land2|0}}+{{#external_value:air2|0}}+{{#external_value:sea2|0}} }} }}
|skill={{#external_value:skill1}}{{#if: {{#external_value:skill2}} | , {{#external_value:skill2}}}}{{#if: {{#external_value:arenaskill}} | , {{#external_value:arenaskill}}}}
+
|skill={{#external_value:skill1}}{{#if: {{#external_value:skill2}} | , {{#external_value:skill2}}}}{{#if: {{#external_value:arenaskill}} | ,<br> {{#external_value:arenaskill}}}}
 
|source={{#external_value:source}}
 
|source={{#external_value:source}}
 +
|evo={{#external_value:evo}}
 +
|maxhp={{formatnum:{{#external_value:maxhp}}}}
 +
|mlbhp={{formatnum:{{#external_value:mlbhp}}}}
 +
|ascland={{formatnum:{{#external_value:ascland}}}}
 +
|ascair={{formatnum:{{#external_value:ascair}}}}
 +
|ascsea={{formatnum:{{#external_value:ascsea}}}}
 +
|asccost={{#external_value:asccost}}
 +
|ascrng={{#external_value:ascrng}}
 +
|aschp={{formatnum:{{#external_value:aschp}}}}
 +
|ascspd={{#external_value:ascspd}}
 
}}
 
}}
{{Card_artwork|{{#external_value:name}}}}{{#clear_external_data:}}
+
{{Card_artwork|{{#external_value:name}}}}
 
+
 
|-|
 
|-|
10 Empowered =
+
Empowered Form=
{{#get_db_data:
+
{{Infobox_Card
db=fantawiki
+
|name={{#external_value:namemlb}}
|from=units
+
|fullname={{#external_value:fullnamemlb}}
|where=name='{{{1}}}_mlb'
+
|rarity={{#external_value:raritymlb}}
|limit=1
+
|type={{#external_value:typemlb}}
|data=name=`name`,fullname=`fullname`,gender=`gender`,rarity=`rarity`,type=`type`,cost=`cost`,speed=`speed`,speednum=`speednum`,range=`range`,land=`land`,air=`air`,sea=`sea`,arena=`arena`,land2=`landlb`,air2=`airlb`,sea2=`sealb`,arenalb=`arenalb`,skill1=`skill1`,skill2=`skill2`,arenaskill=`arenaskill`,source=`source`
+
|cost={{#external_value:costmlb}}
 +
|speed={{#external_value:speedmlb}}
 +
|range={{#external_value:rangemlb}}
 +
|ground={{formatnum:{{#external_value:landmlb}}}}
 +
|arena={{formatnum:{{#external_value:arenamlb}}}}
 +
|air={{formatnum:{{#external_value:airmlb}}}}
 +
|sea={{formatnum:{{#external_value:seamlb}}}}
 +
|total={{formatnum:{{#expr: {{#external_value:landmlb|}}+{{#external_value:airmlb|}}+{{#external_value:seamlb|}} }} }}
 +
|ground2={{formatnum:{{#external_value:land2mlb}}}}
 +
|air2={{formatnum:{{#external_value:air2mlb}}}}
 +
|sea2={{formatnum:{{#external_value:sea2mlb}}}}
 +
|arenalb={{formatnum:{{#external_value:arenalbmlb}}}}
 +
|total2={{formatnum:{{#expr: {{#external_value:land2mlb|0}}+{{#external_value:air2mlb|0}}+{{#external_value:sea2mlb|0}} }} }}
 +
|skill={{#external_value:skill1mlb}}{{#if: {{#external_value:skill2mlb}} | , {{#external_value:skill2mlb}}}}{{#if: {{#external_value:arenaskillmlb}} | ,<br> {{#external_value:arenaskillmlb}}}}
 +
|source={{#external_value:sourcemlb}}
 +
|evo={{#external_value:evomlb}}
 +
|maxhp={{formatnum:{{#external_value:maxhpmlb}}}}
 +
|mlbhp={{formatnum:{{#external_value:mlbhpmlb}}}}
 +
|ascland={{formatnum:{{#external_value:asclandmlb}}}}
 +
|ascair={{formatnum:{{#external_value:ascairmlb}}}}
 +
|ascsea={{formatnum:{{#external_value:ascseamlb}}}}
 +
|asccost={{#external_value:asccostmlb}}
 +
|ascrng={{#external_value:ascrngmlb}}
 +
|aschp={{formatnum:{{#external_value:aschpmlb}}}}
 +
|ascspd={{#external_value:ascspdmlb}}
 
}}
 
}}
{{Infobox_Card
+
{{Card_artwork|{{#external_value:namemlb}}}}{{#clear_external_data:}}
 +
</tabber>
 +
| {{Infobox_Card
 
|name={{#external_value:name}}
 
|name={{#external_value:name}}
 
|fullname={{#external_value:fullname}}
 
|fullname={{#external_value:fullname}}
Line 84: Line 98:
 
|arenalb={{formatnum:{{#external_value:arenalb}}}}
 
|arenalb={{formatnum:{{#external_value:arenalb}}}}
 
|total2={{formatnum:{{#expr: {{#external_value:land2|0}}+{{#external_value:air2|0}}+{{#external_value:sea2|0}} }} }}
 
|total2={{formatnum:{{#expr: {{#external_value:land2|0}}+{{#external_value:air2|0}}+{{#external_value:sea2|0}} }} }}
|skill={{#external_value:skill1}}{{#if: {{#external_value:skill2}} | , {{#external_value:skill2}}}}{{#if: {{#external_value:arenaskill}} | , {{#external_value:arenaskill}}}}
+
|skill={{#external_value:skill1}}{{#if: {{#external_value:skill2}} | , {{#external_value:skill2}}}}{{#if: {{#external_value:arenaskill}} | ,<br> {{#external_value:arenaskill}}}}
 
|source={{#external_value:source}}
 
|source={{#external_value:source}}
 +
|evo={{#external_value:evo}}
 +
|maxhp={{formatnum:{{#external_value:maxhp}}}}
 +
|mlbhp={{formatnum:{{#external_value:mlbhp}}}}
 +
|ascland={{formatnum:{{#external_value:ascland}}}}
 +
|ascair={{formatnum:{{#external_value:ascair}}}}
 +
|ascsea={{formatnum:{{#external_value:ascsea}}}}
 +
|asccost={{#external_value:asccost}}
 +
|ascrng={{#external_value:ascrng}}
 +
|aschp={{formatnum:{{#external_value:aschp}}}}
 +
|ascspd={{#external_value:ascspd}}
 
}}
 
}}
{{Card_artwork|{{#external_value:name}}}}
+
{{Card_artwork|{{#external_value:name}}}}{{#clear_external_data:}} }}</includeonly>
}}
+
</includeonly>
+

Latest revision as of 05:31, 25 January 2019

DO NOT EDIT THIS TEMPLATE UNLESS YOU KNOW WHAT YOU ARE DOING! :D

If you're trying to update stats for a unit, go here instead: http://www.fantasicawiki.com/units.php

Usage: {{Card|CardName}}

Personal tools
Namespaces

Variants
Actions
Menu
Game Menu
Card Lists
Trading
External Resources
Toolbox