Difference between revisions of "Template:CInfo"
Jump to navigation
Jump to search
(Created page with "<includeonly>{{#ifeq: {{#expr:{{#len:{{{1|}}}}} < 3}}|0| {{#switch: {{uc:{{#sub:{{{1}}}|1|1}}}} |F|C|U|R = {{#switch: {{uc:{{{2|}}}}} |E = {{#sub:{{{1}}}|0|1}} |N =...") |
m (Protected "Template:CInfo" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) [cascading]) |
(No difference)
|
Latest revision as of 23:07, 9 November 2023
This function parses the collectorinfo field to return one of its three parts.
Usage: {{CInfo|collectorinfo|ERN}}
Where ERN is ONE of E, R or N (Returns: Expansion number, Rarity code, or card Number). IF ERN is blank or undefined, Rarity code will be returned. IF the length of collectorinfo is less than 3 nothing is returned.
This function assumes that Expansion number will be 1 or 2 characters, that Rarity code will be 1 character (Unless it is a loot card, where it will be 2 or 4 characters), and that card Number will be 1 to 3 characters in length.