mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Script fixes and new effects.
Cleaned up unneeded requires in some scripts Fixed Second Wind Added new effect scripts Added bard song scripts that mostly work
This commit is contained in:
parent
ace4dfe58f
commit
c442dc9ecd
72 changed files with 524 additions and 171 deletions
|
@ -1,15 +1,58 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
function onMagicPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
function onMagicStart(caster, target, skill)
|
||||
--Ballad gives 20 MP a tick at 50
|
||||
--BV gives 40 MP per tick
|
||||
--Formula seems to be 0.8 * level - 20, not sure why BV gives 71 at 50 then
|
||||
local mpPerTick = (0.8 * caster.GetLevel()) - 20;
|
||||
|
||||
--8032705: Choral Shirt: Enhances Ballad of Magi
|
||||
--With Choral Shirt, Ballad gives 26 mp a tick. It could be a flat 6 or multiply by 1.3
|
||||
--Because minuet seemed like a normal addition I'm assuming this is too
|
||||
local shirt = caster.GetEquipment().GetItemAtSlot(10);
|
||||
if shirt and shirt.itemId == 8032705 then
|
||||
mpPerTick = mpPerTick + 6;
|
||||
end
|
||||
|
||||
--223253: Battle Voice
|
||||
--Battle Voice doubles effect of songs
|
||||
if caster.statusEffects.HasStatusEffect(223253) then
|
||||
mpPerTick = mpPerTick * 2;
|
||||
--Set status tier so we can check it later when BV falls off
|
||||
skill.statusTier = 2;
|
||||
end
|
||||
|
||||
skill.statusMagnitude = mpPerTick;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--223224: Swiftsong
|
||||
--223255: Paeon of War
|
||||
--223256: Minuet of Rigor
|
||||
--
|
||||
local oldSong;
|
||||
local swiftSong = target.statusEffects.GetStatusEffectById(223224);
|
||||
local paeon = target.statusEffects.GetStatusEffectById(223255);
|
||||
local minuet = target.statusEffects.GetStatusEffectById(223256);
|
||||
if swiftSong and swiftSong.GetSource() == caster then
|
||||
oldSong = swiftSong;
|
||||
elseif paeon and paeon.GetSource() == caster then
|
||||
oldSong = paeon;
|
||||
elseif minuet and minuet.GetSource() == caster then
|
||||
oldSong = minuet;
|
||||
elseif ballad and ballad.GetSource() == caster then
|
||||
oldSong = ballad;
|
||||
end
|
||||
|
||||
if oldSong then
|
||||
target.statusEffects.RemoveStatusEffect(oldSong);
|
||||
end
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
|
@ -1,15 +1,56 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
function onMagicPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
function onMagicStart(caster, target, skill)
|
||||
--Miuet gives 35 ACC/MACC by default at level 50. Minuet does scale with level
|
||||
--BV apparetnly gives 71 ACc/MACC
|
||||
--Formula seems to be level - 15, not sure why BV gives 71 at 50 then
|
||||
local acc = caster.GetLevel() - 15;
|
||||
|
||||
--8071405: Choral Ringbands: Enhances Minuet of Rigor
|
||||
--With Choral Tights, Minuet gives 60 ACC/MACC at 50. Unsure what it is at lower levels (ie if it's a flat added 25 MP or a multiplier)
|
||||
--Assuming it's a flat 25 because that makes more sense than multiplying by 1.714
|
||||
local gloves = caster.GetEquipment().GetItemAtSlot(13);
|
||||
if gloves and gloves.itemId == 8071405 then
|
||||
acc = acc + 25;
|
||||
end
|
||||
|
||||
--223253: Battle Voice
|
||||
--Battle Voice doubles effect of songs
|
||||
if caster.statusEffects.HasStatusEffect(223253) then
|
||||
acc = acc * 2;
|
||||
--Set status tier so we can check it later when BV falls off
|
||||
skill.statusTier = 2;
|
||||
end
|
||||
|
||||
skill.statusMagnitude = acc;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--223224: Swiftsong
|
||||
--223254: Ballad Of Magi
|
||||
--223255: Paeon of War
|
||||
--If target has one of these effects that was from this caster, remove it
|
||||
local oldSong;
|
||||
local swiftSong = target.statusEffects.GetStatusEffectById(223224);
|
||||
local ballad = target.statusEffects.GetStatusEffectById(223254);
|
||||
local paeon = target.statusEffects.GetStatusEffectById(223255);
|
||||
if swiftSong and swiftSong.GetSource() == caster then
|
||||
oldSong = swiftSong;
|
||||
elseif ballad and ballad.GetSource() == caster then
|
||||
oldSong = ballad;
|
||||
elseif paeon and paeon.GetSource() == caster then
|
||||
oldSong = paeon;
|
||||
end
|
||||
|
||||
if oldSong then
|
||||
target.statusEffects.RemoveStatusEffect(oldSong);
|
||||
end
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
|
@ -1,15 +1,54 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
function onMagicPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
function onMagicStart(caster, target, skill)
|
||||
--Restores 50 TP/tick normally. With Choral Tights it's 60 TP. With Battle voice it's 100, 120 with Coral Tights.
|
||||
--Battle voice is handled in the Battle Voice script
|
||||
--Paeon does not scale with level
|
||||
local tpPerTick = 50;
|
||||
|
||||
--8051405: Choral Tights: Enhances Paeon Of War
|
||||
local pants = caster.GetEquipment().GetItemAtSlot(12);
|
||||
if pants and pants.itemId == 8051405 then
|
||||
tpPerTick = 60;
|
||||
end
|
||||
|
||||
--223253: Battle Voice
|
||||
--Battle Voice doubles effect of songs
|
||||
if caster.statusEffects.HasStatusEffect(223253) then
|
||||
tpPerTick = tpPerTick * 2;
|
||||
--Set status tier so we can check it later when BV falls off
|
||||
skill.statusTier = 2;
|
||||
end
|
||||
|
||||
skill.statusMagnitude = tpPerTick;
|
||||
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 swiftSong = target.statusEffects.GetStatusEffectById(223224);
|
||||
local ballad = target.statusEffects.GetStatusEffectById(223254);
|
||||
local minuet = target.statusEffects.GetStatusEffectById(223256);
|
||||
if swiftSong and swiftSong.GetSource() == caster then
|
||||
oldSong = swiftSong;
|
||||
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;
|
|
@ -8,11 +8,11 @@ end;
|
|||
function onMagicStart(caster, target, spell)
|
||||
--27363: Enhanced Raise: No longer inflicts weakness.
|
||||
if caster.HasTrait(27363) then
|
||||
ability.statusTier = 2;
|
||||
ability.statusId = 0;
|
||||
end
|
||||
return 0;
|
||||
end;
|
||||
|
||||
--Not sure how raise works yet.
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
Loading…
Add table
Add a link
Reference in a new issue