Template:Item-To-Hit: Difference between revisions

From Epic Path
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:


<pre>
<pre>
{{Item-To-Hit|##}}
{{Item-To-Hit|<CL>|<Type>}}
</pre>
</pre>


where '##' is the CL of the item (you have to include it in the call, or it won't know).
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>


* If the CL of the item is <13, the output is:
'''Outputs:'''
''When attacking, roll {{Hi|1d20 + 2 vs. the target's Touch AC}}.  This to-hit number is not modified in anyway from your character's ability scores, class features, feats, other magic items, etc.''


* If the CL of the item is 13 - 22, the output is:
{{Item-To-Hit|14|melee touch}}
''When attacking, roll {{Hi|1d20 + 5 vs. the target's Touch AC}}.  This to-hit number is not modified in anyway from your character's ability scores, class features, feats, other magic items, etc.''


* If the CL of the item is >22, the output is:
</noinclude><includeonly>{{Hi|1d20 + {{#expr:{{MonsterAC|transcludesection={{{1}}}}} - {{#switch:{{{2}}}
''When attacking, roll {{Hi|1d20 + 8 vs. the target's Touch AC}}.  This to-hit number is not modified in anyway from your character's ability scores, class features, feats, other magic items, etc.''
| melee = 8
 
| melee touch = 6
</noinclude><includeonly>{{#switch:{{{1}}}
| ranged = 8
| 1
| ranged touch = 6
| 2
| #default = 6
| 3
}}}}}} {{#switch:{{{2}}}
| 4
| melee
| 5
| ranged = vs. the target's AC
| 6
| melee touch
| 7
| ranged touch = vs. the target's AC (always hits on a die result of 17 or better)
| 8
| #default = vs. the target's AC (always hits on a die result of 17 or better)
| 9
| 10
| 11
| 12 = When attacking, roll {{Hi|1d20 + 2 vs. the target's Touch AC}}.  This to-hit number is not modified in anyway from your character's ability scores, class features, feats, other magic items, etc.
| 13
| 14
| 15
| 16
| 17
| 18
| 19
| 20
| 21
| 22 = When attacking, roll {{Hi|1d20 + 5 vs. the target's Touch AC}}.  This to-hit number is not modified in anyway from your character's ability scores, class features, feats, other magic items, etc.
| 23
| 24
| 25
| 26
| 27
| 28
| 29
| 30
| 31
| 32
| 33
| 34
| 35 = When attacking, roll {{Hi|1d20 + 8 vs. the target's Touch AC}}.  This to-hit number is not modified in anyway from your character's ability scores, class features, feats, other magic items, etc.
| #default = When attacking, roll {{Hi|1d20 + 2 vs. the target's Touch AC}}.  This to-hit number is not modified in anyway from your character's ability scores, class features, feats, other magic items, etc.
}}</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)