--计算攻击威力(返回输出威力)
function on_GetAttackPower(actor, Target, nPoint)
local incPoint = 0
local RaceId = actor:getRace()--种族ID
if (RaceId == 66) or (RaceId == 0) then--(英雄或人物)按角色的幸运值,进行威力加倍输出
local luck = actor:getLuck()--取人物的幸运值
if luck > 7 then
if luck > 10 then
incPoint= math.round(nPoint * 1.5)
elseif luck == 10 then
incPoint= math.round(nPoint * 1.3)
elseif luck == 9 then
incPoint= math.round(nPoint * 1.2)
elseif luck == 8 then
incPoint= math.round(nPoint * 1.1)
end
actor:sendMsg(1,"幸运:"..tostring(luck).." 威力+"..tostring(incPoint), 252, 255)
end
end
return nPoint + incPoint
end
冰咆哮、火墙、疾光电影、流星火雨等..不锁定目标的技能
如果释放时,鼠标未指向目标,幸运倍攻脚本就不触发
|