Skip to content

Commit

Permalink
fix(undead): fix undead fortitude to use applied damage from midi-qol…
Browse files Browse the repository at this point in the history
… if it's available
  • Loading branch information
vtt-lair committed Oct 31, 2023
1 parent c311d09 commit 0912095
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/modules/UndeadFortitude.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ export class UndeadFortitude {
/* collect the needed information and pass it along to the handler */
const originalHp = actor.system.attributes.hp.value;
const finalHp = getProperty(update, "system.attributes.hp.value") ?? originalHp;
const hpDelta = originalHp - finalHp;

// default the damage to this calculation
let hpDelta = originalHp - finalHp;
// if you have midi-QOL then you'll have the applied damage
if (options.damageItem) {
hpDelta = options.damageItem.appliedDamage
}


const data = {
actor,
Expand Down

0 comments on commit 0912095

Please sign in to comment.