mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-22 04:37:47 +00:00

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
23 lines
1.1 KiB
Lua
23 lines
1.1 KiB
Lua
require("modifiers")
|
|
require("battleutils")
|
|
|
|
--Dread spike completely nullifies a physical action and absorbs how much damage it would have done (when it's powered up)
|
|
--I'm going to assume it only absorbs half damage without LS/PS up
|
|
--When I say it nullifies an attack, it even gets rid of the message. It's as if the attack didn't happen
|
|
--Don't know how this works with multi-hit attacks or even how it works with stoneskin or other buffs that respond to damage
|
|
-- I dont really know how this should work...
|
|
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
|
if action.actionType == ActionType.Physical then
|
|
--maybe this works?
|
|
local absorbAmount = action.amount;
|
|
action.amount = 0;
|
|
action.worldMasterTextId = 0;
|
|
|
|
attacker.AddHP(absorbAmount);
|
|
--30451: You recover [absorbAmount] HP.
|
|
actionContainer.AddHPAction(defender.actorId, 30451, absorbAmount)
|
|
--Dread Spike is lost after absorbing hp
|
|
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
|
end
|
|
end;
|
|
|