From 79778b6eec1cd7bdbf9c60323683d10c70e28cee Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Sat, 11 Sep 2021 16:04:06 +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=E8=A2=AB=E5=8A=A8261=20=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/Logic/Base/Passivity.lua | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 1820250173..5ebf320502 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -5696,11 +5696,12 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end, - --本次技能中如果有[a]目标,额外回复[b]点怒气 - -- a[持续伤害状态],b[int] + --本次技能中如果有[a]目标,额外回复[b]点怒气,[c]buff的类型(a 填效果类型里面的具体类型; c 不填/1为dot, 2为controll ) + -- a[持续伤害状态],b[int],c[int ] [261]=function(role,args,id,judge) local dot=args[1] - local i1 = args[2]--defRole, damage, bCrit, finalDmg, damageType, skill + local i1 = args[2] + local type = args[3] local OnRoleHit = function(skill) -- if skill and skill.owner==role and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra) and role.camp~=defRole.camp and defRole and BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function(buff) return buff.damageType == dot end) then -- role:AddRage(i1, CountTypeName.Add) @@ -5714,8 +5715,18 @@ local passivityList = { return end local num=0 + local buffName=BuffName.DOT + if type then + if type==1 then + buffName=BuffName.DOT + elseif type==2 then + buffName=BuffName.Control + end + end for key, value in pairs(list) do - local isHave=BattleLogic.BuffMgr:HasBuff(value, BuffName.DOT, function(buff) return buff.damageType == dot and buff.caster==role and buff.startRound == BattleLogic.GetCurRound() end,role,dot) + local isHave=BattleLogic.BuffMgr:HasBuff(value, buffName,function(buff) return + (buffName==BuffName.DOT and buff.damageType==dot or buff.ctrlType==dot) and buff.caster==role and buff.startRound == BattleLogic.GetCurRound() + end,role,dot) if isHave then num=num+1 end