Skip to content

Commit

Permalink
Added Support for pf2e-toolbelt targets
Browse files Browse the repository at this point in the history
  • Loading branch information
ChasarooniZ committed Nov 28, 2023
1 parent b1429cf commit 4bf3b24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Hooks.on("createChatMessage", async function (msg, status, id) {
export function getTargetList(msg) {
if (msg.flags?.["pf2e-target-damage"]?.targets) {
return msg.flags['pf2e-target-damage'].targets.map(t => t.id);
} else if (msg.flags?.["pf2e-toolbelt"]?.target?.targets) {
return msg.flags?.["pf2e-toolbelt"].target.targets.map(t => t.token.split(".").pop());
} else { // No pf2e target damage module
return [msg?.target?.token?.id ?? msg.token.id];
}
Expand Down

0 comments on commit 4bf3b24

Please sign in to comment.