Jump to content

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

From Deadlock Wiki
m moved Lang to a raw invoke to prevent template limit on heroes page
m fixed issue with using no "type" argument
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
<div style="display:flex; flex-direction:column; flex-grow: 1; flex-basis: 0; {{#ifeq: {{{scale_type}}} | spirit | background: rgb(42,41,43);
<div style="display:flex; flex-direction:column; flex-grow: 1; flex-basis: 0; height: 80px; padding: 10px 0px 10px 0px; margin: 3px;">
background: radial-gradient(circle, rgba(42,41,43,1) 0%, rgba(59,49,69,1) 100%);  |background-color: #2A2A2A}}; padding: 10px 0px 10px 0px; margin: 3px; text-align: center; border: 3px solid {{#ifeq: {{{scale_type}}} | spirit | #583D6F | #2A2A2A}}; box-shadow: 0 0 10px {{#ifeq: {{{scale_type}}} | spirit | #3d2c4d | #2A2A2A}}; border-radius: 1px">
{{#if:{{{title|}}}|<div style="padding-bottom: 2px; font-size: 0.8rem; color: #9C9C9C; font-variant: small-caps;">'''{{{title}}}'''</div>|}}{{#ifeq: {{{scale_type}}}|spirit|
  {{#ifeq: {{{scale_type}}}|spirit|
   <div style="position: relative;">
   <div style="position: relative;">
     <div style="position: absolute; top: -30px; 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>
   </div>}}
   </div>}}
   <div style="font-weight: bold;">{{Icon/{{{icon_color|Grey}}}|[[File:{{{icon}}}|{{{icon_size|18px}}}|link={{{icon_link}}}]]|{{ValueAndUom|'''{{{value}}}'''|{{#invoke:Lang|get_string|{{{key}}}_postfix}}|uom_style=font-size: calc(1em - 4px); color: #9C9C9C}}}}</div>
<div style="display:flex; flex-direction:column; flex-grow: 1; justify-content: center; {{#ifeq: {{{scale_type}}} | spirit | background: rgb(42,41,43);
   <div style="font-size: 0.8rem">{{#invoke:Lang|get_string|{{{key}}}_label}}</div>
background: radial-gradient(circle, rgba(42,41,43,1) 0%, rgba(59,49,69,1) 100%);  |background-color: #2A2A2A}}; text-align: center; border: 3px solid {{#ifeq: {{{scale_type}}} | spirit | #583D6F | #2A2A2A}}; box-shadow: 0 0 10px {{#ifeq: {{{scale_type}}} | spirit | #3d2c4d | #2A2A2A}}; border-radius: 1px">
</div>
   <div style="font-weight: bold;">
</includeonly>
{{Icon/{{{icon_color|Grey}}}|
 
{{#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: calc(1em - 4px); color: #9C9C9C}}
<noinclude>
}}</div>
{{#invoke:AbilityData|get_ability_card|Infernus|1|true}}
   <div style="font-size: 0.8rem">{{#if:{{{label|}}}|{{{label}}}|{{Lang|key={{{key}}}_label}}}}</div>
</div></div>
</includeonly><noinclude>
{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 21:53, 2 January 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 (other scalings exist, but only "spirit" is currently supported)

Suggested values
spirit
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