Skip to content

Commit

Permalink
1.7.8
Browse files Browse the repository at this point in the history
  • Loading branch information
MrVauxs committed Jul 16, 2022
1 parent 813806d commit 4be57b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pf2e-jb2a-macros",
"title": "PF2e x JB2A Macros Compendium",
"description": "<p>A module dedicated to making PF2e shine.</p>",
"version": "1.7.7",
"version": "1.7.8",
"minimumCoreVersion": "9",
"compatibleCoreVersion": "9",
"author": [
Expand Down
2 changes: 1 addition & 1 deletion packs/macros.db
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{"_id":"KXoNTv1YkjM3D9NI","name":"Soul Siphon","type":"script","author":"ynn7ZMgoRi8oPGYQ","img":"icons/magic/unholy/strike-body-explode-disintegrate.webp","scope":"global","command":"let token = args[1].sourceToken\nlet target = Array.from(game.user.targets)[0]\nnew Sequence()\n .effect()\n .atLocation(token)\n .stretchTo(target)\n .file(\"jb2a.energy_strands.range.standard.dark_green\")\n .waitUntilFinished(-1500)\n .effect()\n .atLocation(target)\n .stretchTo(token)\n .file(\"jb2a.energy_strands.range.standard.dark_red\")\n .waitUntilFinished(-1500)\n .effect()\n .randomRotation()\n .scaleToObject(2)\n .atLocation(token)\n .file(\"jb2a.energy_strands.in.red.01.2\")\n .play()","folder":null,"sort":0,"permission":{"default":0,"ynn7ZMgoRi8oPGYQ":3},"flags":{"core":{"sourceId":"Macro.a6jod3yUvFLPBT8W"},"advanced-macros":{"runAsGM":false}}}
{"_id":"LxFkyULbmva8yGDm","name":"Bane_Animation","type":"script","author":"ynn7ZMgoRi8oPGYQ","img":"systems/pf2e/icons/spells/bane.webp","scope":"global","command":"let caster = args[1].sourceToken\n\nlet baneAnim = Sequencer.EffectManager.getEffects({ origin: \"BaneAnim\", source: caster })[0]\n\nlet thereIsIntro = Sequencer.EffectManager.getEffects({ origin: \"BaneAnim\", name: \"Bane Intro\" })[0] //locates the bane animation created by Bane_Animation\n\nfunction main() {\n //checks to ensure a single token is selected\n if (canvas.tokens.controlled.length == 0) {\n ui.notifications.error(\"Select the token on which a bane effect is active.\")\n return\n } else if (canvas.tokens.controlled.length > 1) {\n ui.notifications.error(\"Select only one token.\")\n return\n }\n}\nif (baneAnim) {\n let endAnimation = await warpgate.menu({\n inputs: [{ type: 'info', label: 'End, Keep, or Expand the Bane Animation?'},],\n buttons: [{\n label: 'End',\n value: 1\n }, {\n label: 'Keep',\n value: 2\n }, {\n label: 'Expand',\n value: 3\n }]\n }, { title: \"Bane\" })\n console.log(endAnimation)\n if (endAnimation.buttons === 1) {\n Sequencer.EffectManager.endEffects({ origin: \"BaneAnim\", source: caster })[0]\n } else if (endAnimation.buttons === 3) {\n let incrementValue = 3; //3 is the value for radius = 1 square\n\n main()\n\n //checks to make sure bane is active on the selected token\n if (Sequencer.EffectManager.getEffects({ origin: \"BaneAnim\", source: caster })[0] === undefined) {\n ui.notifications.error(`There are no instances of the bane effect active on this token.`)\n return\n }\n\n //increments the radius of the effect by 1 square\n baneAnim.update({\n size: {\n width: baneAnim.data.size.width + incrementValue,\n height: baneAnim.data.size.height + incrementValue,\n gridUnits: true\n }\n })\n }\n\n} else if (!thereIsIntro) {\n new Sequence(\"Bane\")\n .effect()\n .file(\"jb2a.bless.400px.intro.purple\")\n .scaleIn(2, 1000, {ease: \"easeInBounce\"})\n .atLocation(caster)\n .waitUntilFinished(-500)\n .name(\"Bane Intro\")\n .origin(\"BaneAnim\")\n .effect()\n .file(\"jb2a.bless.400px.loop.purple\")\n .atLocation(caster)\n .fadeOut(500)\n .persist()\n .attachTo(caster)\n .belowTokens(true)\n .origin(\"BaneAnim\")\n .name(\"Bane\")\n .scaleOut(0, 500, {ease: \"easeOutCubic\"})\n .size(4, { gridUnits: true })\n .play()\n}","folder":null,"sort":0,"permission":{"default":0,"ynn7ZMgoRi8oPGYQ":3},"flags":{"core":{"sourceId":"Macro.eJJhPoLdv7ul62dc"},"advanced-macros":{"runAsGM":false}}}
{"_id":"OOYnWts6o8nGdhC6","name":"Haunting Hymn","type":"script","author":"ynn7ZMgoRi8oPGYQ","img":"systems/pf2e/icons/spells/haunting-hymn.webp","scope":"global","command":"let token = args[1].sourceToken\nconst template = args[1].templateData;\nconst [templateX, templateY] = [template.data.x, template.data.y];\nnew Sequence()\n .effect()\n .file('jb2a.template_circle.out_pulse.01.burst')\n .fadeIn(500)\n .fadeOut(500)\n .mask(template)\n .atLocation(token)\n .scale(1)\n .randomRotation()\n .play()","folder":null,"sort":0,"permission":{"default":0,"ynn7ZMgoRi8oPGYQ":3},"flags":{"advanced-macros":{"runAsGM":false},"core":{"sourceId":"Macro.a6jod3yUvFLPBT8W"}}}
{"_id":"Q0hKSbLmADnVbKQB","name":"Persistent Conditions","type":"script","author":"ynn7ZMgoRi8oPGYQ","img":"icons/skills/wounds/blood-drip-droplet-red.webp","scope":"global","command":"let token = args[0].token\nlet type = /Received Fast Healing/g.test(args[0].data.flavor) ? \"healing\" : args[0].data.flags.persistent.damageType;\nlet color = \"jb2a.liquid.splash.red\"\nlet scale = 1.5\nlet below = false\n\nswitch (type.toLowerCase()) {\n case \"piercing\":\n case \"slashing\":\n case \"bleed\": color = \"jb2a.liquid.splash.red\"; break;\n case \"acid\": color = \"jb2a.liquid.splash.green\"; break;\n case \"acid\": color = \"jb2a.liquid.splash.blue\"; break;\n case \"bludgeoning\": below = true; scale = 2.5; color = \"jb2a.impact.ground_crack.blue.03\"; break;\n case \"good\": color = \"jb2a.divine_smite.caster.yellowwhite\"; break;\n case \"evil\": color = \"jb2a.divine_smite.caster.dark_red\"; break;\n case \"lawful\": color = \"jb2a.divine_smite.caster.orange\"; break;\n case \"chaotic\": color = \"jb2a.divine_smite.caster.purplepink\"; break;\n case \"sonic\": color = \"jb2a.thunderwave.center.blue\"; break;\n case \"electricity\": color = \"jb2a.lightning_strike.blue.0\"; break;\n case \"cold\": scale = 2; color = \"jb2a.impact_themed.ice_shard.blue\"; break;\n case \"force\": below = true; scale = 3; color = \"jb2a.impact.ground_crack.blue.01\"; break; \n case \"mental\": color = \"jb2a.magic_signs.rune.enchantment.intro.purple\"; break; \n case \"poison\": color = \"jb2a.icon.poison.dark_green\"; break; \n case \"negative\": color = \"jb2a.healing_generic.200px.purple\"; break; \n case \"positive\": color = \"jb2a.healing_generic.400px.yellow\"; break;\n case \"healing\": color = \"jb2a.healing_generic.400px.green\"; break;\n default: ui.notifications.error(`Can't find animation for ${type}`)\n}\n\nnew Sequence()\n .effect()\n .belowTokens(below)\n .fadeIn(500)\n .fadeOut(500)\n .atLocation(token)\n .scaleToObject(scale)\n .file(color)\n .play()","folder":null,"sort":0,"permission":{"default":0,"ynn7ZMgoRi8oPGYQ":3},"flags":{"core":{"sourceId":"Macro.5PhqUehtnjxz35Gg"},"advanced-macros":{"runAsGM":false}}}
{"_id":"Q0hKSbLmADnVbKQB","name":"Persistent Conditions","type":"script","author":"ynn7ZMgoRi8oPGYQ","img":"icons/skills/wounds/blood-drip-droplet-red.webp","scope":"global","command":"let token = args[0].token\nlet type = /Received Fast Healing/g.test(args[0].data.flavor) ? \"healing\" : args[0].data.flags.persistent.damageType;\nlet color = \"jb2a.liquid.splash.red\"\nlet scale = 1.5\nlet below = false\n\nswitch (type.toLowerCase()) {\n case \"piercing\":\n case \"slashing\":\n case \"bleed\": color = \"jb2a.liquid.splash.red\"; break;\n case \"acid\": color = \"jb2a.liquid.splash.green\"; break;\n case \"acid\": color = \"jb2a.liquid.splash.blue\"; break;\n case \"bludgeoning\": below = true; scale = 2.5; color = \"jb2a.impact.ground_crack.blue.03\"; break;\n case \"good\": color = \"jb2a.divine_smite.caster.yellowwhite\"; break;\n case \"evil\": color = \"jb2a.divine_smite.caster.dark_red\"; break;\n case \"lawful\": color = \"jb2a.divine_smite.caster.orange\"; break;\n case \"chaotic\": color = \"jb2a.divine_smite.caster.purplepink\"; break;\n case \"sonic\": color = \"jb2a.thunderwave.center.blue\"; break;\n case \"electricity\": color = \"jb2a.lightning_strike.blue.0\"; break;\n case \"cold\": scale = 2; color = \"jb2a.impact_themed.ice_shard.blue\"; break;\n case \"force\": below = true; scale = 3; color = \"jb2a.impact.ground_crack.blue.01\"; break; \n case \"mental\": color = \"jb2a.magic_signs.rune.enchantment.intro.purple\"; break; \n case \"poison\": color = \"jb2a.icon.poison.dark_green\"; break; \n case \"negative\": color = \"jb2a.healing_generic.200px.purple\"; break; \n case \"positive\": color = \"jb2a.healing_generic.400px.yellow\"; break;\n case \"healing\": color = \"jb2a.healing_generic.400px.green\"; break;\n case \"fire\": return;\n default: ui.notifications.error(`Can't find animation for ${type}`)\n}\n\nnew Sequence()\n .effect()\n .belowTokens(below)\n .fadeIn(500)\n .fadeOut(500)\n .atLocation(token)\n .scaleToObject(scale)\n .file(color)\n .play()","folder":null,"sort":0,"permission":{"default":0,"ynn7ZMgoRi8oPGYQ":3},"flags":{"core":{"sourceId":"Macro.5PhqUehtnjxz35Gg"},"advanced-macros":{"runAsGM":false}}}
{"_id":"Ud5YTIG6RADp2RTH","name":"Sneak Attack","type":"script","author":"ynn7ZMgoRi8oPGYQ","img":"icons/skills/melee/maneuver-daggers-paired-orange.webp","scope":"global","command":"console.log(args)\nlet token = args[0].token\nif (token) new Sequence()\n .effect()\n .atLocation(token)\n .file(\"jb2a.sneak_attack\")\n .play()","folder":null,"sort":0,"permission":{"default":0,"ynn7ZMgoRi8oPGYQ":3},"flags":{"advanced-macros":{"runAsGM":false},"core":{"sourceId":"Macro.ZjHrmv8AvlIcUUpH"}}}
{"_id":"XSlxNRM032wVYBBw","name":"Clumsy","type":"script","author":"ynn7ZMgoRi8oPGYQ","img":"icons/skills/movement/feet-winged-boots-brown.webp","scope":"global","command":"/*\nlet token = args[1].sourceToken\nlet conditionOverhead = Sequencer.EffectManager.getEffects({ name: `${token.name} - Conditions Overhead*`, object: token })\n\nconsole.log(conditionOverhead)\n\nif (args[0] == \"on\") {\n new Sequence()\n .effect()\n .name(`${token.name} - Conditions Overhead - Clumsy`)\n .attachTo(token, {bindAlpha: false})\n .from(token)\n .loopProperty(\"spriteContainer\", \"rotation\", { values: [0, 5, 0, -5], duration: 2000, pingPong: true})\n .persist()\n .fadeOut(500)\n .animation()\n .on(token)\n .fadeOut(100)\n .play()\n} else if (args[0] == \"off\") {\n new Sequence()\n .animation()\n .fadeIn(100)\n .on(token)\n .play()\n await Sequencer.EffectManager.endEffects({ name: `${token.name} - Conditions Overhead - Clumsy`, object: token })\n}\n*/","folder":null,"sort":0,"permission":{"default":0,"ynn7ZMgoRi8oPGYQ":3},"flags":{"advanced-macros":{"runAsGM":false},"core":{"sourceId":"Macro.a6jod3yUvFLPBT8W"}}}
{"_id":"XtFJjALF0A4VvgRn","name":"Invisibility","type":"script","author":"ynn7ZMgoRi8oPGYQ","img":"icons/svg/blind.svg","scope":"global","command":"let token = args[1].sourceToken\nif (args[0] == \"on\") {\n new Sequence()\n .animation()\n .on(token)\n .fadeOut(1000)\n .effect()\n .name(`${token.name} - Invisible`)\n .file(\"jb2a.markers.circle_of_stars.blue\")\n .fadeIn(1000)\n .atLocation(token)\n .mask()\n .fadeOut(1000)\n .scaleToObject(token.data.scale)\n .attachTo(token, {bindAlpha: false, bindVisibility: false})\n .persist()\n .play()\n} else if (args[0] == \"off\") {\n new Sequence()\n .animation()\n .on(token)\n .fadeIn(1000)\n .play();\n await Sequencer.EffectManager.endEffects({ name: `${token.name} - Invisible`, object: token });\n}","folder":null,"sort":0,"permission":{"default":0,"ynn7ZMgoRi8oPGYQ":3},"flags":{"advanced-macros":{"runAsGM":false},"core":{"sourceId":"Macro.4kHSLUSKB3QkneWv"}}}
Expand Down

0 comments on commit 4be57b1

Please sign in to comment.