Merge branch 'master_xma_local' of http://60.1.1.230/gaoxin/JL_Client into master_xma_local

dev_chengFeng
gaoxin 2020-11-14 17:20:38 +08:00
commit e6ac0a8845
3 changed files with 15 additions and 10 deletions

View File

@ -65,8 +65,8 @@ function Immune:OnEnd()
immune = immune2
elseif self.immuneType == 3 then --免疫无敌盾
immune = immune3
elseif self.immuneType == 3 then--自定义免疫
mmune=immune4
elseif self.immuneType == 4 then--自定义免疫
immune=immune4
immune4=nil
end
for i = 1, self.target.buffFilter.size do

View File

@ -38,7 +38,7 @@ function Shield:OnTrigger()
end
-- 计算护盾
function Shield:CountShield(damage, atkRole)
function Shield:CountShield(damage, atkRole,skill)
self.atk = atkRole
local finalDamage = 0
if self.shieldType == ShieldTypeName.NormalReduce then
@ -54,10 +54,14 @@ function Shield:CountShield(damage, atkRole)
end
elseif self.shieldType == ShieldTypeName.RateReduce then
local reduceDamage = math.floor(BattleUtil.ErrorCorrection(damage * self.shieldValue))
finalDamage = damage - reduceDamage
self.damageSum = self.damageSum + reduceDamage
--减伤盾只减伤直接伤害,和史弘毅对接的 2020/11/14 by王振兴
if skill then
local reduceDamage = math.floor(BattleUtil.ErrorCorrection(damage * self.shieldValue))
finalDamage = damage - reduceDamage
self.damageSum = self.damageSum + reduceDamage
else
finalDamage=damage
end
elseif self.shieldType == ShieldTypeName.AllReduce then
finalDamage = 0
--TODO 计算吸血

View File

@ -282,10 +282,10 @@ function BattleUtil.CalHit(atkRole, defRole)
end
-- 计算护盾
function BattleUtil.CalShield(atkRole, defRole, damage)
function BattleUtil.CalShield(atkRole, defRole, damage,skill)
for i=1, defRole.shield.size do
local buff = defRole.shield.buffer[i]
damage = buff:CountShield(damage, atkRole)
damage = buff:CountShield(damage, atkRole,skill)
end
return damage
end
@ -370,7 +370,8 @@ function BattleUtil.ApplyDamage(skill, atkRole, defRole, damage, bCrit, damageTy
BattleLogic.Event:DispatchEvent(BattleEventName.PassiveDamaging, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit)
-- 计算护盾减伤
damage = BattleUtil.CalShield(atkRole, defRole, damage)
damage = BattleUtil.CalShield(atkRole, defRole, damage,skill)
-- 造成的最终伤害
local damagingFunc = function(dmgDeduction)