From df607d4d66877ce333e4ddaf983318ccf2f9cdcc Mon Sep 17 00:00:00 2001 From: Mike Bloy Date: Sun, 21 Apr 2024 13:43:02 -0500 Subject: [PATCH] collected updates --- CHANGELOG.md | 11 + config/token-variants-global-mappings.json | 1538 +++++++++++------ ...raw_from_Action_Deck_TQKafoef4sHnDYDk.json | 6 +- scripts/rollHelpers.js | 8 +- 4 files changed, 1056 insertions(+), 507 deletions(-) mode change 100755 => 100644 config/token-variants-global-mappings.json diff --git a/CHANGELOG.md b/CHANGELOG.md index acc5b30..78d6c40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.4.3] 2024-04-21 + +### Added + +- Added token varient art suggested effect mappings + +### Changed + +- Added elevation component to distance calculations for gang up +- Added check for incapacitated or defeated tokens to gang up check +- Minor cosmetic change to 'Draw from Action Deck' macro ## [2.4.2] 2024-02-25 diff --git a/config/token-variants-global-mappings.json b/config/token-variants-global-mappings.json old mode 100755 new mode 100644 index a0f335d..9ad75cc --- a/config/token-variants-global-mappings.json +++ b/config/token-variants-global-mappings.json @@ -1,13 +1,26 @@ { "globalMappings": [ { + "id": "02qnAqdH", + "label": "Arcane Protection", + "expression": "Arcane Protection (-2) || Arcane Protection (major, -4) || Greater Arcane Protection (-4) || Greater Arcane Protection (major, -6)", + "codeExp": "", "imgName": "", "imgSrc": "", "priority": 50, "config": {}, "overlay": true, "alwaysOn": false, + "disabled": false, "overlayConfig": { + "id": "02qnAqdH", + "html": { + "template": "", + "style": "", + "listeners": "" + }, + "parentID": "", + "ui": false, "underlay": false, "bottom": false, "top": false, @@ -16,527 +29,353 @@ "animation": { "relative": false, "rotate": false, - "duration": 30000, + "duration": "5000", "clockwise": true }, "linkMirror": true, "linkScale": true, + "linkDimensionsX": false, + "linkDimensionsY": false, "linkOpacity": false, + "linkStageScale": false, "loop": true, "playOnce": false, - "img": "modules/JB2A_DnD5e/Library/Generic/Item/GlintMany01_01_Regular_Yellow_200x200.webm", - "alpha": 1, - "tint": "", - "offsetX": 0, - "offsetY": 0.38, - "scaleX": 0.4, - "scaleY": 0.4, - "angle": 0, - "filter": "DropShadowFilter", - "filterOptions": { - "rotation": 45, - "distance": 7, - "color": 0, - "alpha": 0.84, - "shadowOnly": false, - "blur": 2, - "quality": 0 - }, - "alwaysVisible": false, - "limitedUsers": [], - "limitOnHover": false, - "limitOnControl": false, - "text": { - "text": "Shaken", - "fontFamily": "Signika", - "fontSize": 36, - "letterSpacing": 0, - "fill": "#FFFFFF", - "dropShadow": "true", - "strokeThickness": 1, - "stroke": "#111111", - "curve": { - "radius": 0, - "invert": null + "img": [ + { + "src": "modules/JB2A_DnD5e/Library/Generic/Template/Circle/OutPulse/OutPulse_02_Regular_BlueWhite_Burst_600x600.webm", + "linked": false } - }, - "id": "mwFtNKpD" - }, - "targetActors": null, - "label": "Shaken", - "expression": "Shaken", - "id": "mwFtNKpD" - }, - { - "imgName": "", - "imgSrc": "", - "priority": 50, - "config": {}, - "overlay": true, - "alwaysOn": false, - "overlayConfig": { - "underlay": false, - "bottom": false, - "top": false, - "inheritTint": false, - "linkRotation": true, - "animation": { - "relative": false, - "rotate": true, - "duration": 30000, - "clockwise": true - }, - "linkMirror": true, - "linkScale": true, - "linkOpacity": false, - "loop": true, - "playOnce": false, - "img": "modules/JB2A_DnD5e/Library/Generic/Particles/ParticlesInward02_04_Regular_GreenYellow_400x400.webm", - "alpha": 1, + ], + "repeating": false, + "alpha": "1", "tint": "", - "offsetX": 0, - "offsetY": 0, - "scaleX": 1.5, - "scaleY": 1.5, - "angle": 0, - "filter": "DropShadowFilter", - "filterOptions": { - "rotation": 45, - "distance": 7, - "color": 0, - "alpha": 0.84, - "shadowOnly": false, - "blur": 2, - "quality": 0 + "interpolateColor": { + "color2": "", + "prc": "" }, - "alwaysVisible": false, - "limitedUsers": [], - "limitOnHover": false, - "limitOnControl": false, - "text": { - "text": "", - "fontFamily": "Signika", - "fontSize": 36, - "letterSpacing": 0, - "fill": "#FFFFFF", - "dropShadow": "true", - "strokeThickness": 1, - "stroke": "#111111", - "curve": { - "radius": 0, - "invert": null - } + "width": "", + "height": "", + "scaleX": "1", + "scaleY": "1", + "angle": "0", + "pOffsetX": "", + "pOffsetY": "", + "offsetX": "0", + "offsetY": "0", + "anchor": { + "x": 0.5, + "y": 0.5 }, - "id": "toTYr3DQ" - }, - "targetActors": null, - "label": "Distracted", - "expression": "Distracted", - "id": "toTYr3DQ" - }, - { - "imgName": "", - "imgSrc": "", - "priority": 50, - "config": {}, - "overlay": true, - "alwaysOn": false, - "overlayConfig": { - "underlay": false, - "bottom": false, - "top": false, - "inheritTint": false, - "linkRotation": true, - "animation": { - "relative": false, - "rotate": false, - "duration": 5200, - "clockwise": false - }, - "linkMirror": true, - "linkScale": true, - "linkOpacity": false, - "loop": true, - "playOnce": false, - "img": "modules/JB2A_DnD5e/Library/Generic/Marker/MarkerShieldCracked_02_Regular_Purple_400x400.webm", - "alpha": 1, - "tint": "", - "offsetX": 0, - "offsetY": 0, - "scaleX": 1.5, - "scaleY": 1.5, - "angle": 0, - "filter": "OutlineFilter", - "filterOptions": { - "thickness": 1, - "color": 0, - "quality": 0.1 - }, - "alwaysVisible": false, - "limitedUsers": [], - "limitOnHover": false, - "limitOnControl": false, - "text": { - "text": "", - "fontFamily": "Signika", - "fontSize": 36, - "letterSpacing": 0, - "fill": "#FFFFFF", - "dropShadow": "true", - "strokeThickness": 1, - "stroke": "#111111", - "curve": { - "radius": 0, - "invert": null - } - }, - "id": "J4GrRaxL" - }, - "targetActors": null, - "label": "Vulnerable", - "expression": "Vulnerable", - "id": "J4GrRaxL" - }, - { - "imgName": "", - "imgSrc": "", - "priority": 50, - "config": {}, - "overlay": true, - "alwaysOn": false, - "overlayConfig": { - "underlay": false, - "bottom": false, - "top": false, - "inheritTint": false, - "linkRotation": true, - "animation": { - "relative": false, - "rotate": false, - "duration": 5000, - "clockwise": true - }, - "linkMirror": true, - "linkScale": true, - "linkOpacity": false, - "loop": true, - "playOnce": false, - "img": "modules/JB2A_DnD5e/Library/Generic/UI/IconStun_01_Regular_Purple_200x200.webm", - "alpha": 1, - "tint": "", - "offsetX": 0, - "offsetY": 0, - "scaleX": 0.77, - "scaleY": 0.77, - "angle": 0, - "filter": "OutlineFilter", - "filterOptions": { - "thickness": 1, - "color": 0, - "quality": 0.1 - }, - "alwaysVisible": false, - "limitedUsers": [], - "limitOnHover": false, - "limitOnControl": false, - "text": { - "text": "", - "fontFamily": "Signika", - "fontSize": 36, - "letterSpacing": 0, - "fill": "#FFFFFF", - "dropShadow": "true", - "strokeThickness": 1, - "stroke": "#111111", - "curve": { - "radius": 0, - "invert": null - } - }, - "id": "nOfPMsQp" - }, - "targetActors": null, - "label": "Stunned", - "expression": "Stunned", - "id": "nOfPMsQp" - }, - { - "imgName": "", - "imgSrc": "", - "priority": 50, - "config": {}, - "overlay": true, - "alwaysOn": false, - "overlayConfig": { - "underlay": false, - "bottom": false, - "top": false, - "inheritTint": false, - "linkRotation": true, - "animation": { - "relative": false, - "rotate": false, - "duration": 5000, - "clockwise": true - }, - "linkMirror": true, - "linkScale": true, - "linkOpacity": false, - "loop": true, - "playOnce": false, - "img": "modules/JB2A_DnD5e/Library/1st_Level/Entangle/Entangle_01_Green_400x400.webm", - "alpha": 1, - "tint": "", - "offsetX": 0, - "offsetY": 0, - "scaleX": 1, - "scaleY": 1, - "angle": 0, - "filter": "DropShadowFilter", - "filterOptions": { - "rotation": 45, - "distance": 2, - "color": 2367281, - "alpha": 0.84, - "shadowOnly": false, - "blur": 2, - "quality": 0 - }, - "alwaysVisible": false, - "limitedUsers": [], - "limitOnHover": false, - "limitOnControl": false, - "text": { - "text": "", - "fontFamily": "Signika", - "fontSize": 36, - "letterSpacing": 0, - "fill": "#FFFFFF", - "dropShadow": "true", - "strokeThickness": 1, - "stroke": "#111111", - "curve": { - "radius": 0, - "invert": null - } - }, - "id": "rrdhKai4" - }, - "targetActors": null, - "label": "Entangled", - "expression": "Entangled", - "id": "rrdhKai4" - }, - { - "imgName": "", - "imgSrc": "", - "priority": 50, - "config": {}, - "overlay": true, - "alwaysOn": false, - "overlayConfig": { - "underlay": false, - "bottom": false, - "top": false, - "inheritTint": false, - "linkRotation": true, - "animation": { - "relative": false, - "rotate": false, - "duration": 5000, - "clockwise": true - }, - "linkMirror": true, - "linkScale": true, - "linkOpacity": false, - "loop": true, - "playOnce": false, - "img": "modules/JB2A_DnD5e/Library/Generic/Marker/MarkerChainStandard01_01_Regular_Red_Loop_400x400.webm", - "alpha": 1, - "tint": "", - "offsetX": 0, - "offsetY": 0, - "scaleX": 1.75, - "scaleY": 1.75, - "angle": 0, - "filter": "DropShadowFilter", - "filterOptions": { - "rotation": 45, - "distance": 2, - "color": 2367281, - "alpha": 0.84, - "shadowOnly": false, - "blur": 2, - "quality": 0 - }, - "alwaysVisible": false, - "limitedUsers": [], - "limitOnHover": false, - "limitOnControl": false, - "text": { - "text": "", - "fontFamily": "Signika", - "fontSize": 36, - "letterSpacing": 0, - "fill": "#FFFFFF", - "dropShadow": "true", - "strokeThickness": 1, - "stroke": "#111111", - "curve": { - "radius": 0, - "invert": null - } - }, - "id": "5RYi2X9W" - }, - "targetActors": null, - "label": "Bound", - "expression": "Bound", - "id": "5RYi2X9W" - }, - { - "imgName": "", - "imgSrc": "", - "priority": 50, - "config": { - "tv_script": { - "onApply": "", - "onRemove": "", - "tmfxPreset": "dropshadow" - } - }, - "overlay": false, - "alwaysOn": false, - "overlayConfig": { - "id": "KtequnXd" - }, - "targetActors": null, - "label": "Flying", - "expression": "Flying", - "id": "KtequnXd" - }, - { - "imgName": "", - "imgSrc": "", - "priority": 50, - "config": { - "tv_script": { - "onApply": "", - "onRemove": "", - "tmfxPreset": "glow" - } - }, - "overlay": false, - "alwaysOn": false, - "overlayConfig": { - "id": "k4boMPSb" - }, - "targetActors": null, - "label": "Conviction", - "expression": "Conviction", - "id": "k4boMPSb" - }, - { - "imgName": "", - "imgSrc": "", - "priority": 50, - "config": { - "light": { - "dim": 0.25, - "bright": 0, - "color": "#1c71d8", - "alpha": 0.4, - "animation": { - "type": "sunburst", - "speed": 3, - "intensity": 1 - } - } - }, - "overlay": true, - "alwaysOn": false, - "overlayConfig": { - "underlay": false, - "bottom": false, - "top": false, - "inheritTint": false, - "linkRotation": true, - "animation": { - "relative": false, - "rotate": true, - "duration": 5000, - "clockwise": true - }, - "linkMirror": true, - "linkScale": true, - "linkOpacity": false, - "loop": true, - "playOnce": false, - "img": "modules/JB2A_DnD5e/Library/Cantrip/Dancing_Lights/DancingLights_01_Yellow_200x200.webm", - "alpha": 1, - "tint": "", - "offsetX": 0, - "offsetY": 0.52, - "scaleX": 0.41, - "scaleY": 0.41, - "angle": 0, "filter": "NONE", "alwaysVisible": false, + "limitedToOwner": false, "limitedUsers": [], "limitOnHover": false, + "limitOnHighlight": false, "limitOnControl": false, + "limitOnHUD": false, + "limitOnTarget": false, + "limitOnAnyTarget": false, + "limitOnEffect": "", + "limitOnProperty": "", "text": { "text": "", + "repeating": false, "fontFamily": "Signika", - "fontSize": 36, - "letterSpacing": 0, - "fill": "#FFFFFF", + "fill": "#ffffff", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "fontSize": "36", + "align": "center", + "letterSpacing": "0", "dropShadow": "true", - "strokeThickness": 1, + "strokeThickness": "1", "stroke": "#111111", + "wordWrap": false, + "wordWrapWidth": "200", + "breakWords": false, + "maxHeight": "0", "curve": { - "radius": 0, - "invert": null + "angle": "0", + "radius": "0", + "invert": false } }, - "id": "eO68BGDl" + "effect": "", + "imgLinked": false, + "interactivity": [], + "label": "Arcane Protection" }, - "targetActors": null, - "label": "Glow", - "expression": "Glow", - "id": "eO68BGDl" - }, - { - "imgName": "", - "imgSrc": "", - "priority": 50, - "config": { - "texture": { - "tint": "#c0bfbc" - }, - "tv_script": { - "onApply": "", - "onRemove": "", - "tmfxPreset": "smoke" - } - }, - "overlay": false, - "alwaysOn": false, - "overlayConfig": { - "id": "BP0Xx8wD" - }, - "targetActors": null, - "label": "Shroud", - "expression": "Shroud", - "id": "BP0Xx8wD" + "group": "Default", + "i": 0 }, { + "id": "rrdhKai4", + "label": "Bound or Entangled", + "expression": "Bound||Entangled", + "codeExp": "", "imgName": "", "imgSrc": "", "priority": 50, "config": {}, "overlay": true, "alwaysOn": false, + "disabled": false, + "overlayConfig": { + "id": "rrdhKai4", + "html": { + "template": "", + "style": "", + "listeners": "" + }, + "parentID": "", + "ui": false, + "underlay": false, + "bottom": false, + "top": false, + "inheritTint": false, + "linkRotation": true, + "animation": { + "relative": false, + "rotate": false, + "duration": "5000", + "clockwise": true + }, + "linkMirror": true, + "linkScale": true, + "linkDimensionsX": false, + "linkDimensionsY": false, + "linkOpacity": false, + "linkStageScale": false, + "loop": true, + "playOnce": false, + "img": [ + { + "src": "modules/JB2A_DnD5e/Library/1st_Level/Entangle/Entangle_01_Green_400x400.webm", + "linked": false + } + ], + "imgLinked": false, + "repeating": false, + "alpha": "0.75", + "tint": "", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "width": "", + "height": "", + "scaleX": "1", + "scaleY": "1", + "angle": "0", + "pOffsetX": "", + "pOffsetY": "", + "offsetX": "0", + "offsetY": "0", + "anchor": { + "x": 0.5, + "y": 0.5 + }, + "filter": "NONE", + "alwaysVisible": false, + "limitedToOwner": false, + "limitedUsers": [], + "limitOnHover": false, + "limitOnHighlight": false, + "limitOnControl": false, + "limitOnHUD": false, + "limitOnTarget": false, + "limitOnAnyTarget": false, + "limitOnEffect": "", + "limitOnProperty": "", + "text": { + "text": "", + "repeating": false, + "fontFamily": "Signika", + "fill": "#FFFFFF", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "fontSize": "36", + "align": "center", + "letterSpacing": "0", + "dropShadow": "true", + "strokeThickness": "1", + "stroke": "#111111", + "wordWrap": false, + "wordWrapWidth": "200", + "breakWords": false, + "maxHeight": "0", + "curve": { + "angle": "0", + "radius": "0", + "invert": false + } + }, + "shapes": [ + { + "shape": { + "type": "rectangle", + "x": "0", + "y": "0", + "width": "100", + "height": "100", + "radius": "0" + }, + "label": "", + "line": { + "width": "1", + "color": "#000000", + "alpha": "1" + }, + "fill": { + "color": "#ffffff", + "alpha": "1", + "interpolateColor": { + "color2": "", + "prc": "" + } + }, + "repeating": false + } + ], + "effect": "", + "interactivity": [], + "label": "Bound or Entangled" + }, + "group": "Default", + "i": 1 + }, + { + "id": "5EAavaok", + "label": "Conviction", + "expression": "actor.system.details.conviction.active=\"true\"", + "codeExp": "", + "imgName": "", + "imgSrc": "", + "priority": 50, + "config": {}, + "overlay": true, + "alwaysOn": false, + "disabled": false, + "overlayConfig": { + "id": "5EAavaok", + "html": { + "template": "", + "style": "", + "listeners": "" + }, + "parentID": "", + "ui": false, + "underlay": false, + "bottom": false, + "top": false, + "inheritTint": false, + "linkRotation": true, + "animation": { + "relative": false, + "rotate": false, + "duration": "5000", + "clockwise": true + }, + "linkMirror": true, + "linkScale": true, + "linkDimensionsX": false, + "linkDimensionsY": false, + "linkOpacity": true, + "linkStageScale": false, + "loop": true, + "playOnce": false, + "img": "modules/JB2A_DnD5e/Library/1st_Level/Bless/Bless_01_Regular_Yellow_Loop_400x400.webm", + "repeating": false, + "alpha": "1", + "tint": "", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "width": "", + "height": "", + "scaleX": "1.51", + "scaleY": "1.51", + "angle": "1", + "pOffsetX": "", + "pOffsetY": "", + "offsetX": "0", + "offsetY": "0", + "anchor": { + "x": 0.5, + "y": 0.5 + }, + "filter": "DropShadowFilter", + "filterOptions": { + "rotation": 45, + "distance": 0, + "color": "#000000", + "alpha": 0.86, + "shadowOnly": false, + "blur": 2.3, + "quality": 0 + }, + "alwaysVisible": false, + "limitedToOwner": false, + "limitedUsers": [], + "limitOnHover": false, + "limitOnHighlight": false, + "limitOnControl": false, + "limitOnHUD": false, + "limitOnTarget": false, + "limitOnAnyTarget": false, + "limitOnEffect": "", + "limitOnProperty": "", + "text": { + "text": "", + "repeating": false, + "fontFamily": "Signika", + "fill": "#ffffff", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "fontSize": "36", + "align": "center", + "letterSpacing": "0", + "dropShadow": "true", + "strokeThickness": "1", + "stroke": "#111111", + "wordWrap": false, + "wordWrapWidth": "200", + "breakWords": false, + "maxHeight": "0", + "curve": { + "angle": "0", + "radius": "0", + "invert": false + } + }, + "effect": "", + "imgLinked": false, + "interactivity": [], + "label": "Conviction" + }, + "group": "Default", + "i": 2 + }, + { + "id": "gRwsZcZK", + "label": "Deflection", + "expression": "Deflection (melee) || Deflection (range) || Deflection (all)", + "codeExp": "", + "imgName": "", + "imgSrc": "", + "priority": 50, + "config": {}, + "overlay": true, + "alwaysOn": false, + "disabled": false, "overlayConfig": { "underlay": false, "bottom": false, @@ -586,20 +425,605 @@ "invert": null } }, - "id": "gRwsZcZK" + "id": "gRwsZcZK", + "label": "Deflection" }, - "targetActors": null, - "label": "Deflection (melee) || Deflection (range) || Deflection (raise)", - "expression": "Deflection (melee) || Deflection (range) || Deflection (raise)", - "id": "gRwsZcZK" + "group": "Default", + "i": 3 }, { + "id": "toTYr3DQ", + "label": "Distracted", + "expression": "Distracted", + "codeExp": "", "imgName": "", "imgSrc": "", "priority": 50, "config": {}, "overlay": true, "alwaysOn": false, + "disabled": false, + "overlayConfig": { + "id": "toTYr3DQ", + "html": { + "template": "", + "style": "", + "listeners": "" + }, + "parentID": "", + "ui": false, + "underlay": false, + "bottom": false, + "top": false, + "inheritTint": false, + "linkRotation": true, + "animation": { + "relative": false, + "rotate": true, + "duration": "30000", + "clockwise": true + }, + "linkMirror": true, + "linkScale": true, + "linkDimensionsX": false, + "linkDimensionsY": false, + "linkOpacity": false, + "linkStageScale": false, + "loop": true, + "playOnce": false, + "img": "modules/JB2A_DnD5e/Library/Generic/Particles/ParticlesInward02_04_Regular_GreenYellow_400x400.webm", + "imgLinked": false, + "repeating": false, + "alpha": "1", + "tint": "", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "width": "", + "height": "", + "scaleX": "1.10", + "scaleY": "1.10", + "angle": "0", + "pOffsetX": "", + "pOffsetY": "", + "offsetX": "0", + "offsetY": "0", + "anchor": { + "x": 0.5, + "y": 0.5 + }, + "filter": "OutlineFilter", + "filterOptions": { + "thickness": 1, + "color": "#000000", + "quality": 0 + }, + "alwaysVisible": false, + "limitedToOwner": false, + "limitedUsers": [], + "limitOnHover": false, + "limitOnHighlight": false, + "limitOnControl": false, + "limitOnHUD": false, + "limitOnTarget": false, + "limitOnAnyTarget": false, + "limitOnEffect": "", + "limitOnProperty": "", + "text": { + "text": "", + "repeating": false, + "fontFamily": "Signika", + "fill": "#FFFFFF", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "fontSize": "36", + "align": "center", + "letterSpacing": "0", + "dropShadow": "true", + "strokeThickness": "1", + "stroke": "#111111", + "wordWrap": false, + "wordWrapWidth": "200", + "breakWords": false, + "maxHeight": "0", + "curve": { + "angle": "0", + "radius": "0", + "invert": false + } + }, + "effect": "", + "interactivity": [], + "label": "Distracted" + }, + "group": "Default", + "i": 4 + }, + { + "id": "KtequnXd", + "label": "Flying", + "expression": "Flying", + "codeExp": "", + "imgName": "", + "imgSrc": "", + "priority": 50, + "config": { + "tv_script": { + "onApply": "", + "onRemove": "", + "tmfxPreset": "dropshadow" + } + }, + "overlay": false, + "alwaysOn": false, + "disabled": false, + "overlayConfig": { + "id": "KtequnXd", + "label": "Flying" + }, + "group": "Default", + "i": 5 + }, + { + "id": "eO68BGDl", + "label": "Glow", + "expression": "Glow", + "codeExp": "", + "imgName": "", + "imgSrc": "", + "priority": 50, + "config": { + "light": { + "dim": 0.25, + "bright": 0, + "color": "#1c71d8", + "alpha": 0.4, + "animation": { + "type": "sunburst", + "speed": 3, + "intensity": 1 + } + } + }, + "overlay": true, + "alwaysOn": false, + "disabled": false, + "overlayConfig": { + "id": "eO68BGDl", + "html": { + "template": "", + "style": "", + "listeners": "" + }, + "parentID": "", + "ui": false, + "underlay": false, + "bottom": false, + "top": false, + "inheritTint": false, + "linkRotation": true, + "animation": { + "relative": false, + "rotate": true, + "duration": "5000", + "clockwise": false + }, + "linkMirror": true, + "linkScale": true, + "linkDimensionsX": false, + "linkDimensionsY": false, + "linkOpacity": false, + "linkStageScale": false, + "loop": true, + "playOnce": false, + "img": "modules/JB2A_DnD5e/Library/Cantrip/Dancing_Lights/DancingLights_01_Yellow_200x200.webm", + "imgLinked": false, + "repeating": false, + "alpha": "1", + "tint": "", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "width": "", + "height": "", + "scaleX": "0.41", + "scaleY": "0.41", + "angle": "0", + "pOffsetX": "", + "pOffsetY": "", + "offsetX": "0", + "offsetY": "0.52", + "anchor": { + "x": 0.5, + "y": 0.5 + }, + "filter": "NONE", + "alwaysVisible": false, + "limitedToOwner": false, + "limitedUsers": [], + "limitOnHover": false, + "limitOnHighlight": false, + "limitOnControl": false, + "limitOnHUD": false, + "limitOnTarget": false, + "limitOnAnyTarget": false, + "limitOnEffect": "", + "limitOnProperty": "", + "text": { + "text": "", + "repeating": false, + "fontFamily": "Signika", + "fill": "#FFFFFF", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "fontSize": "36", + "align": "center", + "letterSpacing": "0", + "dropShadow": "true", + "strokeThickness": "1", + "stroke": "#111111", + "wordWrap": false, + "wordWrapWidth": "200", + "breakWords": false, + "maxHeight": "0", + "curve": { + "angle": "0", + "radius": "0", + "invert": false + } + }, + "effect": "", + "interactivity": [], + "label": "Glow" + }, + "group": "Default", + "i": 6 + }, + { + "id": "1po9hq1m", + "label": "Protection", + "expression": "Protection", + "codeExp": "", + "imgName": "", + "imgSrc": "", + "priority": 50, + "config": {}, + "overlay": true, + "alwaysOn": false, + "disabled": false, + "overlayConfig": { + "id": "1po9hq1m", + "html": { + "template": "", + "style": "", + "listeners": "" + }, + "parentID": "", + "ui": false, + "underlay": false, + "bottom": false, + "top": false, + "inheritTint": false, + "linkRotation": true, + "animation": { + "relative": false, + "rotate": false, + "duration": "5000", + "clockwise": true + }, + "linkMirror": true, + "linkScale": true, + "linkDimensionsX": false, + "linkDimensionsY": false, + "linkOpacity": false, + "linkStageScale": false, + "loop": true, + "playOnce": false, + "img": "modules/JB2A_DnD5e/Library/1st_Level/Shield/Shield_01_Regular_Blue_Loop_400x400.webm", + "imgLinked": false, + "repeating": false, + "alpha": "1", + "tint": "", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "width": "", + "height": "", + "scaleX": "1.6", + "scaleY": "1.6", + "angle": "0", + "pOffsetX": "", + "pOffsetY": "", + "offsetX": "0", + "offsetY": "0", + "anchor": { + "x": 0.5, + "y": 0.5 + }, + "filter": "NONE", + "alwaysVisible": false, + "limitedToOwner": false, + "limitedUsers": [], + "limitOnHover": false, + "limitOnHighlight": false, + "limitOnControl": false, + "limitOnHUD": false, + "limitOnTarget": false, + "limitOnAnyTarget": false, + "limitOnEffect": "", + "limitOnProperty": "", + "text": { + "text": "", + "repeating": false, + "fontFamily": "Signika", + "fill": "#FFFFFF", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "fontSize": "36", + "align": "center", + "letterSpacing": "0", + "dropShadow": "true", + "strokeThickness": "1", + "stroke": "#111111", + "wordWrap": false, + "wordWrapWidth": "200", + "breakWords": false, + "maxHeight": "0", + "curve": { + "angle": "0", + "radius": "0", + "invert": false + } + }, + "effect": "", + "interactivity": [], + "label": "Protection" + }, + "group": "Default", + "i": 7 + }, + { + "id": "mwFtNKpD", + "label": "Shaken", + "expression": "Shaken", + "codeExp": "", + "imgName": "", + "imgSrc": "", + "priority": 50, + "config": {}, + "overlay": true, + "alwaysOn": false, + "disabled": false, + "overlayConfig": { + "id": "mwFtNKpD", + "html": { + "template": "", + "style": "", + "listeners": "" + }, + "parentID": "", + "ui": false, + "underlay": false, + "bottom": false, + "top": false, + "inheritTint": false, + "linkRotation": true, + "animation": { + "relative": false, + "rotate": false, + "duration": "30000", + "clockwise": true + }, + "linkMirror": true, + "linkScale": true, + "linkDimensionsX": false, + "linkDimensionsY": false, + "linkOpacity": false, + "linkStageScale": false, + "loop": true, + "playOnce": false, + "img": "modules/JB2A_DnD5e/Library/Generic/Template/Circle/TemplateStunCircle_01_Regular_Purple_800x800.webm", + "repeating": false, + "alpha": "0.5", + "tint": "", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "width": "", + "height": "", + "scaleX": "1", + "scaleY": "1", + "angle": "0", + "pOffsetX": "", + "pOffsetY": "", + "offsetX": "0", + "offsetY": "0", + "anchor": { + "x": 0.5, + "y": 0.5 + }, + "filter": "DropShadowFilter", + "filterOptions": { + "rotation": 45, + "distance": 7, + "color": "#000000", + "alpha": 0.84, + "shadowOnly": false, + "blur": 2, + "quality": 0 + }, + "alwaysVisible": false, + "limitedToOwner": false, + "limitedUsers": [], + "limitOnHover": false, + "limitOnHighlight": false, + "limitOnControl": false, + "limitOnHUD": false, + "limitOnTarget": false, + "limitOnAnyTarget": false, + "limitOnEffect": "", + "limitOnProperty": "", + "text": { + "text": "Shaken", + "repeating": false, + "fontFamily": "Signika", + "fill": "#FFFFFF", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "fontSize": "36", + "align": "center", + "letterSpacing": "0", + "dropShadow": "true", + "strokeThickness": "1", + "stroke": "#111111", + "wordWrap": false, + "wordWrapWidth": "200", + "breakWords": false, + "maxHeight": "0", + "curve": { + "angle": "0", + "radius": "0", + "invert": false + } + }, + "effect": "", + "imgLinked": false, + "interactivity": [], + "label": "Shaken" + }, + "group": "Default", + "i": 8 + }, + { + "id": "BP0Xx8wD", + "label": "Shroud", + "expression": "Shroud", + "codeExp": "", + "imgName": "", + "imgSrc": "", + "priority": 50, + "config": {}, + "overlay": true, + "alwaysOn": false, + "disabled": false, + "overlayConfig": { + "id": "BP0Xx8wD", + "html": { + "template": "", + "style": "", + "listeners": "" + }, + "parentID": "", + "ui": false, + "underlay": false, + "bottom": false, + "top": false, + "inheritTint": false, + "linkRotation": true, + "animation": { + "relative": false, + "rotate": false, + "duration": "5000", + "clockwise": true + }, + "linkMirror": true, + "linkScale": true, + "linkDimensionsX": false, + "linkDimensionsY": false, + "linkOpacity": false, + "linkStageScale": false, + "loop": true, + "playOnce": false, + "img": "modules/JB2A_DnD5e/Library/2nd_Level/Darkness/Opacities/Darkness_01_Black_75OPA_600x600.webm", + "imgLinked": false, + "repeating": false, + "alpha": "1", + "tint": "", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "width": "", + "height": "", + "scaleX": "1", + "scaleY": "1", + "angle": "0", + "pOffsetX": "", + "pOffsetY": "", + "offsetX": "0", + "offsetY": "0", + "anchor": { + "x": 0.5, + "y": 0.5 + }, + "filter": "NONE", + "alwaysVisible": false, + "limitedToOwner": false, + "limitedUsers": [], + "limitOnHover": false, + "limitOnHighlight": false, + "limitOnControl": false, + "limitOnHUD": false, + "limitOnTarget": false, + "limitOnAnyTarget": false, + "limitOnEffect": "", + "limitOnProperty": "", + "text": { + "text": "", + "repeating": false, + "fontFamily": "Signika", + "fill": "#ffffff", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "fontSize": "36", + "align": "center", + "letterSpacing": "0", + "dropShadow": "true", + "strokeThickness": "1", + "stroke": "#111111", + "wordWrap": false, + "wordWrapWidth": "200", + "breakWords": false, + "maxHeight": "0", + "curve": { + "angle": "0", + "radius": "0", + "invert": false + } + }, + "effect": "", + "interactivity": [], + "label": "Shroud" + }, + "group": "Default", + "i": 9 + }, + { + "id": "nOfPMsQp", + "label": "Stunned", + "expression": "Stunned", + "codeExp": "", + "imgName": "", + "imgSrc": "", + "priority": 50, + "config": {}, + "overlay": true, + "alwaysOn": false, + "disabled": false, "overlayConfig": { "underlay": false, "bottom": false, @@ -617,17 +1041,17 @@ "linkOpacity": false, "loop": true, "playOnce": false, - "img": "modules/JB2A_DnD5e/Library/1st_Level/Shield/Shield_01_Regular_Blue_Loop_400x400.webm", + "img": "modules/JB2A_DnD5e/Library/Generic/UI/IconStun_01_Regular_Purple_200x200.webm", "alpha": 1, "tint": "", "offsetX": 0, "offsetY": 0, - "scaleX": 1.6, - "scaleY": 1.6, + "scaleX": 0.77, + "scaleY": 0.77, "angle": 0, "filter": "OutlineFilter", "filterOptions": { - "thickness": 2.9, + "thickness": 1, "color": 0, "quality": 0.1 }, @@ -649,12 +1073,122 @@ "invert": null } }, - "id": "1po9hq1m" + "id": "nOfPMsQp", + "label": "Stunned" }, - "targetActors": null, - "label": "Protection", - "expression": "Protection", - "id": "1po9hq1m" + "group": "Default", + "i": 10 + }, + { + "id": "J4GrRaxL", + "label": "Vulnerable", + "expression": "Vulnerable", + "codeExp": "", + "imgName": "", + "imgSrc": "", + "priority": 50, + "config": {}, + "overlay": true, + "alwaysOn": false, + "disabled": false, + "overlayConfig": { + "id": "J4GrRaxL", + "html": { + "template": "", + "style": "", + "listeners": "" + }, + "parentID": "", + "ui": false, + "underlay": false, + "bottom": false, + "top": false, + "inheritTint": false, + "linkRotation": true, + "animation": { + "relative": false, + "rotate": false, + "duration": "5200", + "clockwise": false + }, + "linkMirror": true, + "linkScale": true, + "linkDimensionsX": false, + "linkDimensionsY": false, + "linkOpacity": false, + "linkStageScale": false, + "loop": true, + "playOnce": false, + "img": "modules/JB2A_DnD5e/Library/Generic/Marker/MarkerShieldCracked_03_Regular_Purple_400x400.webm", + "imgLinked": false, + "repeating": false, + "alpha": "1", + "tint": "", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "width": "", + "height": "", + "scaleX": "1.5", + "scaleY": "1.5", + "angle": "0", + "pOffsetX": "", + "pOffsetY": "", + "offsetX": "0", + "offsetY": "0", + "anchor": { + "x": 0.5, + "y": 0.5 + }, + "filter": "OutlineFilter", + "filterOptions": { + "thickness": 1, + "color": "#000000", + "quality": 0.1 + }, + "alwaysVisible": false, + "limitedToOwner": false, + "limitedUsers": [], + "limitOnHover": false, + "limitOnHighlight": false, + "limitOnControl": false, + "limitOnHUD": false, + "limitOnTarget": false, + "limitOnAnyTarget": false, + "limitOnEffect": "", + "limitOnProperty": "", + "text": { + "text": "", + "repeating": false, + "fontFamily": "Signika", + "fill": "#FFFFFF", + "interpolateColor": { + "color2": "", + "prc": "" + }, + "fontSize": "36", + "align": "center", + "letterSpacing": "0", + "dropShadow": "true", + "strokeThickness": "1", + "stroke": "#111111", + "wordWrap": false, + "wordWrapWidth": "200", + "breakWords": false, + "maxHeight": "0", + "curve": { + "angle": "0", + "radius": "0", + "invert": false + } + }, + "effect": "", + "interactivity": [], + "label": "Vulnerable" + }, + "group": "Default", + "i": 11 } ] } \ No newline at end of file diff --git a/packs/helper-macros/_source/Draw_from_Action_Deck_TQKafoef4sHnDYDk.json b/packs/helper-macros/_source/Draw_from_Action_Deck_TQKafoef4sHnDYDk.json index 3a7a033..efae9dc 100644 --- a/packs/helper-macros/_source/Draw_from_Action_Deck_TQKafoef4sHnDYDk.json +++ b/packs/helper-macros/_source/Draw_from_Action_Deck_TQKafoef4sHnDYDk.json @@ -4,7 +4,7 @@ "scope": "global", "author": "sVoCvBU1knmXzoYe", "img": "icons/sundries/misc/admission-ticket-white.webp", - "command": "const deck = game.cards.get(\n game.settings.get('swade', 'actionDeck'))\nconst discard = game.cards.get(\n game.settings.get('swade', 'actionDeckDiscardPile'))\nconst deckName = deck.name\nconst drawMethod = 'TOP'\n\nconst cards = await discard.draw(deck, 1, {\n how: CONST.CARD_DRAW_MODES[drawMethod],\n chatNotification: false\n});\n\nconst name = cards[0].faces[0].name\nconst img = cards[0].faces[0].img\nconst desc = cards[0].description\n\nconst ip = new ImagePopout(img, {\n title: `Drawn from ${deckName}: ${name}`\n} )\nip.render(true)\nip.shareImage()\n\nconst randomInt = Math.floor(Math.random() * 6)\nvar rotateClass = ''\nswitch (Math.floor(Math.random() * 6)) {\n case 0: rotateClass = 'rotate-deg-2'; break;\n case 1: rotateClass = 'rotate-deg-negative-2'; break;\n case 2: rotateClass = 'rotate-deg-3'; break;\n case 3: rotateClass = 'rotate-deg-negative-3'; break;\n case 4: rotateClass = 'rotate-deg-4'; break;\n case 4: rotateClass = 'rotate-deg-negative-4'; break;\n}\n\nconst content = `
\n
\n \n
\n

