Difference between revisions of "Template:Transient list table result format"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
(remove debug cell)
(add debug cell)
Line 9: Line 9:
   }}{{#ifeq: {{#var:show base stats}} | y | <td>{{{?Has hp value}}}</td><td>{{{?Has atk value}}}</td>
   }}{{#ifeq: {{#var:show base stats}} | y | <td>{{{?Has hp value}}}</td><td>{{{?Has atk value}}}</td>
   }}{{#ifeq: {{#var:show stats at lv}} | 0 | | <td>{{#expr:{{{?Has hp value}}}+{{{?Has hp growth value}}}*{{#var:show stats at lv}} round 0}}</td><td>{{#expr:{{{?Has atk value}}}+{{{?Has atk growth value}}}*{{#var:show stats at lv}} round 0}}</td>
   }}{{#ifeq: {{#var:show stats at lv}} | 0 | | <td>{{#expr:{{{?Has hp value}}}+{{{?Has hp growth value}}}*{{#var:show stats at lv}} round 0}}</td><td>{{#expr:{{{?Has atk value}}}+{{{?Has atk growth value}}}*{{#var:show stats at lv}} round 0}}</td>
   }}{{#if: <!-- vardefine skills and match them -->
   }}{{#if:
    <!-- vardefine skills and match them -->
     {{#vardefine:counter|0}}
     {{#vardefine:counter|0}}
     {{#arraydefine: stage|{{{?Has base skill stage}}}|###}}
     {{#arraydefine: stage|{{{?Has base skill stage}}}|###}}
Line 41: Line 42:
   <td>{{#ifeq: {{#expr:{{#var:counter}} > 3 }} | 1 |{{#ifeq: {{#var:base skill 3 subobj}} | - | {{#var:base skill 3 name}} | [[{{#var:base skill 3 subobj}}|{{#var:base skill 3 name}}]] }} {{#ifeq: {{#var:show skill description}} | y | / {{#var:base skill 3 desc}} }} | N/A }}</td>
   <td>{{#ifeq: {{#expr:{{#var:counter}} > 3 }} | 1 |{{#ifeq: {{#var:base skill 3 subobj}} | - | {{#var:base skill 3 name}} | [[{{#var:base skill 3 subobj}}|{{#var:base skill 3 name}}]] }} {{#ifeq: {{#var:show skill description}} | y | / {{#var:base skill 3 desc}} }} | N/A }}</td>
   }}{{#ifeq: {{#var:show charge skill}} | y | <td>[[{{{?Has charge skill pattern}}}|50px]]</td><td>{{{?Has charge skill name|}}} {{#ifeq: {{#var:show skill description}} | y |/ {{{?Has charge skill desc|}}} }}</td>
   }}{{#ifeq: {{#var:show charge skill}} | y | <td>[[{{{?Has charge skill pattern}}}|50px]]</td><td>{{{?Has charge skill name|}}} {{#ifeq: {{#var:show skill description}} | y |/ {{{?Has charge skill desc|}}} }}</td>
   }}{{#ifeq: {{#var:show illustrator}} | y | <td>{{#if:{{{?Has illustrator name|}}}|{{#if:{{{?Has illustrator subobj|}}}|[[{{{?Has illustrator subobj}}}|{{{?Has illustrator name}}}]]|{{{?Has illustrator name}}}}}|&mdash;&mdash;}}</td>
   }}<td>DEBUG
 
Has illustrator subobj: {{{?Has illustrator subobj}}}
 
Has illustrator name: {{{?Has illustrator name}}}
 
END</td>{{#ifeq: {{#var:show illustrator}} | y | <td>{{#if:
    <!-- match illustrator subobj with names -->
    {{#vardefine:counter|0}}
    {{#arraydefine: illustrator|{{{?Has illustrator name}}}|###}}
    {{#arrayprint: illustrator
    |
    |@@@
    |{{#vardefine:base skill @@@ subobj|{{#explode:{{{?Has base skill subobj}}}|###| {{#var:counter}} }} }}
    {{#vardefine:base skill @@@ name|{{#explode:{{{?Has base skill en name}}}|###| {{#var:counter}} }} }}
    {{#vardefine:base skill @@@ desc|{{#explode:{{{?Has base skill desc}}}|###| {{#var:counter}} }} }}
    {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
    }}
 
 
 
  }}
 
 
 
 
 
{{#if:{{{?Has illustrator name|}}}|{{#if:{{{?Has illustrator subobj|}}}|[[{{{?Has illustrator subobj}}}|{{{?Has illustrator name}}}]]|{{{?Has illustrator name}}}}}|&mdash;&mdash;}}</td>
   }}{{#ifeq: {{#var:show scenario writer}} | y | <td>{{#if:{{{?Has scenario writer name|}}}|{{#if:{{{?Has scenario writer subobj|}}}|[[{{{?Has scenario writer subobj}}}|{{{?Has scenario writer name}}}]]|{{{?Has scenario writer name}}}}}|&mdash;&mdash;}}</td>
   }}{{#ifeq: {{#var:show scenario writer}} | y | <td>{{#if:{{{?Has scenario writer name|}}}|{{#if:{{{?Has scenario writer subobj|}}}|[[{{{?Has scenario writer subobj}}}|{{{?Has scenario writer name}}}]]|{{{?Has scenario writer name}}}}}|&mdash;&mdash;}}</td>
   }}{{#ifeq: {{#var:show voice actor}} | y | <td>{{#if:{{{?Has voice actor name|}}}|{{#if:{{{?Has voice actor subobj|}}}|[[{{{?Has voice actor subobj}}}|{{{?Has voice actor name}}}]]|{{{?Has voice actor name}}}}}|&mdash;&mdash;}}</td>}}
   }}{{#ifeq: {{#var:show voice actor}} | y | <td>{{#if:{{{?Has voice actor name|}}}|{{#if:{{{?Has voice actor subobj|}}}|[[{{{?Has voice actor subobj}}}|{{{?Has voice actor name}}}]]|{{{?Has voice actor name}}}}}|&mdash;&mdash;}}</td>}}

Revision as of 03:07, 13 April 2017

Description

This template creates a table row using query results. Used by Template:Companion list.