diff --git a/autorec.json b/autorec.json index 272dc33..74dfb5f 100644 --- a/autorec.json +++ b/autorec.json @@ -15071,7 +15071,10 @@ "enable": false }, "macro": { - "enable": false + "enable": true, + "playWhen": "2", + "name": "Compendium.pf2e-jb2a-macros.Macros.Bouncing Lightning", + "args": "" }, "menuType": "spell", "animation": "chainlightning", @@ -16461,7 +16464,11 @@ "custom": false, "audio": { "a01": { - "enable": false + "enable": true, + "file": "modules/soundfxlibrary/Combat/Single/Spell%20Impact/spell-impact-3.mp3", + "startTime": null, + "volume": null, + "delay": null } }, "levels3d": { @@ -17851,6 +17858,67 @@ }, "menuType": "spell", "menuSection": "61" + }, + "80": { + "below": false, + "hidden": false, + "anim2d": false, + "name": "Chain Lightning", + "soundOnly": { + "enable": false + }, + "macro": { + "enable": true, + "playWhen": "2", + "name": "Compendium.pf2e-jb2a-macros.Macros.Bouncing Lightning", + "args": "" + }, + "menuType": "", + "animation": "", + "variant": "", + "color": "", + "custom": false, + "repeat": null, + "delay": null, + "audio": { + "a01": { + "enable": false + } + }, + "explosion": { + "enable": false + }, + "levels3d": { + "type": "", + "color01": "#000000", + "color02": "#000000", + "speed": null, + "repeat": null, + "arc": null, + "delay": null, + "scale": null, + "alpha": null, + "gravity": null, + "mass": null, + "life": null, + "emittersize": null, + "rate": null, + "addexplosion": { + "enable": false, + "color01": "#000000", + "color02": "#000000", + "speed": null, + "scale": null, + "alpha": null, + "gravity": null, + "mass": null, + "life": null, + "emittersize": null, + "rate": null, + "sprite": "modules/levels-3d-preview/assets/particles/dust.png" + }, + "sprite": "modules/levels-3d-preview/assets/particles/emberssmall.png" + } } }, "static": { @@ -18305,7 +18373,7 @@ }, "11": { "below": false, - "hidden": false, + "hidden": true, "anim2d": false, "name": "Harm", "soundOnly": { @@ -18558,7 +18626,7 @@ "macro": { "enable": true, "playWhen": "2", - "name": "Raise a Shield", + "name": "Compendium.pf2e.action-macros.Raise a Shield", "args": "" }, "type": "", @@ -20335,7 +20403,7 @@ }, "20": { "below": false, - "hidden": false, + "hidden": true, "name": "Effect Rage", "soundOnly": { "enable": false @@ -20358,6 +20426,111 @@ "enable": false } } + }, + "21": { + "below": false, + "hidden": true, + "name": "Invisible", + "soundOnly": { + "enable": false + }, + "macro": { + "enable": true, + "playWhen": "2", + "name": "Compendium.pf2e-jb2a-macros.Macros.Invisibility", + "args": "" + }, + "aeType": "", + "type": "source", + "menuType": "", + "animation": "", + "variant": "", + "color": "", + "custom": false, + "audio": { + "a01": { + "enable": false + } + }, + "repeat": null, + "delay": null, + "scale": null, + "opacity": null, + "aeDelay": null, + "persistent": false, + "unbindAlpha": false, + "unbindVisibility": false, + "explosion": { + "enable": false + } + }, + "22": { + "below": false, + "hidden": true, + "name": "Paralyzed", + "soundOnly": { + "enable": false + }, + "macro": { + "enable": false + }, + "aeType": "static", + "type": "source", + "menuType": "lightning", + "animation": "staticelectricity", + "variant": "03", + "color": "blue", + "custom": false, + "audio": { + "a01": { + "enable": false + } + }, + "repeat": null, + "delay": null, + "scale": null, + "opacity": null, + "aeDelay": null, + "persistent": true, + "unbindAlpha": false, + "unbindVisibility": false, + "explosion": { + "enable": false + } + }, + "23": { + "below": false, + "hidden": true, + "name": "Fascinated", + "soundOnly": { + "enable": false + }, + "macro": { + "enable": false + }, + "aeType": "static", + "type": "source", + "menuType": "conditions", + "animation": "heart", + "variant": "02", + "color": "pink", + "custom": false, + "audio": { + "a01": { + "enable": false + } + }, + "repeat": null, + "delay": null, + "scale": null, + "opacity": null, + "aeDelay": null, + "persistent": true, + "unbindAlpha": false, + "unbindVisibility": false, + "explosion": { + "enable": false + } } } } \ No newline at end of file diff --git a/module.json b/module.json index b872ca6..7cb3e63 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "name": "pf2e-jb2a-macros", "title": "PF2e x JB2A Macros Compendium", "description": "
A module dedicated to making PF2e shine.
", - "version": "1.7.2", + "version": "1.7.3", "minimumCoreVersion": "9", "compatibleCoreVersion": "9", "author": "MrVauxs and Co.", diff --git a/module/auto-import.js b/module/auto-import.js index 29830ac..619ad0b 100644 --- a/module/auto-import.js +++ b/module/auto-import.js @@ -1,4 +1,4 @@ -let version = 172 +let version = 173 Hooks.on("init", () => { game.settings.register("pf2e-jb2a-macros", "imported", { diff --git a/packs/macros.db b/packs/macros.db index f857c78..3496e33 100644 --- a/packs/macros.db +++ b/packs/macros.db @@ -1,7 +1,9 @@ +{"_id":"1dUKN6KL7g3cdDdz","name":"Bouncing Lightning","type":"script","author":"ynn7ZMgoRi8oPGYQ","img":"systems/pf2e/icons/spells/electric-arc.webp","scope":"global","command":"let token = args[1].sourceToken\nlet targetTokens = Array.from(game.user.targets)\nlet sequence = new Sequence() // this is the naimation part, handled by the Sequencer module\n .effect()\n .file(\"jb2a.chain_lightning.primary.blue\")\n .atLocation(token) // Going from origin\n .stretchTo(targetTokens[0]) // To the current loop's target \n .waitUntilFinished(-1100)// The next sequence will start 1.1 seconds before the end of the primary Lightning\n .sound()\n .file(\"modules/soundfxlibrary/Combat/Single/Spell%20Impact%20Lightning/spell-impact-lightning-3.mp3\")\n .fadeInAudio(500)\n .fadeOutAudio(500)\n .effect()\n .file(\"jb2a.static_electricity.02.blue\")\n .atLocation(targetTokens[0])\n .scaleToObject()\n .repeats(2)\n .wait(100)\nfor (let i = 1; i < targetTokens.length; i++) {\n sequence\n .effect()\n .file(\"jb2a.chain_lightning.secondary.blue\")\n .repeats(2)\n .atLocation(targetTokens[i - 1]) // Going from origin\n .stretchTo(targetTokens[i]) // To the current loop's target\n .wait(200)\n .sound()\n .file(\"modules/soundfxlibrary/Combat/Single/Spell%20Impact%20Lightning/spell-impact-lightning-4.mp3\")\n .fadeInAudio(500)\n .fadeOutAudio(500)\n .effect()\n .file(\"jb2a.static_electricity.02.blue\")\n .atLocation(targetTokens[i])\n .scaleToObject()\n .repeats(2)\n .wait(200)\n}\nsequence.play()","folder":null,"sort":0,"permission":{"default":0,"ynn7ZMgoRi8oPGYQ":3},"flags":{"core":{"sourceId":"Macro.a6jod3yUvFLPBT8W"},"advanced-macros":{"runAsGM":false}}} {"_id":"CtkjmTtEYfMPbtm4","name":"Heal","type":"script","author":"ynn7ZMgoRi8oPGYQ","img":"systems/pf2e/icons/spells/heal.webp","scope":"global","command":"let diceNumber = args[0]._roll.terms[0].number\nlet caster = args[1].sourceToken\nlet spellTarget = Array.from(game.user.targets)[0]\nlet doNotTargetCaster = false\n\nlet d = new Dialog({\n title: \"Heal\",\n content: \"How many actions are you using to cast Heal?
\",\n buttons: {\n one: {\n icon: ' ',\n label: \"One Action\",\n callback: () => {\n spellTarget = Array.from(game.user.targets)[0]\n oneActionHeal()\n }\n },\n two: {\n icon: ' ',\n label: \"Two Actions\",\n callback: () => {\n d2.render(true)\n }\n },\n three:{\n icon: ` `,\n label: \"Three Actions\",\n callback: () => {\n d3.render(true)\n }\n }\n },\n default: \"Two Actions\"\n})\n\nlet d2 = new Dialog({\n title: \"Heal\",\n content: `Post Increased Healing?
`,\n buttons: {\n one: {\n label: \"Yes\",\n callback: () => {\n let r = new Roll(`8 * @diceNumber`, {diceNumber})\n r.toMessage()\n spellTarget = Array.from(game.user.targets)[0]\n twoActionHeal()\n }\n },\n two: {\n label: \"No\",\n callback: () => {\n spellTarget = Array.from(game.user.targets)[0]\n twoActionHeal()\n }\n }\n },\n default: \"No\"\n})\n\nlet d3 = new Dialog({\n title: \"Heal\",\n content: `Do you want to target yourself?
`,\n buttons: {\n one: {\n label: \"Yes\",\n callback: () => {\n doNotTargetCaster = false\n threeActionHeal()\n }\n },\n two: {\n label: \"No\",\n callback: () => {\n doNotTargetCaster = true\n threeActionHeal()\n }\n }\n },\n default: \"No\"\n})\n\nmain()\n\nfunction main(){\n if(caster != undefined){\n d.render(true);\n }else{\n ui.notifications.error(`You must select the token of the caster!`)\n return;\n } \n}\n\n//Defining unique behavior for each kind of effect\n\n\nfunction oneActionHeal(){\n //error checking for multiple targets\n if (game.user.targets.size!= 1){\n ui.notifications.error(\"Select only one target!\")\n return;\n }\n if(canvas.grid.measureDistance(caster,spellTarget) < 7.5){\n console.log(\"Close enough to touch!\")\n // checks whether the target is undead or not\n oneActionHealAnimation()\n }else{\n console.log(`Too far to touch!`); \n ui.notifications.error(`Your target is further than touch distance away! Try again.`);\n return;\n } \n}\n\nfunction twoActionHeal(){\n //error checking for multiple targets\n if (game.user.targets.size!= 1){\n ui.notifications.error(\"Select only one target!\")\n return;\n }\n if(canvas.grid.measureDistance(caster,spellTarget) <= 30){\n console.log(\"Within 30 feet!\")\n // checks whether the target is undead or not\n twoActionHealAnimation()\n }else{\n console.log(`Farther than 30 feet!`); \n ui.notifications.error(`Your target is further than 30 feet away! Try again.`);\n return;\n }\n}\n\nfunction threeActionHeal(){\n //divide up all tokens within range into an array for living and an array for undead\n let tokensOnMap = Array.from(canvas.tokens.placeables)\n let tokensInRange = tokensOnMap.filter(distance => canvas.grid.measureDistance(distance,caster)<=30)\n let tokenTraitsInRange = tokensInRange.map(x => x.actor.traits)\n let undeadTokensInRange = []\n let livingTokensInRange = []\n for(let i=0;iHow many actions are you using to cast Harm?
\",\n buttons: {\n one: {\n icon: ' ',\n label: \"One Action\",\n callback: () => {\n spellTarget = Array.from(game.user.targets)[0]\n oneActionHarm()\n }\n },\n two: {\n icon: ' ',\n label: \"Two Actions\",\n callback: () => {\n d2.render(true);\n }\n },\n three:{\n icon: ` `,\n label: \"Three Actions\",\n callback: () => {\n d3.render(true);\n }\n }\n },\n default: \"Two Actions\"\n})\n\nlet d2 = new Dialog({\n title: \"Harm\",\n content: `Post Increased Healing?
`,\n buttons: {\n one: {\n label: \"Yes\",\n callback: () => {\n let r = new Roll(`8 * @diceNumber`, {diceNumber})\n r.toMessage()\n spellTarget = Array.from(game.user.targets)[0]\n twoActionHarm()\n }\n },\n two: {\n label: \"No\",\n callback: () => {\n spellTarget = Array.from(game.user.targets)[0]\n twoActionHarm()\n }\n }\n },\n default: \"No\"\n})\n\nlet d3 = new Dialog({\n title: \"Harm\",\n content: `Do you want to target yourself?
`,\n buttons: {\n one: {\n label: \"Yes\",\n callback: () => {\n doNotTargetCaster = false\n threeActionHarm()\n }\n },\n two: {\n label: \"No\",\n callback: () => {\n doNotTargetCaster = true\n threeActionHarm()\n }\n }\n },\n default: \"No\"\n})\n\n\nmain()\n\nfunction main(){\n if(caster != undefined){\n d.render(true);\n }else{\n ui.notifications.error(`You must select the token of the caster!`)\n return;\n } \n}\n\n//Defining unique behavior for each kind of effect\n\n\nfunction oneActionHarm(){\n //error checking for multiple targets\n if (game.user.targets.size!= 1){\n ui.notifications.error(\"Select only one target!\")\n return;\n }\n if(canvas.grid.measureDistance(caster,spellTarget) < 7.5){\n console.log(\"Close enough to touch!\")\n // checks whether the target is undead or not\n oneActionHarmAnimation()\n }else{\n console.log(`Too far to touch!`); \n ui.notifications.error(`Your target is further than touch distance away! Try again.`);\n return;\n } \n}\n\nfunction twoActionHarm(){\n //error checking for multiple targets\n if (game.user.targets.size!= 1){\n ui.notifications.error(\"Select only one target!\")\n return;\n }\n if(canvas.grid.measureDistance(caster,spellTarget) <= 30){\n console.log(\"Within 30 feet!\")\n // checks whether the target is undead or not\n twoActionHarmAnimation()\n }else{\n console.log(`Farther than 30 feet!`); \n ui.notifications.error(`Your target is further than 30 feet away! Try again.`);\n return;\n }\n}\n\nfunction threeActionHarm(){\n //divide up all tokens within range into an array for living and an array for undead\n let tokensOnMap = Array.from(canvas.tokens.placeables)\n let tokensInRange = tokensOnMap.filter(distance => canvas.grid.measureDistance(distance,caster)<=30)\n let tokenTraitsInRange = tokensInRange.map(x => x.actor.traits)\n let undeadTokensInRange = []\n let livingTokensInRange = []\n for(let i=0;i