From 4b5fa36d8ec8e006e5cf80fe60c8dd9920b727dd Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Wed, 27 Jan 2021 14:50:26 +0900 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=20=3D=3D=3D=3D=3D=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=E4=BF=AE=E6=94=B9=E8=A7=82=E9=9F=B3=E9=A2=9D=E5=A4=96?= =?UTF-8?q?=E6=8A=80=E8=83=BD=E4=BC=A4=E5=AE=B3=E7=B1=BB=E5=9E=8B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E6=B7=B7=E4=B9=B1=E5=90=8E=E7=9A=84=E6=99=AE?= =?UTF-8?q?=E6=94=BB=E8=B5=8B=E5=80=BC=EF=BC=8C=E7=A6=81=E7=96=97=E5=90=8E?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=B2=BB=E7=96=97=E5=8A=A00?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Base/Passivity.lua | 9 ++++----- .../~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua | 2 +- .../~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua | 4 ++++ .../~Lua/Modules/Battle/Logic/Role/RoleLogic.lua | 4 +++- .../~Lua/Modules/Battle/Logic/Role/Skill.lua | 8 ++++++-- .../~Lua/Modules/Battle/Logic/SkillManager.lua | 4 ++-- 6 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 87d6da4b52..2537b5ae30 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -5298,12 +5298,11 @@ local passivityList = { local dt = args[2] -- 直接伤害后 local onPassiveDamaging = function(func, defRole, damage,skill) - --如果是boss 并且额外伤害是根据最大生命则返回 - local isBoss=BattleUtil.CheckIsBoss(defRole) - if isBoss and (f1==12 or f1==13) then - return - end if skill and skill.type == BattleSkillType.Normal and skill.isAdd and skill.owner==role then + --如果是boss 并且额外伤害是根据最大生命则返回 + if (f1==12 or f1==13) and BattleUtil.CheckIsBoss(defRole) then + return + end local val = -floor(BattleUtil.FP_Mul(dt, defRole:GetRoleData(BattlePropList[f1]))) if func then func(val) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua index 44bc59b49a..745aede39e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua @@ -275,7 +275,7 @@ skill2={1132051,0.8,0,1,{200212,{1,0.89,2}}}, skill3={1151111,0.05,0,1,{220000,{1,0.86,2}}}, skill4={10000351,0.3,0.5,4,{400000,{1,1.75,1}}}, skill5={12011001,0.3,0.5,4,{400000,{1,2.2,1}}}, -skill6={100923,0.15,1.5,1,{260004,{126,0.48,1,4,1,0,4,12,0}}}, +skill6={100923,0.15,1.5,1,{260004,{126,0.48,2,4,1,0,4,12,0}}}, } diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index 5598e2291d..0faa474c2c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -770,6 +770,10 @@ function BattleUtil.CalTreat(castRole, targetRole, value, baseFactor) return end if targetRole.ctrl_noheal or targetRole:IsDead() then --禁疗和死亡无法加血 + --禁疗并且没有死亡的单位显示血量+0 不走后面代码,防止触发后面的被动 by:王振兴 2021/1/27 + if targetRole.ctrl_noheal and not targetRole:IsDead() then + targetRole.Event:DispatchEvent(BattleEventName.RoleBeTreated, castRole, 0, 0) + end return end -- 是否暴击: 暴击率 = 自身暴击率 - 对方抗暴率 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua index f099ebb663..11738cdbe5 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua @@ -361,12 +361,14 @@ function RoleLogic:AddSkill(type, isRage, isAdd, targets) if not self.IsCanAddSkill and isAdd then return end local effectData = type == BattleSkillType.Normal and self.skill or self.superSkill --角色被混乱后 + local isTriggerJudge=true if self.ctrl_chaos and isRage then type=BattleSkillType.ChaosNormal --混乱普攻使用普攻特效 effectData={self.skill[1],self.skill[2],self.skill[3],self.skill[4],{100001,{1,1,1}}} + isTriggerJudge=false end - SkillManager.AddSkill(self, effectData, type, targets, isAdd, isRage) + SkillManager.AddSkill(self, effectData, type, targets, isAdd, isRage,isTriggerJudge) -- BattleLogManager.Log( "Add Skill", diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua index 2f81c72c3c..e1b52e1142 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua @@ -9,7 +9,7 @@ function Skill:New() return o end -function Skill:Init(role, effectData, type, targets, isAdd, isRage) --type 0 异妖 1 点技 2 滑技 +function Skill:Init(role, effectData, type, targets, isAdd, isRage,isTriggerJudge) --type 0 异妖 1 点技 2 滑技 self.type = type --skill = {技能ID, 命中时间, 持续时间, 伤害次数, {目标id1, 效果1, 效果2, ...},{目标id2, 效果3, 效果4, ...}, ...} --效果 = {效果类型id, 效果参数1, 效果参数2, ...} @@ -23,7 +23,11 @@ function Skill:Init(role, effectData, type, targets, isAdd, isRage) --type 0 异 self.isKill = false --是否技能击杀目标 self.isAdd = isAdd self.isRage = isRage - self.isTriggerJudge = true + if isTriggerJudge then + self.isTriggerJudge=isTriggerJudge + else + self.isTriggerJudge = true + end -- 初始化 local effects = {} for i=5, #effectData do diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/SkillManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/SkillManager.lua index 544a79676b..eebbed9b6c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/SkillManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/SkillManager.lua @@ -42,13 +42,13 @@ end -- 向技能列表中追加技能 -function this.AddSkill(caster, effectData, type, targets, isAdd, isRage) +function this.AddSkill(caster, effectData, type, targets, isAdd, isRage,isTriggerJudge) -- 如果超出最大限制则不再追加技能 if not this.CheckMaxCount() then return end local skill = skillPool:Get() - skill:Init(caster, effectData, type, targets, isAdd, isRage) + skill:Init(caster, effectData, type, targets, isAdd, isRage,isTriggerJudge) if type == BattleSkillType.DeadSkill then -- 死亡技能加入单独的对列 table.insert(this.DeadSkillList, skill) else