Difference between revisions of "Template:Rarity"
Dinoguy1000 (talk | contribs) (Kaiba Corporation Common) |
Dinoguy1000 (talk | contribs) (make substable) |
||
Line 1: | Line 1: | ||
<!-- there should be *no* empty cases in the following #switch; it defaults to returning blank and empty cases interfere with that | <!-- there should be *no* empty cases in the following #switch; it defaults to returning blank and empty cases interfere with that | ||
− | -->{{ #switch: {{ #replace: {{ lc: {{{1}}} }} | {{ #ifeq: {{ lc: {{{1}}} }} | rare || rare }} }} | + | -->{{ {{{|safesubst:}}}#switch: {{ {{{|safesubst:}}}#replace: {{ {{{|safesubst:}}}lc: {{{1}}} }} | {{ {{{|safesubst:}}}#ifeq: {{ {{{|safesubst:}}}lc: {{{1}}} }} | rare || rare }} }} |
− | | c | common = {{ #if: {{{full|}}} | Common | C }} | + | | c | common = {{ {{{|safesubst:}}}#if: {{{full|}}} | Common | C }} |
− | | nr | normal = {{ #if: {{{full|}}} | Normal Rare | NR }} | + | | nr | normal = {{ {{{|safesubst:}}}#if: {{{full|}}} | Normal Rare | NR }} |
− | | sp | short print = {{ #if: {{{full|}}} | Short Print | SP }} | + | | sp | short print = {{ {{{|safesubst:}}}#if: {{{full|}}} | Short Print | SP }} |
− | | ssp | super short print = {{ #if: {{{full|}}} | Super Short Print | SSP }} | + | | ssp | super short print = {{ {{{|safesubst:}}}#if: {{{full|}}} | Super Short Print | SSP }} |
− | | hfr | holofoil = {{ #if: {{{full|}}} | Holofoil Rare | HFR }} | + | | hfr | holofoil = {{ {{{|safesubst:}}}#if: {{{full|}}} | Holofoil Rare | HFR }} |
− | | r | rare = {{ #if: {{{full|}}} | Rare | R }} | + | | r | rare = {{ {{{|safesubst:}}}#if: {{{full|}}} | Rare | R }} |
− | | sr | super = {{ #if: {{{full|}}} | Super Rare | SR }} | + | | sr | super = {{ {{{|safesubst:}}}#if: {{{full|}}} | Super Rare | SR }} |
− | | ur | ultra = {{ #if: {{{full|}}} | Ultra Rare | UR }} | + | | ur | ultra = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ultra Rare | UR }} |
− | | utr | ultimate = {{ #if: {{{full|}}} | Ultimate Rare | UtR }} | + | | utr | ultimate = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ultimate Rare | UtR }} |
− | | gr | ghost = {{ #if: {{{full|}}} | Ghost Rare | GR }} | + | | gr | ghost = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ghost Rare | GR }} |
− | | hgr | holographic = {{ #if: {{{full|}}} | Holographic Rare | HGR }} | + | | hgr | holographic = {{ {{{|safesubst:}}}#if: {{{full|}}} | Holographic Rare | HGR }} |
− | | scr | secret = {{ #if: {{{full|}}} | Secret Rare | ScR }} | + | | scr | secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Secret Rare | ScR }} |
− | | pscr | prismatic secret = {{ #if: {{{full|}}} | Prismatic Secret Rare | PScR }} | + | | pscr | prismatic secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Prismatic Secret Rare | PScR }} |
− | | uscr | ultra secret = {{ #if: {{{full|}}} | Ultra Secret Rare | UScR }} | + | | uscr | ultra secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ultra Secret Rare | UScR }} |
− | | scur | secret ultra = {{ #if: {{{full|}}} | Secret Ultra Rare | ScUR }} | + | | scur | secret ultra = {{ {{{|safesubst:}}}#if: {{{full|}}} | Secret Ultra Rare | ScUR }} |
− | | escr | extra secret = {{ #if: {{{full|}}} | Extra Secret Rare | EScR }} | + | | escr | extra secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Extra Secret Rare | EScR }} |
− | | plr | platinum = {{ #if: {{{full|}}} | Platinum Rare | PlR }} | + | | plr | platinum = {{ {{{|safesubst:}}}#if: {{{full|}}} | Platinum Rare | PlR }} |
− | | plscr | platinum secret = {{ #if: {{{full|}}} | Platinum Secret Rare | PlScR }} | + | | plscr | platinum secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Platinum Secret Rare | PlScR }} |
− | | pr | parallel = {{ #if: {{{full|}}} | Parallel Rare | PR }} | + | | pr | parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Parallel Rare | PR }} |
− | | pc | parallel common = {{ #if: {{{full|}}} | Parallel Common | PC }} | + | | pc | parallel common = {{ {{{|safesubst:}}}#if: {{{full|}}} | Parallel Common | PC }} |
− | | npr | normal parallel = {{ #if: {{{full|}}} | Normal Parallel Rare | NPR }} | + | | npr | normal parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Normal Parallel Rare | NPR }} |
− | | spr | super parallel = {{ #if: {{{full|}}} | Super Parallel Rare | SPR }} | + | | spr | super parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Super Parallel Rare | SPR }} |
− | | upr | ultra parallel = {{ #if: {{{full|}}} | Ultra Parallel Rare | UPR }} | + | | upr | ultra parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ultra Parallel Rare | UPR }} |
− | | sfr | starfoil = {{ #if: {{{full|}}} | Starfoil Rare | SFR }} | + | | sfr | starfoil = {{ {{{|safesubst:}}}#if: {{{full|}}} | Starfoil Rare | SFR }} |
− | | msr | mosaic = {{ #if: {{{full|}}} | Mosaic Rare | MSR }} | + | | msr | mosaic = {{ {{{|safesubst:}}}#if: {{{full|}}} | Mosaic Rare | MSR }} |
− | | shr | shatterfoil = {{ #if: {{{full|}}} | Shatterfoil Rare | SHR }} | + | | shr | shatterfoil = {{ {{{|safesubst:}}}#if: {{{full|}}} | Shatterfoil Rare | SHR }} |
− | | cr | collector's | collectors = {{ #if: {{{full|}}} | Collectors Rare | CR }} | + | | cr | collector's | collectors = {{ {{{|safesubst:}}}#if: {{{full|}}} | Collectors Rare | CR }} |
− | | kcc | kcn | kaiba corporation common | kaiba corporation normal = {{ #if: {{{full|}}} | Kaiba Corporation Common | KCC }} | + | | kcc | kcn | kaiba corporation common | kaiba corporation normal = {{ {{{|safesubst:}}}#if: {{{full|}}} | Kaiba Corporation Common | KCC }} |
− | | kcr | kaiba corporation = {{ #if: {{{full|}}} | Kaiba Corporation Rare | KCR }} | + | | kcr | kaiba corporation = {{ {{{|safesubst:}}}#if: {{{full|}}} | Kaiba Corporation Rare | KCR }} |
− | | kcsr | kaiba corporation super = {{ #if: {{{full|}}} | Kaiba Corporation Super Rare | KCSR }} | + | | kcsr | kaiba corporation super = {{ {{{|safesubst:}}}#if: {{{full|}}} | Kaiba Corporation Super Rare | KCSR }} |
− | | kcur | kaiba corporation ultra = {{ #if: {{{full|}}} | Kaiba Corporation Ultra Rare | KCUR }} | + | | kcur | kaiba corporation ultra = {{ {{{|safesubst:}}}#if: {{{full|}}} | Kaiba Corporation Ultra Rare | KCUR }} |
− | | mr | mlr | millennium = {{ #if: {{{full|}}} | Millennium Rare | MLR }} | + | | mr | mlr | millennium = {{ {{{|safesubst:}}}#if: {{{full|}}} | Millennium Rare | MLR }} |
− | | mlsr | millennium super = {{ #if: {{{full|}}} | Millennium Super Rare | MLSR }} | + | | mlsr | millennium super = {{ {{{|safesubst:}}}#if: {{{full|}}} | Millennium Super Rare | MLSR }} |
− | | mlur | millennium ultra = {{ #if: {{{full|}}} | Millennium Ultra Rare | MLUR }} | + | | mlur | millennium ultra = {{ {{{|safesubst:}}}#if: {{{full|}}} | Millennium Ultra Rare | MLUR }} |
− | | mlscr | millennium secret = {{ #if: {{{full|}}} | Millennium Secret Rare | MLScR }} | + | | mlscr | millennium secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Millennium Secret Rare | MLScR }} |
− | | mlgr | millennium gold = {{ #if: {{{full|}}} | Millennium Gold Rare | MLGR }} | + | | mlgr | millennium gold = {{ {{{|safesubst:}}}#if: {{{full|}}} | Millennium Gold Rare | MLGR }} |
| ¬ | gold = Gold Rare | | ¬ | gold = Gold Rare | ||
− | | gur | gold = {{ #if: {{{full|}}} | Gold Rare | GUR }} | + | | gur | gold = {{ {{{|safesubst:}}}#if: {{{full|}}} | Gold Rare | GUR }} |
− | | gscr | gold secret = {{ #if: {{{full|}}} | Gold Secret Rare | GScR }} | + | | gscr | gold secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Gold Secret Rare | GScR }} |
− | | ggr | ghost/gold = {{ #if: {{{full|}}} | Ghost/Gold Rare | GGR }} | + | | ggr | ghost/gold = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ghost/Gold Rare | GGR }} |
− | | dpc | duel terminal parallel common = {{ #if: {{{full|}}} | Duel Terminal Parallel Common | DPC }} | + | | dpc | duel terminal parallel common = {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Parallel Common | DPC }} |
− | | dnrpr | duel terminal normal parallel = {{ #if: {{{full|}}} | Duel Terminal Normal Rare Parallel Rare | DNRPR }} | + | | dnrpr | duel terminal normal parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Normal Rare Parallel Rare | DNRPR }} |
− | | duel terminal normal parallel = {{ #if: {{{full|}}} | Duel Terminal Normal Parallel Rare | DNPR }} | + | | duel terminal normal parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Normal Parallel Rare | DNPR }} |
− | | dnpr = {{ #ifeq: {{ lc: {{{1}}} }} | duel terminal normal rare parallel rare | + | | dnpr = {{ {{{|safesubst:}}}#ifeq: {{ lc: {{{1}}} }} | duel terminal normal rare parallel rare |
− | | {{ #if: {{{full|}}} | Duel Terminal Normal Rare Parallel Rare | DNRPR }} | + | | {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Normal Rare Parallel Rare | DNRPR }} |
− | | {{ #if: {{{full|}}} | Duel Terminal Normal Parallel Rare | DNPR }} }} | + | | {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Normal Parallel Rare | DNPR }} }} |
− | | drpr | duel terminal parallel = {{ #if: {{{full|}}} | Duel Terminal Rare Parallel Rare | DRPR }} | + | | drpr | duel terminal parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Rare Parallel Rare | DRPR }} |
− | | dspr | duel terminal super parallel = {{ #if: {{{full|}}} | Duel Terminal Super Parallel Rare | DSPR }} | + | | dspr | duel terminal super parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Super Parallel Rare | DSPR }} |
− | | dupr | duel terminal ultra parallel = {{ #if: {{{full|}}} | Duel Terminal Ultra Parallel Rare | DUPR }} | + | | dupr | duel terminal ultra parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Ultra Parallel Rare | DUPR }} |
− | | dscpr | duel terminal secret parallel = {{ #if: {{{full|}}} | Duel Terminal Secret Parallel Rare | DScPR }} | + | | dscpr | duel terminal secret parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Duel Terminal Secret Parallel Rare | DScPR }} |
| <!-- blank --> | #default = <!-- return blank by default --> | | <!-- blank --> | #default = <!-- return blank by default --> | ||
}}<noinclude>{{Documentation}}</noinclude> | }}<noinclude>{{Documentation}}</noinclude> |
Revision as of 06:38, 29 July 2016
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}} |