删除被动194额外附加伤害也会触发效果的并导致报错的问题,
parent
428ee21777
commit
723531298d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue