Difference between revisions of "Template:Rarity"
(Restoring revision 5125536 by User:Dinoguy1000 on 2022-12-14 10:03:13. "+Quarter Century Secret Rare") (Tag: Removed redirect) |
Dinoguy1000 (talk | contribs) m (Dinoguy1000 moved page Template:R to Template:Rarity without leaving a redirect: history merge) |
||
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><!-- there should be *no* empty cases in the following #switch; it defaults to returning blank and empty cases interfere with that | ||
− | --></noinclude>{{ | + | --></noinclude>{{ {{{|safesubst:}}}#switch: {{ {{{|safesubst:}}}#replace: {{ {{{|safesubst:}}}lc: {{{1}}} }} | {{ {{{|safesubst:}}}#ifeq: {{ {{{|safesubst:}}}lc: {{{1}}} }} | rare || rare }} }} |
− | + | | c | common = {{ {{{|safesubst:}}}#if: {{{full|}}} | Common | C }} | |
− | | c | common = {{ safesubst: | + | | nr | normal = {{ {{{|safesubst:}}}#if: {{{full|}}} | Normal Rare | NR }} |
− | | nr | normal = {{ safesubst: | + | | sp | short print = {{ {{{|safesubst:}}}#if: {{{full|}}} | Short Print | SP }} |
− | | sp | short print = {{ safesubst: | + | | ssp | super short print = {{ {{{|safesubst:}}}#if: {{{full|}}} | Super Short Print | SSP }} |
− | | ssp | super short print = {{ safesubst: | + | | hfr | holofoil = {{ {{{|safesubst:}}}#if: {{{full|}}} | Holofoil Rare | HFR }} |
− | | hfr | holofoil = {{ | + | | r | rare = {{ {{{|safesubst:}}}#if: {{{full|}}} | Rare | R }} |
− | | r | rare = {{ safesubst: | + | | sr | super = {{ {{{|safesubst:}}}#if: {{{full|}}} | Super Rare | SR }} |
− | | sr | super = {{ safesubst: | + | | ur | ultra = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ultra Rare | UR }} |
− | | ur | ultra = {{ safesubst: | + | | utr | ultimate = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ultimate Rare | UtR }} |
− | | utr | ultimate = {{ safesubst: | + | | gr | ghost = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ghost Rare | GR }} |
− | | gr | ghost = {{ safesubst: | + | | hr | hgr | holographic = {{ {{{|safesubst:}}}#if: {{{full|}}} | Holographic Rare | HGR }} |
− | | hr | hgr | holographic = {{ safesubst: | + | | se | scr | secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Secret Rare | ScR }} |
− | | se | scr | secret = {{ safesubst: | + | | pscr | prismatic secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Prismatic Secret Rare | PScR }} |
− | | pscr | prismatic secret = {{ | + | | uscr | ultra secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ultra Secret Rare | UScR }} |
− | | uscr | ultra secret = {{ safesubst: | + | | scur | secret ultra = {{ {{{|safesubst:}}}#if: {{{full|}}} | Secret Ultra Rare | ScUR }} |
− | | scur | secret ultra = {{ safesubst: | + | | escr | extra secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Extra Secret Rare | EScR }} |
− | | escr | extra secret = {{ safesubst: | + | | 20scr | 20th secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | 20th Secret Rare | 20ScR }} |
− | | 20scr | 20th secret = {{ safesubst: | + | | 10000scr | 10000 secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | 10000 Secret Rare | 10000ScR }} |
− | | | + | | altr | alternate = {{ {{{|safesubst:}}}#if: {{{full|}}} | Alternate Rare | AltR }} |
− | | | + | | 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 }} |
− | | | + | | h | hobby = {{ {{{|safesubst:}}}#if: {{{full|}}} | Hobby Rare | H }} |
− | | | + | | 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 }} |
− | | | + | | kcscr | kaiba corporation secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Kaiba Corporation Secret Rare | KCScR }} |
− | | | + | | 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 }} |
− | | | + | | pgr | premium gold = {{ {{{|safesubst:}}}#if: {{{full|}}} | Premium Gold Rare | PGR }} |
− | | | + | | 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> | | <!-- blank --> | #default = <noinclude><!-- return blank by default --></noinclude> | ||
}}<noinclude>{{Documentation}}</noinclude> | }}<noinclude>{{Documentation}}</noinclude> |
Revision as of 15:02, 15 July 2023
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}} |