Skip to content

Commit

Permalink
Macro fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPrimate committed Oct 27, 2022
1 parent 4e5a8b1 commit 99ed1b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions macros/spells/iceKnife.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ if (lastArg.targets.length > 0) {
const target = canvas.tokens.get(lastArg.targets[0].id);
const aoeTargets = await canvas.tokens.placeables.filter((placeable) =>
canvas.grid.measureDistance(target, placeable) <= 9.5 &&
!canvas.walls.checkCollision(new Ray(target.center, placeable.center)
)).map((placeable) => placeable.document.uuid);
!canvas.walls.checkCollision(new Ray(target.center, placeable.center), {mode: "any"})
).map((placeable) => placeable.document.uuid);

const options = {
showFullCard: false,
Expand Down
2 changes: 1 addition & 1 deletion macros/spells/witchBolt.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function checkTargetInRange({ sourceUuid, targetUuid, distance }) {
const targetsInRange = MidiQOL.findNearby(null, sourceToken, distance, null);
const isInRange = targetsInRange.reduce((result, possible) => {
const collisionRay = new Ray(sourceToken, possible);
const collision = canvas.walls.checkCollision(collisionRay);
const collision = canvas.walls.checkCollision(collisionRay, {mode: "any"});
if (possible.uuid === targetUuid && !collision) result = true;
return result;
}, false);
Expand Down

0 comments on commit 99ed1b3

Please sign in to comment.