project-meteor-server/data/scripts/effects/foresight.lua
yogurt c5ce2ec771 Combat additions
Added formulas for base EXP gain and chain experience
Added basic scripts for most player abilities and effects
Added stat gains for some abilities
Changed status flags
Fixed bug with player death
Fixed bug where auto attacks didnt work when not locked on
Added traits
2018-04-18 16:06:41 -05:00

15 lines
488 B
Lua

require("modifiers")
function onGain(target, effect)
--Parry is .1% per , Random guess but gonna say it gives 20% worth of parry.
target.AddMod(modifiersGlobal.Parry, 200);
end;
function onParry(effect, attacker, defender, action, actionContainer)
--Foresight is lost after parrying
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
end;
function onLose(target, effect)
target.SubtractMod(modifiersGlobal.Parry, 200);
end;