diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index b82c193200..cc9d37943a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -2627,7 +2627,11 @@ local passivityList = { [142] = function(role, args) local dot = args[1] local f1 = args[2] - local onHit = function(target, damage, bCrit, finalDmg) + local onHit = function(target, damage, bCrit, finalDmg,damageType,skill) + --只对技能的直接目标生效,分摊出去的不会回血 2020/12/17 王振兴 + if not skill then + return + end if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then --吸血修改 finaldamage 改为 damage by:往王振兴 2020/08/17 BattleUtil.ApplyTreat(role, role, floor(BattleUtil.ErrorCorrection(damage * f1))) @@ -3611,6 +3615,10 @@ local passivityList = { local onFinalBeDamage = function(damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType) + --只有直接伤害才可以被分摊,反弹的伤害不会分摊 by:王振兴 2020/12/17 + if not skill then + return + end -- 伤害降低 local finalDamage = BattleUtil.CountValue(damage, f1, ct) local curHp = role:GetRoleData(RoleDataName.Hp) @@ -3940,7 +3948,7 @@ local passivityList = { damagingFunc(shareDamage) end -- 分担伤害 - BattleUtil.ApplyDamage(nil, atkRole, role, shareDamage,bCrit,damageType,dotType,true) + BattleUtil.FinalDamage(nil, atkRole, role, shareDamage,bCrit,damageType,dotType,true) end end BattleLogic.Event:AddEvent(BattleEventName.FinalDamage, onFinalDamage) @@ -5161,7 +5169,7 @@ local passivityList = { if not point then point=list[1] end - BattleUtil.ApplyDamage(nil,role,point,dmg) + BattleUtil.FinalDamage(nil,role,point,dmg) end -- end @@ -5815,9 +5823,10 @@ local passivityList = { return end else - if not isDirect then - return - end + -- if not isDirect then + -- return + -- end + return end end BattleUtil.ApplyTreat(role, role, floor(BattleUtil.ErrorCorrection(damage * v1))) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/Curse.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/Curse.lua index 4dacfa3472..9e1c42cc0f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/Curse.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/Curse.lua @@ -24,7 +24,7 @@ function Curse:ShareDamageTrigger(damagingFunc, atkRole, defRole, damage, skill, local f1 = self.args[1] --平分伤害的百分比 local sd = math.floor(BattleUtil.ErrorCorrection(damage * f1 / #sdList)) if sd ~= 0 then - BattleUtil.ApplyDamage(nil, atkRole, self.target, sd) + BattleUtil.FinalDamage(nil, atkRole, self.target, sd) end end end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua index 88097c0a4f..6662ef4695 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua @@ -204,6 +204,8 @@ BattleSkillType = { Extra = 3, --死亡后释放的技能 DeadSkill = 4, + --混乱后释放的普攻 + ChaosNormal = 5, } --敌人类型