diff --git a/lib/character/behaviors/ai.lua b/lib/character/behaviors/ai.lua index 6258ea5..b2bacad 100644 --- a/lib/character/behaviors/ai.lua +++ b/lib/character/behaviors/ai.lua @@ -75,7 +75,7 @@ local function circleVectors(center, radius) end for _, v in pairs(vecs) do local i = 1 - while i <= #res and (res[i].x ~= v.x or res[i].y ~= v.y) do + while i <= #res and (res[i].x ~= v.x or res[i].y ~= v.y) and v.x >= 0 and v.y >= 0 do i = i + 1 end if i == #res + 1 or #res == 0 then @@ -112,7 +112,7 @@ local aiNature = { ["dev_warrior"] = function(self) return function(callback) -- почему так, описано в Task self.owner:try(Tree.behaviors.spellcaster, function(spellB) - self.target = pathToClosestCharacter(self.owner, 1) + self.target = pathToClosestCharacter(self.owner, 2) local task1 = spellB.spellbook[1]:cast(self.owner, self.target) if task1 then task1(