Difference between revisions of "Template:Rarity"
Dinoguy1000 (talk | contribs) (use /core) |
Dinoguy1000 (talk | contribs) (actually, gonna leave linking to calling templates, which means we can also do away with the /core) |
||
Line 1: | Line 1: | ||
{{ | {{ | ||
− | #switch: {{lc: {{{1}}} }} | + | #switch: {{lc: {{{1<noinclude>|C</noinclude>}}} }} |
− | | c | common = {{ | + | | c | common = {{ #if: {{{full|}}} | C | Common }} |
− | | nr | normal rare = {{ | + | | nr | normal rare = {{ #if: {{{full|}}} | NR | Normal Rare }} |
− | | sp | short print = {{ | + | | sp | short print = {{ #if: {{{full|}}} | SP | Short Print }} |
− | | ssp | super short print = {{ | + | | ssp | super short print = {{ #if: {{{full|}}} | SSP | Super Short Print }} |
− | | hfr | holofoil rare = {{ | + | | hfr | holofoil rare = {{ #if: {{{full|}}} | HFR | Holofoil Rare }} |
− | | r | rare = {{ | + | | r | rare = {{ #if: {{{full|}}} | R | Rare }} |
− | | sr | super rare = {{ | + | | sr | super rare = {{ #if: {{{full|}}} | SR | Super Rare }} |
− | | ur | ultra rare = {{ | + | | ur | ultra rare = {{ #if: {{{full|}}} | UR | Ultra Rare }} |
− | | utr | ultimate rare = {{ | + | | utr | ultimate rare = {{ #if: {{{full|}}} | UtR | Ultimate Rare }} |
− | | gr | ghost rare = {{ | + | | gr | ghost rare = {{ #if: {{{full|}}} | GR | Ghost Rare }} |
− | | hgr | holographic rare = {{ | + | | hgr | holographic rare = {{ #if: {{{full|}}} | HGR | Holographic Rare }} |
− | | scr | secret rare = {{ | + | | scr | secret rare = {{ #if: {{{full|}}} | ScR | Secret Rare }} |
− | | pscr | prismatic secret rare = {{ | + | | pscr | prismatic secret rare = {{ #if: {{{full|}}} | PScR | Prismatic Secret Rare }} |
− | | uscr | ultra secret rare = {{ | + | | uscr | ultra secret rare = {{ #if: {{{full|}}} | UScR | Ultra Secret Rare }} |
− | | scur | secret ultra rare = {{ | + | | scur | secret ultra rare = {{ #if: {{{full|}}} | ScUR | Secret Ultra Rare }} |
− | | pr | parallel rare = {{ | + | | pr | parallel rare = {{ #if: {{{full|}}} | PR | Parallel Rare }} |
− | | npr | normal parallel rare = {{ | + | | npr | normal parallel rare = {{ #if: {{{full|}}} | NPR | Normal Parallel Rare }} |
− | | spr | super parallel rare = {{ | + | | spr | super parallel rare = {{ #if: {{{full|}}} | SPR | Super Parallel Rare }} |
− | | upr | ultra parallel rare = {{ | + | | upr | ultra parallel rare = {{ #if: {{{full|}}} | UPR | Ultra Parallel Rare }} |
− | | gur | gold ultra rare = {{ | + | | gur | gold ultra rare = {{ #if: {{{full|}}} | GUR | Gold Ultra Rare }} |
− | | dnpr | duel terminal normal parallel rare = {{ | + | | dnpr | duel terminal normal parallel rare = {{ #if: {{{full|}}} | DNPR | Duel Terminal Normal Parallel Rare }} |
− | | drpr | duel terminal rare parallel rare = {{ | + | | drpr | duel terminal rare parallel rare = {{ #if: {{{full|}}} | DRPR | Duel Terminal Rare Parallel Rare }} |
− | | dspr | duel terminal super parallel rare = {{ | + | | dspr | duel terminal super parallel rare = {{ #if: {{{full|}}} | DSPR | Duel Terminal Super Parallel Rare }} |
− | | dupr | duel terminal ultra parallel rare = {{ | + | | dupr | duel terminal ultra parallel rare = {{ #if: {{{full|}}} | DUPR | Duel Terminal Ultra Parallel Rare }} |
− | | dscpr | duel terminal secret parallel rare = {{ | + | | dscpr | duel terminal secret parallel rare = {{ #if: {{{full|}}} | DScPR | Duel Terminal Secret Parallel Rare }} |
− | |||
}}<noinclude> | }}<noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 03:14, 7 August 2010
Common
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}} |