mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
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
This commit is contained in:
@@ -1,11 +1,26 @@
|
||||
require("modifiers");
|
||||
|
||||
--15% in ARR, dont know how it worked in 1.0
|
||||
function onGain(target, effect)
|
||||
local currEvade = target.GetMod(modifierGlobals.Evasion);
|
||||
target.SetMod(modifierGlobals.Evasion, currEvade + 15);
|
||||
target.AddMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
local currEvade = target.GetMod(modifierGlobals.Evasion);
|
||||
target.SetMod(modifierGlobals.Evasion, currEvade - 15);
|
||||
target.SubtractMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
end;
|
||||
|
||||
--Returns 25%? of amount dodged as MP
|
||||
function onEvade(effect, attacker, defender, action, actionContainer)
|
||||
--25% of amount dodged untraited, 50% traited
|
||||
local percent = 0.25;
|
||||
if (effect.GetTier() == 2) then
|
||||
percent = 0.50;
|
||||
end
|
||||
|
||||
local mpToReturn = percent * action.amountMitigated;
|
||||
defender.AddMP(math.ceil(mpToReturn));
|
||||
--33010: You recover x MP from Featherfoot
|
||||
actionContainer.AddMPAction(defender.actorId, 33010, mpToReturn);
|
||||
--Featherfoot is lost after evading
|
||||
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
end;
|
Reference in New Issue
Block a user