Difference between revisions of "Template:Card"

From Yugipedia
Jump to: navigation, search
m (Dinoguy1000 moved page Template:Card/Classic to Template:Card over redirect: move back)
(this is years out of date, needing substantial rewriting to modernize, and pollutes WhatLinksHere for a bunch of stuff, so blank for now)
(Tag: Blanking)
 
Line 1: Line 1:
<!--
 
  
Some editing notes:
 
* variables starting with "@" are for strings (e.g. @attribute, contains the word "Attribute", in the specified language.)
 
* variables starting with "$" are for values that vary between cards (e.g. $attribute, contains the card's actual Attribute.)
 
* variables starting with "%" are temporary variables
 
 
########################## Arrays/variables ###########################
 
 
-->__NOTOC____NOEDITSECTION__<!--
 
-->{{ #vardefine: $name            | {{var|{{{name|}}}|{{ #explode: {{PAGENAME}} | ( }} }} }}<!--
 
-->{{ #vardefine: $card_type      | {{{card_type|}}}                                      }}<!--
 
-->{{ #vardefine: $property        | {{{property|}}}                                      }}<!--
 
-->{{ #vardefine: $attribute      | {{ uc: {{{attribute|}}} }}                            }}<!--
 
-->{{ #arraydefine: $effect_types  | {{{effect_types|}}} | /                              }}<!--
 
-->{{ #vardefine: $type            | {{ #explode: {{{types|}}} | / }}                      }}<!--
 
-->{{ #vardefine: $type2          | {{ #explode: {{{types|}}} | / | 1 }}                  }}<!--
 
-->{{ #vardefine: $type3          | {{ #explode: {{{types|}}} | / | 2 }}                  }}<!--
 
-->{{ #vardefine: $level-rank      | {{ #ifeq: {{ #var: $type2 }} | Xyz | Rank | Level }}  }}<!--
 
-->{{ #vardefine: $stars          | {{var|{{{level|}}}|{{{rank|}}}}}                      }}<!--
 
-->{{ #vardefine: $atk            | {{{atk|}}}                                            }}<!--
 
-->{{ #vardefine: $def            | {{{def|}}}                                            }}<!--
 
-->{{ #vardefine: $password        | {{{password|}}}                                      }}<!--
 
-->{{ #vardefine: $limitation_text | {{{limitation_text|}}}                                }}<!--
 
-->{{ #vardefine: $status          | {{{status|}}}                                        }}<!--
 
-->{{ #vardefine: $ocg_status      | {{{ocg_status|}}}                                    }}<!--
 
-->{{ #vardefine: $database_id    | {{{database_id|}}}                                    }}<!--
 
 
-->{{ #switch: {{ #var: $type2 }}
 
| ?
 
| ???      = {{ #vardefine: $primary_type | blank              }}<!--
 
          -->{{ #vardefine: $type2_page  | {{ #var: $type2 }} }}
 
|          = {{ #vardefine: $primary_type | Normal            }}
 
| Effect
 
| Fusion
 
| Ritual
 
| Synchro
 
| Token
 
| Xyz
 
| Pendulum = {{ #vardefine: $primary_type | {{ #var: $type2 }}        }}<!--
 
          -->{{ #vardefine: $type2_page  | {{ #var: $type2 }} Monster }}
 
 
| Toon
 
| Union    = {{ #vardefine: $primary_type | Effect                    }}<!--
 
          -->{{ #vardefine: $type2_page  | {{ #var: $type2 }} Monster }}
 
| Gemini
 
| Spirit  = {{ #vardefine: $primary_type | Effect                    }}<!--
 
          -->{{ #vardefine: $type2_page  | {{ #var: $type2 }} monster }}
 
| Tuner    = {{ #vardefine: $primary_type | {{ #ifexpr: {{ #if: {{ #arraysize: $effect_types }} | {{ #arraysize: $effect_types }} | 0 }} > 0 | Effect | Normal }} }}<!--
 
          -->{{ #vardefine: $type2_page  | Tuner monster              }}
 
}}<!--
 
 
-->{{ #switch: {{ #var: $type3 }}
 
| Effect  = {{ #vardefine: $type3_page | Effect Monster }}
 
| Tuner    = {{ #vardefine: $type3_page | Tuner monster  }}
 
}}<!--
 
 
-->{{ #vardefine: $star_icon
 
| {{ #iferror: {{ #expr: +{{ #var: $stars }} }}
 
  | [[File:{{ #ifeq: {{ #var: $level-rank }} | Rank | Rank | CG }} Star Unknown.svg|18px|alt=]]
 
  | {{Repeat|[[File:{{ #ifeq: {{ #var: $level-rank }} | Rank | Rank | CG }} Star.svg|18px|alt=]]|{{ #var: $stars }}}}
 
  }}
 
}}<!--
 
 
-->{{ #arraydefine: $languages | <!--
 
  -->{{ #if: {{{fr_image|}}}  {{{fr_sets<includeonly>|</includeonly>}}} | fr,    }}<!--
 
  -->{{ #if: {{{de_image|}}}  {{{de_sets<includeonly>|</includeonly>}}} | de,    }}<!--
 
  -->{{ #if: {{{it_image|}}}  {{{it_sets<includeonly>|</includeonly>}}} | it,    }}<!--
 
  -->{{ #if: {{{pt_image|}}}  {{{pt_sets<includeonly>|</includeonly>}}} | pt,    }}<!--
 
  -->{{ #if: {{{es_image|}}}  {{{es_sets<includeonly>|</includeonly>}}} | es,    }}<!--
 
  -->{{ #if: {{{ja_image|}}}  {{{ja_sets<includeonly>|</includeonly>}}} | ja,    }}<!--
 
  -->{{ #if: {{{ja-en_image<includeonly>|</includeonly>}}}              | ja-en, }}<!--
 
  -->{{ #if: {{{zh_image|}}}  {{{zh_sets<includeonly>|</includeonly>}}} | zh,    }}<!--
 
  -->{{ #if: {{{ko_image|}}}  {{{ko_sets<includeonly>|</includeonly>}}} | ko,    }}
 
  | , | unique
 
}}<!--
 
 
-->{{ #arrayprint: $languages
 
|
 
| $ln
 
| <!--
 
  -->{{ #vardefine: $ln_name  | {{{$ln_name}}}  }}<!--
 
  -->{{ #vardefine: $ln_lore  | {{{$ln_lore}}}  }}<!--
 
  -->{{ #vardefine: $ln_image | {{{$ln_image}}} }}
 
}}<!--
 
 
-->{{ #arraydefine: $set_languages | <!--
 
  -->{{ #if: {{{en_sets<includeonly>|</includeonly>}}} | en, }}<!--
 
  -->{{ #if: {{{fr_sets<includeonly>|</includeonly>}}} | fr, }}<!--
 
  -->{{ #if: {{{de_sets<includeonly>|</includeonly>}}} | de, }}<!--
 
  -->{{ #if: {{{it_sets<includeonly>|</includeonly>}}} | it, }}<!--
 
  -->{{ #if: {{{pt_sets<includeonly>|</includeonly>}}} | pt, }}<!--
 
  -->{{ #if: {{{es_sets<includeonly>|</includeonly>}}} | es, }}<!--
 
  -->{{ #if: {{{ja_sets<includeonly>|</includeonly>}}} | ja, }}<!--
 
  -->{{ #if: {{{ae_sets<includeonly>|</includeonly>}}} | ae, }}<!--
 
  -->{{ #if: {{{zh_sets<includeonly>|</includeonly>}}} | zh, }}<!--
 
  -->{{ #if: {{{ko_sets<includeonly>|</includeonly>}}} | ko, }}
 
  | , | unique
 
}}<!--
 
 
-->{{Card strings}}<!--
 
 
-->{{ #if: {{NAMESPACE}} || {{Card/Classic/error checking and properties}} }}<!--
 
 
############################# Begin visible content #############################
 
 
--><div class="hlist" style="text-align: center;">
 
* {{Related page link | Card Gallery    | {{{name|}}} | label = {{ #var: @gallery }}    }}
 
* {{Related page link | Card Rulings    | {{{name|}}} | label = {{ #var: @rulings }}    }}
 
* {{Related page link | Card Errata      | {{{name|}}} | label = {{ #var: @errata }}      }}
 
* {{Related page link | Card Tips        | {{{name|}}} | label = {{ #var: @tips }}        }}
 
* {{Related page link | Card Appearances | {{{name|}}} | label = {{ #var: @appearances }} }}
 
* {{Related page link | Card Trivia      | {{{name|}}} | label = {{ #var: @trivia }}      }}
 
* {{Related page link | Card Lores      | {{{name|}}} | label = {{ #var: @lores }}      }}
 
* {{Related page link | Card Artworks    | {{{name|}}} | label = {{ #var: @artworks }}    }}
 
* {{Related page link | Card Names      | {{{name|}}} | label = {{ #var: @names }}      }}
 
* {{Related page link | Card Sets        | {{{name|}}} | label = {{ #var: @sets }}        }}
 
</div><!--
 
 
-->{{ #vardefine: $bodyclass | {{ #if: {{{cardclass|}}}
 
    | {{{cardclass}}}
 
    | {{ #if: {{{card_type|}}}
 
      | {{ lc: {{{card_type|}}} }}
 
      | {{ #if: {{{types|}}}
 
        | {{ lc: {{ #var: $primary_type }} }}
 
        | blank
 
      }}
 
    }}
 
  }}-card
 
}}
 
== Card details ==
 
{{Card table
 
| bodyclass    = {{ #var: $bodyclass }}
 
| title        = {{ #var: $name }}
 
| image        = {{var|{{{image|}}}|{{var|{{{ja_image|}}}|Back-EN.png}} }}
 
| below_image  =
 
* {{Related page link | Card Gallery    | {{{name|}}} | label = {{ #var: @gallery }}    }}
 
* {{Related page link | Card Artworks    | {{{name|}}} | label = {{ #var: @artworks }}    }}
 
 
| above        = {{Japanese names<!--
 
  -->| {{{ja_name<includeonly>|</includeonly>}}}<!--
 
  -->| {{{romaji_name<includeonly>|</includeonly>}}}<!--
 
  -->| {{{trans_name<includeonly>|</includeonly>}}}<!--
 
  -->}}
 
 
| label1      = Card type
 
| data1        = {{ #if: {{{card_type<includeonly>|</includeonly>}}} | [[{{{card_type}}} Card]] }}
 
 
| label2      = [[Property]]
 
| data2        = {{ #if: {{And|{{{property<includeonly>|</includeonly>}}}|{{{card_type<includeonly>|</includeonly>}}}}}
 
  | [[{{{property}}} {{{card_type}}} Card|{{{property}}}]] [[File:{{{property}}}.svg|x25px|alt=]]
 
  }}
 
 
| label3      = [[Attribute]]
 
| data3        = {{ #if: {{{card_type|}}} || [[{{ #var: $attribute | ??? }}]] [[File:{{ #var: {{ lc: @{{ #var: $attribute | ??? }} icon }} }}|x25px|alt=]] }}
 
 
| label4      = [[{{ #var: $level-rank }}]]
 
| data4        = {{ #if: {{{card_type|}}} || {{ #var: $stars | ??? }} {{ #var: $star_icon }} }}
 
 
| label5      = [[Type|Type(s)]]
 
| data5        = {{ #if: {{{card_type|}}} || {{Card/Classic/types}} }}
 
 
| label6      = [[ATK]]/[[DEF]]
 
| data6        = {{ #if: {{{card_type|}}} || {{ #var: $atk | ??? }} / {{ #var: $def | ??? }} }}
 
 
| label7      = Effect type(s)
 
| class7      = hlist hcomma
 
| data7        = {{ #if: {{{effect_types|}}}
 
  | {{CardTable2/effect
 
    | {{{effect_types}}}
 
    | {{{card_type|}}}
 
    }}<!-- Rename this template later -->
 
  }}
 
 
| data8        = {{Card/Classic/lore
 
  | card      = {{{name|}}}
 
  | lore_links = true
 
  | lore      = {{{lore<includeonly>|</includeonly>}}}
 
  | material  = {{{material<includeonly>|</includeonly>}}}
 
  | type      = {{ #var: $primary_type }}
 
  }}
 
 
| label9      = {{ #if: {{{password<includeonly>|</includeonly>}}} | [[Password]] | [[Limitation Text]] }}
 
| data9        = {{ #if: {{{password<includeonly>|</includeonly>}}}
 
  | [[{{{password}}}]]
 
  | {{{limitation_text|}}}
 
  }}
 
 
| label10      = Status
 
| data10      = {{ #if: {{{status<includeonly>|</includeonly>}}}
 
  |
 
<div class="list-noicon">
 
* [[Advanced Format status::{{{status}}}]]{{ #ifeq: {{{status}}} | Forbidden |
 
* [[Traditional Format status::Limited]] ([[Traditional Format|Traditional]])
 
    | [[Traditional Format status::{{{status}}}| ]]
 
    }}{{ #if: {{{ocg_status|}}} |
 
* [[OCG status::{{{ocg_status}}}]] (''[[Yu-Gi-Oh! Official Card Game|OCG]]'')
 
    | [[OCG status::{{{status}}}| ]]
 
    }}
 
</div>
 
  }}
 
 
| label11      = Database
 
| data11      = {{ #if: {{{database_id<includeonly>|</includeonly>}}} | {{{database_id}}} ({{ #arraydefine: $database_ln
 
  | {{ #if: {{{ja_sets<includeonly>|</includeonly>}}} | ja,
 
    }}{{ #if: {{{en_sets<includeonly>|</includeonly>}}} | en,
 
    }}{{ #if: {{{fr_sets<includeonly>|</includeonly>}}} | fr,
 
    }}{{ #if: {{{de_sets<includeonly>|</includeonly>}}} | de,
 
    }}{{ #if: {{{it_sets<includeonly>|</includeonly>}}} | it,
 
    }}{{ #if: {{{es_sets<includeonly>|</includeonly>}}} | es }}
 
  | ,
 
  | unique
 
  }}{{ #arrayprint: $database_ln
 
  | ,&#32;
 
  | $ln
 
  | [https://www.db.yugioh-card.com/yugiohdb/card_search.action?ope=2&cid={{{database_id}}}&request_locale=$ln $ln]
 
  }}) }}
 
 
}}<!--
 
 
-->{{ #ifexpr: {{ #if: {{ #arraysize: $set_languages }} | {{ #arraysize: $set_languages }} | 0 }} > 0 | &#32;
 
== Sets==
 
  {{ #tag: tabber
 
  | {{ #arrayprint: $set_languages
 
    |
 
    | $card_set_ln
 
    | {{!-!}} $card_set_ln =
 
      {{Card table set/header|$card_set_ln}}
 
      {{{$card_set_ln_sets}}}
 
      {{Card table set/footer}}
 
    }}
 
  }}
 
}}
 
 
<!--
 
none of this is finalized yet
 
-->
 
{{ #if: {{{supports|}}}{{{anti-supports|}}}{{{archseries|}}}{{{supports_archetypes|}}}{{{anti-supports_archetypes|}}}{{{related_to_archseries|}}}{{{counter|}}}{{{action|}}}{{{stat_change|}}}{{{m/s/t|}}}{{{summoning|}}}{{{attack|}}}{{{banished|}}}{{{life_points|}}}{{{fm_for|}}}{{{sm_for|}}}{{{misc<includeonly>|</includeonly>}}} | &#32;
 
==Search categories==
 
  {{Search categories
 
  | supports                = {{{supports<includeonly>|</includeonly>}}}
 
  | anti-supports            = {{{anti-supports<includeonly>|</includeonly>}}}
 
  | archseries              = {{{archseries<includeonly>|</includeonly>}}}
 
  | supports_archetypes      = {{{supports_archetypes<includeonly>|</includeonly>}}}
 
  | anti-supports_archetypes = {{{anti-supports_archetypes<includeonly>|</includeonly>}}}
 
  | related_to_archseries    = {{{related_to_archseries<includeonly>|</includeonly>}}}
 
  | counter                  = {{{counter<includeonly>|</includeonly>}}}
 
  | action                  = {{{action<includeonly>|</includeonly>}}}
 
  | stat_change              = {{{stat_change<includeonly>|</includeonly>}}}
 
  | m/s/t                    = {{{m/s/t<includeonly>|</includeonly>}}}
 
  | summoning                = {{{summoning<includeonly>|</includeonly>}}}
 
  | attack                  = {{{attack<includeonly>|</includeonly>}}}
 
  | banished                = {{{banished<includeonly>|</includeonly>}}}
 
  | life_points              = {{{life_points<includeonly>|</includeonly>}}}
 
  | fm_for                  = {{{fm_for<includeonly>|</includeonly>}}}
 
  | sm_for                  = {{{sm_for<includeonly>|</includeonly>}}}
 
  | misc                    = {{{misc<includeonly>|</includeonly>}}}
 
  }}
 
}}
 
 
<nomobile>{{ #ifexpr: {{ #if: {{ #arraysize: $languages }} | {{ #arraysize: $languages }} | 0 }} > 0 |
 
== Other languages ==
 
  {{ #tag: tabber |
 
    {{ #arrayprint: $languages
 
    |
 
    | $ln
 
    | {{!-!}} $ln = {{Card strings/$ln}}<!--
 
      -->{{Card table
 
      | bodyclass    = {{ #var: $bodyclass }}
 
      | title        = {{var | {{ #var: $ln_name  }} | {{ #var: $name    }} }}
 
      | image        = {{var | {{ #var: $ln_image }} | {{ #var: @backing }} }}
 
 
      | label1      = {{ #var: @card type }}
 
      | data1        = {{ #if: {{ #var: $card_type }}
 
        | [[{{ #var: $card_type }} Card|{{ #var: @{{ lc: {{ #var: $card_type }} }} }}]]
 
        }}
 
 
      | label2      = [[Property|{{ #var: @property }}]]
 
      | data2        = {{ #if: {{ #var: $property }}
 
        | {{ #if: {{ #var: $card_type }}
 
          | [[{{ #var: $property }} {{ #var: $card_type }} Card|{{ #var: @{{ lc: {{ #var: $property }} }} }}]] <!--
 
            -->[[File:{{ #var: $property }}.svg|x25px|alt=]]
 
          }}
 
        }}
 
 
      | label3      = [[Attribute|{{ #var: @attribute }}]]
 
      | data3        = {{ #if: {{ #var: $card_type }}
 
        || [[{{ #var: $attribute | ??? }}|{{ #if: {{ #var: $attribute }} | {{ #var: @{{ lc: {{ #var: $attribute }} }} }} | ??? }}]] <!--
 
          -->[[File:{{ #if: {{ #var: $attribute }} | {{ #var: @{{ lc: {{ #var: $attribute }} }} icon }} | UNKNOWN.svg }}|x25px|alt=]]
 
        }}
 
 
      | label4      = [[{{ #var: $level-rank }}|{{ #var: @{{ lc: {{ #var: $level-rank }} }} }}]]
 
      | data4        = {{ #if: {{ #var: $card_type }} || {{ #var: $stars | ??? }} {{ #var: $star_icon }} }}
 
 
      | label5      = [[Type|{{ #var: @type }}]]
 
      | data5        = {{ #if: {{ #var: $card_type }} || {{Card/Classic/types|ln=$ln}} }}
 
 
      | label6      = [[ATK]]/[[DEF]]
 
      | data6        = {{ #if: {{ #var: $card_type }} || {{ #var: $atk | ??? }} / {{ #var: $def | ??? }} }}
 
 
      | label7      = {{ #var: @effect type }}
 
      | data7        = {{ #if: {{{effect_types|}}}
 
        | {{CardTable2/effect
 
          | {{ lc: {{{effect_types}}} }}
 
          | {{ #var: $card_type }}
 
          }}<!-- Rename this template later -->
 
        }}
 
 
      | data8      = {{Card/Classic/lore
 
        | lore    = {{ #var: $ln_lore}}
 
        | material = {{{material<includeonly>|</includeonly>}}}
 
        | type    = {{ #var: $primary_type }}
 
        | lang    = {{lang|$ln}}
 
        }}
 
 
      | label9    = {{ #if: {{ #var: $password }}
 
        | [[Password|{{ #var: @password }}]]
 
        | [[Limitation Text|{{ #var: @limitation text }}]]
 
        }}
 
      | data9      = {{ #if: {{ #var: $password }}
 
        | [[{{ #var: $password }}]]
 
        | {{ #if: {{ #var: @{{ lc: {{ #var: $limitation_text }} }} }}
 
          | {{ #var: @{{ lc: {{ #var: $limitation_text }} }} }}
 
          | {{ #var: $limitation_text }}
 
          }}
 
        }}
 
 
      | label10      = {{ #var: @status }}
 
      | data10      = {{ #if: {{ #var: $status }}
 
        |
 
<div class="list-noicon">
 
* [[{{ #var: $status }}|{{ #var: @{{ lc: {{ #var: $status }} }} }}]]{{ #ifeq: {{ #var: $status }} | Forbidden |
 
* [[Limited|{{ #var: @limited }}]] ([[Traditional Format|{{ #var: @traditional }}]])
 
          }}{{ #if: {{ #var: $ocg_status }} |
 
* [[{{ #var: $ocg_status }}|{{ #var: @{{ lc: {{ #var: $ocg_status }} }} }}]] (''[[Yu-Gi-Oh! Official Card Game|OCG]]'')
 
          }}
 
</div>
 
        }}
 
 
      }}<!-- card table -->
 
    }}<!-- #arrayprint -->
 
  }}<!-- #tag: tabber -->
 
}}<!-- #if: arraysize
 
 
--></nomobile><includeonly>{{
 
  #if: {{{image|}}}
 
  || [[Category:OCG/TCG card pages needing an English card image]]<!-- TODO: better category name? -->
 
}}{{
 
  #if: {{{lore|}}}
 
  || [[Category:OCG/TCG card pages needing an English card lore]]<!-- TODO: better category name? -->
 
}}</includeonly><!-- TODO: other languages --><!--
 
 
--><noinclude>
 
 
{{documentation}}</noinclude>
 

Latest revision as of 16:37, 21 April 2019