Editing Template:AbilityInteraction/doc

Jump to navigation Jump to search
Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
== Usage ==
== Usage ==


{{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}}.
{{tl|AbilityInteraction}} displays a boxed note describing how a specific ability interacts with an item or mechanic.


To use this template, look at the list of possible Interactions and examples of usage below.
The header colour is set by the {{code|1=type}} parameter ({{code|positive}}, {{code|negative}}, or {{code|info}}). Setting {{code|1=state=disabled}} desaturates the icon to mark an interaction that does not apply.


== Parameters ==
== Parameters ==
Line 11: Line 11:
"description": "",
"description": "",
"params": {
"params": {
"interaction": {
"title": {
"description": "Name of the interaction in the registry. Case-insensitive, and aliases are accepted. The Interactions section of this page lists every available name.",
"description": "Text shown in the box header.",
"type": "string",
"required": true
},
"type": {
"description": "Header colour: positive (green), negative (red), or info (blue).",
"type": "string",
"type": "string",
"required": true,
"required": true,
"example": "debuff resist",
"suggestedvalues": [ "positive", "negative", "info" ]
"suggestedvalues": [ "(see full list below)" ]
},
"iconfile": {
"description": "File name of the icon image, without the File: prefix.",
"type": "string",
"example": "Healing Booster.png",
"required": true
},
"link": {
"description": "Where the header and icon link. A bare page name (e.g. Healing Booster) or a full URL.",
"type": "string",
"example": "Healing Booster",
"required": true
},
},
"text": {
"text": {
"description": "Wikitext shown in the box body. May contain wikilinks, templates such as AbilityIcon, and lists.",
"description": "Wikitext shown in the box body. May contain wikilinks, templates such as AbilityIcon, and <br> for multiple lines.",
"type": "content",
"type": "content"
"required": true
},
},
"state": {
"state": {
"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.",
"description": "Set to disabled to desaturate the icon.",
"type": "string",
"type": "string",
"suggestedvalues": [ "partial", "disabled", "enhanced" ]
"suggestedvalues": [ "disabled" ]
}
}
},
},
"paramOrder": [ "interaction", "text", "state" ],
"paramOrder": [ "title", "text", "type", "iconfile", "link", "state" ],
"format": "block"
"format": "block"
}
}
Line 36: Line 51:
== Examples ==
== Examples ==


=== Standard interaction ===
=== Positive Interaction ===


<pre>
<pre>
{{AbilityInteraction
{{AbilityInteraction
| interaction = Ability Duration
| type    = positive
| text =
| iconfile = Melee Charge.png
Affects the charge's duration and, consequently, distance the charge covers.
| link    = Melee Charge
| title    = Melee
| text     =
* This ability benefits from Melee damage bonuses and triggers relevant item effects.
* Once a T3 upgrade is acquired it's considered a Heavy Melee attack.
}}
}}
</pre>
</pre>
{{AbilityInteraction
{{AbilityInteraction
| interaction = Ability Duration
| type    = positive
| text =
| iconfile = Melee Charge.png
Affects the charge's duration and, consequently, distance the charge covers.
| link    = Melee Charge
| title    = Melee
| text     =
* This ability benefits from Melee damage bonuses and triggers relevant item effects.
* Once a T3 upgrade is acquired it's considered a Heavy Melee attack.
}}
}}


=== Enhanced interaction ===
=== Negative Interaction ===
 
<pre>
<pre>
{{AbilityInteraction
{{AbilityInteraction
| interaction = cooldown
| type    = negative
| state = enhanced
| iconfile = Debuff Reducer.png
| text = Cooldown reduction applies to each charge separately, so it is far more effective here than on a single-charge ability.
| link    = Debuff Reducer
| title    = Debuff Resist
| text     =
[[Debuff Resist]] shortens the duration of movement slow and accuraccy debuff.
 
The duration of damage-over-time effect is '''not''' shortened.
}}
}}
</pre>
</pre>
{{AbilityInteraction
{{AbilityInteraction
| interaction = cooldown
| type    = negative
| state = enhanced
| iconfile = Debuff Reducer.png
| text = Cooldown reduction applies to each charge separately, so it is far more effective here than on a single-charge ability.
| link    = Debuff Reducer
}}
| title    = Debuff Resist
| text     =
[[Debuff Resist]] shortens the duration of movement slow and accuraccy debuff.


=== Partial interaction ===
The duration of damage-over-time effect is '''not''' shortened.
 
<pre>
{{AbilityInteraction
| interaction = unstoppable
| state = partial
| text =
* Dispels and protects against [[Move Slow]].
* Does not dispel or protect against the accuracy debuff.
}}
</pre>
{{AbilityInteraction
| interaction = unstoppable
| state = partial
| text =
* Dispels and protects against [[Move Slow]].
* Does not dispel or protect against the accuracy debuff.
}}
}}


=== Disabled Interaction ===
=== Neutral interaction with disabled state ===


<pre>
<pre>
{{AbilityInteraction
{{AbilityInteraction
| interaction = slowing hex
| type    = info
| state = disabled
| iconfile = Slowing Hex.png
| text = This ability is '''not''' interrupted by [[Slowing Hex]].
| link    = Slowing Hex
| title    = Slowing Hex
| state   = disabled
| text     = This ability is '''not''' interrupted by [[Slowing Hex]].
}}
}}
</pre>
</pre>
{{AbilityInteraction
{{AbilityInteraction
| interaction = slowing hex
| type    = info
| state = disabled
| iconfile = Slowing Hex.png
| text = This ability is '''not''' interrupted by [[Slowing Hex]].
| link    = Slowing Hex
| title    = 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.
{{#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>
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Deadlock:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template