【战斗】=========效果108修改

dev_chengFeng
wangzhenxing 2022-02-11 16:27:27 +08:00
parent c2b4647418
commit 3fde93fcd7
2 changed files with 3 additions and 6 deletions

View File

@ -2084,14 +2084,14 @@ local effectList = {
len=v3
end
local ft = target:GetRoleData(RoleDataName.Hp)/target:GetRoleData(RoleDataName.MaxHp)
if ft < f2 then
if ft < f2+v2*len then
isSecKill = BattleUtil.RandomAction(f3+len*v1, function()
-- 秒杀
local isBoss=BattleUtil.CheckIsBoss(target)
if isBoss then
return
end
BattleUtil.Seckill(skill, caster, target,v2*len)
BattleUtil.Seckill(skill, caster, target)
end)
end
end

View File

@ -563,15 +563,12 @@ function BattleUtil.CheckIsBoss(role)
end
-- 秒杀
function BattleUtil.Seckill(skill, atkRole, defRole,addDamagePro)
function BattleUtil.Seckill(skill, atkRole, defRole)
-- 灵兽无效
if defRole.type == BattleUnitType.Monster or defRole.type == BattleUnitType.Player then
return
end
local damage = defRole:GetRoleData(RoleDataName.Hp)
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