From 7277afdf9b2692adbb6ec13719af28873210f60f Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Wed, 8 Dec 2021 10:30:18 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=E8=A2=AB?= =?UTF-8?q?=E5=8A=A8257=20=20=E4=B8=8D=E7=81=ADbuff=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Base/Passivity.lua | 3 +++ .../~Lua/Modules/Battle/Logic/Buff/NoDead.lua | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index e69abe3ead..2687eb5343 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -5693,6 +5693,9 @@ local passivityList = { if not point then point=list[1] end + if point==nil then + return + end BattleUtil.FinalDamage(nil,role,point,dmg) if curNum>=maxNum then return diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua index 87e2ccb0f0..65ea02cc37 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua @@ -27,6 +27,9 @@ end -- 记录承受伤害 function NoDead:OnRoleBeHit(atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect) if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) and atkRole.camp~=self.target.camp then + if self.changePro==nil then + self.changePro=0.1 + end self.recordDamage=self.recordDamage+math.floor(damage*self.changePro) end end @@ -65,6 +68,9 @@ function NoDead:OnEnd() self.target.Event:RemoveEvent(BattleEventName.RoleBeHit,self.OnRoleBeHit,self) end --self.target.Event + if self.pro==nil then + self.pro=0 + end local isRand=BattleUtil.RandomAction(self.pro,function() RoleManager.RemoveDeadRole(self.target) self.target.isDead=false