Difference between revisions of "Template:Ability"
(Tag: Undo) |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
==Usage== | ==Usage== | ||
− | Format the name of a keyword or icon ability, including a link to its description. | + | Format the name of a keyword or icon ability, including a link to its description, and an inline icon for icon abilities. |
The first parameter is the name of the ability. | The first parameter is the name of the ability. | ||
The second parameter (optional) is the text to display for the ability, which should be limited to the ability name in a different word form. The default value is the first parameter. | The second parameter (optional) is the text to display for the ability, which should be limited to the ability name in a different word form. The default value is the first parameter. | ||
+ | |||
+ | The third parameter (optional) is a flag which if present forces non-inlining of any ability icon. | ||
==Example== | ==Example== | ||
The following shorthand: | The following shorthand: | ||
<pre><nowiki> | <pre><nowiki> | ||
+ | {{Ability|Berserker}} | ||
+ | |||
{{Ability|First Strike}} | {{Ability|First Strike}} | ||
+ | |||
+ | {{Ability|First Strike||1}} | ||
{{Ability|Raid|Raided}} | {{Ability|Raid|Raided}} | ||
+ | |||
+ | {{Ability|Protection from Color}} | ||
+ | |||
+ | {{Ability|Basic Evergreen}} | ||
</nowiki></pre> | </nowiki></pre> | ||
Produces: | Produces: | ||
+ | |||
+ | {{Ability|Berserker}} | ||
{{Ability|First Strike}} | {{Ability|First Strike}} | ||
+ | |||
+ | {{Ability|First Strike||1}} | ||
{{Ability|Raid|Raided}} | {{Ability|Raid|Raided}} | ||
− | </noinclude><includeonly>[[Abilities#{{{1}}}|''{{{2|{{{1 | + | {{Ability|Protection from Color}} |
+ | |||
+ | {{Ability|Basic Evergreen}} | ||
+ | |||
+ | </noinclude><includeonly>[[Abilities#{{#ifeq:{{{1}}}|Protection from Color|Protection from Black|{{{1}}}}}|<span title="Abilities: {{{1}}}">''{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}''</span>]]{{#if:{{#pos:{{IconAbilityList}}|,{{{1}}},}}| {{Ability icon|{{{1}}}|14|{{{3|}}}}} |{{#ifeq:{{{1}}}|Basic Evergreen| {{Ability icon|Berserker|14|{{{3|}}}}}{{Ability icon|Deathtouch|14|{{{3|}}}}}{{Ability icon|Defender|14|{{{3|}}}}}{{Ability icon|Double Strike|14|{{{3|}}}}}{{Ability icon|First Strike|14|{{{3|}}}}}{{Ability icon|Flying|14|{{{3|}}}}}{{Ability icon|Hexproof|14|{{{3|}}}}}{{Ability icon|Lifelink|14|{{{3|}}}}}{{Ability icon|Menace|14|{{{3|}}}}}{{Ability icon|Reach|14|{{{3|}}}}}{{Ability icon|Trample|14|{{{3|}}}}}{{Ability icon|Vigilance|14|{{{3|}}}}}}}}}</includeonly> |
Latest revision as of 03:31, 24 October 2021
Usage
Format the name of a keyword or icon ability, including a link to its description, and an inline icon for icon abilities.
The first parameter is the name of the ability.
The second parameter (optional) is the text to display for the ability, which should be limited to the ability name in a different word form. The default value is the first parameter.
The third parameter (optional) is a flag which if present forces non-inlining of any ability icon.
Example
The following shorthand:
{{Ability|Berserker}} {{Ability|First Strike}} {{Ability|First Strike||1}} {{Ability|Raid|Raided}} {{Ability|Protection from Color}} {{Ability|Basic Evergreen}}
Produces: