【战斗】=====================被动添加470

dev_fengTi_And
wangzhenxing 2023-07-21 17:46:35 +08:00
parent 1e7aba83c2
commit d4585f2c97
1 changed files with 39 additions and 0 deletions

View File

@ -12375,5 +12375,44 @@ local passivityList = {
end
role.Event:AddEvent(BattleEventName.RoleBeDamaged, BeDamagedFun,nil,nil,role)
end,
-- 攻击目标越少对每个目标提升控制概率越高,提升概率为[a]%除以被击者的总数,提升为[b]改变,控制类型:[c],[d],[e],[f]
-- a[float],b[int 改变类型],c[int],d[int],e[int],f[int]
[470] = function(role, args,id,judge)
local f1 = args[1]
local ct = args[2]
local v1 = args[3]
local v2 = args[4]
local v3 = args[5]
local v4 = args[6]
local ctrls={}
if v1 then
table.insert(ctrls,v1)
end
if v2 then
table.insert(ctrls,v2)
end
if v3 then
table.insert(ctrls,v3)
end
if v4 then
table.insert(ctrls,v4)
end
local af = 0
local onSkillCast = function(skill)
local maxNum = skill:GetMaxTargetNum()
if maxNum and maxNum > 0 then
af = BattleUtil.ErrorCorrection(f1/maxNum)
end
end
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role)
local onPassiveRandomControl = function(func, ctrl2)
if BattleUtil.ChecklistIsContainValue(ctrl2) then
if func then func(af, ct) end
end
end
role.Event:AddEvent(BattleEventName.PassiveRandomControl, onPassiveRandomControl,nil,nil,role)
end,
}
return passivityList