[战斗]=========第四期觉醒修改
parent
bc7cb4b96a
commit
4220257ea7
|
@ -6091,25 +6091,29 @@ local passivityList = {
|
|||
local ct=args[2]
|
||||
local round=args[3]
|
||||
local immune=args[4]
|
||||
local onSkillEffectBefore = function(skill, e, func,target,effect)
|
||||
if target.roleData.element~=ele then
|
||||
return
|
||||
end
|
||||
if target==nil or effect==nil then
|
||||
local onSkillCastEnd = function(skill)
|
||||
if not skill then
|
||||
return
|
||||
end
|
||||
local num=effect.roundDuration
|
||||
if effect.type==BuffName.HOT and effect.caster==role and num>1 then
|
||||
num=BattleUtil.CountValue(num,round,ct)
|
||||
effect.roundDuration=num
|
||||
local immune = function(buff)
|
||||
return buff.type == BuffName.Control and buff.ctrlType and buff.ctrlType==immune
|
||||
end
|
||||
local curBuff=Buff.Create(role, BuffName.Immune,num,4,immune)
|
||||
target:AddBuff(curBuff)
|
||||
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function () --延迟一帧移除事件,防止触发帧和结束帧为同一帧时,被动未移除
|
||||
local list=skill:GetDirectTargetsNoMiss()
|
||||
for _, role1 in ipairs(list) do
|
||||
if role1.roleData.element==ele then
|
||||
BattleLogic.BuffMgr:QueryBuff(role1, function(buff)
|
||||
if buff.type == BuffName.HOT and buff.caster == role and buff.roundDuration>1 and buff.startRound==BattleLogic.GetCurRound() then
|
||||
buff:ChangeBuffDuration(ct,round)
|
||||
local immune = function(buff)
|
||||
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
|
||||
role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore)
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd)
|
||||
end,
|
||||
|
||||
--持续治疗效果结算时,回复被治疗的神将[a][b]%的血量
|
||||
|
@ -6119,13 +6123,13 @@ local passivityList = {
|
|||
local v1=args[2]
|
||||
local OnBuffEnd=function(buff)
|
||||
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)
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.HotBuffEnd, OnBuffEnd)
|
||||
end,
|
||||
-- 每回合每追击[a]次,额外回复[b]点怒气
|
||||
-- 每回合每追击[a]次,额外回复[b]点怒气
|
||||
--a[int],b[int]
|
||||
[296]=function(role,args,id,judge)
|
||||
local time=args[1]
|
||||
|
@ -6144,9 +6148,10 @@ local passivityList = {
|
|||
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast)
|
||||
|
||||
local onRoundChange=function()
|
||||
if aa>time then
|
||||
if aa>=time then
|
||||
local ange= floor(aa/time)
|
||||
role:AddRage(ange*num, CountTypeName.Add)
|
||||
aa=0
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,onRoundChange )
|
||||
|
@ -6163,15 +6168,21 @@ local passivityList = {
|
|||
end
|
||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
|
||||
local list = skill:GetDirectTargetsNoMiss()
|
||||
if list then
|
||||
local isHave=BattleUtil:ChecklistIsContainValue(list,role)
|
||||
LogError(LengthOfTable(list))
|
||||
if list then
|
||||
local isHave=false
|
||||
for key, value in pairs(list) do
|
||||
if value ==role then
|
||||
isHave= true
|
||||
end
|
||||
end
|
||||
if isHave then
|
||||
role:AddRage(num, CountTypeName.Add)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, onSkillEnd)
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd)
|
||||
end,
|
||||
|
||||
-- 技能,普攻治疗治疗的目标为[a]阵营,资料量额外提升[b]%,并解除[c]效果
|
||||
|
@ -6204,6 +6215,21 @@ local passivityList = {
|
|||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd)
|
||||
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,
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue