Skip to content

Commit

Permalink
absorb elements
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPrimate committed Oct 26, 2024
1 parent 049fb9f commit 26afaa5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/effects/spells/absorbElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export async function absorbElementsEffect(document) {
if (effectModules().midiQolInstalled) {
await DDBMacros.setItemMacroFlag(document, "spell", "absorbElements.js");
DDBMacros.setMidiOnUseMacroFlag(document, "spell", "absorbElements.js", ["postActiveEffects"]);
foundry.utils.setProperty(document, "system.activation.type", "reactiondamage");
foundry.utils.setProperty(document, "system.activation.type", "reaction");
foundry.utils.setProperty(document, "flags.midi-qol.reactionCondition", "reaction === 'isDamaged' && (workflow.damageDetail.some(d => ['acid', 'cold', 'fire', 'lightning', 'thunder'].includes(d.type.toLowerCase())) || ['acid', 'cold', 'fire', 'lightning', 'thunder'].some(dt => workflow.item.formula.toLowerCase().includes(dt)) || ['acid', 'cold', 'fire', 'lightning', 'thunder'].some(dt => workflow.item.damage.versatile.toLowerCase().includes(dt)))");
}

return document;
Expand Down

0 comments on commit 26afaa5

Please sign in to comment.