删除被动194额外附加伤害也会触发效果的并导致报错的问题,

dev_chengFeng
gaoxin 2020-08-07 10:57:30 +08:00
parent 428ee21777
commit 723531298d
1 changed files with 10 additions and 8 deletions

View File

@ -3714,15 +3714,17 @@ local passivityList = {
local f1 = args[1]
local OnRoleDamageBefore = function(defRole, factorFunc, damageType, skill)
local targets = skill:GetDirectTargets()
if not targets or #targets == 0 then return end
local cf = f1/#targets
for _, target in ipairs(targets) do
BattleUtil.RandomAction(cf, function()
BattleLogic.BuffMgr:ClearBuff(target, function(buff)
return buff.type == BuffName.Shield and buff.shieldType == ShieldTypeName.AllReduce
if skill then
local targets = skill:GetDirectTargets()
if not targets or #targets == 0 then return end
local cf = f1/#targets
for _, target in ipairs(targets) do
BattleUtil.RandomAction(cf, function()
BattleLogic.BuffMgr:ClearBuff(target, function(buff)
return buff.type == BuffName.Shield and buff.shieldType == ShieldTypeName.AllReduce
end)
end)
end)
end
end
end
role.Event:AddEvent(BattleEventName.RoleDamageBefore, OnRoleDamageBefore)