[战斗]==============灵兽每回合释放技能次数 刷新修改

dev_chengFeng
wangzhenxing 2021-03-25 09:57:51 +08:00
parent 21be2f29dd
commit 8f1d56cf8f
2 changed files with 9 additions and 5 deletions

View File

@ -376,14 +376,18 @@ function BattleUtil.ChooseTarget(role, chooseId)
-- end)
elseif chooseWeight ==9 then --攻击最高且没被放逐过
local list=role.exileTargets
local tempArr = {}
local team = RoleManager.Query(function (r) return r.camp ~= role.camp end)
if list then
BattleUtil.SortByProp(arr,RoleDataName.Attack,sort)
for i = 1, #arr do
if not arr[i].isExile and not arr[i]:IsDead() and not BattleUtil:ChecklistIsContainValue(list,arr[i]) then
return arr[i]
for key, value in pairs(team) do
if not value:IsDead() and not BattleUtil.ChecklistIsContainValue(role.exileTargets,value) then
--return arr[i]
table.insert(tempArr,value)
end
end
end
BattleUtil.SortByProp(tempArr,RoleDataName.Attack,sort)
arr=tempArr
elseif chooseWeight ==10 then --剩余血量百分比低于25%且生命绝对值最小
return BattleUtil.GetHpPctLessThanPctHero(arr,0.25)
elseif chooseWeight ==11 then --剩余血量百分比低于32%且生命绝对值最小

View File

@ -38,7 +38,7 @@ function MSkill:Init(owner, group, index, skillData)
self.effectCaster = EffectCaster:New()
self.effectCaster:Init(self, effects, targets)
--监听回合开始消息
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart,function (round)
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,function (round)
self.curRoundCount = 0
end)
end