【战斗】========被动405 407 409修改
parent
7bbfa16224
commit
cecb0ddfc7
|
@ -10277,6 +10277,9 @@ local passivityList = {
|
|||
if defRole and defRole.camp==role.camp then
|
||||
return
|
||||
end
|
||||
if BattleUtil.CheckIsNoDead(defRole) then
|
||||
return
|
||||
end
|
||||
if BattleLogic.BuffMgr:HasBuff(defRole, t1, function (buff) return buff.damageType == t2 end ) then
|
||||
if triggerTime>=time then
|
||||
return
|
||||
|
@ -10364,11 +10367,11 @@ local passivityList = {
|
|||
local addDMGFac=function(func)
|
||||
if BattleLogic.BuffMgr:HasBuff(role,t1, function (buff) return buff.signType==t2 end ) then
|
||||
if func then
|
||||
func(v2,CountTypeName.Add)
|
||||
func(v2,CountTypeName.Sub)
|
||||
end
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveChangeAddDMGFac,addDMGFac,nil,nil,role)
|
||||
role.Event:AddEvent(BattleEventName.PassiveChangeDefDMGReFac,addDMGFac,nil,nil,role)
|
||||
end,
|
||||
--被自身添加[a]类型[b]效果的目标,己方[c]系神将对其暴击率改变[d][e]%,命中改变[f][g]%
|
||||
--a[int],b[int],c[int],d[int],e[float],f[float]
|
||||
|
@ -10426,7 +10429,7 @@ local passivityList = {
|
|||
|
||||
if len>0 then
|
||||
local list=RoleManager.Query(function(target)
|
||||
if not BattleLogic.BuffMgr:HasBuff(target, t1, function (buff) return buff.ctrlType==t2 end) then
|
||||
if not BattleLogic.BuffMgr:HasBuff(target, t1, function (buff) return buff.ctrlType==t2 end) and target.camp~=role.camp then
|
||||
return true
|
||||
end
|
||||
end)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Shield = Buff:New()
|
||||
-- 无敌吸血盾的免疫状态
|
||||
local immune0 = function(buff)
|
||||
return buff.type == BuffName.Control or buff.isDeBuff or buff.type == BuffName.DOT
|
||||
return buff.type == BuffName.Control or buff.isDeBuff or buff.type == BuffName.DOT or buff.caster.camp~=buff.target.camp
|
||||
end
|
||||
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||
function Shield:SetData(...)
|
||||
|
@ -40,7 +40,7 @@ function Shield:OnStart()
|
|||
self.target.buffFilter:Add(immune0)
|
||||
-- 清除所有负面buff
|
||||
BattleLogic.BuffMgr:ClearBuff(self.target, function (buff)
|
||||
return buff.type == BuffName.Control or buff.type == BuffName.DOT
|
||||
return buff.type == BuffName.Control or buff.type == BuffName.DOT or buff.caster.camp~=self.target.camp
|
||||
end)
|
||||
elseif self.shieldType == ShieldTypeName.ThornsReduce then
|
||||
self.target.Event:AddEvent(BattleEventName.RoleBeHit,onRoleBeHit,nil,nil,self.target)
|
||||
|
|
|
@ -192,7 +192,7 @@ BattleEventName = {
|
|||
ImmuneDebuffSuccess = indexAdd(),--免疫debuff成功
|
||||
ChangeRoleRage = indexAdd(),--改变角色怒气
|
||||
PassiveChangeIgnoreDef = indexAdd(),--被动改变无视防御比例
|
||||
PassiveChangeAddDMGFac = indexAdd(),--被动改变增伤比例
|
||||
PassiveChangeDefDMGReFac = indexAdd(),--被动改变增伤比例
|
||||
PassiveChangeRoleHit = indexAdd(),--被动改变角色命中
|
||||
|
||||
}
|
||||
|
|
|
@ -1002,13 +1002,18 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
|
|||
ignoreDef = 1 - (ignoreDef or 0)
|
||||
-- 基础伤害 = 攻击力 - 防御力
|
||||
baseDamage = max(attack - BattleUtil.FP_Mul(2,defence, ignoreDef), 0)
|
||||
-- 基础伤害增加系数
|
||||
local addDamageFactor = 1 + atkRole:GetRoleData(RoleDataName.DamageBocusFactor) - defRole:GetRoleData(RoleDataName.DamageReduceFactor)
|
||||
local addDMGFac=function(v1,ct)
|
||||
addDamageFactor=BattleUtil.CountValue(addDamageFactor,v1,ct)
|
||||
|
||||
local defDMGRef=defRole:GetRoleData(RoleDataName.DamageReduceFactor)
|
||||
local changeDefDMGFac=function(v1,ct)
|
||||
if ct== CountTypeName.Sub and defDMGRef==0 then
|
||||
return
|
||||
end
|
||||
defDMGRef=BattleUtil.CountValue(defDMGRef,v1,ct)
|
||||
end
|
||||
atkRole.Event:DispatchEvent(BattleEventName.PassiveChangeDefDMGReFac,changeDefDMGFac)
|
||||
-- 基础伤害增加系数
|
||||
local addDamageFactor = 1 + atkRole:GetRoleData(RoleDataName.DamageBocusFactor) - defDMGRef
|
||||
|
||||
atkRole.Event:DispatchEvent(BattleEventName.PassiveChangeAddDMGFac,addDMGFac)
|
||||
-- 计算暴伤害系数
|
||||
local critDamageFactor = 1
|
||||
local critDamageReduceFactor = 0 -- 暴击伤害减免
|
||||
|
|
Loading…
Reference in New Issue