cellDistance
map:cellDistance(cell1, cell2)Nom
Type
Description
local myCell = map:currentCell()
local targetCell = 300
local dist = map:cellDistance(myCell, targetCell)
global:printMessage("Distance: " .. dist .. " cellules")
-- Verifier si a portee d'un sort
local spellRange = 5
if dist <= spellRange then
global:printSuccess("Cible a portee!")
endMis à jour

