【战斗】==============被动 141 310 283 330 336 修改提交

dev_chengFeng
wangzhenxing 2021-08-20 16:05:33 +08:00
parent 8ee8ec9dea
commit 9a02e18582
3 changed files with 50 additions and 38 deletions

View File

@ -200,7 +200,7 @@ local effectList = {
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target)
BattleLogic.WaitForTrigger(interval, function ()
local dmg = BattleUtil.CalDamage(skill, caster, target, dt, f1)
BattleUtil.CalTreat(caster, caster, floor(dmg * f2))
BattleUtil.CalTreat(caster, caster, floor(dmg * f2),1,skill)
end)
end,
--造成[a]%的[b]伤害,对[c]造成额外[d]%伤害
@ -432,7 +432,7 @@ local effectList = {
local f1 = args[2]
BattleLogic.WaitForTrigger(interval, function ()
local val = floor(BattleUtil.FP_Mul(caster:GetRoleData(BattlePropList[pro1]), f1))
BattleUtil.CalTreat(caster, target, val)
BattleUtil.CalTreat(caster, target, val,1,skill)
end)
end,
--对[a]的伤害[b]%,持续[c]秒
@ -742,7 +742,7 @@ local effectList = {
[43] = function(caster, target, args, interval, skill)
local i1 = args[1]
BattleLogic.WaitForTrigger(interval, function ()
BattleUtil.CalTreat(caster, target, i1)
BattleUtil.CalTreat(caster, target, i1,1,skill)
end)
end,
--造成[a]%的[b]伤害,计算伤害时额外计算[c]%的[d][e]和[f]%的[g][h]
@ -993,7 +993,7 @@ local effectList = {
local count = min(#arr, i1)
local heal = floor(damage / count)
for i=1, count do
BattleUtil.CalTreat(caster, arr[i], heal)
BattleUtil.CalTreat(caster, arr[i], heal,1,skill)
end
end)
end,
@ -1078,7 +1078,7 @@ local effectList = {
if arr[1] ~= caster then
caster.data:SubValue(RoleDataName.Hp, floor(caster:GetRoleData(RoleDataName.Hp) * f1))
end
BattleUtil.CalTreat(caster, arr[1], floor(caster:GetRoleData(RoleDataName.MaxHp) * f2))
BattleUtil.CalTreat(caster, arr[1], floor(caster:GetRoleData(RoleDataName.MaxHp) * f2),1,skill)
end
end)
end,
@ -1357,7 +1357,7 @@ local effectList = {
BattleLogic.WaitForTrigger(interval, function ()
BattleUtil.RandomAction(f2, function ()
local val = floor(BattleUtil.FP_Mul(caster:GetRoleData(BattlePropList[pro1]), f1))
BattleUtil.CalTreat(caster, target, val)
BattleUtil.CalTreat(caster, target, val,1,skill)
end)
end)
end,
@ -1509,7 +1509,7 @@ local effectList = {
local OnBuffStart = function(buff)
if buff.type == BuffName.Control then
local val = floor(BattleUtil.FP_Mul(buff.target:GetRoleData(BattlePropList[pro1]), f2))
BattleUtil.CalTreat(buff.caster, buff.target, val)
BattleUtil.CalTreat(buff.caster, buff.target, val,1,skill)
end
end
caster.Event:AddEvent(BattleEventName.BuffStart, OnBuffStart)
@ -2285,7 +2285,7 @@ local effectList = {
local f1 = args[2]
BattleLogic.WaitForTrigger(interval, function ()
local val = floor(BattleUtil.FP_Mul(target:GetRoleData(BattlePropList[pro1]), f1))
BattleUtil.CalTreat(caster, target, val)
BattleUtil.CalTreat(caster, target, val,1,skill)
end)
end,

View File

@ -2780,23 +2780,23 @@ local passivityList = {
-- a[int]
[141] = function(role, args)
local i1 = args[1]
local buff
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, function(curRound)
local buff1=nil
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart, function(curRound)
-- 第i1回合开始
if curRound == i1 then
buff = Buff.Create(role, BuffName.Shield, 0, ShieldTypeName.AllReduce, 0, 0)
buff.cover = false
buff.clear = false
role:AddBuff(buff)
buff1 = Buff.Create(role, BuffName.Shield, 0, ShieldTypeName.AllReduce, 0, 0)
buff1.cover = false
buff1.clear = false
role:AddBuff(buff1)
end
if curRound == i1 + 1 then
if buff then
if buff.caster==role then
buff.disperse = true
if curRound == i1 + 1 then
if buff1 then
if buff1.caster==role then
buff1.disperse = true
end
end
end
end,nil,nil,role)
end)
end,
@ -4136,7 +4136,7 @@ local passivityList = {
end
end
end,nil,nil,role)
end)
end,
-- 对敌方造成伤害如被分摊其分摊比降低[a]%
@ -6321,11 +6321,12 @@ local passivityList = {
fireNum=fireNum+1
end
end
num=fireNum
end
list=BattleUtil.SortByRage(list,0)
for i = 1, #list do
if i<=fireNum then
if i<=num then
BattleUtil.CalRage(role, list[i], v1, ct)
end
end
@ -7064,13 +7065,13 @@ local passivityList = {
-- LogYellow("310 2 周围的目标造成[a]%的[b]属性伤害 value:"..value.position)
local val = floor(BattleUtil.FP_Mul(f1, role:GetRoleData(BattlePropList[pro])))
-- LogYellow("310 end pro: "..pro.." val: "..val)
BattleUtil.FinalDamage(role, value, val)
BattleUtil.FinalDamage(nil,role, value, val)
end
end
end
end
end
role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role)
role.Event:AddEvent(BattleEventName.Seckill, onRoleHit,nil,nil,role)
end,
-- 触发追击技能时,该追击技能的伤害[a]% 提高[b]改变类型
-- a[float] b[int,改变类型]
@ -7564,17 +7565,19 @@ local passivityList = {
if deadRole~=role then
return
end
BattleUtil.RandomAction(p1, function ()
local list = RoleManager.Query(function(r)
return r.camp ~= role.camp
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime,function()
BattleUtil.RandomAction(p1, function ()
local list = RoleManager.Query(function(r)
return r.camp ~= role.camp
end)
if #list < 1 then return end
local index = Random.RangeInt(1, #list)
local target = list[index]
BattleUtil.Seckill(nil,role,target)
end)
if #list < 1 then return end
local index = Random.RangeInt(1, #list)
local target = list[index]
BattleUtil.Seckill(nil,role,target)
end)
end
BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onRoleRealDead,nil,nil,role)
role.Event:AddEvent(BattleEventName.RoleRealDead, onRoleRealDead,nil,nil,role)
end,
--行动后每剩余1点怒气对[a]自己造成伤害[b][c]%的伤害
--a[int 1:自己],b[int],c[float]
@ -7776,7 +7779,16 @@ local passivityList = {
end
end
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role)
local onPassiveTreat=function(treatFactorFunc, targetRole,skill)
if skill and skill.type == BattleSkillType.Special then
local deltaRage = allRage - num
if deltaRage > 0 then
treatFactorFunc(1-f1*deltaRage,CountTypeName.Sub)
end
end
end
role.Event:AddEvent(BattleEventName.PassiveTreatingFactor,onPassiveTreat,nil,nil,role)
end,
-- 直接伤害击杀目标后下回合必定暴击
-- a[int]

View File

@ -520,7 +520,7 @@ function BattleUtil.Seckill(skill, atkRole, defRole)
atkRole.Event:DispatchEvent(BattleEventName.RoleKill, defRole,skill)
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoleDead, defRole, atkRole)
atkRole.Event:DispatchEvent(BattleEventName.Seckill, defRole)
atkRole.Event:DispatchEvent(BattleEventName.Seckill, defRole,damage,nil,finalDmg)
defRole.Event:DispatchEvent(BattleEventName.BeSeckill, atkRole)
BattleLogic.Event:DispatchEvent(BattleEventName.Seckill, atkRole, defRole)
end
@ -551,7 +551,7 @@ function BattleUtil.SeckillHP(skill, atkRole, defRole, pro)
defRole.Event:DispatchEvent(BattleEventName.RoleDead, atkRole)
atkRole.Event:DispatchEvent(BattleEventName.RoleKill, defRole,skill)
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoleDead, defRole, atkRole)
atkRole.Event:DispatchEvent(BattleEventName.Seckill, defRole)
atkRole.Event:DispatchEvent(BattleEventName.Seckill, defRole,damage,nil,finalDmg)
defRole.Event:DispatchEvent(BattleEventName.BeSeckill, atkRole)
BattleLogic.Event:DispatchEvent(BattleEventName.Seckill, atkRole, defRole)
end
@ -822,7 +822,7 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
return finalDmg, bCrit
end
function BattleUtil.CalTreat(castRole, targetRole, value, baseFactor)
function BattleUtil.CalTreat(castRole, targetRole, value, baseFactor,skill)
-- 灵兽无效
if targetRole.type == BattleUnitType.Monster then
return
@ -851,10 +851,10 @@ function BattleUtil.CalTreat(castRole, targetRole, value, baseFactor)
-- 基础伤害增加系数
local addDamageFactor = 1 + castRole:GetRoleData(RoleDataName.DamageBocusFactor)
targetRole.Event:DispatchEvent(BattleEventName.RoleBeHealed, castRole)
BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamageFactor,addDamageFactor)
BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamageFactor,addDamageFactor,skill)
end
function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamageFactor,addDamageFactor)
function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamageFactor,addDamageFactor,skill)
-- 灵兽无效
if targetRole.type == BattleUnitType.Monster then
return
@ -875,7 +875,7 @@ function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamag
local treatFactorFunc = function(df, dt)
baseFactor = BattleUtil.CountValue(baseFactor, df, dt)
end
castRole.Event:DispatchEvent(BattleEventName.PassiveTreatingFactor, treatFactorFunc, targetRole)
castRole.Event:DispatchEvent(BattleEventName.PassiveTreatingFactor, treatFactorFunc, targetRole,skill)
targetRole.Event:DispatchEvent(BattleEventName.PassiveBeTreatedFactor, treatFactorFunc, castRole)
local factor = castRole.isTeam and 1 or castRole:GetRoleData(RoleDataName.TreatFacter) --释放者为team则不计算治疗加成属性