Template:Attack roll: Difference between revisions
Jump to navigation
Jump to search
(casing) |
HiddenDragon (talk | contribs) mNo edit summary |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{SmallIcon|Attack Roll Icon.png}} [[Attack roll]] | <includeonly>{{SmallIcon|Attack Roll Icon.png}}<!--Switch so "attack roll = yes" on page templates returns "Attack roll" instead of "Yes attack roll" or "attack roll"-->{{#ifeq:{{lc:{{{1|}}}}}| | ||
{{#switch:{{lc:{{{1|}}}}} | |||
| melee weapon = {{{1|}}} | |||
| melee spell = {{{1|}}} | |||
| melee unarmed = {{{1|}}} | |||
| melee off-hand weapon = {{{1|}}} | |||
| ranged weapon = {{{1|}}} | |||
| ranged spell = {{{1|}}} | |||
| ranged unarmed = {{{1|}}} | |||
| ranged off-hand weapon = {{{1|}}} | |||
| #default = no type | |||
}}|{{ucfirst:{{lc:{{{1}}}}}}} [[attack roll]]|[[Attack roll]]}}</includeonly><noinclude>{{documentation|content= | |||
Displays "attack roll" with associated icon. | |||
== Examples == | |||
{{Template demo | |||
| style = table | |||
| <nowiki>{{Attack roll|<Type>}}</nowiki> | |||
| <nowiki>{{Attack roll}}</nowiki> | |||
| <nowiki>{{Attack roll|melee weapon}}</nowiki> | |||
| <nowiki>{{Attack roll|ranged weapon}}</nowiki> | |||
| <nowiki>{{Attack roll|melee unarmed}}</nowiki> | |||
| <nowiki>{{Attack roll|ranged spell}}</nowiki> | |||
}} | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"label": "type", | |||
"description": "The type of attack roll.", | |||
"type": "string", | |||
"suggestedvalues": [ | |||
"melee weapon", | |||
"melee spell", | |||
"melee unarmed", | |||
"melee off-hand weapon", | |||
"ranged weapon", | |||
"ranged spell", | |||
"ranged unarmed", | |||
"ranged off-hand weapon" | |||
] | |||
} | |||
} | |||
} | |||
</templatedata> | |||
}} | |||
[[Category:Templates]] | |||
[[Category:Link templates]] | |||
</noinclude> |
Latest revision as of 23:39, 19 January 2025
Template documentation
Displays "attack roll" with associated icon.
Examples
Markup | Renders as |
---|---|
{{Attack roll|<Type>}} | ![]() |
{{Attack roll}} | ![]() |
{{Attack roll|melee weapon}} | ![]() |
{{Attack roll|ranged weapon}} | ![]() |
{{Attack roll|melee unarmed}} | ![]() |
{{Attack roll|ranged spell}} | ![]() |
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
type | 1 | The type of attack roll.
| String | optional |