Skip to content

Commit 99b796a

Browse files
author
sasquach45932
committed
Shadow Of The Demonlord support
1 parent 6f9b553 commit 99b796a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/lib/AAHelpers.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,12 @@ export class AAHelpers {
283283
// dead
284284
else return false;
285285
}
286+
case "demonlord": {
287+
const { max, value } = document.system.characteristics.health
288+
if ((value) >= max) return true;
289+
// dead
290+
else return false;
291+
}
286292
}
287293
}
288294

src/lib/AAHooks.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ export function preUpdateActorHook(actor, update, _other) {
250250
&& actor.system?.attributes?.hp?.value === 0 && update.system.attributes.hp.value > 0)
251251
|| (foundry.utils.hasProperty(update, "system.wounds.value") // swade
252252
&& (update.system.wounds.value - (actor.system?.wounds?.ignored ?? 0)) < (actor.system?.wounds?.max ?? 0))
253+
|| (foundry.utils.hasProperty(update, "system.characteristics.health.injured") // demonlord
254+
&& actor.system.characteristics.health.value >= actor.system.characteristics.health.max)
253255
) {
254256
Hooks.once("updateActor", () => {
255257
addToCollateSemaphore(canvas.scene.id, true, false, "updateActor, revived");

src/lib/AATemplates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class AATemplates {
2929

3030
static getAuraShape(source, radius) {
3131
let shape = "circle";
32-
if (["dnd5e", "dnd4e"].includes(game.system.id)) {
32+
if (["dnd5e", "dnd4e","demonlord"].includes(game.system.id)) {
3333
if (game.settings.get("core", "gridDiagonals") === 0) shape = "rectangle";
3434
}
3535

0 commit comments

Comments
 (0)