fix skill deadlock after trying to move into a character

This commit is contained in:
PeaAshMeter 2025-10-15 22:33:18 +03:00
parent 0db8fc5239
commit 7ac0a53caa

View File

@ -28,11 +28,14 @@ local walk = setmetatable({
function walk:cast(caster, target)
if not caster:try(Tree.behaviors.stats, function(stats)
return stats.mana >= 2
end) then return false end
end) then
return false
end
local path = self.path
if path:is_empty() then return false end
path:pop_front()
if path:is_empty() then return false end
for p in path:values() do print(p) end
caster:has(Tree.behaviors.map):followPath(path, function()
caster:has(Tree.behaviors.spellcaster):endCast()