[战斗]========被动299 修改

dev_chengFeng
wangzhenxing 2021-01-18 10:56:02 +09:00
parent c57a5ec8eb
commit 72844ea7ab
1 changed files with 12 additions and 5 deletions

View File

@ -6230,11 +6230,18 @@ local passivityList = {
local f1 = args[2]
local OnDead = function(atkRole)
local arr = BattleUtil.ChooseTarget(role, 100000)
for i=1, #arr do
local val = floor(BattleUtil.FP_Mul(f1, arr[i]:GetRoleData(BattlePropList[pro])))
BattleUtil.CalTreat(role, arr[i], val)
end
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function () --延时一帧做处理我方场上所有单位都结算死亡以后再处理299被动回血
local arr = BattleUtil.ChooseTarget(role, 100000)
if arr==nil then
return
end
for i=1, #arr do
if not arr[i]:IsDead() then
local val = floor(BattleUtil.FP_Mul(f1, arr[i]:GetRoleData(BattlePropList[pro])))
BattleUtil.CalTreat(role, arr[i], val)
end
end
end)
end
role.Event:AddEvent(BattleEventName.RoleDead, OnDead)
end,