[战斗]=======被动189修改提交

dev_chengFeng
wangzhenxing 2022-08-29 10:57:07 +08:00
parent 8e753cf0cb
commit 30c71ca225
3 changed files with 24 additions and 5 deletions

View File

@ -4027,13 +4027,22 @@ local passivityList = {
-- a[持续伤害状态]
[189] = function(role, args)
local dot = args[1]
--如果身上有自己上的效果不让他上无敌盾buff
-- local onBuffCaster = function(buff)
-- if buff.type == BuffName.DOT and buff.damageType == dot then
-- buff.target:AddBuff(Buff.Create(role, BuffName.Immune, buff.duration, 3))
-- end
-- end
-- role.Event:AddEvent(BattleEventName.BuffCaster, onBuffCaster,nil,nil,role)
local onBuffCaster = function(buff)
if buff.type == BuffName.DOT and buff.damageType == dot then
buff.target:AddBuff(Buff.Create(role, BuffName.Immune, buff.duration, 3))
local checkBuffBan=function(func,target,aBuff)
if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot and buff.caster==role end) and aBuff.type==BuffName.Shield and aBuff.shieldType == ShieldTypeName.AllReduce then
if func then
func(true)
end
end
end
role.Event:AddEvent(BattleEventName.BuffCaster, onBuffCaster,nil,nil,role)
BattleLogic.Event:AddEvent(BattleEventName.RoleAddBuffCheckBan,checkBuffBan,nil,nil,role)
end,
-- 所有攻击优先攻击敌方[a]最少的单位
@ -6198,7 +6207,7 @@ local passivityList = {
end,nil,nil,role)
end,
-- 释放技能时如目标处于[a]状态,几率[b]解除周围[c]系神将的控制状态(状态1[d],状态2[e],状态3[f],状态4[g])
-- a[持续伤害状态]b[float] c[int]
-- a[持续伤害状态]b[float],c[int],d[int],e[int],f[int],g[int]
[273] = function(role, args,id,judge)
local dot = args[1]
local f1 = args[2]

View File

@ -199,6 +199,7 @@ BattleEventName = {
RoleIsVanish = indexAdd(), -- 角色已经从显示层消失
CheckDamageIsImmune = indexAdd(),--检测伤害是否免疫
BloodValueGetZero = indexAdd(), --御甲值清零
RoleAddBuffCheckBan = indexAdd(),--角色添加buff检测是否被禁止
}

View File

@ -354,6 +354,15 @@ function RoleLogic:AddBuff(buff,_ignorePro)
BattleLogic.BuffMgr:PutBuff(buff)
return
end
local isBan=false
local function banCallBack(_isBan)
isBan=_isBan
end
BattleLogic.Event:DispatchEvent(BattleEventName.RoleAddBuffCheckBan,banCallBack,self,buff)
if isBan then
self.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.Blood)
return
end
-- buff的miss率
local missF = 0
-- 检测被动对miss概率的影响