diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleManager.lua index f0b78310d7..d29c629ee4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleManager.lua @@ -294,14 +294,45 @@ function this.GetAggroHero(role,arr) local startPos = role.position local targetList={} startPos = startPos > 3 and startPos - 3 or startPos + local smallRole=nil + local smallPos=0 + local bigRole=nil + local bigPos=0 for _, v in ipairs(arr) do local pos= v.position>3 and v.position -3 or v.position if pos==startPos then table.insert(targetList,v) + break + elseif possmallPos then + smallRole=v + smallPos=pos + end + else + smallRole=v + smallPos=pos + end + elseif pos>startPos then + if bigRole then + if pos