Template:AbilityInteraction: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Vergir (talk | contribs)
Restrict type to positive/negative/info, drop neutral default (with help from vergir-bot LLM)
Vergir (talk | contribs)
Split the box markup out into Template:IconBox; AbilityInteraction now resolves an interaction name against a registry in Module:AbilityInteraction (with help from vergir-bot LLM)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><templatestyles src="AbilityInteraction/styles.css" /><div class="ai-box {{#if:{{{type|}}}|ai-type-{{{type}}}}} {{#ifeq:{{lc:{{{state|}}}}}|disabled|ai-disabled}}">
<includeonly>{{#invoke:AbilityInteraction|box}}</includeonly><noinclude>{{Documentation}}</noinclude>
<div class="ai-header plainlinks">{{#if:{{{link|}}}|[{{{link}}} {{{title|}}}]|{{{title|}}}}}</div>
<div class="ai-body">
<div class="ai-icon">{{#if:{{{file|}}}|[[File:{{{file}}}|48px|link={{{link|}}}|alt={{{title|}}}]]}}{{#ifeq:{{lc:{{{state|}}}}}|disabled|<span class="ai-cross"></span>}}</div>
<div class="ai-text">{{{text|}}}</div>
</div>
</div></includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 14:17, 15 July 2026

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

{{AbilityInteraction}} displays a boxed note describing how an ability interacts with an item or mechanic. Under the hood it is a fancy wrapper around {{IconBox}}.

To use this template, look at the list of possible Interactions and examples of usage below.

Parameters

[edit source]

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
interactioninteraction

Name of the interaction in the registry. Case-insensitive, and aliases are accepted. The Interactions section of this page lists every available name.

Suggested values
(see full list below)
Example
debuff resist
Stringrequired
texttext

Wikitext shown in the box body. May contain wikilinks, templates such as AbilityIcon, and lists.

Contentrequired
statestate

Omit when the interaction applies normally. Use partial when it applies only in part, disabled when it does not apply at all, or enhanced when it applies more strongly than usual.

Suggested values
partial disabled enhanced
Stringoptional

Examples

[edit source]

Standard interaction

[edit source]
{{AbilityInteraction
| interaction = Ability Duration
| text =
Affects the charge's duration and, consequently, distance the charge covers.
}}
Ability Duration

Affects the charge's duration and, consequently, distance the charge covers.

Enhanced interaction

[edit source]
{{AbilityInteraction
| interaction = cooldown
| state = enhanced
| text = Cooldown reduction applies to each charge separately, so it is far more effective here than on a single-charge ability.
}}
Ability Cooldown Reduction

Cooldown reduction applies to each charge separately, so it is far more effective here than on a single-charge ability.

Partial interaction

[edit source]
{{AbilityInteraction
| interaction = unstoppable
| state = partial
| text =
* Dispels and protects against [[Move Slow]].
* Does not dispel or protect against the accuracy debuff.
}}
Unstoppable
  • Dispels and protects against Move Slow.
  • Does not dispel or protect against the accuracy debuff.

Disabled Interaction

[edit source]
{{AbilityInteraction
| interaction = slowing hex
| state = disabled
| text = This ability is '''not''' interrupted by [[Slowing Hex]].
}}
Slowing Hex

This ability is not interrupted by Slowing Hex.

Interactions

[edit source]

This table is generated from the registry, so it always matches what the template accepts.

Interaction Example
ability duration / duration / duration extender
Ability Duration

Example text.

ability range / range / greater expansion
Ability Range

Example text.

cooldown / ability cooldown / superior cooldown
debuff resist / debuff reducer
Debuff Resist

Example text.

dispel / dispel magic / purge / cleanse
Dispel

Example text.

echo shard
Echo Shard

Example text.

heal / healing / healing booster
Healing

Example text.

heroic aura
Heroic Aura

Example text.

indomitable
Indomitable

Example text.

interrupt / knockdown / stun
Interrupt

Example text.

monster rounds
Monster Rounds

Example text.

plated armor
Plated Armor

Example text.

reactive barrier
Reactive Barrier

Example text.

slowing hex
Slowing Hex

Example text.

stealth / Veil Walker
Stealth

Example text.

unstoppable
Unstoppable

Example text.

Adding an interaction

[edit source]

Add an entry to the REGISTRY table at the top of Module:AbilityInteraction. An entry should contain title, type, iconfile, and link, which pass down to the underlying {{IconBox}}. The aliases just specifies different ways to write an interaction.

Note that the type of the interaction (positive/negative/info) should be chosen according to whether that interaction enhances the ability (positive) or hampers it (negative).