Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
theripper93 committed Jan 5, 2025
1 parent 347076e commit 5fdbd17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -741,13 +741,16 @@ export function initConfig() {
}

get targets() {
console.log("Targets")
const item = this.activity;
const validTargets = ["creature", "ally", "enemy"];
const actionType = item.actionType;
const affects = item.target?.affects ?? {};
const targetType = affects.type;
if (!item.target?.template?.units && validTargets.includes(targetType)) {
return affects.count ?? 1;
} else if (validTargets.includes(targetType) && affects.count) {
return affects.count;
} else if (actionType === "mwak" || actionType === "rwak" || actionType === "msak" || actionType === "rsak") {
return affects.count || 1;
}
Expand Down

0 comments on commit 5fdbd17

Please sign in to comment.