【战斗】=======斩杀方法添加空判断
parent
81660bd819
commit
a645a1f8d7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue