Add support for the Enhanced Terrain Layer module (resolves #50)

This commit is contained in:
Manuel Vögele committed 2021-04-10 15:02:35 +02:00
1 parent 9ae9dae427
commit 65912df989
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -67,7 +67,7 @@ export class SpeedProvider {
*/
getCostForStep(token, area) {
// Lookup the cost for each square occupied by the token
const costs = area.map(space => canvas.terrain.costGrid[space.y]?.[space.x]?.multiple ?? 1)
const costs = area.map(space => terrainRuler.getCost(space.x, space.y, {token}));
// Return the maximum of the costs
return costs.reduce((max, current) => Math.max(max, current))
}