diff --git a/scripts/pathfinding/WallTracer.js b/scripts/pathfinding/WallTracer.js index 965d527..4527262 100644 --- a/scripts/pathfinding/WallTracer.js +++ b/scripts/pathfinding/WallTracer.js @@ -407,7 +407,16 @@ export class WallTracerEdge extends GraphEdge { // Don't block dead tokens (HP <= 0). const { tokenHPAttribute, pathfindingIgnoreStatuses } = CONFIG[MODULE_ID]; - const tokenHP = Number(foundry.utils.getProperty(token, tokenHPAttribute)); + let tokenHP = Number(foundry.utils.getProperty(token, tokenHPAttribute)); + + //DemonLord using damage system + if ( game.system.id === 'demonlord') + { + let health = Number(foundry.utils.getProperty(token, "actor.system.characteristics.health.max")); + let damage = Number(foundry.utils.getProperty(token, "actor.system.characteristics.health.value")); + tokenHP = health - damage; + } + if ( Number.isFinite(tokenHP) && tokenHP <= 0 ) return false; // Don't block tokens with certain status. diff --git a/scripts/system_attributes.js b/scripts/system_attributes.js index f65dff3..58c6b59 100644 --- a/scripts/system_attributes.js +++ b/scripts/system_attributes.js @@ -114,6 +114,7 @@ export function defaultWalkAttribute() { case "twodsix": return "actor.system.movement.walk"; case "worldofdarkness": return "actor.system.movement.walk"; case "TheWitcherTRPG": return "actor.system.stats.spd.current"; + case "demonlord": return "actor.system.characteristics.speed"; default: return ""; } } @@ -169,6 +170,7 @@ export function defaultDashMultiplier() { case "dragonbane": case "twodsix": case "a5e": + case "demonlord": case "ds4": return 2; case "CoC7": return 5;