1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-21 12:17:46 +00:00
project-meteor-server/data/scripts/effects/blissful_mind.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

21 lines
No EOL
904 B
Lua

--The amount of time it takes to fully charge varies depending on how much MP it has to restore, meaning its not just a percent every tick
--Based on a few videos it seems like it heals for 0.5% of max MP every second, traited. This is an early guess but it seems correct
--Untraited is less clear. It could be 0.25%, 0.30%, or 0.40%. Guessing it's 0.30
function onTick(owner, effect)
local percentPerSecond = 0.0030;
if effect.GetTier() == 2 then
percentPerSecond = 0.005;
end
print(effect.GetExtra());
local amount = percentPerSecond * owner.GetMaxMP() + 0.25;
effect.SetExtra(effect.GetExtra() + amount);
if effect.GetExtra() >= effect.GetMagnitude() then
--223242: Fully Blissful Mind
owner.statusEffects.ReplaceEffect(effect, 223242, 1, effect.GetMagnitude(), 0xffffffff);
--owner.statusEffects.ReplaceEffect(effect, true);
end
end