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

From The Deadlock Wiki
Jump to navigation Jump to search
Added support for dynamic cards
Vergir (talk | contribs)
Make AbilityCard/MainBos use CSS classes (can now be customized)
Line 1: Line 1:
<includeonly>
<includeonly>
<div class="ability-mainbox {{#ifeq:{{{hide|}}}|true|hide}}" style="display:flex; flex-direction:column; flex-grow: 1; flex-basis: 0; max-height: 100%; padding: 10px 0px 10px 0px; margin: 3px; overflow: hidden;">
<div class="ability-mainbox {{#ifeq:{{{hide|}}}|true|hide}}">
{{#if:{{{title|}}}|<div style="padding-bottom: 2px; font-size: 0.8rem; color: #9C9C9C; font-variant: small-caps;">'''{{{title}}}'''</div>|}}{{#switch: {{{scale_type}}}|melee =  
{{#if:{{{title|}}}|<div class="ac-mainbox-title">'''{{{title}}}'''</div>|}}{{#switch: {{{scale_type}}}
   <div style="position: relative;">
| melee =
     <div style="position: absolute; top: -20px; right: -2px">
   <div class="ac-mainbox-scale">
     <div class="ac-mainbox-scale-badge">
     {{Ability card v2/Card/Melee mult|{{{scale_value}}}|id={{{key}}}-scale}}
     {{Ability card v2/Card/Melee mult|{{{scale_value}}}|id={{{key}}}-scale}}
     </div>
     </div>
   </div>|
   </div>
spirit =
| spirit =
   <div style="position: relative;">
   <div class="ac-mainbox-scale">
     <div style="position: absolute; top: -20px; right: -2px">
     <div class="ac-mainbox-scale-badge">
     {{Ability card v2/Card/Spirit mult|{{{scale_value}}}|id={{{key}}}-scale}}
     {{Ability card v2/Card/Spirit mult|{{{scale_value}}}|id={{{key}}}-scale}}
     </div>
     </div>
   </div>|
   </div>
power_increase =
| power_increase =
   <div style="position: relative;">
   <div class="ac-mainbox-scale">
     <div style="position: absolute; top: -20px; right: -2px">
     <div class="ac-mainbox-scale-badge">
     {{Ability card v2/Card/Boon mult|{{{scale_value}}}|id={{{key}}}-scale}}
     {{Ability card v2/Card/Boon mult|{{{scale_value}}}|id={{{key}}}-scale}}
     </div>
     </div>
   </div>|
   </div>
weapon_damage_increase =
| weapon_damage_increase =
   <div style="position: relative;">
   <div class="ac-mainbox-scale">
     <div style="position: absolute; top: -20px; right: -2px">
     <div class="ac-mainbox-scale-badge">
     {{Ability card v2/Card/Weapon mult|{{{scale_value}}}|id={{{key}}}-scale}}
     {{Ability card v2/Card/Weapon mult|{{{scale_value}}}|id={{{key}}}-scale}}
     </div>
     </div>
   </div>|
   </div>
  stats_count =
| stats_count =
   <div style="position: relative;">
   <div class="ac-mainbox-scale">
     <div style="position: absolute; top: -20px; right: -2px">
     <div class="ac-mainbox-scale-badge">
     {{Ability card v2/Card/Spirit mult|{{{scale_value}}}|id={{{key}}}-scale}}
     {{Ability card v2/Card/Spirit mult|{{{scale_value}}}|id={{{key}}}-scale}}
     </div>
     </div>
   </div>|}}
   </div>
<div style="display:flex; flex-direction:column; flex-grow: 1; justify-content: space-between; {{#switch: {{{scale_type}}} | melee = background: rgb(36,37,36);
|}}
background: radial-gradient(circle, rgba(36,37,36,1) 0%, rgba(66,55,47,1) 100%); | spirit = background: rgb(42,41,43);
<div class="ac-mainbox-inner {{#switch: {{{scale_type}}} | melee = ac-mainbox-inner--melee | spirit = ac-mainbox-inner--spirit | power_increase = ac-mainbox-inner--power-increase | stats_count = ac-mainbox-inner--stats-count | weapon_damage_increase = ac-mainbox-inner--weapon-damage-increase | ac-mainbox-inner--default}}">
background: radial-gradient(circle, rgba(42,41,43,1) 0%, rgba(59,49,69,1) 100%); | power_increase = background: rgb(61,78,70);
   <div class="ac-mainbox-value">
background: radial-gradient(circle, rgba(42,41,43,1) 0%, rgba(61,78,70,1) 100%); | stats_count = background: rgb(42,41,43);
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 {{#switch: {{{scale_type}}} | melee = #5b412b | spirit = #583D6F | power_increase = #48675a | stats_count = #583D6F | #2A2A2A}}; box-shadow: 0 0 10px {{#switch: {{{scale_type}}} | melee | power_increase | stats_count | spirit = #3d2c4d | #2A2A2A}}; border-radius: 1px">
   <div style="font-weight: bold;">
{{#vardefine:value_prefix|{{Lang|key={{{key}}}_prefix}}}}
{{#vardefine:value_prefix|{{Lang|key={{{key}}}_prefix}}}}
{{Icon/{{{icon_color|Grey}}}|
{{Icon/{{{icon_color|Grey}}}|
{{#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|}}}}}}}|
<!-- Only show value_prefix if it is the minus symbol "-" -->
{{#ifeq:{{#var:value_prefix}}|-|{{#var:value_prefix}}}}{{ValueAndUom|'''{{{value}}}'''|id={{{key}}}|class=ability-attr|{{Lang|key={{{key}}}_postfix}}|uom_style=font-size: calc(1em - 2px); color: #B2B2B2}}
{{#ifeq:{{#var:value_prefix}}|-|{{#var:value_prefix}}}}{{ValueAndUom|'''{{{value}}}'''|id={{{key}}}|class=ability-attr|{{Lang|key={{{key}}}_postfix}}|uom_style=font-size: calc(1em - 2px); color: #B2B2B2}}
}}</div>
}}</div>
   <div style="font-size: 0.8rem; padding-bottom: 3px">{{#if:{{{label|}}}|{{{label}}}|{{Lang|key={{{key}}}_label}}}}</div>
   <div class="ac-mainbox-label">{{#if:{{{label|}}}|{{{label}}}|{{Lang|key={{{key}}}_label}}}}</div>
</div></div>
</div></div>
</includeonly><noinclude>
</includeonly><noinclude>

Revision as of 18:54, 2 May 2026

Kudzu Connection


Cast Range 16m





Duration 12s



Number of Charges 0


Cooldown 37s



Connect with a nearby ally to gain bonuses, replicated healing, and ignore the move speed penalty while shooting.

Receive 50% of Bonuses with no connection
Connection requires line of sight.

0m  Move Speed

1  Tether Count

Ability Point1
+2m Move Speed
Ability Point2
+8% Fire Rate and +8% Bullet Lifesteal
Ability Point5
Ability is always active
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