diff --git a/feats/fvtt-Item-piercer.json b/feats/fvtt-Item-piercer.json index 2dc8b80..688fad7 100644 --- a/feats/fvtt-Item-piercer.json +++ b/feats/fvtt-Item-piercer.json @@ -221,7 +221,7 @@ "systemVersion": "2.0.3", "coreVersion": "10.291", "createdTime": 1671193294445, - "modifiedTime": 1672501950297, + "modifiedTime": 1672501961348, "lastModifiedBy": "paMZuKDupk0GHKFn" } } \ No newline at end of file diff --git a/fvtt-Item-piercer.json b/fvtt-Item-piercer.json deleted file mode 100644 index 688fad7..0000000 --- a/fvtt-Item-piercer.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "name": "Piercer", - "type": "feat", - "img": "icons/skills/ranged/arrow-flying-broadhead-metal.webp", - "effects": [ - { - "_id": "5LsTTEo1APQ0w520", - "changes": [ - { - "key": "flags.midi-qol.onUseMacroName", - "mode": 0, - "value": "ItemMacro.Piercer,all", - "priority": 20 - } - ], - "disabled": false, - "duration": { - "startTime": null, - "seconds": null, - "combat": null, - "rounds": null, - "turns": null, - "startRound": null, - "startTurn": null - }, - "icon": "icons/skills/ranged/arrow-flying-broadhead-metal.webp", - "label": "Piercer", - "origin": "Item.Aj6rMauKBQFNOrub", - "transfer": true, - "flags": { - "core": { - "statusId": "" - }, - "dae": { - "stackable": "none", - "durationExpression": "", - "macroRepeat": "none", - "specialDuration": [], - "transfer": true, - "selfTarget": false, - "selfTargetAlways": false - }, - "ActiveAuras": { - "isAura": false, - "aura": "None", - "radius": null, - "alignment": "", - "type": "", - "ignoreSelf": false, - "height": false, - "hidden": false, - "displayTemp": false, - "hostile": false, - "onlyOnce": false - }, - "effective-transferral": { - "transferBlock": { - "button": false, - "chat": false, - "displayCard": false - }, - "transferrable": { - "self": true, - "target": true - } - } - }, - "tint": null - } - ], - "flags": { - "scene-packer": { - "hash": "f3b9a9677145900ee7ebb31656a51743d65db882", - "sourceId": "Item.skYBkTDPY0N425kz" - }, - "spellTemplateManager": { - "stmData": { - "ignoreDuration": false, - "spellTexture": "", - "useTexture": false, - "alpha": 50, - "coneOrigin": 1, - "loopAnimations": true - } - }, - "magicitems": { - "enabled": false, - "equipped": false, - "attuned": false, - "charges": "0", - "chargeType": "c1", - "destroy": false, - "destroyFlavorText": "reaches 0 charges: it crumbles into ashes and is destroyed.", - "rechargeable": false, - "recharge": "0", - "rechargeType": "t1", - "rechargeUnit": "r1", - "sorting": "l" - }, - "itemacro": { - "macro": { - "data": { - "_id": null, - "name": "Piercer", - "type": "script", - "author": "ldRsJ6Yp5qPydWA1", - "img": "icons/svg/dice-target.svg", - "scope": "global", - "command": "/*****\nPiercer\n\nUSAGE: Automatic just place on a character \n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\")?.data;\n\n // make sure the attempted hit was made with a weapon attack\n if (![\"mwak\", \"rwak\"].includes(args[0].item.data.actionType)) return;\n\n // damage type must be \"piercing\" \n if (workflow.defaultDamageType != \"piercing\") return;\n\n // breakdown weapon damage to find the base die, if there was a critical, and the lowest die roll\n let baseDie = null;\n let lowestDieRoll = 0;\n for (let i = 0; i < workflow.damageRoll.terms.length; i++)\n if (workflow.damageRoll.terms[i]?.faces) {\n baseDie = \"1d\" + workflow.damageRoll.terms[i].faces;\n lowestDieRoll = workflow.damageRoll.terms[i].results[0].result;\n for (let j = 0; j < workflow.damageRoll.terms[i].results.length; j++)\n if (workflow.damageRoll.terms[i].results[j].result < lowestDieRoll) lowestDieRoll = workflow.damageRoll.terms[i].results[j].result;\n }\n\n // create a dialog and prompt to re-roll lowest die\n let dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Piercer Feat:\",\n content: `

would you like to re-roll your lowest damage die?

Lowest Die Roll: ${lowestDieRoll}

`,\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n let choice = await dialog;\n\n if (choice) await setProperty(workflow, \"ReplaceRoll\", choice);\n await setProperty(workflow, \"LowestRoll\", lowestDieRoll);\n await setProperty(workflow, \"BaseDie\", baseDie);\n\n // trigger BonusDamage to apply the extra damage / adjustments outside of the normal damage roll\n let effectData = {\n label: \"Piercer reRoll\",\n changes: [{ key: \"flags.dnd5e.DamageBonusMacro\", mode: 0, value: `ItemMacro.Piercer`, priority: 20 }],\n icon: thisItem.img,\n origin: thisItem.uuid,\n duration: { turns: 1 }\n };\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: actorUuid, effects: [effectData] });\n return;\n\n} else if (args[0].tag === \"DamageBonus\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\")?.data;\n const targetToken = await fromUuid(args[0].hitTargetUuids[0] ?? \"\");\n const targetActor = targetToken.actor;\n let choice = await getProperty(workflow, \"ReplaceRoll\");\n let lowestDieRoll = await getProperty(workflow, \"LowestRoll\");\n let baseDie = await getProperty(workflow, \"BaseDie\");\n let reRoll = null;\n\n // remove extra damage effect \n let effect = await findEffect(actorToken, \"Piercer reRoll\");\n await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: actorUuid, effects: [effect.id] });\n\n // test if critical is true, apply extra damage die\n if (workflow?.isCritical) {\n reRoll = await new Roll(baseDie).roll();\n new MidiQOL.DamageOnlyWorkflow(targetActor, targetToken, reRoll.total, \"piercing\", [targetToken], reRoll, { flavor: \"Piercer Feat: Critical Extra Damage\", itemData: thisItem, itemCardId: \"new\" });\n }\n\n // if reRoll was selected figure out the difference and apply adjustment to the target\n if (choice) {\n reRoll = await new Roll(baseDie).roll();\n if (reRoll.result < lowestDieRoll) {\n // healback difference\n let difference = lowestDieRoll - reRoll.result;\n return { damageRoll: `${difference}[healing]`, flavor: \"Piercer Feat: ReRoll Adjustment\" }\n } else {\n // damage difference\n let difference = reRoll.result - lowestDieRoll;\n return { damageRoll: `${difference}[piercing]`, flavor: \"Piercer Feat: ReRoll Adjustment\" }\n }\n }\n return;\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}", - "folder": null, - "sort": 0, - "permission": { - "default": 0 - }, - "flags": {} - }, - "name": "Piercer", - "type": "script", - "scope": "global", - "command": "/*****\nPiercer\n\nUSAGE: Automatic just place on a character \n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\");\n let baseDie = null;\n let lowestDieRoll = 0;\n let choice = false; \n\n // make sure the attempted hit was made with a weapon attack\n if (![\"mwak\", \"rwak\"].includes(args[0].item.system.actionType)) return;\n console.log(\"MACRO TEST | Making Weapon Attack - PASSED\");\n\n // damage type must be \"piercing\" \n if (workflow.defaultDamageType != \"piercing\") return;\n console.log(\"MACRO TEST | Weapon is piercing - PASSED\");\n\n // breakdown weapon damage to find the base weapon damage die and the lowest die roll\n for (let i = 0; i < workflow.damageRoll.terms.length; i++)\n if (workflow.damageRoll.terms[i]?.faces) {\n baseDie = \"1d\" + workflow.damageRoll.terms[i].faces;\n console.log(\"MACRO TEST | Base Die: %s\",baseDie);\n lowestDieRoll = workflow.damageRoll.terms[i].results[0].result;\n for (let j = 0; j < workflow.damageRoll.terms[i].results.length; j++)\n if (workflow.damageRoll.terms[i].results[j].result < lowestDieRoll) lowestDieRoll = workflow.damageRoll.terms[i].results[j].result;\n }\n\n // check if piercer reroll was already used this turn, if true skip dialog prompt \n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn /100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"Piercer reRoll\");\n \n if (combatTime === lastTime) {\n console.log(\"Piercer reRoll: Already done a Piercer reRoll this turn\");\n }\n else {\n // create a dialog and prompt to re-roll lowest die\n let dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Piercer Feat:\",\n content: `

would you like to re-roll your lowest damage die?

Lowest Die Roll: ${lowestDieRoll}

`,\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n choice = await dialog;\n console.log(\"MACRO TEST | choice is: \" + choice);\n }\n }\n\n await setProperty(workflow, \"ReplaceRoll\", choice);\n await setProperty(workflow, \"LowestRoll\", lowestDieRoll);\n await setProperty(workflow, \"BaseDie\", baseDie);\n\n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn /100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"Piercer reRoll\");\n if (combatTime !== lastTime) {\n await actor.setFlag(\"midi-qol\", \"Piercer reRoll\", combatTime);\n console.log(\"MACRO TEST | Set Piercer reRoll flag to combat time\");\n }\n }\n return;\n} \n\nif (args[0].tag === \"DamageBonus\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\");\n const targetToken = await fromUuid(args[0].hitTargetUuids[0] ?? \"\");\n const targetActor = targetToken.actor;\n let choice = await getProperty(workflow, \"ReplaceRoll\");\n let lowestDieRoll = await getProperty(workflow, \"LowestRoll\");\n let baseDie = await getProperty(workflow, \"BaseDie\");\n \n //let diff = await getProperty(workflow, \"Difference\");\n console.log(\"MACRO TEST | choice: %s lowest: %s base Die: %s\",choice, lowestDieRoll, baseDie);\n let reRoll = null;\n let critRoll = null;\n\n // test if critical is true, roll extra damage die\n if (workflow?.isCritical) {\n console.log(\"MACRO TEST | critical!\");\n critRoll = await new Roll(baseDie).evaluate({async: true});\n console.log(\"MACRO TEST | critical roll extra die %O\",critRoll);\n }\n\n // if reRoll was selected figure out the difference and apply adjustment to the target\n if (choice) {\n reRoll = await new Roll(baseDie).evaluate({async: true});\n console.log(\"MACRO TEST | ReRoll: %O\",reRoll);\n let difference = reRoll.result - lowestDieRoll;\n if (difference < 0) {\n // healback difference\n // let difference = lowestDieRoll - reRoll.result;\n console.log(\"MACRO TEST | Difference < 0 : %s\", difference); \n //await setProperty(workflow, \"Difference\", difference);\n if (workflow?.isCritical)\n return { damageRoll: `${difference}[healing] + ${critRoll.total}[piercing]`, flavor: \"Piercer Feat: ReRoll was lower + critical bonus\" }\n else \n return { damageRoll: `${difference}[healing]`, flavor: \"Piercer Feat: ReRoll was lower\" }\n } else if (difference > 0) {\n // damage difference\n // let difference = reRoll.result - lowestDieRoll;\n console.log(\"MACRO TEST | Difference > 0 : %s\", difference); \n //await setProperty(workflow, \"Difference\", difference);\n if (workflow?.isCritical)\n return { damageRoll: `${difference}[piercing] + ${critRoll.total}[piercing]`, flavor: \"Piercer Feat: ReRoll was higher + critical bonus\" }\n else \n return { damageRoll: `${difference}[piercing]`, flavor: \"Piercer Feat: ReRoll was higher\" }\n }\n } \n else { // add critical damage if it is a critcal reguardless of reroll\n if (workflow?.isCritical)\n return { damageRoll: `${critRoll.total}[piercing]`, flavor: \"Piercer Feat: Critical bonus\" }\n else \n return; \n }\n return;\n}", - "author": "paMZuKDupk0GHKFn", - "_id": null, - "img": "icons/svg/dice-target.svg", - "folder": null, - "sort": 0, - "ownership": { - "default": 0 - }, - "flags": {}, - "_stats": { - "systemId": null, - "systemVersion": null, - "coreVersion": null, - "createdTime": null, - "modifiedTime": null, - "lastModifiedBy": null - } - } - }, - "core": { - "sourceId": "Item.5PUe0GiheEHUomoR" - }, - "exportSource": { - "world": "5e-test-world", - "system": "dnd5e", - "coreVersion": "10.291", - "systemVersion": "2.0.3" - }, - "cf": { - "id": "temp_b676eyusztv" - }, - "favtab": { - "isFavorite": true - } - }, - "system": { - "description": { - "value": "

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
", - "chat": "", - "unidentified": "" - }, - "source": "TCoE p80", - "activation": { - "type": "special", - "cost": 0, - "condition": "" - }, - "duration": { - "value": null, - "units": "" - }, - "target": { - "value": null, - "width": null, - "units": "", - "type": "self" - }, - "range": { - "value": null, - "long": null, - "units": "" - }, - "uses": { - "value": null, - "max": "", - "per": "", - "recovery": "" - }, - "consume": { - "type": "", - "target": "", - "amount": null - }, - "ability": null, - "actionType": "", - "attackBonus": 0, - "chatFlavor": "", - "critical": { - "threshold": null, - "damage": "" - }, - "damage": { - "parts": [], - "versatile": "" - }, - "formula": "", - "save": { - "ability": "", - "dc": null, - "scaling": "spell" - }, - "requirements": "Feat: Piercer", - "recharge": { - "value": null, - "charged": false - }, - "attunement": 0 - }, - "_stats": { - "systemId": "dnd5e", - "systemVersion": "2.0.3", - "coreVersion": "10.291", - "createdTime": 1671193294445, - "modifiedTime": 1672501961348, - "lastModifiedBy": "paMZuKDupk0GHKFn" - } -} \ No newline at end of file diff --git a/module.json b/module.json index 7d7e305..d87a63e 100644 --- a/module.json +++ b/module.json @@ -1,4 +1,4 @@ -{ +{ "name": "more-automated-spells-items-and-feats", "title": "More Automated Spells Items and Feats", "description": "A FoundryVTT module containing a MASIF (More Automated Spells Items and Feats) amount of automation for D&D 5e.", diff --git a/module/packs/MASIF-class-features.db b/module/packs/MASIF-class-features.db index eac130a..bce515e 100644 --- a/module/packs/MASIF-class-features.db +++ b/module/packs/MASIF-class-features.db @@ -1,24 +1,24 @@ -{"name":"Aura of Alacrity","type":"feat","img":"icons/skills/movement/feet-winged-boots-brown.webp","effects":[{"_id":"2clgap6djsy9eun2","changes":[{"key":"system.attributes.movement.walk","mode":2,"value":"10","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/movement/feet-winged-boots-brown.webp","label":"Aura of Alacrity","origin":"Actor.XhIWoWzMyMzFK5FU.Item.8TLpbFnPykVWRRwa","transfer":true,"flags":{"core":{"statusId":"1"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":true,"aura":"Allies","radius":5,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":2203086,"type":"class","dndbeyond":{"requiredLevel":7,"displayOrder":3,"levelScale":{"id":266710,"level":7,"description":"Aura of Alacrity (Range 5 feet)","dice":null,"fixedValue":5},"levelScales":[{"id":266710,"level":7,"description":"Aura of Alacrity (Range 5 feet)","dice":{"diceCount":null,"diceValue":null,"diceMultiplier":null,"fixedValue":null,"diceString":null},"fixedValue":5},{"id":266711,"level":18,"description":"Aura of Alacrity (range 10 feet)","dice":{"diceCount":null,"diceValue":null,"diceMultiplier":null,"fixedValue":null,"diceString":null},"fixedValue":10}],"limitedUse":[],"class":"Paladin : Oath of Glory"},"class":"Paladin","subclass":"Oath of Glory","importId":"lkdgypqhrbwo10lx"},"obsidian":{"source":{"type":"class","text":"Paladin"}},"scene-packer":{"hash":"916aed0ea4bdfe1f141791556381e3db671b77a7","sourceId":"Item.Mhlez0HNjTrqcioa"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.IymI4xM6Du0DvYhg"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"MOoT p29","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Paladin : Oath of Glory","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286488,"modifiedTime":1671805171923,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"FQvaKFrgwF1fWdbg"} -{"name":"Auto Divine Fury","type":"feat","img":"icons/magic/fire/projectile-wave-arrow.webp","effects":[{"_id":"BPyKtcWCBpuwouN9","changes":[{"key":"flags.dae","mode":0,"value":"autoDivineFury 1","priority":10}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/fire/projectile-wave-arrow.webp","label":"Auto Divine Fury","origin":"Item.x0Obbisd7EriI1UU","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":false},"cf":null,"core":{"sourceId":"Compendium.midi-qol.midiqol-sample-items.uvRQayOyn61L6vOV"},"scene-packer":{"hash":"370dad0cafacc0a0db2b497710589878b3b63c28","sourceId":"Item.rkofBOz9EUgalF4s"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"XGtE p11","activation":{"type":"action","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":0,"max":"0","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":null},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Barbarian Zealot Path","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286504,"modifiedTime":1671805171931,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"WNQJSYCXQVxzDfE3"} -{"name":"Channel Divinity: Inspiring Smite","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[{"_id":"mj8jXTYFLF8zANxn","changes":[{"key":"macro.itemMacro","mode":0,"value":"ItemMacro","priority":50}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/magic/life/heart-cross-blue.webp","label":"Inspiring Smite Healing Pool","origin":"Item.D5SPoopIkNLJ3PyB","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"scene-packer":{"hash":"94fa30ae2854d091e6b75792dd9e6ea67c747d06","sourceId":"Item.h3C3TVjtPEyRI2jM"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"core":{"sourceId":"Item.D5SPoopIkNLJ3PyB"},"itemacro":{"macro":{"data":{"_id":null,"name":"Channel Divinity: Inspiring Smite","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nChannel Divinity: Inspiring Smite\n\nUSE: Manually triggered after to hit with divine smite\nCreate a healing pool - roll 2d8 + class level\nStore the healing pool on the character in a DAE variable that terminates at the end of the actors turn\n\nv1.1 August 6 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n\n // Test Class\n let pcPaladin = pcActor.getRollData().classes?.paladin;\n if (pcPaladin === null) {\n ui.notifications.error(\"You are not a Paladin!\");\n return;\n }\n\n // Test Subclass\n let pcPaladinSubclass = pcActor.getRollData().classes.paladin?.subclass.identifier;\n if (pcPaladinSubclass != \"oath-of-glory\") {\n ui.notifications.error(\"You are not a Oath of Glory Paladin!\");\n return;\n }\n\n //roll 2d8 + pcPaladin.levels and store result in flag.dae.healingPool\n const roll = await(new Roll(`2d8 + ${pcPaladin.levels}`)).roll();\n pcActor.setFlag(\"dae\", \"healingpool\", roll.total);\n return;\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"healingpool\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Channel Divinity: Inspiring Smite","type":"script","scope":"global","command":"/*****\nChannel Divinity: Inspiring Smite\n\nUSE: Manually triggered after to hit with divine smite\nCreate a healing pool - roll 2d8 + class level\nStore the healing pool on the character in a DAE variable that terminates at the end of the actors turn\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n\n // Test Class\n let pcPaladin = pcActor.getRollData().classes?.paladin;\n if (pcPaladin === null) {\n ui.notifications.error(\"You are not a Paladin!\");\n return;\n }\n\n // Test Subclass\n let pcPaladinSubclass = pcActor.getRollData().classes.paladin?.subclass.identifier;\n if (pcPaladinSubclass != \"oath-of-glory\") {\n ui.notifications.error(\"You are not a Oath of Glory Paladin!\");\n return;\n }\n\n //roll 2d8 + pcPaladin.levels and store result in flag.dae.healingPool\n const roll = await(new Roll(`2d8 + ${pcPaladin.levels}`)).evaluate({async: true});\n pcActor.setFlag(\"dae\", \"healingpool\", roll.total);\n return;\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"healingpool\");\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"favtab":{"isFavorite":true},"cf":{"id":"temp_92357bvnxs9"},"ddbimporter":{"pack":"world.ddb-override","id":"1731654","entityTypeId":"222216831","componentId":2203085,"componentTypeId":12168134,"class":"Paladin","subclass":"Oath of Glory","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1},{"level":null,"uses":1}]},"importId":"7hbudetkus7tdkj4","originalItemName":"Channel Divinity: Inspiring Smite","replaced":true},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"MOoT p.29","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Paladin: Oath of Glory","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286496,"modifiedTime":1671805171942,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"UenRnzf6CfFFlPND"} -{"name":"Channel Divinity: Path of the Grave","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[{"_id":"Xkk83MdPGWwWb2yX","changes":[{"key":"system.traits.dv.all","mode":0,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/death/grave-tombstone-glow-teal.webp","label":"Path to the Grave","origin":"Item.xJ3uiHOSl6ZDElTz","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isDamaged"],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":216,"data":{"id":216,"name":"Remarkable Athlete","prerequisite":null,"description":"

Starting at 7th level, you can add half your proficiency bonus (round up) to any Strength, Dexterity, or Constitution check you make that doesn’t already use your proficiency bonus.

\r\n

In addition, when you make a running long jump, the distance you can cover increases by a number of feet equal to your Strength modifier.

","requiredLevel":7,"displayOrder":2},"version":"2.9.8","featureId":216,"requiredLevel":7,"prerequisite":null,"class":"Champion","classId":16,"subClass":"Champion"},"obsidian":{"source":{"type":"class","text":"Champion"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Compendium.world.ddb-class-features.7rTzj1cBRBDKOb7R"},"scene-packer":{"hash":"12270773c7e2abeb4d5a59de2743d2da3643352d","sourceId":"Item.hskQTbnMnRhKrIAC"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"XGtE p20","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"creature"},"range":{"value":30,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric: Grave Domain","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286530,"modifiedTime":1671805171947,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"2r41yj33zY1zVee9"} -{"name":"Channel Divinity: Peerless Athlete","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[{"_id":"Xkk83MdPGWwWb2yX","changes":[{"key":"flags.midi-qol.advantage.skill.acr","mode":5,"value":"1","priority":20},{"key":"flags.midi-qol.advantage.skill.ath","mode":5,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":600,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/creatures/abilities/lion-roar-yellow.webp","label":"Peerless Athlete","origin":"Item.xJ3uiHOSl6ZDElTz","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":216,"data":{"id":216,"name":"Remarkable Athlete","prerequisite":null,"description":"

Starting at 7th level, you can add half your proficiency bonus (round up) to any Strength, Dexterity, or Constitution check you make that doesn’t already use your proficiency bonus.

\r\n

In addition, when you make a running long jump, the distance you can cover increases by a number of feet equal to your Strength modifier.

","requiredLevel":7,"displayOrder":2},"version":"2.9.8","featureId":216,"requiredLevel":7,"prerequisite":null,"class":"Champion","classId":16,"subClass":"Champion"},"obsidian":{"source":{"type":"class","text":"Champion"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Compendium.world.ddb-class-features.7rTzj1cBRBDKOb7R"},"scene-packer":{"hash":"ed3772e3ed6923fd09a0d49dccee30998fc1f949","sourceId":"Item.2zjof0xegnFaVAi9"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"MOoT p.29","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Paladin Oath of Glory","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286525,"modifiedTime":1671805171953,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"LOnpSNSwFg2tDKZy"} -{"name":"Channel Divinity: Preserve Life","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[{"_id":"z5emxm04jk40kp3k","changes":[{"key":"macro.itemMacro","mode":0,"value":"ItemMacro","priority":20}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/magic/light/orb-beams-green.webp","label":"Channel Divinity: Preserve Life","origin":"Actor.XymBtQnn8lRHXvt6.Item.hqvE87WW1vGTGreC","transfer":false,"flags":{"dae":{"selfTarget":false,"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTargetAlways":false},"core":{"statusId":""},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53343","entityTypeId":"222216831","componentId":132,"componentTypeId":12168134,"class":"Cleric","subclass":"Life Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"v4ymwgpll4j2cos8"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"scene-packer":{"hash":"e93a43e1ba5d0bc67e6d218a8e1adcb549238684","sourceId":"Item.8h1ZkzYa8KmEQZ8W"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"itemacro":{"macro":{"data":{"_id":null,"name":"Channel Divinity: Preserve Life","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nChannel Divinity: Preserve Life\n\nUSE: Manually triggered Preserve Life to use the available healing pool on the target\nCreate a healing pool \nStore the healing pool on the character in a DAE variable that terminates at the end of the actors turn\n\nv1.0 August 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = token.actor; \n // Test Class\n let pcCleric = pcActor.getRollData().classes?.cleric;\n if (pcCleric === null) {\n ui.notifications.error(\"You are not a cleric!\");\n return;\n }\n\n // Test Subclass\n let pcClericSubclass = pcActor.getRollData().classes.cleric?.subclass.identifier;\n if (pcClericSubclass != \"life-domain\") {\n ui.notifications.error(\"You are not a Life Domain cleric!\");\n return;\n }\n\n //5x cleric level healing pool\n const pool = 5 * pcCleric.levels;\n pcActor.setFlag(\"dae\", \"lifehealingpool\", pool);\n return;\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"lifehealingpool\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Channel Divinity: Preserve Life","type":"script","scope":"global","command":"/*****\nChannel Divinity: Preserve Life\n\nUSE: Manually triggered Preserve Life to use the available healing pool on the target\nCreate a healing pool \nStore the healing pool on the character in a DAE variable that terminates at the end of the actors turn\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = token.actor;\n // Test Class\n let pcCleric = pcActor.getRollData().classes?.cleric;\n if (pcCleric === null) {\n ui.notifications.error(\"You are not a cleric!\");\n return;\n }\n\n // Test Subclass\n let pcClericSubclass = pcActor.getRollData().classes.cleric?.subclass.identifier;\n if (pcClericSubclass != \"life-domain\") {\n ui.notifications.error(\"You are not a Life Domain cleric!\");\n return;\n }\n\n //5x cleric level healing pool\n const pool = 5 * pcCleric.levels;\n pcActor.setFlag(\"dae\", \"lifehealingpool\", pool);\n return;\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"lifehealingpool\");\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"core":{"sourceId":"Item.bPoUIdDoPJd5Tc2X"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 August 17 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
\n

 

","chat":"","unidentified":""},"source":"PHB p194","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286491,"modifiedTime":1671805171956,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"02xIBIkqUCXtpfCO"} -{"name":"Channel Divinity: Radiance of the Dawn","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[],"flags":{"ddbimporter":{"id":"53344","entityTypeId":"222216831","componentId":138,"componentTypeId":12168134,"class":"Cleric","subclass":"Light Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"cjwzq7lf48igj2ev","ignoreIcon":false,"ignoreItemImport":false,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"scene-packer":{"hash":"f76519640f96acf4dce01dd978965c5406bb2e82","sourceId":"Item.bko6opAomW9diM8u"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":true,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.BvxA3rBt3nvjgMti"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p61","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"enemy"},"range":{"value":30,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":1},"ability":"","actionType":"save","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["2d10[radiant] + @classes.cleric.levels","radiant"]],"versatile":"","value":""},"formula":"","save":{"ability":"con","dc":null,"scaling":"spell"},"requirements":"Cleric: Light","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286534,"modifiedTime":1671805171958,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"vTGRWmSJm3CuhXHc"} -{"name":"Channel Divinity: Turn Undead","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[{"_id":"3adv1867dmy3nrmn","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.\"Channel Divinity: Turn Undead\",all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":60,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/death/skull-humanoid-white-blue.webp","label":"Channel Divinity: Turn Undead","origin":"Actor.4okcHmPmM1iBwyFs.Item.0Gd8ADfg2sOZyTyq","transfer":false,"flags":{"core":{"statusId":"true"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"e24ece7a55f9de689e13bfec46912775238c34b3","sourceId":"Item.mfOrCKB6p1puoaUP"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"midi-qol":{"effectActivation":false,"forceCEOff":false,"onUseMacroName":"[all]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"core":{"sourceId":"Item.r5SIR5IwtjxLYHvO"},"itemacro":{"macro":{"data":{"_id":null,"name":"Channel Divinity: Turn Undead","type":"script","author":"KBnld8ZLhMcDSTkg","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nCleric: Turn Undead\n\nUSEAGE : ACTIVATE TO CHANNEL DIVINITY : TURN UNDEAD\nClick on this item to activate the turn undead. \nPlease remember to setup usage consumption in the itme itself. \n\nThis Macro requires a GAME LEVEL MACRO: MAKE DEAD \n\nv1.4 August 13 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n// if (!game.modules.get(\"warpgate\")?.active) return ui.notifications.error(\"Turn Undead requires warpgate module\");\n\nif (args[0].macroPass === \"preambleComplete\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n // I am stealing the activation condition as a string for the creature type I want to hit\n const activationCondition = args[0].itemData.data.activation.condition.toLowerCase();\n let immunity = [\"Turn Immunity\"];\n for (let target of workflow.targets) {\n let creatureType = target.actor.data.data.details.type;\n // remove targets that are not creatures (aka PCs etc)\n if ((creatureType === null) || (creatureType === undefined)) {\n workflow.targets.delete(target);\n }\n // remove creatures that are not undead \n else if (!([creatureType.value.toLowerCase(), creatureType.subtype.toLowerCase()].includes(activationCondition.toLowerCase()))) {\n workflow.targets.delete(target);\n }\n // remove creatures with turn immunity\n else if (target.actor.items.find(i => immunity.includes(i.name))) {\n workflow.targets.delete(target);\n }\n\n // check for i, if so give advanatage on tragets next save\n let resistance = [\"Turn Resistance\"];\n if (target.actor.items.find(i => resistance.includes(i.name))) {\n // add resistance to next save \n await markTurnResistance(target.actor, args);\n }\n\n game.user.updateTokenTargets(Array.from(workflow.targets).map(t => t.id));\n }\n} else if (args[0].macroPass === \"postSave\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const pcActor = workflow.actor;\n\n let crDestroy = 0.0;\n if (workflow.targets.size === 0) return;\n let actorClass = pcActor.classes.cleric.data.data.levels;\n if (actorClass > 16) crDestroy = 4;\n else if (actorClass > 13) crDestroy = 3;\n else if (actorClass > 10) crDestroy = 2;\n else if (actorClass > 7) crDestroy = 1;\n else if (actorClass > 4) crDestroy = 0.5;\n\n // set HP = 0 for all targets of the CR or less that have been turned\n for (let target of workflow.failedSaves) {\n if (target.actor.data.data.details.cr < crDestroy) {\n //let target = failedSave.actor;\n let maxHP = Number(target.actor.data.data.attributes.hp.max);\n let updates = {\n actor: { \"data.attributes.hp.value\": 0, \"data.attributes.hp.max\": maxHP }\n };\n let mutateCallbacks = \"\";\n await warpgate.mutate(target.document, updates, mutateCallbacks, { permanent: true });\n } else {\n // set frightened for all those undead above the CR that were not destoryed\n console.log(\"MACRO TEST | target actor: %O\", target.actor);\n console.log(\"MACRO TEST | add frightened: %O\", target);\n let thisActor = target.uuid;\n game.dfreds.effectInterface.addEffect({ effectName: 'Frightened', thisActor });\n }\n }\n return;\n}\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTurnResistance(target, args) {\n const effectData = {\n label: \"Turn Resistance\",\n icon: \"systems/dnd5e/icons/skills/affliction_21.jpg\",\n origin: args.uuid,\n changes: [{\n \"key\": \"flags.midi-qol.advantage.ability.check.wis\",\n \"value\": 1,\n \"mode\": 0,\n \"priority\": 20\n }],\n disabled: false,\n flags: {\n dae: {\n specialDuration: [\"isSave\"]\n }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Channel Divinity: Turn Undead","type":"script","scope":"global","command":"/*****\nCleric: Turn Undead\n\nUSEAGE : ACTIVATE TO CHANNEL DIVINITY : TURN UNDEAD\nClick on this item to activate the turn undead. \nPlease remember to setup usage consumption in the itme itself. \n\nThis Macro requires a GAME LEVEL MACRO: MAKE DEAD \n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n// if (!game.modules.get(\"warpgate\")?.active) return ui.notifications.error(\"Turn Undead requires warpgate module\");\n\nif (args[0].macroPass === \"preambleComplete\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n // I am stealing the activation condition as a string for the creature type I want to hit\n const activationCondition = args[0].itemData.system.activation.condition.toLowerCase();\n let immunity = [\"Turn Immunity\"];\n for (let target of workflow.targets) {\n let creatureType = target.actor.system.details.type;\n // remove targets that are not creatures (aka PCs etc)\n if ((creatureType === null) || (creatureType === undefined)) {\n workflow.targets.delete(target);\n }\n // remove creatures that are not undead \n else if (!([creatureType.value.toLowerCase(), creatureType.subtype.toLowerCase()].includes(activationCondition.toLowerCase()))) {\n workflow.targets.delete(target);\n }\n // remove creatures with turn immunity\n else if (target.actor.items.find(i => immunity.includes(i.name))) {\n workflow.targets.delete(target);\n }\n\n // check for i, if so give advanatage on tragets next save\n let resistance = [\"Turn Resistance\"];\n if (target.actor.items.find(i => resistance.includes(i.name))) {\n // add resistance to next save \n await markTurnResistance(target.actor, args);\n }\n\n game.user.updateTokenTargets(Array.from(workflow.targets).map(t => t.id));\n }\n} else if (args[0].macroPass === \"postSave\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const pcActor = workflow.actor;\n\n let crDestroy = 0.0;\n if (workflow.targets.size === 0) return;\n let actorClass = pcActor.classes.cleric.system.levels;\n if (actorClass > 16) crDestroy = 4;\n else if (actorClass > 13) crDestroy = 3;\n else if (actorClass > 10) crDestroy = 2;\n else if (actorClass > 7) crDestroy = 1;\n else if (actorClass > 4) crDestroy = 0.5;\n\n // set HP = 0 for all targets of the CR or less that have been turned\n for (let target of workflow.failedSaves) {\n if (target.actor.system.details.cr < crDestroy) {\n //let target = failedSave.actor;\n let maxHP = Number(target.actor.system.attributes.hp.max);\n let updates = {\n actor: { \"data.attributes.hp.value\": 0, \"data.attributes.hp.max\": maxHP }\n };\n let mutateCallbacks = \"\";\n await warpgate.mutate(target.document, updates, mutateCallbacks, { permanent: true });\n }\n }\n return;\n}\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTurnResistance(target, args) {\n const effectData = {\n label: \"Turn Resistance\",\n icon: \"systems/dnd5e/icons/skills/affliction_21.jpg\",\n origin: args.uuid,\n changes: [{\n \"key\": \"flags.midi-qol.advantage.ability.check.wis\",\n \"value\": 1,\n \"mode\": 0,\n \"priority\": 20\n }],\n disabled: false,\n flags: {\n dae: {\n specialDuration: [\"isSave\"]\n }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"},"cf":{"id":"temp_92357bvnxs9","path":"Class Features","color":"#0000ff"},"favtab":{"isFavorite":true},"ddbimporter":{"pack":"world.ddb-override","id":"74143","entityTypeId":"222216831","componentId":110,"componentTypeId":12168134,"class":"Cleric","subclass":"Grave Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1},{"level":null,"uses":1}]},"importId":"h0fgg2cviptcizbi","originalItemName":"Channel Divinity: Turn Undead","replaced":true},"siftoolkit":{"SIFData":{"ignoreDuration":false,"texture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true,"playTemplateAudio":false,"playDamageAudio":false,"playSaveAudio":false,"clip":"","volume":100}}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.4 August 13 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p194","activation":{"type":"action","cost":1,"condition":"undead"},"duration":{"value":null,"units":"inst"},"target":{"value":30,"width":null,"units":"ft","type":"creature"},"range":{"value":null,"long":null,"units":"spec"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":null},"ability":"","actionType":"other","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286536,"modifiedTime":1671805171962,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"bOo1LwIzJ90URlYb"} -{"name":"Circle of Mortality","type":"feat","img":"icons/skills/wounds/blood-cells-disease-green.webp","effects":[{"_id":"1jud0luaqrwjayvy","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Circle of Mortality,all","priority":10}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/wounds/blood-cells-disease-green.webp","label":"Circle of Mortality","origin":"Actor.Uv8E8r17bCEb1o2e.Item.3aDwBUf6nDcPVKz7","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53464","entityTypeId":"222216831","componentId":664,"componentTypeId":12168134,"class":"Cleric","subclass":"Grave Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"4hcm2jmz0inu7t2d","pack":"world.ddb-override","originalItemName":"Circle of Mortality","replaced":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"scene-packer":{"hash":"17e2cd67935372a49fefc3b699753963331e40a9","sourceId":"Item.ovikQXLs6Y6zgheY"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"itemacro":{"macro":{"data":{"_id":null,"name":"Circle of Mortality","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nCircle of Mortality\n\nv1.1 August 6 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n let targetTokenUuid = args[0].hitTargetUuids[0];\n let targetToken = await fromUuid(targetTokenUuid);\n let targetActor = targetToken.actor;\n\n // if Target HP > 0 return \n if (targetActor.data.data.attributes.hp.value != 0) return;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n }\n\n // compute maximum healing for the spell cast\n let healingRollMax = 0;\n for (let i = 0; i < workflow.damageRoll.terms.length; i++)\n if (workflow.damageRoll.terms[i]?.faces) healingRollMax = healingRollMax + (workflow.damageRoll.terms[i].faces * workflow.damageRoll.terms[i].number);\n else if (workflow.damageRoll.terms[i]?.number) healingRollMax = healingRollMax + workflow.damageRoll.terms[i].number;\n let bonusHealing = (healingRollMax - workflow.damageRoll.total);\n await setProperty(workflow, \"BonusHealing\", bonusHealing);\n\n return;\n\n} else if (args[0].tag === \"DamageBonus\") {\n console.log(\"MACRO | bonus healing application\");\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n let bonusHealing = await getProperty(workflow, \"BonusHealing\");\n\n // Bonus Healing\n if (bonusHealing > 0) {\n await setProperty(workflow, \"BonusHealing\", 0);\n return { damageRoll: `${bonusHealing}[healing]`, flavor: \"Circle of Mortality Bonus Healing\" };\n } else return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Circle of Mortality","type":"script","scope":"global","command":"/*****\nCircle of Mortality\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n let targetTokenUuid = args[0].hitTargetUuids[0];\n let targetToken = await fromUuid(targetTokenUuid);\n let targetActor = targetToken.actor;\n\n // if Target HP > 0 return \n if (targetActor.system.attributes.hp.value != 0) return;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n }\n\n // compute maximum healing for the spell cast\n let healingRollMax = 0;\n for (let i = 0; i < workflow.damageRoll.terms.length; i++)\n if (workflow.damageRoll.terms[i]?.faces) healingRollMax = healingRollMax + (workflow.damageRoll.terms[i].faces * workflow.damageRoll.terms[i].number);\n else if (workflow.damageRoll.terms[i]?.number) healingRollMax = healingRollMax + workflow.damageRoll.terms[i].number;\n let bonusHealing = (healingRollMax - workflow.damageRoll.total);\n await setProperty(workflow, \"BonusHealing\", bonusHealing);\n\n return;\n\n} else if (args[0].tag === \"DamageBonus\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n let bonusHealing = await getProperty(workflow, \"BonusHealing\");\n\n // Bonus Healing\n if (bonusHealing > 0) {\n await setProperty(workflow, \"BonusHealing\", 0);\n return { damageRoll: `${bonusHealing}[healing]`, flavor: \"Circle of Mortality Bonus Healing\" };\n } else return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"core":{"sourceId":"Item.edUabd3mcVcUaLtm"},"cf":{"id":"temp_92357bvnxs9"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"You restore maximum possible HP on each dice (instead of rolling) with healing spells to a creature with 0 HP. You learn the spare the dying cantrip, can cast it as a bonus action, and it has a range of 30 ft.","unidentified":""},"source":"XGtE p20","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric: Grave Domain","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286449,"modifiedTime":1671805171964,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"KncFRbXM7OpqvMF0"} -{"name":"Divine Fury","type":"feat","img":"icons/magic/fire/projectile-wave-arrow.webp","effects":[{"_id":"YJK1tQQIV2Ycrqy0","changes":[{"key":"flags.dnd5e.DamageBonusMacro","mode":0,"value":"ItemMacro.Divine Fury","priority":30}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/fire/projectile-wave-arrow.webp","label":"Divine Fury","origin":"Item.5PUe0GiheEHUomoR","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"scene-packer":{"hash":"e8c30e8f3bff4913ed4812b9d005af0cbab248ff","sourceId":"Item.WNdhwMcS4efx0nDt"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Divine Fury","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nDivine Fury | Auto Divine Fury [there are two items to make this function]\n\nNOTE: I used Tom Posney's MIDI-QOL Sneak Attack / Auto Sneak Attack as a templete for this\n\nUSEAGE : PASSIVE\nPlease place these two items on a Barbarian Zealot the rest is automated\n \nv1.1 August 6 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif ([\"mwak\", \"rwak\"].includes(args[0].item.data.actionType)) {\n let pcActor = token.actor;\n\n // Test Class\n let pcBarbarian = pcActor.getRollData().classes?.barbarian;\n if (pcBarbarian === null) {\n ui.notifications.error(\"You are not a Barbarian!\");\n return;\n }\n\n // Test Subclass\n let pcBarbarianSubclass = pcActor.getRollData().classes.barbarian?.subclass.identifier;\n if (pcBarbarianSubclass != \"path-of-the-zealot\") {\n ui.notifications.error(\"You are not a Barbarian Zealot!\");\n return;\n }\n\n // Test if rage is active\n let effect = await findEffect(token, \"Rage\");\n if (!effect) {\n ui.notifications.error(\"You are not Raging!\");\n return;\n }\n\n // Check to see if you have already made a divine fury attack this round\n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn / 100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"divineFuryTime\");\n if (combatTime === lastTime) return {}; // already used divine fury this round\n }\n\n // check to see if autoDivineFury is active, if it is skip the prompt\n let useDivineFury = getProperty(actor.data, \"flags.dae.autoDivineFury\");\n if (!useDivineFury) {\n console.log(\"MACRO | prompt user with dialog to use Divine Fury\");\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Conditional Damage\",\n content: `

Use Divine Fury?

`,\n buttons: {\n one: {\n icon: '',\n label: \"Confirm\",\n callback: () => resolve(true)\n },\n two: {\n icon: '',\n label: \"Cancel\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n useDivineFury = await dialog;\n }\n if (!useDivineFury) return {}; // do not use divine fury\n\n // the player wants to use divine fury or autoDivineFury is active\n const diceMult = args[0].isCritical ? 2 : 1;\n const baseDice = 1;\n const baseBonus = Math.ceil(pcBarbarian.levels / 2);\n\n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn / 100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"divineFuryTime\");\n if (combatTime !== lastTime) {\n await actor.setFlag(\"midi-qol\", \"divineFuryTime\", combatTime)\n }\n }\n return { damageRoll: `${baseDice * diceMult}d6 + ${baseBonus}`, flavor: \"Divine Fury\" };\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Divine Fury","type":"script","scope":"global","command":"/*****\nDivine Fury | Auto Divine Fury [there are two items to make this function]\n\nNOTE: I used Tom Posney's MIDI-QOL Sneak Attack / Auto Sneak Attack as a templete for this\n\nUSEAGE : PASSIVE\nPlease place these two items on a Barbarian Zealot the rest is automated\n \nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif ([\"mwak\", \"rwak\"].includes(args[0].item.system.actionType)) {\n let pcActor = token.actor;\n\n // Test Class\n let pcBarbarian = pcActor.getRollData().classes?.barbarian;\n if (pcBarbarian === null) {\n ui.notifications.error(\"You are not a Barbarian!\");\n return;\n }\n\n // Test Subclass\n let pcBarbarianSubclass = pcActor.getRollData().classes.barbarian?.subclass.identifier;\n if (pcBarbarianSubclass != \"path-of-the-zealot\") {\n ui.notifications.error(\"You are not a Barbarian Zealot!\");\n return;\n }\n\n // Test if rage is active\n let effect = await findEffect(pcActor, \"Rage\");\n if (!effect) {\n ui.notifications.error(\"You are not Raging!\");\n return;\n }\n\n // Check to see if you have already made a divine fury attack this round\n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn / 100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"divineFuryTime\");\n if (combatTime === lastTime) return {}; // already used divine fury this round\n }\n\n // check to see if autoDivineFury is active, if it is skip the prompt\n let useDivineFury = getProperty(actor.system, \"flags.dae.autoDivineFury\");\n if (!useDivineFury) {\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Conditional Damage\",\n content: `

Use Divine Fury?

`,\n buttons: {\n one: {\n icon: '',\n label: \"Confirm\",\n callback: () => resolve(true)\n },\n two: {\n icon: '',\n label: \"Cancel\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n useDivineFury = await dialog;\n }\n if (!useDivineFury) return {}; // do not use divine fury\n\n // the player wants to use divine fury or autoDivineFury is active\n const diceMult = args[0].isCritical ? 2 : 1;\n const baseDice = 1;\n const baseBonus = Math.ceil(pcBarbarian.levels / 2);\n\n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn / 100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"divineFuryTime\");\n if (combatTime !== lastTime) {\n await actor.setFlag(\"midi-qol\", \"divineFuryTime\", combatTime)\n }\n }\n return { damageRoll: `${baseDice * diceMult}d6 + ${baseBonus}`, flavor: \"Divine Fury\" };\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.5PUe0GiheEHUomoR"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"},"cf":{"id":"temp_92357bvnxs9","path":"DDB Override#/CF_SEP/Class Features","color":"#000000"},"midi-qol":{"onUseMacroName":""},"midiProperties":{},"ddbimporter":{"pack":"world.ddb-override","id":"1479249","entityTypeId":"222216831","action":true,"componentId":241,"componentTypeId":258900837,"class":"Barbarian","subclass":"Path of the Zealot","importId":"lbsrtmgv1xbfzi20","originalItemName":"Divine Fury","replaced":true}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"XGtE p11","activation":{"type":"special","cost":0,"condition":""},"duration":{"value":24,"units":"hour"},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Barbarian Zealot Path","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286527,"modifiedTime":1671805171965,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"GQVo7Atu1GifqOMc"} -{"name":"Eyes of Night","type":"feat","img":"icons/magic/perception/silhouette-stealth-shadow.webp","effects":[{"_id":"WysKNsnpbFv2ZWLB","changes":[{"key":"ATL.dimSight","mode":2,"value":"300","priority":40}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/silhouette-stealth-shadow.webp","label":"Eyes of Night","origin":"Item.BsbEEhiIUMijPdYz","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2409717","entityTypeId":"222216831","componentId":2996540,"componentTypeId":12168134,"class":"Cleric","subclass":"Twilight Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"iyl0evwnfwrvm9lh"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"scene-packer":{"hash":"dcbcee67ee14416b8043fd48655d2602489a08ee","sourceId":"Item.yF7Bf89F7XCG81Y6"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Eyes of Night","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.BsbEEhiIUMijPdYz"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p34","activation":{"type":"none","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric Twilight Domain","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286508,"modifiedTime":1671805171967,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"n4pNGnnxcdDLYCpN"} -{"name":"Fey Presence","type":"feat","img":"icons/magic/perception/eye-ringed-glow-angry-large-teal.webp","effects":[],"flags":{"ddbimporter":{"id":"1035","entityTypeId":"222216831","componentId":396,"componentTypeId":12168134,"class":"Warlock","subclass":"The Archfey","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"py0qw85udlapktp3"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Warlock"}},"link-item-resource-5e":{"resource-link":"primary"},"scene-packer":{"hash":"dc316af833575a26f682261e8d4330f4eb8904bf","sourceId":"Item.cr4bpsAI3I6WGGs2"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[all]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Fey Presence","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFey Presence\n\nUSAGE: Usae ability when you character has an action\n\n- this ability targets evertything in a ten foot cube \n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preambleComplete\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n // prompt user for the fightened or charmed effect, store on the workflow as feyPresenceEffect \n let dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Fey Presence:\",\n content: \"

Select the desired effect fightened or charmed?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Frightened

\",\n callback: () => resolve(\"Frightened\")\n },\n two: {\n icon: '

',\n label: \"

Charmed

\",\n callback: () => { resolve(\"Charmed\") }\n }\n },\n default: \"one\"\n }).render(true);\n });\n let selectedEffect = await dialog;\n await setProperty(workflow, \"feyPresenceEffect\", selectedEffect);\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n //for every target the failed the saving throw apply the selected feyPresenceEffect\n let effect = getProperty(workflow, \"feyPresenceEffect\");\n if (effect)\n for (target of args[0].failedSaves) {\n let targetActor = target.actor;\n if (effect === \"Frightened\") await applyFrightenedEffect(targetActor, args);\n else if (effect === \"Charmed\") await applyCharmedEffect(targetActor, args);\n else ui.notifications.error(\"An error occured applying the effect.\");\n }\n} return;\n\n// Apply the fightened effect to the target\nasync function applyFrightenedEffect(target, args) {\n let effectData = {\n label: \"Frightened\",\n icon: \"modules/dfreds-convenient-effects/images/frightened.svg\",\n origin: args.uuid,\n changes: [\n { \"key\": \"flags.midi-qol.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 },\n { \"key\": \"flags.midi-qol.disadvantage.ability.check.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }\n ],\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnEndSource\"] },\n core: { statusId: \"Convenient Effect: Frightened\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Apply the charmed effect to the target\nasync function applyCharmedEffect(target, args) {\n let effectData = {\n label: \"Charmed\",\n icon: \"modules/dfreds-convenient-effects/images/charmed.svg\",\n origin: args.uuid,\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnEndSource\"] },\n core: { statusId: \"Convenient Effect: Charmed\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Fey Presence","type":"script","scope":"global","command":"/*****\nFey Presence\n\nUSAGE: Usae ability when you character has an action\n\n- this ability targets evertything in a ten foot cube \n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preambleComplete\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n // prompt user for the fightened or charmed effect, store on the workflow as feyPresenceEffect \n let dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Fey Presence:\",\n content: \"

Select the desired effect fightened or charmed?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Frightened

\",\n callback: () => resolve(\"Frightened\")\n },\n two: {\n icon: '

',\n label: \"

Charmed

\",\n callback: () => { resolve(\"Charmed\") }\n }\n },\n default: \"one\"\n }).render(true);\n });\n let selectedEffect = await dialog;\n await setProperty(workflow, \"feyPresenceEffect\", selectedEffect);\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n //for every target the failed the saving throw apply the selected feyPresenceEffect\n let effect = getProperty(workflow, \"feyPresenceEffect\");\n if (effect)\n for (target of args[0].failedSaves) {\n let targetActor = target.actor;\n if (effect === \"Frightened\") await applyFrightenedEffect(targetActor, args);\n else if (effect === \"Charmed\") await applyCharmedEffect(targetActor, args);\n else ui.notifications.error(\"An error occured applying the effect.\");\n }\n} return;\n\n// Apply the fightened effect to the target\nasync function applyFrightenedEffect(target, args) {\n let effectData = {\n label: \"Frightened\",\n icon: \"modules/dfreds-convenient-effects/images/frightened.svg\",\n origin: args.uuid,\n changes: [\n { \"key\": \"flags.midi-qol.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 },\n { \"key\": \"flags.midi-qol.disadvantage.ability.check.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }\n ],\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnEndSource\"] },\n core: { statusId: \"Convenient Effect: Frightened\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Apply the charmed effect to the target\nasync function applyCharmedEffect(target, args) {\n let effectData = {\n label: \"Charmed\",\n icon: \"modules/dfreds-convenient-effects/images/charmed.svg\",\n origin: args.uuid,\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnEndSource\"] },\n core: { statusId: \"Convenient Effect: Charmed\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"core":{"sourceId":"Item.vVdMFnc57t6M6R6L"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p109","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":10,"width":null,"units":"ft","type":"creature"},"range":{"value":null,"long":null,"units":"spec"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"wis","dc":null,"scaling":"spell"},"requirements":"Warlock: Fey Patron","recharge":{"value":null,"charged":false},"quantity":1,"weight":null,"price":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286463,"modifiedTime":1671805171971,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"YWRHfz4RFJrbWiof"} -{"name":"Gift of the Eyes of Night","type":"feat","img":"icons/magic/perception/silhouette-stealth-shadow.webp","effects":[{"_id":"eh177mjwrheqqh5w","changes":[{"key":"ATL.dimSight","mode":2,"value":"300","priority":40}],"disabled":false,"duration":{"startTime":null,"seconds":3600,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/silhouette-stealth-shadow.webp","label":"Eyes of Night","origin":"Actor.4okcHmPmM1iBwyFs.Item.lpKBbM6Rsla8ZL64","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2409717","entityTypeId":"222216831","componentId":2996540,"componentTypeId":12168134,"class":"Cleric","subclass":"Twilight Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"iyl0evwnfwrvm9lh"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"scene-packer":{"hash":"985b8cb3fc2611c015483a50be161f06e78b96b9","sourceId":"Item.lwAnptMvNOKS199M"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Eyes of Night","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.yLmIyy87Eh8dzywq"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p34","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":4,"width":null,"units":"","type":"creature"},"range":{"value":10,"long":10,"units":"ft"},"uses":{"value":1,"max":"1","per":"lr","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric Twilight Domain","recharge":{"value":null,"charged":false}},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286451,"modifiedTime":1671805171972,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"9cVanayYByZMlENE"} -{"name":"Incisive Sense","type":"feat","img":"icons/equipment/back/cloak-hooded-green-gold.webp","effects":[{"_id":"f50j8dfdk7sz7lfe","changes":[{"key":"flags.midi-qol.advantage.skill.ins","mode":5,"value":"1","priority":20},{"key":"flags.midi-qol.advantage.skill.inv","mode":5,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/equipment/back/cloak-hooded-green-gold.webp","label":"Incisive Sense","origin":"Actor.6OUbrDvzBaKBNRuA.Item.VPKVVTDdrss5Yi0f","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":2821775,"type":"race","entityTypeId":1960452172,"dndbeyond":{"displayOrder":200},"importId":"8i3k4hbim8bho1dm"},"obsidian":{"source":{"type":"race"}},"scene-packer":{"hash":"0b10f710276760d25ab9e036563006bafef48338","sourceId":"Item.PC8jGgzwNeyxfaMY"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"core":{"sourceId":"Item.1AgaCsP9EpGaadae"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"EGtW p163","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Elf","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286453,"modifiedTime":1671805171976,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"kfsxj4Sp53q8VNBT"} -{"name":"Inspiring Smite","type":"feat","img":"icons/magic/life/heart-cross-blue.webp","effects":[],"flags":{"_sheetTab":"description","entityorder":{"order":161},"dynamiceffects":{"effects":[],"alwaysActive":false,"equipActive":false},"favtab":{"isFavourite":true,"isFavorite":true},"midi-qol":{"effectActivation":false,"onUseMacroName":"[preItemRoll]ItemMacro"},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Inspiring Smite","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nInspiring Smite\n\nUSE: Must Manually triggered after channel divinity: Inspiring Smite to distribute healing pool\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MidiQOL Sample Items\" SPELL: LAY ON HANDS\nBy Author: Tim Poseney https://gitlab.com/tposney/midi-qol\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n // get healthpool if not available send a notification\n let healingPool = actor.getFlag(\"dae\", \"healingpool\");\n if ((!healingPool) || (!healingPool > 0)) {\n ui.notifications.warn(\"You either have no healing pool left or you have not used Channel Divinity: Inspiring Smite...\");\n return false;\n }\n\n // check to make sure there is a target to heal and only one is selected\n let theTarget = args[0].targets[0];\n if ((!theTarget) || (args[0].targets.length > 1)) {\n ui.notifications.warn(\"Please select a target to heal with Inspiring Smite\");\n return false;\n }\n\n // does not work on undead/constructs - not sure if this is RAW but makes sense given Inspiring Smite \n let invalid = [\"undead\", \"construct\"].some(type => (theTarget?.actor.data.data.details.type?.value || \"\").toLowerCase().includes(type));\n if (invalid) {\n ui.notifications.warn(\"Inspiring Smite can't affect undead/constructs\")\n return false;\n }\n\n let targetToken = await fromUuid(args[0].targetUuids[0]);\n let targetActor = targetToken.actor;\n let targetDamage = targetActor.data.data.attributes.hp.max - targetActor.data.data.attributes.hp.value;\n\n // prompt for how much to use...\n let d = new Promise((resolve, reject) => {\n let theDialog = new Dialog({\n title: \"Inspiring Smite\",\n content: `

Your targets current damage level: ${targetDamage}

\n

How many points to use? ${healingPool} left in your Healing Pool

`,\n buttons: {\n heal: {\n icon: '

',\n label: \"

HEAL

\",\n callback: (html) => { resolve(Math.clamped(Math.floor(Number(html.find('#mqlohpoints')[0].value)), 0, healingPool)); }\n },\n abort: {\n icon: '

',\n label: \"

CANCEL

\",\n callback: () => { resolve(false) }\n },\n },\n default: \"abort\",\n }).render(true);\n });\n const consumed = await d;\n if (!consumed) return false;\n\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = workflow.item;\n let updates;\n if (consumed > 0) {\n updates = {\n \"data.consume.amount\": Math.abs(consumed),\n \"data.damage.parts\": [[`${Math.max(0, consumed)}`, \"healing\"]],\n \"data.chatFlavor\": \"Inspiring Smite\"\n };\n }\n\n // remove consumed from pool\n healingPool = healingPool - consumed;\n actor.setFlag(\"dae\", \"healingpool\", healingPool);\n\n return theItem.update(updates);\n}\nreturn true;","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Inspiring Smite","type":"script","scope":"global","command":"/*****\nInspiring Smite\n\nUSE: Must Manually triggered after channel divinity: Inspiring Smite to distribute healing pool\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MidiQOL Sample Items\" SPELL: LAY ON HANDS\nBy Author: Tim Poseney https://gitlab.com/tposney/midi-qol\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n // get healthpool if not available send a notification\n let healingPool = actor.getFlag(\"dae\", \"healingpool\");\n if ((!healingPool) || (!healingPool > 0)) {\n ui.notifications.warn(\"You either have no healing pool left or you have not used Channel Divinity: Inspiring Smite...\");\n return false;\n }\n\n // check to make sure there is a target to heal and only one is selected\n let theTarget = args[0].targets[0];\n if ((!theTarget) || (args[0].targets.length > 1)) {\n ui.notifications.warn(\"Please select a target to heal with Inspiring Smite\");\n return false;\n }\n\n // does not work on undead/constructs - not sure if this is RAW but makes sense given Inspiring Smite \n let invalid = [\"undead\", \"construct\"].some(type => (theTarget?.actor.system.details.type?.value || \"\").toLowerCase().includes(type));\n if (invalid) {\n ui.notifications.warn(\"Inspiring Smite can't affect undead/constructs\")\n return false;\n }\n\n let targetToken = await fromUuid(args[0].targetUuids[0]);\n let targetActor = targetToken.actor;\n let targetDamage = targetActor.system.attributes.hp.max - targetActor.system.attributes.hp.value;\n\n // prompt for how much to use...\n let d = new Promise((resolve, reject) => {\n let theDialog = new Dialog({\n title: \"Inspiring Smite\",\n content: `

Your targets current damage level: ${targetDamage}

\n

How many points to use? ${healingPool} left in your Healing Pool

`,\n buttons: {\n heal: {\n icon: '

',\n label: \"

HEAL

\",\n callback: (html) => { resolve(Math.clamped(Math.floor(Number(html.find('#mqlohpoints')[0].value)), 0, healingPool)); }\n },\n abort: {\n icon: '

',\n label: \"

CANCEL

\",\n callback: () => { resolve(false) }\n },\n },\n default: \"abort\",\n }).render(true);\n });\n let consumed = await d;\n if (!consumed) return false; \n if (consumed > targetDamage) consumed = targetDamage;\n\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = workflow.item;\n let updates;\n if (consumed > 0) {\n updates = {\n \"data.consume.amount\": Math.abs(consumed),\n \"data.damage.parts\": [[`${Math.max(0, consumed)}`, \"healing\"]],\n \"data.chatFlavor\": \"Inspiring Smite\"\n };\n }\n\n // remove consumed from pool\n healingPool = healingPool - consumed;\n actor.setFlag(\"dae\", \"healingpool\", healingPool);\n\n return theItem.update(updates);\n}\nreturn true;","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.IM2UCUasJLD5J7Fw"},"scene-packer":{"sourceId":"Item.Muchtk2t9BrhSGfu","hash":"7e932200872c166a21be54cac4f3e3d9a7c5a827"},"cf":{"id":"temp_ovon30cu8t"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

Immediately after you deal damage to a creature with your Divine Smite feature, you can use your Channel Divinity as a bonus action and distribute temporary hit points to creatures of your choice within 30 feet of you, which can include you. The total number of temporary hit points equals 2d8 + your level in this class, divided among the chosen creatures however you like.

\n

 

\n
\nSETUP:\n

Please remember to use Channel Divinity: Inspiring Smite first, after you deal smite damage.

\n

 

\n
\n

 

\n
\nVERSION INFO\n

v0.1 April 13 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"MOoT p.29","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":"","type":"lr"},"consume":{"type":"","target":"","amount":10},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"Inspiring Smite","critical":{"threshold":null,"damage":null},"damage":{"parts":[["10","healing"]],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell","value":""},"requirements":"Paladin: Oath of Glory","recharge":{"value":null,"charged":false},"featType":{"value":"","_deprecated":true},"time":{"value":"","_deprecated":true},"damageType":{"value":"","_deprecated":true},"attributes":{"spelldc":10},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286512,"modifiedTime":1671805171980,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"wqG2sK2OBab9Xxjf"} -{"name":"Misty Escape","type":"feat","img":"icons/magic/control/debuff-energy-snare-brown.webp","effects":[],"flags":{"scene-packer":{"hash":"66d4806b55ff4917b0a9081265e991ce1448e646","sourceId":"Item.6bzoAplR7UQKKMIF"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Misty Escape","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nMisty Escape\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MIDI-SRD\" SPELL: MISTY STEP\nBy Author: Kandashi https://github.com/kandashi/Dynamic-Effects-SRD\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git\n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n let pcToken = token;\n let pcActor = token.actor.data.data;\n const target = canvas.tokens.get(pcToken.tokenId) || token;\n\n let range = canvas.scene.createEmbeddedDocuments(\"MeasuredTemplate\", [{\n t: \"circle\",\n user: game.user.id,\n x: target.x + canvas.grid.size / 2,\n y: target.y + canvas.grid.size / 2,\n direction: 0,\n distance: 60,\n borderColor: \"#FF0000\",\n flags: { DAESRD: { MistyEscape: { ActorId: pcActor.id } } }\n }]);\n\n range.then(result => {\n let templateData = {\n t: \"rect\",\n user: game.user.id,\n distance: 7.5,\n direction: 45,\n x: 0,\n y: 0,\n fillColor: game.user.color,\n flags: { DAESRD: { MistyEscape: { ActorId: pcActor.id } } }\n };\n\n Hooks.once(\"createMeasuredTemplate\", deleteTemplatesAndMove);\n let doc = new CONFIG.MeasuredTemplate.documentClass(templateData, { parent: canvas.scene });\n let template = new game.dnd5e.canvas.AbilityTemplate(doc);\n template.actorSheet = pcActor.sheet;\n template.drawPreview();\n\n // make character invisible with custom effect\n applyTempInvisibilityEffect(actor, actor);\n\n async function deleteTemplatesAndMove(template) {\n let removeTemplates = canvas.templates.placeables.filter(i => i.data.flags.DAESRD?.MistyEscape?.ActorId === pcActor.id);\n let templateArray = removeTemplates.map(function (w) { return w.id });\n await target.data.document.update(canvas.grid.getSnappedPosition(template.data.x, template.data.y));\n if (removeTemplates) await canvas.scene.deleteEmbeddedDocuments(\"MeasuredTemplate\", templateArray);\n };\n });\n} return;\n\n// Mark the character invisible until the start of thier next turn \n// or when the character attacks or casts a spell\nasync function applyTempInvisibilityEffect(target, actor) {\n let effectData = {\n label: \"Invisible\",\n icon: \"modules/dfreds-convenient-effects/images/invisible.svg\",\n origin: actor.uuid,\n changes: [\n { \"key\": \"flags.midi-qol.advantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 },\n { \"key\": \"flags.midi-qol.grants.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }\n ],\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnStartSource\", \"1Attack\"] },\n core: { statusId: \"Convenient Effect: Invisible\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Misty Escape","type":"script","scope":"global","command":"/*****\nMisty Escape\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MIDI-SRD\" SPELL: MISTY STEP\nBy Author: Kandashi https://github.com/kandashi/Dynamic-Effects-SRD\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git\n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n let pcToken = token;\n let pcActor = token.actor;\n const target = canvas.tokens.get(pcToken.tokenId) || token;\n\n let range = canvas.scene.createEmbeddedDocuments(\"MeasuredTemplate\", [{\n t: \"circle\",\n user: game.user.id,\n x: target.x + canvas.grid.size / 2,\n y: target.y + canvas.grid.size / 2,\n direction: 0,\n distance: 60,\n borderColor: \"#FF0000\",\n flags: { DAESRD: { MistyEscape: { ActorId: pcActor.id } } }\n }]);\n\n range.then(result => {\n let templateData = {\n t: \"rect\",\n user: game.user.id,\n distance: 7.5,\n direction: 45,\n x: 0,\n y: 0,\n fillColor: game.user.color,\n flags: { DAESRD: { MistyEscape: { ActorId: pcActor.id } } }\n };\n\n Hooks.once(\"createMeasuredTemplate\", deleteTemplatesAndMove);\n let doc = new CONFIG.MeasuredTemplate.documentClass(templateData, { parent: canvas.scene });\n let template = new game.dnd5e.canvas.AbilityTemplate(doc);\n template.actorSheet = pcActor.sheet;\n template.drawPreview();\n\n // make character invisible with custom effect\n applyTempInvisibilityEffect(actor, actor);\n\n async function deleteTemplatesAndMove(template) {\n let removeTemplates = canvas.templates.placeables.filter(i => i.data.flags.DAESRD?.MistyEscape?.ActorId === pcActor.id);\n let templateArray = removeTemplates.map(function (w) { return w.id });\n await target.document.update(canvas.grid.getSnappedPosition(template.x, template.y));\n if (removeTemplates) await canvas.scene.deleteEmbeddedDocuments(\"MeasuredTemplate\", templateArray);\n };\n });\n} return;\n\n// Mark the character invisible until the start of thier next turn \n// or when the character attacks or casts a spell\nasync function applyTempInvisibilityEffect(target, actor) {\n let effectData = {\n label: \"Invisible\",\n icon: \"modules/dfreds-convenient-effects/images/invisible.svg\",\n origin: actor.uuid,\n changes: [\n { \"key\": \"flags.midi-qol.advantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 },\n { \"key\": \"flags.midi-qol.grants.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }\n ],\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnStartSource\", \"1Attack\"] },\n core: { statusId: \"Convenient Effect: Invisible\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[preItemRoll]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"core":{"sourceId":"Item.snMxepltm5UWo5KL"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p109","activation":{"type":"reactiondamage","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"util","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Warlock: The Archfey","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286472,"modifiedTime":1671805171984,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"qlIuo0YZAJdSFCww"} -{"name":"Preserve Life","type":"feat","img":"icons/magic/light/orb-beams-green.webp","effects":[],"flags":{"_sheetTab":"description","entityorder":{"order":161},"dynamiceffects":{"effects":[],"alwaysActive":false,"equipActive":false},"favtab":{"isFavourite":true,"isFavorite":true},"midi-qol":{"effectActivation":false,"onUseMacroName":"[preItemRoll]ItemMacro"},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Preserve Life","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nPreserve Life\n\nUSE: use this feature AFTER channel divinity: Preserve Life is triggered to create a healing pool\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MidiQOL Sample Items\" SPELL: LAY ON HANDS\nBy Author: Tim Poseney https://gitlab.com/tposney/midi-qol\n\nv1.0 August 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n // get healthpool if not available send a notification\n let lifehealingpool = actor.getFlag(\"dae\", \"lifehealingpool\");\n if ((!lifehealingpool) || (!lifehealingpool > 0)) {\n ui.notifications.warn(\"You either have no healing pool left or you have not used Channel Divinity: Preserve Life...\");\n return false;\n }\n\n // check to make sure there is a target to heal and only one is selected\n let theTarget = args[0].targets[0];\n if ((!theTarget) || (args[0].targets.length > 1)) {\n ui.notifications.warn(\"Please select a target to heal with Preserve Life\");\n return false;\n }\n\n // does not work on undead/constructs - not sure if this is RAW but makes sense given Preserve Life \n let invalid = [\"undead\", \"construct\"].some(type => (theTarget?.actor.data.data.details.type?.value || \"\").toLowerCase().includes(type));\n if (invalid) {\n ui.notifications.warn(\"Preserve Life can't affect undead/constructs\")\n return false;\n }\n\n let targetToken = await fromUuid(args[0].targetUuids[0]);\n let targetActor = targetToken.actor;\n //Target can only be healed up to half their HP\n let targetDamage = ((targetActor.data.data.attributes.hp.max / 2) - targetActor.data.data.attributes.hp.value);\n\n if (targetDamage <= 0) {\n ui.notifications.warn(\"Target is at or above half health\");\n return false; \n }\n\n // prompt for how much to use...\n let d = new Promise((resolve, reject) => {\n let theDialog = new Dialog({\n title: \"Preserve Life\",\n content: `

Your targets current damage level: ${targetDamage}

\n

How many points to use? ${lifehealingpool} left in your Healing Pool

`,\n buttons: {\n heal: {\n icon: '

',\n label: \"

HEAL

\",\n callback: (html) => { resolve(Math.clamped(Math.floor(Number(html.find('#mqlohpoints')[0].value) / 2), 0, lifehealingpool)); }\n },\n abort: {\n icon: '

',\n label: \"

CANCEL

\",\n callback: () => { resolve(false) }\n },\n },\n default: \"abort\",\n }).render(true);\n });\n const consumed = await d;\n if (!consumed) return false;\n\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = workflow.item;\n let updates;\n if (consumed > 0) {\n updates = {\n \"data.consume.amount\": Math.abs(consumed),\n \"data.damage.parts\": [[`${Math.max(0, consumed)}`, \"healing\"]],\n \"data.chatFlavor\": \"Preserve Life\"\n };\n }\n\n // remove consumed from pool\n lifehealingpool = lifehealingpool - consumed;\n actor.setFlag(\"dae\", \"lifehealingpool\", lifehealingpool);\n\n return theItem.update(updates);\n}\nreturn true;","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Preserve Life","type":"script","scope":"global","command":"/*****\nPreserve Life\n\nUSE: use this feature AFTER channel divinity: Preserve Life is triggered to create a healing pool\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MidiQOL Sample Items\" SPELL: LAY ON HANDS\nBy Author: Tim Poseney https://gitlab.com/tposney/midi-qol\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n // get healthpool if not available send a notification\n let lifehealingpool = actor.getFlag(\"dae\", \"lifehealingpool\");\n if ((!lifehealingpool) || (!lifehealingpool > 0)) {\n ui.notifications.warn(\"You either have no healing pool left or you have not used Channel Divinity: Preserve Life...\");\n return false;\n }\n\n // check to make sure there is a target to heal and only one is selected\n let theTarget = args[0].targets[0];\n if ((!theTarget) || (args[0].targets.length > 1)) {\n ui.notifications.warn(\"Please select a target to heal with Preserve Life\");\n return false;\n }\n\n // does not work on undead/constructs - not sure if this is RAW but makes sense given Preserve Life \n let invalid = [\"undead\", \"construct\"].some(type => (theTarget?.actor.system.details.type?.value || \"\").toLowerCase().includes(type));\n if (invalid) {\n ui.notifications.warn(\"Preserve Life can't affect undead/constructs\")\n return false;\n }\n\n let targetToken = await fromUuid(args[0].targetUuids[0]);\n let targetActor = targetToken.actor;\n //Target can only be healed up to half their HP\n let targetDamage = ((targetActor.system.attributes.hp.max / 2) - targetActor.system.attributes.hp.value);\n\n if (targetDamage <= 0) {\n ui.notifications.warn(\"Target is at or above half health\");\n return false;\n }\n\n // prompt for how much to use...\n let d = new Promise((resolve, reject) => {\n let theDialog = new Dialog({\n title: \"Preserve Life\",\n content: `

Your targets current damage level: ${targetDamage}

\n

How many points to use? ${lifehealingpool} left in your Healing Pool

`,\n buttons: {\n heal: {\n icon: '

',\n label: \"

HEAL

\",\n callback: (html) => { resolve(Math.clamped(Math.floor(Number(html.find('#mqlohpoints')[0].value) / 2), 0, lifehealingpool)); }\n },\n abort: {\n icon: '

',\n label: \"

CANCEL

\",\n callback: () => { resolve(false) }\n },\n },\n default: \"abort\",\n }).render(true);\n });\n let consumed = await d;\n if (!consumed) return false;\n if (consumed > targetDamage) consumed = targetDamage;\n\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = workflow.item;\n let updates;\n if (consumed > 0) {\n updates = {\n \"data.consume.amount\": Math.abs(consumed),\n \"data.damage.parts\": [[`${Math.max(0, consumed)}`, \"healing\"]],\n \"data.chatFlavor\": \"Preserve Life\"\n };\n }\n\n // remove consumed from pool\n lifehealingpool = lifehealingpool - consumed;\n actor.setFlag(\"dae\", \"lifehealingpool\", lifehealingpool);\n\n return theItem.update(updates);\n}\nreturn true;","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.IM2UCUasJLD5J7Fw"},"scene-packer":{"sourceId":"Item.EOsMVAAneGunFjeW","hash":"14028bd6aa70a68ce61cc02be1503c154e30728f"},"cf":{"id":"temp_ovon30cu8t"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n

SETUP:

\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n

 

\n

 

\n
\nVERSION INFO\n

v1.0 August 17 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p194","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":"","type":"lr"},"consume":{"type":"","target":"","amount":2},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"Preserve Life","critical":{"threshold":null,"damage":null},"damage":{"parts":[["2","healing"]],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell","value":""},"requirements":"Cleric: Life Domain","recharge":{"value":null,"charged":false},"featType":{"value":"","_deprecated":true},"time":{"value":"","_deprecated":true},"damageType":{"value":"","_deprecated":true},"attributes":{"spelldc":10},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286532,"modifiedTime":1671805171987,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"SmMEc7DWWOGJfbyb"} -{"name":"Psionic Die","type":"feat","img":"icons/sundries/gaming/dice-runed-brown.webp","effects":[{"_id":"UgB9349LhJU4nKsd","changes":[{"key":"macro.itemMacro","mode":0,"value":"","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/sundries/gaming/dice-runed-brown.webp","label":"Psionic Die","origin":"Item.H14LgNk3j1O3e3FV","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"dnd5e-helpers":{"rest-effect":"Ignore"},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"1023","entityTypeId":"222216831","componentId":209,"componentTypeId":12168134,"class":"Fighter","subclass":"Battle Master","dndbeyond":{"levelScale":{"id":12,"level":7,"description":"d8","dice":{"diceCount":5,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"5d8"},"fixedValue":null},"levelScales":[{"id":11,"level":1,"description":"d8","dice":{"diceCount":4,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"4d8"},"fixedValue":null},{"id":12,"level":7,"description":"d8","dice":{"diceCount":5,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"5d8"},"fixedValue":null},{"id":13,"level":10,"description":"d10","dice":{"diceCount":5,"diceValue":10,"diceMultiplier":null,"fixedValue":null,"diceString":"5d10"},"fixedValue":null},{"id":14,"level":15,"description":"d10","dice":{"diceCount":6,"diceValue":10,"diceMultiplier":null,"fixedValue":null,"diceString":"6d10"},"fixedValue":null},{"id":15,"level":18,"description":"d12","dice":{"diceCount":6,"diceValue":12,"diceMultiplier":null,"fixedValue":null,"diceString":"6d12"},"fixedValue":null}],"limitedUse":[{"level":null,"uses":1}]},"importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"scene-packer":{"hash":"482f55651d9b1ed04d96789954042bacbbe31ac9","sourceId":"Item.dVJQZHHm4wXGABOE"},"core":{"sourceId":"Item.8gdA6c8j5GnkX33K"},"itemacro":{"macro":{"data":{"_id":null,"name":"Psionic Die","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nPsionic Power: Psionic Power\n\nUSEAGE : PASSIVE\nThis energy is represented by your Psionic Energy dice, which are each a d6. \nYou have a number of these dice equal to twice your proficiency bonus, and \nthey fuel various psionic powers you have, which are detailed below.\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n let rogueLevel = testClass(pcActor, \"rogue\", \"Soulknife\", 3)?.levels ?? 0;\n if (!rogueLevel) {\n ui.notifications.error(\"You are not a Rogue: Soulknife of at least 3rd level.\");\n return;\n }\n let flagData;\n if (rogueLevel > 16) flagData = \"+ 1d12\";\n else if (rogueLevel > 10) flagData = \"+ 1d10\";\n else if (rogueLevel > 4) flagData = \"+ 1d8\";\n else if (rogueLevel > 0) flagData = \"+ 1d6\";\n pcActor.setFlag(\"dae\", \"PsionicDie\", flagData)\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"PsionicDie\");\n}\n\n// Test PC Class, Subclass and Class Level\n// RETURN the class object (TRUE) or null (FALSE)\nfunction testClass(testActor, className, subClassName, levels) {\n let theClass = testActor.data.data.classes[className];\n if (theClass) {\n if ((levels > 0) && (theClass.levels >= levels)) {\n if (subClassName === null || (theClass.subclass === subClassName)) {\n return theClass;\n }\n }\n }\n return null;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Psionic Die","type":"script","scope":"global","command":"/*****\nPsionic Power: Psionic Power\n\nUSEAGE : PASSIVE\nThis energy is represented by your Psionic Energy dice, which are each a d6. \nYou have a number of these dice equal to twice your proficiency bonus, and \nthey fuel various psionic powers you have, which are detailed below.\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n let rogueLevel = testClass(pcActor, \"rogue\", \"soulknife\", 3)?.system.levels ?? 0;\n if (!rogueLevel) {\n ui.notifications.error(\"You are not a Rogue: Soulknife of at least 3rd level.\");\n return;\n }\n let flagData;\n if (rogueLevel > 16) flagData = \"+ 1d12\";\n else if (rogueLevel > 10) flagData = \"+ 1d10\";\n else if (rogueLevel > 4) flagData = \"+ 1d8\";\n else if (rogueLevel > 0) flagData = \"+ 1d6\";\n pcActor.setFlag(\"dae\", \"PsionicDie\", flagData)\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"PsionicDie\");\n}\n\n// Test PC Class, Subclass and Class Level\n// RETURN the class object (TRUE) or null (FALSE)\nfunction testClass(testActor, className, subClassName, levels) {\n let theClass = testActor.classes.rogue;\n if (theClass) {\n if ((levels > 0) && (theClass.system.levels >= levels)) {\n if (subClassName === null || (theClass.system.subclass.identifier === subClassName)) {\n return theClass;\n }\n }\n }\n return null;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"favtab":{"isFavorite":true},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":0,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Rogue: Soulknife","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286523,"modifiedTime":1671805171989,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"yNn7E9Rq1Z2z1VYS"} -{"name":"Shadow Step","type":"feat","img":"icons/magic/control/debuff-energy-snare-brown.webp","effects":[{"_id":"Maol11OcLygv28wa","changes":[{"key":"flags.midi-qol.advantage.attack.all","mode":0,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/magic/control/debuff-energy-snare-brown.webp","label":"Shadow Step","origin":"Item.B2VMCdTeSXIiKeZJ","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"d9f35b90a13ccf88fffd4aa049e884c18e43d19b","sourceId":"Item.wwXUiJRyeuN0k72W"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Shadow Step","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nShadow Step\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MIDI-SRD\" SPELL: MISTY STEP\nBy Author: Kandashi https://github.com/kandashi/Dynamic-Effects-SRD\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git\n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n let pcToken = token;\n let pcActor = token.actor.data.data;\n const target = canvas.tokens.get(pcToken.tokenId) || token;\n\n let range = canvas.scene.createEmbeddedDocuments(\"MeasuredTemplate\", [{\n t: \"circle\",\n user: game.user.id,\n x: target.x + canvas.grid.size / 2,\n y: target.y + canvas.grid.size / 2,\n direction: 0,\n distance: 60,\n borderColor: \"#FF0000\",\n flags: { DAESRD: { ShadowStep: { ActorId: pcActor.id } } }\n }]);\n\n range.then(result => {\n let templateData = {\n t: \"rect\",\n user: game.user.id,\n distance: 7.5,\n direction: 45,\n x: 0,\n y: 0,\n fillColor: game.user.color,\n flags: { DAESRD: { ShadowStep: { ActorId: pcActor.id } } }\n };\n\n Hooks.once(\"createMeasuredTemplate\", deleteTemplatesAndMove);\n let doc = new CONFIG.MeasuredTemplate.documentClass(templateData, { parent: canvas.scene });\n let template = new game.dnd5e.canvas.AbilityTemplate(doc);\n template.actorSheet = pcActor.sheet;\n template.drawPreview();\n\n async function deleteTemplatesAndMove(template) {\n let removeTemplates = canvas.templates.placeables.filter(i => i.data.flags.DAESRD?.MistyEscape?.ActorId === pcActor.id);\n let templateArray = removeTemplates.map(function (w) { return w.id });\n await target.data.document.update(canvas.grid.getSnappedPosition(template.data.x, template.data.y));\n if (removeTemplates) await canvas.scene.deleteEmbeddedDocuments(\"MeasuredTemplate\", templateArray);\n };\n });\n} return;","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Shadow Step","type":"script","scope":"global","command":"/*****\nShadow Step\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MIDI-SRD\" SPELL: MISTY STEP\nBy Author: Kandashi https://github.com/kandashi/Dynamic-Effects-SRD\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git\n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n let pcToken = token;\n let pcActor = token.actor;\n const target = canvas.tokens.get(pcToken.tokenId) || token;\n\n let range = canvas.scene.createEmbeddedDocuments(\"MeasuredTemplate\", [{\n t: \"circle\",\n user: game.user.id,\n x: target.x + canvas.grid.size / 2,\n y: target.y + canvas.grid.size / 2,\n direction: 0,\n distance: 60,\n borderColor: \"#FF0000\",\n flags: { DAESRD: { ShadowStep: { ActorId: pcActor.id } } }\n }]);\n\n range.then(result => {\n let templateData = {\n t: \"rect\",\n user: game.user.id,\n distance: 7.5,\n direction: 45,\n x: 0,\n y: 0,\n fillColor: game.user.color,\n flags: { DAESRD: { ShadowStep: { ActorId: pcActor.id } } }\n };\n\n Hooks.once(\"createMeasuredTemplate\", deleteTemplatesAndMove);\n let doc = new CONFIG.MeasuredTemplate.documentClass(templateData, { parent: canvas.scene });\n let template = new game.dnd5e.canvas.AbilityTemplate(doc);\n template.actorSheet = pcActor.sheet;\n template.drawPreview();\n\n async function deleteTemplatesAndMove(template) {\n let removeTemplates = canvas.templates.placeables.filter(i => i.data.flags.DAESRD?.ShadowStep?.ActorId === pcActor.id);\n let templateArray = removeTemplates.map(function (w) { return w.id });\n await target.document.update(canvas.grid.getSnappedPosition(template.x, template.y));\n if (removeTemplates) await canvas.scene.deleteEmbeddedDocuments(\"MeasuredTemplate\", templateArray);\n };\n });\n} return;","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[preItemRoll]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"core":{"sourceId":"Item.snMxepltm5UWo5KL"},"favtab":{"isFavorite":true},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p80","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"util","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Monk: Way of the Shadow","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286501,"modifiedTime":1671805171992,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"DPq86qUyzFQEm9vf"} -{"name":"Steps of Night","type":"feat","img":"icons/magic/control/debuff-energy-snare-brown.webp","effects":[{"_id":"ioxb7mkofb3lhcvi","changes":[{"key":"system.attributes.movement.fly","mode":2,"value":"@data.attributes.movement.walk","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":60,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/control/debuff-energy-snare-brown.webp","label":"Steps of Night","origin":"Actor.4okcHmPmM1iBwyFs.Item.smt73dN8B1zU5F8r","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"1716108aa7f5a72a92dfac3df0c4140e52f9dc72","sourceId":"Item.mpc5OSjcj3qutbPx"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.ii0ZfozCkVZ5vtpD"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p34","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric Twilight Domain","recharge":{"value":null,"charged":false}},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286493,"modifiedTime":1671805171993,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"CVKDZhpfWYQNXZsD"} -{"name":"Stunning Strike","type":"feat","img":"icons/skills/melee/unarmed-punch-fist.webp","effects":[{"_id":"36l6rpnrn6pnifja","changes":[{"key":"flags.midi-qol.fail.ability.save.dex","mode":0,"value":"1","priority":20},{"key":"flags.midi-qol.fail.ability.save.str","mode":0,"value":"1","priority":20},{"key":"flags.midi-qol.grants.advantage.attack.all","mode":0,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"modules/dfreds-convenient-effects/images/stunned.svg","label":"Stunned","origin":"Actor.0VGsg2mP5ntj0F1K.Item.SOmjuGeXM3tOoCcQ","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Stunned"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["turnEndSource"],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":"53367","entityTypeId":"222216831","componentId":235,"componentTypeId":12168134,"class":"Monk","subclass":"Way of the Open Hand","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"sf7t9giix783op3r"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Monk"}},"scene-packer":{"hash":"09463dc292ee58bceaccd6beb3d95829415919da","sourceId":"Item.itQzyEAGpwlQIdCP"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"core":{"sourceId":"Item.65JCPKMXmrWwYm6o"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p78","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":null,"width":null,"units":"touch","type":"creature"},"range":{"value":5,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":1},"ability":"","actionType":"save","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"con","dc":null,"scaling":"wis"},"requirements":"Monk","recharge":{"value":null,"charged":false}},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286486,"modifiedTime":1671805171994,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"OOH7zweQgFhPve3d"} -{"name":"Vigilant Blessing","type":"feat","img":"icons/magic/symbols/cog-shield-white-blue.webp","effects":[{"_id":"7BtDouaCOCQRMIQi","changes":[{"key":"flags.dnd5e.initiativeAdv","mode":0,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/symbols/cog-shield-white-blue.webp","label":"Vigilant Blessing","origin":"Item.ece8DHmOzO5m70tX","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["turnStartSource"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":2996547,"data":{"id":2996547,"name":"Vigilant Blessing","prerequisite":null,"description":"

1st-level Twilight Domain feature

\r\n

The night has taught you to be vigilant. As an action, you give one creature you touch (including possibly yourself) advantage on the next initiative roll the creature makes. This benefit ends immediately after the roll or if you use this feature again.

","requiredLevel":1,"displayOrder":4},"version":"2.9.8","featureId":2996547,"requiredLevel":1,"prerequisite":null,"class":"Twilight Domain","classId":654582,"subClass":"Twilight Domain"},"obsidian":{"source":{"type":"class","text":"Twilight Domain"}},"core":{"sourceId":"Compendium.world.ddb-class-features.M3GMQIicjInJPUhD"},"scene-packer":{"hash":"55172097a33954b707cd5db541518a00e802bc1c","sourceId":"Item.jAOZNxhJJJpFuNi5"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p34","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric: Twilight Domain","recharge":{"value":null,"charged":false}},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286481,"modifiedTime":1671805171997,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"YggRfq2pTqHmXT9K"} -{"name":"Wrath of the Storm","type":"feat","img":"icons/magic/lightning/bolts-forked-large-orange.webp","effects":[],"flags":{"ddbimporter":{"id":"1018","entityTypeId":"222216831","componentId":149,"componentTypeId":12168134,"class":"Cleric","subclass":"Tempest Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"sqffc9kk1ucpsf5y","ignoreIcon":false,"ignoreItemImport":false,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"link-item-resource-5e":{"resource-link":""},"scene-packer":{"hash":"e19de5a7b814295b6fabb29bc60fa949fb4df36b","sourceId":"Item.Etup7yiq6E7lMV3e"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":true,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.Fvl2VJyfemTViUHw"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p62","activation":{"type":"reaction","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"enemy"},"range":{"value":5,"long":null,"units":"ft"},"uses":{"value":2,"max":"2","per":"lr","recovery":""},"consume":{"type":"charges","target":"","amount":1},"ability":"","actionType":"save","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["2d8[lightning]","lightning"]],"versatile":""},"formula":"","save":{"ability":"dex","dc":null,"scaling":"spell"},"requirements":"Cleric: Tempest","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286454,"modifiedTime":1671805172002,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"2G0bVPKKQXYgmsju"} -{"name":"Zealous Presence","type":"feat","img":"icons/creatures/magical/construct-iron-stomping-yellow.webp","effects":[{"_id":"xrxfjgozwcowrenv","changes":[{"key":"flags.midi-qol.advantage.attack.all","mode":0,"value":"1","priority":20},{"key":"flags.midi-qol.advantage.ability.save.all","mode":0,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/creatures/magical/construct-iron-stomping-yellow.webp","label":"Zealous Presence","origin":"Actor.uQOmYSCbRfODlmLf.Item.juMtQeO7Dyz3rDlO","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["turnStartSource"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"5181","entityTypeId":"222216831","componentId":647,"componentTypeId":12168134,"class":"Barbarian","subclass":"Path of the Zealot","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"pmwzriev72c0n6wr","ignoreIcon":false,"ignoreItemImport":false,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Barbarian"}},"link-item-resource-5e":{"resource-link":"secondary"},"scene-packer":{"hash":"ba20b42983e14b241ecd8241ed3648ec0fe4a6c5","sourceId":"Item.0pqlNHCUK8iBiQfQ"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.Kjv6xBCHzbdiD9uE"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"XGtE p11","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":10,"width":null,"units":"","type":"ally"},"range":{"value":60,"long":null,"units":"ft"},"uses":{"value":1,"max":"1","per":"lr","recovery":""},"consume":{"type":"charges","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Barbarian: Path of the Zealot","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286477,"modifiedTime":1671805172004,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"Fs64lF8ddHSOEkyc"} +{"name":"Psionic Die","type":"feat","img":"icons/sundries/gaming/dice-runed-brown.webp","effects":[{"_id":"UgB9349LhJU4nKsd","changes":[{"key":"macro.itemMacro","mode":0,"value":"","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/sundries/gaming/dice-runed-brown.webp","label":"Psionic Die","origin":"Item.H14LgNk3j1O3e3FV","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"dnd5e-helpers":{"rest-effect":"Ignore"},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"1023","entityTypeId":"222216831","componentId":209,"componentTypeId":12168134,"class":"Fighter","subclass":"Battle Master","dndbeyond":{"levelScale":{"id":12,"level":7,"description":"d8","dice":{"diceCount":5,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"5d8"},"fixedValue":null},"levelScales":[{"id":11,"level":1,"description":"d8","dice":{"diceCount":4,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"4d8"},"fixedValue":null},{"id":12,"level":7,"description":"d8","dice":{"diceCount":5,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"5d8"},"fixedValue":null},{"id":13,"level":10,"description":"d10","dice":{"diceCount":5,"diceValue":10,"diceMultiplier":null,"fixedValue":null,"diceString":"5d10"},"fixedValue":null},{"id":14,"level":15,"description":"d10","dice":{"diceCount":6,"diceValue":10,"diceMultiplier":null,"fixedValue":null,"diceString":"6d10"},"fixedValue":null},{"id":15,"level":18,"description":"d12","dice":{"diceCount":6,"diceValue":12,"diceMultiplier":null,"fixedValue":null,"diceString":"6d12"},"fixedValue":null}],"limitedUse":[{"level":null,"uses":1}]},"importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"scene-packer":{"hash":"482f55651d9b1ed04d96789954042bacbbe31ac9","sourceId":"Item.dVJQZHHm4wXGABOE"},"core":{"sourceId":"Item.8gdA6c8j5GnkX33K"},"itemacro":{"macro":{"data":{"_id":null,"name":"Psionic Die","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nPsionic Power: Psionic Power\n\nUSEAGE : PASSIVE\nThis energy is represented by your Psionic Energy dice, which are each a d6. \nYou have a number of these dice equal to twice your proficiency bonus, and \nthey fuel various psionic powers you have, which are detailed below.\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n let rogueLevel = testClass(pcActor, \"rogue\", \"Soulknife\", 3)?.levels ?? 0;\n if (!rogueLevel) {\n ui.notifications.error(\"You are not a Rogue: Soulknife of at least 3rd level.\");\n return;\n }\n let flagData;\n if (rogueLevel > 16) flagData = \"+ 1d12\";\n else if (rogueLevel > 10) flagData = \"+ 1d10\";\n else if (rogueLevel > 4) flagData = \"+ 1d8\";\n else if (rogueLevel > 0) flagData = \"+ 1d6\";\n pcActor.setFlag(\"dae\", \"PsionicDie\", flagData)\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"PsionicDie\");\n}\n\n// Test PC Class, Subclass and Class Level\n// RETURN the class object (TRUE) or null (FALSE)\nfunction testClass(testActor, className, subClassName, levels) {\n let theClass = testActor.data.data.classes[className];\n if (theClass) {\n if ((levels > 0) && (theClass.levels >= levels)) {\n if (subClassName === null || (theClass.subclass === subClassName)) {\n return theClass;\n }\n }\n }\n return null;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Psionic Die","type":"script","scope":"global","command":"/*****\nPsionic Power: Psionic Power\n\nUSEAGE : PASSIVE\nThis energy is represented by your Psionic Energy dice, which are each a d6. \nYou have a number of these dice equal to twice your proficiency bonus, and \nthey fuel various psionic powers you have, which are detailed below.\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n let rogueLevel = testClass(pcActor, \"rogue\", \"soulknife\", 3)?.system.levels ?? 0;\n if (!rogueLevel) {\n ui.notifications.error(\"You are not a Rogue: Soulknife of at least 3rd level.\");\n return;\n }\n let flagData;\n if (rogueLevel > 16) flagData = \"+ 1d12\";\n else if (rogueLevel > 10) flagData = \"+ 1d10\";\n else if (rogueLevel > 4) flagData = \"+ 1d8\";\n else if (rogueLevel > 0) flagData = \"+ 1d6\";\n pcActor.setFlag(\"dae\", \"PsionicDie\", flagData)\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"PsionicDie\");\n}\n\n// Test PC Class, Subclass and Class Level\n// RETURN the class object (TRUE) or null (FALSE)\nfunction testClass(testActor, className, subClassName, levels) {\n let theClass = testActor.classes.rogue;\n if (theClass) {\n if ((levels > 0) && (theClass.system.levels >= levels)) {\n if (subClassName === null || (theClass.system.subclass.identifier === subClassName)) {\n return theClass;\n }\n }\n }\n return null;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"favtab":{"isFavorite":true},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":0,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Rogue: Soulknife","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286523,"modifiedTime":1672520405521,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"2idLU6QfL3WhrNJg"} +{"name":"Gift of the Eyes of Night","type":"feat","img":"icons/magic/perception/silhouette-stealth-shadow.webp","effects":[{"_id":"eh177mjwrheqqh5w","changes":[{"key":"ATL.dimSight","mode":2,"value":"300","priority":40}],"disabled":false,"duration":{"startTime":null,"seconds":3600,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/silhouette-stealth-shadow.webp","label":"Eyes of Night","origin":"Actor.4okcHmPmM1iBwyFs.Item.lpKBbM6Rsla8ZL64","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2409717","entityTypeId":"222216831","componentId":2996540,"componentTypeId":12168134,"class":"Cleric","subclass":"Twilight Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"iyl0evwnfwrvm9lh"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"scene-packer":{"hash":"985b8cb3fc2611c015483a50be161f06e78b96b9","sourceId":"Item.lwAnptMvNOKS199M"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Eyes of Night","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.yLmIyy87Eh8dzywq"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p34","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":4,"width":null,"units":"","type":"creature"},"range":{"value":10,"long":10,"units":"ft"},"uses":{"value":1,"max":"1","per":"lr","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric Twilight Domain","recharge":{"value":null,"charged":false}},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286451,"modifiedTime":1672520405504,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"50OsgWGUcPsS6kS7"} +{"name":"Auto Divine Fury","type":"feat","img":"icons/magic/fire/projectile-wave-arrow.webp","effects":[{"_id":"BPyKtcWCBpuwouN9","changes":[{"key":"flags.dae","mode":0,"value":"autoDivineFury 1","priority":10}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/fire/projectile-wave-arrow.webp","label":"Auto Divine Fury","origin":"Item.x0Obbisd7EriI1UU","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":false},"cf":null,"core":{"sourceId":"Compendium.midi-qol.midiqol-sample-items.uvRQayOyn61L6vOV"},"scene-packer":{"hash":"370dad0cafacc0a0db2b497710589878b3b63c28","sourceId":"Item.rkofBOz9EUgalF4s"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"XGtE p11","activation":{"type":"action","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":0,"max":"0","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":null},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Barbarian Zealot Path","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286504,"modifiedTime":1672520405455,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"7q6zAaeSoqsXF6i4"} +{"name":"Incisive Sense","type":"feat","img":"icons/equipment/back/cloak-hooded-green-gold.webp","effects":[{"_id":"f50j8dfdk7sz7lfe","changes":[{"key":"flags.midi-qol.advantage.skill.ins","mode":5,"value":"1","priority":20},{"key":"flags.midi-qol.advantage.skill.inv","mode":5,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/equipment/back/cloak-hooded-green-gold.webp","label":"Incisive Sense","origin":"Actor.6OUbrDvzBaKBNRuA.Item.VPKVVTDdrss5Yi0f","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":2821775,"type":"race","entityTypeId":1960452172,"dndbeyond":{"displayOrder":200},"importId":"8i3k4hbim8bho1dm"},"obsidian":{"source":{"type":"race"}},"scene-packer":{"hash":"0b10f710276760d25ab9e036563006bafef48338","sourceId":"Item.PC8jGgzwNeyxfaMY"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"core":{"sourceId":"Item.1AgaCsP9EpGaadae"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"EGtW p163","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Elf","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286453,"modifiedTime":1672520405507,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"8rzEcJOKHYKynE5G"} +{"name":"Stunning Strike","type":"feat","img":"icons/skills/melee/unarmed-punch-fist.webp","effects":[{"_id":"36l6rpnrn6pnifja","changes":[{"key":"flags.midi-qol.fail.ability.save.dex","mode":0,"value":"1","priority":20},{"key":"flags.midi-qol.fail.ability.save.str","mode":0,"value":"1","priority":20},{"key":"flags.midi-qol.grants.advantage.attack.all","mode":0,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"modules/dfreds-convenient-effects/images/stunned.svg","label":"Stunned","origin":"Actor.0VGsg2mP5ntj0F1K.Item.SOmjuGeXM3tOoCcQ","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Stunned"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["turnEndSource"],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":"53367","entityTypeId":"222216831","componentId":235,"componentTypeId":12168134,"class":"Monk","subclass":"Way of the Open Hand","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"sf7t9giix783op3r"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Monk"}},"scene-packer":{"hash":"09463dc292ee58bceaccd6beb3d95829415919da","sourceId":"Item.itQzyEAGpwlQIdCP"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"core":{"sourceId":"Item.65JCPKMXmrWwYm6o"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p78","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":null,"width":null,"units":"touch","type":"creature"},"range":{"value":5,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":1},"ability":"","actionType":"save","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"con","dc":null,"scaling":"wis"},"requirements":"Monk","recharge":{"value":null,"charged":false}},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286486,"modifiedTime":1672520405530,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"90lOdAE783zZ55Td"} +{"name":"Channel Divinity: Preserve Life","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[{"_id":"z5emxm04jk40kp3k","changes":[{"key":"macro.itemMacro","mode":0,"value":"ItemMacro","priority":20}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/magic/light/orb-beams-green.webp","label":"Channel Divinity: Preserve Life","origin":"Actor.XymBtQnn8lRHXvt6.Item.hqvE87WW1vGTGreC","transfer":false,"flags":{"dae":{"selfTarget":false,"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTargetAlways":false},"core":{"statusId":""},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53343","entityTypeId":"222216831","componentId":132,"componentTypeId":12168134,"class":"Cleric","subclass":"Life Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"v4ymwgpll4j2cos8"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"scene-packer":{"hash":"e93a43e1ba5d0bc67e6d218a8e1adcb549238684","sourceId":"Item.8h1ZkzYa8KmEQZ8W"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"itemacro":{"macro":{"data":{"_id":null,"name":"Channel Divinity: Preserve Life","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nChannel Divinity: Preserve Life\n\nUSE: Manually triggered Preserve Life to use the available healing pool on the target\nCreate a healing pool \nStore the healing pool on the character in a DAE variable that terminates at the end of the actors turn\n\nv1.0 August 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = token.actor; \n // Test Class\n let pcCleric = pcActor.getRollData().classes?.cleric;\n if (pcCleric === null) {\n ui.notifications.error(\"You are not a cleric!\");\n return;\n }\n\n // Test Subclass\n let pcClericSubclass = pcActor.getRollData().classes.cleric?.subclass.identifier;\n if (pcClericSubclass != \"life-domain\") {\n ui.notifications.error(\"You are not a Life Domain cleric!\");\n return;\n }\n\n //5x cleric level healing pool\n const pool = 5 * pcCleric.levels;\n pcActor.setFlag(\"dae\", \"lifehealingpool\", pool);\n return;\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"lifehealingpool\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Channel Divinity: Preserve Life","type":"script","scope":"global","command":"/*****\nChannel Divinity: Preserve Life\n\nUSE: Manually triggered Preserve Life to use the available healing pool on the target\nCreate a healing pool \nStore the healing pool on the character in a DAE variable that terminates at the end of the actors turn\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = token.actor;\n // Test Class\n let pcCleric = pcActor.getRollData().classes?.cleric;\n if (pcCleric === null) {\n ui.notifications.error(\"You are not a cleric!\");\n return;\n }\n\n // Test Subclass\n let pcClericSubclass = pcActor.getRollData().classes.cleric?.subclass.identifier;\n if (pcClericSubclass != \"life-domain\") {\n ui.notifications.error(\"You are not a Life Domain cleric!\");\n return;\n }\n\n //5x cleric level healing pool\n const pool = 5 * pcCleric.levels;\n pcActor.setFlag(\"dae\", \"lifehealingpool\", pool);\n return;\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"lifehealingpool\");\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"core":{"sourceId":"Item.bPoUIdDoPJd5Tc2X"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 August 17 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
\n

 

","chat":"","unidentified":""},"source":"PHB p194","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286491,"modifiedTime":1672520405484,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"CLjLilPEa0w4UtfR"} +{"name":"Steps of Night","type":"feat","img":"icons/magic/control/debuff-energy-snare-brown.webp","effects":[{"_id":"ioxb7mkofb3lhcvi","changes":[{"key":"system.attributes.movement.fly","mode":2,"value":"@data.attributes.movement.walk","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":60,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/control/debuff-energy-snare-brown.webp","label":"Steps of Night","origin":"Actor.4okcHmPmM1iBwyFs.Item.smt73dN8B1zU5F8r","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"1716108aa7f5a72a92dfac3df0c4140e52f9dc72","sourceId":"Item.mpc5OSjcj3qutbPx"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.ii0ZfozCkVZ5vtpD"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p34","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric Twilight Domain","recharge":{"value":null,"charged":false}},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286493,"modifiedTime":1672520405528,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"EUXHiuwIERl0aIkf"} +{"name":"Circle of Mortality","type":"feat","img":"icons/skills/wounds/blood-cells-disease-green.webp","effects":[{"_id":"1jud0luaqrwjayvy","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Circle of Mortality,all","priority":10}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/wounds/blood-cells-disease-green.webp","label":"Circle of Mortality","origin":"Actor.Uv8E8r17bCEb1o2e.Item.3aDwBUf6nDcPVKz7","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53464","entityTypeId":"222216831","componentId":664,"componentTypeId":12168134,"class":"Cleric","subclass":"Grave Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"4hcm2jmz0inu7t2d","pack":"world.ddb-override","originalItemName":"Circle of Mortality","replaced":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"scene-packer":{"hash":"17e2cd67935372a49fefc3b699753963331e40a9","sourceId":"Item.ovikQXLs6Y6zgheY"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"itemacro":{"macro":{"data":{"_id":null,"name":"Circle of Mortality","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nCircle of Mortality\n\nv1.1 August 6 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n let targetTokenUuid = args[0].hitTargetUuids[0];\n let targetToken = await fromUuid(targetTokenUuid);\n let targetActor = targetToken.actor;\n\n // if Target HP > 0 return \n if (targetActor.data.data.attributes.hp.value != 0) return;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n }\n\n // compute maximum healing for the spell cast\n let healingRollMax = 0;\n for (let i = 0; i < workflow.damageRoll.terms.length; i++)\n if (workflow.damageRoll.terms[i]?.faces) healingRollMax = healingRollMax + (workflow.damageRoll.terms[i].faces * workflow.damageRoll.terms[i].number);\n else if (workflow.damageRoll.terms[i]?.number) healingRollMax = healingRollMax + workflow.damageRoll.terms[i].number;\n let bonusHealing = (healingRollMax - workflow.damageRoll.total);\n await setProperty(workflow, \"BonusHealing\", bonusHealing);\n\n return;\n\n} else if (args[0].tag === \"DamageBonus\") {\n console.log(\"MACRO | bonus healing application\");\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n let bonusHealing = await getProperty(workflow, \"BonusHealing\");\n\n // Bonus Healing\n if (bonusHealing > 0) {\n await setProperty(workflow, \"BonusHealing\", 0);\n return { damageRoll: `${bonusHealing}[healing]`, flavor: \"Circle of Mortality Bonus Healing\" };\n } else return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Circle of Mortality","type":"script","scope":"global","command":"/*****\nCircle of Mortality\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n let targetTokenUuid = args[0].hitTargetUuids[0];\n let targetToken = await fromUuid(targetTokenUuid);\n let targetActor = targetToken.actor;\n\n // if Target HP > 0 return \n if (targetActor.system.attributes.hp.value != 0) return;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n }\n\n // compute maximum healing for the spell cast\n let healingRollMax = 0;\n for (let i = 0; i < workflow.damageRoll.terms.length; i++)\n if (workflow.damageRoll.terms[i]?.faces) healingRollMax = healingRollMax + (workflow.damageRoll.terms[i].faces * workflow.damageRoll.terms[i].number);\n else if (workflow.damageRoll.terms[i]?.number) healingRollMax = healingRollMax + workflow.damageRoll.terms[i].number;\n let bonusHealing = (healingRollMax - workflow.damageRoll.total);\n await setProperty(workflow, \"BonusHealing\", bonusHealing);\n\n return;\n\n} else if (args[0].tag === \"DamageBonus\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n let bonusHealing = await getProperty(workflow, \"BonusHealing\");\n\n // Bonus Healing\n if (bonusHealing > 0) {\n await setProperty(workflow, \"BonusHealing\", 0);\n return { damageRoll: `${bonusHealing}[healing]`, flavor: \"Circle of Mortality Bonus Healing\" };\n } else return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"core":{"sourceId":"Item.edUabd3mcVcUaLtm"},"cf":{"id":"temp_92357bvnxs9"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"You restore maximum possible HP on each dice (instead of rolling) with healing spells to a creature with 0 HP. You learn the spare the dying cantrip, can cast it as a bonus action, and it has a range of 30 ft.","unidentified":""},"source":"XGtE p20","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric: Grave Domain","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286449,"modifiedTime":1672520405494,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"FiL5DbLwdilsl339"} +{"name":"Channel Divinity: Radiance of the Dawn","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[],"flags":{"ddbimporter":{"id":"53344","entityTypeId":"222216831","componentId":138,"componentTypeId":12168134,"class":"Cleric","subclass":"Light Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"cjwzq7lf48igj2ev","ignoreIcon":false,"ignoreItemImport":false,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"scene-packer":{"hash":"f76519640f96acf4dce01dd978965c5406bb2e82","sourceId":"Item.bko6opAomW9diM8u"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":true,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.BvxA3rBt3nvjgMti"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p61","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"enemy"},"range":{"value":30,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":1},"ability":"","actionType":"save","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["2d10[radiant] + @classes.cleric.levels","radiant"]],"versatile":"","value":""},"formula":"","save":{"ability":"con","dc":null,"scaling":"spell"},"requirements":"Cleric: Light","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286534,"modifiedTime":1672520405486,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"IPhGOqbbRfObdsjC"} +{"name":"Preserve Life","type":"feat","img":"icons/magic/light/orb-beams-green.webp","effects":[],"flags":{"_sheetTab":"description","entityorder":{"order":161},"dynamiceffects":{"effects":[],"alwaysActive":false,"equipActive":false},"favtab":{"isFavourite":true,"isFavorite":true},"midi-qol":{"effectActivation":false,"onUseMacroName":"[preItemRoll]ItemMacro"},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Preserve Life","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nPreserve Life\n\nUSE: use this feature AFTER channel divinity: Preserve Life is triggered to create a healing pool\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MidiQOL Sample Items\" SPELL: LAY ON HANDS\nBy Author: Tim Poseney https://gitlab.com/tposney/midi-qol\n\nv1.0 August 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n // get healthpool if not available send a notification\n let lifehealingpool = actor.getFlag(\"dae\", \"lifehealingpool\");\n if ((!lifehealingpool) || (!lifehealingpool > 0)) {\n ui.notifications.warn(\"You either have no healing pool left or you have not used Channel Divinity: Preserve Life...\");\n return false;\n }\n\n // check to make sure there is a target to heal and only one is selected\n let theTarget = args[0].targets[0];\n if ((!theTarget) || (args[0].targets.length > 1)) {\n ui.notifications.warn(\"Please select a target to heal with Preserve Life\");\n return false;\n }\n\n // does not work on undead/constructs - not sure if this is RAW but makes sense given Preserve Life \n let invalid = [\"undead\", \"construct\"].some(type => (theTarget?.actor.data.data.details.type?.value || \"\").toLowerCase().includes(type));\n if (invalid) {\n ui.notifications.warn(\"Preserve Life can't affect undead/constructs\")\n return false;\n }\n\n let targetToken = await fromUuid(args[0].targetUuids[0]);\n let targetActor = targetToken.actor;\n //Target can only be healed up to half their HP\n let targetDamage = ((targetActor.data.data.attributes.hp.max / 2) - targetActor.data.data.attributes.hp.value);\n\n if (targetDamage <= 0) {\n ui.notifications.warn(\"Target is at or above half health\");\n return false; \n }\n\n // prompt for how much to use...\n let d = new Promise((resolve, reject) => {\n let theDialog = new Dialog({\n title: \"Preserve Life\",\n content: `

Your targets current damage level: ${targetDamage}

\n

How many points to use? ${lifehealingpool} left in your Healing Pool

`,\n buttons: {\n heal: {\n icon: '

',\n label: \"

HEAL

\",\n callback: (html) => { resolve(Math.clamped(Math.floor(Number(html.find('#mqlohpoints')[0].value) / 2), 0, lifehealingpool)); }\n },\n abort: {\n icon: '

',\n label: \"

CANCEL

\",\n callback: () => { resolve(false) }\n },\n },\n default: \"abort\",\n }).render(true);\n });\n const consumed = await d;\n if (!consumed) return false;\n\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = workflow.item;\n let updates;\n if (consumed > 0) {\n updates = {\n \"data.consume.amount\": Math.abs(consumed),\n \"data.damage.parts\": [[`${Math.max(0, consumed)}`, \"healing\"]],\n \"data.chatFlavor\": \"Preserve Life\"\n };\n }\n\n // remove consumed from pool\n lifehealingpool = lifehealingpool - consumed;\n actor.setFlag(\"dae\", \"lifehealingpool\", lifehealingpool);\n\n return theItem.update(updates);\n}\nreturn true;","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Preserve Life","type":"script","scope":"global","command":"/*****\nPreserve Life\n\nUSE: use this feature AFTER channel divinity: Preserve Life is triggered to create a healing pool\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MidiQOL Sample Items\" SPELL: LAY ON HANDS\nBy Author: Tim Poseney https://gitlab.com/tposney/midi-qol\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n // get healthpool if not available send a notification\n let lifehealingpool = actor.getFlag(\"dae\", \"lifehealingpool\");\n if ((!lifehealingpool) || (!lifehealingpool > 0)) {\n ui.notifications.warn(\"You either have no healing pool left or you have not used Channel Divinity: Preserve Life...\");\n return false;\n }\n\n // check to make sure there is a target to heal and only one is selected\n let theTarget = args[0].targets[0];\n if ((!theTarget) || (args[0].targets.length > 1)) {\n ui.notifications.warn(\"Please select a target to heal with Preserve Life\");\n return false;\n }\n\n // does not work on undead/constructs - not sure if this is RAW but makes sense given Preserve Life \n let invalid = [\"undead\", \"construct\"].some(type => (theTarget?.actor.system.details.type?.value || \"\").toLowerCase().includes(type));\n if (invalid) {\n ui.notifications.warn(\"Preserve Life can't affect undead/constructs\")\n return false;\n }\n\n let targetToken = await fromUuid(args[0].targetUuids[0]);\n let targetActor = targetToken.actor;\n //Target can only be healed up to half their HP\n let targetDamage = ((targetActor.system.attributes.hp.max / 2) - targetActor.system.attributes.hp.value);\n\n if (targetDamage <= 0) {\n ui.notifications.warn(\"Target is at or above half health\");\n return false;\n }\n\n // prompt for how much to use...\n let d = new Promise((resolve, reject) => {\n let theDialog = new Dialog({\n title: \"Preserve Life\",\n content: `

Your targets current damage level: ${targetDamage}

\n

How many points to use? ${lifehealingpool} left in your Healing Pool

`,\n buttons: {\n heal: {\n icon: '

',\n label: \"

HEAL

\",\n callback: (html) => { resolve(Math.clamped(Math.floor(Number(html.find('#mqlohpoints')[0].value) / 2), 0, lifehealingpool)); }\n },\n abort: {\n icon: '

',\n label: \"

CANCEL

\",\n callback: () => { resolve(false) }\n },\n },\n default: \"abort\",\n }).render(true);\n });\n let consumed = await d;\n if (!consumed) return false;\n if (consumed > targetDamage) consumed = targetDamage;\n\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = workflow.item;\n let updates;\n if (consumed > 0) {\n updates = {\n \"data.consume.amount\": Math.abs(consumed),\n \"data.damage.parts\": [[`${Math.max(0, consumed)}`, \"healing\"]],\n \"data.chatFlavor\": \"Preserve Life\"\n };\n }\n\n // remove consumed from pool\n lifehealingpool = lifehealingpool - consumed;\n actor.setFlag(\"dae\", \"lifehealingpool\", lifehealingpool);\n\n return theItem.update(updates);\n}\nreturn true;","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.IM2UCUasJLD5J7Fw"},"scene-packer":{"sourceId":"Item.EOsMVAAneGunFjeW","hash":"14028bd6aa70a68ce61cc02be1503c154e30728f"},"cf":{"id":"temp_ovon30cu8t"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n

SETUP:

\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n

 

\n

 

\n
\nVERSION INFO\n

v1.0 August 17 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p194","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":"","type":"lr"},"consume":{"type":"","target":"","amount":2},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"Preserve Life","critical":{"threshold":null,"damage":null},"damage":{"parts":[["2","healing"]],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell","value":""},"requirements":"Cleric: Life Domain","recharge":{"value":null,"charged":false},"featType":{"value":"","_deprecated":true},"time":{"value":"","_deprecated":true},"damageType":{"value":"","_deprecated":true},"attributes":{"spelldc":10},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286532,"modifiedTime":1672520405517,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"Jn0IWUTcJhNjmgG1"} +{"name":"Zealous Presence","type":"feat","img":"icons/creatures/magical/construct-iron-stomping-yellow.webp","effects":[{"_id":"xrxfjgozwcowrenv","changes":[{"key":"flags.midi-qol.advantage.attack.all","mode":0,"value":"1","priority":20},{"key":"flags.midi-qol.advantage.ability.save.all","mode":0,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/creatures/magical/construct-iron-stomping-yellow.webp","label":"Zealous Presence","origin":"Actor.uQOmYSCbRfODlmLf.Item.juMtQeO7Dyz3rDlO","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["turnStartSource"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"5181","entityTypeId":"222216831","componentId":647,"componentTypeId":12168134,"class":"Barbarian","subclass":"Path of the Zealot","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"pmwzriev72c0n6wr","ignoreIcon":false,"ignoreItemImport":false,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Barbarian"}},"link-item-resource-5e":{"resource-link":"secondary"},"scene-packer":{"hash":"ba20b42983e14b241ecd8241ed3648ec0fe4a6c5","sourceId":"Item.0pqlNHCUK8iBiQfQ"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.Kjv6xBCHzbdiD9uE"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"XGtE p11","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":10,"width":null,"units":"","type":"ally"},"range":{"value":60,"long":null,"units":"ft"},"uses":{"value":1,"max":"1","per":"lr","recovery":""},"consume":{"type":"charges","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Barbarian: Path of the Zealot","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286477,"modifiedTime":1672520405541,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"Mj5v9GNv9wdfC87T"} +{"name":"Channel Divinity: Path of the Grave","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[{"_id":"Xkk83MdPGWwWb2yX","changes":[{"key":"system.traits.dv.all","mode":0,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/death/grave-tombstone-glow-teal.webp","label":"Path to the Grave","origin":"Item.xJ3uiHOSl6ZDElTz","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isDamaged"],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":216,"data":{"id":216,"name":"Remarkable Athlete","prerequisite":null,"description":"

Starting at 7th level, you can add half your proficiency bonus (round up) to any Strength, Dexterity, or Constitution check you make that doesn’t already use your proficiency bonus.

\r\n

In addition, when you make a running long jump, the distance you can cover increases by a number of feet equal to your Strength modifier.

","requiredLevel":7,"displayOrder":2},"version":"2.9.8","featureId":216,"requiredLevel":7,"prerequisite":null,"class":"Champion","classId":16,"subClass":"Champion"},"obsidian":{"source":{"type":"class","text":"Champion"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Compendium.world.ddb-class-features.7rTzj1cBRBDKOb7R"},"scene-packer":{"hash":"12270773c7e2abeb4d5a59de2743d2da3643352d","sourceId":"Item.hskQTbnMnRhKrIAC"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"XGtE p20","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"creature"},"range":{"value":30,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric: Grave Domain","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286530,"modifiedTime":1672520405469,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"OkLcdQN39ZdesD8L"} +{"name":"Fey Presence","type":"feat","img":"icons/magic/perception/eye-ringed-glow-angry-large-teal.webp","effects":[],"flags":{"ddbimporter":{"id":"1035","entityTypeId":"222216831","componentId":396,"componentTypeId":12168134,"class":"Warlock","subclass":"The Archfey","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"py0qw85udlapktp3"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Warlock"}},"link-item-resource-5e":{"resource-link":"primary"},"scene-packer":{"hash":"dc316af833575a26f682261e8d4330f4eb8904bf","sourceId":"Item.cr4bpsAI3I6WGGs2"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[all]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Fey Presence","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFey Presence\n\nUSAGE: Usae ability when you character has an action\n\n- this ability targets evertything in a ten foot cube \n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preambleComplete\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n // prompt user for the fightened or charmed effect, store on the workflow as feyPresenceEffect \n let dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Fey Presence:\",\n content: \"

Select the desired effect fightened or charmed?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Frightened

\",\n callback: () => resolve(\"Frightened\")\n },\n two: {\n icon: '

',\n label: \"

Charmed

\",\n callback: () => { resolve(\"Charmed\") }\n }\n },\n default: \"one\"\n }).render(true);\n });\n let selectedEffect = await dialog;\n await setProperty(workflow, \"feyPresenceEffect\", selectedEffect);\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n //for every target the failed the saving throw apply the selected feyPresenceEffect\n let effect = getProperty(workflow, \"feyPresenceEffect\");\n if (effect)\n for (target of args[0].failedSaves) {\n let targetActor = target.actor;\n if (effect === \"Frightened\") await applyFrightenedEffect(targetActor, args);\n else if (effect === \"Charmed\") await applyCharmedEffect(targetActor, args);\n else ui.notifications.error(\"An error occured applying the effect.\");\n }\n} return;\n\n// Apply the fightened effect to the target\nasync function applyFrightenedEffect(target, args) {\n let effectData = {\n label: \"Frightened\",\n icon: \"modules/dfreds-convenient-effects/images/frightened.svg\",\n origin: args.uuid,\n changes: [\n { \"key\": \"flags.midi-qol.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 },\n { \"key\": \"flags.midi-qol.disadvantage.ability.check.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }\n ],\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnEndSource\"] },\n core: { statusId: \"Convenient Effect: Frightened\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Apply the charmed effect to the target\nasync function applyCharmedEffect(target, args) {\n let effectData = {\n label: \"Charmed\",\n icon: \"modules/dfreds-convenient-effects/images/charmed.svg\",\n origin: args.uuid,\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnEndSource\"] },\n core: { statusId: \"Convenient Effect: Charmed\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Fey Presence","type":"script","scope":"global","command":"/*****\nFey Presence\n\nUSAGE: Usae ability when you character has an action\n\n- this ability targets evertything in a ten foot cube \n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preambleComplete\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n // prompt user for the fightened or charmed effect, store on the workflow as feyPresenceEffect \n let dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Fey Presence:\",\n content: \"

Select the desired effect fightened or charmed?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Frightened

\",\n callback: () => resolve(\"Frightened\")\n },\n two: {\n icon: '

',\n label: \"

Charmed

\",\n callback: () => { resolve(\"Charmed\") }\n }\n },\n default: \"one\"\n }).render(true);\n });\n let selectedEffect = await dialog;\n await setProperty(workflow, \"feyPresenceEffect\", selectedEffect);\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n //for every target the failed the saving throw apply the selected feyPresenceEffect\n let effect = getProperty(workflow, \"feyPresenceEffect\");\n if (effect)\n for (target of args[0].failedSaves) {\n let targetActor = target.actor;\n if (effect === \"Frightened\") await applyFrightenedEffect(targetActor, args);\n else if (effect === \"Charmed\") await applyCharmedEffect(targetActor, args);\n else ui.notifications.error(\"An error occured applying the effect.\");\n }\n} return;\n\n// Apply the fightened effect to the target\nasync function applyFrightenedEffect(target, args) {\n let effectData = {\n label: \"Frightened\",\n icon: \"modules/dfreds-convenient-effects/images/frightened.svg\",\n origin: args.uuid,\n changes: [\n { \"key\": \"flags.midi-qol.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 },\n { \"key\": \"flags.midi-qol.disadvantage.ability.check.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }\n ],\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnEndSource\"] },\n core: { statusId: \"Convenient Effect: Frightened\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Apply the charmed effect to the target\nasync function applyCharmedEffect(target, args) {\n let effectData = {\n label: \"Charmed\",\n icon: \"modules/dfreds-convenient-effects/images/charmed.svg\",\n origin: args.uuid,\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnEndSource\"] },\n core: { statusId: \"Convenient Effect: Charmed\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"core":{"sourceId":"Item.vVdMFnc57t6M6R6L"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p109","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":10,"width":null,"units":"ft","type":"creature"},"range":{"value":null,"long":null,"units":"spec"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"wis","dc":null,"scaling":"spell"},"requirements":"Warlock: Fey Patron","recharge":{"value":null,"charged":false},"quantity":1,"weight":null,"price":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286463,"modifiedTime":1672520405502,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"QN9NN6fR4XbYWByq"} +{"name":"Channel Divinity: Inspiring Smite","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[{"_id":"mj8jXTYFLF8zANxn","changes":[{"key":"macro.itemMacro","mode":0,"value":"ItemMacro","priority":50}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/magic/life/heart-cross-blue.webp","label":"Inspiring Smite Healing Pool","origin":"Item.D5SPoopIkNLJ3PyB","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"scene-packer":{"hash":"94fa30ae2854d091e6b75792dd9e6ea67c747d06","sourceId":"Item.h3C3TVjtPEyRI2jM"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"core":{"sourceId":"Item.D5SPoopIkNLJ3PyB"},"itemacro":{"macro":{"data":{"_id":null,"name":"Channel Divinity: Inspiring Smite","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nChannel Divinity: Inspiring Smite\n\nUSE: Manually triggered after to hit with divine smite\nCreate a healing pool - roll 2d8 + class level\nStore the healing pool on the character in a DAE variable that terminates at the end of the actors turn\n\nv1.1 August 6 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n\n // Test Class\n let pcPaladin = pcActor.getRollData().classes?.paladin;\n if (pcPaladin === null) {\n ui.notifications.error(\"You are not a Paladin!\");\n return;\n }\n\n // Test Subclass\n let pcPaladinSubclass = pcActor.getRollData().classes.paladin?.subclass.identifier;\n if (pcPaladinSubclass != \"oath-of-glory\") {\n ui.notifications.error(\"You are not a Oath of Glory Paladin!\");\n return;\n }\n\n //roll 2d8 + pcPaladin.levels and store result in flag.dae.healingPool\n const roll = await(new Roll(`2d8 + ${pcPaladin.levels}`)).roll();\n pcActor.setFlag(\"dae\", \"healingpool\", roll.total);\n return;\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"healingpool\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Channel Divinity: Inspiring Smite","type":"script","scope":"global","command":"/*****\nChannel Divinity: Inspiring Smite\n\nUSE: Manually triggered after to hit with divine smite\nCreate a healing pool - roll 2d8 + class level\nStore the healing pool on the character in a DAE variable that terminates at the end of the actors turn\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n\n // Test Class\n let pcPaladin = pcActor.getRollData().classes?.paladin;\n if (pcPaladin === null) {\n ui.notifications.error(\"You are not a Paladin!\");\n return;\n }\n\n // Test Subclass\n let pcPaladinSubclass = pcActor.getRollData().classes.paladin?.subclass.identifier;\n if (pcPaladinSubclass != \"oath-of-glory\") {\n ui.notifications.error(\"You are not a Oath of Glory Paladin!\");\n return;\n }\n\n //roll 2d8 + pcPaladin.levels and store result in flag.dae.healingPool\n const roll = await(new Roll(`2d8 + ${pcPaladin.levels}`)).evaluate({async: true});\n pcActor.setFlag(\"dae\", \"healingpool\", roll.total);\n return;\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"healingpool\");\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"favtab":{"isFavorite":true},"cf":{"id":"temp_92357bvnxs9"},"ddbimporter":{"pack":"world.ddb-override","id":"1731654","entityTypeId":"222216831","componentId":2203085,"componentTypeId":12168134,"class":"Paladin","subclass":"Oath of Glory","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1},{"level":null,"uses":1}]},"importId":"7hbudetkus7tdkj4","originalItemName":"Channel Divinity: Inspiring Smite","replaced":true},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"MOoT p.29","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Paladin: Oath of Glory","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286496,"modifiedTime":1672520405462,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"dtxR6StTFm6jJtEk"} +{"name":"Aura of Alacrity","type":"feat","img":"icons/skills/movement/feet-winged-boots-brown.webp","effects":[{"_id":"2clgap6djsy9eun2","changes":[{"key":"system.attributes.movement.walk","mode":2,"value":"10","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/movement/feet-winged-boots-brown.webp","label":"Aura of Alacrity","origin":"Actor.XhIWoWzMyMzFK5FU.Item.8TLpbFnPykVWRRwa","transfer":true,"flags":{"core":{"statusId":"1"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":true,"aura":"Allies","radius":5,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":2203086,"type":"class","dndbeyond":{"requiredLevel":7,"displayOrder":3,"levelScale":{"id":266710,"level":7,"description":"Aura of Alacrity (Range 5 feet)","dice":null,"fixedValue":5},"levelScales":[{"id":266710,"level":7,"description":"Aura of Alacrity (Range 5 feet)","dice":{"diceCount":null,"diceValue":null,"diceMultiplier":null,"fixedValue":null,"diceString":null},"fixedValue":5},{"id":266711,"level":18,"description":"Aura of Alacrity (range 10 feet)","dice":{"diceCount":null,"diceValue":null,"diceMultiplier":null,"fixedValue":null,"diceString":null},"fixedValue":10}],"limitedUse":[],"class":"Paladin : Oath of Glory"},"class":"Paladin","subclass":"Oath of Glory","importId":"lkdgypqhrbwo10lx"},"obsidian":{"source":{"type":"class","text":"Paladin"}},"scene-packer":{"hash":"916aed0ea4bdfe1f141791556381e3db671b77a7","sourceId":"Item.Mhlez0HNjTrqcioa"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.IymI4xM6Du0DvYhg"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"MOoT p29","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Paladin : Oath of Glory","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286488,"modifiedTime":1672520405444,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"gPnGq74G17Uj5pKj"} +{"name":"Divine Fury","type":"feat","img":"icons/magic/fire/projectile-wave-arrow.webp","effects":[{"_id":"YJK1tQQIV2Ycrqy0","changes":[{"key":"flags.dnd5e.DamageBonusMacro","mode":0,"value":"ItemMacro.Divine Fury","priority":30}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/fire/projectile-wave-arrow.webp","label":"Divine Fury","origin":"Item.5PUe0GiheEHUomoR","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"scene-packer":{"hash":"e8c30e8f3bff4913ed4812b9d005af0cbab248ff","sourceId":"Item.WNdhwMcS4efx0nDt"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Divine Fury","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nDivine Fury | Auto Divine Fury [there are two items to make this function]\n\nNOTE: I used Tom Posney's MIDI-QOL Sneak Attack / Auto Sneak Attack as a templete for this\n\nUSEAGE : PASSIVE\nPlease place these two items on a Barbarian Zealot the rest is automated\n \nv1.1 August 6 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif ([\"mwak\", \"rwak\"].includes(args[0].item.data.actionType)) {\n let pcActor = token.actor;\n\n // Test Class\n let pcBarbarian = pcActor.getRollData().classes?.barbarian;\n if (pcBarbarian === null) {\n ui.notifications.error(\"You are not a Barbarian!\");\n return;\n }\n\n // Test Subclass\n let pcBarbarianSubclass = pcActor.getRollData().classes.barbarian?.subclass.identifier;\n if (pcBarbarianSubclass != \"path-of-the-zealot\") {\n ui.notifications.error(\"You are not a Barbarian Zealot!\");\n return;\n }\n\n // Test if rage is active\n let effect = await findEffect(token, \"Rage\");\n if (!effect) {\n ui.notifications.error(\"You are not Raging!\");\n return;\n }\n\n // Check to see if you have already made a divine fury attack this round\n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn / 100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"divineFuryTime\");\n if (combatTime === lastTime) return {}; // already used divine fury this round\n }\n\n // check to see if autoDivineFury is active, if it is skip the prompt\n let useDivineFury = getProperty(actor.data, \"flags.dae.autoDivineFury\");\n if (!useDivineFury) {\n console.log(\"MACRO | prompt user with dialog to use Divine Fury\");\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Conditional Damage\",\n content: `

Use Divine Fury?

`,\n buttons: {\n one: {\n icon: '',\n label: \"Confirm\",\n callback: () => resolve(true)\n },\n two: {\n icon: '',\n label: \"Cancel\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n useDivineFury = await dialog;\n }\n if (!useDivineFury) return {}; // do not use divine fury\n\n // the player wants to use divine fury or autoDivineFury is active\n const diceMult = args[0].isCritical ? 2 : 1;\n const baseDice = 1;\n const baseBonus = Math.ceil(pcBarbarian.levels / 2);\n\n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn / 100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"divineFuryTime\");\n if (combatTime !== lastTime) {\n await actor.setFlag(\"midi-qol\", \"divineFuryTime\", combatTime)\n }\n }\n return { damageRoll: `${baseDice * diceMult}d6 + ${baseBonus}`, flavor: \"Divine Fury\" };\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Divine Fury","type":"script","scope":"global","command":"/*****\nDivine Fury | Auto Divine Fury [there are two items to make this function]\n\nNOTE: I used Tom Posney's MIDI-QOL Sneak Attack / Auto Sneak Attack as a templete for this\n\nUSEAGE : PASSIVE\nPlease place these two items on a Barbarian Zealot the rest is automated\n \nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif ([\"mwak\", \"rwak\"].includes(args[0].item.system.actionType)) {\n let pcActor = token.actor;\n\n // Test Class\n let pcBarbarian = pcActor.getRollData().classes?.barbarian;\n if (pcBarbarian === null) {\n ui.notifications.error(\"You are not a Barbarian!\");\n return;\n }\n\n // Test Subclass\n let pcBarbarianSubclass = pcActor.getRollData().classes.barbarian?.subclass.identifier;\n if (pcBarbarianSubclass != \"path-of-the-zealot\") {\n ui.notifications.error(\"You are not a Barbarian Zealot!\");\n return;\n }\n\n // Test if rage is active\n let effect = await findEffect(pcActor, \"Rage\");\n if (!effect) {\n ui.notifications.error(\"You are not Raging!\");\n return;\n }\n\n // Check to see if you have already made a divine fury attack this round\n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn / 100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"divineFuryTime\");\n if (combatTime === lastTime) return {}; // already used divine fury this round\n }\n\n // check to see if autoDivineFury is active, if it is skip the prompt\n let useDivineFury = getProperty(actor.system, \"flags.dae.autoDivineFury\");\n if (!useDivineFury) {\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Conditional Damage\",\n content: `

Use Divine Fury?

`,\n buttons: {\n one: {\n icon: '',\n label: \"Confirm\",\n callback: () => resolve(true)\n },\n two: {\n icon: '',\n label: \"Cancel\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n useDivineFury = await dialog;\n }\n if (!useDivineFury) return {}; // do not use divine fury\n\n // the player wants to use divine fury or autoDivineFury is active\n const diceMult = args[0].isCritical ? 2 : 1;\n const baseDice = 1;\n const baseBonus = Math.ceil(pcBarbarian.levels / 2);\n\n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn / 100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"divineFuryTime\");\n if (combatTime !== lastTime) {\n await actor.setFlag(\"midi-qol\", \"divineFuryTime\", combatTime)\n }\n }\n return { damageRoll: `${baseDice * diceMult}d6 + ${baseBonus}`, flavor: \"Divine Fury\" };\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.5PUe0GiheEHUomoR"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"},"cf":{"id":"temp_92357bvnxs9","path":"DDB Override#/CF_SEP/Class Features","color":"#000000"},"midi-qol":{"onUseMacroName":""},"midiProperties":{},"ddbimporter":{"pack":"world.ddb-override","id":"1479249","entityTypeId":"222216831","action":true,"componentId":241,"componentTypeId":258900837,"class":"Barbarian","subclass":"Path of the Zealot","importId":"lbsrtmgv1xbfzi20","originalItemName":"Divine Fury","replaced":true}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"XGtE p11","activation":{"type":"special","cost":0,"condition":""},"duration":{"value":24,"units":"hour"},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Barbarian Zealot Path","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286527,"modifiedTime":1672520405496,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"iyI2HzN7mKnkyH9A"} +{"name":"Misty Escape","type":"feat","img":"icons/magic/control/debuff-energy-snare-brown.webp","effects":[],"flags":{"scene-packer":{"hash":"66d4806b55ff4917b0a9081265e991ce1448e646","sourceId":"Item.6bzoAplR7UQKKMIF"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Misty Escape","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nMisty Escape\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MIDI-SRD\" SPELL: MISTY STEP\nBy Author: Kandashi https://github.com/kandashi/Dynamic-Effects-SRD\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git\n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n let pcToken = token;\n let pcActor = token.actor.data.data;\n const target = canvas.tokens.get(pcToken.tokenId) || token;\n\n let range = canvas.scene.createEmbeddedDocuments(\"MeasuredTemplate\", [{\n t: \"circle\",\n user: game.user.id,\n x: target.x + canvas.grid.size / 2,\n y: target.y + canvas.grid.size / 2,\n direction: 0,\n distance: 60,\n borderColor: \"#FF0000\",\n flags: { DAESRD: { MistyEscape: { ActorId: pcActor.id } } }\n }]);\n\n range.then(result => {\n let templateData = {\n t: \"rect\",\n user: game.user.id,\n distance: 7.5,\n direction: 45,\n x: 0,\n y: 0,\n fillColor: game.user.color,\n flags: { DAESRD: { MistyEscape: { ActorId: pcActor.id } } }\n };\n\n Hooks.once(\"createMeasuredTemplate\", deleteTemplatesAndMove);\n let doc = new CONFIG.MeasuredTemplate.documentClass(templateData, { parent: canvas.scene });\n let template = new game.dnd5e.canvas.AbilityTemplate(doc);\n template.actorSheet = pcActor.sheet;\n template.drawPreview();\n\n // make character invisible with custom effect\n applyTempInvisibilityEffect(actor, actor);\n\n async function deleteTemplatesAndMove(template) {\n let removeTemplates = canvas.templates.placeables.filter(i => i.data.flags.DAESRD?.MistyEscape?.ActorId === pcActor.id);\n let templateArray = removeTemplates.map(function (w) { return w.id });\n await target.data.document.update(canvas.grid.getSnappedPosition(template.data.x, template.data.y));\n if (removeTemplates) await canvas.scene.deleteEmbeddedDocuments(\"MeasuredTemplate\", templateArray);\n };\n });\n} return;\n\n// Mark the character invisible until the start of thier next turn \n// or when the character attacks or casts a spell\nasync function applyTempInvisibilityEffect(target, actor) {\n let effectData = {\n label: \"Invisible\",\n icon: \"modules/dfreds-convenient-effects/images/invisible.svg\",\n origin: actor.uuid,\n changes: [\n { \"key\": \"flags.midi-qol.advantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 },\n { \"key\": \"flags.midi-qol.grants.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }\n ],\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnStartSource\", \"1Attack\"] },\n core: { statusId: \"Convenient Effect: Invisible\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Misty Escape","type":"script","scope":"global","command":"/*****\nMisty Escape\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MIDI-SRD\" SPELL: MISTY STEP\nBy Author: Kandashi https://github.com/kandashi/Dynamic-Effects-SRD\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git\n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n let pcToken = token;\n let pcActor = token.actor;\n const target = canvas.tokens.get(pcToken.tokenId) || token;\n\n let range = canvas.scene.createEmbeddedDocuments(\"MeasuredTemplate\", [{\n t: \"circle\",\n user: game.user.id,\n x: target.x + canvas.grid.size / 2,\n y: target.y + canvas.grid.size / 2,\n direction: 0,\n distance: 60,\n borderColor: \"#FF0000\",\n flags: { DAESRD: { MistyEscape: { ActorId: pcActor.id } } }\n }]);\n\n range.then(result => {\n let templateData = {\n t: \"rect\",\n user: game.user.id,\n distance: 7.5,\n direction: 45,\n x: 0,\n y: 0,\n fillColor: game.user.color,\n flags: { DAESRD: { MistyEscape: { ActorId: pcActor.id } } }\n };\n\n Hooks.once(\"createMeasuredTemplate\", deleteTemplatesAndMove);\n let doc = new CONFIG.MeasuredTemplate.documentClass(templateData, { parent: canvas.scene });\n let template = new game.dnd5e.canvas.AbilityTemplate(doc);\n template.actorSheet = pcActor.sheet;\n template.drawPreview();\n\n // make character invisible with custom effect\n applyTempInvisibilityEffect(actor, actor);\n\n async function deleteTemplatesAndMove(template) {\n let removeTemplates = canvas.templates.placeables.filter(i => i.data.flags.DAESRD?.MistyEscape?.ActorId === pcActor.id);\n let templateArray = removeTemplates.map(function (w) { return w.id });\n await target.document.update(canvas.grid.getSnappedPosition(template.x, template.y));\n if (removeTemplates) await canvas.scene.deleteEmbeddedDocuments(\"MeasuredTemplate\", templateArray);\n };\n });\n} return;\n\n// Mark the character invisible until the start of thier next turn \n// or when the character attacks or casts a spell\nasync function applyTempInvisibilityEffect(target, actor) {\n let effectData = {\n label: \"Invisible\",\n icon: \"modules/dfreds-convenient-effects/images/invisible.svg\",\n origin: actor.uuid,\n changes: [\n { \"key\": \"flags.midi-qol.advantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 },\n { \"key\": \"flags.midi-qol.grants.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }\n ],\n disabled: false,\n flags: {\n dae: { specialDuration: [\"turnStartSource\", \"1Attack\"] },\n core: { statusId: \"Convenient Effect: Invisible\" }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[preItemRoll]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"core":{"sourceId":"Item.snMxepltm5UWo5KL"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p109","activation":{"type":"reactiondamage","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"util","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Warlock: The Archfey","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286472,"modifiedTime":1672520405515,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"p4p0AThBpD4uz91r"} +{"name":"Eyes of Night","type":"feat","img":"icons/magic/perception/silhouette-stealth-shadow.webp","effects":[{"_id":"WysKNsnpbFv2ZWLB","changes":[{"key":"ATL.dimSight","mode":2,"value":"300","priority":40}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/silhouette-stealth-shadow.webp","label":"Eyes of Night","origin":"Item.BsbEEhiIUMijPdYz","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2409717","entityTypeId":"222216831","componentId":2996540,"componentTypeId":12168134,"class":"Cleric","subclass":"Twilight Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"iyl0evwnfwrvm9lh"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"scene-packer":{"hash":"dcbcee67ee14416b8043fd48655d2602489a08ee","sourceId":"Item.yF7Bf89F7XCG81Y6"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Eyes of Night","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.BsbEEhiIUMijPdYz"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p34","activation":{"type":"none","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric Twilight Domain","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286508,"modifiedTime":1672520405498,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"rTAopcvChl05WP8A"} +{"name":"Shadow Step","type":"feat","img":"icons/magic/control/debuff-energy-snare-brown.webp","effects":[{"_id":"Maol11OcLygv28wa","changes":[{"key":"flags.midi-qol.advantage.attack.all","mode":0,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/magic/control/debuff-energy-snare-brown.webp","label":"Shadow Step","origin":"Item.B2VMCdTeSXIiKeZJ","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"d9f35b90a13ccf88fffd4aa049e884c18e43d19b","sourceId":"Item.wwXUiJRyeuN0k72W"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Shadow Step","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nShadow Step\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MIDI-SRD\" SPELL: MISTY STEP\nBy Author: Kandashi https://github.com/kandashi/Dynamic-Effects-SRD\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git\n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n let pcToken = token;\n let pcActor = token.actor.data.data;\n const target = canvas.tokens.get(pcToken.tokenId) || token;\n\n let range = canvas.scene.createEmbeddedDocuments(\"MeasuredTemplate\", [{\n t: \"circle\",\n user: game.user.id,\n x: target.x + canvas.grid.size / 2,\n y: target.y + canvas.grid.size / 2,\n direction: 0,\n distance: 60,\n borderColor: \"#FF0000\",\n flags: { DAESRD: { ShadowStep: { ActorId: pcActor.id } } }\n }]);\n\n range.then(result => {\n let templateData = {\n t: \"rect\",\n user: game.user.id,\n distance: 7.5,\n direction: 45,\n x: 0,\n y: 0,\n fillColor: game.user.color,\n flags: { DAESRD: { ShadowStep: { ActorId: pcActor.id } } }\n };\n\n Hooks.once(\"createMeasuredTemplate\", deleteTemplatesAndMove);\n let doc = new CONFIG.MeasuredTemplate.documentClass(templateData, { parent: canvas.scene });\n let template = new game.dnd5e.canvas.AbilityTemplate(doc);\n template.actorSheet = pcActor.sheet;\n template.drawPreview();\n\n async function deleteTemplatesAndMove(template) {\n let removeTemplates = canvas.templates.placeables.filter(i => i.data.flags.DAESRD?.MistyEscape?.ActorId === pcActor.id);\n let templateArray = removeTemplates.map(function (w) { return w.id });\n await target.data.document.update(canvas.grid.getSnappedPosition(template.data.x, template.data.y));\n if (removeTemplates) await canvas.scene.deleteEmbeddedDocuments(\"MeasuredTemplate\", templateArray);\n };\n });\n} return;","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Shadow Step","type":"script","scope":"global","command":"/*****\nShadow Step\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MIDI-SRD\" SPELL: MISTY STEP\nBy Author: Kandashi https://github.com/kandashi/Dynamic-Effects-SRD\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git\n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n let pcToken = token;\n let pcActor = token.actor;\n const target = canvas.tokens.get(pcToken.tokenId) || token;\n\n let range = canvas.scene.createEmbeddedDocuments(\"MeasuredTemplate\", [{\n t: \"circle\",\n user: game.user.id,\n x: target.x + canvas.grid.size / 2,\n y: target.y + canvas.grid.size / 2,\n direction: 0,\n distance: 60,\n borderColor: \"#FF0000\",\n flags: { DAESRD: { ShadowStep: { ActorId: pcActor.id } } }\n }]);\n\n range.then(result => {\n let templateData = {\n t: \"rect\",\n user: game.user.id,\n distance: 7.5,\n direction: 45,\n x: 0,\n y: 0,\n fillColor: game.user.color,\n flags: { DAESRD: { ShadowStep: { ActorId: pcActor.id } } }\n };\n\n Hooks.once(\"createMeasuredTemplate\", deleteTemplatesAndMove);\n let doc = new CONFIG.MeasuredTemplate.documentClass(templateData, { parent: canvas.scene });\n let template = new game.dnd5e.canvas.AbilityTemplate(doc);\n template.actorSheet = pcActor.sheet;\n template.drawPreview();\n\n async function deleteTemplatesAndMove(template) {\n let removeTemplates = canvas.templates.placeables.filter(i => i.data.flags.DAESRD?.ShadowStep?.ActorId === pcActor.id);\n let templateArray = removeTemplates.map(function (w) { return w.id });\n await target.document.update(canvas.grid.getSnappedPosition(template.x, template.y));\n if (removeTemplates) await canvas.scene.deleteEmbeddedDocuments(\"MeasuredTemplate\", templateArray);\n };\n });\n} return;","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[preItemRoll]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"core":{"sourceId":"Item.snMxepltm5UWo5KL"},"favtab":{"isFavorite":true},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p80","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"util","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Monk: Way of the Shadow","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286501,"modifiedTime":1672520405523,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"rWaRPGHvjSO2lwcY"} +{"name":"Wrath of the Storm","type":"feat","img":"icons/magic/lightning/bolts-forked-large-orange.webp","effects":[],"flags":{"ddbimporter":{"id":"1018","entityTypeId":"222216831","componentId":149,"componentTypeId":12168134,"class":"Cleric","subclass":"Tempest Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1}]},"importId":"sqffc9kk1ucpsf5y","ignoreIcon":false,"ignoreItemImport":false,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Cleric"}},"link-item-resource-5e":{"resource-link":""},"scene-packer":{"hash":"e19de5a7b814295b6fabb29bc60fa949fb4df36b","sourceId":"Item.Etup7yiq6E7lMV3e"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":true,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.Fvl2VJyfemTViUHw"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p62","activation":{"type":"reaction","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"enemy"},"range":{"value":5,"long":null,"units":"ft"},"uses":{"value":2,"max":"2","per":"lr","recovery":""},"consume":{"type":"charges","target":"","amount":1},"ability":"","actionType":"save","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["2d8[lightning]","lightning"]],"versatile":""},"formula":"","save":{"ability":"dex","dc":null,"scaling":"spell"},"requirements":"Cleric: Tempest","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286454,"modifiedTime":1672520405539,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"uZyygDpEsqYgZBi2"} +{"name":"Inspiring Smite","type":"feat","img":"icons/magic/life/heart-cross-blue.webp","effects":[],"flags":{"_sheetTab":"description","entityorder":{"order":161},"dynamiceffects":{"effects":[],"alwaysActive":false,"equipActive":false},"favtab":{"isFavourite":true,"isFavorite":true},"midi-qol":{"effectActivation":false,"onUseMacroName":"[preItemRoll]ItemMacro"},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Inspiring Smite","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nInspiring Smite\n\nUSE: Must Manually triggered after channel divinity: Inspiring Smite to distribute healing pool\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MidiQOL Sample Items\" SPELL: LAY ON HANDS\nBy Author: Tim Poseney https://gitlab.com/tposney/midi-qol\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n // get healthpool if not available send a notification\n let healingPool = actor.getFlag(\"dae\", \"healingpool\");\n if ((!healingPool) || (!healingPool > 0)) {\n ui.notifications.warn(\"You either have no healing pool left or you have not used Channel Divinity: Inspiring Smite...\");\n return false;\n }\n\n // check to make sure there is a target to heal and only one is selected\n let theTarget = args[0].targets[0];\n if ((!theTarget) || (args[0].targets.length > 1)) {\n ui.notifications.warn(\"Please select a target to heal with Inspiring Smite\");\n return false;\n }\n\n // does not work on undead/constructs - not sure if this is RAW but makes sense given Inspiring Smite \n let invalid = [\"undead\", \"construct\"].some(type => (theTarget?.actor.data.data.details.type?.value || \"\").toLowerCase().includes(type));\n if (invalid) {\n ui.notifications.warn(\"Inspiring Smite can't affect undead/constructs\")\n return false;\n }\n\n let targetToken = await fromUuid(args[0].targetUuids[0]);\n let targetActor = targetToken.actor;\n let targetDamage = targetActor.data.data.attributes.hp.max - targetActor.data.data.attributes.hp.value;\n\n // prompt for how much to use...\n let d = new Promise((resolve, reject) => {\n let theDialog = new Dialog({\n title: \"Inspiring Smite\",\n content: `

Your targets current damage level: ${targetDamage}

\n

How many points to use? ${healingPool} left in your Healing Pool

`,\n buttons: {\n heal: {\n icon: '

',\n label: \"

HEAL

\",\n callback: (html) => { resolve(Math.clamped(Math.floor(Number(html.find('#mqlohpoints')[0].value)), 0, healingPool)); }\n },\n abort: {\n icon: '

',\n label: \"

CANCEL

\",\n callback: () => { resolve(false) }\n },\n },\n default: \"abort\",\n }).render(true);\n });\n const consumed = await d;\n if (!consumed) return false;\n\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = workflow.item;\n let updates;\n if (consumed > 0) {\n updates = {\n \"data.consume.amount\": Math.abs(consumed),\n \"data.damage.parts\": [[`${Math.max(0, consumed)}`, \"healing\"]],\n \"data.chatFlavor\": \"Inspiring Smite\"\n };\n }\n\n // remove consumed from pool\n healingPool = healingPool - consumed;\n actor.setFlag(\"dae\", \"healingpool\", healingPool);\n\n return theItem.update(updates);\n}\nreturn true;","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Inspiring Smite","type":"script","scope":"global","command":"/*****\nInspiring Smite\n\nUSE: Must Manually triggered after channel divinity: Inspiring Smite to distribute healing pool\n\nNOTE: PARTS OF THIS AUTOMATION WERE TAKEN FROM \"MidiQOL Sample Items\" SPELL: LAY ON HANDS\nBy Author: Tim Poseney https://gitlab.com/tposney/midi-qol\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preItemRoll\") {\n // get healthpool if not available send a notification\n let healingPool = actor.getFlag(\"dae\", \"healingpool\");\n if ((!healingPool) || (!healingPool > 0)) {\n ui.notifications.warn(\"You either have no healing pool left or you have not used Channel Divinity: Inspiring Smite...\");\n return false;\n }\n\n // check to make sure there is a target to heal and only one is selected\n let theTarget = args[0].targets[0];\n if ((!theTarget) || (args[0].targets.length > 1)) {\n ui.notifications.warn(\"Please select a target to heal with Inspiring Smite\");\n return false;\n }\n\n // does not work on undead/constructs - not sure if this is RAW but makes sense given Inspiring Smite \n let invalid = [\"undead\", \"construct\"].some(type => (theTarget?.actor.system.details.type?.value || \"\").toLowerCase().includes(type));\n if (invalid) {\n ui.notifications.warn(\"Inspiring Smite can't affect undead/constructs\")\n return false;\n }\n\n let targetToken = await fromUuid(args[0].targetUuids[0]);\n let targetActor = targetToken.actor;\n let targetDamage = targetActor.system.attributes.hp.max - targetActor.system.attributes.hp.value;\n\n // prompt for how much to use...\n let d = new Promise((resolve, reject) => {\n let theDialog = new Dialog({\n title: \"Inspiring Smite\",\n content: `

Your targets current damage level: ${targetDamage}

\n

How many points to use? ${healingPool} left in your Healing Pool

`,\n buttons: {\n heal: {\n icon: '

',\n label: \"

HEAL

\",\n callback: (html) => { resolve(Math.clamped(Math.floor(Number(html.find('#mqlohpoints')[0].value)), 0, healingPool)); }\n },\n abort: {\n icon: '

',\n label: \"

CANCEL

\",\n callback: () => { resolve(false) }\n },\n },\n default: \"abort\",\n }).render(true);\n });\n let consumed = await d;\n if (!consumed) return false; \n if (consumed > targetDamage) consumed = targetDamage;\n\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = workflow.item;\n let updates;\n if (consumed > 0) {\n updates = {\n \"data.consume.amount\": Math.abs(consumed),\n \"data.damage.parts\": [[`${Math.max(0, consumed)}`, \"healing\"]],\n \"data.chatFlavor\": \"Inspiring Smite\"\n };\n }\n\n // remove consumed from pool\n healingPool = healingPool - consumed;\n actor.setFlag(\"dae\", \"healingpool\", healingPool);\n\n return theItem.update(updates);\n}\nreturn true;","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.IM2UCUasJLD5J7Fw"},"scene-packer":{"sourceId":"Item.Muchtk2t9BrhSGfu","hash":"7e932200872c166a21be54cac4f3e3d9a7c5a827"},"cf":{"id":"temp_ovon30cu8t"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

Immediately after you deal damage to a creature with your Divine Smite feature, you can use your Channel Divinity as a bonus action and distribute temporary hit points to creatures of your choice within 30 feet of you, which can include you. The total number of temporary hit points equals 2d8 + your level in this class, divided among the chosen creatures however you like.

\n

 

\n
\nSETUP:\n

Please remember to use Channel Divinity: Inspiring Smite first, after you deal smite damage.

\n

 

\n
\n

 

\n
\nVERSION INFO\n

v0.1 April 13 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"MOoT p.29","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":"","type":"lr"},"consume":{"type":"","target":"","amount":10},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"Inspiring Smite","critical":{"threshold":null,"damage":null},"damage":{"parts":[["10","healing"]],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell","value":""},"requirements":"Paladin: Oath of Glory","recharge":{"value":null,"charged":false},"featType":{"value":"","_deprecated":true},"time":{"value":"","_deprecated":true},"damageType":{"value":"","_deprecated":true},"attributes":{"spelldc":10},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286512,"modifiedTime":1672520405512,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"wpSpoKviHSrdFze2"} +{"name":"Channel Divinity: Turn Undead","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[{"_id":"3adv1867dmy3nrmn","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.\"Channel Divinity: Turn Undead\",all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":60,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/death/skull-humanoid-white-blue.webp","label":"Channel Divinity: Turn Undead","origin":"Actor.4okcHmPmM1iBwyFs.Item.0Gd8ADfg2sOZyTyq","transfer":false,"flags":{"core":{"statusId":"true"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"e24ece7a55f9de689e13bfec46912775238c34b3","sourceId":"Item.mfOrCKB6p1puoaUP"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"midi-qol":{"effectActivation":false,"forceCEOff":false,"onUseMacroName":"[all]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"core":{"sourceId":"Item.r5SIR5IwtjxLYHvO"},"itemacro":{"macro":{"data":{"_id":null,"name":"Channel Divinity: Turn Undead","type":"script","author":"KBnld8ZLhMcDSTkg","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nCleric: Turn Undead\n\nUSEAGE : ACTIVATE TO CHANNEL DIVINITY : TURN UNDEAD\nClick on this item to activate the turn undead. \nPlease remember to setup usage consumption in the itme itself. \n\nThis Macro requires a GAME LEVEL MACRO: MAKE DEAD \n\nv1.4 August 13 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n// if (!game.modules.get(\"warpgate\")?.active) return ui.notifications.error(\"Turn Undead requires warpgate module\");\n\nif (args[0].macroPass === \"preambleComplete\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n // I am stealing the activation condition as a string for the creature type I want to hit\n const activationCondition = args[0].itemData.data.activation.condition.toLowerCase();\n let immunity = [\"Turn Immunity\"];\n for (let target of workflow.targets) {\n let creatureType = target.actor.data.data.details.type;\n // remove targets that are not creatures (aka PCs etc)\n if ((creatureType === null) || (creatureType === undefined)) {\n workflow.targets.delete(target);\n }\n // remove creatures that are not undead \n else if (!([creatureType.value.toLowerCase(), creatureType.subtype.toLowerCase()].includes(activationCondition.toLowerCase()))) {\n workflow.targets.delete(target);\n }\n // remove creatures with turn immunity\n else if (target.actor.items.find(i => immunity.includes(i.name))) {\n workflow.targets.delete(target);\n }\n\n // check for i, if so give advanatage on tragets next save\n let resistance = [\"Turn Resistance\"];\n if (target.actor.items.find(i => resistance.includes(i.name))) {\n // add resistance to next save \n await markTurnResistance(target.actor, args);\n }\n\n game.user.updateTokenTargets(Array.from(workflow.targets).map(t => t.id));\n }\n} else if (args[0].macroPass === \"postSave\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const pcActor = workflow.actor;\n\n let crDestroy = 0.0;\n if (workflow.targets.size === 0) return;\n let actorClass = pcActor.classes.cleric.data.data.levels;\n if (actorClass > 16) crDestroy = 4;\n else if (actorClass > 13) crDestroy = 3;\n else if (actorClass > 10) crDestroy = 2;\n else if (actorClass > 7) crDestroy = 1;\n else if (actorClass > 4) crDestroy = 0.5;\n\n // set HP = 0 for all targets of the CR or less that have been turned\n for (let target of workflow.failedSaves) {\n if (target.actor.data.data.details.cr < crDestroy) {\n //let target = failedSave.actor;\n let maxHP = Number(target.actor.data.data.attributes.hp.max);\n let updates = {\n actor: { \"data.attributes.hp.value\": 0, \"data.attributes.hp.max\": maxHP }\n };\n let mutateCallbacks = \"\";\n await warpgate.mutate(target.document, updates, mutateCallbacks, { permanent: true });\n } else {\n // set frightened for all those undead above the CR that were not destoryed\n console.log(\"MACRO TEST | target actor: %O\", target.actor);\n console.log(\"MACRO TEST | add frightened: %O\", target);\n let thisActor = target.uuid;\n game.dfreds.effectInterface.addEffect({ effectName: 'Frightened', thisActor });\n }\n }\n return;\n}\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTurnResistance(target, args) {\n const effectData = {\n label: \"Turn Resistance\",\n icon: \"systems/dnd5e/icons/skills/affliction_21.jpg\",\n origin: args.uuid,\n changes: [{\n \"key\": \"flags.midi-qol.advantage.ability.check.wis\",\n \"value\": 1,\n \"mode\": 0,\n \"priority\": 20\n }],\n disabled: false,\n flags: {\n dae: {\n specialDuration: [\"isSave\"]\n }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Channel Divinity: Turn Undead","type":"script","scope":"global","command":"/*****\nCleric: Turn Undead\n\nUSEAGE : ACTIVATE TO CHANNEL DIVINITY : TURN UNDEAD\nClick on this item to activate the turn undead. \nPlease remember to setup usage consumption in the itme itself. \n\nThis Macro requires a GAME LEVEL MACRO: MAKE DEAD \n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n// if (!game.modules.get(\"warpgate\")?.active) return ui.notifications.error(\"Turn Undead requires warpgate module\");\n\nif (args[0].macroPass === \"preambleComplete\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n // I am stealing the activation condition as a string for the creature type I want to hit\n const activationCondition = args[0].itemData.system.activation.condition.toLowerCase();\n let immunity = [\"Turn Immunity\"];\n for (let target of workflow.targets) {\n let creatureType = target.actor.system.details.type;\n // remove targets that are not creatures (aka PCs etc)\n if ((creatureType === null) || (creatureType === undefined)) {\n workflow.targets.delete(target);\n }\n // remove creatures that are not undead \n else if (!([creatureType.value.toLowerCase(), creatureType.subtype.toLowerCase()].includes(activationCondition.toLowerCase()))) {\n workflow.targets.delete(target);\n }\n // remove creatures with turn immunity\n else if (target.actor.items.find(i => immunity.includes(i.name))) {\n workflow.targets.delete(target);\n }\n\n // check for i, if so give advanatage on tragets next save\n let resistance = [\"Turn Resistance\"];\n if (target.actor.items.find(i => resistance.includes(i.name))) {\n // add resistance to next save \n await markTurnResistance(target.actor, args);\n }\n\n game.user.updateTokenTargets(Array.from(workflow.targets).map(t => t.id));\n }\n} else if (args[0].macroPass === \"postSave\") {\n let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const pcActor = workflow.actor;\n\n let crDestroy = 0.0;\n if (workflow.targets.size === 0) return;\n let actorClass = pcActor.classes.cleric.system.levels;\n if (actorClass > 16) crDestroy = 4;\n else if (actorClass > 13) crDestroy = 3;\n else if (actorClass > 10) crDestroy = 2;\n else if (actorClass > 7) crDestroy = 1;\n else if (actorClass > 4) crDestroy = 0.5;\n\n // set HP = 0 for all targets of the CR or less that have been turned\n for (let target of workflow.failedSaves) {\n if (target.actor.system.details.cr < crDestroy) {\n //let target = failedSave.actor;\n let maxHP = Number(target.actor.system.attributes.hp.max);\n let updates = {\n actor: { \"data.attributes.hp.value\": 0, \"data.attributes.hp.max\": maxHP }\n };\n let mutateCallbacks = \"\";\n await warpgate.mutate(target.document, updates, mutateCallbacks, { permanent: true });\n }\n }\n return;\n}\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTurnResistance(target, args) {\n const effectData = {\n label: \"Turn Resistance\",\n icon: \"systems/dnd5e/icons/skills/affliction_21.jpg\",\n origin: args.uuid,\n changes: [{\n \"key\": \"flags.midi-qol.advantage.ability.check.wis\",\n \"value\": 1,\n \"mode\": 0,\n \"priority\": 20\n }],\n disabled: false,\n flags: {\n dae: {\n specialDuration: [\"isSave\"]\n }\n }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"},"cf":{"id":"temp_92357bvnxs9","path":"Class Features","color":"#0000ff"},"favtab":{"isFavorite":true},"ddbimporter":{"pack":"world.ddb-override","id":"74143","entityTypeId":"222216831","componentId":110,"componentTypeId":12168134,"class":"Cleric","subclass":"Grave Domain","dndbeyond":{"levelScale":null,"levelScales":[],"limitedUse":[{"level":null,"uses":1},{"level":null,"uses":1}]},"importId":"h0fgg2cviptcizbi","originalItemName":"Channel Divinity: Turn Undead","replaced":true},"siftoolkit":{"SIFData":{"ignoreDuration":false,"texture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true,"playTemplateAudio":false,"playDamageAudio":false,"playSaveAudio":false,"clip":"","volume":100}}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.4 August 13 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p194","activation":{"type":"action","cost":1,"condition":"undead"},"duration":{"value":null,"units":"inst"},"target":{"value":30,"width":null,"units":"ft","type":"creature"},"range":{"value":null,"long":null,"units":"spec"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"charges","target":"","amount":null},"ability":"","actionType":"other","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286536,"modifiedTime":1672520405488,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"xXCRW4TdshCAzuK7"} +{"name":"Vigilant Blessing","type":"feat","img":"icons/magic/symbols/cog-shield-white-blue.webp","effects":[{"_id":"7BtDouaCOCQRMIQi","changes":[{"key":"flags.dnd5e.initiativeAdv","mode":0,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/symbols/cog-shield-white-blue.webp","label":"Vigilant Blessing","origin":"Item.ece8DHmOzO5m70tX","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["turnStartSource"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":2996547,"data":{"id":2996547,"name":"Vigilant Blessing","prerequisite":null,"description":"

1st-level Twilight Domain feature

\r\n

The night has taught you to be vigilant. As an action, you give one creature you touch (including possibly yourself) advantage on the next initiative roll the creature makes. This benefit ends immediately after the roll or if you use this feature again.

","requiredLevel":1,"displayOrder":4},"version":"2.9.8","featureId":2996547,"requiredLevel":1,"prerequisite":null,"class":"Twilight Domain","classId":654582,"subClass":"Twilight Domain"},"obsidian":{"source":{"type":"class","text":"Twilight Domain"}},"core":{"sourceId":"Compendium.world.ddb-class-features.M3GMQIicjInJPUhD"},"scene-packer":{"hash":"55172097a33954b707cd5db541518a00e802bc1c","sourceId":"Item.jAOZNxhJJJpFuNi5"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p34","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Cleric: Twilight Domain","recharge":{"value":null,"charged":false}},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286481,"modifiedTime":1672520405537,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"xh9XPkli6xQ9dgQ3"} +{"name":"Channel Divinity: Peerless Athlete","type":"feat","img":"icons/magic/holy/barrier-shield-winged-blue.webp","effects":[{"_id":"Xkk83MdPGWwWb2yX","changes":[{"key":"flags.midi-qol.advantage.skill.acr","mode":5,"value":"1","priority":20},{"key":"flags.midi-qol.advantage.skill.ath","mode":5,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":600,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/creatures/abilities/lion-roar-yellow.webp","label":"Peerless Athlete","origin":"Item.xJ3uiHOSl6ZDElTz","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":216,"data":{"id":216,"name":"Remarkable Athlete","prerequisite":null,"description":"

Starting at 7th level, you can add half your proficiency bonus (round up) to any Strength, Dexterity, or Constitution check you make that doesn’t already use your proficiency bonus.

\r\n

In addition, when you make a running long jump, the distance you can cover increases by a number of feet equal to your Strength modifier.

","requiredLevel":7,"displayOrder":2},"version":"2.9.8","featureId":216,"requiredLevel":7,"prerequisite":null,"class":"Champion","classId":16,"subClass":"Champion"},"obsidian":{"source":{"type":"class","text":"Champion"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Compendium.world.ddb-class-features.7rTzj1cBRBDKOb7R"},"scene-packer":{"hash":"ed3772e3ed6923fd09a0d49dccee30998fc1f949","sourceId":"Item.2zjof0xegnFaVAi9"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"MOoT p.29","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Paladin Oath of Glory","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193286525,"modifiedTime":1672520405477,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"y8JMBBFJCeHomDKZ"} diff --git a/module/packs/MASIF-feats.db b/module/packs/MASIF-feats.db index 8881b4a..bdaa2bb 100644 --- a/module/packs/MASIF-feats.db +++ b/module/packs/MASIF-feats.db @@ -1,9 +1,9 @@ -{"name":"Elemental Adept (Acid)","type":"feat","img":"icons/magic/acid/projectile-faceted-glob.webp","effects":[{"_id":"HlLfTD8QAW6eXGd9","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Elemental Adept (Acid),all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/acid/projectile-faceted-glob.webp","label":"Elemental Adept (Acid)","origin":"Item.W1CFtJ3Hs6z20Gw9","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"featId":53,"version":"2.9.8","prerequisites":[{"description":"The ability to cast at least one spell","prerequisiteMappings":[{"id":38,"entityId":null,"entityTypeId":null,"type":"custom-value","subType":"the-ability-to-cast-at-least-one-spell","value":null,"friendlyTypeName":"Custom Value","friendlySubTypeName":"The ability to cast at least one spell"}]}]},"obsidian":{"source":{"type":"feat"}},"core":{"sourceId":"Compendium.world.ddb-feats.aYmO2viJd9HdlSvF"},"scene-packer":{"hash":"fd141449107e8bce261f211627237862dd83c25c","sourceId":"Item.WE5aY0VXrvHTMatC"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Elemental Adept (Acid)","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.data.actionType)) return;\nconst damageType = \"acid\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.data.data;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.data.data.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.data.data.damage.parts.length; i++) theItem.data.data.damage.parts[i] = backupItem.data.data.damage.parts[i];\n theItem.data.data.scaling = backupItem.data.data.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Elemental Adept (Acid)","type":"script","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv2.0 December 18 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.system.actionType)) return;\n//CHANGE DAMAGE TYPE \"acid\", \"fire\", \"cold\", \"lightning\", \"thunder\"\nconst damageType = \"acid\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.system;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.system.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.system.damage.parts.length; i++) theItem.system.damage.parts[i] = backupItem.system.damage.parts[i];\n theItem.system.scaling = backupItem.system.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"Player's Handbook","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"The ability to cast at least one spell","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294447,"modifiedTime":1671805187260,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"j4NYYVUcrWXQdEcY"} -{"name":"Elemental Adept (Cold)","type":"feat","img":"icons/magic/water/projectile-ice-chunk-blue.webp","effects":[{"_id":"JqR0VfQcqj7o2sC4","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Elemental Adept (Cold),all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/water/projectile-ice-chunk-blue.webp","label":"Elemental Adept (Cold)","origin":"Item.7Y7UQFlA6C65Hb7n","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"featId":54,"version":"2.9.8","prerequisites":[{"description":"The ability to cast at least one spell","prerequisiteMappings":[{"id":39,"entityId":null,"entityTypeId":null,"type":"custom-value","subType":"the-ability-to-cast-at-least-one-spell","value":null,"friendlyTypeName":"Custom Value","friendlySubTypeName":"The ability to cast at least one spell"}]}]},"obsidian":{"source":{"type":"feat"}},"core":{"sourceId":"Compendium.world.ddb-feats.spxwZqUg9ypdgEug"},"scene-packer":{"hash":"f12847df27fd8a6363c5490352cf8296e7a12dbc","sourceId":"Item.cNQkuN0Osk3zRvgB"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Elemental Adept (Cold)","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.data.actionType)) return;\nconst damageType = \"cold\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.data.data;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.data.data.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.data.data.damage.parts.length; i++) theItem.data.data.damage.parts[i] = backupItem.data.data.damage.parts[i];\n theItem.data.data.scaling = backupItem.data.data.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Elemental Adept (Cold)","type":"script","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv2.0 December 18 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.system.actionType)) return;\n//CHANGE DAMAGE TYPE \"acid\", \"fire\", \"cold\", \"lightning\", \"thunder\"\nconst damageType = \"cold\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.system;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.system.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.system.damage.parts.length; i++) theItem.system.damage.parts[i] = backupItem.system.damage.parts[i];\n theItem.system.scaling = backupItem.system.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"Player's Handbook","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"The ability to cast at least one spell","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294451,"modifiedTime":1671805187262,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"I7vfD1mHQl0e2tRX"} -{"name":"Elemental Adept (Fire)","type":"feat","img":"icons/magic/fire/projectile-embers-orange.webp","effects":[{"_id":"6pZRLDO4MLABT5r8","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Elemental Adept (Fire),all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/fire/projectile-embers-orange.webp","label":"Elemental Adept (Fire)","origin":"Item.c7fTdFwzwAGUSo2w","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"featId":55,"version":"2.9.8","prerequisites":[{"description":"The ability to cast at least one spell","prerequisiteMappings":[{"id":40,"entityId":null,"entityTypeId":null,"type":"custom-value","subType":"the-ability-to-cast-at-least-one-spell","value":null,"friendlyTypeName":"Custom Value","friendlySubTypeName":"The ability to cast at least one spell"}]}]},"obsidian":{"source":{"type":"feat"}},"core":{"sourceId":"Compendium.world.ddb-feats.p2Wr0BPOrQ1FxCfv"},"scene-packer":{"hash":"e162afc8438ae38bcd0a737e9cdac0bc80a4ef62","sourceId":"Item.WTwkanKPkj5fAMpT"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Elemental Adept (Fire)","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.data.actionType)) return;\nconst damageType = \"fire\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.data.data;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.data.data.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.data.data.damage.parts.length; i++) theItem.data.data.damage.parts[i] = backupItem.data.data.damage.parts[i];\n theItem.data.data.scaling = backupItem.data.data.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Elemental Adept (Fire)","type":"script","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv2.0 December 18 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.system.actionType)) return;\n//CHANGE DAMAGE TYPE \"acid\", \"fire\", \"cold\", \"lightning\", \"thunder\"\nconst damageType = \"fire\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.system;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.system.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.system.damage.parts.length; i++) theItem.system.damage.parts[i] = backupItem.system.damage.parts[i];\n theItem.system.scaling = backupItem.system.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"Player's Handbook","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"The ability to cast at least one spell","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294452,"modifiedTime":1671805187265,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"PnuWoIk1qLTcVVaW"} -{"name":"Elemental Adept (Lightning)","type":"feat","img":"icons/magic/lightning/bolt-strike-blue.webp","effects":[{"_id":"0SBwS29D7tWLF8Yk","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Elemental Adept (Lightning),all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/lightning/bolt-strike-blue.webp","label":"Elemental Adept (Lightning)","origin":"Item.lEyT5M1i5szqhLsu","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"featId":56,"version":"2.9.8","prerequisites":[{"description":"The ability to cast at least one spell","prerequisiteMappings":[{"id":41,"entityId":null,"entityTypeId":null,"type":"custom-value","subType":"the-ability-to-cast-at-least-one-spell","value":null,"friendlyTypeName":"Custom Value","friendlySubTypeName":"The ability to cast at least one spell"}]}]},"obsidian":{"source":{"type":"feat"}},"core":{"sourceId":"Compendium.world.ddb-feats.s72265V0lwRI4Q42"},"scene-packer":{"hash":"978b94420090c0a07be718319e8505388b8273da","sourceId":"Item.jpf5rbVmdPHu7bFA"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Elemental Adept (Lightning)","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.data.actionType)) return;\nconst damageType = \"lightning\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.data.data;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.data.data.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.data.data.damage.parts.length; i++) theItem.data.data.damage.parts[i] = backupItem.data.data.damage.parts[i];\n theItem.data.data.scaling = backupItem.data.data.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Elemental Adept (Lightning)","type":"script","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv2.0 December 18 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.system.actionType)) return;\n//CHANGE DAMAGE TYPE \"acid\", \"fire\", \"cold\", \"lightning\", \"thunder\"\nconst damageType = \"lightning\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.system;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.system.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.system.damage.parts.length; i++) theItem.system.damage.parts[i] = backupItem.system.damage.parts[i];\n theItem.system.scaling = backupItem.system.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"Player's Handbook","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"The ability to cast at least one spell","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294457,"modifiedTime":1671805187267,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"s7rQJqANl2Sn0rJs"} -{"name":"Elemental Adept (Thunder)","type":"feat","img":"icons/magic/fire/projectile-fireball-purple.webp","effects":[{"_id":"Ep7NrHqaoJ5py0kF","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Elemental Adept (Thunder),all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/fire/projectile-fireball-purple.webp","label":"Elemental Adept (Thunder)","origin":"Item.d7JuHA9yOhcz7q82","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"featId":57,"version":"2.9.8","prerequisites":[{"description":"The ability to cast at least one spell","prerequisiteMappings":[{"id":42,"entityId":null,"entityTypeId":null,"type":"custom-value","subType":"the-ability-to-cast-at-least-one-spell","value":null,"friendlyTypeName":"Custom Value","friendlySubTypeName":"The ability to cast at least one spell"}]}]},"obsidian":{"source":{"type":"feat"}},"core":{"sourceId":"Compendium.world.ddb-feats.T47bqSNeXlJT56NH"},"scene-packer":{"hash":"82a010664e06f6d53e9a1a3f1e1c27a1dc5a3315","sourceId":"Item.hYWUDxCbqS86iwxg"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Elemental Adept (Thunder)","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.data.actionType)) return;\nconst damageType = \"thunder\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.data.data;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.data.data.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.data.data.damage.parts.length; i++) theItem.data.data.damage.parts[i] = backupItem.data.data.damage.parts[i];\n theItem.data.data.scaling = backupItem.data.data.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Elemental Adept (Thunder)","type":"script","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv2.0 December 18 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.system.actionType)) return;\n//CHANGE DAMAGE TYPE \"acid\", \"fire\", \"cold\", \"lightning\", \"thunder\"\nconst damageType = \"thunder\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.system;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.system.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.system.damage.parts.length; i++) theItem.system.damage.parts[i] = backupItem.system.damage.parts[i];\n theItem.system.scaling = backupItem.system.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"Player's Handbook","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"The ability to cast at least one spell","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294449,"modifiedTime":1671805187271,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"BmKf5V5dEf56Ixcy"} -{"name":"Orcish Fury","type":"feat","img":"icons/skills/social/intimidation-impressing.webp","effects":[{"_id":"YJK1tQQIV2Ycrqy0","changes":[{"key":"flags.dnd5e.DamageBonusMacro","mode":0,"value":"ItemMacro.Orcish Fury,postDamageRoll","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/social/intimidation-impressing.webp","label":"Orcish Fury","origin":"Item.5PUe0GiheEHUomoR","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"dnd5e-helpers":{"rest-effect":"Ignore"},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"0b3ebe41bc35f3b3128b0ded22eabb7d74b41a8d","sourceId":"Item.tTE3yM6tSTBI3hxf"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Orcish Fury","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nOrcish Fury\n\nUSEAGE : AUTOMATIC\nThis item should be placed on the character that has the Orcish Fury Feat. \nUntil used, during each melee attack the player will be prompted if they\nwant to use this ability.\n \nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \nBug fixes provided by tposney#1462 and callbritton#5405 thank you both\n*****/\n\n// make sure the attempted hit was made with a weapon attack\n\nif (![\"mwak\", \"rwak\"].includes(args[0].item.data.actionType)) return;\n\nconst pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\nif (args[0].hitTargetUuids.length === 0) return;\nconst target = await fromUuid(args[0].hitTargetUuids[0] ?? \"\");\n\n// check to make sure only one target is selected\nif ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n}\n\n// Find Superiority Dice Resource\nlet orcishFury = await findSheetResource(pcActor, \"Orcish Fury\");\nif (!orcishFury) {\n ui.notifications.error(\"Could not find a resource labeled 'Orcish Fury'...\");\n return;\n} else if (orcishFury.value < 1) return;\n\n// create a dialog and prompt to spend a superiority die\nlet dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Orcish Fury:\",\n content: \"

Use Orcish Fury for extra damage?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n});\nlet choice = await dialog;\n\nif (!choice) return;\n\n// if YES subtract a superiorty die\nawait decrimentSheetResource(pcActor, \"Orcish Fury\", 1);\n\n// get the live MIDI-QOL workflow so we can make changes\nconst diceMult = args[0].isCritical ? 2 : 1;\nlet baseDice = (1 * diceMult);\nlet die = args[0].item.data.damage.parts[0][0].split('[')[0]; // everything before the [\ndie = die.toLowerCase(); // convert the string to lower case\nlet baseDie = die.split('d')[1]; //everything after the 'd' the die size and any mods\nlet furyRoll = (baseDice + \"d\" + baseDie); // assemble the FuryRoll\n\nconst damageType = args[0].item.data.damage.parts[0][1]; // get teh damage type from the weapon in use \n\nreturn { damageRoll: `${furyRoll}[${damageType}]`, flavor: \"Orcish Fury\" };\n\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Test for available resource\n// Return resource object\nasync function findSheetResource(testActor, resourceName) {\n let resources = Object.values(testActor.data.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n return foundResource;\n}\n\n// Decriment available resource\nasync function decrimentSheetResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n foundResource.value = foundResource.value - numValue;\n await testActor.update(actorDup);\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Orcish Fury","type":"script","scope":"global","command":"/*****\nOrcish Fury\n\nUSEAGE : AUTOMATIC\nThis item should be placed on the character that has the Orcish Fury Feat. \nUntil used, during each melee attack the player will be prompted if they\nwant to use this ability.\n \nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \nBug fixes provided by tposney#1462 and callbritton#5405 thank you both\n*****/\n\n// make sure the attempted hit was made with a weapon attack\n\nif (![\"mwak\", \"rwak\"].includes(args[0].item.system.actionType)) return;\n\nconst pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\nif (args[0].hitTargetUuids.length === 0) return;\nconst target = await fromUuid(args[0].hitTargetUuids[0] ?? \"\");\n\n// check to make sure only one target is selected\nif ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n}\n\n// Find Superiority Dice Resourcet\nlet orcishFury = await findSheetResource(pcActor, \"Orcish Fury\");\nif (!orcishFury) {\n ui.notifications.error(\"Could not find a resource labeled 'Orcish Fury'...\");\n return;\n} else if (orcishFury.value < 1) return;\n\n// create a dialog and prompt to spend a superiority die\nlet dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Orcish Fury:\",\n content: \"

Use Orcish Fury for extra damage?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n});\nlet choice = await dialog;\n\nif (!choice) return;\n\n// if YES subtract a superiorty die\nawait decrimentSheetResource(pcActor, \"Orcish Fury\", 1);\n\n// get the live MIDI-QOL workflow so we can make changes\nconst diceMult = args[0].isCritical ? 2 : 1;\nlet baseDice = (1 * diceMult);\nlet die = args[0].item.system.damage.parts[0][0].split('[')[0]; // everything before the [\ndie = die.toLowerCase(); // convert the string to lower case\nlet baseDie = die.split('d')[1]; //everything after the 'd' the die size and any mods\nlet furyRoll = (baseDice + \"d\" + baseDie); // assemble the FuryRoll\n\nconst damageType = args[0].item.system.damage.parts[0][1]; // get teh damage type from the weapon in use \n\nreturn { damageRoll: `${furyRoll}[${damageType}]`, flavor: \"Orcish Fury\" };\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Test for available resource\n// Return resource object\nasync function findSheetResource(testActor, resourceName) {\n let resources = Object.values(testActor.system.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n return foundResource;\n}\n\n// Decriment available resource\nasync function decrimentSheetResource(testActor, resourceName, numValue) {\n const resourceKey = Object.keys(testActor.system.resources).find(k => testActor.system.resources[k].label.toLowerCase() === resourceName.toLowerCase());\n let newResources = duplicate(testActor.system.resources);\n newResources[resourceKey].value -= 1;\n await actor.update({\"system.resources\": newResources});\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.5PUe0GiheEHUomoR"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"cf":{"id":"temp_b676eyusztv"},"favtab":{"isFavorite":true},"link-item-resource-5e":{"resource-link":""}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"XGtE p73","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Feat: Orcish Fury","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294455,"modifiedTime":1671805187273,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"14waQqQB7C3Mk1PG"} -{"name":"Piercer","type":"feat","img":"icons/skills/ranged/arrow-flying-broadhead-metal.webp","effects":[{"_id":"5LsTTEo1APQ0w520","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Piercer,all","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/ranged/arrow-flying-broadhead-metal.webp","label":"Piercer","origin":"Item.Aj6rMauKBQFNOrub","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"2ba3af6501cdad6f11d33889f0ad3a5c53b1ad6c","sourceId":"Item.x6imhWnhaO8AGJL8"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Piercer","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nPiercer\n\nUSAGE: Automatic just place on a character \n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\")?.data;\n\n // make sure the attempted hit was made with a weapon attack\n if (![\"mwak\", \"rwak\"].includes(args[0].item.data.actionType)) return;\n\n // damage type must be \"piercing\" \n if (workflow.defaultDamageType != \"piercing\") return;\n\n // breakdown weapon damage to find the base die, if there was a critical, and the lowest die roll\n let baseDie = null;\n let lowestDieRoll = 0;\n for (let i = 0; i < workflow.damageRoll.terms.length; i++)\n if (workflow.damageRoll.terms[i]?.faces) {\n baseDie = \"1d\" + workflow.damageRoll.terms[i].faces;\n lowestDieRoll = workflow.damageRoll.terms[i].results[0].result;\n for (let j = 0; j < workflow.damageRoll.terms[i].results.length; j++)\n if (workflow.damageRoll.terms[i].results[j].result < lowestDieRoll) lowestDieRoll = workflow.damageRoll.terms[i].results[j].result;\n }\n\n // create a dialog and prompt to re-roll lowest die\n let dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Piercer Feat:\",\n content: `

would you like to re-roll your lowest damage die?

Lowest Die Roll: ${lowestDieRoll}

`,\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n let choice = await dialog;\n\n if (choice) await setProperty(workflow, \"ReplaceRoll\", choice);\n await setProperty(workflow, \"LowestRoll\", lowestDieRoll);\n await setProperty(workflow, \"BaseDie\", baseDie);\n\n // trigger BonusDamage to apply the extra damage / adjustments outside of the normal damage roll\n let effectData = {\n label: \"Piercer reRoll\",\n changes: [{ key: \"flags.dnd5e.DamageBonusMacro\", mode: 0, value: `ItemMacro.Piercer`, priority: 20 }],\n icon: thisItem.img,\n origin: thisItem.uuid,\n duration: { turns: 1 }\n };\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: actorUuid, effects: [effectData] });\n return;\n\n} else if (args[0].tag === \"DamageBonus\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\")?.data;\n const targetToken = await fromUuid(args[0].hitTargetUuids[0] ?? \"\");\n const targetActor = targetToken.actor;\n let choice = await getProperty(workflow, \"ReplaceRoll\");\n let lowestDieRoll = await getProperty(workflow, \"LowestRoll\");\n let baseDie = await getProperty(workflow, \"BaseDie\");\n let reRoll = null;\n\n // remove extra damage effect \n let effect = await findEffect(actorToken, \"Piercer reRoll\");\n await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: actorUuid, effects: [effect.id] });\n\n // test if critical is true, apply extra damage die\n if (workflow?.isCritical) {\n reRoll = await new Roll(baseDie).roll();\n new MidiQOL.DamageOnlyWorkflow(targetActor, targetToken, reRoll.total, \"piercing\", [targetToken], reRoll, { flavor: \"Piercer Feat: Critical Extra Damage\", itemData: thisItem, itemCardId: \"new\" });\n }\n\n // if reRoll was selected figure out the difference and apply adjustment to the target\n if (choice) {\n reRoll = await new Roll(baseDie).roll();\n if (reRoll.result < lowestDieRoll) {\n // healback difference\n let difference = lowestDieRoll - reRoll.result;\n return { damageRoll: `${difference}[healing]`, flavor: \"Piercer Feat: ReRoll Adjustment\" }\n } else {\n // damage difference\n let difference = reRoll.result - lowestDieRoll;\n return { damageRoll: `${difference}[piercing]`, flavor: \"Piercer Feat: ReRoll Adjustment\" }\n }\n }\n return;\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Piercer","type":"script","scope":"global","command":"/*****\nPiercer\n\nUSAGE: Automatic just place on a character \n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\");\n\n // make sure the attempted hit was made with a weapon attack\n if (![\"mwak\", \"rwak\"].includes(args[0].item.system.actionType)) return;\n\n // damage type must be \"piercing\" \n if (workflow.defaultDamageType != \"piercing\") return;\n\n // breakdown weapon damage to find the base die, if there was a critical, and the lowest die roll\n let baseDie = null;\n let lowestDieRoll = 0;\n for (let i = 0; i < workflow.damageRoll.terms.length; i++)\n if (workflow.damageRoll.terms[i]?.faces) {\n baseDie = \"1d\" + workflow.damageRoll.terms[i].faces;\n lowestDieRoll = workflow.damageRoll.terms[i].results[0].result;\n for (let j = 0; j < workflow.damageRoll.terms[i].results.length; j++)\n if (workflow.damageRoll.terms[i].results[j].result < lowestDieRoll) lowestDieRoll = workflow.damageRoll.terms[i].results[j].result;\n }\n\n // create a dialog and prompt to re-roll lowest die\n let dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Piercer Feat:\",\n content: `

would you like to re-roll your lowest damage die?

Lowest Die Roll: ${lowestDieRoll}

`,\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n let choice = await dialog;\n\n if (choice) await setProperty(workflow, \"ReplaceRoll\", choice);\n await setProperty(workflow, \"LowestRoll\", lowestDieRoll);\n await setProperty(workflow, \"BaseDie\", baseDie);\n\n // trigger BonusDamage to apply the extra damage / adjustments outside of the normal damage roll\n let effectData = {\n label: \"Piercer reRoll\",\n changes: [{ key: \"flags.dnd5e.DamageBonusMacro\", mode: 0, value: `ItemMacro.Piercer`, priority: 20 }],\n icon: thisItem.img,\n origin: thisItem.uuid,\n duration: { turns: 1 }\n };\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: actorUuid, effects: [effectData] });\n return;\n\n} else if (args[0].tag === \"DamageBonus\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\");\n const targetToken = await fromUuid(args[0].hitTargetUuids[0] ?? \"\");\n const targetActor = targetToken.actor;\n let choice = await getProperty(workflow, \"ReplaceRoll\");\n let lowestDieRoll = await getProperty(workflow, \"LowestRoll\");\n let baseDie = await getProperty(workflow, \"BaseDie\");\n let reRoll = null;\n\n // remove extra damage effect \n let effect = await findEffect(actorToken.actor, \"Piercer reRoll\");\n // await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: actorUuid, effects: [effect.id] });\n\n // test if critical is true, apply extra damage die\n if (workflow?.isCritical) {\n reRoll = await new Roll(baseDie).evaluate({async: true});\n new MidiQOL.DamageOnlyWorkflow(targetActor, targetToken, reRoll.total, \"piercing\", [targetToken], reRoll, { flavor: \"Piercer Feat: Critical Extra Damage\", itemData: thisItem, itemCardId: \"new\" });\n }\n\n // if reRoll was selected figure out the difference and apply adjustment to the target\n if (choice) {\n reRoll = await new Roll(baseDie).evaluate({async: true});\n if (reRoll.result < lowestDieRoll) {\n // healback difference\n let difference = lowestDieRoll - reRoll.result;\n return { damageRoll: `${difference}[healing]`, flavor: \"Piercer Feat: ReRoll Adjustment\" }\n } else {\n // damage difference\n let difference = reRoll.result - lowestDieRoll;\n return { damageRoll: `${difference}[piercing]`, flavor: \"Piercer Feat: ReRoll Adjustment\" }\n }\n }\n return;\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.5PUe0GiheEHUomoR"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"cf":{"id":"temp_b676eyusztv"},"favtab":{"isFavorite":true}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p80","activation":{"type":"special","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Feat: Piercer","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294445,"modifiedTime":1671805187274,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"RlG6KNs6YglKwNRv"} -{"name":"Polearm Master - Opportunity Attack","type":"feat","img":"icons/weapons/polearms/pike-flared-brown.webp","effects":[],"flags":{"ddbimporter":{"id":"903603","entityTypeId":"222216831","componentId":38,"componentTypeId":1088085227,"importId":"sreo7neodrcmv53a"},"infusions":{"infused":false},"obsidian":{"source":{"type":"feat"}},"scene-packer":{"hash":"99c09d898a30ddf4ac3aa0f181b1002e0dce837b","sourceId":"Item.TPJk7zCJHkr53kRb"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"fumbleThreshold":null,"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.be1BWQDF6EkoDFuU"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 August 8 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
\n

 

","chat":"","unidentified":""},"source":"","activation":{"type":"reaction","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":5,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"str","actionType":"","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294454,"modifiedTime":1671805187275,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"nOcC6EpeutenPUqH"} -{"name":"Slasher","type":"feat","img":"icons/skills/melee/blade-tips-triple-bent-white.webp","effects":[{"_id":"5LsTTEo1APQ0w520","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Slasher,preDamageRoll","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tips-triple-bent-white.webp","label":"Slasher","origin":"Item.Aj6rMauKBQFNOrub","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"826e943bf7f30249c6ab19f53e13acbf3086fc40","sourceId":"Item.2RmqCkH8yzz3EMvf"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Slasher","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nSlasher\n\nUSAGE: Automatic just place on a character \n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a weapon attack\nif (![\"mwak\", \"rwak\"].includes(args[0].item.data.actionType)) return;\n\nif (args[0].macroPass === \"preDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n let targetToken = await fromUuid(args[0].hitTargetUuids[0]);\n let targetActor = targetToken.actor;\n let theItem = workflow.item.data.data;\n\n if (theItem.damage.parts[0][1] !== \"slashing\") return; // not a slashing weapon \n else {\n let effect = await findEffect(targetActor, \"Reduced Movement\");\n if (!effect) await applyReduceMovementEffect(targetActor, args[0].uuid);\n if (workflow.isCritical) await applyAttackDisadvantageEffect(targetActor, args[0].uuid);\n }\n return;\n}\n\n// Apply the fightened effect to the target\nasync function applyReduceMovementEffect(target, originUuid) {\n let effectData = {\n label: \"Reduced Movement\",\n icon: \"systems/dnd5e/icons/items/equipment/boots-leather.jpg\",\n origin: originUuid,\n changes: [{ \"key\": \"data.attributes.movement.all\", \"value\": `-10`, \"mode\": 0, \"priority\": 20 }],\n disabled: false,\n flags: { dae: { specialDuration: [\"turnStartSource\"] }, }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Apply the fightened effect to the target\nasync function applyAttackDisadvantageEffect(target, originUuid) {\n let effectData = {\n label: \"Attack Disadvantage\",\n icon: \"systems/dnd5e/icons/skills/weapon_08.jpg\",\n origin: originUuid,\n changes: [{ \"key\": \"flags.midi-qol.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }],\n disabled: false,\n flags: { dae: { specialDuration: [\"turnStartSource\"] }, }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(thisActor, effectName) {\n let effectUuid = null;\n effectUuid = thisActor?.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Slasher","type":"script","scope":"global","command":"/*****\nSlasher\n\nUSAGE: Automatic just place on a character \n\nv2.0 December 22 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a weapon attack\nif (![\"mwak\", \"rwak\"].includes(args[0].item.system.actionType)) return;\n\nif (args[0].macroPass === \"preDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n let targetToken = await fromUuid(args[0].hitTargetUuids[0]);\n let targetActor = targetToken.actor;\n let theItem = workflow.item;\n\n if (theItem.labels.damageTypes !== \"Slashing\") return; // not a slashing weapon \n else {\n let effect = await findEffect(targetActor, \"Reduced Movement\");\n if (!effect) await applyReduceMovementEffect(targetActor, args[0].uuid);\n if (workflow.isCritical) await applyAttackDisadvantageEffect(targetActor, args[0].uuid);\n }\n return;\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Apply the reduce movement to the target\nasync function applyReduceMovementEffect(target, originUuid) {\n let effectData = {\n label: \"Reduced Movement\",\n icon: \"icons/equipment/feet/boots-leather-engraved-brown.webp\",\n origin: originUuid,\n changes: [{ \"key\": \"data.attributes.movement.all\", \"value\": `-10`, \"mode\": 0, \"priority\": 20 }],\n disabled: false,\n flags: { dae: { specialDuration: [\"turnStartSource\"] }, }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Apply the Disadvantage effect to the target\nasync function applyAttackDisadvantageEffect(target, originUuid) {\n let effectData = {\n label: \"Attack Disadvantage\",\n icon: \"icons/magic/light/beam-explosion-pink-purple.webp\",\n origin: originUuid,\n changes: [{ \"key\": \"flags.midi-qol.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }],\n disabled: false,\n flags: { dae: { specialDuration: [\"turnStartSource\"] }, }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to find an effect on an actor\nasync function findEffect(thisActor, effectName) {\n let effectUuid = null;\n effectUuid = thisActor?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.5PUe0GiheEHUomoR"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"cf":{"id":"temp_b676eyusztv"},"favtab":{"isFavorite":true}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p81","activation":{"type":"special","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Feat: Slasher","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294453,"modifiedTime":1671805187276,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"WpcrPnG9kYVfGtPu"} +{"name":"Elemental Adept (Thunder)","type":"feat","img":"icons/magic/fire/projectile-fireball-purple.webp","effects":[{"_id":"Ep7NrHqaoJ5py0kF","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Elemental Adept (Thunder),all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/fire/projectile-fireball-purple.webp","label":"Elemental Adept (Thunder)","origin":"Item.d7JuHA9yOhcz7q82","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"featId":57,"version":"2.9.8","prerequisites":[{"description":"The ability to cast at least one spell","prerequisiteMappings":[{"id":42,"entityId":null,"entityTypeId":null,"type":"custom-value","subType":"the-ability-to-cast-at-least-one-spell","value":null,"friendlyTypeName":"Custom Value","friendlySubTypeName":"The ability to cast at least one spell"}]}]},"obsidian":{"source":{"type":"feat"}},"core":{"sourceId":"Compendium.world.ddb-feats.T47bqSNeXlJT56NH"},"scene-packer":{"hash":"82a010664e06f6d53e9a1a3f1e1c27a1dc5a3315","sourceId":"Item.hYWUDxCbqS86iwxg"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Elemental Adept (Thunder)","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.data.actionType)) return;\nconst damageType = \"thunder\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.data.data;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.data.data.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.data.data.damage.parts.length; i++) theItem.data.data.damage.parts[i] = backupItem.data.data.damage.parts[i];\n theItem.data.data.scaling = backupItem.data.data.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Elemental Adept (Thunder)","type":"script","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv2.0 December 18 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.system.actionType)) return;\n//CHANGE DAMAGE TYPE \"acid\", \"fire\", \"cold\", \"lightning\", \"thunder\"\nconst damageType = \"thunder\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.system;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.system.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.system.damage.parts.length; i++) theItem.system.damage.parts[i] = backupItem.system.damage.parts[i];\n theItem.system.scaling = backupItem.system.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"Player's Handbook","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"The ability to cast at least one spell","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294449,"modifiedTime":1672520414416,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"2wiIuL84iCeaVkNY"} +{"name":"Elemental Adept (Acid)","type":"feat","img":"icons/magic/acid/projectile-faceted-glob.webp","effects":[{"_id":"HlLfTD8QAW6eXGd9","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Elemental Adept (Acid),all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/acid/projectile-faceted-glob.webp","label":"Elemental Adept (Acid)","origin":"Item.W1CFtJ3Hs6z20Gw9","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"featId":53,"version":"2.9.8","prerequisites":[{"description":"The ability to cast at least one spell","prerequisiteMappings":[{"id":38,"entityId":null,"entityTypeId":null,"type":"custom-value","subType":"the-ability-to-cast-at-least-one-spell","value":null,"friendlyTypeName":"Custom Value","friendlySubTypeName":"The ability to cast at least one spell"}]}]},"obsidian":{"source":{"type":"feat"}},"core":{"sourceId":"Compendium.world.ddb-feats.aYmO2viJd9HdlSvF"},"scene-packer":{"hash":"fd141449107e8bce261f211627237862dd83c25c","sourceId":"Item.WE5aY0VXrvHTMatC"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Elemental Adept (Acid)","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.data.actionType)) return;\nconst damageType = \"acid\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.data.data;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.data.data.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.data.data.damage.parts.length; i++) theItem.data.data.damage.parts[i] = backupItem.data.data.damage.parts[i];\n theItem.data.data.scaling = backupItem.data.data.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Elemental Adept (Acid)","type":"script","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv2.0 December 18 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.system.actionType)) return;\n//CHANGE DAMAGE TYPE \"acid\", \"fire\", \"cold\", \"lightning\", \"thunder\"\nconst damageType = \"acid\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.system;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.system.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.system.damage.parts.length; i++) theItem.system.damage.parts[i] = backupItem.system.damage.parts[i];\n theItem.system.scaling = backupItem.system.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"Player's Handbook","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"The ability to cast at least one spell","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294447,"modifiedTime":1672520414402,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"7tADjfdlzKgyoulC"} +{"name":"Piercer","type":"feat","img":"icons/skills/ranged/arrow-flying-broadhead-metal.webp","effects":[{"_id":"5LsTTEo1APQ0w520","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Piercer,all","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/ranged/arrow-flying-broadhead-metal.webp","label":"Piercer","origin":"Item.Aj6rMauKBQFNOrub","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"0280c23e6da60cdaae35dd75a36c45f8839978f2","sourceId":"Item.skYBkTDPY0N425kz"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Piercer","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nPiercer\n\nUSAGE: Automatic just place on a character \n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\")?.data;\n\n // make sure the attempted hit was made with a weapon attack\n if (![\"mwak\", \"rwak\"].includes(args[0].item.data.actionType)) return;\n\n // damage type must be \"piercing\" \n if (workflow.defaultDamageType != \"piercing\") return;\n\n // breakdown weapon damage to find the base die, if there was a critical, and the lowest die roll\n let baseDie = null;\n let lowestDieRoll = 0;\n for (let i = 0; i < workflow.damageRoll.terms.length; i++)\n if (workflow.damageRoll.terms[i]?.faces) {\n baseDie = \"1d\" + workflow.damageRoll.terms[i].faces;\n lowestDieRoll = workflow.damageRoll.terms[i].results[0].result;\n for (let j = 0; j < workflow.damageRoll.terms[i].results.length; j++)\n if (workflow.damageRoll.terms[i].results[j].result < lowestDieRoll) lowestDieRoll = workflow.damageRoll.terms[i].results[j].result;\n }\n\n // create a dialog and prompt to re-roll lowest die\n let dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Piercer Feat:\",\n content: `

would you like to re-roll your lowest damage die?

Lowest Die Roll: ${lowestDieRoll}

`,\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n let choice = await dialog;\n\n if (choice) await setProperty(workflow, \"ReplaceRoll\", choice);\n await setProperty(workflow, \"LowestRoll\", lowestDieRoll);\n await setProperty(workflow, \"BaseDie\", baseDie);\n\n // trigger BonusDamage to apply the extra damage / adjustments outside of the normal damage roll\n let effectData = {\n label: \"Piercer reRoll\",\n changes: [{ key: \"flags.dnd5e.DamageBonusMacro\", mode: 0, value: `ItemMacro.Piercer`, priority: 20 }],\n icon: thisItem.img,\n origin: thisItem.uuid,\n duration: { turns: 1 }\n };\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: actorUuid, effects: [effectData] });\n return;\n\n} else if (args[0].tag === \"DamageBonus\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\")?.data;\n const targetToken = await fromUuid(args[0].hitTargetUuids[0] ?? \"\");\n const targetActor = targetToken.actor;\n let choice = await getProperty(workflow, \"ReplaceRoll\");\n let lowestDieRoll = await getProperty(workflow, \"LowestRoll\");\n let baseDie = await getProperty(workflow, \"BaseDie\");\n let reRoll = null;\n\n // remove extra damage effect \n let effect = await findEffect(actorToken, \"Piercer reRoll\");\n await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: actorUuid, effects: [effect.id] });\n\n // test if critical is true, apply extra damage die\n if (workflow?.isCritical) {\n reRoll = await new Roll(baseDie).roll();\n new MidiQOL.DamageOnlyWorkflow(targetActor, targetToken, reRoll.total, \"piercing\", [targetToken], reRoll, { flavor: \"Piercer Feat: Critical Extra Damage\", itemData: thisItem, itemCardId: \"new\" });\n }\n\n // if reRoll was selected figure out the difference and apply adjustment to the target\n if (choice) {\n reRoll = await new Roll(baseDie).roll();\n if (reRoll.result < lowestDieRoll) {\n // healback difference\n let difference = lowestDieRoll - reRoll.result;\n return { damageRoll: `${difference}[healing]`, flavor: \"Piercer Feat: ReRoll Adjustment\" }\n } else {\n // damage difference\n let difference = reRoll.result - lowestDieRoll;\n return { damageRoll: `${difference}[piercing]`, flavor: \"Piercer Feat: ReRoll Adjustment\" }\n }\n }\n return;\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Piercer","type":"script","scope":"global","command":"/*****\nPiercer\n\nUSAGE: Automatic just place on a character \n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\");\n let baseDie = null;\n let lowestDieRoll = 0;\n let choice = false; \n\n // make sure the attempted hit was made with a weapon attack\n if (![\"mwak\", \"rwak\"].includes(args[0].item.system.actionType)) return;\n console.log(\"MACRO TEST | Making Weapon Attack - PASSED\");\n\n // damage type must be \"piercing\" \n if (workflow.defaultDamageType != \"piercing\") return;\n console.log(\"MACRO TEST | Weapon is piercing - PASSED\");\n\n // breakdown weapon damage to find the base weapon damage die and the lowest die roll\n for (let i = 0; i < workflow.damageRoll.terms.length; i++)\n if (workflow.damageRoll.terms[i]?.faces) {\n baseDie = \"1d\" + workflow.damageRoll.terms[i].faces;\n console.log(\"MACRO TEST | Base Die: %s\",baseDie);\n lowestDieRoll = workflow.damageRoll.terms[i].results[0].result;\n for (let j = 0; j < workflow.damageRoll.terms[i].results.length; j++)\n if (workflow.damageRoll.terms[i].results[j].result < lowestDieRoll) lowestDieRoll = workflow.damageRoll.terms[i].results[j].result;\n }\n\n // check if piercer reroll was already used this turn, if true skip dialog prompt \n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn /100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"Piercer reRoll\");\n \n if (combatTime === lastTime) {\n console.log(\"Piercer reRoll: Already done a Piercer reRoll this turn\");\n }\n else {\n // create a dialog and prompt to re-roll lowest die\n let dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Piercer Feat:\",\n content: `

would you like to re-roll your lowest damage die?

Lowest Die Roll: ${lowestDieRoll}

`,\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n choice = await dialog;\n console.log(\"MACRO TEST | choice is: \" + choice);\n }\n }\n\n await setProperty(workflow, \"ReplaceRoll\", choice);\n await setProperty(workflow, \"LowestRoll\", lowestDieRoll);\n await setProperty(workflow, \"BaseDie\", baseDie);\n\n if (game.combat) {\n const combatTime = `${game.combat.id}-${game.combat.round + game.combat.turn /100}`;\n const lastTime = actor.getFlag(\"midi-qol\", \"Piercer reRoll\");\n if (combatTime !== lastTime) {\n await actor.setFlag(\"midi-qol\", \"Piercer reRoll\", combatTime);\n console.log(\"MACRO TEST | Set Piercer reRoll flag to combat time\");\n }\n }\n return;\n} \n\nif (args[0].tag === \"DamageBonus\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n const actorUuid = workflow.tokenUuid;\n const actorToken = canvas.tokens.get(workflow.tokenId);\n const thisItem = actorToken.actor.items.find(i => i.name === \"Piercer\");\n const targetToken = await fromUuid(args[0].hitTargetUuids[0] ?? \"\");\n const targetActor = targetToken.actor;\n let choice = await getProperty(workflow, \"ReplaceRoll\");\n let lowestDieRoll = await getProperty(workflow, \"LowestRoll\");\n let baseDie = await getProperty(workflow, \"BaseDie\");\n \n //let diff = await getProperty(workflow, \"Difference\");\n console.log(\"MACRO TEST | choice: %s lowest: %s base Die: %s\",choice, lowestDieRoll, baseDie);\n let reRoll = null;\n let critRoll = null;\n\n // test if critical is true, roll extra damage die\n if (workflow?.isCritical) {\n console.log(\"MACRO TEST | critical!\");\n critRoll = await new Roll(baseDie).evaluate({async: true});\n console.log(\"MACRO TEST | critical roll extra die %O\",critRoll);\n }\n\n // if reRoll was selected figure out the difference and apply adjustment to the target\n if (choice) {\n reRoll = await new Roll(baseDie).evaluate({async: true});\n console.log(\"MACRO TEST | ReRoll: %O\",reRoll);\n let difference = reRoll.result - lowestDieRoll;\n if (difference < 0) {\n // healback difference\n // let difference = lowestDieRoll - reRoll.result;\n console.log(\"MACRO TEST | Difference < 0 : %s\", difference); \n //await setProperty(workflow, \"Difference\", difference);\n if (workflow?.isCritical)\n return { damageRoll: `${difference}[healing] + ${critRoll.total}[piercing]`, flavor: \"Piercer Feat: ReRoll was lower + critical bonus\" }\n else \n return { damageRoll: `${difference}[healing]`, flavor: \"Piercer Feat: ReRoll was lower\" }\n } else if (difference > 0) {\n // damage difference\n // let difference = reRoll.result - lowestDieRoll;\n console.log(\"MACRO TEST | Difference > 0 : %s\", difference); \n //await setProperty(workflow, \"Difference\", difference);\n if (workflow?.isCritical)\n return { damageRoll: `${difference}[piercing] + ${critRoll.total}[piercing]`, flavor: \"Piercer Feat: ReRoll was higher + critical bonus\" }\n else \n return { damageRoll: `${difference}[piercing]`, flavor: \"Piercer Feat: ReRoll was higher\" }\n }\n } \n else { // add critical damage if it is a critcal reguardless of reroll\n if (workflow?.isCritical)\n return { damageRoll: `${critRoll.total}[piercing]`, flavor: \"Piercer Feat: Critical bonus\" }\n else \n return; \n }\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.5PUe0GiheEHUomoR"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"cf":{"id":"temp_b676eyusztv"},"favtab":{"isFavorite":true}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p80","activation":{"type":"special","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Feat: Piercer","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294445,"modifiedTime":1672520414420,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"BT9bXwpMNNKaNcUe"} +{"name":"Orcish Fury","type":"feat","img":"icons/skills/social/intimidation-impressing.webp","effects":[{"_id":"YJK1tQQIV2Ycrqy0","changes":[{"key":"flags.dnd5e.DamageBonusMacro","mode":0,"value":"ItemMacro.Orcish Fury,postDamageRoll","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/social/intimidation-impressing.webp","label":"Orcish Fury","origin":"Item.5PUe0GiheEHUomoR","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"dnd5e-helpers":{"rest-effect":"Ignore"},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"0b3ebe41bc35f3b3128b0ded22eabb7d74b41a8d","sourceId":"Item.tTE3yM6tSTBI3hxf"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Orcish Fury","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nOrcish Fury\n\nUSEAGE : AUTOMATIC\nThis item should be placed on the character that has the Orcish Fury Feat. \nUntil used, during each melee attack the player will be prompted if they\nwant to use this ability.\n \nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \nBug fixes provided by tposney#1462 and callbritton#5405 thank you both\n*****/\n\n// make sure the attempted hit was made with a weapon attack\n\nif (![\"mwak\", \"rwak\"].includes(args[0].item.data.actionType)) return;\n\nconst pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\nif (args[0].hitTargetUuids.length === 0) return;\nconst target = await fromUuid(args[0].hitTargetUuids[0] ?? \"\");\n\n// check to make sure only one target is selected\nif ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n}\n\n// Find Superiority Dice Resource\nlet orcishFury = await findSheetResource(pcActor, \"Orcish Fury\");\nif (!orcishFury) {\n ui.notifications.error(\"Could not find a resource labeled 'Orcish Fury'...\");\n return;\n} else if (orcishFury.value < 1) return;\n\n// create a dialog and prompt to spend a superiority die\nlet dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Orcish Fury:\",\n content: \"

Use Orcish Fury for extra damage?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n});\nlet choice = await dialog;\n\nif (!choice) return;\n\n// if YES subtract a superiorty die\nawait decrimentSheetResource(pcActor, \"Orcish Fury\", 1);\n\n// get the live MIDI-QOL workflow so we can make changes\nconst diceMult = args[0].isCritical ? 2 : 1;\nlet baseDice = (1 * diceMult);\nlet die = args[0].item.data.damage.parts[0][0].split('[')[0]; // everything before the [\ndie = die.toLowerCase(); // convert the string to lower case\nlet baseDie = die.split('d')[1]; //everything after the 'd' the die size and any mods\nlet furyRoll = (baseDice + \"d\" + baseDie); // assemble the FuryRoll\n\nconst damageType = args[0].item.data.damage.parts[0][1]; // get teh damage type from the weapon in use \n\nreturn { damageRoll: `${furyRoll}[${damageType}]`, flavor: \"Orcish Fury\" };\n\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Test for available resource\n// Return resource object\nasync function findSheetResource(testActor, resourceName) {\n let resources = Object.values(testActor.data.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n return foundResource;\n}\n\n// Decriment available resource\nasync function decrimentSheetResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n foundResource.value = foundResource.value - numValue;\n await testActor.update(actorDup);\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Orcish Fury","type":"script","scope":"global","command":"/*****\nOrcish Fury\n\nUSEAGE : AUTOMATIC\nThis item should be placed on the character that has the Orcish Fury Feat. \nUntil used, during each melee attack the player will be prompted if they\nwant to use this ability.\n \nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \nBug fixes provided by tposney#1462 and callbritton#5405 thank you both\n*****/\n\n// make sure the attempted hit was made with a weapon attack\n\nif (![\"mwak\", \"rwak\"].includes(args[0].item.system.actionType)) return;\n\nconst pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\nif (args[0].hitTargetUuids.length === 0) return;\nconst target = await fromUuid(args[0].hitTargetUuids[0] ?? \"\");\n\n// check to make sure only one target is selected\nif ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n}\n\n// Find Superiority Dice Resourcet\nlet orcishFury = await findSheetResource(pcActor, \"Orcish Fury\");\nif (!orcishFury) {\n ui.notifications.error(\"Could not find a resource labeled 'Orcish Fury'...\");\n return;\n} else if (orcishFury.value < 1) return;\n\n// create a dialog and prompt to spend a superiority die\nlet dialog = new Promise((resolve) => {\n new Dialog({\n // localize this text\n title: \"Orcish Fury:\",\n content: \"

Use Orcish Fury for extra damage?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n});\nlet choice = await dialog;\n\nif (!choice) return;\n\n// if YES subtract a superiorty die\nawait decrimentSheetResource(pcActor, \"Orcish Fury\", 1);\n\n// get the live MIDI-QOL workflow so we can make changes\nconst diceMult = args[0].isCritical ? 2 : 1;\nlet baseDice = (1 * diceMult);\nlet die = args[0].item.system.damage.parts[0][0].split('[')[0]; // everything before the [\ndie = die.toLowerCase(); // convert the string to lower case\nlet baseDie = die.split('d')[1]; //everything after the 'd' the die size and any mods\nlet furyRoll = (baseDice + \"d\" + baseDie); // assemble the FuryRoll\n\nconst damageType = args[0].item.system.damage.parts[0][1]; // get teh damage type from the weapon in use \n\nreturn { damageRoll: `${furyRoll}[${damageType}]`, flavor: \"Orcish Fury\" };\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Test for available resource\n// Return resource object\nasync function findSheetResource(testActor, resourceName) {\n let resources = Object.values(testActor.system.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n return foundResource;\n}\n\n// Decriment available resource\nasync function decrimentSheetResource(testActor, resourceName, numValue) {\n const resourceKey = Object.keys(testActor.system.resources).find(k => testActor.system.resources[k].label.toLowerCase() === resourceName.toLowerCase());\n let newResources = duplicate(testActor.system.resources);\n newResources[resourceKey].value -= 1;\n await actor.update({\"system.resources\": newResources});\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.5PUe0GiheEHUomoR"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"cf":{"id":"temp_b676eyusztv"},"favtab":{"isFavorite":true},"link-item-resource-5e":{"resource-link":""}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"XGtE p73","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Feat: Orcish Fury","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294455,"modifiedTime":1672520414418,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"GokoXmKAfrt8eMoY"} +{"name":"Elemental Adept (Lightning)","type":"feat","img":"icons/magic/lightning/bolt-strike-blue.webp","effects":[{"_id":"0SBwS29D7tWLF8Yk","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Elemental Adept (Lightning),all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/lightning/bolt-strike-blue.webp","label":"Elemental Adept (Lightning)","origin":"Item.lEyT5M1i5szqhLsu","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"featId":56,"version":"2.9.8","prerequisites":[{"description":"The ability to cast at least one spell","prerequisiteMappings":[{"id":41,"entityId":null,"entityTypeId":null,"type":"custom-value","subType":"the-ability-to-cast-at-least-one-spell","value":null,"friendlyTypeName":"Custom Value","friendlySubTypeName":"The ability to cast at least one spell"}]}]},"obsidian":{"source":{"type":"feat"}},"core":{"sourceId":"Compendium.world.ddb-feats.s72265V0lwRI4Q42"},"scene-packer":{"hash":"978b94420090c0a07be718319e8505388b8273da","sourceId":"Item.jpf5rbVmdPHu7bFA"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Elemental Adept (Lightning)","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.data.actionType)) return;\nconst damageType = \"lightning\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.data.data;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.data.data.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.data.data.damage.parts.length; i++) theItem.data.data.damage.parts[i] = backupItem.data.data.damage.parts[i];\n theItem.data.data.scaling = backupItem.data.data.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Elemental Adept (Lightning)","type":"script","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv2.0 December 18 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.system.actionType)) return;\n//CHANGE DAMAGE TYPE \"acid\", \"fire\", \"cold\", \"lightning\", \"thunder\"\nconst damageType = \"lightning\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.system;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.system.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.system.damage.parts.length; i++) theItem.system.damage.parts[i] = backupItem.system.damage.parts[i];\n theItem.system.scaling = backupItem.system.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"Player's Handbook","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"The ability to cast at least one spell","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294457,"modifiedTime":1672520414411,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"Vi8aYE4J1Z6ZqYph"} +{"name":"Elemental Adept (Cold)","type":"feat","img":"icons/magic/water/projectile-ice-chunk-blue.webp","effects":[{"_id":"JqR0VfQcqj7o2sC4","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Elemental Adept (Cold),all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/water/projectile-ice-chunk-blue.webp","label":"Elemental Adept (Cold)","origin":"Item.7Y7UQFlA6C65Hb7n","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"featId":54,"version":"2.9.8","prerequisites":[{"description":"The ability to cast at least one spell","prerequisiteMappings":[{"id":39,"entityId":null,"entityTypeId":null,"type":"custom-value","subType":"the-ability-to-cast-at-least-one-spell","value":null,"friendlyTypeName":"Custom Value","friendlySubTypeName":"The ability to cast at least one spell"}]}]},"obsidian":{"source":{"type":"feat"}},"core":{"sourceId":"Compendium.world.ddb-feats.spxwZqUg9ypdgEug"},"scene-packer":{"hash":"f12847df27fd8a6363c5490352cf8296e7a12dbc","sourceId":"Item.cNQkuN0Osk3zRvgB"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Elemental Adept (Cold)","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.data.actionType)) return;\nconst damageType = \"cold\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.data.data;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.data.data.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.data.data.damage.parts.length; i++) theItem.data.data.damage.parts[i] = backupItem.data.data.damage.parts[i];\n theItem.data.data.scaling = backupItem.data.data.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Elemental Adept (Cold)","type":"script","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv2.0 December 18 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.system.actionType)) return;\n//CHANGE DAMAGE TYPE \"acid\", \"fire\", \"cold\", \"lightning\", \"thunder\"\nconst damageType = \"cold\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.system;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.system.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.system.damage.parts.length; i++) theItem.system.damage.parts[i] = backupItem.system.damage.parts[i];\n theItem.system.scaling = backupItem.system.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"Player's Handbook","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"The ability to cast at least one spell","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294451,"modifiedTime":1672520414405,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"bCgWs3xQmh83kgPy"} +{"name":"Polearm Master - Opportunity Attack","type":"feat","img":"icons/weapons/polearms/pike-flared-brown.webp","effects":[],"flags":{"ddbimporter":{"id":"903603","entityTypeId":"222216831","componentId":38,"componentTypeId":1088085227,"importId":"sreo7neodrcmv53a"},"infusions":{"infused":false},"obsidian":{"source":{"type":"feat"}},"scene-packer":{"hash":"99c09d898a30ddf4ac3aa0f181b1002e0dce837b","sourceId":"Item.TPJk7zCJHkr53kRb"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"fumbleThreshold":null,"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.be1BWQDF6EkoDFuU"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 August 8 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
\n

 

","chat":"","unidentified":""},"source":"","activation":{"type":"reaction","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":5,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"str","actionType":"","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294454,"modifiedTime":1672520414425,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"m9X8hgzx0r9L9bBl"} +{"name":"Slasher","type":"feat","img":"icons/skills/melee/blade-tips-triple-bent-white.webp","effects":[{"_id":"5LsTTEo1APQ0w520","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Slasher,preDamageRoll","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tips-triple-bent-white.webp","label":"Slasher","origin":"Item.Aj6rMauKBQFNOrub","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"826e943bf7f30249c6ab19f53e13acbf3086fc40","sourceId":"Item.2RmqCkH8yzz3EMvf"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Slasher","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nSlasher\n\nUSAGE: Automatic just place on a character \n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a weapon attack\nif (![\"mwak\", \"rwak\"].includes(args[0].item.data.actionType)) return;\n\nif (args[0].macroPass === \"preDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n let targetToken = await fromUuid(args[0].hitTargetUuids[0]);\n let targetActor = targetToken.actor;\n let theItem = workflow.item.data.data;\n\n if (theItem.damage.parts[0][1] !== \"slashing\") return; // not a slashing weapon \n else {\n let effect = await findEffect(targetActor, \"Reduced Movement\");\n if (!effect) await applyReduceMovementEffect(targetActor, args[0].uuid);\n if (workflow.isCritical) await applyAttackDisadvantageEffect(targetActor, args[0].uuid);\n }\n return;\n}\n\n// Apply the fightened effect to the target\nasync function applyReduceMovementEffect(target, originUuid) {\n let effectData = {\n label: \"Reduced Movement\",\n icon: \"systems/dnd5e/icons/items/equipment/boots-leather.jpg\",\n origin: originUuid,\n changes: [{ \"key\": \"data.attributes.movement.all\", \"value\": `-10`, \"mode\": 0, \"priority\": 20 }],\n disabled: false,\n flags: { dae: { specialDuration: [\"turnStartSource\"] }, }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Apply the fightened effect to the target\nasync function applyAttackDisadvantageEffect(target, originUuid) {\n let effectData = {\n label: \"Attack Disadvantage\",\n icon: \"systems/dnd5e/icons/skills/weapon_08.jpg\",\n origin: originUuid,\n changes: [{ \"key\": \"flags.midi-qol.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }],\n disabled: false,\n flags: { dae: { specialDuration: [\"turnStartSource\"] }, }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(thisActor, effectName) {\n let effectUuid = null;\n effectUuid = thisActor?.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Slasher","type":"script","scope":"global","command":"/*****\nSlasher\n\nUSAGE: Automatic just place on a character \n\nv2.0 December 22 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a weapon attack\nif (![\"mwak\", \"rwak\"].includes(args[0].item.system.actionType)) return;\n\nif (args[0].macroPass === \"preDamageRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);\n let targetToken = await fromUuid(args[0].hitTargetUuids[0]);\n let targetActor = targetToken.actor;\n let theItem = workflow.item;\n\n if (theItem.labels.damageTypes !== \"Slashing\") return; // not a slashing weapon \n else {\n let effect = await findEffect(targetActor, \"Reduced Movement\");\n if (!effect) await applyReduceMovementEffect(targetActor, args[0].uuid);\n if (workflow.isCritical) await applyAttackDisadvantageEffect(targetActor, args[0].uuid);\n }\n return;\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Apply the reduce movement to the target\nasync function applyReduceMovementEffect(target, originUuid) {\n let effectData = {\n label: \"Reduced Movement\",\n icon: \"icons/equipment/feet/boots-leather-engraved-brown.webp\",\n origin: originUuid,\n changes: [{ \"key\": \"data.attributes.movement.all\", \"value\": `-10`, \"mode\": 0, \"priority\": 20 }],\n disabled: false,\n flags: { dae: { specialDuration: [\"turnStartSource\"] }, }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Apply the Disadvantage effect to the target\nasync function applyAttackDisadvantageEffect(target, originUuid) {\n let effectData = {\n label: \"Attack Disadvantage\",\n icon: \"icons/magic/light/beam-explosion-pink-purple.webp\",\n origin: originUuid,\n changes: [{ \"key\": \"flags.midi-qol.disadvantage.attack.all\", \"value\": `1`, \"mode\": 0, \"priority\": 20 }],\n disabled: false,\n flags: { dae: { specialDuration: [\"turnStartSource\"] }, }\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to find an effect on an actor\nasync function findEffect(thisActor, effectName) {\n let effectUuid = null;\n effectUuid = thisActor?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.5PUe0GiheEHUomoR"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"cf":{"id":"temp_b676eyusztv"},"favtab":{"isFavorite":true}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p81","activation":{"type":"special","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Feat: Slasher","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294453,"modifiedTime":1672520414428,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"vIVgNEPE6Hu2Hs9d"} +{"name":"Elemental Adept (Fire)","type":"feat","img":"icons/magic/fire/projectile-embers-orange.webp","effects":[{"_id":"6pZRLDO4MLABT5r8","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Elemental Adept (Fire),all","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/fire/projectile-embers-orange.webp","label":"Elemental Adept (Fire)","origin":"Item.c7fTdFwzwAGUSo2w","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"featId":55,"version":"2.9.8","prerequisites":[{"description":"The ability to cast at least one spell","prerequisiteMappings":[{"id":40,"entityId":null,"entityTypeId":null,"type":"custom-value","subType":"the-ability-to-cast-at-least-one-spell","value":null,"friendlyTypeName":"Custom Value","friendlySubTypeName":"The ability to cast at least one spell"}]}]},"obsidian":{"source":{"type":"feat"}},"core":{"sourceId":"Compendium.world.ddb-feats.p2Wr0BPOrQ1FxCfv"},"scene-packer":{"hash":"e162afc8438ae38bcd0a737e9cdac0bc80a4ef62","sourceId":"Item.WTwkanKPkj5fAMpT"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Elemental Adept (Fire)","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv1.0 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.data.actionType)) return;\nconst damageType = \"fire\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.data.data;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.data.data.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.data.data.damage.parts.length; i++) theItem.data.data.damage.parts[i] = backupItem.data.data.damage.parts[i];\n theItem.data.data.scaling = backupItem.data.data.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.actor.data.effects.find(ef => ef.data.label === effectName);\n return effectUuid;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Elemental Adept (Fire)","type":"script","scope":"global","command":"/*****\nElemental Adept \n\nUSAGE: This is fully automated, just place on a character\n\nworkflow: spell damage\n - retreive the damage type fromt thew DAE variable = damageType \n - duplicate the ITEM on the workflow as OriginalItem\n - search through all damage on the workfolow ITEM for the given damage type\n - if found add \"min2\" to all damages\n - test all targets for resistance to damageType\n - for every target with resistance set vulnerability\n - CLEANUP: restore the item and remove the vulnerability form all target(s)\n\nv2.0 December 18 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// make sure the attempted hit was made with a spell attack of some type\nif (![\"msak\", \"rsak\", \"save\"].includes(args[0].item.system.actionType)) return;\n//CHANGE DAMAGE TYPE \"acid\", \"fire\", \"cold\", \"lightning\", \"thunder\"\nconst damageType = \"fire\";\n\nif (args[0].macroPass === \"preItemRoll\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // backup the whole original item as a property on the workflow\n let backupItem = theItem.clone();\n await setProperty(workflow, \"originalItem\", backupItem);\n\n} else if (args[0].macroPass === \"preambleComplete\") {\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n let itemData = theItem.system;\n const targets = args[0].targets;\n\n // mark all targets that are resistant to this damage type now vulnerable to cancel the resistance\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n const match = targetActor.system.traits.dr.value.find(element => {\n if (element.includes(damageType)) markTargetVulnerable(targetActor, damageType, args[0]);\n });\n }\n\n // strip damage type in [] from the originalDamage if it exists and add \"min2\" and the damage type back in []\n // replace this later with a .map function \n for (let i = 0; i < itemData.damage.parts.length; i++) {\n let oldDamage = itemData.damage.parts[i][1];\n let oldDice = itemData.damage.parts[i][0];\n if (oldDamage === damageType) {\n let index = oldDice.indexOf('[');\n if (index !== -1) oldDice = oldDice.slice(0, index); // remove everything after the first open bracket '['\n itemData.damage.parts[i][1] = damageType;\n itemData.damage.parts[i][0] = oldDice + \"min2\" + \"[\" + damageType + \"]\";\n itemData.scaling.formula = itemData.scaling.formula + \"min2\";\n }\n }\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n let theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n const targets = args[0].targets;\n\n // remove any vulnerability previously set on target(s)\n // replace this later with a .map function \n for (let i = 0; i < targets.length; i++) {\n let targetActor = targets[i].actor;\n let effect = await findEffect(targets[i], \"EAVulnerability\");\n if (effect) await MidiQOL.socket().executeAsGM(\"removeEffects\", { actorUuid: targetActor.uuid, effects: [effect.id] });\n }\n\n // restore original spell damage and scaling from the backup item\n let backupItem = await getProperty(workflow, \"originalItem\");\n // replace this later with a .map function \n for (let i = 0; i < backupItem.system.damage.parts.length; i++) theItem.system.damage.parts[i] = backupItem.system.damage.parts[i];\n theItem.system.scaling = backupItem.system.scaling;\n\n} return;\n\n// if the character has resistance to the new damage type, set vulnerability to negate it\nasync function markTargetVulnerable(target, damageType, args) {\n const effectData = {\n label: \"EAVulnerability\",\n icon: \"icons/magic/defensive/barrier-shield-dome-deflect-blue.webp\",\n origin: args.uuid,\n changes: [{\n \"key\": \"data.traits.dv.value\",\n \"value\": `${damageType}`,\n \"mode\": 2,\n \"priority\": 20\n }],\n disabled: false\n }\n await MidiQOL.socket().executeAsGM(\"createEffects\", { actorUuid: target.uuid, effects: [effectData] });\n}\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Function to test for an effect\nasync function findEffect(target, effectName) {\n let effectUuid = null;\n effectUuid = target?.effects.find(ef => ef.label === effectName);\n return effectUuid;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"Player's Handbook","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":null,"recovery":""},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"The ability to cast at least one spell","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193294452,"modifiedTime":1672520414408,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"ynrTr55e9z1kTHwj"} diff --git a/module/packs/MASIF-other.db b/module/packs/MASIF-other.db index 486de49..9635523 100644 --- a/module/packs/MASIF-other.db +++ b/module/packs/MASIF-other.db @@ -1 +1 @@ -{"name":"Help Action","type":"feat","img":"icons/skills/melee/unarmed-punch-fist.webp","effects":[{"_id":"ioxb7mkofb3lhcvi","changes":[{"key":"flags.midi-qol.grants.advantage.attack.all","mode":5,"value":"1","priority":20},{"key":"flags.midi-qol.advantage.all","mode":5,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"rounds":1,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/unarmed-punch-fist.webp","label":"Help Action","origin":"Actor.4okcHmPmM1iBwyFs.Item.smt73dN8B1zU5F8r","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isAttacked"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"7f30b828fba71843a9a2dc008b9462a1bc03a96d","sourceId":"Item.MddqNvouzxbZT6vs"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.ii0ZfozCkVZ5vtpD"},"cf":{"id":"temp_emcxih7rfna","path":"Other","color":"#0000ff"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p192","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Basic Rules","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193318740,"modifiedTime":1671805201374,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"tBEi35AON7Scy8cv"} +{"name":"Help Action","type":"feat","img":"icons/skills/melee/unarmed-punch-fist.webp","effects":[{"_id":"ioxb7mkofb3lhcvi","changes":[{"key":"flags.midi-qol.grants.advantage.attack.all","mode":5,"value":"1","priority":20},{"key":"flags.midi-qol.advantage.all","mode":5,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"rounds":1,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/unarmed-punch-fist.webp","label":"Help Action","origin":"Actor.4okcHmPmM1iBwyFs.Item.smt73dN8B1zU5F8r","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isAttacked"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"scene-packer":{"hash":"7f30b828fba71843a9a2dc008b9462a1bc03a96d","sourceId":"Item.MddqNvouzxbZT6vs"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Item.ii0ZfozCkVZ5vtpD"},"cf":{"id":"temp_emcxih7rfna","path":"Other","color":"#0000ff"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p192","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Basic Rules","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193318740,"modifiedTime":1672520446043,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"PLHQYLR09YK1G62r"} diff --git a/module/packs/MASIF-species-features.db b/module/packs/MASIF-species-features.db index c5000e4..a4b4910 100644 --- a/module/packs/MASIF-species-features.db +++ b/module/packs/MASIF-species-features.db @@ -1 +1 @@ -{"name":"Stone's Endurance","type":"feat","img":"icons/magic/earth/strike-fist-stone.webp","effects":[{"_id":"yT5lftWkScV85E8F","changes":[{"key":"flags.midi-qol.DR.all","mode":2,"value":"[[1d12 + @abilities.con.mod]]","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/earth/strike-fist-stone.webp","label":"Stones Endurance","origin":"Item.lrmOph3XI2HvTpjD","transfer":false,"flags":{"dae":{"selfTarget":false,"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Reaction"],"transfer":false,"selfTargetAlways":false},"core":{"statusId":""},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"5119107","entityTypeId":"222216831","action":true,"componentId":8429487,"componentTypeId":1960452172,"importId":"sreo7neodrcmv53a"},"infusions":{"infused":false},"obsidian":{"source":{"type":"race"}},"scene-packer":{"hash":"56e6b10fd7a43ab92cbdfa42d71c911298f05e5b","sourceId":"Item.lGzZJFm9nrWDSoNn"},"core":{"sourceId":"Item.lrmOph3XI2HvTpjD"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 August 2 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"","activation":{"type":"reactiondamage","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":0,"max":"0","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":"","value":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"","recharge":{"value":null,"charged":false},"rarity":"","identified":true,"weaponType":"simpleR","attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193323345,"modifiedTime":1671805217197,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"gVus2Trcaq0SOrmt"} +{"name":"Stone's Endurance","type":"feat","img":"icons/magic/earth/strike-fist-stone.webp","effects":[{"_id":"yT5lftWkScV85E8F","changes":[{"key":"flags.midi-qol.DR.all","mode":2,"value":"[[1d12 + @abilities.con.mod]]","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/earth/strike-fist-stone.webp","label":"Stones Endurance","origin":"Item.lrmOph3XI2HvTpjD","transfer":false,"flags":{"dae":{"selfTarget":false,"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Reaction"],"transfer":false,"selfTargetAlways":false},"core":{"statusId":""},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"5119107","entityTypeId":"222216831","action":true,"componentId":8429487,"componentTypeId":1960452172,"importId":"sreo7neodrcmv53a"},"infusions":{"infused":false},"obsidian":{"source":{"type":"race"}},"scene-packer":{"hash":"56e6b10fd7a43ab92cbdfa42d71c911298f05e5b","sourceId":"Item.lGzZJFm9nrWDSoNn"},"core":{"sourceId":"Item.lrmOph3XI2HvTpjD"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 August 2 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"","activation":{"type":"reactiondamage","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":0,"max":"0","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":"","value":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"","recharge":{"value":null,"charged":false},"rarity":"","identified":true,"weaponType":"simpleR","attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193323345,"modifiedTime":1672520454341,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"MiQtHiutq8xvbmFh"} diff --git a/module/packs/MASIF-spells.db b/module/packs/MASIF-spells.db index 8c43200..046b917 100644 --- a/module/packs/MASIF-spells.db +++ b/module/packs/MASIF-spells.db @@ -1 +1 @@ -{"name":"Vitriolic Sphere","type":"spell","img":"icons/magic/fire/projectile-fireball-smoke-large-green.webp","effects":[{"_id":"6dg1MEvF5oFZDngu","changes":[{"key":"flags.midi-qol.OverTime","mode":5,"value":"turn=start,\ndamageBeforeSave=true,\nlabel=Vitrolic Sphere,\ndamageRoll=5d4,\ndamageType=acid,\nsaveDC=none","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"systems/dnd5e/icons/spells/fireball-acid-2.jpg","label":"Vitriolic Sphere","origin":"Item.JLed3LoQblm59nP7","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["turnEnd"],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":138279,"definitionId":2404,"entityTypeId":435869154,"dndbeyond":{"lookup":"generic","lookupName":"generic","level":null,"castAtLevel":null},"originalName":"Vitriolic Sphere","sources":[{"sourceId":4,"pageNumber":170,"sourceType":1}],"tags":["Damage"],"version":"2.9.8","effectsApplied":true},"core":{"sourceId":"Compendium.world.ddb-spells.nni9kMIH2znfjZsn"},"scene-packer":{"hash":"18d0916be5140da96d6e49daf3c30cf95e8517f0","sourceId":"Item.JGyNRy0PYRkSIilB"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"EEPC p170","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":20,"width":null,"units":"ft","type":"sphere"},"range":{"value":150,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"save","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["10d4[acid]","acid"],["5d4[acid - At the end of target's next turn]","acid"]],"versatile":""},"formula":"","save":{"ability":"dex","dc":null,"scaling":"spell"},"level":4,"school":"evo","components":{"value":"a drop of giant slug bile","vocal":true,"somatic":true,"material":true,"ritual":false,"concentration":false},"materials":{"value":"a drop of giant slug bile","consumed":false,"cost":0,"supply":0},"preparation":{"mode":"prepared","prepared":false},"scaling":{"mode":"none","formula":""},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193326702,"modifiedTime":1671805225758,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"0m58TghSvJJExF2h"} +{"name":"Vitriolic Sphere","type":"spell","img":"icons/magic/fire/projectile-fireball-smoke-large-green.webp","effects":[{"_id":"6dg1MEvF5oFZDngu","changes":[{"key":"flags.midi-qol.OverTime","mode":5,"value":"turn=start,\ndamageBeforeSave=true,\nlabel=Vitrolic Sphere,\ndamageRoll=5d4,\ndamageType=acid,\nsaveDC=none","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"systems/dnd5e/icons/spells/fireball-acid-2.jpg","label":"Vitriolic Sphere","origin":"Item.JLed3LoQblm59nP7","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["turnEnd"],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":138279,"definitionId":2404,"entityTypeId":435869154,"dndbeyond":{"lookup":"generic","lookupName":"generic","level":null,"castAtLevel":null},"originalName":"Vitriolic Sphere","sources":[{"sourceId":4,"pageNumber":170,"sourceType":1}],"tags":["Damage"],"version":"2.9.8","effectsApplied":true},"core":{"sourceId":"Compendium.world.ddb-spells.nni9kMIH2znfjZsn"},"scene-packer":{"hash":"18d0916be5140da96d6e49daf3c30cf95e8517f0","sourceId":"Item.JGyNRy0PYRkSIilB"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nVERSION INFO\n

v1.0 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"EEPC p170","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":20,"width":null,"units":"ft","type":"sphere"},"range":{"value":150,"long":null,"units":"ft"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"save","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["10d4[acid]","acid"],["5d4[acid - At the end of target's next turn]","acid"]],"versatile":""},"formula":"","save":{"ability":"dex","dc":null,"scaling":"spell"},"level":4,"school":"evo","components":{"value":"a drop of giant slug bile","vocal":true,"somatic":true,"material":true,"ritual":false,"concentration":false},"materials":{"value":"a drop of giant slug bile","consumed":false,"cost":0,"supply":0},"preparation":{"mode":"prepared","prepared":false},"scaling":{"mode":"none","formula":""},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193326702,"modifiedTime":1672520462190,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"nouV4h6a9W179AY6"} diff --git a/module/packs/MASIFF-battlemaster.db b/module/packs/MASIFF-battlemaster.db index 8a4961d..3c64e08 100644 --- a/module/packs/MASIFF-battlemaster.db +++ b/module/packs/MASIFF-battlemaster.db @@ -1,24 +1,26 @@ -{"name":"Maneuvers: Ambush","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"8mjpwr1wsce7hnw0","changes":[{"key":"system.attributes.init.bonus","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":1},{"key":"system.skills.ste.bonuses.check","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Maneuvers: Ambush","origin":"Actor.67GUmdTadYmGXD8W.Item.0RU6a1fysK70I7Zy","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["turnStart","isSkill.ste"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"6fd0889347ef4a085e1386813035f416e8ec36b9","sourceId":"Item.nJJhCsmnlO9ZiFRM"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will set up any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288015,"modifiedTime":1671805154190,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"MA4UmmZ2TFrZEKsq"} -{"name":"Maneuvers: Bait and Switch","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"9bd0ea1c5232d7c52e92bf97b1d9e7730666d019","sourceId":"Item.PZs9LUlDocrdSPMt"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[preActiveEffects]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Bait and Switch","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster Maneuver: Bait and Switch\n\nUSEAGE : ACTIVATE ANYTIME\nThis is a utility Maneuver and can be used whenever your character can take an action. \nThis will setup any bonuses and effects on the TARGET actor. \nA Superiority Die will be expended immediately.\n\nv1.2 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// Activate on preActiveEffects\nif (args[0].macroPass === \"preActiveEffects\") {\n\n // define Actor, Target and Workflow\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n const targetActor = args[0].targets[0].actor;\n let pcToken = token;\n let targetToken = await fromUuid(args[0].hitTargetUuids[0]);\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // check to make sure target is not incapacitated\n if (!(targetActor.data.data.attributes.hp.value > 0)) {\n ui.notifications.error(\"Your target must be conscious!\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"You are not a fighter battlemaster of at least level 3!\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // Roll superiority die for AC Bonus result\n const acBonusRoll = await(new Roll(`${superiorityDie}`)).roll();\n\n //prompt for who gets the AC bonus\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Bait and Switch\",\n content: \"

Who gets the AC bonus for 1 turn You or Target?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

You

\",\n callback: () => resolve(\"YOU\")\n },\n two: {\n icon: '

',\n label: \"

Target

\",\n callback: () => { resolve(\"TARGET\") }\n }\n },\n default: \"two\"\n }).render(true);\n });\n\n let choiceACBonus = await dialog;\n\n if (choiceACBonus === \"YOU\") {\n // Set Actor Active Effect for AC bonus\n await pcActor.createEmbeddedDocuments(\"ActiveEffect\", [{\n \"changes\": [{ \"key\": \"data.attributes.ac.bonus\", \"mode\": 2, \"value\": `${acBonusRoll.total}`, \"priority\": \"20\" }],\n \"label\": \"Bait and Switch AC Bonus\",\n \"duration\": { seconds: 0, rounds: 0, turns: 1 },\n \"origin\": args[0].itemUuid,\n \"icon\": \"systems/dnd5e/icons/skills/gray_10.jpg\",\n }]);\n } else {\n // Set Target Active Effect for AC bonus\n await targetActor.createEmbeddedDocuments(\"ActiveEffect\", [{\n \"changes\": [{ \"key\": \"data.attributes.ac.bonus\", \"mode\": 2, \"value\": `${acBonusRoll.total}`, \"priority\": \"20\" }],\n \"label\": \"Bait and Switch AC Bonus\",\n \"duration\": { seconds: 0, rounds: 0, turns: 1 },\n \"origin\": args[0].itemUuid,\n \"icon\": \"systems/dnd5e/icons/skills/gray_10.jpg\",\n }]);\n }\n\n // Swap the token positions positions on the canvas\n await SwapTokens(pcToken, targetToken, canvas);\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\nasync function SwapTokens(pcMoveToken, targetMoveToken, thisCanvas) {\n let targetCenter = targetMoveToken.object.center;\n let pcCenter = pcMoveToken.center;\n let snappedPosition = null;\n\n thisCanvas.grid.diagonalRule = \"EUCL\";\n const diagonalRule = canvas.grid.diagonRule;\n\n // Move Actor to OLD Target Location\n let travelRay = new Ray(pcCenter, targetCenter); // create a ray to measure the angle to travel\n let angle = travelRay.angle;\n travelRay = Ray.fromAngle(pcMoveToken.data.x, pcMoveToken.data.y, angle, travelRay.distance);\n snappedPosition = canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y);\n canvas.grid.diagonalRule = diagonalRule;\n await pcMoveToken.document.update(canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y));\n\n // Move Target to OLD Actor Location\n travelRay = new Ray(targetCenter, pcCenter); // create a ray to measure the angle to travel\n angle = travelRay.angle;\n travelRay = Ray.fromAngle(targetMoveToken.data.x, targetMoveToken.data.y, angle, travelRay.distance);\n snappedPosition = canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y);\n canvas.grid.diagonalRule = diagonalRule;\n await targetMoveToken.data.document.update(canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y));\n\n return;\n}\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Maneuvers: Bait and Switch","type":"script","scope":"global","command":"/*****\nFighter Battlemaster Maneuver: Bait and Switch\n\nUSEAGE : ACTIVATE ANYTIME\nThis is a utility Maneuver and can be used whenever your character can take an action. \nThis will setup any bonuses and effects on the TARGET actor. \nA Superiority Die will be expended immediately.\n\nv2.0 December 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// Activate on preActiveEffects\nif (args[0].macroPass === \"preActiveEffects\") {\n\n // define Actor, Target and Workflow\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n const targetActor = args[0].targets[0].actor;\n let pcToken = token;\n let targetToken = await fromUuid(args[0].hitTargetUuids[0]);\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n \n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // check to make sure target is not incapacitated\n if (!(targetActor.system.attributes.hp.value > 0)) {\n ui.notifications.error(\"Your target must be conscious!\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"You are not a fighter battlemaster of at least level 3!\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // Roll superiority die for AC Bonus result\n //const surge = await new Roll(\"1d20\").evaluate({async: true});\n const acBonusRoll = await(new Roll(`${superiorityDie}`)).evaluate({async: true});\n\n //prompt for who gets the AC bonus\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Bait and Switch\",\n content: \"

Who gets the AC bonus for 1 turn You or Target?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

You

\",\n callback: () => resolve(\"YOU\")\n },\n two: {\n icon: '

',\n label: \"

Target

\",\n callback: () => { resolve(\"TARGET\") }\n }\n },\n default: \"two\"\n }).render(true);\n });\n\n let choiceACBonus = await dialog;\n\n if (choiceACBonus === \"YOU\") {\n // Set Actor Active Effect for AC bonus\n await pcActor.createEmbeddedDocuments(\"ActiveEffect\", [{\n \"changes\": [{ \"key\": \"data.attributes.ac.bonus\", \"mode\": 2, \"value\": `${acBonusRoll.total}`, \"priority\": \"20\" }],\n \"label\": \"Bait and Switch AC Bonus\",\n \"duration\": { seconds: 0, rounds: 0, turns: 1 },\n \"origin\": args[0].itemUuid,\n \"icon\": \"icons/magic/defensive/shield-barrier-blue.webp\",\n }]);\n } else {\n // Set Target Active Effect for AC bonus\n await targetActor.createEmbeddedDocuments(\"ActiveEffect\", [{\n \"changes\": [{ \"key\": \"data.attributes.ac.bonus\", \"mode\": 2, \"value\": `${acBonusRoll.total}`, \"priority\": \"20\" }],\n \"label\": \"Bait and Switch AC Bonus\",\n \"duration\": { seconds: 0, rounds: 0, turns: 1 },\n \"origin\": args[0].itemUuid,\n \"icon\": \"icons/magic/defensive/shield-barrier-blue.webp\",\n }]);\n }\n\n // Swap the token positions positions on the canvas\n await SwapTokens(pcToken, targetToken, canvas);\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\nasync function SwapTokens(pcMoveToken, targetMoveToken, thisCanvas) {\n let targetCenter = targetMoveToken.object.center;\n let pcCenter = pcMoveToken.center;\n let snappedPosition = null;\n\n thisCanvas.grid.diagonalRule = \"EUCL\";\n const diagonalRule = canvas.grid.diagonRule;\n\n // Move Actor to OLD Target Location\n let travelRay = new Ray(pcCenter, targetCenter); // create a ray to measure the angle to travel\n let angle = travelRay.angle;\n travelRay = Ray.fromAngle(pcMoveToken.x, pcMoveToken.y, angle, travelRay.distance);\n snappedPosition = canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y);\n canvas.grid.diagonalRule = diagonalRule;\n await pcMoveToken.document.update(canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y));\n\n // Move Target to OLD Actor Location\n travelRay = new Ray(targetCenter, pcCenter); // create a ray to measure the angle to travel\n angle = travelRay.angle;\n travelRay = Ray.fromAngle(targetMoveToken.x, targetMoveToken.y, angle, travelRay.distance);\n snappedPosition = canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y);\n canvas.grid.diagonalRule = diagonalRule;\n await targetMoveToken.update(canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y));\n\n return;\n}\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.system.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will set up any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193287996,"modifiedTime":1671805154194,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"ehTqiWwFNYA1CBVQ"} -{"name":"Maneuvers: Brace","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[{"_id":"wkpprdr3mk9xsqnb","changes":[{"key":"system.bonuses.mwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":20},{"key":"system.bonuses.rwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":20}],"disabled":false,"duration":{"rounds":1,"startTime":null,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/weapons-crossed-swords-yellow.webp","label":"Maneuvers: Brace","origin":"Actor.67GUmdTadYmGXD8W.Item.5iFlJVD10sudUgOQ","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:mwak","1Attack:rwak"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"7710d6efc3a027bc2d228034bd12270da9a6ccf6","sourceId":"Item.s0MAI5ToTgbFxID8"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.BYW8Ciw9YoYj97zI"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE ATTACK\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288000,"modifiedTime":1671805154201,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"NRhYtjXLkqcLdxPu"} -{"name":"Maneuvers: Commander’s Strike","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"wi6f2h3dq7nvr1yt","changes":[{"key":"system.bonuses.mwak.damage","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Maneuvers: Commander’s Strike","origin":"Actor.67GUmdTadYmGXD8W.Item.pGZANlFSKX3g36f8","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:mwak"],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"5b82a70551dacd789a31db619eebef3e31afc615","sourceId":"Item.bIopQsi7ItrmUegc"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will setup any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288030,"modifiedTime":1671805154209,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"hY1Y4CbVq2lal3Mr"} -{"name":"Maneuvers: Commanding Presence","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"8mjpwr1wsce7hnw0","changes":[{"key":"system.skills.prf.bonuses.check","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":1},{"key":"system.skills.inv.bonuses.check","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":1},{"key":"system.skills.per.bonuses.check","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Commanding Presence","origin":"Actor.67GUmdTadYmGXD8W.Item.0RU6a1fysK70I7Zy","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isSkill.itm","isSkill.prf","isSkill.per"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"0ff3423216fdbf9ef501d68d690641cd16aaa476","sourceId":"Item.JBZvOTaQEQhhH4QG"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will setup any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193287980,"modifiedTime":1671805154212,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"vVzu621xaYOAZaqq"} -{"name":"Maneuvers: Disarming Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"z6c1xhx4agrwbd3z","changes":[],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tip-chipped-blood-red.webp","label":"Maneuvers: Disarming Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.uIJSbACjp9yNcSdf","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Disarmed"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":true,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Trip Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"fd3c574a868d82d9bc9534102f5d87ad2d8cbe3b","sourceId":"Item.HHclx11TJCd2cpem"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  On a failed save, this item will put a marker on the target to remind the GM the actor has been disarmed since there is no disarmed convenient effect.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"str","actionType":"save","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"str","dc":null,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288012,"modifiedTime":1671805154232,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"BUJCucGZwcCIOTIV"} -{"name":"Maneuvers: Distracting Strike","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"z6c1xhx4agrwbd3z","changes":[{"key":"flags.midi-qol.grants.advantage.attack.all","mode":5,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tip-chipped-blood-red.webp","label":"Maneuvers: Distracting Strike","origin":"Actor.67GUmdTadYmGXD8W.Item.uIJSbACjp9yNcSdf","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Advantage"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isHit"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Trip Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"b915da6eb003ad818ecac67517fcc5a1f63ae638","sourceId":"Item.kLWYDBL7F2nlbTDG"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"util","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288059,"modifiedTime":1671805154243,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"pAwk2zfIJtRBVIkC"} -{"name":"Maneuvers: Evasive Footwork","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"8mjpwr1wsce7hnw0","changes":[{"key":"system.attributes.ac.bonus","mode":2,"value":"[[@flags.dae.SuperiorityDie]]","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Evasive Footwork","origin":"Actor.67GUmdTadYmGXD8W.Item.0RU6a1fysK70I7Zy","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isMoved"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"33e9bc20206fbb9ca7930b5fd5238ef17f90765f","sourceId":"Item.VBck6SUMDUffKNQX"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will set up any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288034,"modifiedTime":1671805154248,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"zwzoF0BAS4tXt22W"} -{"name":"Maneuvers: Feinting Attack","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[{"_id":"tyr9bqr24wew5lex","changes":[{"key":"flags.midi-qol.advantage.attack.mwak","mode":0,"value":"1","priority":0},{"key":"system.bonuses.mwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":5}],"disabled":false,"duration":{"startTime":null,"rounds":1,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/weapons-crossed-swords-yellow.webp","label":"Maneuvers: Feinting Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.EbURPL9F8boGsK20","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:mwak"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"85aac26e899cf5a523c91c7b5bb55a19c39f1a27","sourceId":"Item.t1c6JDGWTxNA0Q37"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE THE ATTACK\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288024,"modifiedTime":1671805154250,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"wuxJt5oQeV74tYWK"} -{"name":"Maneuvers: Goading Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"z6c1xhx4agrwbd3z","changes":[],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/skills/wounds/injury-face-impact-orange.webp","label":"Maneuvers: Goading Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.uIJSbACjp9yNcSdf","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Taunted"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":true,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Trip Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"a74c4bb65a570b572962289367a6c2543de3f455","sourceId":"Item.GWaFUJ2ArnVtQvqm"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK\n

*** This Maneuver is incomplete ***

\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.  If the target fails the WIS save, an empty effect will be placed on the TARGET.  This effect is to remind the GM that attacks against all but the goading actor are at disadvantage. 

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v0.5 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"str","actionType":"save","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"wis","dc":null,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288017,"modifiedTime":1671805154254,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"x0d0KSr4cuCjIIeA"} -{"name":"Maneuvers: Grappling Strike","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"z6c1xhx4agrwbd3z","changes":[{"key":"system.attributes.movement.all","mode":0,"value":"0","priority":5}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"modules/dfreds-convenient-effects/images/grappled.svg","label":"Grappled","origin":"Actor.67GUmdTadYmGXD8W.Item.uIJSbACjp9yNcSdf","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Grappled"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[all]ItemMacro","overTimeSkillRoll":"ath"},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Grappling Strike","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Grappling Strike\n\nUSEAGE : ACTIVATE AFTER ATTACK\nThis Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful. \nThis will activate any bonuses, saves, effects and extra damage to the TARGET. \nA Superiority Die will be expended immediately.\n\nv1.2 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preSave\") {\n\n // define Actor, Target and Item\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n const targetActor = args[0].targets[0].actor;\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"Superiority Die feature is missing on the character sheet.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // Set the DC and setup the saving throw\n let pcAthSkillTotal = pcActor.data.data.skills[\"ath\"].total;\n const roll = await(new Roll(`1d20 + ${pcAthSkillTotal} + ${superiorityDie}`)).roll();\n theItem.data.data.save.dc = roll.total;\n theItem.data.data.save.scaling = \"flat\";\n\n let skill = \"acr\";\n if (targetActor.data.data.skills.ath.passive > targetActor.data.data.skills.acr.passive) skill = \"ath\";\n setProperty(theItem.data.flags, \"midi-qol.overTimeSkillRoll\", skill);\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const item = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n item.data.data.save.ability = \"str\";\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Maneuvers: Grappling Strike","type":"script","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Grappling Strike\n\nUSEAGE : ACTIVATE AFTER ATTACK\nThis Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful. \nThis will activate any bonuses, saves, effects and extra damage to the TARGET. \nA Superiority Die will be expended immediately.\n\nv2.0 December 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preSave\") {\n\n // define Actor, Target and Item\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n const targetActor = args[0].targets[0].actor;\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"Superiority Die feature is missing on the character sheet.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // Set the DC and setup the saving throw\n let pcAthSkillTotal = pcActor.system.skills.ath.total;\n const roll = await(new Roll(`1d20 + ${pcAthSkillTotal} + ${superiorityDie}`)).evaluate({async: true});\n\n theItem.system.save.dc = roll.total;\n theItem.system.save.scaling = \"flat\";\n\n let skill = \"acr\";\n if (targetActor.system.skills.ath.passive > targetActor.system.skills.acr.passive) skill = \"ath\";\n setProperty(theItem.flags, \"midi-qol.overTimeSkillRoll\", skill);\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const item = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n item.system.save.ability = \"str\";\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.system.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"19ddbb39795e14de76b795d9d3759d972ed3db52","sourceId":"Item.A2Z2iftIV9D10Go1"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"str","actionType":"save","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"str","dc":null,"scaling":"flat"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288028,"modifiedTime":1671805154259,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"fsxtwWCVGD609f0T"} -{"name":"Maneuvers: Lunging Attack","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[{"_id":"51gy6rzi5b0s0bws","changes":[{"key":"system.bonuses.mwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":1},{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Maneuvers: Lunging Attack,preItemRoll","priority":10}],"disabled":false,"duration":{"rounds":1,"startTime":null,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/weapons/polearms/spear-flared-bronze-teal.webp","label":"Maneuvers: Lunging Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.hkchEm8jxUTaR2Ng","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:mwak"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"0aef1bb3ed0d68b32bfc393f0ce13ad46ddfaca0","sourceId":"Item.py9zgXqY2NkIagJL"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Lunging Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Lunging Attack\n\n*** AWAITING SOLUTION FROM MIDI TO GET THIS TO WORK WITH RANGE CHECKING ***\n\nUSEAGE : ACTIVATE BEFORE ATTACK\nThis Maneuver must be activated BEFORE the character makes an attack. \nThis will setup any bonuses and effects on the TARGET character. \nA Superiority Die will be expended immediately.\n\nv1.2 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// Activate on preActiveEffects\nif (args[0].macroPass === \"preItemRoll\") {\n\n // Item itself defining the workflow \n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // make sure the attempted hit was made with a melee weapon attack\n if ((theItem != null) && (theItem.name != \"Maneuvers: Lunging Attack\")) {\n if (![\"mwak\"].includes(args[0].item.data.actionType)) {\n ui.notifications.error(\"Lunging Attack only works with a melee weapon attack\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n else {\n let range = theItem.data.data.range.value;\n theItem.data.data.range.value = (range + 5);\n }\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Maneuvers: Lunging Attack","type":"script","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Lunging Attack\n\n*** AWAITING SOLUTION FROM MIDI TO GET THIS TO WORK WITH RANGE CHECKING ***\n\nUSEAGE : ACTIVATE BEFORE ATTACK\nThis Maneuver must be activated BEFORE the character makes an attack. \nThis will setup any bonuses and effects on the TARGET character. \nA Superiority Die will be expended immediately.\n\nv2.0 December 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// Activate on preActiveEffects\nif (args[0].macroPass === \"preItemRoll\") {\n\n // Item itself defining the workflow \n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // make sure the attempted hit was made with a melee weapon attack\n if ((theItem != null) && (theItem.name != \"Maneuvers: Lunging Attack\")) {\n if (![\"mwak\"].includes(args[0].item.system.actionType)) {\n ui.notifications.error(\"Lunging Attack only works with a melee weapon attack\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n else {\n let range = theItem.system.range.value;\n theItem.system.range.value = (range + 5);\n }\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.system.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE THE ATTACK\n

*** This maneuver does not work with MIDI-QOL Range checking, awaiting patch ***

\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193287987,"modifiedTime":1671805154271,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"ffW09EpVdpbiIjY4"} -{"name":"Maneuvers: Maneuvering Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"51gy6rzi5b0s0bws","changes":[{"key":"system.attributes.movement.walk","mode":1,"value":"1.5","priority":20}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tip-chipped-blood-red.webp","label":"Maneuvers: Maneuvering Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.hkchEm8jxUTaR2Ng","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"288c91227130c1c0663bee7e4d316a9320ba29dd","sourceId":"Item.88RZKP2tE6cMgZzI"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK
\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.  This provides a half normal movement bonus so the target of the REACTION can move half their movement manually without disrupting their movement on their turn.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288027,"modifiedTime":1671805154283,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"C4tzG1vYcDCLLq6w"} -{"name":"Maneuvers: Menacing Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"z6c1xhx4agrwbd3z","changes":[{"key":"flags.midi-qol.disadvantage.attack.all","mode":0,"value":"1","priority":0},{"key":"flags.midi-qol.disadvantage.ability.check.all","mode":0,"value":"1","priority":0}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tip-chipped-blood-red.webp","label":"Frightened","origin":"Actor.67GUmdTadYmGXD8W.Item.uIJSbACjp9yNcSdf","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Frightened"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":true,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Trip Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"3b1cce900ddae017cdb5c1474a8586d4eddc35c9","sourceId":"Item.oxZRFhfPKJyOgAOT"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"str","actionType":"save","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"wis","dc":null,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193287984,"modifiedTime":1671805154286,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"AlQEliO1irb2tHkA"} -{"name":"Maneuvers: Parry","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-white-blue.webp","effects":[{"_id":"hh9G9bIo7PnCBcco","changes":[{"key":"flags.midi-qol.DR.all","mode":2,"value":"[[@flags.dae.SuperiorityDie + @abilities.dex.mod]]","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/weapons-crossed-swords-white-blue.webp","label":"Parry","origin":"Item.7129rM93Fl9drjmu","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Reaction"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"dnd5e-helpers":{"rest-effect":"Ignore"},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53564","entityTypeId":"222216831","componentId":16,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"favtab":{"isFavorite":true},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Parry","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"scene-packer":{"hash":"5d51df83925f0bf824d9731dcbc40a7412007c4f","sourceId":"Item.uDSqXHjG9wgsONdt"},"core":{"sourceId":"Item.7129rM93Fl9drjmu"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: AUTOMATED\n

This is an automated Maneuver, place it on the character sheet and it will come up in the MIDI-QOL reaction workflow without manual activation.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"reactiondamage","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288042,"modifiedTime":1671805154290,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"cbr84tr4SIQ3lE4W"} -{"name":"Maneuvers: Precision Attack","type":"feat","img":"icons/skills/melee/strike-sword-steel-yellow.webp","effects":[{"_id":"og6qejg1f0p7b8ws","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Maneuvers: Precision Attack,preCheckHits","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/ranged/target-bullseye-archer-orange.webp","label":"Maneuvers: Precision Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.RryNpmf0SaXo2jua","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53565","entityTypeId":"222216831","componentId":17,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"50fe4df14a66d36c8f6e97b5ae8a537a3408cc2a","sourceId":"Item.8JjIXHdVPlHQ56nt"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Precision Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster Maneuver: Precision Attack\n\nUSEAGE : PLACE HOLDER\nThis item should be placed on the character that has the Precision Attack Manuever. \nThis items places an effect on the Actor that allows the rolling of a Superiority Die to \nbe added to the attack Roll before the TO HIT is evaluated.\n\nv1.2 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\nconst workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n\nif (args[0].macroPass === \"preCheckHits\") {\n const theItem = workflow;\n\n if ((theItem != null) && (theItem.name != \"Maneuvers: Precision Attack\")) {\n // define Actor, Target and Item\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n\n // Find Superiority Dice Resource\n let resource = await findSheetResource(pcActor, \"Superiority Dice\");\n if (!resource) {\n ui.notifications.error(\"Could not find a recource labeled 'Superiority Dice'...\");\n return;\n }\n\n // No more Superiority Dice\n let superiorityDice = resource.value;\n if (superiorityDice < 1) return;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"You are not a fighter battle master of at least 3rd level!\");\n return;\n }\n\n // make sure the attempted hit was made with a weapon attack\n if (![\"mwak\", \"rwak\"].includes(args[0].item.data.actionType)) {\n ui.notifications.error(\"Precision Attack only works with a weapon attack\");\n return;\n }\n\n // create a dialog and prompt to spend a superiority die\n let useSuperiorityDie = false;\n if (superiorityDice > 0) {\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Precision Attack\",\n content: \"

Use Precision Attack (cost 1 Superiority Die)?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n useSuperiorityDie = await dialog;\n } else return;\n\n if (!useSuperiorityDie) return;\n\n // if YES subtract a superiorty die\n await decrimentSheetResource(pcActor, \"Superiority Dice\", 1);\n\n // get the live MIDI-QOL workflow so we can make changes\n let newRoll = new Roll(`${workflow.attackRoll.result} + ${superiorityDie}`, workflow.actor.getRollData());\n newRoll = await newRoll.evaluate({ async: true });\n workflow.attackRoll = newRoll;\n workflow.attackRollTotal = newRoll.total;\n workflow.attackRollHTML = await workflow.attackRoll.render(newRoll);\n\n return;\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Test for available resource\n// Return resource object\nasync function findSheetResource(testActor, resourceName) {\n let resources = Object.values(testActor.data.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n return foundResource;\n}\n\n// Decriment available resource\nasync function decrimentSheetResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n foundResource.value = foundResource.value - numValue;\n await testActor.update(actorDup);\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Maneuvers: Precision Attack","type":"script","scope":"global","command":"/*****\nFighter Battlemaster Maneuver: Precision Attack\n\nUSEAGE : PLACE HOLDER\nThis item should be placed on the character that has the Precision Attack Manuever. \nThis items places an effect on the Actor that allows the rolling of a Superiority Die to \nbe added to the attack Roll before the TO HIT is evaluated.\n\nv2.0 Decemeber 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\nconst workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n\nif (args[0].macroPass === \"preCheckHits\") {\n const theItem = workflow;\n\n if ((theItem != null) && (theItem.name != \"Maneuvers: Precision Attack\")) {\n // define Actor, Target and Item\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n\n // Find Superiority Dice Resource\n let resource = await findSheetResource(pcActor, \"Superiority Dice\");\n if (!resource) {\n ui.notifications.error(\"Could not find a recource labeled 'Superiority Dice'...\");\n return;\n }\n\n // No more Superiority Dice\n let superiorityDice = resource.value;\n if (superiorityDice < 1) return;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"You are not a fighter battle master of at least 3rd level!\");\n return;\n }\n\n // make sure the attempted hit was made with a weapon attack\n if (![\"mwak\", \"rwak\"].includes(args[0].item.system.actionType)) {\n ui.notifications.error(\"Precision Attack only works with a weapon attack\");\n return;\n }\n\n // create a dialog and prompt to spend a superiority die\n let useSuperiorityDie = false;\n if (superiorityDice > 0) {\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Precision Attack\",\n content: \"

Use Precision Attack (cost 1 Superiority Die)?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n useSuperiorityDie = await dialog;\n } else return;\n\n if (!useSuperiorityDie) return;\n\n // if YES subtract a superiorty die\n let actorDup = duplicate(pcActor);\n await decrimentSheetResource(pcActor, \"Superiority Dice\", 1);\n \n // get the live MIDI-QOL workflow so we can make changes\n let newRoll = new Roll(`${workflow.attackRoll.result} + ${superiorityDie}`, workflow.actor.getRollData());\n newRoll = await newRoll.evaluate({ async: true });\n workflow.attackRoll = newRoll;\n workflow.attackRollTotal = newRoll.total;\n workflow.attackRollHTML = await workflow.attackRoll.render(newRoll);\n\n return;\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Test for available resource\n// Return resource object\nasync function findSheetResource(testActor, resourceName) {\n let resources = Object.values(testActor.system.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n return foundResource;\n}\n\n// Decriment available resource\nasync function decrimentSheetResource(testActor, resourceName, numValue) {\n const resourceKey = Object.keys(testActor.system.resources).find(k => testActor.system.resources[k].label.toLowerCase() === resourceName.toLowerCase());\n let newResources = duplicate(testActor.system.resources);\n newResources[resourceKey].value -= 1;\n await actor.update({\"system.resources\": newResources});\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.agdqkK2J5m95X9ww"},"favtab":{"isFavorite":true},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: AUTOMATED\n

This item should be placed on the character that has the Precision Attack Maneuver.  This item places an effect on the Actor that allows the rolling of a Superiority Die to be added to the attack Roll before the TO HIT is evaluated.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288010,"modifiedTime":1671805154295,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"crZvDRNgJyuEaasU"} -{"name":"Maneuvers: Pushing Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"4b89fc4768bf8f28f7f1bb85d5a415e5c9b91bc1","sourceId":"Item.iicg4efnww3tUROy"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[all]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Pushing Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Pushing Attack\n\nUSEAGE : ACTIVATE AFTER ATTACK\nThis Maneuver must be activated AFTER the character makes an attack and knows that a \nHIT was successful. This will activate any bonuses, saves, effects and extra damage \nto the TARGET. A Superiority Die will be expended immediately.\n\nv1.2 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postSave\") {\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // setup common variables\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const target = await fromUuid(args[0].targetUuids[0]);\n const diagonalRule = canvas.grid.diagonRule;\n\n // If save failed\n if (workflow.failedSaves.size >= 1) {\n //prompt for push distance\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Pushing Attack\",\n content: \"

How far would you like to push the target?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

5 ft.

\",\n callback: () => resolve(1)\n },\n two: {\n icon: '

',\n label: \"

10 ft.

\",\n callback: () => { resolve(2) }\n },\n three: {\n icon: '

',\n label: \"

15 ft.

\",\n callback: () => { resolve(3) }\n }\n },\n default: \"three\"\n }).render(true);\n });\n\n const distanceTravelled = await dialog;\n\n // create a ray to measure the angle to travel\n canvas.grid.diagonalRule = \"EUCL\";\n let travelRay = new Ray(token.center, target.object.center);\n const angle = travelRay.angle;\n travelRay.distance = travelRay.dx * distanceTravelled;\n\n // create a new ray with the same angle but shorter to allow for the token sizes\n travelRay = Ray.fromAngle(token.x, token.y, angle,\n Math.floor(travelRay.distance + Math.sqrt(target.object.height ** 2 + target.object.width ** 2) / 2));\n canvas.grid.diagonalRule = diagonalRule;\n\n // update the canvas to move the token\n await target.data.document.update(canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y));\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Maneuvers: Pushing Attack","type":"script","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Pushing Attack\n\nUSEAGE : ACTIVATE AFTER ATTACK\nThis Maneuver must be activated AFTER the character makes an attack and knows that a \nHIT was successful. This will activate any bonuses, saves, effects and extra damage \nto the TARGET. A Superiority Die will be expended immediately.\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postSave\") {\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // setup common variables\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const target = await fromUuid(args[0].targetUuids[0]);\n const diagonalRule = canvas.grid.diagonRule;\n\n // If save failed\n if (workflow.failedSaves.size >= 1) {\n //prompt for push distance\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Pushing Attack\",\n content: \"

How far would you like to push the target?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

5 ft.

\",\n callback: () => resolve(1)\n },\n two: {\n icon: '

',\n label: \"

10 ft.

\",\n callback: () => { resolve(2) }\n },\n three: {\n icon: '

',\n label: \"

15 ft.

\",\n callback: () => { resolve(3) }\n }\n },\n default: \"three\"\n }).render(true);\n });\n\n const distanceTravelled = await dialog;\n\n // create a ray to measure the angle to travel\n canvas.grid.diagonalRule = \"EUCL\";\n let travelRay = new Ray(token.center, target.object.center);\n const angle = travelRay.angle;\n travelRay.distance = travelRay.dx * distanceTravelled;\n\n // create a new ray with the same angle but shorter to allow for the token sizes\n travelRay = Ray.fromAngle(token.x, token.y, angle,\n Math.floor(travelRay.distance + Math.sqrt(target.object.height ** 2 + target.object.width ** 2) / 2));\n canvas.grid.diagonalRule = diagonalRule;\n\n // update the canvas to move the token\n //await target.document.update(canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y));\n await target.update(canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y));\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n const resourceKey = Object.keys(testActor.system.resources).find(k => testActor.system.resources[k].label.toLowerCase() === resourceName.toLowerCase());\n let newResources = duplicate(testActor.system.resources);\n newResources[resourceKey].value += 1;\n await actor.update({\"system.resources\": newResources});\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

When you hit a creature with a weapon attack, you can expend one superiority die to attempt to drive the target back. You add the superiority die to the attack’s damage roll, and if the target is Large or smaller, it must make a Strength saving throw. On a failed save, you push the target up to 15 feet away from you.

\n

 

\n
\nUSEAGE: ACTIVATE AFTER ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects and extra damage to the TARGET.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 March 22 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"str","actionType":"save","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"str","dc":16,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288054,"modifiedTime":1671805154297,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"NPhyx59rDDi9jAcV"} -{"name":"Maneuvers: Quick Toss","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[{"_id":"yvrty0152p8tpf0a","changes":[{"key":"system.bonuses.rwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":20}],"disabled":false,"duration":{"rounds":1,"startTime":null,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/weapons-crossed-swords-yellow.webp","label":"Maneuvers: Quick Toss","origin":"Actor.67GUmdTadYmGXD8W.Item.8ehitphcFmvocZ65","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:rwak"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"312bc05783f108bbd5d527882f9510e49583acb5","sourceId":"Item.te09IsjRSE5O0QVl"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE THE ATTACK\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.  This bonus is added to the next ranged weapon attack, it is up to the player/GM to make sure the weapon is thrown and not shot.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288036,"modifiedTime":1671805154301,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"NKRpVswItHaL8flf"} -{"name":"Maneuvers: Rally","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"8mjpwr1wsce7hnw0","changes":[{"key":"system.attributes.hp.temp","mode":2,"value":"[[@flags.dae.SuperiorityDie + @abilities.cha.mod]]","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Rally","origin":"Actor.67GUmdTadYmGXD8W.Item.0RU6a1fysK70I7Zy","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"ed5694e459ce2577f9b1bbe2fc696567f893b218","sourceId":"Item.L5VDjrpXSldWFqvy"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Rally","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will set up any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":1,"width":null,"units":"","type":"ally"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288022,"modifiedTime":1671805154306,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"BNxvgcCdbM46PYf5"} -{"name":"Maneuvers: Riposte","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[{"_id":"w2qe6rnd1i9b1wch","changes":[{"key":"system.bonuses.mwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":20},{"key":"system.bonuses.rwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":20}],"disabled":false,"duration":{"startTime":null,"rounds":1,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/weapons-crossed-swords-yellow.webp","label":"Maneuvers: Riposte","origin":"Actor.67GUmdTadYmGXD8W.Item.bym5FEbnUSgBlVvn","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:mwak","1Attack:rwak"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53568","entityTypeId":"222216831","componentId":20,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"419df84db7bea725ddded1aa2012b53f92c861ac","sourceId":"Item.RshIkI99F7fViWIH"},"favtab":{"isFavorite":true},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Riposte","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.UEksWqqwtvXm3oXs"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE ATTACK\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288008,"modifiedTime":1671805154312,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"VOgRE30FenI21jPi"} -{"name":"Maneuvers: Sweeping Attack","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"0cd2006603d8444091fe818b73ca8295c08987d2","sourceId":"Item.q6t3XhMQaooicZh4"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE THE ATTACK\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.  After the first hit, target the second Target and activate this Maneuver to apply the damage.  To Hit on the second target is manual.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"util","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288079,"modifiedTime":1671805154315,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"Hqki0bEiQcoB0ILH"} -{"name":"Maneuvers: Tactical Assessment","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"8mjpwr1wsce7hnw0","changes":[{"key":"system.skills.inv.bonuses.check","mode":2,"value":"@flags.dae.SuperiorityDie","priority":1},{"key":"system.skills.his.bonuses.check","mode":2,"value":"@flags.dae.SuperiorityDie","priority":1},{"key":"system.skills.ins.bonuses.check","mode":2,"value":"@flags.dae.SuperiorityDie","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Tactical Assessment","origin":"Actor.67GUmdTadYmGXD8W.Item.0RU6a1fysK70I7Zy","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isSkill.his","isSkill.ins","isSkill.inv"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"d05f76379e64c00c354b8859258e9b1183d82991","sourceId":"Item.yjxxojTqQSabWTMo"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will set up any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193287989,"modifiedTime":1671805154317,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"b6Wj7v2Q3aEGOm5o"} -{"name":"Maneuvers: Trip Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"i4g2r9vxpxdcpg2f","changes":[{"key":"flags.midi-qol.grants.advantage.attack.mwak","mode":0,"value":"1","priority":0},{"key":"flags.midi-qol.grants.advantage.attack.msak","mode":0,"value":"1","priority":0},{"key":"flags.midi-qol.grants.disadvantage.attack.rwak","mode":0,"value":"1","priority":0},{"key":"flags.midi-qol.grants.disadvantage.attack.rsak","mode":0,"value":"1","priority":0},{"key":"flags.midi-qol.disadvantage.attack.all","mode":0,"value":"1","priority":0},{"key":"system.attributes.movement.all","mode":0,"value":"*0.5","priority":5}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tip-chipped-blood-red.webp","label":"Prone","origin":"Actor.67GUmdTadYmGXD8W.Item.HvWHb09XxW9i1QDj","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Prone"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":true,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Trip Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"1dcea6aff7806d89210bd343f12b5543c1904629","sourceId":"Item.KgWzNdtSsh8v3coU"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"dex","actionType":"save","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"str","dc":null,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288020,"modifiedTime":1671805154320,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"Ewqb1v38Va7WLosL"} -{"name":"Superiority Die","type":"feat","img":"icons/sundries/gaming/dice-runed-brown.webp","effects":[{"_id":"UgB9349LhJU4nKsd","changes":[{"key":"macro.itemMacro","mode":0,"value":"","priority":20}],"disabled":false,"duration":{"startTime":null,"startRound":null,"startTurn":null,"seconds":null,"combat":null,"rounds":null,"turns":null},"icon":"icons/sundries/gaming/dice-runed-brown.webp","label":"Superiority Die","origin":"Item.H14LgNk3j1O3e3FV","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"dnd5e-helpers":{"rest-effect":"Ignore"},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":false}}},"tint":null}],"flags":{"ddbimporter":{"id":"1023","entityTypeId":"222216831","componentId":209,"componentTypeId":12168134,"class":"Fighter","subclass":"Battle Master","dndbeyond":{"levelScale":{"id":12,"level":7,"description":"d8","dice":{"diceCount":5,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"5d8"},"fixedValue":null},"levelScales":[{"id":11,"level":1,"description":"d8","dice":{"diceCount":4,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"4d8"},"fixedValue":null},{"id":12,"level":7,"description":"d8","dice":{"diceCount":5,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"5d8"},"fixedValue":null},{"id":13,"level":10,"description":"d10","dice":{"diceCount":5,"diceValue":10,"diceMultiplier":null,"fixedValue":null,"diceString":"5d10"},"fixedValue":null},{"id":14,"level":15,"description":"d10","dice":{"diceCount":6,"diceValue":10,"diceMultiplier":null,"fixedValue":null,"diceString":"6d10"},"fixedValue":null},{"id":15,"level":18,"description":"d12","dice":{"diceCount":6,"diceValue":12,"diceMultiplier":null,"fixedValue":null,"diceString":"6d12"},"fixedValue":null}],"limitedUse":[{"level":null,"uses":1}]},"importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"scene-packer":{"hash":"9ece162ff10d8aa5c863a090caae31adabc334f2","sourceId":"Item.Q3m6hRxQLGBg4hSw"},"core":{"sourceId":"Item.8gdA6c8j5GnkX33K"},"itemacro":{"macro":{"data":{"_id":null,"name":"Superiority Die","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster : Superiority Die\n\nUSEAGE : PASSIVE\nThis item must be on the character for Manuevers to function. \nIt does not do anything directly but is a helper effect to determine the Battle Master Hit Die (d8, d10, d12) based on level.\n \nv1.3 August 6 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n console.log(\"MACRO TEST | PC Actor: %O\", pcActor);\n\n // Test Class\n let pcFighter = pcActor.getRollData().classes?.fighter;\n if (pcFighter === null) {\n ui.notifications.error(\"You are not a Fighter!\");\n return;\n }\n\n // Test Subclass\n let pcFighterSubclass = pcActor.getRollData().classes.fighter?.subclass.identifier;\n if (pcFighterSubclass != \"battle-master\") {\n ui.notifications.error(\"You are not a Fighter Battlemaster!\");\n return;\n }\n\n //const roll = await(new Roll(`2d8 + ${pcPaladin.levels}`)).roll();\n let fighterLevel = pcFighter.levels;\n console.log(\"MACRO TEST | Fighter Levels: %s\", fighterLevel);\n\n let flagData;\n if (fighterLevel > 17) flagData = \"+ 1d12\";\n else if (fighterLevel > 9) flagData = \"+ 1d10\";\n else if (fighterLevel > 0) flagData = \"+ 1d8\";\n pcActor.setFlag(\"dae\", \"SuperiorityDie\", flagData)\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"SuperiorityDie\");\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Superiority Die","type":"script","scope":"global","command":"/*****\nFighter Battlemaster : Superiority Die\n\nUSEAGE : PASSIVE\nThis item must be on the character for Manuevers to function. \nIt does not do anything directly but is a helper effect to determine the Battle Master Hit Die (d8, d10, d12) based on level.\n \nv2.0 December 16 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n\n // Test Class\n let pcFighter = pcActor.getRollData().classes?.fighter;\n if (pcFighter === null) {\n ui.notifications.error(\"You are not a Fighter!\");\n return;\n }\n\n // Test Subclass\n let pcFighterSubclass = pcActor.getRollData().classes.fighter?.subclass.identifier;\n if (pcFighterSubclass != \"battle-master\") {\n ui.notifications.error(\"You are not a Fighter Battlemaster!\");\n return;\n }\n\n //const roll = await(new Roll(`2d8 + ${pcPaladin.levels}`)).roll();\n let fighterLevel = pcFighter.levels;\n\n let flagData;\n if (fighterLevel > 17) flagData = \"+ 1d12\";\n else if (fighterLevel > 9) flagData = \"+ 1d10\";\n else if (fighterLevel > 0) flagData = \"+ 1d8\";\n pcActor.setFlag(\"dae\", \"SuperiorityDie\", flagData)\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"SuperiorityDie\");\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"},"favtab":{"isFavorite":true},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: PASSIVE\n

This item must be on the character for Manuevers to function.  It does not do anything directly but is a helper effect to determine the Battle Master Hit Die (d8, d10, d12) based on level.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":0,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288018,"modifiedTime":1671805154323,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"u4GDIFKZ1Coj8KSL"} +{"name":"Maneuvers: Tactical Assessment","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"8mjpwr1wsce7hnw0","changes":[{"key":"system.skills.inv.bonuses.check","mode":2,"value":"@flags.dae.SuperiorityDie","priority":1},{"key":"system.skills.his.bonuses.check","mode":2,"value":"@flags.dae.SuperiorityDie","priority":1},{"key":"system.skills.ins.bonuses.check","mode":2,"value":"@flags.dae.SuperiorityDie","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Tactical Assessment","origin":"Actor.67GUmdTadYmGXD8W.Item.0RU6a1fysK70I7Zy","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isSkill.his","isSkill.ins","isSkill.inv"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"d05f76379e64c00c354b8859258e9b1183d82991","sourceId":"Item.yjxxojTqQSabWTMo"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will set up any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193287989,"modifiedTime":1672520397427,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"5ASfIb3uvQ7XEpgz"} +{"name":"Maneuvers: Menacing Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"z6c1xhx4agrwbd3z","changes":[{"key":"flags.midi-qol.disadvantage.attack.all","mode":0,"value":"1","priority":0},{"key":"flags.midi-qol.disadvantage.ability.check.all","mode":0,"value":"1","priority":0}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tip-chipped-blood-red.webp","label":"Frightened","origin":"Actor.67GUmdTadYmGXD8W.Item.uIJSbACjp9yNcSdf","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Frightened"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":true,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Trip Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"3b1cce900ddae017cdb5c1474a8586d4eddc35c9","sourceId":"Item.oxZRFhfPKJyOgAOT"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"str","actionType":"save","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"wis","dc":null,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193287984,"modifiedTime":1672520397387,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"6gJet52IjImPDfg7"} +{"name":"Maneuvers: Precision Attack","type":"feat","img":"icons/skills/melee/strike-sword-steel-yellow.webp","effects":[{"_id":"og6qejg1f0p7b8ws","changes":[{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Maneuvers: Precision Attack,preCheckHits","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/ranged/target-bullseye-archer-orange.webp","label":"Maneuvers: Precision Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.RryNpmf0SaXo2jua","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53565","entityTypeId":"222216831","componentId":17,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"50fe4df14a66d36c8f6e97b5ae8a537a3408cc2a","sourceId":"Item.8JjIXHdVPlHQ56nt"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Precision Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster Maneuver: Precision Attack\n\nUSEAGE : PLACE HOLDER\nThis item should be placed on the character that has the Precision Attack Manuever. \nThis items places an effect on the Actor that allows the rolling of a Superiority Die to \nbe added to the attack Roll before the TO HIT is evaluated.\n\nv1.2 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\nconst workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n\nif (args[0].macroPass === \"preCheckHits\") {\n const theItem = workflow;\n\n if ((theItem != null) && (theItem.name != \"Maneuvers: Precision Attack\")) {\n // define Actor, Target and Item\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n\n // Find Superiority Dice Resource\n let resource = await findSheetResource(pcActor, \"Superiority Dice\");\n if (!resource) {\n ui.notifications.error(\"Could not find a recource labeled 'Superiority Dice'...\");\n return;\n }\n\n // No more Superiority Dice\n let superiorityDice = resource.value;\n if (superiorityDice < 1) return;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"You are not a fighter battle master of at least 3rd level!\");\n return;\n }\n\n // make sure the attempted hit was made with a weapon attack\n if (![\"mwak\", \"rwak\"].includes(args[0].item.data.actionType)) {\n ui.notifications.error(\"Precision Attack only works with a weapon attack\");\n return;\n }\n\n // create a dialog and prompt to spend a superiority die\n let useSuperiorityDie = false;\n if (superiorityDice > 0) {\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Precision Attack\",\n content: \"

Use Precision Attack (cost 1 Superiority Die)?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n useSuperiorityDie = await dialog;\n } else return;\n\n if (!useSuperiorityDie) return;\n\n // if YES subtract a superiorty die\n await decrimentSheetResource(pcActor, \"Superiority Dice\", 1);\n\n // get the live MIDI-QOL workflow so we can make changes\n let newRoll = new Roll(`${workflow.attackRoll.result} + ${superiorityDie}`, workflow.actor.getRollData());\n newRoll = await newRoll.evaluate({ async: true });\n workflow.attackRoll = newRoll;\n workflow.attackRollTotal = newRoll.total;\n workflow.attackRollHTML = await workflow.attackRoll.render(newRoll);\n\n return;\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Test for available resource\n// Return resource object\nasync function findSheetResource(testActor, resourceName) {\n let resources = Object.values(testActor.data.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n return foundResource;\n}\n\n// Decriment available resource\nasync function decrimentSheetResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n foundResource.value = foundResource.value - numValue;\n await testActor.update(actorDup);\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Maneuvers: Precision Attack","type":"script","scope":"global","command":"/*****\nFighter Battlemaster Maneuver: Precision Attack\n\nUSEAGE : PLACE HOLDER\nThis item should be placed on the character that has the Precision Attack Manuever. \nThis items places an effect on the Actor that allows the rolling of a Superiority Die to \nbe added to the attack Roll before the TO HIT is evaluated.\n\nv2.0 Decemeber 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\nconst workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n\nif (args[0].macroPass === \"preCheckHits\") {\n const theItem = workflow;\n\n if ((theItem != null) && (theItem.name != \"Maneuvers: Precision Attack\")) {\n // define Actor, Target and Item\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n\n // Find Superiority Dice Resource\n let resource = await findSheetResource(pcActor, \"Superiority Dice\");\n if (!resource) {\n ui.notifications.error(\"Could not find a recource labeled 'Superiority Dice'...\");\n return;\n }\n\n // No more Superiority Dice\n let superiorityDice = resource.value;\n if (superiorityDice < 1) return;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"You are not a fighter battle master of at least 3rd level!\");\n return;\n }\n\n // make sure the attempted hit was made with a weapon attack\n if (![\"mwak\", \"rwak\"].includes(args[0].item.system.actionType)) {\n ui.notifications.error(\"Precision Attack only works with a weapon attack\");\n return;\n }\n\n // create a dialog and prompt to spend a superiority die\n let useSuperiorityDie = false;\n if (superiorityDice > 0) {\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Precision Attack\",\n content: \"

Use Precision Attack (cost 1 Superiority Die)?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

Yes

\",\n callback: () => resolve(true)\n },\n two: {\n icon: '

',\n label: \"

No

\",\n callback: () => { resolve(false) }\n }\n },\n default: \"two\"\n }).render(true);\n });\n useSuperiorityDie = await dialog;\n } else return;\n\n if (!useSuperiorityDie) return;\n\n // if YES subtract a superiorty die\n let actorDup = duplicate(pcActor);\n await decrimentSheetResource(pcActor, \"Superiority Dice\", 1);\n \n // get the live MIDI-QOL workflow so we can make changes\n let newRoll = new Roll(`${workflow.attackRoll.result} + ${superiorityDie}`, workflow.actor.getRollData());\n newRoll = await newRoll.evaluate({ async: true });\n workflow.attackRoll = newRoll;\n workflow.attackRollTotal = newRoll.total;\n workflow.attackRollHTML = await workflow.attackRoll.render(newRoll);\n\n return;\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------\n\n// Test for available resource\n// Return resource object\nasync function findSheetResource(testActor, resourceName) {\n let resources = Object.values(testActor.system.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n return foundResource;\n}\n\n// Decriment available resource\nasync function decrimentSheetResource(testActor, resourceName, numValue) {\n const resourceKey = Object.keys(testActor.system.resources).find(k => testActor.system.resources[k].label.toLowerCase() === resourceName.toLowerCase());\n let newResources = duplicate(testActor.system.resources);\n newResources[resourceKey].value -= 1;\n await actor.update({\"system.resources\": newResources});\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.agdqkK2J5m95X9ww"},"favtab":{"isFavorite":true},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: AUTOMATED\n

This item should be placed on the character that has the Precision Attack Maneuver.  This item places an effect on the Actor that allows the rolling of a Superiority Die to be added to the attack Roll before the TO HIT is evaluated.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288010,"modifiedTime":1672520397395,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"6m9kc2CN2fN9YD5S"} +{"name":"Maneuvers: Brace","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[{"_id":"wkpprdr3mk9xsqnb","changes":[{"key":"system.bonuses.mwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":20},{"key":"system.bonuses.rwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":20}],"disabled":false,"duration":{"rounds":1,"startTime":null,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/weapons-crossed-swords-yellow.webp","label":"Maneuvers: Brace","origin":"Actor.67GUmdTadYmGXD8W.Item.5iFlJVD10sudUgOQ","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:mwak","1Attack:rwak"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"7710d6efc3a027bc2d228034bd12270da9a6ccf6","sourceId":"Item.s0MAI5ToTgbFxID8"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.BYW8Ciw9YoYj97zI"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE ATTACK\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288000,"modifiedTime":1672520397309,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"HaBRgC22AJTBG4pg"} +{"name":"Maneuvers: Sweeping Attack","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"0cd2006603d8444091fe818b73ca8295c08987d2","sourceId":"Item.q6t3XhMQaooicZh4"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE THE ATTACK\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.  After the first hit, target the second Target and activate this Maneuver to apply the damage.  To Hit on the second target is manual.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"util","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288079,"modifiedTime":1672520397423,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"I4RRpUd8VKw6pDLU"} +{"name":"Maneuvers: Lunging Attack","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[{"_id":"51gy6rzi5b0s0bws","changes":[{"key":"system.bonuses.mwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":1},{"key":"flags.midi-qol.onUseMacroName","mode":0,"value":"ItemMacro.Maneuvers: Lunging Attack,preItemRoll","priority":10}],"disabled":false,"duration":{"rounds":1,"startTime":null,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/weapons/polearms/spear-flared-bronze-teal.webp","label":"Maneuvers: Lunging Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.hkchEm8jxUTaR2Ng","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:mwak"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"0aef1bb3ed0d68b32bfc393f0ce13ad46ddfaca0","sourceId":"Item.py9zgXqY2NkIagJL"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Lunging Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Lunging Attack\n\n*** AWAITING SOLUTION FROM MIDI TO GET THIS TO WORK WITH RANGE CHECKING ***\n\nUSEAGE : ACTIVATE BEFORE ATTACK\nThis Maneuver must be activated BEFORE the character makes an attack. \nThis will setup any bonuses and effects on the TARGET character. \nA Superiority Die will be expended immediately.\n\nv1.2 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// Activate on preActiveEffects\nif (args[0].macroPass === \"preItemRoll\") {\n\n // Item itself defining the workflow \n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // make sure the attempted hit was made with a melee weapon attack\n if ((theItem != null) && (theItem.name != \"Maneuvers: Lunging Attack\")) {\n if (![\"mwak\"].includes(args[0].item.data.actionType)) {\n ui.notifications.error(\"Lunging Attack only works with a melee weapon attack\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n else {\n let range = theItem.data.data.range.value;\n theItem.data.data.range.value = (range + 5);\n }\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Maneuvers: Lunging Attack","type":"script","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Lunging Attack\n\n*** AWAITING SOLUTION FROM MIDI TO GET THIS TO WORK WITH RANGE CHECKING ***\n\nUSEAGE : ACTIVATE BEFORE ATTACK\nThis Maneuver must be activated BEFORE the character makes an attack. \nThis will setup any bonuses and effects on the TARGET character. \nA Superiority Die will be expended immediately.\n\nv2.0 December 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// Activate on preActiveEffects\nif (args[0].macroPass === \"preItemRoll\") {\n\n // Item itself defining the workflow \n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // make sure the attempted hit was made with a melee weapon attack\n if ((theItem != null) && (theItem.name != \"Maneuvers: Lunging Attack\")) {\n if (![\"mwak\"].includes(args[0].item.system.actionType)) {\n ui.notifications.error(\"Lunging Attack only works with a melee weapon attack\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n else {\n let range = theItem.system.range.value;\n theItem.system.range.value = (range + 5);\n }\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.system.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE THE ATTACK\n

*** This maneuver does not work with MIDI-QOL Range checking, awaiting patch ***

\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193287987,"modifiedTime":1672520397375,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"IUdDF5OJo8Emg4In"} +{"name":"Maneuvers: Parry","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-white-blue.webp","effects":[{"_id":"hh9G9bIo7PnCBcco","changes":[{"key":"flags.midi-qol.DR.all","mode":2,"value":"[[@flags.dae.SuperiorityDie + @abilities.dex.mod]]","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/weapons-crossed-swords-white-blue.webp","label":"Parry","origin":"Item.7129rM93Fl9drjmu","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Reaction"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"dnd5e-helpers":{"rest-effect":"Ignore"},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53564","entityTypeId":"222216831","componentId":16,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"favtab":{"isFavorite":true},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Parry","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"scene-packer":{"hash":"5d51df83925f0bf824d9731dcbc40a7412007c4f","sourceId":"Item.uDSqXHjG9wgsONdt"},"core":{"sourceId":"Item.7129rM93Fl9drjmu"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: AUTOMATED\n

This is an automated Maneuver, place it on the character sheet and it will come up in the MIDI-QOL reaction workflow without manual activation.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"reactiondamage","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288042,"modifiedTime":1672520397391,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"KMRPT9JUbcArw9gs"} +{"name":"Maneuvers: Bait and Switch","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"77ab7675200dd1694bb4cb12466c654db3b2b896","sourceId":"Item.DQlHsd0NZ7aGNZ4F"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[preActiveEffects]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Bait and Switch","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster Maneuver: Bait and Switch\n\nUSEAGE : ACTIVATE ANYTIME\nThis is a utility Maneuver and can be used whenever your character can take an action. \nThis will setup any bonuses and effects on the TARGET actor. \nA Superiority Die will be expended immediately.\n\nv1.2 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// Activate on preActiveEffects\nif (args[0].macroPass === \"preActiveEffects\") {\n\n // define Actor, Target and Workflow\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n const targetActor = args[0].targets[0].actor;\n let pcToken = token;\n let targetToken = await fromUuid(args[0].hitTargetUuids[0]);\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // check to make sure target is not incapacitated\n if (!(targetActor.data.data.attributes.hp.value > 0)) {\n ui.notifications.error(\"Your target must be conscious!\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"You are not a fighter battlemaster of at least level 3!\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // Roll superiority die for AC Bonus result\n const acBonusRoll = await(new Roll(`${superiorityDie}`)).roll();\n\n //prompt for who gets the AC bonus\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Bait and Switch\",\n content: \"

Who gets the AC bonus for 1 turn You or Target?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

You

\",\n callback: () => resolve(\"YOU\")\n },\n two: {\n icon: '

',\n label: \"

Target

\",\n callback: () => { resolve(\"TARGET\") }\n }\n },\n default: \"two\"\n }).render(true);\n });\n\n let choiceACBonus = await dialog;\n\n if (choiceACBonus === \"YOU\") {\n // Set Actor Active Effect for AC bonus\n await pcActor.createEmbeddedDocuments(\"ActiveEffect\", [{\n \"changes\": [{ \"key\": \"data.attributes.ac.bonus\", \"mode\": 2, \"value\": `${acBonusRoll.total}`, \"priority\": \"20\" }],\n \"label\": \"Bait and Switch AC Bonus\",\n \"duration\": { seconds: 0, rounds: 0, turns: 1 },\n \"origin\": args[0].itemUuid,\n \"icon\": \"systems/dnd5e/icons/skills/gray_10.jpg\",\n }]);\n } else {\n // Set Target Active Effect for AC bonus\n await targetActor.createEmbeddedDocuments(\"ActiveEffect\", [{\n \"changes\": [{ \"key\": \"data.attributes.ac.bonus\", \"mode\": 2, \"value\": `${acBonusRoll.total}`, \"priority\": \"20\" }],\n \"label\": \"Bait and Switch AC Bonus\",\n \"duration\": { seconds: 0, rounds: 0, turns: 1 },\n \"origin\": args[0].itemUuid,\n \"icon\": \"systems/dnd5e/icons/skills/gray_10.jpg\",\n }]);\n }\n\n // Swap the token positions positions on the canvas\n await SwapTokens(pcToken, targetToken, canvas);\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\nasync function SwapTokens(pcMoveToken, targetMoveToken, thisCanvas) {\n let targetCenter = targetMoveToken.object.center;\n let pcCenter = pcMoveToken.center;\n let snappedPosition = null;\n\n thisCanvas.grid.diagonalRule = \"EUCL\";\n const diagonalRule = canvas.grid.diagonRule;\n\n // Move Actor to OLD Target Location\n let travelRay = new Ray(pcCenter, targetCenter); // create a ray to measure the angle to travel\n let angle = travelRay.angle;\n travelRay = Ray.fromAngle(pcMoveToken.data.x, pcMoveToken.data.y, angle, travelRay.distance);\n snappedPosition = canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y);\n canvas.grid.diagonalRule = diagonalRule;\n await pcMoveToken.document.update(canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y));\n\n // Move Target to OLD Actor Location\n travelRay = new Ray(targetCenter, pcCenter); // create a ray to measure the angle to travel\n angle = travelRay.angle;\n travelRay = Ray.fromAngle(targetMoveToken.data.x, targetMoveToken.data.y, angle, travelRay.distance);\n snappedPosition = canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y);\n canvas.grid.diagonalRule = diagonalRule;\n await targetMoveToken.data.document.update(canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y));\n\n return;\n}\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Maneuvers: Bait and Switch","type":"script","scope":"global","command":"/*****\nFighter Battlemaster Maneuver: Bait and Switch\n\nUSEAGE : ACTIVATE ANYTIME\nThis is a utility Maneuver and can be used whenever your character can take an action. \nThis will setup any bonuses and effects on the TARGET actor. \nA Superiority Die will be expended immediately.\n\nv2.0 December 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\n// Activate on preActiveEffects\nif (args[0].macroPass === \"preActiveEffects\") {\n\n // define Actor, Target and Workflow\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n const targetActor = args[0].targets[0].actor;\n let pcToken = token;\n let targetToken = await fromUuid(args[0].hitTargetUuids[0]);\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n \n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // check to make sure target is not incapacitated\n if (!(targetActor.system.attributes.hp.value > 0)) {\n ui.notifications.error(\"Your target must be conscious!\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"You are not a fighter battlemaster of at least level 3!\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // Roll superiority die for AC Bonus result\n const acBonusRoll = await(new Roll(`${superiorityDie}`)).evaluate({async: true});\n\n //prompt for who gets the AC bonus\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Bait and Switch\",\n content: \"

Who gets the AC bonus for 1 turn You or Target?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

You

\",\n callback: () => resolve(\"YOU\")\n },\n two: {\n icon: '

',\n label: \"

Target

\",\n callback: () => { resolve(\"TARGET\") }\n }\n },\n default: \"two\"\n }).render(true);\n });\n\n let choiceACBonus = await dialog;\n\n if (choiceACBonus === \"YOU\") {\n // Set Actor Active Effect for AC bonus\n await pcActor.createEmbeddedDocuments(\"ActiveEffect\", [{\n \"changes\": [{ \"key\": \"data.attributes.ac.bonus\", \"mode\": 2, \"value\": `${acBonusRoll.total}`, \"priority\": \"20\" }],\n \"label\": \"Bait and Switch AC Bonus\",\n \"duration\": { seconds: 0, rounds: 0, turns: 1 },\n \"origin\": args[0].itemUuid,\n \"icon\": \"icons/magic/defensive/shield-barrier-blue.webp\",\n }]);\n } else {\n // Set Target Active Effect for AC bonus\n await targetActor.createEmbeddedDocuments(\"ActiveEffect\", [{\n \"changes\": [{ \"key\": \"data.attributes.ac.bonus\", \"mode\": 2, \"value\": `${acBonusRoll.total}`, \"priority\": \"20\" }],\n \"label\": \"Bait and Switch AC Bonus\",\n \"duration\": { seconds: 0, rounds: 0, turns: 1 },\n \"origin\": args[0].itemUuid,\n \"icon\": \"icons/magic/defensive/shield-barrier-blue.webp\",\n }]);\n }\n\n // Swap the token positions positions on the canvas\n await SwapTokens(pcToken, targetToken, canvas);\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\nasync function SwapTokens(pcMoveToken, targetMoveToken, thisCanvas) {\n let targetCenter = targetMoveToken.object.center;\n let pcCenter = pcMoveToken.center;\n let snappedPosition = null;\n\n thisCanvas.grid.diagonalRule = \"EUCL\";\n const diagonalRule = canvas.grid.diagonRule;\n\n // Move Actor to Target Location\n let travelRay = new Ray(pcCenter, targetCenter); // create a ray to measure the angle to travel\n let angle = travelRay.angle;\n travelRay = Ray.fromAngle(pcMoveToken.x, pcMoveToken.y, angle, travelRay.distance);\n snappedPosition = canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y);\n canvas.grid.diagonalRule = diagonalRule;\n // move Actor token\n const mutationActorData = { token: {x: snappedPosition.x, y: snappedPosition.y}};\n let actorDoc = token.document;\n await warpgate.mutate(actorDoc, mutationActorData, {}, {permanent: true});\n\n // Move Target to Actor Location\n travelRay = new Ray(targetCenter, pcCenter); // create a ray to measure the angle to travel\n angle = travelRay.angle;\n travelRay = Ray.fromAngle(targetMoveToken.x, targetMoveToken.y, angle, travelRay.distance);\n snappedPosition = canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y);\n canvas.grid.diagonalRule = diagonalRule;\n // move Target token \n const mutationTargetData = { token: {x: snappedPosition.x, y: snappedPosition.y}};\n let targetDoc = args[0].hitTargets[0];\n await warpgate.mutate(targetDoc, mutationTargetData, {}, {permanent: true});\n\n return;\n}\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n const resourceKey = Object.keys(testActor.system.resources).find(k => testActor.system.resources[k].label.toLowerCase() === resourceName.toLowerCase());\n let newResources = duplicate(testActor.system.resources);\n newResources[resourceKey].value += 1;\n await actor.update({\"system.resources\": newResources});\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":null,"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will set up any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193287996,"modifiedTime":1672520397301,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"OollNcmPYG4vzLlA"} +{"name":"Maneuvers: Feinting Attack","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[{"_id":"tyr9bqr24wew5lex","changes":[{"key":"flags.midi-qol.advantage.attack.mwak","mode":0,"value":"1","priority":0},{"key":"system.bonuses.mwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":5}],"disabled":false,"duration":{"startTime":null,"rounds":1,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/weapons-crossed-swords-yellow.webp","label":"Maneuvers: Feinting Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.EbURPL9F8boGsK20","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:mwak"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"85aac26e899cf5a523c91c7b5bb55a19c39f1a27","sourceId":"Item.t1c6JDGWTxNA0Q37"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE THE ATTACK\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288024,"modifiedTime":1672520397358,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"ULd1ks4wubtGqEcX"} +{"name":"Maneuvers: Goading Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"z6c1xhx4agrwbd3z","changes":[],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/skills/wounds/injury-face-impact-orange.webp","label":"Maneuvers: Goading Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.uIJSbACjp9yNcSdf","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Taunted"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":true,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Trip Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"a74c4bb65a570b572962289367a6c2543de3f455","sourceId":"Item.GWaFUJ2ArnVtQvqm"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK\n

*** This Maneuver is incomplete ***

\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.  If the target fails the WIS save, an empty effect will be placed on the TARGET.  This effect is to remind the GM that attacks against all but the goading actor are at disadvantage. 

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v0.5 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"str","actionType":"save","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"wis","dc":null,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288017,"modifiedTime":1672520397362,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"UN8rojmzgZyel3kG"} +{"name":"Maneuvers: Trip Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"i4g2r9vxpxdcpg2f","changes":[{"key":"flags.midi-qol.grants.advantage.attack.mwak","mode":0,"value":"1","priority":0},{"key":"flags.midi-qol.grants.advantage.attack.msak","mode":0,"value":"1","priority":0},{"key":"flags.midi-qol.grants.disadvantage.attack.rwak","mode":0,"value":"1","priority":0},{"key":"flags.midi-qol.grants.disadvantage.attack.rsak","mode":0,"value":"1","priority":0},{"key":"flags.midi-qol.disadvantage.attack.all","mode":0,"value":"1","priority":0},{"key":"system.attributes.movement.all","mode":0,"value":"*0.5","priority":5}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tip-chipped-blood-red.webp","label":"Prone","origin":"Actor.67GUmdTadYmGXD8W.Item.HvWHb09XxW9i1QDj","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Prone"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":true,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Trip Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"1dcea6aff7806d89210bd343f12b5543c1904629","sourceId":"Item.KgWzNdtSsh8v3coU"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"dex","actionType":"save","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"str","dc":null,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288020,"modifiedTime":1672520397431,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"WqgXJyqvQAt2xRx2"} +{"name":"Maneuvers: Ambush","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"8mjpwr1wsce7hnw0","changes":[{"key":"system.attributes.init.bonus","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":1},{"key":"system.skills.ste.bonuses.check","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Maneuvers: Ambush","origin":"Actor.67GUmdTadYmGXD8W.Item.0RU6a1fysK70I7Zy","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["turnStart","isSkill.ste"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"6fd0889347ef4a085e1386813035f416e8ec36b9","sourceId":"Item.nJJhCsmnlO9ZiFRM"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will set up any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288015,"modifiedTime":1672520397296,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"YvV3pJFKn8hESjib"} +{"name":"Maneuvers: Pushing Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"b7343ecaf6719582e356cc563407bcb80d031a94","sourceId":"Item.b2nknxTkd0Fj0GHK"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[all]ItemMacro"},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Pushing Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Pushing Attack\n\nUSEAGE : ACTIVATE AFTER ATTACK\nThis Maneuver must be activated AFTER the character makes an attack and knows that a \nHIT was successful. This will activate any bonuses, saves, effects and extra damage \nto the TARGET. A Superiority Die will be expended immediately.\n\nv1.2 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postSave\") {\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // setup common variables\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const target = await fromUuid(args[0].targetUuids[0]);\n const diagonalRule = canvas.grid.diagonRule;\n\n // If save failed\n if (workflow.failedSaves.size >= 1) {\n //prompt for push distance\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Pushing Attack\",\n content: \"

How far would you like to push the target?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

5 ft.

\",\n callback: () => resolve(1)\n },\n two: {\n icon: '

',\n label: \"

10 ft.

\",\n callback: () => { resolve(2) }\n },\n three: {\n icon: '

',\n label: \"

15 ft.

\",\n callback: () => { resolve(3) }\n }\n },\n default: \"three\"\n }).render(true);\n });\n\n const distanceTravelled = await dialog;\n\n // create a ray to measure the angle to travel\n canvas.grid.diagonalRule = \"EUCL\";\n let travelRay = new Ray(token.center, target.object.center);\n const angle = travelRay.angle;\n travelRay.distance = travelRay.dx * distanceTravelled;\n\n // create a new ray with the same angle but shorter to allow for the token sizes\n travelRay = Ray.fromAngle(token.x, token.y, angle,\n Math.floor(travelRay.distance + Math.sqrt(target.object.height ** 2 + target.object.width ** 2) / 2));\n canvas.grid.diagonalRule = diagonalRule;\n\n // update the canvas to move the token\n await target.data.document.update(canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y));\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Maneuvers: Pushing Attack","type":"script","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Pushing Attack\n\nUSEAGE : ACTIVATE AFTER ATTACK\nThis Maneuver must be activated AFTER the character makes an attack and knows that a \nHIT was successful. This will activate any bonuses, saves, effects and extra damage \nto the TARGET. A Superiority Die will be expended immediately.\n\nv2.0 December 18 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"postSave\") {\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // setup common variables\n const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);\n const target = await fromUuid(args[0].targetUuids[0]);\n const targetDoc = args[0].hitTargets[0];\n const diagonalRule = canvas.grid.diagonRule;\n\n // If save failed\n if (workflow.failedSaves.size >= 1) {\n //prompt for push distance\n let dialog = new Promise((resolve, reject) => {\n new Dialog({\n // localize this text\n title: \"Battle Master: Pushing Attack\",\n content: \"

How far would you like to push the target?

\",\n buttons: {\n one: {\n icon: '

',\n label: \"

5 ft.

\",\n callback: () => resolve(1)\n },\n two: {\n icon: '

',\n label: \"

10 ft.

\",\n callback: () => { resolve(2) }\n },\n three: {\n icon: '

',\n label: \"

15 ft.

\",\n callback: () => { resolve(3) }\n }\n },\n default: \"three\"\n }).render(true);\n });\n\n const distanceTravelled = await dialog;\n\n // create a ray to measure the angle to travel\n canvas.grid.diagonalRule = \"EUCL\";\n let travelRay = new Ray(token.center, target.object.center);\n const angle = travelRay.angle;\n travelRay.distance = travelRay.dx * distanceTravelled;\n\n // create a new ray with the same angle but shorter to allow for the token sizes\n travelRay = Ray.fromAngle(token.x, token.y, angle,\n Math.floor(travelRay.distance + Math.sqrt(target.object.height ** 2 + target.object.width ** 2) / 2));\n canvas.grid.diagonalRule = diagonalRule;\n\n // update the canvas to move the token\n const newCenter = canvas.grid.getSnappedPosition(travelRay.B.x, travelRay.B.y);\n const mutationData = { token: {x: newCenter.x, y: newCenter.y}};\n await warpgate.mutate(targetDoc, mutationData, {}, {permanent: true});\n }\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n const resourceKey = Object.keys(testActor.system.resources).find(k => testActor.system.resources[k].label.toLowerCase() === resourceName.toLowerCase());\n let newResources = duplicate(testActor.system.resources);\n newResources[resourceKey].value += 1;\n await actor.update({\"system.resources\": newResources});\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

When you hit a creature with a weapon attack, you can expend one superiority die to attempt to drive the target back. You add the superiority die to the attack’s damage roll, and if the target is Large or smaller, it must make a Strength saving throw. On a failed save, you push the target up to 15 feet away from you.

\n

 

\n
\nUSEAGE: ACTIVATE AFTER ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects and extra damage to the TARGET.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.0 March 22 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"str","actionType":"save","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"str","dc":16,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288054,"modifiedTime":1672520397401,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"bArXe54dntM9BtmA"} +{"name":"Maneuvers: Evasive Footwork","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"8mjpwr1wsce7hnw0","changes":[{"key":"system.attributes.ac.bonus","mode":2,"value":"[[@flags.dae.SuperiorityDie]]","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Evasive Footwork","origin":"Actor.67GUmdTadYmGXD8W.Item.0RU6a1fysK70I7Zy","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isMoved"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"33e9bc20206fbb9ca7930b5fd5238ef17f90765f","sourceId":"Item.VBck6SUMDUffKNQX"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will set up any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288034,"modifiedTime":1672520397355,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"du780XWnO6NroBk5"} +{"name":"Maneuvers: Commanding Presence","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"8mjpwr1wsce7hnw0","changes":[{"key":"system.skills.prf.bonuses.check","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":1},{"key":"system.skills.inv.bonuses.check","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":1},{"key":"system.skills.per.bonuses.check","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Commanding Presence","origin":"Actor.67GUmdTadYmGXD8W.Item.0RU6a1fysK70I7Zy","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isSkill.itm","isSkill.prf","isSkill.per"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"0ff3423216fdbf9ef501d68d690641cd16aaa476","sourceId":"Item.JBZvOTaQEQhhH4QG"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will setup any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193287980,"modifiedTime":1672520397321,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"fIHv8e0Ux66smMq3"} +{"name":"Maneuvers: Quick Toss","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[{"_id":"yvrty0152p8tpf0a","changes":[{"key":"system.bonuses.rwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":20}],"disabled":false,"duration":{"rounds":1,"startTime":null,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/weapons-crossed-swords-yellow.webp","label":"Maneuvers: Quick Toss","origin":"Actor.67GUmdTadYmGXD8W.Item.8ehitphcFmvocZ65","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:rwak"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"312bc05783f108bbd5d527882f9510e49583acb5","sourceId":"Item.te09IsjRSE5O0QVl"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE THE ATTACK\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.  This bonus is added to the next ranged weapon attack, it is up to the player/GM to make sure the weapon is thrown and not shot.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288036,"modifiedTime":1672520397407,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"gLwFEEgoC5BtEIyD"} +{"name":"Maneuvers: Distracting Strike","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"z6c1xhx4agrwbd3z","changes":[{"key":"flags.midi-qol.grants.advantage.attack.all","mode":5,"value":"1","priority":20}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tip-chipped-blood-red.webp","label":"Maneuvers: Distracting Strike","origin":"Actor.67GUmdTadYmGXD8W.Item.uIJSbACjp9yNcSdf","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Advantage"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["isHit"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Trip Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"b915da6eb003ad818ecac67517fcc5a1f63ae638","sourceId":"Item.kLWYDBL7F2nlbTDG"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"util","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288059,"modifiedTime":1672520397349,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"jz9m33x0u2gvVdv8"} +{"name":"Maneuvers: Rally","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"8mjpwr1wsce7hnw0","changes":[{"key":"system.attributes.hp.temp","mode":2,"value":"[[@flags.dae.SuperiorityDie + @abilities.cha.mod]]","priority":1}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Rally","origin":"Actor.67GUmdTadYmGXD8W.Item.0RU6a1fysK70I7Zy","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"ed5694e459ce2577f9b1bbe2fc696567f893b218","sourceId":"Item.L5VDjrpXSldWFqvy"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Rally","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will set up any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":1,"width":null,"units":"","type":"ally"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288022,"modifiedTime":1672520397414,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"kR0qK59TNDv55js5"} +{"name":"Maneuvers: Riposte","type":"feat","img":"icons/skills/melee/weapons-crossed-swords-yellow.webp","effects":[{"_id":"w2qe6rnd1i9b1wch","changes":[{"key":"system.bonuses.mwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":20},{"key":"system.bonuses.rwak.damage","mode":2,"value":"@flags.dae.SuperiorityDie","priority":20}],"disabled":false,"duration":{"startTime":null,"rounds":1,"seconds":null,"combat":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/weapons-crossed-swords-yellow.webp","label":"Maneuvers: Riposte","origin":"Actor.67GUmdTadYmGXD8W.Item.bym5FEbnUSgBlVvn","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:mwak","1Attack:rwak"],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53568","entityTypeId":"222216831","componentId":20,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"419df84db7bea725ddded1aa2012b53f92c861ac","sourceId":"Item.RshIkI99F7fViWIH"},"favtab":{"isFavorite":true},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Riposte","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.UEksWqqwtvXm3oXs"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE BEFORE ATTACK\n

This Maneuver must be activated BEFORE the character makes an attack.  This will set up any bonuses and effects on the TARGET character.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"self"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":null},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288008,"modifiedTime":1672520397418,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"mCkk5o5uPruoUc8X"} +{"name":"Superiority Die","type":"feat","img":"icons/sundries/gaming/dice-runed-brown.webp","effects":[{"_id":"UgB9349LhJU4nKsd","changes":[{"key":"macro.itemMacro","mode":0,"value":"","priority":20}],"disabled":false,"duration":{"startTime":null,"startRound":null,"startTurn":null,"seconds":null,"combat":null,"rounds":null,"turns":null},"icon":"icons/sundries/gaming/dice-runed-brown.webp","label":"Superiority Die","origin":"Item.H14LgNk3j1O3e3FV","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"dnd5e-helpers":{"rest-effect":"Ignore"},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":false}}},"tint":null}],"flags":{"ddbimporter":{"id":"1023","entityTypeId":"222216831","componentId":209,"componentTypeId":12168134,"class":"Fighter","subclass":"Battle Master","dndbeyond":{"levelScale":{"id":12,"level":7,"description":"d8","dice":{"diceCount":5,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"5d8"},"fixedValue":null},"levelScales":[{"id":11,"level":1,"description":"d8","dice":{"diceCount":4,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"4d8"},"fixedValue":null},{"id":12,"level":7,"description":"d8","dice":{"diceCount":5,"diceValue":8,"diceMultiplier":null,"fixedValue":null,"diceString":"5d8"},"fixedValue":null},{"id":13,"level":10,"description":"d10","dice":{"diceCount":5,"diceValue":10,"diceMultiplier":null,"fixedValue":null,"diceString":"5d10"},"fixedValue":null},{"id":14,"level":15,"description":"d10","dice":{"diceCount":6,"diceValue":10,"diceMultiplier":null,"fixedValue":null,"diceString":"6d10"},"fixedValue":null},{"id":15,"level":18,"description":"d12","dice":{"diceCount":6,"diceValue":12,"diceMultiplier":null,"fixedValue":null,"diceString":"6d12"},"fixedValue":null}],"limitedUse":[{"level":null,"uses":1}]},"importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"scene-packer":{"hash":"9ece162ff10d8aa5c863a090caae31adabc334f2","sourceId":"Item.Q3m6hRxQLGBg4hSw"},"core":{"sourceId":"Item.8gdA6c8j5GnkX33K"},"itemacro":{"macro":{"data":{"_id":null,"name":"Superiority Die","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster : Superiority Die\n\nUSEAGE : PASSIVE\nThis item must be on the character for Manuevers to function. \nIt does not do anything directly but is a helper effect to determine the Battle Master Hit Die (d8, d10, d12) based on level.\n \nv1.3 August 6 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n console.log(\"MACRO TEST | PC Actor: %O\", pcActor);\n\n // Test Class\n let pcFighter = pcActor.getRollData().classes?.fighter;\n if (pcFighter === null) {\n ui.notifications.error(\"You are not a Fighter!\");\n return;\n }\n\n // Test Subclass\n let pcFighterSubclass = pcActor.getRollData().classes.fighter?.subclass.identifier;\n if (pcFighterSubclass != \"battle-master\") {\n ui.notifications.error(\"You are not a Fighter Battlemaster!\");\n return;\n }\n\n //const roll = await(new Roll(`2d8 + ${pcPaladin.levels}`)).roll();\n let fighterLevel = pcFighter.levels;\n console.log(\"MACRO TEST | Fighter Levels: %s\", fighterLevel);\n\n let flagData;\n if (fighterLevel > 17) flagData = \"+ 1d12\";\n else if (fighterLevel > 9) flagData = \"+ 1d10\";\n else if (fighterLevel > 0) flagData = \"+ 1d8\";\n pcActor.setFlag(\"dae\", \"SuperiorityDie\", flagData)\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"SuperiorityDie\");\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Superiority Die","type":"script","scope":"global","command":"/*****\nFighter Battlemaster : Superiority Die\n\nUSEAGE : PASSIVE\nThis item must be on the character for Manuevers to function. \nIt does not do anything directly but is a helper effect to determine the Battle Master Hit Die (d8, d10, d12) based on level.\n \nv2.0 December 16 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0] === \"on\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n\n // Test Class\n let pcFighter = pcActor.getRollData().classes?.fighter;\n if (pcFighter === null) {\n ui.notifications.error(\"You are not a Fighter!\");\n return;\n }\n\n // Test Subclass\n let pcFighterSubclass = pcActor.getRollData().classes.fighter?.subclass.identifier;\n if (pcFighterSubclass != \"battle-master\") {\n ui.notifications.error(\"You are not a Fighter Battlemaster!\");\n return;\n }\n\n //const roll = await(new Roll(`2d8 + ${pcPaladin.levels}`)).roll();\n let fighterLevel = pcFighter.levels;\n\n let flagData;\n if (fighterLevel > 17) flagData = \"+ 1d12\";\n else if (fighterLevel > 9) flagData = \"+ 1d10\";\n else if (fighterLevel > 0) flagData = \"+ 1d8\";\n pcActor.setFlag(\"dae\", \"SuperiorityDie\", flagData)\n\n} else if (args[0] === \"off\") {\n const pcActor = await fromUuid(args[args.length - 1].actorUuid);\n pcActor.unsetFlag(\"dae\", \"SuperiorityDie\");\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.3"},"favtab":{"isFavorite":true},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: PASSIVE\n

This item must be on the character for Manuevers to function.  It does not do anything directly but is a helper effect to determine the Battle Master Hit Die (d8, d10, d12) based on level.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":0,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"other","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288018,"modifiedTime":1672520397438,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"r4WAgnRyDOcK2uUx"} +{"name":"Maneuvers: Grappling Strike","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"z6c1xhx4agrwbd3z","changes":[{"key":"system.attributes.movement.all","mode":0,"value":"0","priority":5}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"modules/dfreds-convenient-effects/images/grappled.svg","label":"Grappled","origin":"Actor.67GUmdTadYmGXD8W.Item.uIJSbACjp9yNcSdf","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Grappled"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":"[all]ItemMacro","overTimeSkillRoll":"ath"},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":false,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Grappling Strike","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Grappling Strike\n\nUSEAGE : ACTIVATE AFTER ATTACK\nThis Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful. \nThis will activate any bonuses, saves, effects and extra damage to the TARGET. \nA Superiority Die will be expended immediately.\n\nv1.2 May 7 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preSave\") {\n\n // define Actor, Target and Item\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n const targetActor = args[0].targets[0].actor;\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"Superiority Die feature is missing on the character sheet.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // Set the DC and setup the saving throw\n let pcAthSkillTotal = pcActor.data.data.skills[\"ath\"].total;\n const roll = await(new Roll(`1d20 + ${pcAthSkillTotal} + ${superiorityDie}`)).roll();\n theItem.data.data.save.dc = roll.total;\n theItem.data.data.save.scaling = \"flat\";\n\n let skill = \"acr\";\n if (targetActor.data.data.skills.ath.passive > targetActor.data.data.skills.acr.passive) skill = \"ath\";\n setProperty(theItem.data.flags, \"midi-qol.overTimeSkillRoll\", skill);\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const item = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n item.data.data.save.ability = \"str\";\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.data.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","folder":null,"sort":0,"permission":{"default":0},"flags":{}},"name":"Maneuvers: Grappling Strike","type":"script","scope":"global","command":"/*****\nFighter Battlemaster Maneuvers: Grappling Strike\n\nUSEAGE : ACTIVATE AFTER ATTACK\nThis Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful. \nThis will activate any bonuses, saves, effects and extra damage to the TARGET. \nA Superiority Die will be expended immediately.\n\nv2.0 December 17 2022 jbowens #0415 (Discord) https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git \n*****/\n\nif (args[0].macroPass === \"preSave\") {\n\n // define Actor, Target and Item\n const pcActor = MidiQOL.MQfromActorUuid(args[0].actorUuid);\n const targetActor = args[0].targets[0].actor;\n const theItem = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n\n // check to make sure only one target is selected\n if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {\n ui.notifications.error(\"You need to select a single target.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n let superiorityDie = pcActor.getFlag(\"dae\", \"SuperiorityDie\");\n if (superiorityDie === null) {\n ui.notifications.error(\"Superiority Die feature is missing on the character sheet.\");\n await incrementResource(pcActor, \"Superiority Dice\", 1);\n return;\n }\n\n // Set the DC and setup the saving throw\n let pcAthSkillTotal = pcActor.system.skills.ath.total;\n const roll = await(new Roll(`1d20 + ${pcAthSkillTotal} + ${superiorityDie}`)).evaluate({async: true});\n\n theItem.system.save.dc = roll.total;\n theItem.system.save.scaling = \"flat\";\n\n let skill = \"acr\";\n if (targetActor.system.skills.ath.passive > targetActor.system.skills.acr.passive) skill = \"ath\";\n setProperty(theItem.flags, \"midi-qol.overTimeSkillRoll\", skill);\n\n} else if (args[0].macroPass === \"postActiveEffects\") {\n const item = MidiQOL.Workflow.getWorkflow(args[0].uuid).item;\n item.system.save.ability = \"str\";\n}\nreturn;\n\n//---------------------------------- MY FUNCTIONS -------------------------------------------\n\n// Increment available resource\nasync function incrementResource(testActor, resourceName, numValue) {\n let actorDup = duplicate(testActor);\n let resources = Object.values(actorDup.system.resources);\n let foundResource = resources.find(i => i.label.toLowerCase() === resourceName.toLowerCase());\n if (foundrResource) {\n foundResource.value = foundResource.value + numValue;\n await testActor.update(actorDup);\n } else ui.notifications.error(\"You have not setup a Superiority Dice resource.\");\n return;\n}","author":"paMZuKDupk0GHKFn","_id":null,"img":"icons/svg/dice-target.svg","folder":null,"sort":0,"ownership":{"default":0},"flags":{},"_stats":{"systemId":null,"systemVersion":null,"coreVersion":null,"createdTime":null,"modifiedTime":null,"lastModifiedBy":null}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"19ddbb39795e14de76b795d9d3759d972ed3db52","sourceId":"Item.A2Z2iftIV9D10Go1"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"TCoE p42","activation":{"type":"bonus","cost":1,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"str","actionType":"save","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"str","dc":null,"scaling":"flat"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288028,"modifiedTime":1672520397368,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"rFENQ3hMpRD0PEAm"} +{"name":"Maneuvers: Disarming Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"z6c1xhx4agrwbd3z","changes":[],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tip-chipped-blood-red.webp","label":"Maneuvers: Disarming Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.uIJSbACjp9yNcSdf","transfer":false,"flags":{"core":{"statusId":"Convenient Effect: Disarmed"},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"53570","entityTypeId":"222216831","componentId":22,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"ye6nz9f4x9n3v7lu","ignoreIcon":true,"ignoreItemImport":true,"retainResourceConsumption":true},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false,"onUseMacroName":""},"midiProperties":{"nodam":false,"halfdam":false,"fulldam":true,"rollOther":false,"critOther":false,"concentration":false,"magicdam":false,"magiceffect":false,"toggleEffect":false,"autoFailFriendly":false,"offHandWeapon":false,"ignoreTotalCover":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Trip Attack","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"favtab":{"isFavorite":true},"scene-packer":{"hash":"fd3c574a868d82d9bc9534102f5d87ad2d8cbe3b","sourceId":"Item.HHclx11TJCd2cpem"},"core":{"sourceId":"Item.bpSu08y0CydFPHEi"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER ATTACK\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  On a failed save, this item will put a marker on the target to remind the GM the actor has been disarmed since there is no disarmed convenient effect.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":"inst"},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"str","actionType":"save","attackBonus":"0","chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[["0 + @flags.dae.SuperiorityDie[Superiority]",""]],"versatile":""},"formula":"","save":{"ability":"str","dc":null,"scaling":"str"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288012,"modifiedTime":1672520397337,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"yDc26I1wvYvCAYaR"} +{"name":"Maneuvers: Commander’s Strike","type":"feat","img":"icons/magic/perception/shadow-stealth-eyes-purple.webp","effects":[{"_id":"wi6f2h3dq7nvr1yt","changes":[{"key":"system.bonuses.mwak.damage","mode":2,"value":"+ @flags.dae.SuperiorityDie","priority":20}],"disabled":false,"duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"icons/magic/perception/shadow-stealth-eyes-purple.webp","label":"Maneuvers: Commander’s Strike","origin":"Actor.67GUmdTadYmGXD8W.Item.pGZANlFSKX3g36f8","transfer":true,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["1Attack:mwak"],"transfer":true,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"5b82a70551dacd789a31db619eebef3e31afc615","sourceId":"Item.bIopQsi7ItrmUegc"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE ANYTIME\n

This is a utility Maneuver and can be used whenever your character can take an action.  This will setup any bonuses and effects on the TARGET actor.  A Superiority Die will be expended immediately.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288030,"modifiedTime":1672520397316,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"yuQs1yCDJ229abpr"} +{"name":"Maneuvers: Maneuvering Attack","type":"feat","img":"icons/skills/melee/blade-tip-chipped-blood-red.webp","effects":[{"_id":"51gy6rzi5b0s0bws","changes":[{"key":"system.attributes.movement.walk","mode":1,"value":"1.5","priority":20}],"disabled":false,"duration":{"startTime":null,"turns":1,"seconds":null,"combat":null,"rounds":null,"startRound":null,"startTurn":null},"icon":"icons/skills/melee/blade-tip-chipped-blood-red.webp","label":"Maneuvers: Maneuvering Attack","origin":"Actor.67GUmdTadYmGXD8W.Item.hkchEm8jxUTaR2Ng","transfer":false,"flags":{"core":{"statusId":""},"dae":{"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":[],"transfer":false,"selfTarget":false,"selfTargetAlways":false},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false},"effective-transferral":{"transferBlock":{"button":false,"chat":false,"displayCard":false},"transferrable":{"self":true,"target":true}}},"tint":null}],"flags":{"ddbimporter":{"id":"2439086","entityTypeId":"222216831","componentId":1306902,"componentTypeId":258900837,"class":"Fighter","subclass":"Battle Master","importId":"28pyz8r4w0vt0973"},"infusions":{"infused":false},"obsidian":{"source":{"type":"class","text":"Fighter"}},"scene-packer":{"hash":"288c91227130c1c0663bee7e4d316a9320ba29dd","sourceId":"Item.88RZKP2tE6cMgZzI"},"spellTemplateManager":{"stmData":{"ignoreDuration":false,"spellTexture":"","useTexture":false,"alpha":50,"coneOrigin":1,"loopAnimations":true}},"midi-qol":{"effectActivation":false},"midiProperties":{"nodam":false,"fulldam":false,"halfdam":false,"rollOther":false,"critOther":false,"magicdam":false,"magiceffect":false,"concentration":false,"toggleEffect":false},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"favtab":{"isFavorite":true},"itemacro":{"macro":{"data":{"_id":null,"name":"Maneuvers: Brace","type":"script","author":"ldRsJ6Yp5qPydWA1","img":"icons/svg/dice-target.svg","scope":"global","command":"","folder":null,"sort":0,"permission":{"default":0},"flags":{}}}},"core":{"sourceId":"Item.QCt9G1ryLky9enrK"},"cf":{"id":"temp_fgyhz98iq6m","path":"DDB Override#/CF_SEP/Battlemaster Maneuvers","color":"#000000"},"exportSource":{"world":"test","system":"dnd5e","coreVersion":"9.269","systemVersion":"1.6.1"}},"system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

\n

 

\n
\nUSAGE: ACTIVATE AFTER THE ATTACK
\n

This Maneuver must be activated AFTER the character makes an attack and knows that a HIT was successful.  This will activate any bonuses, saves, effects, and extra damage to the TARGET.  A Superiority Die will be expended immediately.  This provides a half normal movement bonus so the target of the REACTION can move half their movement manually without disrupting their movement on their turn.

\n
\n

 

\n
\nSETUP:\n

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

\n
\n

 

\n
\nVERSION INFO\n

v1.2 May 7 2022

\n

jbowens #0415 (Discord)

\n

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

\n
","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"special","cost":null,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"attribute","target":"","amount":1},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false},"attunement":0},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1671193288027,"modifiedTime":1672520397381,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"_id":"yzViHkpaBUn0ITUK"} +{"$$deleted":true,"_id":"KMRPT9JUbcArw9gs"} +{"name":"Maneuvers: Parry","type":"feat","system":{"description":{"value":"

[PLACE YOUR DESCRIPTION HERE]

 

USAGE: AUTOMATED

This is an automated Maneuver, place it on the character sheet and it will come up in the MIDI-QOL reaction workflow without manual activation.

 

SETUP:

Please remember to link the use of this ability to a character sheet resource under the item details Resource Consumption dropdown.

 

VERSION INFO

v1.2 May 7 2022

jbowens #0415 (Discord)

https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats.git

","chat":"","unidentified":""},"source":"PHB p74","activation":{"type":"reaction","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":null,"max":"","per":"","recovery":""},"consume":{"type":"","target":"","amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Fighter: Battlemaster","recharge":{"value":null,"charged":false}},"img":"icons/skills/melee/weapons-crossed-swords-white-blue.webp","effects":[{"label":"Maneuvers: Parry","icon":"icons/skills/melee/weapons-crossed-swords-white-blue.webp","origin":"Actor.uKT3yRHSqadbkSwU.Item.w82QHG3lPCEYvWxT","duration":{"startTime":null,"seconds":null,"combat":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"disabled":false,"_id":"g8DfI2va5HVkDKjK","changes":[{"key":"flags.midi-qol.DR.all","mode":5,"value":"[[@flags.dae.SuperiorityDie + @abilities.dex.mod]]","priority":10}],"tint":null,"transfer":false,"flags":{"dae":{"selfTarget":true,"selfTargetAlways":false,"stackable":"none","durationExpression":"","macroRepeat":"none","specialDuration":["turnStartSource"]},"core":{"statusId":"true"},"ActiveAuras":{"isAura":false,"aura":"None","radius":null,"alignment":"","type":"","ignoreSelf":false,"height":false,"hidden":false,"displayTemp":false,"hostile":false,"onlyOnce":false}}}],"ownership":{"default":0,"paMZuKDupk0GHKFn":3},"flags":{"scene-packer":{"hash":"b0770352f482e0bd0420b8b7b6ef4ad20267e489","sourceId":"Item.8wVGXEfwPkxFWq1v"},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"},"core":{"sourceId":"Actor.uKT3yRHSqadbkSwU.Item.w82QHG3lPCEYvWxT"}},"_stats":{"systemId":"dnd5e","systemVersion":"2.0.3","coreVersion":"10.291","createdTime":1672750821594,"modifiedTime":1672752157538,"lastModifiedBy":"paMZuKDupk0GHKFn"},"folder":null,"sort":0,"_id":"ig3X4PUFuQo1mimm"}