local function MagicBuff_2022040601(ActName,TagName,play,_id)
local pts={"法术","道术"}
local function SETBUF1(k,p1)
local ps1=ActName:getHitSpeed()
if S.GETPERSON_N(play,"040601",k.mcd)==1 then
S.SETEFFCT(ActName,18)
--local sp2=math.ceil(ps1*k.speed/100)
local sp2=k.speed
ActName:changeHumAbil(3,"+",sp2,k.timer)
local ts=ActName:getCharName()..string.format("佩戴的[%s]%s攻击触发[速度BUFF],速度增加%d%%+%d点.持续%d秒!",k.name,pts[p1],k.speed,sp2,k.timer)
play:sendCenterMsg(0,251,ts,0, 3, 3)
end
end
local pj=ActName:getJob()
if pj==1 and S.GETMAGIDID_N(buff_magc,_id)==0 then
for i,k in pairs(Buff_2022040601) do
local r=S.SETBUFF_N2(ActName,k.name,k.buff,2,1)
if r == 1 then SETBUF1(k,1) break end
end
end
if pj==2 and S.GETMAGIDID_N(buff_magc,_id)==0 then
for i,k in pairs(Buff_2022040602) do
local r=S.SETBUFF_N2(ActName,k.name,k.buff,2,1)
if r == 1 then SETBUF1(k,2) break end
end
end
这里怎么触发的是物理攻击速度。不是施法速度
求大神指点一二
好人一生平安
|