Difference between revisions of "Template:Rarity"
Dinoguy1000 (talk | contribs) (Millennium Rare) |
Dinoguy1000 (talk | contribs) (+Duel Terminal Normal Rare Parallel Rare/DNRPR) |
||
Line 33: | Line 33: | ||
| ggr | ghost/gold = {{ #if: {{{full|}}} | Ghost/Gold Rare | GGR }} | | ggr | ghost/gold = {{ #if: {{{full|}}} | Ghost/Gold Rare | GGR }} | ||
| dpc | duel terminal parallel common = {{ #if: {{{full|}}} | Duel Terminal Parallel Common | DPC }} | | dpc | duel terminal parallel common = {{ #if: {{{full|}}} | Duel Terminal Parallel Common | DPC }} | ||
− | | dnpr | duel terminal normal parallel = {{ #if: {{{full|}}} | Duel Terminal Normal Parallel Rare | DNPR }} | + | | dnpr | duel terminal normal parallel = {{ #ifeq: {{ lc: {{{1}}} }} | duel terminal normal rare parallel rare |
+ | | {{ #if: {{{full|}}} | Duel terminal Normal Rare Parallel Rare | DNRPR }} | ||
+ | | {{ #if: {{{full|}}} | Duel Terminal Normal Parallel Rare | DNPR }} }} | ||
| drpr | duel terminal parallel = {{ #if: {{{full|}}} | Duel Terminal Rare Parallel Rare | DRPR }} | | drpr | duel terminal parallel = {{ #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 = {{ #if: {{{full|}}} | Duel Terminal Super Parallel Rare | DSPR }} |
Revision as of 20:16, 31 January 2015
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}} |