From e936ce29ce9848f857a243ead5af4abf6add5cf4 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Mon, 21 Mar 2022 18:23:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=3D=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E8=8B=B1=E9=9B=84=E6=B7=BB=E5=8A=A0=E6=96=B0=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index 1fee2f2fd5..0ddc485d18 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -284,7 +284,7 @@ function BattleUtil.GetMaxTargetNum(chooseId) end -- -function BattleUtil.ChooseTarget(role, chooseId) +function BattleUtil.ChooseTarget(role, chooseId,queryType) local chooseType = floor(chooseId / 100000) % 10 local chooseLimit = floor(chooseId / 10000) % 10 local chooseWeight = floor(chooseId / 100) % 100 @@ -293,7 +293,11 @@ function BattleUtil.ChooseTarget(role, chooseId) local arr -- 选择类型 if chooseType == 1 then - arr = RoleManager.Query(function (r) return r.camp == role.camp end) + if queryType and queryType==1 then + arr = RoleManager.QueryNoDead(function (r) return r.camp == role.camp end) + else + arr = RoleManager.Query(function (r) return r.camp == role.camp end) + end elseif chooseType == 2 then if role.lockTarget and not role.lockTarget:IsRealDead() and not role.lockTarget.isExile and num == 1 then --嘲讽时对单个敌军生效 return {role.lockTarget}