${name}

\n
`\nconst flavor = `Drawn from ${deckName}`\nChatMessage.create({ content, flavor })", + "command": "const deck = game.cards.get(\n game.settings.get('swade', 'actionDeck'))\nconst discard = game.cards.get(\n game.settings.get('swade', 'actionDeckDiscardPile'))\nconst deckName = deck.name\nconst drawMethod = 'TOP'\n\nconst cards = await discard.draw(deck, 1, {\n how: CONST.CARD_DRAW_MODES[drawMethod],\n chatNotification: false\n});\n\nconst name = cards[0].faces[0].name\nconst img = cards[0].faces[0].img\nconst desc = cards[0].description\n\nconst ip = new ImagePopout(img, {\n title: `Drawn from ${deckName}: ${name}`\n} )\nip.render(true)\nip.shareImage()\n\nconst randomInt = Math.floor(Math.random() * 6)\nvar rotateClass = ''\nswitch (Math.floor(Math.random() * 6)) {\n case 0: rotateClass = 'rotate-deg-2'; break;\n case 1: rotateClass = 'rotate-deg-negative-2'; break;\n case 2: rotateClass = 'rotate-deg-3'; break;\n case 3: rotateClass = 'rotate-deg-negative-3'; break;\n case 4: rotateClass = 'rotate-deg-4'; break;\n case 5: rotateClass = 'rotate-deg-negative-4'; break;\n}\n\nconst content = `
\n
\n \n
\n

