diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua index 75e3204700..9341dcdfad 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua @@ -1980,6 +1980,7 @@ local effectList = { -- 检测技能伤害治疗加成 f2 = BattleUtil.CheckSkillDamageHeal(f2, caster, arr[1]) -- 治疗血量最低队友实际伤害的f2% + --之前是finaldag 改成 damage BattleUtil.ApplyTreat(caster, arr[1], floor(damage*f2)) end target.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 83f3e2a909..0f379e700b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -3030,12 +3030,35 @@ local passivityList = { -- a[float] [161] = function(role, args) local f1 = args[1] + + --之前为根据异常效果的数量改为根据异常效果的类型 by:王振兴 local function onPassiveDamaging(damagingFunc, target, damage) - local list = BattleLogic.BuffMgr:GetBuff(target, function(buff) - return buff.type == BuffName.DOT or buff.type == BuffName.Control - end) - if list and damagingFunc then - local num = #list + --local list = BattleLogic.BuffMgr:GetBuff(target, function(buff) + --return buff.type == BuffName.DOT or buff.type == BuffName.Control + --end) + local dotList={} + local controlList={} + local list=BattleLogic.BuffMgr:GetBuff(target) + for i = 1, #list do + local buff=list[i] + if buff.type== BuffName.DOT and buff.damageType and dotList and not BattleUtil.ChecklistIsContainValue(dotList,buff.damageType) then + table.insert(dotList,buff.damageType) + end + + if buff.type== BuffName.Control and buff.ctrlType and controlList and not BattleUtil.ChecklistIsContainValue(controlList,buff.ctrlType) then + table.insert(controlList,buff.ctrlType) + end + end + local num = 0 + + if dotList then + num = num + #dotList + end + if controlList then + num=num+ #controlList + end + LogError("异常效果的数量为:".. num) + if num>0 and damagingFunc then local dd = BattleUtil.CountValue(damage, f1 * num, CountTypeName.AddPencent) - damage damagingFunc(-floor(BattleUtil.ErrorCorrection(dd))) end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index 25b367b909..484451ef26 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -354,7 +354,19 @@ function BattleUtil.CheckIsNoDead(target) return false end - +--检测列表是否包含值 + function BattleUtil.ChecklistIsContainValue(_list,_value) + if _list and _value then + for key, value in pairs(_list) do + if value==_value then + return true + else + return false + end + end + end + return false +end function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageType, dotType) if damage < 0 then damage = 0 end