纵排改为仇恨目标

dev_chengFeng
wangzhenxing 2020-08-18 10:26:24 +09:00
parent 46ec8ef4b4
commit d16361e4d1
1 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,4 @@
BattleUtil = {}
BattleUtil = {}
--local BattleUtil = BattleUtil
local floor = math.floor
local max = math.max
@ -173,7 +173,9 @@ function BattleUtil.ChooseTarget(role, chooseId)
end
arr = tempArr
elseif chooseLimit == 3 then-- 对列
local myCol = role.position % 3
local target=RoleManager.GetAggro(role)
if target then
local myCol = target.position % 3
local tempArr = BattleUtil.ChooseCol(arr, myCol)
if #tempArr == 0 then -- 对列没有人,按顺序找到有人得列
for i = 1, 3 do
@ -187,6 +189,8 @@ function BattleUtil.ChooseTarget(role, chooseId)
arr = tempArr
end
end
-- 选择条件
if chooseWeight == 0 or role.ctrl_blind then --致盲时排序无效
BattleUtil.RandomList(arr)