Template:Ability card v2/Card/AltBox: Difference between revisionsGive feedback
m fixed issue with using no "type" argument |
Gammaton32 (talk | contribs) added weapon power |
||
| Line 5: | Line 5: | ||
{{#if:{{{icon|}}}|[[File:{{{icon}}}|{{{icon_size|18px}}}|link={{{icon_link}}}]]|{{#invoke:Abilities/card|get_attr_icon|{{{type|}}}}}}}| | {{#if:{{{icon|}}}|[[File:{{{icon}}}|{{{icon_size|18px}}}|link={{{icon_link}}}]]|{{#invoke:Abilities/card|get_attr_icon|{{{type|}}}}}}}| | ||
{{ValueAndUom|'''{{{value}}}'''|{{Lang|key={{{key}}}_postfix}}|uom_style=font-size: 10px; color: #9C9C9C}} | {{ValueAndUom|'''{{{value}}}'''|{{Lang|key={{{key}}}_postfix}}|uom_style=font-size: 10px; color: #9C9C9C}} | ||
}} <span style="font-size: 0.75rem; white-space: nowrap">{{#if:{{{label|}}}|{{{label}}}|{{Lang|key={{{key}}}_label}}}}{{#ifeq: {{{scale_type}}}|spirit| {{Ability card v2/Spirit mult|{{{scale_value}}}|icon_size=35px}}}}</span></span> | }} <span style="font-size: 0.75rem; white-space: nowrap">{{#if:{{{label|}}}|{{{label}}}|{{Lang|key={{{key}}}_label}}}}{{#ifeq: {{{scale_type}}}|spirit| {{Ability card v2/Spirit mult|{{{scale_value}}}|icon_size=35px}}}}{{#ifeq: {{{scale_type}}}|weapon_power| {{Ability card v2/Card/Weapon mult|{{{scale_value}}}|icon_size=35px}}}}</span></span> | ||
</div></includeonly><noinclude> | </div></includeonly><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 23:21, 4 July 2025
Overview
Display element for an alternate ability attribute, similar to main box attributes. Can be any number of these on an ability card
Examples
Multiple Alt boxes in a container
<div ...>
<div ...>
{{Ability card v2/Card/AltBox
| value=15
| key=TechResist
| type=tech_armor_up
}}
{{Ability card v2/Card/AltBox
| value=50
| key=DPS
| type=bullet_damage
| icon_color=Brown
}}
</div>
</div>
Script error: The function "get_attr_icon" does not exist. 15% Spirit Resist
Script error: The function "get_attr_icon" does not exist. 50 Damage Per Second
In an Ability Card
{{Ability card v2
| hero_name=Vindicta
| ability_num=3
}}
Crow Familiar
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| value | value | Display value of the attribute
| Number | required |
| key | key | Will retrieve the attribute label from localization data based on the current selected language using "<key>_label" | String | suggested |
| label | label | Display label for attribute. Will override the use of "key" argument | String | optional |
| type | type | Attribute type - used to automatically retrieve the icon's image, link, size (but not color)
| String | suggested |
| scale_type | scale_type | Type of attribute scaling
| String | optional |
| scale_value | scale_value | Multiplier for the scaling
| Number | optional |
| icon_color | icon_color | Color of the attribute icon
| String | optional |
| icon | icon | Icon's image name. Overridden by image found via "type" parameter
| String | optional |
| icon_link | icon_link | Icon's hyperlink. Overridden by link retrieved via "type" parameter | String | optional |