Skip to content

Commit

Permalink
Merge pull request #14 from vtt-lair/fix/undead
Browse files Browse the repository at this point in the history
fix(undead): fix undead fortitude to use applied damage from midi-qol…
  • Loading branch information
vtt-lair authored Oct 31, 2023
2 parents c311d09 + 0912095 commit 7163e0a
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 7163e0a

Please sign in to comment.