${name}

\n
`\nconst flavor = `Drawn from ${deckName}`\nChatMessage.create({ content, flavor })", "folder": "VMi3DyJN0U0PosUH", "ownership": { "default": 0, @@ -15,10 +15,10 @@ }, "_stats": { "systemId": "swade", - "systemVersion": "3.3.3", + "systemVersion": "3.3.11", "coreVersion": "11.315", "createdTime": 1708904007939, - "modifiedTime": 1708920779641, + "modifiedTime": 1713643094873, "lastModifiedBy": "sVoCvBU1knmXzoYe" }, "_id": "TQKafoef4sHnDYDk", diff --git a/scripts/rollHelpers.js b/scripts/rollHelpers.js index ded7f2f..f294160 100644 --- a/scripts/rollHelpers.js +++ b/scripts/rollHelpers.js @@ -138,7 +138,10 @@ function getDistance (origin, target) { const ray = new Ray(origin, target) const originScale = getScaleDistanceMod(origin) const targetScale = getScaleDistanceMod(target) - const distance = shim.canvas.grid.measureDistances([{ ray }], { gridSpaces: true })[0] + const flatDistance = shim.canvas.grid.measureDistances( + [{ ray }], { gridSpaces: true })[0] + const elevation = Math.abs(origin.document.elevation - target.document.elevation) + const distance = Math.sqrt(elevation * elevation + flatDistance * flatDistance) return distance - (originScale + targetScale) } @@ -178,7 +181,8 @@ function calcGangup (attacker, target, debug) { t.id !== target.id && t.actor.system.status.isStunned === false && t.visible && - withinRange(target, t, range) + withinRange(target, t, range) && + !(t.actor.effects.find(c => c.name === 'Incapacitated' || c.name === 'Defeated')) ) const attackerAllies = withinRangeOfToken.filter( t => t.document.disposition === attacker.document.disposition)