Template:Item-To-Hit: Difference between revisions

From Epic Path
Jump to navigation Jump to search
(Created page with "<noinclude> Outputs the item's to-hit information string as a highlighted block of text. <pre> {{Item-To-Hit}} </pre> * If the CL of the item is <13, the output is: ''When...")
 
No edit summary
 
(4 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"


* If the CL of the item is <13, the output is:
'''Example:'''
''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.''
<pre>
{{Item-To-Hit|14|melee touch}}
</pre>


* If the CL of the item is 13 - 22, the output is:
'''Outputs:'''
''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:
{{Item-To-Hit|14|melee touch}}
''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.''


</noinclude><includeonly>{{#switch:{{#var:CL}}
</noinclude><includeonly>{{Hi|1d20 + {{#expr:{{MonsterAC|transcludesection={{{1}}}}} - {{#switch:{{{2}}}
| 1
| melee = 8
| 2
| melee touch = 6
| 3
| ranged = 8
| 4
| ranged touch = 6
| 5
| #default = 6
| 6
}}}}}} {{#switch:{{{2}}}
| 7
| melee
| 8
| ranged = vs. the target's AC
| 9
| melee touch
| 10
| ranged touch = vs. the target's AC (always hits on a die result of 17 or better)
| 11
| #default = vs. the target's AC (always hits on a die result of 17 or better)
| 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)