【战斗】=======斩杀方法添加空判断
parent
81660bd819
commit
a645a1f8d7
|
@ -569,7 +569,9 @@ function BattleUtil.Seckill(skill, atkRole, defRole,addDamagePro)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local damage = defRole:GetRoleData(RoleDataName.Hp)
|
local damage = defRole:GetRoleData(RoleDataName.Hp)
|
||||||
|
if addDamagePro then
|
||||||
damage=floor(BattleUtil.FP_Mul(damage,1+addDamagePro))
|
damage=floor(BattleUtil.FP_Mul(damage,1+addDamagePro))
|
||||||
|
end
|
||||||
local finalDmg = defRole.data:SubValue(RoleDataName.Hp, damage)
|
local finalDmg = defRole.data:SubValue(RoleDataName.Hp, damage)
|
||||||
if finalDmg >= 0 then
|
if finalDmg >= 0 then
|
||||||
if defRole:GetRoleData(RoleDataName.Hp) <= 0 and not defRole:IsDead() then
|
if defRole:GetRoleData(RoleDataName.Hp) <= 0 and not defRole:IsDead() then
|
||||||
|
|
Loading…
Reference in New Issue