【战斗】===========被动115 DOT类Buff 清除逻辑修改

dev_chengFeng
wangzhenxing 2021-08-27 18:02:50 +08:00
parent 0946e743ba
commit 6ef1d6c643
3 changed files with 18 additions and 6 deletions

View File

@ -367,9 +367,18 @@ function BuffManager:PassUpdate()
-- 当前轮释放的buff不结算
if buff.startRound ~= BattleLogic.GetCurRound() then
buff.roundPass = buff.roundPass + 1
if buff.roundPass >= buff.roundDuration then
buff.disperse = true
--如果是Dot类的buff 判断触发次数;其他的还按照之前的逻辑判断 by:wangzhenxing 2021/08/27
if buff.triggerTime then
--现在按照 每回合都会触发来处理的如果存在4回合触发2次的还需处理 by:wangzhenxing 2021/08/27
if buff.triggerTime==buff.roundDuration then
buff.disperse = true
end
else
if buff.roundPass >= buff.roundDuration then
buff.disperse = true
end
end
buff.target.Event:DispatchEvent(BattleEventName.BuffRoundChange, buff)
end
end

View File

@ -2118,10 +2118,13 @@ local passivityList = {
local ct = args[4]
-- 如果是技能的伤害则判断加成
local onPassiveDamaging = function(func, target, damage, skill)
local onPassiveDamaging = function(func, target, damage, skill,ditType,bCrit,damageType)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
if damageType==3 then
return
end
--处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing
if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 and judge==1 then
return
@ -3309,8 +3312,6 @@ local passivityList = {
if skill.type == BattleSkillType.Normal and skill.owner and skill.owner.camp~=role.camp then
local attack = role:GetRoleData(RoleDataName.Attack)
local damage = floor(BattleUtil.ErrorCorrection(attack * f2))
--持续回合数特殊处理,处理中毒等少触发一回合的情况 by:wangzhenxing 2021/08/26 17:58
i1=i1+1
BattleUtil.RandomDot(f1, dot, role, skill.owner, i1, 1, damage)
end
end

View File

@ -8,6 +8,7 @@ function DOT:SetData(...)
self.damagePro, --1 物理 2 魔法 (真实伤害时 为伤害值)
self.damageFactor = ... --伤害系数
self.isRealDamage = false
self.triggerTime=0
--if self.damageType == 2 then
-- self.cover = true
-- self.layer = 1
@ -38,12 +39,13 @@ function DOT:OnTrigger()
else
BattleUtil.CalDamage(nil, self.caster, self.target, self.damagePro, self.damageFactor, 0, self.damageType)
end
self.triggerTime=self.triggerTime+1
return true
end
--效果结束时调用一次
function DOT:OnEnd()
self.triggerTime=0
end
--只有当cover字段为true时触发返回true则被新效果覆盖