mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Updated Map Server namespace. Moved all other data folders (www and sql) to data folder. Renamed boot name to Project Meteor.
This commit is contained in:
16
Data/scripts/effects/decoy2.lua
Normal file
16
Data/scripts/effects/decoy2.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--This is the traited version of Decoy. It can also evade physical attacks.
|
||||
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 skill.GetActionType() == ActionType.Magic or skill.GetActionType() == ActionType.Physical) then
|
||||
--Set action's hit rate to 0
|
||||
action.hitRate = 0.0;
|
||||
action.resistRate = 400;
|
||||
--Remove status and add message
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
|
||||
end;
|
||||
Reference in New Issue
Block a user