技能修改

dev_chengFeng
yuanshuai 2023-05-16 09:57:52 +08:00
parent d73e8d0bfc
commit 86ece9cc1f
1 changed files with 24 additions and 1 deletions

View File

@ -754,6 +754,18 @@ function BattleUtil.ApplyDamageNoPassive(skill, atkRole, defRole, damage, bCrit,
damage=realDamage
end
defRole.Event:DispatchEvent(BattleEventName.CheckFalseNoDead, damagingFunc, atkRole, realDamage, skill, dotType, bCrit, damageType,isDirect)
local isToDied=false
--检测时空猪八戒格挡致死伤害
local checkDamageShift = function(isDead)
isToDied=isDead
end
BattleLogic.Event:DispatchEvent(BattleEventName.CheckDamShift, checkDamageShift, atkRole, realDamage, defRole,skill)
--格挡成功
if isToDied then
return
end
local finalDmg = defRole.data:SubValue(RoleDataName.Hp,realDamage)
if finalDmg >= 0 then
if defRole:GetRoleData(RoleDataName.Hp) <= 0 and not defRole:IsDead() then
@ -928,7 +940,6 @@ function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageTy
isToDied=isDead
end
BattleLogic.Event:DispatchEvent(BattleEventName.CheckDamShift, checkDamageShift, atkRole, realDamage, defRole,skill)
--格挡成功
if isToDied then
return
@ -1026,6 +1037,18 @@ function BattleUtil.FinalDamageCountShield(skill, atkRole, defRole, damage, bCri
damage=realDamage
end
defRole.Event:DispatchEvent(BattleEventName.CheckFalseNoDead, damagingFunc, atkRole, realDamage, skill, dotType, bCrit, damageType,isDirect)
local isToDied=false
--检测时空猪八戒格挡致死伤害
local checkDamageShift = function(isDead)
isToDied=isDead
end
BattleLogic.Event:DispatchEvent(BattleEventName.CheckDamShift, checkDamageShift, atkRole, realDamage, defRole,skill)
--格挡成功
if isToDied then
return
end
local finalDmg = defRole.data:SubValue(RoleDataName.Hp,realDamage)
if finalDmg >= 0 then
if defRole:GetRoleData(RoleDataName.Hp) <= 0 and not defRole:IsDead() then