[战斗]=========被动356 422 技能: 108修改

dev_chengFeng
wangzhenxing 2022-02-10 15:29:24 +08:00
parent 8d196f6759
commit 599ef2e0fc
3 changed files with 55 additions and 9 deletions

View File

@ -2051,8 +2051,8 @@ local effectList = {
-- 造成[a]%的[b]伤害如果目标[c]且[d]低于[e]则有[F]%概率将其秒杀
-- a[float]b[伤害类型]c[持续伤害类型]d[属性]e[float]f[float]
-- 造成[a]%的[b]伤害如果目标[c]且[d]低于[e]则有[F]%概率将其秒杀,灭有一层c状态,增加[g]%暴毙率,暴毙伤害提升[h]%,最多提高[i]层
-- a[float],b[伤害类型],c[持续伤害类型],d[属性],e[float],f[float],g[float],h[float],i[int]
[108] = function(caster, target, args, interval, skill)
local f1 = args[1]
local dt = args[2]
@ -2060,22 +2060,38 @@ local effectList = {
local pro1 = args[4]
local f2 = args[5]
local f3 = args[6]
local v1 = args[7]
local v2 = args[8]
local v3 = args[9]
if v1==nil then
v1=0
end
if v2==nil then
v2=0
end
if v3==nil then
v3=0
end
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target)
BattleLogic.WaitForTrigger(interval, function ()
local isSecKill = false
if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end,caster,dot) then
-- 检测被动技能对秒杀参数得影响
f2, f3 = BattleUtil.CheckSeckill(f2, f3, caster, target)
--
local list=BattleLogic.BuffMgr:GetAllBuffByFunc(function(buff) return buff.target==target and dot == 0 or buff.damageType == dot end)
local len=BattleUtil.LengthOfTable(list)
if len>v3 then
len=v3
end
local ft = target:GetRoleData(RoleDataName.Hp)/target:GetRoleData(RoleDataName.MaxHp)
if ft < f2 then
isSecKill = BattleUtil.RandomAction(f3, function()
isSecKill = BattleUtil.RandomAction(f3+len*v1, function()
-- 秒杀
local isBoss=BattleUtil.CheckIsBoss(target)
if isBoss then
return
end
BattleUtil.Seckill(skill, caster, target)
BattleUtil.Seckill(skill, caster, target,v2*len)
end)
end
end

View File

@ -8678,8 +8678,8 @@ local passivityList = {
end
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,onRoundChange,nil,nil,role)
end,
-- 修改技能id:[a] 技能类型:[b]的参数,第[c]个参数改变为[d],第[e]个参数改变为[f]
-- a[int 技能的id],b[int 技能的type类型],c[int],d[float/int],e[int],f[int/float]
-- 修改技能id:[a] 技能类型:[b]的参数,第[c]个参数改变为[d],第[e]个参数改变为[f],第[g]个参数改变为[h]
-- a[int 技能的id],b[int 技能的type类型],c[int],d[float/int],e[int],f[int/float],g[int],h[int/float]
[356] = function(role, args,id,judge)
local id = args[1]
local type = args[2]
@ -8687,6 +8687,8 @@ local passivityList = {
local v1 = args[4]
local i2 = args[5]
local v2 = args[6]
local i3 = args[7]
local v3 = args[8]
local onSkillEffectBefore = function(skill, e, func)
if skill.type == BattleSkillType.Special then
if skill.id == id and e.type == type then
@ -8696,6 +8698,9 @@ local passivityList = {
if e.args[i2] then
e.args[i2] = v2
end
if e.args[i3] then
e.args[i3] = v3
end
if func then func(e) end
end
end
@ -10840,7 +10845,31 @@ local passivityList = {
end
role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role)
end,
--触发不灭后,技能额外造成目标[a][b]%的伤害。
--a[int 属性id] b[float]
[422]=function(role,args,id,judge)
local f1 = args[1]
local dt = args[2]
-- 直接伤害后
local onPassiveDamaging = function(func, defRole, damage,skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
if not BattleLogic.BuffMgr:HasBuff(role,BuffName.NoDead) then
return
end
--观音,这个被动只有额外技能才能触发 by王振兴 2021/1/21 17:48
if skill and (skill.type == BattleSkillType.Extra or skill.type == BattleSkillType.Special) then
--如果是boss 并且额外伤害是根据最大生命则返回
if (f1==12 or f1==13) and BattleUtil.CheckIsBoss(defRole) then
return
end
local val = floor(BattleUtil.FP_Mul(dt, defRole:GetRoleData(BattlePropList[f1])))
BattleUtil.FinalDamageCountShield(nil,role,defRole,val)
end
end
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role)
end,
}

View File

@ -563,12 +563,13 @@ function BattleUtil.CheckIsBoss(role)
end
-- 秒杀
function BattleUtil.Seckill(skill, atkRole, defRole)
function BattleUtil.Seckill(skill, atkRole, defRole,addDamagePro)
-- 灵兽无效
if defRole.type == BattleUnitType.Monster or defRole.type == BattleUnitType.Player then
return
end
local damage = defRole:GetRoleData(RoleDataName.Hp)
damage=floor(BattleUtil.FP_Mul(damage,1+addDamagePro))
local finalDmg = defRole.data:SubValue(RoleDataName.Hp, damage)
if finalDmg >= 0 then
if defRole:GetRoleData(RoleDataName.Hp) <= 0 and not defRole:IsDead() then