Template:AbilitySection/doc: Difference between revisionsGive feedback
m (ninjafix) |
Improve doc: add templatedata, type column, inline examples, live render (with help from vergir-bot LLM) |
||
| Line 6: | Line 6: | ||
Intended to replace [[Template:Ability tabs]] on hero pages. Editors place four of these blocks in sequence, one per ability, each under its own <code>=== Ability Name ===</code> heading directly on the hero page. | Intended to replace [[Template:Ability tabs]] on hero pages. Editors place four of these blocks in sequence, one per ability, each under its own <code>=== Ability Name ===</code> heading directly on the hero page. | ||
Tab visibility rules: | |||
* Only tabs with content are shown. | |||
* A <code>Show All</code> tab is appended automatically if two or more tabs have content. | |||
* If no content parameters are provided, no details panel is rendered at all — only the ability card. | |||
=== Parameters === | === Parameters === | ||
{ | <templatedata> | ||
{ | |||
"description": "Two-column ability layout with card on the left and optional tabbed notes panel on the right.", | |||
"params": { | |||
"hero_name": { | |||
"description": "Hero name, passed to Template:Ability card v2.", | |||
"example": "Abrams", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"ability_num": { | |||
"description": "Ability index (1–4), passed to Template:Ability card v2.", | |||
"example": "1", | |||
"type": "number", | |||
"required": true | |||
}, | |||
"notes": { | |||
"description": "Wikitext for the Notes tab. Supports bullet points, links, and templates. If taller than the max-height in the stylesheet, the panel will scroll rather than expand.", | |||
"example": "* Bells can be detonated by [[Melee Attack|melee attacks]].\n* Can be shot to detonate early.", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"interactions": { | |||
"description": "Wikitext for the Interactions tab. Typically one or more {{AbilityInteraction}} calls.", | |||
"example": "{{AbilityInteraction|type=counterspell|text=Counterspell blocks the slow debuff but not the damage.}}", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"tips": { | |||
"description": "Wikitext for the Tips tab. Supports bullet points, links, and templates.", | |||
"example": "* T3 talent allows stacking several bells for high damage traps.", | |||
"type": "string", | |||
"required": false | |||
} | |||
}, | |||
"paramOrder": [ | |||
"hero_name", | |||
"ability_num", | |||
"notes", | |||
"interactions", | |||
"tips" | |||
] | |||
} | |||
</templatedata> | |||
=== Example === | === Example === | ||
| Line 38: | Line 69: | ||
| notes = | | notes = | ||
* Bells can be detonated by [[Melee Attack|melee attacks]]. | * Bells can be detonated by [[Melee Attack|melee attacks]]. | ||
* Can be shot to detonate early. | |||
* | | tips = | ||
| tips = | * T3 talent allows stacking several bells for high damage traps. | ||
* T3 talent allows stacking several bells for | |||
}} | }} | ||
</pre> | </pre> | ||
=== Call Bell === | |||
{{AbilitySection | |||
| hero_name = The Doorman | |||
| ability_num = 1 | |||
| notes = | |||
* Bells can be detonated by [[Melee Attack|melee attacks]]. | |||
* Can be shot to detonate early. | |||
| tips = | |||
* T3 talent allows stacking several bells for high damage traps. | |||
}} | |||
=== Related pages === | === Related pages === | ||