Difference between revisions of "Template:Rarity"
Dinoguy1000 (talk | contribs) (Hobby Rare and Kaiba Corporation Secret Rare) |
Dinoguy1000 (talk | contribs) (Hobby Rare is just "H"; "HR" is used on the database for Holographic Rare (so add it as an alternate input abbreviation)) |
||
Line 12: | Line 12: | ||
| utr | ultimate = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ultimate Rare | UtR }} | | utr | ultimate = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ultimate Rare | UtR }} | ||
| gr | ghost = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ghost Rare | GR }} | | gr | ghost = {{ {{{|safesubst:}}}#if: {{{full|}}} | Ghost Rare | GR }} | ||
− | | hgr | + | | hr | hgr | holographic = {{ {{{|safesubst:}}}#if: {{{full|}}} | Holographic Rare | HGR }} |
| scr | secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Secret Rare | ScR }} | | scr | secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Secret Rare | ScR }} | ||
| pscr | prismatic secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Prismatic Secret Rare | PScR }} | | pscr | prismatic secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Prismatic Secret Rare | PScR }} | ||
Line 28: | Line 28: | ||
| scpr | secret parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Secret Parallel Rare | ScPR }} | | scpr | secret parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Secret Parallel Rare | ScPR }} | ||
| escpr | extra secret parallel = {{ {{{|safesubst:}}}#if: {{{full|}}} | Extra Secret Parallel Rare | EScPR }} | | 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 }} | | sfr | starfoil = {{ {{{|safesubst:}}}#if: {{{full|}}} | Starfoil Rare | SFR }} | ||
| msr | mosaic = {{ {{{|safesubst:}}}#if: {{{full|}}} | Mosaic Rare | MSR }} | | msr | mosaic = {{ {{{|safesubst:}}}#if: {{{full|}}} | Mosaic Rare | MSR }} |
Revision as of 15:28, 22 July 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}} |