fix skill deadlock after trying to move into a character
This commit is contained in:
parent
0db8fc5239
commit
7ac0a53caa
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user