diff --git a/module/rdd-combat.js b/module/rdd-combat.js index 5108c363..88d3e24c 100644 --- a/module/rdd-combat.js +++ b/module/rdd-combat.js @@ -721,12 +721,12 @@ export class RdDCombat { } } - isVisible(token, defender) { - return canvas.effects.visibility.testVisibility(defender.center, { object: token }) + isVisible(token, defenderToken) { + return canvas.effects.visibility.testVisibility(defenderToken.center, { object: token }) } - distance(t, defenderToken) { - return Number(canvas.grid.measureDistances([{ ray: new Ray(t.center, defenderToken.center) }], { gridSpaces: false })).toFixed(1); + distance(token, defenderToken) { + return Number(canvas.grid.measureDistances([{ ray: new Ray(token.center, defenderToken.center) }], { gridSpaces: false })).toFixed(1); } _ajustementPortee(dist, arme) {