mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
Updated Map Server namespace. Moved all other data folders (www and sql) to data folder. Renamed boot name to Project Meteor.
This commit is contained in:
parent
18ef69f3d1
commit
91549bff7a
1823 changed files with 102704 additions and 901 deletions
19
Data/scripts/effects/aegis_boon.lua
Normal file
19
Data/scripts/effects/aegis_boon.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
require("modifiers")
|
||||
require("utils")
|
||||
|
||||
--Forces a full block (0 damage taken)
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--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, 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);
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer);
|
||||
end;
|
10
Data/scripts/effects/aero.lua
Normal file
10
Data/scripts/effects/aero.lua
Normal file
|
@ -0,0 +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, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end;
|
13
Data/scripts/effects/antagonize.lua
Normal file
13
Data/scripts/effects/antagonize.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
require("modifiers")
|
||||
|
||||
--Antagonize's enmity bonus is x1.5 (works for both abilities and damage dealt). x1.65 when AF is worn.
|
||||
--Is does this mean it's 1.5* or 2.5*?
|
||||
function onCommandStart(effect, owner, skill, actionContainer)
|
||||
local enmityModifier = 1.5
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
enmityModifier = 1.65;
|
||||
end
|
||||
|
||||
skill.enmityModifier = skill.enmityModifier + enmityModifier;
|
||||
end
|
10
Data/scripts/effects/ballad_of_magi.lua
Normal file
10
Data/scripts/effects/ballad_of_magi.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
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, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Refresh, effect.GetMagnitude());
|
||||
end;
|
13
Data/scripts/effects/barrage.lua
Normal file
13
Data/scripts/effects/barrage.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
function onCommandStart(effect, owner, skill, actionContainer)
|
||||
--27259: Light Shot
|
||||
if skill.id == 27259 then
|
||||
skill.numHits = effect.GetMagnitude();
|
||||
end
|
||||
end;
|
||||
|
||||
function onCommandFinish(effect, owner, skill, actionContainer)
|
||||
--27259: Light Shot
|
||||
if skill.id == 27259 then
|
||||
owner.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
8
Data/scripts/effects/battle_voice.lua
Normal file
8
Data/scripts/effects/battle_voice.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
require("modifiers")
|
||||
|
||||
--BV doesn't really do anything i think
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
57
Data/scripts/effects/berserk2.lua
Normal file
57
Data/scripts/effects/berserk2.lua
Normal file
|
@ -0,0 +1,57 @@
|
|||
require("modifiers");
|
||||
|
||||
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, 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?
|
||||
|
||||
if (effect.GetExtra() < 10) then
|
||||
--This will count how many hits there have been
|
||||
effect.SetExtra(effect.GetExtra() + 1);
|
||||
|
||||
--If you update these make sure to update them in Whirlwind as well
|
||||
local apPerHit = 20;
|
||||
local defPerHit = 20;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
apPerHit = 24;
|
||||
end
|
||||
|
||||
--Just going to say every hit adds 20 AP up to 200
|
||||
--Same for defense
|
||||
--Traited will be 24 up to 240
|
||||
--assuming defense is static
|
||||
attacker.AddMod(modifiersGlobal.Attack, apPerHit);
|
||||
attacker.SubtractMod(modifiersGlobal.Defense, defPerHit);
|
||||
end
|
||||
end;
|
||||
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
local apPerHit = 20;
|
||||
local defPerHit = 20;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
apPerHit = 24;
|
||||
end
|
||||
|
||||
defender.SubtractMod(modifiersGlobal.Attack, effect.GetExtra() * apPerHit);
|
||||
defender.SubtractMod(modifiersGlobal.Defense, effect.GetExtra() * defPerHit);
|
||||
effect.SetExtra(0);
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local apPerHit = 20;
|
||||
local defPerHit = 20;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
apPerHit = 24;
|
||||
end
|
||||
|
||||
owner.SubtractMod(modifiersGlobal.Attack, effect.GetExtra() * apPerHit);
|
||||
owner.SubtractMod(modifiersGlobal.Defense, effect.GetExtra() * defPerHit);
|
||||
end
|
7
Data/scripts/effects/bind.lua
Normal file
7
Data/scripts/effects/bind.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
require("modifiers");
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
9
Data/scripts/effects/blind.lua
Normal file
9
Data/scripts/effects/blind.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;
|
15
Data/scripts/effects/blindside.lua
Normal file
15
Data/scripts/effects/blindside.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
|
||||
--Remove status and add message
|
||||
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;
|
||||
|
19
Data/scripts/effects/blissful_mind.lua
Normal file
19
Data/scripts/effects/blissful_mind.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
--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, actionContainer)
|
||||
local percentPerSecond = 0.0030;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
percentPerSecond = 0.005;
|
||||
end
|
||||
|
||||
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
|
3
Data/scripts/effects/block_proc.lua
Normal file
3
Data/scripts/effects/block_proc.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetProc(1, false);
|
||||
end;
|
20
Data/scripts/effects/blood_for_blood.lua
Normal file
20
Data/scripts/effects/blood_for_blood.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
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.GetCommandType() == CommandType.Weaponskill then
|
||||
local hpToRemove = math.floor(caster.GetHP() * 0.10);
|
||||
local modifier = 1.10;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
modifier = 1.125;
|
||||
end
|
||||
|
||||
action.amount = action.amount * modifier;
|
||||
caster.DelHP(hpToRemove, actionContainer);
|
||||
|
||||
--Remove status and add message
|
||||
caster.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, true);
|
||||
end
|
||||
end;
|
25
Data/scripts/effects/bloodbath.lua
Normal file
25
Data/scripts/effects/bloodbath.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
require("modifiers");
|
||||
require("battleutils")
|
||||
|
||||
--Absorb HP on next WS or ability
|
||||
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.
|
||||
--Miser's Mistriss seems to resist the effect, whereas nael gets absorbed more than 100%
|
||||
--Garuda resists a small amount
|
||||
--Unclear what it's based on.
|
||||
--Possibly magic resist? Slashing resist?
|
||||
|
||||
--For now using 1.0 as baseline since that seems to be the average
|
||||
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.AddHPAbsorbAction(defender.actorId, 30332, absorbAmount)
|
||||
--Bloodbath is lost after absorbing hp
|
||||
defender.statusEffects.RemoveStatusEffect(effect,actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
21
Data/scripts/effects/bloodletter.lua
Normal file
21
Data/scripts/effects/bloodletter.lua
Normal file
|
@ -0,0 +1,21 @@
|
|||
require("modifiers")
|
||||
|
||||
--This is the comboed version of bloodletter.
|
||||
--All videos I can find have it dealing 15 damage.
|
||||
--Damage type is projectile.
|
||||
--DoT damage is combined and all hits on a single tick. ie a blodletter doing 15 damage and aero doing 11 will combine and tick for 26.
|
||||
|
||||
--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
|
||||
--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, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RegenDown, 15);
|
||||
owner.DelHP(570, actionContainer);
|
||||
end
|
10
Data/scripts/effects/bloodletter2.lua
Normal file
10
Data/scripts/effects/bloodletter2.lua
Normal file
|
@ -0,0 +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, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, 15);
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RegenDown, 15);
|
||||
end
|
12
Data/scripts/effects/cleric_stance.lua
Normal file
12
Data/scripts/effects/cleric_stance.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Multiples Attack Magic Potency by 1.2 and Healing Magic Potency by 0.8
|
||||
owner.MultiplyMod(modifiersGlobal.AttackMagicPotency, 1.2);
|
||||
owner.MultiplyMod(modifiersGlobal.HealingMagicPotency, 0.8);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.DivideMod(modifiersGlobal.AttackMagicPotency, 1.2);
|
||||
owner.DivideMod(modifiersGlobal.HealingMagicPotency, 0.8);
|
||||
end;
|
10
Data/scripts/effects/collusion.lua
Normal file
10
Data/scripts/effects/collusion.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
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?
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end;
|
6
Data/scripts/effects/combo.lua
Normal file
6
Data/scripts/effects/combo.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetCombos();
|
||||
end;
|
8
Data/scripts/effects/cover.lua
Normal file
8
Data/scripts/effects/cover.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
require("modifiers")
|
||||
|
||||
--Enahnced Cover: Restores 25% of damage taken as MP. Does not send a message
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
if effect.GetTier() == 2 then
|
||||
defender.AddMP(0.25 * action.amount);
|
||||
end
|
||||
end;
|
15
Data/scripts/effects/covered.lua
Normal file
15
Data/scripts/effects/covered.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
require("battleUtils")
|
||||
|
||||
--If person who cast cover is within 8y, change the action's target to them
|
||||
--Not sure what attacks are valid. It only says "melee attacks", unsure if that includes weaponskills and abilities or just auto attacks
|
||||
--Right now this will probably be really buggy, since Covered is not necessarily the first effect that will activate on the target
|
||||
|
||||
--Really need to do more research on this, figure out how it interacts with multi-hit attacks, aoe attacks (if those count as melee ever?), etc.
|
||||
--If it redirects the whole attack instead of a single hit, we might need a new that activates while iterating over targets.
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
if not skill.isRanged then
|
||||
if effect.GetSource().IsAlive() and getDistanceBetweenActors(effect.GetSource(), target) <= 8 then
|
||||
target = effect.GetSource();
|
||||
end
|
||||
end
|
||||
end;
|
13
Data/scripts/effects/dark_seal2.lua
Normal file
13
Data/scripts/effects/dark_seal2.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--Increases accuracy of next cast.
|
||||
--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.GetActionType() == ActionType.Magic then
|
||||
--50 is random guess.
|
||||
skill.accuracyModifier = skill.accuracyModifier + 50;
|
||||
owner.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end
|
17
Data/scripts/effects/decoy.lua
Normal file
17
Data/scripts/effects/decoy.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--This is the untraited version of decoy.
|
||||
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 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.hitRate = 0.0;
|
||||
action.resistRate = 750;
|
||||
--Remove status and add message
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
|
||||
end;
|
16
Data/scripts/effects/decoy2.lua
Normal file
16
Data/scripts/effects/decoy2.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--This is the traited version of Decoy. It can also evade physical attacks.
|
||||
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 skill.GetActionType() == ActionType.Magic or skill.GetActionType() == ActionType.Physical) then
|
||||
--Set action's hit rate to 0
|
||||
action.hitRate = 0.0;
|
||||
action.resistRate = 400;
|
||||
--Remove status and add message
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
|
||||
end;
|
5
Data/scripts/effects/default.lua
Normal file
5
Data/scripts/effects/default.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
9
Data/scripts/effects/defense_down.lua
Normal file
9
Data/scripts/effects/defense_down.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
end
|
9
Data/scripts/effects/divine_regen.lua
Normal file
9
Data/scripts/effects/divine_regen.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regen, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regen, effect.GetMagnitude());
|
||||
end
|
30
Data/scripts/effects/divine_veil.lua
Normal file
30
Data/scripts/effects/divine_veil.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
require("modifiers")
|
||||
|
||||
--Increases block rate by 100%
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RawBlockRate, 100);
|
||||
end
|
||||
|
||||
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(effect, caster, target, skill, action, actionContainer)
|
||||
-- cure cura
|
||||
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
|
||||
|
||||
--Need a better way to set magnitude when adding effects
|
||||
if effect.GetTier() == 2 then
|
||||
magnitude = 113;
|
||||
end
|
||||
|
||||
--For each party member in range, add divine regen
|
||||
for chara in target.GetPartyMembersInRange(8) do
|
||||
chara.statusEffects.AddStatusEffect(223264, effect.GetTier(), magnitude, regenDuration, actionContainer);
|
||||
end
|
||||
end
|
||||
end;
|
29
Data/scripts/effects/dread_spike.lua
Normal file
29
Data/scripts/effects/dread_spike.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--Dread spike completely nullifies a physical action and absorbs how much damage it would have done (when it's powered up)
|
||||
--I'm going to assume it only absorbs half damage without LS/PS up
|
||||
--When I say it nullifies an attack, it even gets rid of the message. It's as if the damage action didn't happen.
|
||||
--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, skill, action, actionContainer)
|
||||
if skill.GetActionType() == ActionType.Physical then
|
||||
--maybe this works?
|
||||
local absorbPercent = 0.5;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
absorbPercent = 1;
|
||||
end
|
||||
|
||||
local absorbAmount = action.amount * absorbPercent;
|
||||
action.amount = 0;
|
||||
action.worldMasterTextId = 0;
|
||||
|
||||
defender.AddHP(absorbAmount);
|
||||
--30451: You recover [absorbAmount] HP.
|
||||
actionContainer.AddHPAction(defender.actorId, 30451, absorbAmount)
|
||||
--Dread Spike is lost after absorbing hp
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
20
Data/scripts/effects/enduring_march.lua
Normal file
20
Data/scripts/effects/enduring_march.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
require("modifiers")
|
||||
|
||||
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
|
||||
|
||||
owner.MultiplyMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local speedModifier = 0.8;
|
||||
if effect.GetTier() == 2 then
|
||||
speedModifier = 1.2;
|
||||
end
|
||||
|
||||
owner.DivideMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
3
Data/scripts/effects/evade_proc.lua
Normal file
3
Data/scripts/effects/evade_proc.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetProc(0, false);
|
||||
end;
|
30
Data/scripts/effects/excruciate.lua
Normal file
30
Data/scripts/effects/excruciate.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--Gradually increases critical rate of spells
|
||||
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
|
||||
--Random guess, going to assume it's 25 crit rating every 3s, 50 crit rating traited
|
||||
--That's 4% and 8% every 3 seconds of actual crit
|
||||
local ratePerTick = 25;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
ratePerTick = 50;
|
||||
end
|
||||
|
||||
effect.SetMagnitude(effect.GetMagnitude() + ratePerTick);
|
||||
end
|
||||
|
||||
--Excruciate seems to have an effect on all hits of aoe spells, so it's changing the crit bonus of the skill itself
|
||||
--rather than on a hit by hit basis
|
||||
function onCommandStart(effect, owner, skill, actionContainer)
|
||||
skill.bonusCritRate = skill.bonusCritRate + effect.GetMagnitude();
|
||||
end
|
||||
|
||||
function onCrit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.Spell then
|
||||
attacker.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;
|
26
Data/scripts/effects/featherfoot.lua
Normal file
26
Data/scripts/effects/featherfoot.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("modifiers");
|
||||
|
||||
--15% in ARR, dont know how it worked in 1.0
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
end;
|
||||
|
||||
--Returns 25%? of amount dodged as MP
|
||||
function onEvade(effect, attacker, defender, skill, action, actionContainer)
|
||||
--25% of amount dodged untraited, 50% traited
|
||||
local percent = 0.25;
|
||||
if (effect.GetTier() == 2) then
|
||||
percent = 0.50;
|
||||
end
|
||||
|
||||
local mpToReturn = percent * action.amountMitigated;
|
||||
defender.AddMP(math.ceil(mpToReturn));
|
||||
--33010: You recover x MP from Featherfoot
|
||||
actionContainer.AddMPAction(defender.actorId, 33010, mpToReturn);
|
||||
--Featherfoot is lost after evading
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end;
|
6
Data/scripts/effects/fists_of_earth.lua
Normal file
6
Data/scripts/effects/fists_of_earth.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
--Need to do more research on these.
|
||||
--From what I've seen, they changed the property of the attack to magic and the element to the respective element
|
||||
--Unsure if it applies to weaponskills or if it's auto attacks only.
|
2
Data/scripts/effects/fists_of_fire.lua
Normal file
2
Data/scripts/effects/fists_of_fire.lua
Normal file
|
@ -0,0 +1,2 @@
|
|||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
2
Data/scripts/effects/fists_of_wind.lua
Normal file
2
Data/scripts/effects/fists_of_wind.lua
Normal file
|
@ -0,0 +1,2 @@
|
|||
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
|
15
Data/scripts/effects/foresight.lua
Normal file
15
Data/scripts/effects/foresight.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Parry is .1% per , Random guess but gonna say it gives 20% worth of parry.
|
||||
owner.AddMod(modifiersGlobal.Parry, 200);
|
||||
end;
|
||||
|
||||
function onParry(effect, attacker, defender, skill, action, actionContainer)
|
||||
--Foresight is lost after parrying
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Parry, 200);
|
||||
end;
|
7
Data/scripts/effects/fully_blissful_mind.lua
Normal file
7
Data/scripts/effects/fully_blissful_mind.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
function onGain(owner, effect, actionContainer)
|
||||
--Using extra because that's what blissful_mind uses
|
||||
effect.SetExtra(effect.GetMagnitude());
|
||||
end
|
||||
|
||||
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;
|
9
Data/scripts/effects/goring_blade.lua
Normal file
9
Data/scripts/effects/goring_blade.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
|
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;
|
10
Data/scripts/effects/haste.lua
Normal file
10
Data/scripts/effects/haste.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
--Set magnitude to milliseconds that HF will reduce delay by
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.MultiplyMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.DivideMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
end;
|
24
Data/scripts/effects/hawks_eye.lua
Normal file
24
Data/scripts/effects/hawks_eye.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("modifiers");
|
||||
|
||||
--In one capture, hawks eye seemed to give 18.75% additional accuracy (379 to 450)
|
||||
--The player in this capture was a Dragoon, so this is untraited.
|
||||
--Traited Hawk's Eye says it increases Accuracy by 50%.
|
||||
--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(owner, effect, actionContainer)
|
||||
local accuracyMod = 0.1875;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
accuracyMod = 0.28125;
|
||||
end
|
||||
|
||||
local amountGained = accuracyMod * owner.GetMod(modifiersGlobal.Accuracy);
|
||||
effect.SetMagnitude(amountGained);
|
||||
owner.AddMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
|
||||
owner.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
13
Data/scripts/effects/heavy.lua
Normal file
13
Data/scripts/effects/heavy.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local speedModifier = 0.8;
|
||||
|
||||
owner.MultiplyMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local speedModifier = 0.8;
|
||||
|
||||
owner.DivideMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
15
Data/scripts/effects/hp_boost.lua
Normal file
15
Data/scripts/effects/hp_boost.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
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(owner, effect, actionContainer)
|
||||
local newMaxHP = owner.GetMaxHP() * 1.25;
|
||||
local healAmount = newMaxHP - owner.GetMaxHP();
|
||||
|
||||
owner.SetMaxHP(newMaxHP);
|
||||
owner.AddHP(healAmount);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SetMaxHP(owner.GetMaxHP() / 1.25);
|
||||
end;
|
11
Data/scripts/effects/hp_penalty.lua
Normal file
11
Data/scripts/effects/hp_penalty.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local newMaxHP = owner.GetMaxHP() * 0.75;
|
||||
|
||||
owner.SetMaxHP(newMaxHP);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SetMaxHP(owner.GetMaxHP() / 0.75);
|
||||
end;
|
10
Data/scripts/effects/hundred_fists.lua
Normal file
10
Data/scripts/effects/hundred_fists.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
--Set magnitude to milliseconds that HF will reduce delay by
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Delay, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Delay, effect.GetMagnitude());
|
||||
end;
|
10
Data/scripts/effects/invigorate.lua
Normal file
10
Data/scripts/effects/invigorate.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
--100 TP per tick without AF. 133 TP per tick with AF
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
16
Data/scripts/effects/keen_flurry.lua
Normal file
16
Data/scripts/effects/keen_flurry.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
require("battleutils")
|
||||
|
||||
--Untraited reduces cooldown by 50%
|
||||
--Traited reduces cooldown by 100%
|
||||
function onCommandStart(effect, owner, skill, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.Weaponskill then
|
||||
local reduction = 0.5;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
reduction = 1.0;
|
||||
end
|
||||
|
||||
skill.recastTimeMs = skill.recastTimeMs - (reduction * skill.recastTimeMs);
|
||||
owner.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
19
Data/scripts/effects/life_surge_I.lua
Normal file
19
Data/scripts/effects/life_surge_I.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
require("battleutils")
|
||||
|
||||
--Heals for 30%? of damage dealt on auto attacks.
|
||||
--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, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.AutoAttack then
|
||||
local healPercent = 0.10;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
healPercent = 0.30;
|
||||
end
|
||||
|
||||
local amount = math.floor((healPercent * action.amount) + 1);
|
||||
attacker.AddHP(amount);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
|
||||
end
|
||||
end;
|
15
Data/scripts/effects/life_surge_II.lua
Normal file
15
Data/scripts/effects/life_surge_II.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
require("battleutils")
|
||||
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.AutoAttack then
|
||||
local healPercent = 0.20;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
healPercent = 0.40;
|
||||
end
|
||||
|
||||
local amount = math.floor((healPercent * action.amount) + 1);
|
||||
attacker.AddHP(amount);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
|
||||
end
|
||||
end;
|
19
Data/scripts/effects/life_surge_III.lua
Normal file
19
Data/scripts/effects/life_surge_III.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
require("battleutils")
|
||||
|
||||
--Heals for 30%? of damage dealt on auto attacks.
|
||||
--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, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.AutoAttack then
|
||||
local healPercent = 0.30;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
healPercent = 0.50;
|
||||
end
|
||||
|
||||
local amount = math.floor((healPercent * action.amount) + 1);
|
||||
attacker.AddHP(amount);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
|
||||
end
|
||||
end;
|
9
Data/scripts/effects/magic_evasion_down.lua
Normal file
9
Data/scripts/effects/magic_evasion_down.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.MagicEvasion, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.MagicEvasion, effect.GetMagnitude());
|
||||
end
|
9
Data/scripts/effects/mighty_strikes.lua
Normal file
9
Data/scripts/effects/mighty_strikes.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
--Forces crit on attacks made with axes
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--Assuming "attacks made with axes" means skills specific to MRD/WAR
|
||||
if (skill.job == 3 or skill.job == 17) then
|
||||
--Set action's crit rate to 100%
|
||||
action.critRate = 100.0;
|
||||
end
|
||||
end;
|
||||
|
12
Data/scripts/effects/minuet_of_rigor.lua
Normal file
12
Data/scripts/effects/minuet_of_rigor.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
require("modifiers")
|
||||
|
||||
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, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
owner.SubtractMod(modifiersGlobal.MagicAccuracy, effect.GetMagnitude());
|
||||
end;
|
3
Data/scripts/effects/miss_proc.lua
Normal file
3
Data/scripts/effects/miss_proc.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetProc(3, false);
|
||||
end;
|
12
Data/scripts/effects/necrogenesis.lua
Normal file
12
Data/scripts/effects/necrogenesis.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
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.AddHP(hpToReturn);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 33012, hpToReturn);
|
||||
attacker.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end
|
24
Data/scripts/effects/outmaneuver2.lua
Normal file
24
Data/scripts/effects/outmaneuver2.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("modifiers")
|
||||
|
||||
--Add 30 raw block rate. No idea how much block it actually gives.
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RawBlockRate, 30);
|
||||
end
|
||||
|
||||
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, skill, action, actionContainer)
|
||||
--200 TP on block
|
||||
defender.AddTP(200);
|
||||
|
||||
--If traited, add 10% of damage taken as MP
|
||||
if(effect.GetTier() == 2) then
|
||||
local mpToReturn = math.ceil(0.10 * action.amount);
|
||||
defender.AddMP(math.ceil(mpToReturn));
|
||||
--33009: You recover x MP from Outmaneuver
|
||||
actionContainer.AddMPAction(defender.actorId, 33009, mpToReturn);
|
||||
end
|
||||
end;
|
10
Data/scripts/effects/paeon_of_war.lua
Normal file
10
Data/scripts/effects/paeon_of_war.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
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, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end;
|
3
Data/scripts/effects/parry_proc.lua
Normal file
3
Data/scripts/effects/parry_proc.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetProc(2, false);
|
||||
end;
|
24
Data/scripts/effects/parsimony.lua
Normal file
24
Data/scripts/effects/parsimony.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--Forces crit of a single WS action from rear.
|
||||
function onMagicCast(effect, caster, skill)
|
||||
skill.mpCost = skill.mpCost / 2;
|
||||
end;
|
||||
|
||||
--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
|
9
Data/scripts/effects/poison.lua
Normal file
9
Data/scripts/effects/poison.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
|
43
Data/scripts/effects/power_surge_I.lua
Normal file
43
Data/scripts/effects/power_surge_I.lua
Normal file
|
@ -0,0 +1,43 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--https://www.bluegartr.com/threads/107403-Stats-and-how-they-work/page22
|
||||
|
||||
--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)
|
||||
--if command is a weaponskill or jump
|
||||
--27266: jump
|
||||
if command.GetCommandType() == CommandType.Weaponskill or command.id == 27266 then
|
||||
effect.SetTier(effect.GetTier() + 1);
|
||||
|
||||
--Takes 10 weaponskills/jumps to increase level
|
||||
if effect.GetTier() > 1 then
|
||||
local action = owner.statusEffects.ReplaceEffect(effect, 223213, 1, 1, 60);
|
||||
actionContainer.AddAction(action);
|
||||
else
|
||||
effect.RefreshTime();
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Attack, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetExtra());
|
||||
end
|
40
Data/scripts/effects/power_surge_II.lua
Normal file
40
Data/scripts/effects/power_surge_II.lua
Normal file
|
@ -0,0 +1,40 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--https://www.bluegartr.com/threads/107403-Stats-and-how-they-work/page22
|
||||
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)
|
||||
--if command is a weaponskill or jump
|
||||
--27266: jump
|
||||
if command.GetCommandType() == CommandType.Weaponskill or command.id == 27266 then
|
||||
effect.SetTier(effect.GetTier() + 1);
|
||||
|
||||
--Takes 10 weaponskills/jumps to increase level
|
||||
if effect.GetTier() > 10 then
|
||||
local action = owner.statusEffects.ReplaceEffect(effect, 223214, 1, 1, 60);
|
||||
actionContainer.AddAction(action);
|
||||
else
|
||||
effect.RefreshTime();
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Attack, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetExtra());
|
||||
end
|
33
Data/scripts/effects/power_surge_III.lua
Normal file
33
Data/scripts/effects/power_surge_III.lua
Normal file
|
@ -0,0 +1,33 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--https://www.bluegartr.com/threads/107403-Stats-and-how-they-work/page22
|
||||
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)
|
||||
--if command is a weaponskill or jump
|
||||
--27266: jump
|
||||
if command.GetCommandType() == CommandType.Weaponskill or command.id == 27266 then
|
||||
--At III just refresh the effect
|
||||
effect.RefreshTime();
|
||||
end
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Attack, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetExtra());
|
||||
end
|
18
Data/scripts/effects/protect.lua
Normal file
18
Data/scripts/effects/protect.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
require("modifiers")
|
||||
|
||||
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();
|
||||
|
||||
owner.AddMod(modifiersGlobal.Defense, defenseBuff);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local defenseBuff = 4.56 * effect.GetMagnitude();
|
||||
|
||||
owner.SubtractMod(modifiersGlobal.Defense, defenseBuff);
|
||||
end;
|
||||
|
36
Data/scripts/effects/protect2.lua
Normal file
36
Data/scripts/effects/protect2.lua
Normal file
|
@ -0,0 +1,36 @@
|
|||
require("modifiers")
|
||||
|
||||
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();
|
||||
local magicDefenseBuff = 0;
|
||||
|
||||
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.FireResistance, modifiersGlobal.WaterResistance do
|
||||
owner.AddMod(i, magicDefenseBuff);
|
||||
end
|
||||
|
||||
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local defenseBuff = 4.56 * effect.GetMagnitude();
|
||||
local magicDefenseBuff = 0;
|
||||
|
||||
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.FireResistance, modifiersGlobal.WaterResistance do
|
||||
owner.SubtractMod(i, magicDefenseBuff);
|
||||
end
|
||||
end;
|
||||
|
14
Data/scripts/effects/quelling_strike.lua
Normal file
14
Data/scripts/effects/quelling_strike.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--Untraited reduces cooldown by 50%
|
||||
--Traited reduces cooldown by 100%
|
||||
function onCommandStart(effect, owner, skill, actionContainer)
|
||||
--Does this apply to auto attacks?
|
||||
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;
|
13
Data/scripts/effects/quick.lua
Normal file
13
Data/scripts/effects/quick.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;
|
17
Data/scripts/effects/raging_strike2.lua
Normal file
17
Data/scripts/effects/raging_strike2.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.id == 27259 then
|
||||
--Effect stacks up to 3 times
|
||||
if effect.GetTier() < 3 then
|
||||
effect.SetTier(effect.GetTier() + 1);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function onMiss(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.id == 27259 then
|
||||
|
||||
end
|
||||
end
|
47
Data/scripts/effects/rampage2.lua
Normal file
47
Data/scripts/effects/rampage2.lua
Normal file
|
@ -0,0 +1,47 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
require("utils")
|
||||
|
||||
parryPerDT = 20;
|
||||
delayMsPerDT = 100;
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end
|
||||
|
||||
--Increases parry rating and attack speed for each hit. (Need more info)
|
||||
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);
|
||||
|
||||
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, 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.AddHPAbsorbAction(defender.actorId, 33008, healAmount);
|
||||
end;
|
||||
|
||||
--"Effect fades over time"
|
||||
--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
|
||||
owner.SubtractMod(modifiersGlobal.Parry, parryPerDT);
|
||||
owner.AddMod(modifiersGlobal.Delay, delayMsPerDT);
|
||||
effect.SetExtra(effect.GetExtra() - 1);
|
||||
end
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Parry, effect.GetExtra() * parryPerDT);
|
||||
owner.AddMod(modifiersGlobal.Delay, effect.GetExtra() * delayMsPerDT);
|
||||
end
|
15
Data/scripts/effects/rampart.lua
Normal file
15
Data/scripts/effects/rampart.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
require("modifiers")
|
||||
|
||||
--Rampart gives 105 defense at level 50.
|
||||
--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(owner, effect, actionContainer)
|
||||
effect.SetMagnitude(2 * owner.GetLevel() + 5);
|
||||
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
end;
|
9
Data/scripts/effects/refresh.lua
Normal file
9
Data/scripts/effects/refresh.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Refresh, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Refresh, effect.GetMagnitude());
|
||||
end
|
9
Data/scripts/effects/regain.lua
Normal file
9
Data/scripts/effects/regain.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
8
Data/scripts/effects/regen.lua
Normal file
8
Data/scripts/effects/regen.lua
Normal file
|
@ -0,0 +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, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regen, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regen, effect.GetMagnitude());
|
||||
end
|
17
Data/scripts/effects/resonance2.lua
Normal file
17
Data/scripts/effects/resonance2.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
require("modifiers")
|
||||
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.
|
||||
--It also increased height of skills
|
||||
function onMagicCast(effect, caster, 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 skill.GetCommandType() == CommandType.Spell then
|
||||
owner.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end
|
19
Data/scripts/effects/sacred_prism.lua
Normal file
19
Data/scripts/effects/sacred_prism.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--Cure, Cura, Regen, Esuna, Enhancing spells (Hardcoded as Stoneskin and Sanguine since we dont have a good way to check what's an enhancing spell)
|
||||
supportedSpells = [27346, 27347, 27358, 27357, 27350, 27307]
|
||||
|
||||
function onMagicCast(effect, caster, skill)
|
||||
if supportedSpells[skill.id] then
|
||||
skill.castTimeMs = skill.castTimeMs * 1.5;
|
||||
skill.aoeType = TargetFindAOEType.Circle;
|
||||
skill.aoeRange = 15;
|
||||
end
|
||||
end
|
||||
|
||||
function onCommandFinish(effect, owner, skill, actionContainer)
|
||||
if supportedSpells[skill.id] then
|
||||
owner.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
8
Data/scripts/effects/sanguine_rite2.lua
Normal file
8
Data/scripts/effects/sanguine_rite2.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
require("modifiers")
|
||||
|
||||
--Sanguine Rite restores 30% of damage taken as MP
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
local mpToRestore = action.amount * 0.30;
|
||||
defender.AddMP(mpToRestore);
|
||||
actionContainer.AddMPAction(defender.actorId, 33011, mpToRestore);
|
||||
end
|
22
Data/scripts/effects/sanguine_rite3.lua
Normal file
22
Data/scripts/effects/sanguine_rite3.lua
Normal file
|
@ -0,0 +1,22 @@
|
|||
require("modifiers")
|
||||
|
||||
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;
|
||||
|
||||
owner.AddMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local amount = 25;
|
||||
|
||||
owner.SubtractMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
end;
|
||||
|
||||
--Sanguine Rite restores 30% of damage taken as MP
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
local mpToRestore = action.amount * 0.30;
|
||||
defender.AddMP(mpToRestore);
|
||||
actionContainer.AddMPAction(defender.actorId, 33011, mpToRestore);
|
||||
end
|
30
Data/scripts/effects/sentinel.lua
Normal file
30
Data/scripts/effects/sentinel.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
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
|
||||
|
||||
owner.AddMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local amount = 30;
|
||||
if effect.GetTier() == 2 then
|
||||
amount = 50;
|
||||
end
|
||||
|
||||
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, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.WeaponSkill then
|
||||
action.enmity = action.enmity + 100;
|
||||
end
|
||||
end
|
12
Data/scripts/effects/sleep.lua
Normal file
12
Data/scripts/effects/sleep.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
require("modifiers")
|
||||
|
||||
--Set magnitude to milliseconds that HF will reduce delay by
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer)
|
||||
end;
|
10
Data/scripts/effects/slow.lua
Normal file
10
Data/scripts/effects/slow.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
--Set magnitude to milliseconds that HF will reduce delay by
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.MultiplyMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.DivideMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
end;
|
9
Data/scripts/effects/slowcast.lua
Normal file
9
Data/scripts/effects/slowcast.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("modifiers")
|
||||
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.
|
||||
--It also increased height of skills
|
||||
function onMagicCast(effect, caster, skill)
|
||||
skill.castTimeMs = skill.castTimeMs * 1.5;
|
||||
end;
|
10
Data/scripts/effects/spinning_heel.lua
Normal file
10
Data/scripts/effects/spinning_heel.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SetMod(modifiersGlobal.HitCount, 3);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SetMod(modifiersGlobal.HitCount, 2);
|
||||
end;
|
||||
|
18
Data/scripts/effects/stoneskin.lua
Normal file
18
Data/scripts/effects/stoneskin.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
require("modifiers")
|
||||
|
||||
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 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;
|
9
Data/scripts/effects/tempered_will.lua
Normal file
9
Data/scripts/effects/tempered_will.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.KnockbackImmune, 1);
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.KnockbackImmune, 1);
|
||||
end
|
9
Data/scripts/effects/tp_bleed.lua
Normal file
9
Data/scripts/effects/tp_bleed.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
15
Data/scripts/effects/vengeance.lua
Normal file
15
Data/scripts/effects/vengeance.lua
Normal file
|
@ -0,0 +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 + 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 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, actionContainer);
|
||||
actionContainer.AddHitAction(attacker.actorId, 30350, amount);
|
||||
end;
|
||||
end;
|
Loading…
Add table
Add a link
Reference in a new issue