Template:AbilityInteraction/doc: Difference between revisionsGive feedback
mNo edit summary |
Restore original wording of the text param description (with help from vergir-bot LLM) |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
== Usage == | == Usage == | ||
{{tl|AbilityInteraction}} displays a boxed note describing how | {{tl|AbilityInteraction}} displays a boxed note describing how an ability interacts with an item or mechanic. Under the hood it is a fancy wrapper around {{tl|IconBox}}. | ||
To use this template, look at the list of possible Interactions and examples of usage below. | |||
== Parameters == | == Parameters == | ||
| Line 11: | Line 11: | ||
"description": "", | "description": "", | ||
"params": { | "params": { | ||
" | "interaction": { | ||
"description": " | "description": "Name of the interaction in the registry. Case-insensitive, and aliases are accepted. The Interactions section of this page lists every available name.", | ||
"type": "string", | "type": "string", | ||
"required": true, | "required": true, | ||
" | "example": "debuff resist", | ||
"suggestedvalues": [ "(see full list below)" ] | |||
}, | }, | ||
" | "text": { | ||
"description": " | "description": "Wikitext shown in the box body. May contain wikilinks, templates such as AbilityIcon, and lists.", | ||
"type": " | "type": "content", | ||
"required": true | "required": true | ||
}, | }, | ||
"state": { | "state": { | ||
"description": " | "description": "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.", | ||
"type": "string", | "type": "string", | ||
"suggestedvalues": [ "disabled" ] | "suggestedvalues": [ "partial", "disabled", "enhanced" ] | ||
} | } | ||
}, | }, | ||
"paramOrder": [ " | "paramOrder": [ "interaction", "text", "state" ], | ||
"format": "block" | "format": "block" | ||
} | } | ||
| Line 51: | Line 36: | ||
== Examples == | == Examples == | ||
=== | === Standard interaction === | ||
<pre> | <pre> | ||
{{AbilityInteraction | {{AbilityInteraction | ||
| | | interaction = Ability Duration | ||
| text = | |||
Affects the charge's duration and, consequently, distance the charge covers. | |||
| text | |||
}} | }} | ||
</pre> | </pre> | ||
{{AbilityInteraction | {{AbilityInteraction | ||
| | | interaction = Ability Duration | ||
| text = | |||
Affects the charge's duration and, consequently, distance the charge covers. | |||
| text | |||
}} | }} | ||
=== | === Enhanced interaction === | ||
<pre> | <pre> | ||
{{AbilityInteraction | {{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. | ||
| | }} | ||
| text | </pre> | ||
{{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 === | |||
<pre> | |||
{{AbilityInteraction | |||
| interaction = unstoppable | |||
| state = partial | |||
| text = | |||
* Dispels and protects against [[Move Slow]]. | |||
* Does not dispel or protect against the accuracy debuff. | |||
}} | }} | ||
</pre> | </pre> | ||
{{AbilityInteraction | {{AbilityInteraction | ||
| | | interaction = unstoppable | ||
| | | state = partial | ||
| text = | |||
* Dispels and protects against [[Move Slow]]. | |||
| text | * Does not dispel or protect against the accuracy debuff. | ||
[[ | |||
}} | }} | ||
=== | === Disabled Interaction === | ||
<pre> | <pre> | ||
{{AbilityInteraction | {{AbilityInteraction | ||
| | | interaction = slowing hex | ||
| state = disabled | | state = disabled | ||
| text | | text = This ability is '''not''' interrupted by [[Slowing Hex]]. | ||
}} | }} | ||
</pre> | </pre> | ||
{{AbilityInteraction | {{AbilityInteraction | ||
| | | interaction = slowing hex | ||
| state = disabled | | state = disabled | ||
| text | | 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. | |||
{{#invoke:AbilityInteraction|list}} | |||
=== Adding an interaction === | |||
Add an entry to the {{code|REGISTRY}} table at the top of [[Module:AbilityInteraction]]. An entry should contain {{code|title}}, {{code|type}}, {{code|iconfile}}, and {{code|link}}, which pass down to the underlying {{tl|IconBox}}. The {{code|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). | |||
<noinclude>[[Category:Template documentation]]</noinclude> | <noinclude>[[Category:Template documentation]]</noinclude> | ||