From 37c663dac5d7e03ce04d4b7b5e381909b2630c93 Mon Sep 17 00:00:00 2001 From: Gambit Date: Fri, 8 Mar 2024 19:52:20 -0500 Subject: [PATCH] 0.0.96 --- .github/workflows/main.yml | 2 +- module.json | 2 +- scripts/macros/silveryBarbs.js | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa388990..924d6d6f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: id: set-release-notes-github run: | echo "- Bugfixes:" >> release_notes.txt - echo " - Silvery Barbs: Add additional checks to prevent ally on ally violence." >> release_notes.txt + echo " - Silvery Barbs: Fix attack rolls of allies triggering silvery barbs. Updated Effect icon to use the Silvery Barbs item icon" >> release_notes.txt echo "release-notes-github<> $GITHUB_ENV cat release_notes.txt >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV diff --git a/module.json b/module.json index dae89211..c39719ff 100644 --- a/module.json +++ b/module.json @@ -7,7 +7,7 @@ "name": "Gambit" } ], - "version": "0.0.95", + "version": "0.0.96", "compatibility": { "minimum": "11", "verified": "11", diff --git a/scripts/macros/silveryBarbs.js b/scripts/macros/silveryBarbs.js index 9c33e329..c9a6b6f9 100644 --- a/scripts/macros/silveryBarbs.js +++ b/scripts/macros/silveryBarbs.js @@ -6,6 +6,7 @@ export async function silveryBarbs({workflowData,workflowType}) { const workflowUuid = workflowData; const workflow = await MidiQOL.Workflow.getWorkflow(workflowUuid); if(!workflow) return; + console.log(workflow) if(workflow.item.name.toLowerCase() === "silvery barbs") return; if (!game.combat) return; @@ -103,7 +104,7 @@ export async function silveryBarbs({workflowData,workflowType}) { let targetUuids = Array.from(workflow.saves) .filter(token => token.document.disposition !== validTokenPrimary.document.disposition) .map(token => token.actor.uuid); - if(!targetUuids) return; + if(targetUuids.length === 0) return; let targetNames = Array.from(workflow.saves) .filter(token => token.document.disposition !== validTokenPrimary.document.disposition) .map(token => token.actor.name); @@ -307,6 +308,7 @@ export async function showSilveryBarbsDialog(tokenUuids, actorUuid, tokenUuid, d } let chosenSpell = actor.items.find(i => i.name.toLowerCase() === "silvery barbs"); + console.log(chosenSpell) chosenSpell.prepareData(); chosenSpell.prepareFinalAttributes(); @@ -334,7 +336,7 @@ export async function showSilveryBarbsDialog(tokenUuids, actorUuid, tokenUuid, d let effectData = [ { - "icon": "icons/magic/control/control-influence-puppet.webp", + "icon": `${chosenSpell.img}`, "duration": { "rounds": null, "startTime": null,