[战斗]======选择英雄添加新判断
parent
4562629709
commit
e936ce29ce
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue