Difference between revisions of "Template:Rarity"
Dinoguy1000 (talk | contribs) (shatterfoil Rare) |
Dinoguy1000 (talk | contribs) (rm the need to include "Rare" when providing a rarity name (except for the obvious case of "Rare" itself); make Common/C the default case) |
||
Line 1: | Line 1: | ||
− | {{ | + | {{ #switch: {{ #replace: {{ lc: {{{1}}} }} | {{ #ifeq: {{ lc: {{{1}}} }} | rare || rare }} }} |
− | + | | c | common | #default = {{ #if: {{{full|}}} | Common | C }} | |
− | | c | common | + | | nr | normal = {{ #if: {{{full|}}} | Normal Rare | NR }} |
− | | nr | normal | + | | sp | short print = {{ #if: {{{full|}}} | Short Print | SP }} |
− | | sp | short print | + | | ssp | super short print = {{ #if: {{{full|}}} | Super Short Print | SSP }} |
− | | ssp | super short print | + | | hfr | holofoil = {{ #if: {{{full|}}} | Holofoil Rare | HFR }} |
− | | hfr | holofoil | + | | r | rare = {{ #if: {{{full|}}} | Rare | R }} |
− | | r | rare | + | | sr | super = {{ #if: {{{full|}}} | Super Rare | SR }} |
− | | sr | super | + | | ur | ultra = {{ #if: {{{full|}}} | Ultra Rare | UR }} |
− | | ur | ultra | + | | utr | ultimate = {{ #if: {{{full|}}} | Ultimate Rare | UtR }} |
− | | utr | ultimate | + | | gr | ghost = {{ #if: {{{full|}}} | Ghost Rare | GR }} |
− | | gr | ghost | + | | hgr | holographic = {{ #if: {{{full|}}} | Holographic Rare | HGR }} |
− | | hgr | holographic | + | | scr | secret = {{ #if: {{{full|}}} | Secret Rare | ScR }} |
− | | scr | secret | + | | pscr | prismatic secret = {{ #if: {{{full|}}} | Prismatic Secret Rare | PScR }} |
− | | pscr | prismatic secret | + | | uscr | ultra secret = {{ #if: {{{full|}}} | Ultra Secret Rare | UScR }} |
− | | uscr | ultra secret | + | | scur | secret ultra = {{ #if: {{{full|}}} | Secret Ultra Rare | ScUR }} |
− | | scur | secret ultra | + | | escr | extra secret = {{ #if: {{{full|}}} | Extra Secret Rare | EScR }} |
− | | escr | extra secret | + | | plscr | platinum secret = {{ #if: {{{full|}}} | Platinum Secret Rare | PlScR }} |
− | | plscr | platinum secret | + | | pr | parallel = {{ #if: {{{full|}}} | Parallel Rare | PR }} |
− | | pr | parallel | + | | pc | parallel common = {{ #if: {{{full|}}} | Parallel Common | PC }} |
− | | pc | parallel common | + | | npr | normal parallel = {{ #if: {{{full|}}} | Normal Parallel Rare | NPR }} |
− | | npr | normal parallel | + | | spr | super parallel = {{ #if: {{{full|}}} | Super Parallel Rare | SPR }} |
− | | spr | super parallel | + | | upr | ultra parallel = {{ #if: {{{full|}}} | Ultra Parallel Rare | UPR }} |
− | | upr | ultra parallel | + | | sfr | starfoil = {{ #if: {{{full|}}} | Starfoil Rare | SFR }} |
− | | sfr | starfoil | + | | msr | mosaic = {{ #if: {{{full|}}} | Mosaic Rare | MSR }} |
− | | msr | mosaic | + | | shatterfoil = {{ #if: {{{full|}}} | Shatterfoil Rare | }} |
− | | shatterfoil | + | | cr | collector's | collectors = {{ #if: {{{full|}}} | Collectors Rare | CR }} |
− | | cr | collector's | + | | ¬ | gold = Gold Rare |
− | | ¬ | gold | + | | gur | gold = {{ #if: {{{full|}}} | Gold Rare | GUR }} |
− | | gur | gold | + | | gscr | gold secret = {{ #if: {{{full|}}} | Gold Secret Rare | GScR }} |
− | | gscr | gold secret | + | | ggr | ghost/gold = {{ #if: {{{full|}}} | Ghost/Gold Rare | GGR }} |
− | | ggr | ghost/gold | + | | dpc | duel terminal parallel common = {{ #if: {{{full|}}} | Duel Terminal Parallel Common | DPC }} |
− | | dpc | duel terminal parallel common | + | | dnpr | duel terminal normal parallel = {{ #if: {{{full|}}} | Duel Terminal Normal Parallel Rare | DNPR }} |
− | | dnpr | duel terminal normal parallel | + | | drpr | duel terminal parallel = {{ #if: {{{full|}}} | Duel Terminal Rare Parallel Rare | DRPR }} |
− | | drpr | duel terminal | + | | dspr | duel terminal super parallel = {{ #if: {{{full|}}} | Duel Terminal Super Parallel Rare | DSPR }} |
− | | dspr | duel terminal super parallel | + | | dupr | duel terminal ultra parallel = {{ #if: {{{full|}}} | Duel Terminal Ultra Parallel Rare | DUPR }} |
− | | dupr | duel terminal ultra parallel | + | | dscpr | duel terminal secret parallel = {{ #if: {{{full|}}} | Duel Terminal Secret Parallel Rare | DScPR }} |
− | | dscpr | duel terminal secret parallel | + | }}<noinclude>{{Documentation}}</noinclude> |
− | }}<noinclude> | ||
− | |||
− | {{Documentation}} | ||
− | </noinclude> |
Revision as of 06:58, 30 June 2014
C
Usage
This template is used to standardize rarity names/abbreviations for templates, so they don't have to implement such a check locally. It currently supports all official rarities and their abbreviations, and is not case-sensitive. The template doesn't return anything when fed unsupported values, which can be used for error-checking.
Basic usage is {{rarity|rarity}}
, outputting the abbreviation for the given rarity. The full name can be output instead by using the {{{full}}}
parameter.
Examples
Code | Result | Code | Result |
---|---|---|---|
{{rarity|Common}} |
C | {{rarity|C}} |
C |
{{rarity|common}} |
C | {{rarity|c}} |
C |
{{rarity|Common|full=yes}} |
Common | {{rarity|C|full=yes}} |
Common |
{{rarity|Rare}} |
R | {{rarity|R}} |
R |
{{rarity|Ghost Rare}} |
GR | {{rarity|GR}} |
GR |
{{rarity|Foo}} |
{{rarity|BLA}} |
||
{{rarity|}} |
{{rarity}} |