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

dev_chengFeng
gaoxin 2020-12-18 11:32:23 +08:00
commit 57ef5e73cf
3 changed files with 18 additions and 7 deletions

View File

@ -2627,7 +2627,11 @@ local passivityList = {
[142] = function(role, args)
local dot = args[1]
local f1 = args[2]
local onHit = function(target, damage, bCrit, finalDmg)
local onHit = function(target, damage, bCrit, finalDmg,damageType,skill)
--只对技能的直接目标生效,分摊出去的不会回血 2020/12/17 王振兴
if not skill then
return
end
if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then
--吸血修改 finaldamage 改为 damage by往王振兴 2020/08/17
BattleUtil.ApplyTreat(role, role, floor(BattleUtil.ErrorCorrection(damage * f1)))
@ -3611,6 +3615,10 @@ local passivityList = {
local onFinalBeDamage = function(damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType)
--只有直接伤害才可以被分摊,反弹的伤害不会分摊 by王振兴 2020/12/17
if not skill then
return
end
-- 伤害降低
local finalDamage = BattleUtil.CountValue(damage, f1, ct)
local curHp = role:GetRoleData(RoleDataName.Hp)
@ -3940,7 +3948,7 @@ local passivityList = {
damagingFunc(shareDamage)
end
-- 分担伤害
BattleUtil.ApplyDamage(nil, atkRole, role, shareDamage,bCrit,damageType,dotType,true)
BattleUtil.FinalDamage(nil, atkRole, role, shareDamage,bCrit,damageType,dotType,true)
end
end
BattleLogic.Event:AddEvent(BattleEventName.FinalDamage, onFinalDamage)
@ -5161,7 +5169,7 @@ local passivityList = {
if not point then
point=list[1]
end
BattleUtil.ApplyDamage(nil,role,point,dmg)
BattleUtil.FinalDamage(nil,role,point,dmg)
end
-- end
@ -5815,11 +5823,12 @@ local passivityList = {
return
end
else
if not isDirect then
-- if not isDirect then
-- return
-- end
return
end
end
end
BattleUtil.ApplyTreat(role, role, floor(BattleUtil.ErrorCorrection(damage * v1)))
end
role.Event:AddEvent(BattleEventName.RoleBeHit,onRoleBeHit)

View File

@ -24,7 +24,7 @@ function Curse:ShareDamageTrigger(damagingFunc, atkRole, defRole, damage, skill,
local f1 = self.args[1] --平分伤害的百分比
local sd = math.floor(BattleUtil.ErrorCorrection(damage * f1 / #sdList))
if sd ~= 0 then
BattleUtil.ApplyDamage(nil, atkRole, self.target, sd)
BattleUtil.FinalDamage(nil, atkRole, self.target, sd)
end
end
end

View File

@ -204,6 +204,8 @@ BattleSkillType = {
Extra = 3,
--死亡后释放的技能
DeadSkill = 4,
--混乱后释放的普攻
ChaosNormal = 5,
}
--敌人类型