User:Vergir/AbilityInteraction: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Vergir (talk | contribs)
Rewrite as pure wikitext using #switch — removes Lua dependency since Module: namespace unavailable in userspace (with help from vergir-bot LLM)
Vergir (talk | contribs)
Add new interaction types, drop "Interactions:" prefix from header label (with help from vergir-bot LLM)
Line 2: Line 2:
   AbilityInteraction: renders one styled interaction row.
   AbilityInteraction: renders one styled interaction row.
   Parameters:
   Parameters:
     type  - interaction type key (see valid values below)
     type  - interaction type key (see valid values in doc)
     text  - freeform wikitext description
     text  - freeform wikitext description
-->
-->
Line 8: Line 8:
<div class="ability-interaction" style="margin-bottom:4px; border-radius:4px; overflow:hidden; font-family:'Open Sans','PT Serif',serif;">
<div class="ability-interaction" style="margin-bottom:4px; border-radius:4px; overflow:hidden; font-family:'Open Sans','PT Serif',serif;">
   <div style="background:{{#switch:{{{type|}}}
   <div style="background:{{#switch:{{{type|}}}
     | debuff_immunity = #4a7fa5
     | debuff_immunity   = #4a7fa5
     | unstoppable     = #a07830
     | unstoppable       = #a07830
     | silence         = #7a5a9a
     | silence           = #7a5a9a
     | stun           = #7a5a9a
     | stun               = #7a5a9a
     | disjoint       = #4a6a5a
     | disjoint           = #4a6a5a
     | invincibility   = #4a7fa5
     | invincibility     = #4a7fa5
     | sleep           = #5a6a8a
     | sleep             = #5a6a8a
     | purge           = #4a7a6a
     | purge             = #4a7a6a
     | lifestealing   = #3a7a4a
     | lifestealing       = #3a7a4a
     | barrier         = #3a7a4a
     | barrier           = #3a7a4a
     | illusions       = #5a5a7a
     | illusions         = #5a5a7a
     | phase           = #5a5a7a
     | phase             = #5a5a7a
     | #default       = #555555
    | counterspell      = #4a5a7a
    | debuff_reduction  = #4a6a7a
    | dispel_magic      = #4a7a6a
    | slowing_hex        = #6a5a7a
    | ability_range      = #5a6a4a
    | ability_duration  = #5a5a6a
    | charges            = #7a5a4a
     | #default           = #555555
   }}; padding:4px 8px; font-weight:bold; font-size:0.85rem; display:flex; align-items:center; gap:6px; color:#FFEFD7;">[[File:{{#switch:{{{type|}}}
   }}; padding:4px 8px; font-weight:bold; font-size:0.85rem; display:flex; align-items:center; gap:6px; color:#FFEFD7;">[[File:{{#switch:{{{type|}}}
     | debuff_immunity = Status_Debuff_Immune.png
     | debuff_immunity   = Status_Debuff_Immune.png
     | unstoppable     = Unstoppable Symbol.png
     | unstoppable       = Unstoppable Symbol.png
     | silence         = Silence.png
     | silence           = Silence.png
     | stun           = Status_Stun.png
     | stun               = Status_Stun.png
     | disjoint       = Status_Displacement.png
     | disjoint           = Status_Displacement.png
     | invincibility   = Metal Skin Old.png
     | invincibility     = Metal Skin Old.png
     | sleep           = Status_Sleep.png
     | sleep             = Status_Sleep.png
     | purge           = Debuff_Remover.png
     | purge             = Debuff_Remover.png
     | lifestealing   = Healing.png
     | lifestealing       = Healing.png
     | barrier         = Barrier.png
     | barrier           = Barrier.png
     | illusions       = Invisible.png
     | illusions         = Invisible.png
     | phase           = Status_Unstoppable.png
     | phase             = Status_Unstoppable.png
     | #default       = GenericProperty.png
    | counterspell      = Counterspell.png
   }}|20px|link=]] Interactions: {{#switch:{{{type|}}}
    | debuff_reduction  = Debuff_Reducer.png
     | debuff_immunity = Debuff Immunity
    | dispel_magic      = Dispel_Magic.png
     | unstoppable     = Unstoppable
    | slowing_hex        = Slowing_Hex.png
     | silence         = Silence
    | ability_range      = Greater_Expansion.png
     | stun           = Stun
    | ability_duration  = Duration_Extender.png
     | disjoint       = Disjoint
    | charges            = Rapid_Recharge.png
     | invincibility   = Invincibility
     | #default           = GenericProperty.png
     | sleep           = Sleep
   }}|20px|link=]] {{#switch:{{{type|}}}
     | purge           = Purge
     | debuff_immunity   = [[Debuff Resist|Debuff Immunity]]
     | lifestealing   = Lifestealing
     | unstoppable       = [[Status Effects#Unstoppable|Unstoppable]]
     | barrier         = Barrier
     | silence           = [[Silence]]
     | illusions       = Illusions
     | stun               = [[Stun]]
     | phase           = Phased Units
     | disjoint           = Disjoint
     | #default       = {{#if:{{{type|}}}|Unknown type: {{{type}}}|''(no type provided)''}}
     | invincibility     = [[Status Effects#Invincibility|Invincibility]]
     | sleep             = [[Status Effects#Sleep|Sleep]]
     | purge             = Purge
     | lifestealing       = Lifestealing
     | barrier           = [[Barrier]]
     | illusions         = Illusions
     | phase             = Phased Units
    | counterspell      = {{ItemIcon|Counterspell}}
    | debuff_reduction  = [[Debuff Resist|Debuff Reduction]]
    | dispel_magic      = {{ItemIcon|Dispel Magic}}
    | slowing_hex        = {{ItemIcon|Slowing Hex}}
    | ability_range      = [[Ability Range|Ability Range]] ({{ItemIcon|Greater Expansion}})
    | ability_duration  = [[Ability Duration|Ability Duration]] ({{ItemIcon|Duration Extender}})
    | charges            = Charges ({{ItemIcon|Rapid Recharge}})
     | #default           = {{#if:{{{type|}}}|<span style="color:red;">Unknown type: <code>{{{type}}}</code></span>|''(no type provided)''}}
   }}</div>
   }}</div>
   <div style="background:#1e1a22; padding:6px 10px; font-size:0.85rem; color:#FFEFD7;">{{{text|}}}</div>
   <div style="background:#1e1a22; padding:6px 10px; font-size:0.85rem; color:#FFEFD7;">{{{text|}}}</div>
Line 66: Line 87:


=== Valid type values ===
=== Valid type values ===
The canonical list of types is documented in [[User:Vergir/Module:InteractionTypes]]. Adding a new type requires updating both this template's <code>#switch</code> blocks and that module.
The canonical list of types is also documented in [[User:Vergir/Module:InteractionTypes]]. Adding a new type requires updating both this template's <code>#switch</code> blocks and that module.


; Status effects
* <code>debuff_immunity</code> — [[Debuff Resist|Debuff Immunity]]
* <code>debuff_immunity</code> — [[Debuff Resist|Debuff Immunity]]
* <code>unstoppable</code> — [[Status Effects#Unstoppable|Unstoppable]]
* <code>unstoppable</code> — [[Status Effects#Unstoppable|Unstoppable]]
Line 80: Line 102:
* <code>illusions</code> — Illusions
* <code>illusions</code> — Illusions
* <code>phase</code> — Phased Units
* <code>phase</code> — Phased Units
; Items
* <code>counterspell</code> — [[Counterspell]]
* <code>debuff_reduction</code> — [[Debuff Resist|Debuff Reduction]] (icon: [[Debuff Reducer]])
* <code>dispel_magic</code> — [[Dispel Magic]]
* <code>slowing_hex</code> — [[Slowing Hex]]
* <code>ability_range</code> — [[Ability Range]] (icon: [[Greater Expansion]])
* <code>ability_duration</code> — [[Ability Duration]] (icon: [[Duration Extender]])
* <code>charges</code> — Charges (icon: [[Rapid Recharge]])


=== Example ===
=== Example ===

Revision as of 15:01, 29 April 2026

Overview

Renders a single styled interaction row for use inside the interactions= parameter of User:Vergir/AbilitySection.

Parameters

Parameter Description Required
type Interaction type key. Must be one of the valid values below. Yes
text Description of the interaction. Freeform wikitext; may span multiple lines, include links, templates, and bullet points. Yes

Valid type values

The canonical list of types is also documented in User:Vergir/Module:InteractionTypes. Adding a new type requires updating both this template's #switch blocks and that module.

Status effects
Items

Example

{{User:Vergir/AbilityInteraction
| type = disjoint
| text =
The projectile can be disjointed before impact.
Disjointing prevents both the impact damage and the explosion.
}}