Template:Item-To-Hit: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
<pre> | <pre> | ||
{{Item-To-Hit| | {{Item-To-Hit|<CL>|<Type>}} | ||
</pre> | </pre> | ||
There are two parameters that should be filled in: | |||
* '''<CL>''' - Mandatory; the CL of the magic item. Any number between 1 and 40. | |||
* '''<Type>''' - Optional; the type of attack. Options include: "melee", "melee touch", "ranged", and "ranged touch". This will default to "ranged touch" | |||
Example: | '''Example:''' | ||
<pre> | <pre> | ||
{{Item-To-Hit|14}} | {{Item-To-Hit|14|melee touch}} | ||
</pre> | </pre> | ||
'''Outputs:''' | |||
'' | |||
{{Item-To-Hit|14|melee touch}} | |||
</noinclude><includeonly>{{Hi|1d20 + {{#expr:{{MonsterAC|transcludesection={{{1}}}}} - {{#switch:{{{2}}} | |||
| melee = 8 | |||
| melee touch = 6 | |||
| ranged = 8 | |||
| | | ranged touch = 6 | ||
| #default = 6 | |||
}}}}}} {{#switch:{{{2}}} | |||
| melee | |||
| ranged = vs. the target's AC | |||
| 6 | | melee touch | ||
| | | ranged touch = vs. the target's AC (always hits on a die result of 17 or better) | ||
| #default = vs. the target's AC (always hits on a die result of 17 or better) | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| #default = | |||
}}</includeonly> | }}</includeonly> |
Latest revision as of 16:48, 1 August 2019
Outputs the item's to-hit information string as a highlighted block of text.
{{Item-To-Hit|<CL>|<Type>}}
There are two parameters that should be filled in:
- <CL> - Mandatory; the CL of the magic item. Any number between 1 and 40.
- <Type> - Optional; the type of attack. Options include: "melee", "melee touch", "ranged", and "ranged touch". This will default to "ranged touch"
Example:
{{Item-To-Hit|14|melee touch}}
Outputs:
1d20 + 30 vs. the target's AC (always hits on a die result of 17 or better)