[战斗]======选择英雄添加新判断

dev_chengFeng
wangzhenxing 2022-03-21 18:23:54 +08:00
parent 4562629709
commit e936ce29ce
1 changed files with 6 additions and 2 deletions

View File

@ -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
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}