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

16 lines
582 B
Lua
Raw Normal View History

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