[战斗]=====增加目标筛选条件

dev_chengFeng
wangzhenxing 2021-11-30 09:58:27 +08:00
parent 5463dbe559
commit e1d75c6274
2 changed files with 8 additions and 0 deletions

View File

@ -427,6 +427,12 @@ function BattleUtil.ChooseTarget(role, chooseId)
return BattleUtil.GetHpPctLessThanPctHero(arr,0.40)
elseif chooseWeight ==13 then --剩余血量百分比低于50%且生命绝对值最小
return BattleUtil.GetHpPctLessThanPctHero(arr,0.50)
elseif chooseWeight ==14 then
local list=nil
list=RoleManager.Query(function (r) return r.camp == role.camp end)
if list and #list>0 then
arr=RoleManager.GetNeighbor(list[1], chooseType)
end
end
local finalArr = {}
if num == 0 then

View File

@ -169,6 +169,8 @@ function MonsterView:OnSkillCastStart(skill)
end
end
end
local offset = self.camp == 0 and self.offset or self.outOffset
self.RoleLiveGO2:GetComponent("RectTransform").anchoredPosition = Vector2.New(offset[1], offset[2])
if name then
self.RoleLiveGO3=nil
local aaa1=Util.GetGameObject(self.skillCastRoot.gameObject.transform.parent,name)