[战斗]========被动439提交

dev_chengFeng
wangzhenxing 2022-06-06 14:39:53 +08:00
parent 86eb8ab054
commit ec1933de1d
1 changed files with 27 additions and 0 deletions

View File

@ -11371,6 +11371,33 @@ local passivityList = {
role.Event:AddEvent(BattleEventName.SkillCastBefore,OnSkillCast,nil,nil,role) role.Event:AddEvent(BattleEventName.SkillCastBefore,OnSkillCast,nil,nil,role)
end, end,
--第[a]回合开始,每个敌方角色有[b]概率获得[c],每秒造成[d]%的属性[e]伤害,持续[f]回合。
--a[int],b[float],c[持续伤害类型],d[float],e[int,属性id],f[int]
[439] = function(role, args,id,judge)
local r1 = args[1]
local f1 = args[2]
local d1 = args[3]
local f2 = args[4]
local dt = args[5]
local f3 = args[6]
local OnSkillCastEnd = function(round)
if round~=r1 then
return
end
local arr = BattleUtil.ChooseTarget(role, 200000)
for i=1, #arr do
-- BattleUtil.RandomAction(f1, function ()--
-- arr[i]:AddBuff(Buff.Create(role, BuffName.DOT, f3, 1, d1, dt, f2))
-- end)
local attack = role:GetRoleData(dt)
local damage = floor(BattleUtil.ErrorCorrection(attack*f2))
--LogError("attack=="..attack.." damage=="..damage)
BattleUtil.RandomDot(f1,d1,role,arr[i],f3,1,damage,nil)
end
end
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart, OnSkillCastEnd,nil,nil,role)
end,
} }