Skip to content

Commit

Permalink
Merge branch 'release/0.10.12' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
caewok committed Oct 2, 2024
2 parents d0591b1 + de7f2f5 commit 51f9310
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Fixes for calculating movement penalty in drawings.
Avoid displaying the default ruler label in some situations when using the custom label. Closes issue #212.
Fix for PF2e speed not displaying correctly. Closes issue #211.
Fix for user seeing the GM ruler when moving hidden tokens. Closes issue #207.
Add support for Shadow of the Demon Lord. Thanks @sasquach45932!

# 0.10.11
When snapping pathfinding to grid, avoid two waypoints within the same space when snapping is possible.
Expand Down
11 changes: 10 additions & 1 deletion scripts/pathfinding/WallTracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions scripts/system_attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 "";
}
}
Expand Down Expand Up @@ -169,6 +170,7 @@ export function defaultDashMultiplier() {
case "dragonbane":
case "twodsix":
case "a5e":
case "demonlord":
case "ds4": return 2;

case "CoC7": return 5;
Expand Down

0 comments on commit 51f9310

Please sign in to comment.