Skip to content

Commit 7169d20

Browse files
authoredOct 15, 2020
Merge pull request foundry-vtt-community#138 from LEL-15/patch-9
Create spell_attack
2 parents 9d78d37 + 3332020 commit 7169d20

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎pf2e/spell_attack.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//Spell Attack: This rolls the spell attack for any "Spontaneous Primal Spells".
2+
//Replace the name with whatever the name of your Spellcasting Entry is in your spellbook to roll that spell attack.
3+
4+
let name = 'Spontaneous Primal Spells';
5+
6+
let modifier = (actor.data.items).find(item => item.name
7+
== name).data.spelldc.value;
8+
9+
const roll = new Roll('1d20+' + modifier);
10+
11+
roll.roll();
12+
13+
roll.toMessage({ flavor: "Spell Attack", speaker: ChatMessage.getSpeaker({actor: actor})});

0 commit comments

Comments
 (0)
Please sign in to comment.