【战斗】=======斩杀方法添加空判断

dev_chengFeng
wangzhenxing 2022-02-11 15:44:36 +08:00
parent 81660bd819
commit a645a1f8d7
1 changed files with 3 additions and 1 deletions

View File

@ -569,7 +569,9 @@ function BattleUtil.Seckill(skill, atkRole, defRole,addDamagePro)
return
end
local damage = defRole:GetRoleData(RoleDataName.Hp)
damage=floor(BattleUtil.FP_Mul(damage,1+addDamagePro))
if addDamagePro then
damage=floor(BattleUtil.FP_Mul(damage,1+addDamagePro))
end
local finalDmg = defRole.data:SubValue(RoleDataName.Hp, damage)
if finalDmg >= 0 then
if defRole:GetRoleData(RoleDataName.Hp) <= 0 and not defRole:IsDead() then