mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
New scripts
New scripts for commands and effects that use the new function signatures and work with the new statuseffectcontainer
This commit is contained in:
parent
4f80023156
commit
00017468cc
129 changed files with 884 additions and 396 deletions
35
data/scripts/commands/magic/swiftsong.lua
Normal file
35
data/scripts/commands/magic/swiftsong.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--223224: Swiftsong
|
||||
--223254: Ballad Of Magi
|
||||
--223256: Minuet of Rigor
|
||||
--If target has one of these effects that was from this caster, remove it
|
||||
local oldSong;
|
||||
local paeon = target.statusEffects.GetStatusEffectById(223255);
|
||||
local ballad = target.statusEffects.GetStatusEffectById(223254);
|
||||
local minuet = target.statusEffects.GetStatusEffectById(223256);
|
||||
if paeon and paeon.GetSource() == caster then
|
||||
oldSong = paeon;
|
||||
elseif ballad and ballad.GetSource() == caster then
|
||||
oldSong = ballad;
|
||||
elseif minuet and minuet.GetSource() == caster then
|
||||
oldSong = minuet;
|
||||
end
|
||||
|
||||
if oldSong then
|
||||
target.statusEffects.RemoveStatusEffect(oldSong);
|
||||
end
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
Loading…
Add table
Add a link
Reference in a new issue