From cda352d46e51c2e277a20103314570ec219eb775 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Tue, 30 Mar 2021 17:17:10 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=3D=3D=3D=3D=E9=80=89=E6=8B=A9=E5=AF=B9=E4=BD=8D?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/Logic/Role/RoleManager.lua | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) 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