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