纵排改为仇恨目标

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 BattleUtil = BattleUtil
local floor = math.floor local floor = math.floor
local max = math.max local max = math.max
@ -173,9 +173,11 @@ function BattleUtil.ChooseTarget(role, chooseId)
end end
arr = tempArr arr = tempArr
elseif chooseLimit == 3 then-- 对列 elseif chooseLimit == 3 then-- 对列
local myCol = role.position % 3 local target=RoleManager.GetAggro(role)
local tempArr = BattleUtil.ChooseCol(arr, myCol) if target then
if #tempArr == 0 then -- 对列没有人,按顺序找到有人得列 local myCol = target.position % 3
local tempArr = BattleUtil.ChooseCol(arr, myCol)
if #tempArr == 0 then -- 对列没有人,按顺序找到有人得列
for i = 1, 3 do for i = 1, 3 do
local col = i % 3 -- 0 表示第三列嗷 local col = i % 3 -- 0 表示第三列嗷
tempArr = BattleUtil.ChooseCol(arr, col) tempArr = BattleUtil.ChooseCol(arr, col)
@ -183,8 +185,10 @@ function BattleUtil.ChooseTarget(role, chooseId)
break break
end end
end end
end end
arr = tempArr arr = tempArr
end
end end
-- 选择条件 -- 选择条件