治疗数值修改受暴击系数和伤害加成影响
parent
07a0f73f31
commit
87be1121e1
|
|
@ -530,11 +530,26 @@ function BattleUtil.CalTreat(castRole, targetRole, value, baseFactor)
|
|||
if targetRole.ctrl_noheal or targetRole:IsDead() then --禁疗和死亡无法加血
|
||||
return
|
||||
end
|
||||
-- 是否暴击: 暴击率 = 自身暴击率 - 对方抗暴率
|
||||
local bCrit = false
|
||||
local critRandom = Random.Range01()
|
||||
local critCondition = castRole:GetRoleData(RoleDataName.Crit)
|
||||
bCrit = critRandom <= critCondition
|
||||
bCrit = bCrit or targetRole.isFlagCrit == true -- 必定暴击
|
||||
-- 计算暴伤害系数
|
||||
local critDamageFactor = 1
|
||||
--计算暴击
|
||||
if bCrit then
|
||||
--伤害有个+1.3 不知道干什么用的就给去了 by:wangxhenxing 2020/10/10 18:46
|
||||
critDamageFactor = castRole:GetRoleData(RoleDataName.CritDamageFactor)
|
||||
end
|
||||
-- 基础伤害增加系数
|
||||
local addDamageFactor = 1 + castRole:GetRoleData(RoleDataName.DamageBocusFactor)
|
||||
targetRole.Event:DispatchEvent(BattleEventName.RoleBeHealed, castRole)
|
||||
BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor)
|
||||
BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamageFactor,addDamageFactor)
|
||||
end
|
||||
|
||||
function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor)
|
||||
function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamageFactor,addDamageFactor)
|
||||
if targetRole.ctrl_noheal or targetRole:IsDead() then --禁疗和死亡无法加血
|
||||
return
|
||||
end
|
||||
|
|
@ -551,7 +566,7 @@ function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor)
|
|||
|
||||
local factor = castRole.isTeam and 1 or castRole:GetRoleData(RoleDataName.TreatFacter) --释放者为team则不计算治疗加成属性
|
||||
local factor2 = targetRole:GetRoleData(RoleDataName.CureFacter)
|
||||
local baseTreat = BattleUtil.FP_Mul(value, baseFactor, factor, factor2)
|
||||
local baseTreat = BattleUtil.FP_Mul(value, baseFactor, factor, factor2,critDamageFactor,addDamageFactor)
|
||||
|
||||
--加入被动效果
|
||||
local cl = {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue