User:Vergir/AbilityInteraction: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Replace ItemIcon with plain links in headers; update colors to weapon/vitality/spirit/grey; rename debuff_reduction→debuff_resist, slowing_hex→movement_restriction (with help from vergir-bot LLM) |
Hardcode color per type, remove color param; update doc (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 | type - interaction type key (see valid values in doc) | ||
text - freeform wikitext description | |||
text | |||
Color | Color is determined by type automatically: | ||
vitality (#86c921) : unstoppable, counterspell, debuff_resist, dispel_magic | |||
spirit (#de80ff) : movement_restriction, ability_range, ability_duration, charges | |||
spirit | default (#6b7280) : fallback for unknown types | ||
default | |||
--> | --> | ||
{{#if: {{{type|}}} | | {{#if: {{{type|}}} | | ||
<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:{{{ | <div style="background:{{#switch:{{{type|}}} | ||
| | | unstoppable = #86c921 | ||
| | | counterspell = #86c921 | ||
| | | debuff_resist = #86c921 | ||
| #default = #6b7280 | | dispel_magic = #86c921 | ||
| movement_restriction = #de80ff | |||
| ability_range = #de80ff | |||
| ability_duration = #de80ff | |||
| charges = #de80ff | |||
| #default = #6b7280 | |||
}}; 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|}}} | ||
| unstoppable = Unstoppable Symbol.png | | unstoppable = Unstoppable Symbol.png | ||
| Line 51: | Line 54: | ||
|- | |- | ||
| <code>type</code> || Interaction type key. Must be one of the valid values below. || Yes | | <code>type</code> || Interaction type key. Must be one of the valid values below. || Yes | ||
|- | |- | ||
| <code>text</code> || Description of the interaction. Freeform wikitext; may span multiple lines, include links, templates, and bullet points. || Yes | | <code>text</code> || Description of the interaction. Freeform wikitext; may span multiple lines, include links, templates, and bullet points. || Yes | ||
|} | |} | ||
Color is determined automatically by type — editors do not set it. | |||
=== Valid type values === | === Valid type values === | ||
Adding a new type requires updating the three <code>#switch</code> blocks in this template (color, icon, label). | Adding a new type requires updating the three <code>#switch</code> blocks in this template (color, icon, label). | ||
; Vitality (green, #86c921) | |||
* <code>unstoppable</code> — [[Status Effects#Unstoppable|Unstoppable]] | * <code>unstoppable</code> — [[Status Effects#Unstoppable|Unstoppable]] | ||
* <code>counterspell</code> — [[Counterspell]] | * <code>counterspell</code> — [[Counterspell]] | ||
* <code>debuff_resist</code> — [[Debuff Resist]] | * <code>debuff_resist</code> — [[Debuff Resist]] | ||
* <code>dispel_magic</code> — [[Dispel Magic]] | * <code>dispel_magic</code> — [[Dispel Magic]] | ||
; Spirit (purple, #de80ff) | |||
* <code>movement_restriction</code> — [[Slowing Hex|Movement Restriction]] | * <code>movement_restriction</code> — [[Slowing Hex|Movement Restriction]] | ||
* <code>ability_range</code> — [[Ability Range]] | * <code>ability_range</code> — [[Ability Range]] | ||
| Line 79: | Line 78: | ||
<pre> | <pre> | ||
{{User:Vergir/AbilityInteraction | {{User:Vergir/AbilityInteraction | ||
| type | | type = counterspell | ||
| text = [[Counterspell]] blocks the slow and accuracy debuff, but not the damage. | |||
| text | |||
}} | }} | ||
</pre> | </pre> | ||
</noinclude> | </noinclude> | ||
Revision as of 15:58, 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 |
Color is determined automatically by type — editors do not set it.
Valid type values
Adding a new type requires updating the three #switch blocks in this template (color, icon, label).
- Vitality (green, #86c921)
unstoppable— Unstoppablecounterspell— Counterspelldebuff_resist— Debuff Resistdispel_magic— Dispel Magic
- Spirit (purple, #de80ff)
movement_restriction— Movement Restrictionability_range— Ability Rangeability_duration— Ability Durationcharges— Charges
Example
{{User:Vergir/AbilityInteraction
| type = counterspell
| text = [[Counterspell]] blocks the slow and accuracy debuff, but not the damage.
}}