From 41dc490d281f640630b6925c59d0ad638fe002d1 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Fri, 12 Nov 2021 15:54:54 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20=E8=A2=AB=E5=8A=A8?= =?UTF-8?q?=E5=A4=84=E7=90=86=E4=BC=A4=E5=AE=B3=E6=96=B9=E6=B3=95=E5=8F=AA?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=87=8F=E4=BC=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index 893c70686d..91ab790c00 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -651,10 +651,15 @@ function BattleUtil.ApplyDamageNoPassive(skill, atkRole, defRole, damage, bCrit, -- 计算护盾减伤 damage = BattleUtil.CalShield(atkRole, defRole, damage,skill) -- 造成的最终伤害 - local damagingFunc = function(dmgDeduction) + local damagingFunc = function(dmgDeduction) + --不计算增伤只计算减伤 + if dmgDeduction<0 then + return + end damage = damage - dmgDeduction end + atkRole.Event:DispatchEvent(BattleEventName.PassiveDamaging, damagingFunc, defRole, damage, skill, dotType, bCrit,damageType, dotType,isDirect) defRole.Event:DispatchEvent(BattleEventName.FinalBeDamageEnd, damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType,isDirect) BattleLogic.Event:DispatchEvent(BattleEventName.FinalDamage, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit, damageType) @@ -814,8 +819,8 @@ function BattleUtil.FinalDamageCountShield(skill, atkRole, defRole, damage, bCri if defRole.type == BattleUnitType.Monster or defRole.type == BattleUnitType.Player then return end - -- 计算护盾减伤 - damage = BattleUtil.CalShield(atkRole, defRole, damage,skill) + -- 计算无敌盾减伤 + damage = BattleUtil.CalAllReduceShield(atkRole, defRole, damage,skill) if damage < 0 then damage = 0 end if skill and skill.type==BattleSkillType.Special then