Template:Attack roll: Difference between revisions

From Baldur's Gate 3 Wiki
Jump to navigation Jump to search
(Added switch to prevent "Yes attack roll")
(Changed so "attack roll = yes" and other values returns "Attack roll" instead of "attack roll")
Line 1: Line 1:
<includeonly>{{SmallIcon|Attack Roll Icon.png}}{{#if:{{{1|}}}|{{#switch:{{lc:{{{1}}}}}
<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|}}}}}|
| melee weapon = Melee weapon
{{#switch:{{lc:{{{1|}}}}}
| melee spell = Melee spell
| melee weapon = {{{1|}}}
| melee unarmed = Melee unarmed
| melee spell = {{{1|}}}
| melee off-hand weapon = Melee off-hand weapon
| melee unarmed = {{{1|}}}
| ranged weapon = Ranged weapon
| melee off-hand weapon = {{{1|}}}
| ranged spell = Ranged spell
| ranged weapon = {{{1|}}}
| ranged unarmed = Ranged unarmed
| ranged spell = {{{1|}}}
| ranged off-hand weapon = Ranged off-hand weapon
| ranged unarmed = {{{1|}}}
| #default =  
| ranged off-hand weapon = {{{1|}}}
}} [[attack roll]]|[[Attack roll]]}}
| #default = no type
}}|{{ucfirst:{{lc:{{{1}}}}}}} [[attack roll]]|[[Attack roll]]}}
</includeonly><noinclude>
</includeonly><noinclude>
Usage: {{code|<nowiki>{{Attack roll|<Type>}}</nowiki>}}
Usage: {{code|<nowiki>{{Attack roll|<Type>}}</nowiki>}}

Revision as of 16:03, 11 January 2024

Usage: {{Attack roll|<Type>}}


Example: {{Attack roll}}

Result: Attack roll


Example: {{Attack roll|melee weapon}}

Result: Melee weapon attack roll


Example: {{Attack roll|ranged weapon}}

Result: Ranged weapon attack roll


Example: {{Attack roll|melee unarmed}}

Result: Melee unarmed attack roll


Example: {{Attack roll|ranged spell}}

Result: Ranged spell attack roll


No description.

Template parameters

ParameterDescriptionTypeStatus
type1

The type of attack roll.

Suggested values
melee weapon melee spell melee unarmed melee off-hand weapon ranged weapon ranged spell ranged unarmed ranged off-hand weapon
Stringoptional