[战斗]===========被动添加 354 355

dev_chengFeng
wangzhenxing 2021-10-14 13:54:07 +08:00
parent 842c9b7592
commit f0fcd144f2
1 changed files with 54 additions and 0 deletions

View File

@ -8423,6 +8423,60 @@ local passivityList = {
end
role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,role)
end,
--回合开始前给自身增加[a][b]%的御甲,每场战斗触发[c]次
--a[int 属性id], b[flaot], c[int]
[354]=function(role,args,id,judge)
local pro = args[1]
local v1 = args[2]
local num = args[3]
local time=0
local onRoundStart= function(round)
if time>=num then
return
end
local val = floor(BattleUtil.FP_Mul(v1, role:GetRoleData(BattlePropList[pro])))
--如果身上有御甲就添加御甲的值
if role.bloodShield then
role.bloodShield:AddValue(val)
else--没有就上御甲buff
role:AddBuff(Buff.Create(role, BuffName.Blood,0, val))
end
time=time+1
end
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart,onRoundStart,nil,nil,role)
end,
--[a]数回合,自身释放技能,己方全体神将 [b]属性[c]改变[d]%,持续[e]回合(e0为永久)
--a[int 1:奇数 0偶数 ] b[int 属性id], c[int 改变类型], d[float],e[int]
[355]=function(role,args,id,judge)
local type = args[1]
local pro = args[2]
local ct = args[3]
local v1 = args[4]
local round = args[5]
local onSkillCast = function(skill)
if not skill then
return
end
local r=BattleLogic.GetCurRound()
if r%2~=type then
return
end
if skill and not skill.isTriggerJudge and judge==1 then
return
end
if skill.type==BattleSkillType.Special
or skill.type==BattleSkillType.Extra
or skill.type==BattleSkillType.DeadSkill then
local list = RoleManager.Query(function(v) return role.camp == v.camp end)
for _, r in pairs(list) do
r:AddBuff(Buff.Create(role, BuffName.PropertyChange, round, BattlePropList[pro],v1, ct))
end
end
end
role.Event:AddEvent(BattleEventName.SkillCastBefore,onSkillCast,nil,nil,role)
end,
}
return passivityList