Template:GymLeaderInfo: Difference between revisions

From Pokemon Revolution Online Wiki
Jump to navigation Jump to search
Removed looping for each Pokemon moveset and iteratively added in each move, instead; there would be an excessive amount of looping, otherwise.
Will need to optimizingly cache this if we're going to plug in SInnoh''s gym-leaders, lest there's an inordinacy of data calls for move data on the same page. Testing this out.
Line 28: Line 28:
</tr>
</tr>
<tr style="background-color:#FFFFFF; color:#000000;">
<tr style="background-color:#FFFFFF; color:#000000;">
{{#get_web_data:url=http://prowiki.info/index.php?title=Special:GetData/RawMovesList|format=CSV with header|filters=Name={{#arrayindex:moves|0}}|data=technique=Name,movetype=Type,category=Category,power=Power,accuracy=Accuracy,pp=PP,broken=Broken,typeless=Typeless}}
{{#iferror:{{#external_value:technique-{{#arrayindex:moves|0}}}}|{{#get_web_data:url=http://prowiki.info/index.php?title=Special:GetData/RawMovesList|format=CSV with header|filters=Name={{#arrayindex:moves|0}}|data=technique-{{#arrayindex:moves|0}}=Name,movetype-{{#arrayindex:moves|0}}=Type,category-{{#arrayindex:moves|0}}=Category,power-{{#arrayindex:moves|0}}=Power,accuracy-{{#arrayindex:moves|0}}=Accuracy,broken-{{#arrayindex:moves|0}}=Broken,typeless-{{#arrayindex:moves|0}}=Typeless}}|}}
<td><span style="{{#ifeq: {{#external_value:category}} | Status | | {{#ifeq:{{#external_value:typeless}} | N | {{#ifeq:{{#external_value:type1}} | {{#external_value:movetype}} | font-weight: bold; | {{#ifeq: {{#external_value:type2}} | {{#external_value:movetype}} | font-weight: bold;}} }} }} }}  {{#ifeq:{{#external_value:broken}} | Y | font-style: italic;}}">[[{{#external_value:technique}}]]</span></td>
<td><span style="{{#ifeq: {{#external_value:category-{{#arrayindex:moves|0}}}} | Status | | {{#ifeq:{{#external_value:typeless-{{#arrayindex:moves|0}}}} | N | {{#ifeq:{{#external_value:type1}} | {{#external_value:movetype-{{#arrayindex:moves|0}}}} | font-weight: bold; | {{#ifeq: {{#external_value:type2}} | {{#external_value:movetype-{{#arrayindex:moves|0}}}} | font-weight: bold;}} }} }} }}  {{#ifeq:{{#external_value:broken-{{#arrayindex:moves|0}}}} | Y | font-style: italic;}}">[[{{#external_value:technique-{{#arrayindex:moves|0}}}}]]</span></td>
<td style="background-color: #{{{{#external_value:movetype}}_color}};">[[{{#external_value:movetype}}_(type)|<span style="color:#FFFFFF;">{{#external_value:movetype}}</span>]]</td>
<td style="background-color: #{{{{#external_value:movetype-{{#arrayindex:moves|0}}}}_color}};">[[{{#external_value:movetype-{{#arrayindex:moves|0}}}}_(type)|<span style="color:#FFFFFF;">{{#external_value:movetype-{{#arrayindex:moves|0}}}}</span>]]</td>
<td style="background-color:#{{{{#external_value:category}}_color}};">[[{{#external_value:category}} Moves|<span style="color:#FFFFFF;">{{#external_value:category}}</span>]]</td>
<td style="background-color:#{{{{#external_value:category}}-{{#arrayindex:moves|0}}_color}};">[[{{#external_value:category}}-{{#arrayindex:moves|0}} Moves|<span style="color:#FFFFFF;">{{#external_value:category}}-{{#arrayindex:moves|0}}</span>]]</td>
<td>{{#if:{{#external_value:power}} | {{#external_value:power}} | — }}</td>
<td>{{#if:{{#external_value:power}}-{{#arrayindex:moves|0}} | {{#external_value:power}}-{{#arrayindex:moves|0}} | — }}</td>
<td>{{#external_value:accuracy}}</td>
<td>{{#external_value:accuracy}}-{{#arrayindex:moves|0}}</td>
</tr>
</tr>
<tr style="background-color:#FFFFFF; color:#000000;">
<tr style="background-color:#FFFFFF; color:#000000;">

Revision as of 22:39, 18 August 2017