1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-22 04:37:47 +00:00
project-meteor-server/data/scripts/effects/decoy2.lua

16 lines
591 B
Lua
Raw Normal View History

require("modifiers")
require("battleutils")
--This is the traited version of Decoy. It can also evade physical attacks.
function onPreAction(caster, target, effect, skill, action, actionContainer)
--Evade single ranged or magic attack
--Traited allows for physical attacks
if skill.isRanged or action.actionType == ActionType.Magic or action.actionType == ActionType.Physical then
--Set action's hit rate to 0
action.hirRate = 0.0;
end
--Remove status and add message
actionsList.AddAction(target.statusEffects.RemoveForBattleAction(effect));
end;