Difference between revisions of "Template:List"
From Unofficial Fantasica Wiki
(Testing list row template that calls on db) |
m (Trying to fix arena calc) |
||
Line 4: | Line 4: | ||
|where=name='{{PAGENAME}}' | |where=name='{{PAGENAME}}' | ||
|limit=1 | |limit=1 | ||
− | |data=name=`name`,gender=`gender`,rarity=`rarity`,type=`type`,cost=`cost`,speed=`speed`,speednum=`speednum`,range=`range`,land=`land`,air=`air`,sea=`sea`,land2=`landlb`,air2=`airlb`,sea2=`sealb`,skill1=`skill1`,skill2=`skill2`,source=`source | + | |data=name=`name`,gender=`gender`,rarity=`rarity`,type=`type`,cost=`cost`,speed=`speed`,speednum=`speednum`,range=`range`,land=`land`,air=`air`,sea=`sea`,land2=`landlb`,air2=`airlb`,sea2=`sealb`,skill1=`skill1`,skill2=`skill2`,source=`source` |
}} | }} | ||
{{List_row_base | {{List_row_base | ||
|name={{#external_value:name}} | |name={{#external_value:name}} | ||
+ | |rarity={{#external_value:rarity}} | ||
|type={{#external_value:type}} | |type={{#external_value:type}} | ||
|cost={{#external_value:cost}} | |cost={{#external_value:cost}} | ||
Line 17: | Line 18: | ||
|sea={{#external_value:sea}} | |sea={{#external_value:sea}} | ||
|total={{#expr: {{#external_value:land|0}}+{{#external_value:air|0}}+{{#external_value:sea|0}} }} | |total={{#expr: {{#external_value:land|0}}+{{#external_value:air|0}}+{{#external_value:sea|0}} }} | ||
− | |arena={{# | + | |arena={{#iferror: {{#expr:trunc((1-({{{rarity|1}}})^2/100)*(floor(1.2*{{#if: {{{ground|1}}}>{{{air|1}}} | {{#if: {{{ground|1}}}>{{{sea|1}}} | {{{ground|1}}} | {{{sea|1}}} }} | {{#if: {{{air|1}}} > {{{sea|1}}} | {{{air|1}}} | {{{sea|1}}} }} }}+0.5)+floor(1.2*({{{total|1}}} - {{#if: {{{ground|1}}}>{{{air|1}}} | {{#if: {{{ground|1}}}>{{{sea|1}}} | {{{ground|1}}} | {{{sea|1}}} }} | {{#if: {{{air|1}}} > {{{sea|1}}} | {{{air|1}}} | {{{sea|1}}} }} }} - {{#if: {{{ground|1}}}>{{{air|1}}} | {{#if: {{{sea|1}}}>{{{air|1}}} | {{{air|1}}} | {{{sea|1}}} }} | {{#if: {{{ground|1}}} > {{{sea|1}}} | {{{sea|1}}} | {{{ground|1}}} }} }}+0.5))))}}|0}} |
|skill={{#external_value:skill1}}{{#if: {{#external_value:skill2}} | , {{#external_value:skill2}}}} | |skill={{#external_value:skill1}}{{#if: {{#external_value:skill2}} | , {{#external_value:skill2}}}} | ||
|source={{#external_value:source}} | |source={{#external_value:source}} | ||
}}</includeonly> | }}</includeonly> |
Revision as of 02:49, 8 August 2013
Usage: {{List|UnitName}}