Template:Ability card v2/Card/MainBox: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
added melee scaling (WIP)
melee scaling value
Line 5: Line 5:
     <div style="position: absolute; top: -20px; right: -2px">
     <div style="position: absolute; top: -20px; right: -2px">
     {{Ability card v2/Spirit mult|{{{scale_value}}}}}
     {{Ability card v2/Spirit mult|{{{scale_value}}}}}
    </div>
  </div>}}
{{#if:{{{title|}}}|<div style="padding-bottom: 2px; font-size: 0.8rem; color: #9C9C9C; font-variant: small-caps;">'''{{{title}}}'''</div>|}}{{#ifeq: {{{scale_type}}}|melee|
  <div style="position: relative;">
    <div style="position: absolute; top: -20px; right: -2px">
    {{Ability card v2/Melee mult|{{{scale_value}}}}}
     </div>
     </div>
   </div>}}
   </div>}}

Revision as of 06:28, 14 April 2025

Template documentation [view] [edit] [history] [purge]

Display element for a main ability attribute, of which heroes usually have between 1 and 3 in their ability cards

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
valuevalue

Display value of the attribute

Example
23.5
Numberrequired
keykey

Will retrieve the attribute label from localization data based on the current selected language using "<key>_label"

Stringsuggested
labellabel

Display label for attribute. Will override the use of "key" argument

Stringoptional
typetype

Attribute type - used to automatically retrieve the icon's image, link, size (but not color)

Suggested values
bullet_armor_up bullet_armor_down cast charges damage bullet_damage fire_rate healing health move_speed range tech_armor_up tech_damage distance duration slow
Example
damage
Stringsuggested
scale_typescale_type

Type of attribute scaling

Suggested values
spirit melee power_increase weapon_damage_increase weapon_power
Example
spirit
Stringoptional
scale_valuescale_value

Multiplier for the scaling

Example
0.5
Numberoptional
titletitle

Title that appears above the container

Example
On Hit:
Stringoptional
icon_coloricon_color

Color of the attribute icon

Suggested values
Grey Brown Purple
Default
Grey
Example
Brown
Stringoptional
iconicon

Icon's image name. Overridden by image found via "type" parameter

Example
Damage_heart.png
Stringoptional
icon_sizeicon_size

Icon's size. Overridden by size retrieved via "type" parameter

Example
12px
Stringoptional
icon_linkicon_link

Icon's hyperlink. Overridden by link retrieved via "type" parameter

Stringoptional