【战斗】=======新增425 426被动
parent
cadc9337da
commit
e83b649e34
|
@ -10908,6 +10908,57 @@ local passivityList = {
|
|||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveChangeDefDMGReFac,addDMGFac,nil,nil,role)
|
||||
end,
|
||||
-- 攻击时若目标[a]类型[b]效果,则当次攻击自身暴击[c]改变[d]%
|
||||
-- a[int],b[int],c[改变类型],d[float]
|
||||
[425] = function(role, args,id,judge)
|
||||
local dot = args[1]
|
||||
local pro = args[2]
|
||||
local ct = args[3]
|
||||
local f1 = args[4]
|
||||
|
||||
|
||||
local function onRoleDamageBefore(critFunc,atkRole,defRole,skill)
|
||||
if atkRole~=role then
|
||||
return
|
||||
end
|
||||
if not skill then
|
||||
return
|
||||
end
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
local isHave=false
|
||||
if dot==BuffName.DOT then
|
||||
if BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function(buff) return buff.damageType == pro end,role,pro) then
|
||||
isHave=true
|
||||
end
|
||||
end
|
||||
if isHave then
|
||||
critFunc(f1,ct,false)
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.TemporaryChangeCrit, onRoleDamageBefore,nil,nil,role)
|
||||
end,
|
||||
--改变[a]目标[b]生命回复量[c]%
|
||||
--a[int],b[int 1:敌方],c[float]
|
||||
[426]=function(role, args,id,judge)
|
||||
local ct=args[1]
|
||||
local type=args[2]
|
||||
local pro=args[3]
|
||||
|
||||
local function onPassiveTreatFactor(func,target,skill)
|
||||
local isTrigger=false
|
||||
if type==1 and target.camp~=role.camp then
|
||||
isTrigger=true
|
||||
end
|
||||
if isTrigger then
|
||||
func(pro,ct)
|
||||
end
|
||||
end
|
||||
|
||||
BattleLogic.Event:AddEvent(BattleEventName.PassiveTreatingFactor,onPassiveTreatFactor,nil,nil,role)
|
||||
end,
|
||||
|
||||
|
||||
}
|
||||
return passivityList
|
|
@ -1242,7 +1242,7 @@ function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamag
|
|||
end
|
||||
castRole.Event:DispatchEvent(BattleEventName.PassiveTreatingFactor, treatFactorFunc, targetRole,skill)
|
||||
targetRole.Event:DispatchEvent(BattleEventName.PassiveBeTreatedFactor, treatFactorFunc, castRole)
|
||||
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.PassiveTreatingFactor,treatFactorFunc,targetRole,skill)
|
||||
local factor = castRole.isTeam and 1 or castRole:GetRoleData(RoleDataName.TreatFacter) --释放者为team则不计算治疗加成属性
|
||||
if factor==0 then
|
||||
factor=1
|
||||
|
|
Loading…
Reference in New Issue