Template:AbilityInteraction: Difference between revisionsGive feedback
Accept bare page names for link (resolve to full URL), keep full-URL support, reformat for readability (with help from vergir-bot LLM) |
Remove disabled-state cross overlay; disabled now only desaturates the icon (with help from vergir-bot LLM) |
||
| Line 7: | Line 7: | ||
<div class="ai-icon">{{#if:{{{file|}}} | <div class="ai-icon">{{#if:{{{file|}}} | ||
|[[File:{{{file}}}|48px|link={{#if:{{{link|}}}|{{#ifeq:{{lc:{{padleft:|4|{{{link|}}}}}}}|http|{{{link|}}}|https://deadlock.wiki/{{urlencode:{{{link|}}}|WIKI}}}}}}|alt={{{title|}}}]] | |[[File:{{{file}}}|48px|link={{#if:{{{link|}}}|{{#ifeq:{{lc:{{padleft:|4|{{{link|}}}}}}}|http|{{{link|}}}|https://deadlock.wiki/{{urlencode:{{{link|}}}|WIKI}}}}}}|alt={{{title|}}}]] | ||
}}</div> | |||
<div class="ai-text">{{{text|}}}</div> | <div class="ai-text">{{{text|}}}</div> | ||
</div> | </div> | ||
</div></includeonly><noinclude>{{Documentation}}</noinclude> | </div></includeonly><noinclude>{{Documentation}}</noinclude> | ||
Revision as of 14:03, 14 July 2026
Usage
{{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
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| interaction | interaction | Name of the interaction in the registry. Case-insensitive, and aliases are accepted. The Interactions section of this page lists every available name.
| String | required |
| text | text | Wikitext shown in the box body. May contain wikilinks, templates such as AbilityIcon, and lists. | Content | required |
| state | state | 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.
| String | optional |
Examples
Standard interaction
{{AbilityInteraction
| interaction = Ability Duration
| text =
Affects the charge's duration and, consequently, distance the charge covers.
}}
Enhanced interaction
{{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.
}}
Partial interaction
{{AbilityInteraction
| interaction = unstoppable
| state = partial
| text =
* Dispels and protects against [[Move Slow]].
* Does not dispel or protect against the accuracy debuff.
}}
- Does not dispel or protect against the accuracy debuff.
Disabled Interaction
{{AbilityInteraction
| interaction = slowing hex
| state = disabled
| text = This ability is '''not''' interrupted by [[Slowing Hex]].
}}
Interactions
This table is generated from the registry, so it always matches what the template accepts.
| Interaction | Example |
|---|---|
ability duration / duration / duration extender
|
Example text.
|
ability range / range / greater expansion
|
Example text.
|
cooldown / ability cooldown / superior cooldown
|
Example text.
|
debuff resist / debuff reducer
|
Example text.
|
dispel / dispel magic / purge / cleanse
|
Example text.
|
echo shard
|
Example text.
|
heal / healing / healing booster
|
Example text.
|
heroic aura
|
Example text.
|
indomitable
|
Example text.
|
interrupt / knockdown / stun
|
Example text.
|
monster rounds
|
Example text.
|
plated armor
|
Example text.
|
reactive barrier
|
Example text.
|
slowing hex
|
Example text.
|
stealth / Veil Walker
|
Example text.
|
unstoppable
|
Example text.
|
Adding an interaction
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.