mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02: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:
parent
b8d6a943aa
commit
c5ce2ec771
239 changed files with 5125 additions and 1237 deletions
43
data/scripts/commands/ability/blissful_mind.lua
Normal file
43
data/scripts/commands/ability/blissful_mind.lua
Normal file
|
@ -0,0 +1,43 @@
|
|||
require("global");
|
||||
require("ability");
|
||||
|
||||
function onAbilityPrepare(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
--27362: Enhanced Blissful Mind
|
||||
if caster.HasTrait(27362) then
|
||||
ability.statusTier = 2;
|
||||
end
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Blissful Mind
|
||||
--223228: Blissful Mind
|
||||
--223242: Fully Blissful Mind
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223228) or caster.statusEffects.GetStatusEffectById(223242);
|
||||
|
||||
--If we have a buff then Blissful Mind removes that buff and restores MP. Otherwise, it adds the Blissful Mind effect
|
||||
if buff ~= nil then
|
||||
local amount = buff.GetExtra();
|
||||
local remAction = caster.statusEffects.RemoveStatusEffectForBattleAction(buff, 30329);
|
||||
|
||||
caster.AddMP(amount);
|
||||
|
||||
actionContainer.AddMPAction(caster.actorId, 30321, amount);
|
||||
actionContainer.AddAction(remAction);
|
||||
else
|
||||
--Blissful mind takes 25% of CURRENT HP and begins storing MP up to that point, at which point the buff changes to indicate its full
|
||||
local amount = caster.GetHP() * 0.25;
|
||||
|
||||
caster.DelHP(amount);
|
||||
skill.statusMagnitude = amount;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
||||
end
|
||||
|
||||
end;
|
Loading…
Add table
Add a link
Reference in a new issue