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}