[战斗]=========第四期觉醒修改

dev_chengFeng
wangzhenxing 2021-01-15 14:14:51 +09:00
parent bc7cb4b96a
commit 4220257ea7
1 changed files with 47 additions and 21 deletions

View File

@ -6091,25 +6091,29 @@ local passivityList = {
local ct=args[2] local ct=args[2]
local round=args[3] local round=args[3]
local immune=args[4] local immune=args[4]
local onSkillEffectBefore = function(skill, e, func,target,effect) local onSkillCastEnd = function(skill)
if target.roleData.element~=ele then if not skill then
return
end
if target==nil or effect==nil then
return return
end end
local num=effect.roundDuration BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function () --延迟一帧移除事件,防止触发帧和结束帧为同一帧时,被动未移除
if effect.type==BuffName.HOT and effect.caster==role and num>1 then local list=skill:GetDirectTargetsNoMiss()
num=BattleUtil.CountValue(num,round,ct) for _, role1 in ipairs(list) do
effect.roundDuration=num if role1.roleData.element==ele then
local immune = function(buff) BattleLogic.BuffMgr:QueryBuff(role1, function(buff)
return buff.type == BuffName.Control and buff.ctrlType and buff.ctrlType==immune if buff.type == BuffName.HOT and buff.caster == role and buff.roundDuration>1 and buff.startRound==BattleLogic.GetCurRound() then
end buff:ChangeBuffDuration(ct,round)
local curBuff=Buff.Create(role, BuffName.Immune,num,4,immune) local immune = function(buff)
target:AddBuff(curBuff) return buff.type == BuffName.Control and buff.ctrlType and buff.ctrlType==immune
end
local curBuff=Buff.Create(role, BuffName.Immune,buff.roundDuration,4,immune)
role1:AddBuff(curBuff)
end
end)
end
end end
end)
end end
role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore) role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd)
end, end,
--持续治疗效果结算时,回复被治疗的神将[a][b]%的血量 --持续治疗效果结算时,回复被治疗的神将[a][b]%的血量
@ -6119,13 +6123,13 @@ local passivityList = {
local v1=args[2] local v1=args[2]
local OnBuffEnd=function(buff) local OnBuffEnd=function(buff)
if buff and buff.caster==role and buff.roundDuration>1 then if buff and buff.caster==role and buff.roundDuration>1 then
local val = floor(BattleUtil.FP_Mul(v1, role:GetRoleData(BattlePropList[pro]))) local val = floor(BattleUtil.FP_Mul(v1, buff.target:GetRoleData(BattlePropList[pro])))
BattleUtil.CalTreat(role,buff.target, val) BattleUtil.CalTreat(role,buff.target, val)
end end
end end
BattleLogic.Event:AddEvent(BattleEventName.HotBuffEnd, OnBuffEnd) BattleLogic.Event:AddEvent(BattleEventName.HotBuffEnd, OnBuffEnd)
end, end,
-- 每回合每追击[a]次,额外回复[b]点怒气 -- 每回合每追击[a]次,额外回复[b]点怒气
--a[int],b[int] --a[int],b[int]
[296]=function(role,args,id,judge) [296]=function(role,args,id,judge)
local time=args[1] local time=args[1]
@ -6144,9 +6148,10 @@ local passivityList = {
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast)
local onRoundChange=function() local onRoundChange=function()
if aa>time then if aa>=time then
local ange= floor(aa/time) local ange= floor(aa/time)
role:AddRage(ange*num, CountTypeName.Add) role:AddRage(ange*num, CountTypeName.Add)
aa=0
end end
end end
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,onRoundChange ) BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,onRoundChange )
@ -6163,15 +6168,21 @@ local passivityList = {
end end
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
local list = skill:GetDirectTargetsNoMiss() local list = skill:GetDirectTargetsNoMiss()
if list then LogError(LengthOfTable(list))
local isHave=BattleUtil:ChecklistIsContainValue(list,role) if list then
local isHave=false
for key, value in pairs(list) do
if value ==role then
isHave= true
end
end
if isHave then if isHave then
role:AddRage(num, CountTypeName.Add) role:AddRage(num, CountTypeName.Add)
end end
end end
end end
end end
role.Event:AddEvent(BattleEventName.SkillCast, onSkillEnd) role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd)
end, end,
-- 技能,普攻治疗治疗的目标为[a]阵营,资料量额外提升[b]%,并解除[c]效果 -- 技能,普攻治疗治疗的目标为[a]阵营,资料量额外提升[b]%,并解除[c]效果
@ -6204,6 +6215,21 @@ local passivityList = {
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd)
end, end,
--死亡时,立即回复己方全体自身[a]*[b]的血量。
--a[属性],b[float]
[299] = function(role, args)
local pro = args[1]
local f1 = args[2]
local OnDead = function(atkRole)
local arr = BattleUtil.ChooseTarget(role, 10000)
for i=1, #arr do
local val = floor(BattleUtil.FP_Mul(f1, arr[i]:GetRoleData(BattlePropList[pro])))
BattleUtil.CalTreat(role, arr[i], val)
end
end
role.Event:AddEvent(BattleEventName.RoleDead, OnDead)
end,
} }