mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +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
|
@ -3,17 +3,17 @@ require("utils")
|
|||
|
||||
--Forces a full block (0 damage taken)
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--If action hit from the rear and is a weaponskill ation
|
||||
--Can aegis boon block rear attacks or non-physical attacks?
|
||||
action.blockRate = 100.0;
|
||||
end;
|
||||
|
||||
--Heals for the amount of HP blocked, up to a certain point. I don't know what determines the cap but it seems to be 703 at level 50. Unsure if it scales down based on level, dlvl, or if that's an arbitrary cap added.
|
||||
function onBlock(effect, attacker, defender, action, actionContainer)
|
||||
function onBlock(effect, attacker, defender, skill, action, actionContainer)
|
||||
--Amount blocked
|
||||
local absorbAmount = math.Clamp(action.amountMitigated, 0, 703);
|
||||
|
||||
--33008: You recover x HP from Aegis Boon
|
||||
defender.AddHP(absorbAmount);
|
||||
actionContainer.AddHPAction(defender.actorId, 33008, absorbAmount);
|
||||
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer);
|
||||
end;
|
|
@ -1,10 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
--Doesn't do flat damage. 20 on Lv 50 Truffle Hog, 11 on Coincounter, 7 on nael hard, 19 on 52 fachan
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end;
|
|
@ -1,10 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Only one song per bard can be active, need to figure out a good way to do this
|
||||
owner.AddMod(modifiersGlobal.Refresh, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Refresh, effect.GetMagnitude());
|
||||
end;
|
|
@ -8,6 +8,6 @@ end;
|
|||
function onCommandFinish(effect, owner, skill, actionContainer)
|
||||
--27259: Light Shot
|
||||
if skill.id == 27259 then
|
||||
actionContainer.AddAction(owner.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
|
@ -1,3 +1,8 @@
|
|||
require("modifiers")
|
||||
|
||||
--BV doesn't really do anything i think
|
||||
--BV doesn't really do anything i think
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
|
@ -1,13 +1,12 @@
|
|||
require("modifiers");
|
||||
|
||||
function onGain(owner, effect)
|
||||
owner.statusEffects.RemoveStatusEffect(223208);
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end
|
||||
|
||||
--Increases attack power and reduces defense with each successful attack
|
||||
--Does this include weaponskills?
|
||||
--Is this on every hit or every succesfull skill useage?
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
--Trait increases effect by 20%. Does this include the reduced defense,
|
||||
--does this increase the cap or the rate at which you get AP or both?
|
||||
|
||||
|
@ -32,7 +31,7 @@ function onHit(effect, attacker, defender, action, actionContainer)
|
|||
end
|
||||
end;
|
||||
|
||||
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
local apPerHit = 20;
|
||||
local defPerHit = 20;
|
||||
|
||||
|
@ -45,7 +44,7 @@ function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
|||
effect.SetExtra(0);
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local apPerHit = 20;
|
||||
local defPerHit = 20;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require("modifiers");
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
|
@ -1,9 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
|
@ -4,12 +4,12 @@ require("battleutils")
|
|||
--Forces crit of a single WS action from rear.
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--If action hit from the rear and is a weaponskill ation
|
||||
if (action.param == HitDirection.Rear and action.commandType == CommandType.WeaponSkill) then
|
||||
if (action.param == HitDirection.Rear and skill.GetCommandType() == CommandType.WeaponSkill) then
|
||||
--Set action's crit rate to 100%
|
||||
action.critRate = 100.0;
|
||||
end
|
||||
|
||||
--Remove status and add message
|
||||
actionsList.AddAction(target.statusEffects.RemoveForBattleAction(effect));
|
||||
target.statusEffects.RemoveStatusEffect(effect, actionContainer);
|
||||
end;
|
||||
|
||||
|
|
17
data/scripts/effects/blindside2.lua
Normal file
17
data/scripts/effects/blindside2.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--Forces crit of a single WS action from rear.
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--If action hit from the rear and is a weaponskill ation
|
||||
if (action.param == HitDirection.Rear and skill.GetCommandType() == CommandType.WeaponSkill) then
|
||||
--Set action's crit rate to 100%
|
||||
action.critRate = 100.0;
|
||||
end
|
||||
|
||||
--Figure out INT bonus for tier 2
|
||||
|
||||
--Remove status and add message
|
||||
target.statusEffects.RemoveStatusEffect(effect, actionContainer);
|
||||
end;
|
||||
|
|
@ -2,15 +2,13 @@
|
|||
--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)
|
||||
function onTick(owner, effect, actionContainer)
|
||||
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
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
function onLose(target, effect)
|
||||
target:SetProc(1, false);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetProc(1, false);
|
||||
end;
|
|
@ -3,7 +3,7 @@ require("battleUtils")
|
|||
--Takes 10% of hp rounded down when using a weaponskill
|
||||
--Random guess, but increases damage by 10% (12.5% traited)?
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
if skill.commandType == CommandType.Weaponskill then
|
||||
if skill.GetCommandType() == CommandType.Weaponskill then
|
||||
local hpToRemove = math.floor(caster.GetHP() * 0.10);
|
||||
local modifier = 1.10;
|
||||
|
||||
|
@ -12,9 +12,9 @@ function onPreAction(effect, caster, target, skill, action, actionContainer)
|
|||
end
|
||||
|
||||
action.amount = action.amount * modifier;
|
||||
caster.DelHP(hpToRemove);
|
||||
caster.DelHP(hpToRemove, actionContainer);
|
||||
|
||||
--Remove status and add message
|
||||
actionContainer.AddAction(target.statusEffects.RemoveForBattleAction(effect));
|
||||
--Remove status and add message
|
||||
caster.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, true);
|
||||
end
|
||||
end;
|
|
@ -1,7 +1,8 @@
|
|||
require("modifiers");
|
||||
require("battleutils")
|
||||
|
||||
--Absorb HP on next WS or ability
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
|
||||
--1.21: Absorb HP amount no longer affected by player VIT rating.
|
||||
--Bloodbath seems based on both defener and attacker's stats, even after 1.21.
|
||||
|
@ -11,14 +12,14 @@ function onHit(effect, attacker, defender, action, actionContainer)
|
|||
--Possibly magic resist? Slashing resist?
|
||||
|
||||
--For now using 1.0 as baseline since that seems to be the average
|
||||
if action.commandType == CommandType.Weaponskill or action.commandType == CommandType.Ability then
|
||||
if skill.GetCommandType() == CommandType.Weaponskill or skill.GetCommandType() == CommandType.Ability then
|
||||
local absorbModifier = 1.0
|
||||
local absorbAmount = action.amount * absorbModifier;
|
||||
|
||||
attacker.AddHP(absorbAmount);
|
||||
--30332: You absorb hp from target
|
||||
actionContainer.AddHPAction(defender.actorId, 30332, absorbAmount)
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, absorbAmount)
|
||||
--Bloodbath is lost after absorbing hp
|
||||
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect,actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
|
@ -8,13 +8,14 @@ require("modifiers")
|
|||
--Bloodletter is apparently impacted by PIE
|
||||
--http://forum.square-enix.com/ffxiv/threads/35795-STR-DEX-PIE-ATK-Testing/page2
|
||||
--Chance to land is also impacted by PIE
|
||||
function onGain(owner, effect)
|
||||
--This is because PIE increases Enfeebling Magic Potency which impacts additional effect damage and land rates
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, 15);
|
||||
end
|
||||
|
||||
--Additional damage is 570 at level 50
|
||||
--https://ffxiv.gamerescape.com/w/index.php?title=Bloodletter&oldid=298020
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RegenDown, 15);
|
||||
owner.DelHP(570);
|
||||
owner.DelHP(570, actionContainer);
|
||||
end
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
--Bloodletter2 is the uncomboed version of Bloodletter. It doesn't deal any additional damage when it falls off but has the same tick damage
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, 15);
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RegenDown, 15);
|
||||
end
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Multiples Attack Magic Potency by 1.2 and Healing Magic Potency by 0.8
|
||||
target.SetMod(modifiersGlobal.MagicAttack, target.GetMod(modifiersGlobal.MagicAttack) * 1.2);
|
||||
target.SetMod(modifiersGlobal.MagicHeal, target.GetMod(modifiersGlobal.MagicHeal) * 0.8);
|
||||
owner.MultiplyMod(modifiersGlobal.AttackMagicPotency, 1.2);
|
||||
owner.MultiplyMod(modifiersGlobal.HealingMagicPotency, 0.8);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.SetMod(modifiersGlobal.MagicAttack, target.GetMod(modifiersGlobal.MagicAttack) / 1.2);
|
||||
target.SetMod(modifiersGlobal.MagicHeal, target.GetMod(modifiersGlobal.MagicHeal) / 0.8);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.DivideMod(modifiersGlobal.AttackMagicPotency, 1.2);
|
||||
owner.DivideMod(modifiersGlobal.HealingMagicPotency, 0.8);
|
||||
end;
|
|
@ -1,10 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
local enmity = action.enmity;
|
||||
action.enmity = 0;
|
||||
|
||||
defender.hateContainer.UpdateHate(effect.GetSource(), enmity);
|
||||
--Does collusion send a message?
|
||||
actionContainer.AddAction(attacker.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end;
|
|
@ -1,3 +1,6 @@
|
|||
function onLose(target, effect)
|
||||
target:SetCombos();
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetCombos();
|
||||
end;
|
|
@ -1,7 +1,7 @@
|
|||
require("modifiers")
|
||||
|
||||
--Enahnced Cover: Restores 25% of damage taken as MP. Does not send a message
|
||||
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
if effect.GetTier() == 2 then
|
||||
defender.AddMP(0.25 * action.amount);
|
||||
end
|
||||
|
|
|
@ -5,9 +5,9 @@ require("battleutils")
|
|||
--There isn't really any information on this, but due to the fact it falls off BEFORE the target is hit,
|
||||
--I'm assuming it increases a spell's accuracy modifier instead of giving actual magic accuracy
|
||||
function onCommandStart(effect, owner, skill, actionContainer)
|
||||
if skill.actionType == ActionType.Magic then
|
||||
if skill.GetActionType() == ActionType.Magic then
|
||||
--50 is random guess.
|
||||
skill.accuracyModifier = skill.accuracyModifier + 50;
|
||||
actionContainer.AddAction(owner.RemoveStatusEffectForBattleAction(effect));
|
||||
owner.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end
|
|
@ -5,12 +5,13 @@ require("battleutils")
|
|||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--Evade single ranged or magic attack
|
||||
--Traited allows for physical attacks
|
||||
if target.allegiance != caster.allegiance and (skill.isRanged or action.actionType == ActionType.Magic) then
|
||||
if target.allegiance != caster.allegiance and (skill.isRanged or skill.GetActionType() == ActionType.Magic) then
|
||||
--Unsure if decoy forces a miss/resist or if this is the one case where the evade hittype is used
|
||||
--Set action's hit rate to 0
|
||||
action.hirRate = 0.0;
|
||||
|
||||
action.hitRate = 0.0;
|
||||
action.resistRate = 750;
|
||||
--Remove status and add message
|
||||
actionContainer.AddAction(target.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
|
||||
end;
|
|
@ -5,11 +5,12 @@ require("battleutils")
|
|||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--Evade single ranged or magic attack
|
||||
--Traited allows for physical attacks
|
||||
if target.allegiance != caster.allegiance and (skill.isRanged or action.actionType == ActionType.Magic or action.actionType == ActionType.Physical) then
|
||||
if target.allegiance != caster.allegiance and (skill.isRanged or skill.GetActionType() == ActionType.Magic or skill.GetActionType() == ActionType.Physical) then
|
||||
--Set action's hit rate to 0
|
||||
action.hirRate = 0.0;
|
||||
action.hitRate = 0.0;
|
||||
action.resistRate = 400;
|
||||
--Remove status and add message
|
||||
actionContainer.AddAction(target.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
|
||||
end;
|
|
@ -1,5 +1,5 @@
|
|||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
|
@ -1,9 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
end
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regen, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regen, effect.GetMagnitude());
|
||||
end
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
require("modifiers")
|
||||
|
||||
--Increases block rate by 100%
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RawBlockRate, 100);
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RawBlockRate, 100);
|
||||
end
|
||||
|
||||
--Applys Divine Regen to party in range when healed by cure or cura
|
||||
function onHealed(caster, target, effect, skill, action, actionContainer)
|
||||
function onHealed(effect, caster, target, skill, action, actionContainer)
|
||||
-- cure cura
|
||||
if (skill.id == 27346 or skill.id == 27347) and (caster != owner) then
|
||||
if (skill.id == 27346 or skill.id == 27347) and (caster != target) then
|
||||
local regenDuration = 30;
|
||||
--Apparently heals for 85 without AF, 113 with. Unsure if these can be improved with stats
|
||||
local magnitude = 85
|
||||
|
@ -23,9 +23,8 @@ function onHealed(caster, target, effect, skill, action, actionContainer)
|
|||
end
|
||||
|
||||
--For each party member in range, add divine regen
|
||||
for chara in owner.GetPartyMembersInRange(8) do
|
||||
local addAction = chara.statusEffects.AddStatusForBattleAction(223264, effect.GetTier(), magnitude, regenDuration);
|
||||
actionContainer.AddAction(addAction);
|
||||
for chara in target.GetPartyMembersInRange(8) do
|
||||
chara.statusEffects.AddStatusEffect(223264, effect.GetTier(), magnitude, regenDuration, actionContainer);
|
||||
end
|
||||
end
|
||||
end;
|
|
@ -7,8 +7,8 @@ require("battleutils")
|
|||
--It still shows the enemy's "Enemy used [command]." message but there is no 0 damage dealt message.
|
||||
--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
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetActionType() == ActionType.Physical then
|
||||
--maybe this works?
|
||||
local absorbPercent = 0.5;
|
||||
|
||||
|
@ -24,7 +24,6 @@ function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
|||
--30451: You recover [absorbAmount] HP.
|
||||
actionContainer.AddHPAction(defender.actorId, 30451, absorbAmount)
|
||||
--Dread Spike is lost after absorbing hp
|
||||
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
||||
|
||||
end;
|
|
@ -1,20 +1,20 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Traited increases speed by 20%. Assuming that means it actually increases speed instead of simply offsetting the negative speed it has by default
|
||||
local speedModifier = 0.8;
|
||||
if effect.GetTier() == 2 then
|
||||
speedModifier = 1.2;
|
||||
end
|
||||
|
||||
target.SetMod(modifiersGlobal.Speed, target.GetMod(modifiersGlobal.Speed) * speedModifier);
|
||||
owner.MultiplyMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local speedModifier = 0.8;
|
||||
if effect.GetTier() == 2 then
|
||||
speedModifier = 1.2;
|
||||
end
|
||||
|
||||
target.SetMod(modifiersGlobal.Speed, target.GetMod(modifiersGlobal.Speed) / speedModifier);
|
||||
owner.DivideMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
|
@ -1,3 +1,3 @@
|
|||
function onLose(target, effect)
|
||||
target:SetProc(0, false);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetProc(0, false);
|
||||
end;
|
|
@ -2,7 +2,7 @@ require("modifiers")
|
|||
require("battleutils")
|
||||
|
||||
--Gradually increases critical rate of spells
|
||||
function onTick(owner, effect)
|
||||
function onTick(owner, effect, actionContainer)
|
||||
--No clue how fast the crit rate increases or how often it ticks
|
||||
--Only clue I have to go on is that the strategy seemed to be to use it
|
||||
--before or after fire/thunder and you'd usually get a crit at firaga/thundaga
|
||||
|
@ -23,8 +23,8 @@ function onCommandStart(effect, owner, skill, actionContainer)
|
|||
skill.bonusCritRate = skill.bonusCritRate + effect.GetMagnitude();
|
||||
end
|
||||
|
||||
function onCrit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.Spell then
|
||||
actionContainer.AddAction(attacker.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
function onCrit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.Spell then
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end
|
7
data/scripts/effects/expchain.lua
Normal file
7
data/scripts/effects/expchain.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
|
@ -1,16 +1,16 @@
|
|||
require("modifiers");
|
||||
|
||||
--15% in ARR, dont know how it worked in 1.0
|
||||
function onGain(target, effect)
|
||||
target.AddMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.SubtractMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
end;
|
||||
|
||||
--Returns 25%? of amount dodged as MP
|
||||
function onEvade(effect, attacker, defender, action, actionContainer)
|
||||
function onEvade(effect, attacker, defender, skill, action, actionContainer)
|
||||
--25% of amount dodged untraited, 50% traited
|
||||
local percent = 0.25;
|
||||
if (effect.GetTier() == 2) then
|
||||
|
@ -22,5 +22,5 @@ function onEvade(effect, attacker, defender, action, actionContainer)
|
|||
--33010: You recover x MP from Featherfoot
|
||||
actionContainer.AddMPAction(defender.actorId, 33010, mpToReturn);
|
||||
--Featherfoot is lost after evading
|
||||
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end;
|
|
@ -1,6 +1,4 @@
|
|||
function onGain(target, effect)
|
||||
target.statusEffects.RemoveStatusEffect(223209)
|
||||
target.statusEffects.RemoveStatusEffect(223211)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
--Need to do more research on these.
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
function onGain(target, effect)
|
||||
target.statusEffects.RemoveStatusEffect(223210)
|
||||
target.statusEffects.RemoveStatusEffect(223211)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
|
@ -1,4 +1,2 @@
|
|||
function onGain(target, effect)
|
||||
target.statusEffects.RemoveStatusEffect(223210)
|
||||
target.statusEffects.RemoveStatusEffect(223209)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
9
data/scripts/effects/flare2.lua
Normal file
9
data/scripts/effects/flare2.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end
|
|
@ -1,15 +1,15 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Parry is .1% per , Random guess but gonna say it gives 20% worth of parry.
|
||||
target.AddMod(modifiersGlobal.Parry, 200);
|
||||
owner.AddMod(modifiersGlobal.Parry, 200);
|
||||
end;
|
||||
|
||||
function onParry(effect, attacker, defender, action, actionContainer)
|
||||
function onParry(effect, attacker, defender, skill, action, actionContainer)
|
||||
--Foresight is lost after parrying
|
||||
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.SubtractMod(modifiersGlobal.Parry, 200);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Parry, 200);
|
||||
end;
|
|
@ -1,7 +1,7 @@
|
|||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Using extra because that's what blissful_mind uses
|
||||
effect.SetExtra(effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end
|
||||
|
|
9
data/scripts/effects/glare.lua
Normal file
9
data/scripts/effects/glare.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
|
@ -1,9 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end
|
||||
|
|
9
data/scripts/effects/hallowed_ground.lua
Normal file
9
data/scripts/effects/hallowed_ground.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.DamageTakenDown, 100);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.DamageTakenDown, 100);
|
||||
end;
|
|
@ -1,10 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
--Set magnitude to milliseconds that HF will reduce delay by
|
||||
function onGain(target, effect)
|
||||
target.SubtractMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.AddMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
end;
|
|
@ -6,19 +6,19 @@ require("modifiers");
|
|||
--This could mean traited hawk's eye gives 28.125% (18.75% * 1.5) or it could mean it gives 68.75% (18.75% + 50%)
|
||||
--It's also possible that Hawk's Eye gives 15 + 15% accuracy untraited, which would give 450.85, which would be rounded down.
|
||||
--In that case, traited hawks eye could be 15 + 22.5% or 22.5 + 22.5% or (15 + 15%) * 1.5
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local accuracyMod = 0.1875;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
accuracyMod = 0.28125;
|
||||
end
|
||||
|
||||
local amountGained = accuracyMod * target.GetMod(modifiersGlobal.Accuracy);
|
||||
local amountGained = accuracyMod * owner.GetMod(modifiersGlobal.Accuracy);
|
||||
effect.SetMagnitude(amountGained);
|
||||
target.AddMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
|
||||
target.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
owner.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
|
@ -1,13 +1,13 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
local speedModifier = 0.5;
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local speedModifier = 0.8;
|
||||
|
||||
target.SetMod(modifiersGlobal.Speed, target.GetMod(modifiersGlobal.Speed) * speedModifier);
|
||||
owner.MultiplyMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
local speedModifier = 0.5;
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local speedModifier = 0.8;
|
||||
|
||||
target.SetMod(modifiersGlobal.Speed, target.GetMod(modifiersGlobal.Speed) / speedModifier);
|
||||
owner.DivideMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
|
@ -2,14 +2,14 @@ require("modifiers")
|
|||
|
||||
--Battle Voice grants HP_Boost and it sets max hp to 125% normal amount and heals for the difference between current
|
||||
--This doesn't seem like the correct way to do this. If max HP changes between gainign and losing wont this break?
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local newMaxHP = target.GetMaxHP() * 1.25;
|
||||
local healAmount = newMaxHP - target.GetMaxHP();
|
||||
|
||||
target.SetMaxHP(newMaxHP);
|
||||
target.AddHP(healAmount);
|
||||
owner.SetMaxHP(newMaxHP);
|
||||
owner.AddHP(healAmount);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.SetMaxHP(target.GetMaxHP() / 1.25);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SetMaxHP(owner.GetMaxHP() / 1.25);
|
||||
end;
|
|
@ -1,10 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
--Set magnitude to milliseconds that HF will reduce delay by
|
||||
function onGain(target, effect)
|
||||
target.SubtractMod(modifiersGlobal.AttackDelay), effect.GetMagnitude());
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Delay, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.AddMod(modifiersGlobal.AttackDelay), effect.GetMagnitude());
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Delay, effect.GetMagnitude());
|
||||
end;
|
|
@ -1,10 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
--100 TP per tick without AF. 133 TP per tick with AF
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ require("battleutils")
|
|||
--Untraited reduces cooldown by 50%
|
||||
--Traited reduces cooldown by 100%
|
||||
function onCommandStart(effect, owner, skill, actionContainer)
|
||||
if skill.commandType == CommandType.Weaponskill then
|
||||
if skill.GetCommandType() == CommandType.Weaponskill then
|
||||
local reduction = 0.5;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
|
|
|
@ -4,8 +4,8 @@ require("battleutils")
|
|||
--Trait: Increases healing by 20%. Is this the base % or the amount after taking the base percent?
|
||||
--I'm guessing the way it works is that LSI/II/III have 10/20/30% absorb by default and 30/40/50% traited.
|
||||
--Seems to match what i can find in videos
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.AutoAttack then
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.AutoAttack then
|
||||
local healPercent = 0.10;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
|
@ -14,6 +14,6 @@ function onHit(effect, attacker, defender, action, actionContainer)
|
|||
|
||||
local amount = math.floor((healPercent * action.amount) + 1);
|
||||
attacker.AddHP(amount);
|
||||
actionContainer.AddHPAction(defender.actorId, 30332, amount);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
|
||||
end
|
||||
end;
|
|
@ -1,7 +1,7 @@
|
|||
require("battleutils")
|
||||
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.AutoAttack then
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.AutoAttack then
|
||||
local healPercent = 0.20;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
|
@ -10,6 +10,6 @@ function onHit(effect, attacker, defender, action, actionContainer)
|
|||
|
||||
local amount = math.floor((healPercent * action.amount) + 1);
|
||||
attacker.AddHP(amount);
|
||||
actionContainer.AddHPAction(defender.actorId, 30332, amount);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
|
||||
end
|
||||
end;
|
|
@ -4,16 +4,16 @@ require("battleutils")
|
|||
--Trait: Increases healing by 20%. Is this the base % or the amount after taking the base percent?
|
||||
--I'm guessing the way it works is that LSI/II/III have 10/20/30% absorb by default and 30/40/50% traited.
|
||||
--Seems to match what i can find in videos
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.AutoAttack then
|
||||
local healPercent = 0.10;
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.AutoAttack then
|
||||
local healPercent = 0.30;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
healPercent = 0.30;
|
||||
healPercent = 0.50;
|
||||
end
|
||||
|
||||
local amount = math.floor((healPercent * action.amount) + 1);
|
||||
attacker.AddHP(amount);
|
||||
actionContainer.AddHPAction(defender.actorId, 30332, amount);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
|
||||
end
|
||||
end;
|
|
@ -1,9 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.MagicEvasion, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.MagicEvasion, effect.GetMagnitude());
|
||||
end
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Only one song per bard can be active, need to figure out a good way to do this
|
||||
owner.AddMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.MagicAccuracy, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
owner.SubtractMod(modifiersGlobal.MagicAccuracy, effect.GetMagnitude());
|
||||
end;
|
|
@ -1,3 +1,3 @@
|
|||
function onLose(target, effect)
|
||||
target:SetProc(3, false);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetProc(3, false);
|
||||
end;
|
|
@ -1,12 +1,12 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.Spell then
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.Spell then
|
||||
--Necrogenesis returns 75% of damage done rounded up(?) as MP.
|
||||
local hpToReturn = math.ceil(0.75 * action.amount);
|
||||
attacker.AddMp(hpToReturn);
|
||||
actionContainer.AddHPAction(attacker.actorId, 33012, mpToReturn);
|
||||
actionContainer.AddAction(attacker.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
attacker.AddHP(hpToReturn);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 33012, hpToReturn);
|
||||
attacker.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end
|
|
@ -1,16 +1,16 @@
|
|||
require("modifiers")
|
||||
|
||||
--Add 30 raw block rate. No idea how much block it actually gives.
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RawBlockRate, 30);
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RawBlockRate, 30);
|
||||
end
|
||||
|
||||
--Gives 200 TP on block. Traited: Gives 10% of the amount blocked back as MP
|
||||
function onBlock(effect, attacker, defender, action, actionContainer)
|
||||
function onBlock(effect, attacker, defender, skill, action, actionContainer)
|
||||
--200 TP on block
|
||||
defender.AddTP(200);
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Only one song per bard can be active, need to figure out a good way to do this
|
||||
owner.AddMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end;
|
|
@ -1,3 +1,3 @@
|
|||
function onLose(target, effect)
|
||||
target:SetProc(2, false);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetProc(2, false);
|
||||
end;
|
|
@ -6,12 +6,19 @@ function onMagicCast(caster, effect, skill)
|
|||
skill.mpCost = skill.mpCost / 2;
|
||||
end;
|
||||
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.Spell then
|
||||
--Parsimony returns 35% of damage done rounded up as MP.
|
||||
local mpToReturn = math.ceil(0.35 * action.amount);
|
||||
attacker.AddMp(mpToReturn);
|
||||
actionContainer.AddMPAction(attacker.actorId, 33007, mpToReturn);
|
||||
actionContainer.AddAction(attacker.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
--Having two identical functions seems weird. also don't know if parsimony still activates if resisted or evaded?
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.Spell then
|
||||
local percent = 0.10;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
percent = 0.35;
|
||||
end
|
||||
|
||||
--Parsimony returns 10% (35 traited) of damage done rounded up as MP.
|
||||
local mpToReturn = math.ceil(percent * action.amount);
|
||||
attacker.AddMP(mpToReturn);
|
||||
actionContainer.AddMPAbsorbAction(0, 33007, mpToReturn);
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end
|
|
@ -1,7 +1,9 @@
|
|||
function onGain(owner, effect)
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end
|
||||
|
|
|
@ -2,9 +2,23 @@ require("modifiers")
|
|||
require("battleutils")
|
||||
|
||||
--https://www.bluegartr.com/threads/107403-Stats-and-how-they-work/page22
|
||||
function onGain(owner, effect)
|
||||
owner.AddMod(modifiersGlobal.Attack, 115);
|
||||
owner.SubtractMod(modifiersGlobal.Defense, 158);
|
||||
|
||||
--Base amount of attack gained is 105, which is multiplied by 1.1 if traited. This is why it gives 231 Attack at level 2
|
||||
--Unsure why defense is a weird number
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local attackGained = 315;
|
||||
local defenseLost = 158;
|
||||
|
||||
--Enhanced Power Surge: Increases effect of Power Surge by 10% (assuming this doesn't lower defense further)
|
||||
if owner.HasTrait(27281) then
|
||||
attackGained = attackGained * 1.1;
|
||||
end
|
||||
|
||||
effect.SetMagnitude(attackGained);
|
||||
effect.SetExtra(defenseLost);
|
||||
|
||||
owner.AddMod(modifiersGlobal.Attack, effect.GetMagnitude());
|
||||
owner.SubtractMod(modifiersGlobal.Defense, effect.GetExtra());
|
||||
end
|
||||
|
||||
function onCommandStart(effect, owner, command, actionContainer)
|
||||
|
@ -14,7 +28,7 @@ function onCommandStart(effect, owner, command, actionContainer)
|
|||
effect.SetTier(effect.GetTier() + 1);
|
||||
|
||||
--Takes 10 weaponskills/jumps to increase level
|
||||
if effect.GetTier() > 10 then
|
||||
if effect.GetTier() > 1 then
|
||||
local action = owner.statusEffects.ReplaceEffect(effect, 223213, 1, 1, 60);
|
||||
actionContainer.AddAction(action);
|
||||
else
|
||||
|
@ -23,7 +37,7 @@ function onCommandStart(effect, owner, command, actionContainer)
|
|||
end
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
owner.SubtractMod(modifiersGlobal.Attack, 115);
|
||||
owner.AddMod(modifiersGlobal.Defense, 158);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Attack, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetExtra());
|
||||
end
|
|
@ -2,9 +2,20 @@ require("modifiers")
|
|||
require("battleutils")
|
||||
|
||||
--https://www.bluegartr.com/threads/107403-Stats-and-how-they-work/page22
|
||||
function onGain(owner, effect)
|
||||
owner.AddMod(modifiersGlobal.Attack, 230);
|
||||
owner.SubtractMod(modifiersGlobal.Defense, 158);
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local attackGained = 210;
|
||||
local defenseLost = 158;
|
||||
|
||||
--Enhanced Power Surge: Increases effect of Power Surge by 10% (assuming this doesn't lower defense further)
|
||||
if owner.HasTrait(27281) then
|
||||
attackGained = attackGained * 1.1;
|
||||
end
|
||||
|
||||
effect.SetMagnitude(attackGained);
|
||||
effect.SetExtra(defenseLost);
|
||||
|
||||
owner.AddMod(modifiersGlobal.Attack, effect.GetMagnitude());
|
||||
owner.SubtractMod(modifiersGlobal.Defense, effect.GetExtra());
|
||||
end
|
||||
|
||||
function onCommandStart(effect, owner, command, actionContainer)
|
||||
|
@ -23,8 +34,7 @@ function onCommandStart(effect, owner, command, actionContainer)
|
|||
end
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
owner.SubtractMod(modifiersGlobal.Attack, 230);
|
||||
owner.AddMod(modifiersGlobal.Defense, 158);
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Attack, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetExtra());
|
||||
end
|
|
@ -2,9 +2,20 @@ require("modifiers")
|
|||
require("battleutils")
|
||||
|
||||
--https://www.bluegartr.com/threads/107403-Stats-and-how-they-work/page22
|
||||
function onGain(owner, effect)
|
||||
owner.AddMod(modifiersGlobal.Attack, 345);
|
||||
owner.SubtractMod(modifiersGlobal.Defense, 158);
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local attackGained = 315;
|
||||
local defenseLost = 158;
|
||||
|
||||
--Enhanced Power Surge: Increases effect of Power Surge by 10% (assuming this doesn't lower defense further)
|
||||
if owner.HasTrait(27281) then
|
||||
attackGained = attackGained * 1.1;
|
||||
end
|
||||
|
||||
effect.SetMagnitude(attackGained);
|
||||
effect.SetExtra(defenseLost);
|
||||
|
||||
owner.AddMod(modifiersGlobal.Attack, effect.GetMagnitude());
|
||||
owner.SubtractMod(modifiersGlobal.Defense, effect.GetExtra());
|
||||
end
|
||||
|
||||
function onCommandStart(effect, owner, command, actionContainer)
|
||||
|
@ -16,8 +27,7 @@ function onCommandStart(effect, owner, command, actionContainer)
|
|||
end
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
owner.SubtractMod(modifiersGlobal.Attack, 345);
|
||||
owner.AddMod(modifiersGlobal.Defense, 158);
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Attack, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetExtra());
|
||||
end
|
|
@ -1,18 +1,18 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Magnitude is caster's Enhancing Magic Potency.
|
||||
--http://forum.square-enix.com/ffxiv/threads/41900-White-Mage-A-Guide
|
||||
--5-4-5-4-5-4-5-4-5 repeating points of Enhancing for 1 defense
|
||||
--4.56 * Enhancing Potency
|
||||
local defenseBuff = 4.56 * effect.GetMagnitude();
|
||||
|
||||
target.AddMod(modifiersGlobal.Defense, defenseBuff);
|
||||
owner.AddMod(modifiersGlobal.Defense, defenseBuff);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local defenseBuff = 4.56 * effect.GetMagnitude();
|
||||
|
||||
target.SubtractMod(modifiersGlobal.Defense, defenseBuff);
|
||||
owner.SubtractMod(modifiersGlobal.Defense, defenseBuff);
|
||||
end;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Magnitude is caster's Enhancing Magic Potency.
|
||||
--http://forum.square-enix.com/ffxiv/threads/41900-White-Mage-A-Guide
|
||||
--5-4-5-4-5-4-5-4-5 repeating points of Enhancing for 1 defense
|
||||
|
@ -8,29 +8,29 @@ function onGain(target, effect)
|
|||
local defenseBuff = 4.56 * effect.GetMagnitude();
|
||||
local magicDefenseBuff = 0;
|
||||
|
||||
target.AddMod(modifiersGlobal.Defense, defenseBuff);
|
||||
owner.AddMod(modifiersGlobal.Defense, defenseBuff);
|
||||
|
||||
--27365: Enhanced Protect: Increases magic defense gained from Protect.
|
||||
--There is no "magic defense" stat, instead it gives stats to each resist stat.
|
||||
magicDefenseBuff = 6.67 * effect.GetMagnitude();
|
||||
for i = modifiersGlobal.ResistFire, modifiersGlobal.ResistWater do
|
||||
target.AddMod(i, magicDefenseBuff);
|
||||
for i = modifiersGlobal.FireResistance, modifiersGlobal.WaterResistance do
|
||||
owner.AddMod(i, magicDefenseBuff);
|
||||
end
|
||||
|
||||
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local defenseBuff = 4.56 * effect.GetMagnitude();
|
||||
local magicDefenseBuff = 0;
|
||||
|
||||
target.SubtractMod(modifiersGlobal.Defense, defenseBuff);
|
||||
owner.SubtractMod(modifiersGlobal.Defense, defenseBuff);
|
||||
|
||||
--27365: Enhanced Protect: Increases magic defense gained from Protect.
|
||||
--There is no "magic defense" stat, instead it gives stats to each resist stat.
|
||||
magicDefenseBuff = 6.67 * effect.GetMagnitude();
|
||||
for i = modifiersGlobal.ResistFire, modifiersGlobal.ResistWater do
|
||||
target.SubtractMod(i, magicDefenseBuff);
|
||||
for i = modifiersGlobal.FireResistance, modifiersGlobal.WaterResistance do
|
||||
owner.SubtractMod(i, magicDefenseBuff);
|
||||
end
|
||||
end;
|
||||
|
||||
|
|
|
@ -5,12 +5,10 @@ require("battleutils")
|
|||
--Traited reduces cooldown by 100%
|
||||
function onCommandStart(effect, owner, skill, actionContainer)
|
||||
--Does this apply to auto attacks?
|
||||
if skill.commandType == CommandType.Weaponskill or skill.commandType == CommandType.Ability or skill.commandType == CommandType.Magic then
|
||||
if skill.actionType == ActionType.Physical or skill.actionType == ActionType.Magic then
|
||||
--No idea what the enmity effect is
|
||||
skill.enmityModifier = skill.enmityModifier * 0.5;
|
||||
|
||||
owner.AddTP(effect.GetMagnitude());
|
||||
if skill.GetCommandType() == CommandType.Weaponskill or skill.GetCommandType() == CommandType.Ability or skill.GetCommandType() == CommandType.Magic then
|
||||
if skill.GetActionType() == ActionType.Physical or skill.GetActionType() == ActionType.Magic then
|
||||
skill.enmityModifier = skill.enmityModifier * 0.8;
|
||||
skill.tpCost = skill.tpCost - effect.GetMagnitude();
|
||||
end
|
||||
end
|
||||
end;
|
|
@ -1,13 +1,13 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local speedModifier = 1.25;
|
||||
|
||||
target.SetMod(modifiersGlobal.Speed, target.GetMod(modifiersGlobal.Speed) * speedModifier);
|
||||
owner.MultiplyMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local speedModifier = 1.25;
|
||||
|
||||
target.SetMod(modifiersGlobal.Speed, target.GetMod(modifiersGlobal.Speed) / speedModifier);
|
||||
owner.DivideMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
|
@ -1,13 +1,7 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
|
||||
function onCommandStart(effect, attacker, command, actionContainer)
|
||||
--Random guess
|
||||
command.enmityModifier += 0.25;
|
||||
end
|
||||
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.id == 27259 then
|
||||
--Effect stacks up to 3 times
|
||||
if effect.GetTier() < 3 then
|
||||
|
@ -16,8 +10,8 @@ function onHit(effect, attacker, defender, action, actionContainer)
|
|||
end
|
||||
end
|
||||
|
||||
function onMiss(effect, attacker, defender, action, actionContainer)
|
||||
function onMiss(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.id == 27259 then
|
||||
effect.SetTier(0);
|
||||
|
||||
end
|
||||
end
|
|
@ -1,48 +1,47 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
require("utils")
|
||||
|
||||
parryPerDT = 20;
|
||||
delayMsPerDT = 100;
|
||||
|
||||
function onGain(owner, effect)
|
||||
owner.statusEffects.RemoveStatusEffect(223207);
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end
|
||||
|
||||
--Increases parry rating and attack speed for each hit. (Need more info)
|
||||
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
--Assuming 20 parry rating every time you're hit up to 200
|
||||
--Delay is more complicated. Most axes are around 4 seconds, so i'm gonna assume it cuts off a full second at max
|
||||
if (effect.GetExtra() < 10) then
|
||||
effect.SetExtra(effect.GetExtra() + 1);
|
||||
|
||||
attacker.AddMod(modifiersGlobal.Parry, parryPerDT);
|
||||
attacker.SubtractMod(modifiersGlobal.AttackDelay, delayMsPerDT);
|
||||
defender.AddMod(modifiersGlobal.Parry, parryPerDT);
|
||||
defender.SubtractMod(modifiersGlobal.Delay, delayMsPerDT);
|
||||
end
|
||||
end
|
||||
|
||||
--Heals for 50% of damage dealt on crits with a maximum of 20% of max hp
|
||||
--Also only heals for as much hp as you're missing at most
|
||||
function onCrit(effect, attacker, defender, action, actionContainer)
|
||||
local healAmount = math.Clamp(action.amount * 0.50, 0, defender.GetMaxHP() * 0.20);
|
||||
healAmount = math.Clamp(healAmount, 0, defender.GetMaxHP() - defender.GetHP());
|
||||
defender.AddHP(healAmount);
|
||||
function onCrit(effect, attacker, defender, skill, action, actionContainer)
|
||||
local healAmount = math.Clamp(action.amount * 0.50, 0, attacker.GetMaxHP() * 0.20);
|
||||
healAmount = math.Clamp(healAmount, 0, attacker.GetMaxHP() - attacker.GetHP());
|
||||
attacker.AddHP(healAmount);
|
||||
--33012: You recover [healAmount] HP.
|
||||
actionContainer.AddHPAction(owner.actorId, 33008, healAmount);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 33008, healAmount);
|
||||
end;
|
||||
|
||||
--"Effect fades over time"
|
||||
function onTick(owner, effect)
|
||||
--Rampage ticks every 6 seconds
|
||||
function onTick(owner, effect, actionContainer)
|
||||
--Enduring march prevents fading of rampage effect
|
||||
if not owner.statusEffects.HasStatusEffect(223078) and (effect.GetExtra() > 0) then
|
||||
--Going to assume that every 5 seconds a single hits worth of rampage is lost.
|
||||
owner.SubtractMod(modifiersGlobal.Parry, parryPerDT);
|
||||
owner.AddMod(modifiersGlobal.Delay, delayMsPerDT);
|
||||
effect.SetExtra(effect.GetExtra() - 1);
|
||||
end
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Parry, effect.GetExtra() * parryPerDT);
|
||||
owner.AddMod(modifiersGlobal.Delay, effect.GetExtra() * delayMsPerDT);
|
||||
end
|
|
@ -4,12 +4,12 @@ require("modifiers")
|
|||
--Guessing it scales with level. If I had to guess it's either 2.1 * level or (2 * level) + 5.
|
||||
--I'm going to guess the latter since it always leaves you with a whole number. I could be completely wrong though
|
||||
--The party_battle_leve has rampart giving 36? defense. It's from an earlier patch so probably useless
|
||||
function onGain(target, effect)
|
||||
effect.SetMagnitude(2 * target.GetLevel() + 5);
|
||||
function onGain(owner, effect, actionContainer)
|
||||
effect.SetMagnitude(2 * owner.GetLevel() + 5);
|
||||
|
||||
target.AddMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.SubtractMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
end;
|
|
@ -1,7 +1,9 @@
|
|||
function onGain(owner, effect)
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Refresh, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Refresh, effect.GetMagnitude());
|
||||
end
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
function onGain(owner, effect)
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
--Regen is modified by Enhancing Magic Potency. Formula here: http://forum.square-enix.com/ffxiv/threads/41900-White-Mage-A-Guide
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regen, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regen, effect.GetMagnitude());
|
||||
end
|
||||
|
|
|
@ -3,13 +3,15 @@ require("battleutils")
|
|||
|
||||
--Increases range of a single spell, no clue by how much, 25% is a random guess
|
||||
--It isn't clear if it has an effect on the aoe portion of skills or just the normal range, i've seen people on the OF say both.
|
||||
function onMagicStart(caster, effect, skill)
|
||||
--It also increased height of skills
|
||||
function onMagicCast(caster, effect, skill)
|
||||
skill.range = skill.range * 1.25;
|
||||
skill.rangeHeight = skill.rangeHeight * 1.25;
|
||||
end;
|
||||
|
||||
--The effect falls off after the skill is finished, meaning if you start a cast and cancel, it shouldn't fall off.
|
||||
function onCommandFinish(effect, owner, skill, actionContainer)
|
||||
if action.commandType == CommandType.Spell then
|
||||
actionContainer.AddAction(owner.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
if skill.GetCommandType() == CommandType.Spell then
|
||||
owner.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end
|
8
data/scripts/effects/sacred_prism.lua
Normal file
8
data/scripts/effects/sacred_prism.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
function onMagicCast(caster, effect, skill)
|
||||
skill.aoeType = TargetFindAOEType.Circle;
|
||||
skill.aoeRange = 15;
|
||||
skill.validTarget = 31
|
||||
end
|
|
@ -1,8 +1,8 @@
|
|||
require("modifiers")
|
||||
|
||||
--Sanguine Rite restores 30% of damage taken as MP
|
||||
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
local mpToRestore = action.amount * 0.30;
|
||||
defender.AddMP(mpToRestore);
|
||||
actionContainer.AddMPAction(defender, 33011, mpToRestore);
|
||||
actionContainer.AddMPAction(defender.actorId, 33011, mpToRestore);
|
||||
end
|
|
@ -1,22 +1,22 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Traited Sanguine Rite reduces damage taken by 25%.
|
||||
--The icon in game says it's 50%, but it's lying
|
||||
local amount = 25;
|
||||
|
||||
target.AddMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
owner.AddMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local amount = 25;
|
||||
|
||||
target.SubtractMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
owner.SubtractMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
end;
|
||||
|
||||
--Sanguine Rite restores 30% of damage taken as MP
|
||||
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
local mpToRestore = action.amount * 0.30;
|
||||
defender.AddMP(mpToRestore);
|
||||
actionContainer.AddMPAction(defender, 33011, mpToRestore);
|
||||
actionContainer.AddMPAction(defender.actorId, 33011, mpToRestore);
|
||||
end
|
|
@ -1,30 +1,30 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Untraited Sentinel is 30% damage taken down, traited is 50%
|
||||
local amount = 30;
|
||||
if effect.GetTier() == 2 then
|
||||
amount = 50;
|
||||
end
|
||||
|
||||
target.AddMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
owner.AddMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local amount = 30;
|
||||
if effect.GetTier() == 2 then
|
||||
amount = 50;
|
||||
end
|
||||
|
||||
target.SubtractMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
owner.SubtractMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
end;
|
||||
|
||||
--Increases action's enmity by 100 for weaponskills
|
||||
--http://forum.square-enix.com/ffxiv/threads/47393-Tachi-s-Guide-to-Paladin-%28post-1.22b%29
|
||||
--Sentinel only works on weaponskills. It's possible that was a bug because the description says actions
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.WeaponSkill then
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.WeaponSkill then
|
||||
action.enmity = action.enmity + 100;
|
||||
end
|
||||
end
|
|
@ -1,10 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
target.SetMod(modifiersGlobal.HitCount, 3);
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SetMod(modifiersGlobal.HitCount, 3);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.SetMod(modifiersGlobal.HitCount, 2);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SetMod(modifiersGlobal.HitCount, 2);
|
||||
end;
|
||||
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
|
||||
owner.AddMod(modifiersGlobal.Stoneskin, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
--This is wrong, need to think of a good way of keeping track of how much stoneskin is left when it falls off.
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SetMod(modifiersGlobal.Stoneskin, 0);
|
||||
end
|
||||
|
||||
--Using extra for how much mitigation stoneskin has
|
||||
function onPostAction(caster, target, effect, skill, action, actionContainer)
|
||||
if (owner.GetMod(modifiersGlobal.Stoneskin) <= 0) then
|
||||
actionContainer.AddAction(owner.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
if (defender.GetMod(modifiersGlobal.Stoneskin) <= 0) then
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
13
data/scripts/effects/swiftsong.lua
Normal file
13
data/scripts/effects/swiftsong.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local speedModifier = 1.25;
|
||||
|
||||
owner.MultiplyMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local speedModifier = 1.25;
|
||||
|
||||
owner.DivideMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
|
@ -1,7 +1,9 @@
|
|||
function onGain(owner, effect)
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.KnockbackImmune, 1);
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.KnockbackImmune, 1);
|
||||
end
|
|
@ -1,7 +1,9 @@
|
|||
function onGain(owner, effect)
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--Unclear what the exact damage is but it seems like it's the total amount of damage the attack would have done before parrying
|
||||
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
local amount = action.amount + action.mitigatedAmount;
|
||||
--Unclear what the exact damage is but it seems like it's the total amount of damage the attack would have done before parrying + 1
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
local amount = action.amount + action.amountMitigated + 1;
|
||||
|
||||
--Only reflects magical attacks if wearing AF chest
|
||||
if action.actionType == ActionType.Physical or (action.actionType == ActionType.Magic and effect.GetTier() == 2) then
|
||||
if skill.GetActionType() == ActionType.Physical or (skill.GetActionType() == ActionType.Magic and effect.GetTier() == 2) then
|
||||
--30350: Counter! You hit target for x points of damage
|
||||
--There are counter messages for blocks, can Vengeance be blocked/parried?
|
||||
attacker.DelHP(amount);
|
||||
attacker.DelHP(amount, actionContainer);
|
||||
actionContainer.AddHitAction(attacker.actorId, 30350, amount);
|
||||
end;
|
||||
end;
|
Loading…
Add table
Add a link
Reference in a new issue