Changes

Jump to: navigation, search

Template:CardTable2

136 bytes removed, 28 days ago
optimize debut date queries and reuse the OCG/TCG debut date for the overall debut date for OCG/TCG cards; use {{Types}}
}}<!--
-->{{ #vardefine: $non-en-sets-heading | {{ #if: {{ #var: $tcg-en }} | Sets in other languages | Sets }} }}<!--
 
# Overall debut date
-->{{ #vardefine: $debut_date | {{SMW plain|{{ #ask: [[Release::OCG||TCG||Yu-Gi-Oh! Rush Duel]][[Has subobject.Set contains::{{PAGENAME}}]][[Release date::+]]
|?Release date#
| sort = Release date
| mainlabel = -
| limit = 1
| searchlabel =
| template = echo
}}
}}
}}<!--
# TCG and TCG Speed Duel debut dates
| {{ #vardefine: $tcg_debut_date
| {{SMW plain
|{{ #ask: [[Release::TCG]][[Has subobject.Set contains::{{PAGENAME}}]][[Release::TCG]][[Release date::+]]
|?Release date#
| sort = Release date
-->{{ #vardefine: $tcg_sd_debut_date
| {{SMW plain
|{{ #ask: [[Set page.Format::Speed Duel]][[Has subobject.Set contains::{{PAGENAME}}]][[Set page.Format::Speed Duel]][[Release date::+]]
|?Release date#
| sort = Release date
| {{ #vardefine: $ocg_debut_date
| {{SMW plain
|{{ #ask: [[Release::OCG]][[Has subobject.Set contains::{{PAGENAME}}]][[Release::OCG]][[Release date::+]]
|?Release date#
| sort = Release date
}}
}}<!--
 
# Overall debut date
-->{{ #vardefine: $debut_date | {{ #if: {{ #var: $ocg_debut_date }}{{ #var: $tcg_debut_date }}
| {{ #ifexpr: {{ #time: U | {{ #var: $ocg_debut_date | today + 10 years }} }} < {{ #time: U | {{ #var: $tcg_debut_date | today + 10 years }} }}
| {{ #var: $ocg_debut_date }}
| {{ #var: $tcg_debut_date }}
}}
| {{SMW plain|{{ #ask: [[Has subobject.Set contains::{{PAGENAME}}]][[Release::OCG<!-- RD card lists are currently tagged as "OCG" -->||Yu-Gi-Oh! Rush Duel]][[Release date::+]]
|?Release date#
| sort = Release date
| mainlabel = -
| limit = 1
| searchlabel =
| template = echo
}}
}}
}} }}<!--
-->{{ #vardefine: $card_type | {{ ucfirst: {{ #replace: {{ lc: {{{card_type<includeonly>|</includeonly>}}} }} | card }} }} }}<!--
-->{{ #arraydefine: $types | {{{types<includeonly>|</includeonly>}}} | / }}<!--
-->{{ #arraydefine: @type_list | Aqua, Beast, Beast-Warrior, Celestial Warrior<!-- RD/English -->, Creator God, Cyberse, Cyborg<!-- RD/unofficial English -->, Dinosaur, Divine-Beast, Dragon, Fairy, Fiend, Fish, Galaxy<!-- RD/unofficial? English -->, High Dragon<!-- RD/unofficial English -->, Illusion, Insect, Machine, Magical Knight<!-- RD/unofficial English -->, Omega Psychic<!-- RD/unofficial English -->, Plant, Psychic, Pyro, Reptile, Rock, Sea Serpent, Spellcaster, Thunder, Warrior, Winged Beast, Wyrm, Zombie{{Types|all}}, ? }}<!--
-->{{ #vardefine: $type | {{ #arrayindex: $types | 0 }} }}<!-- assume that the first item in {{{types}}} is the monster's Type
-->{{ #vardefine: $valid_type | {{ #arraysearch: @type_list | {{ #var: $type }} }} }}<!--

Navigation menu