From 3308ce4479f9d375f8444c6c41256f7f30d5d4e0 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Tue, 17 Nov 2020 17:35:25 +0900 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=20=E8=A2=AB=E5=8A=A8?= =?UTF-8?q?=E5=A4=84=E7=90=86=20=20=20=E8=88=8D=E8=BA=AB=E6=B5=8E=E4=B8=96?= =?UTF-8?q?200=20=EF=BC=8C=E5=8F=8A=E4=BC=8F=E8=99=8E=E7=BD=97=E6=B1=89?= =?UTF-8?q?=E7=89=B9=E6=80=A7=E8=A2=AB=E5=8A=A8=E6=B7=BB=E5=8A=A0=E9=A2=9D?= =?UTF-8?q?=E5=A4=96=E6=8A=80=E8=83=BD=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/Logic/Base/Passivity.lua | 45 ++++++++++++++++--- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index d664e83786..e26ad1d353 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -1537,6 +1537,10 @@ local passivityList = { local f1 = args[1] local ct = args[2] local passivityDamaging = function(func, caster, damage,skill, dotType, bCrit) + --处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing + if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 then + return + end if func and skill and (skill.type == BattleSkillType.Special or skill.type == BattleSkillType.Extra) then local dd = BattleUtil.CountValue(damage, f1, ct) - damage func(-floor(BattleUtil.ErrorCorrection(dd))) @@ -1960,7 +1964,11 @@ local passivityList = { target.isFlagCrit = false role.Event:RemoveEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter) end - local function onRoleDamageBefore(target) + local function onRoleDamageBefore(targetfactorFunc, damageType, skill) + --处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing + if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 then + return + end if BattleLogic.GetCurRound() == i1 then target.isFlagCrit = true role.Event:AddEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter) @@ -2015,7 +2023,11 @@ local passivityList = { -- 如果是技能的伤害则判断加成 local onPassiveDamaging = function(func, target, damage, skill) - if skill then + --处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing + if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 then + return + end + if skill and skill.type==BattleSkillType.Special then local dd = BattleUtil.CountValue(damage, f1, ct) - damage if func then func(-floor(BattleUtil.ErrorCorrection(dd))) end end @@ -3617,8 +3629,8 @@ local passivityList = { table.insert(cl, {v, ct}) end end - role.Event:DispatchEvent(BattleEventName.PassiveDamageShare, _CallBack) - atkRole.Event:DispatchEvent(BattleEventName.PassiveDamageBeShare, _CallBack) + role.Event:DispatchEvent(BattleEventName.PassiveDamageShare, _CallBack,skill) + atkRole.Event:DispatchEvent(BattleEventName.PassiveDamageBeShare, _CallBack,skill) ff = BattleUtil.CountChangeList(ff, cl) -- 计算分摊伤害 @@ -3825,7 +3837,11 @@ local passivityList = { -- a[float] [196] = function(role, args) local f1 = args[1] - local onDamageBeShare = function(func) + local onDamageBeShare = function(func,skill) + --处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing + if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 then + return + end if func then func(f1, CountTypeName.Sub) end end role.Event:AddEvent(BattleEventName.PassiveDamageBeShare, onDamageBeShare) @@ -3900,7 +3916,18 @@ local passivityList = { local onFinalDamage = function(damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit, damageType) if not role:IsDead() and skill and role.position ~= defRole.position and defRole.camp == role.camp and defRole.element == role.element then - local shareDamage = floor(BattleUtil.ErrorCorrection(damage * f1)) + local ff = 1 -- 分摊比 + -- 检测被动对分摊比的影响 + local cl = {} + local function _CallBack(v, ct) + if v then + table.insert(cl, {v, ct}) + end + end + role.Event:DispatchEvent(BattleEventName.PassiveDamageShare, _CallBack,skill) + atkRole.Event:DispatchEvent(BattleEventName.PassiveDamageBeShare, _CallBack,skill) + ff = BattleUtil.CountChangeList(ff, cl) + local shareDamage = floor(BattleUtil.ErrorCorrection(damage * f1*ff)) -- 被攻击武将自身伤害 if damagingFunc then damagingFunc(shareDamage) @@ -3910,7 +3937,7 @@ local passivityList = { end end BattleLogic.Event:AddEvent(BattleEventName.FinalDamage, onFinalDamage) - + end, -- 初始怒气增加[a]点并且目标血量低于[b]%时即有概率秒杀(对应秒杀技能) @@ -5091,6 +5118,10 @@ local passivityList = { --如果是技能并且这个被动已经被触发过 return if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,256) then return + end + --处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing + if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 then + return end if target:IsDead() and not BattleUtil.CheckIsNoDead(target) and not role:IsDead() then -- local target = RoleManager.GetAliveAggro(role)