Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Speed] Adjustments to calculations and modifiers #6207

Merged
merged 6 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/actions/abilities/chocobo_jig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abilityObject.onUseAbility = function(player, target, ability)
player:delStatusEffect(xi.effect.WEIGHT)
end

player:addStatusEffect(xi.effect.QUICKENING, 20, 0, finalDuration)
player:addStatusEffect(xi.effect.QUICKENING, 10, 0, finalDuration)
end

return abilityObject
2 changes: 1 addition & 1 deletion scripts/actions/abilities/chocobo_jig_ii.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abilityObject.onUseAbility = function(player, target, ability)
target:delStatusEffect(xi.effect.WEIGHT)
end

target:addStatusEffect(xi.effect.QUICKENING, 20, 0, finalDuration)
target:addStatusEffect(xi.effect.QUICKENING, 10, 0, finalDuration)
end

return abilityObject
3 changes: 1 addition & 2 deletions scripts/effects/bolters_roll.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
local effectObject = {}

effectObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.MOVE_SPEED_STACKABLE, effect:getPower())
effect:addMod(xi.mod.MOVE_SPEED_STACKABLE, effect:getPower())
end

effectObject.onEffectTick = function(target, effect)
end

effectObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.MOVE_SPEED_STACKABLE, effect:getPower())
end

return effectObject
3 changes: 1 addition & 2 deletions scripts/effects/flee.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
local effectObject = {}

effectObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.MOVE_SPEED_STACKABLE, effect:getPower())
effect:addMod(xi.mod.MOVE_SPEED_FLEE, effect:getPower())
end

effectObject.onEffectTick = function(target, effect)
end

effectObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.MOVE_SPEED_STACKABLE, effect:getPower())
end

return effectObject
3 changes: 1 addition & 2 deletions scripts/effects/gestation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@ local effectObject = {}
local boostAmount = 50 -- +50% movement speed

effectObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.MOVE_SPEED_STACKABLE, boostAmount)
effect:addMod(xi.mod.MOVE_SPEED_STACKABLE, boostAmount)
end

effectObject.onEffectTick = function(target, effect)
end

effectObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.MOVE_SPEED_STACKABLE, boostAmount)
end

return effectObject
6 changes: 2 additions & 4 deletions scripts/effects/mazurka.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
local effectObject = {}

effectObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.MOVE_SPEED_MAZURKA, effect:getPower())
target:addMod(xi.mod.AGI, effect:getSubPower()) -- Apply Stat Buff from AUGMENT_SONG_STAT
effect:addMod(xi.mod.MOVE_SPEED_MAZURKA, effect:getPower())
effect:addMod(xi.mod.AGI, effect:getSubPower()) -- Apply Stat Buff from AUGMENT_SONG_STAT
end

effectObject.onEffectTick = function(target, effect)
end

effectObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.MOVE_SPEED_MAZURKA, effect:getPower())
target:delMod(xi.mod.AGI, effect:getSubPower()) -- Remove Stat Buff from AUGMENT_SONG_STAT
end

return effectObject
18 changes: 11 additions & 7 deletions scripts/enum/mod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,17 @@ xi.mod =
MAGIC_CRIT_DMG_INCREASE = 563,
HASTE_MAGIC = 167,
SPELLINTERRUPT = 168,
MOVE_SPEED_OVERIDE = 169, -- Modifier used to overide regular speed caps. (GM speed and Feast of Swords)
MOVE_SPEED_STACKABLE = 75, -- Gear movement speed penalties, flee bonus, etc.
MOVE_SPEED_GEAR_BONUS = 76, -- Gear movement speed bonuses. DOES NOT STACK with each other, only highest applies.
MOVE_SPEED_WEIGHT_PENALTY = 77, -- For Gravity and curse.
MOVE_SPEED_QUICKENING = 78, -- Jig, spreinter shoes, etc. Only highest of Mazurka OR quickening will take effect.
MOVE_SPEED_MAZURKA = 79, -- Song movement speed. Only highest of Mazurka OR quickening will take effect.
MOUNT_MOVE = 972, -- % Mount Movement Speed

-- Movement speed modifiers
MOVE_SPEED_OVERIDE = 169, -- Modifier used to overide regular speed caps. (GM speed and Feast of Swords)
Xaver-DaRed marked this conversation as resolved.
Show resolved Hide resolved
MOVE_SPEED_STACKABLE = 75, -- Gear movement speed penalties, etc.
MOVE_SPEED_GEAR_BONUS = 76, -- Gear movement speed bonuses. DOES NOT STACK with each other, only highest applies.
MOVE_SPEED_WEIGHT_PENALTY = 77, -- For Gravity and curse.
MOVE_SPEED_QUICKENING = 78, -- Jig, spreinter shoes, etc. Only highest of Mazurka OR quickening will take effect.
MOVE_SPEED_MAZURKA = 79, -- Song movement speed. Only highest of Mazurka OR quickening will take effect.
MOVE_SPEED_FLEE = 1085, -- Flee applies a separate multiplier to speed.
MOUNT_MOVE = 972, -- % Mount Movement Speed

FASTCAST = 170,
UFASTCAST = 407,
CURE_CAST_TIME = 519,
Expand Down
4 changes: 2 additions & 2 deletions scripts/globals/spells/enhancing_song.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ local pTable =
-- Misc.
[xi.magic.spell.GODDESSS_HYMNUS ] = { 1, xi.effect.HYMNUS, xi.mod.AUGMENT_SONG_STAT, 0, 0, 0, 1, 0, 1, 0, 0, false },
[xi.magic.spell.SENTINELS_SCHERZO ] = { 1, xi.effect.SCHERZO, xi.mod.AUGMENT_SONG_STAT, 0, 0, 0, 1, 350, 45, 1, 10, false },
[xi.magic.spell.RAPTOR_MAZURKA ] = { 1, xi.effect.MAZURKA, xi.mod.AUGMENT_SONG_STAT, 0, 0, 0, 12, 0, 12, 0, 0, false },
[xi.magic.spell.CHOCOBO_MAZURKA ] = { 1, xi.effect.MAZURKA, xi.mod.AUGMENT_SONG_STAT, 0, 0, 0, 24, 0, 24, 0, 0, false },
[xi.magic.spell.RAPTOR_MAZURKA ] = { 1, xi.effect.MAZURKA, xi.mod.AUGMENT_SONG_STAT, 0, 0, 0, 5, 0, 12, 0, 0, false },
[xi.magic.spell.CHOCOBO_MAZURKA ] = { 1, xi.effect.MAZURKA, xi.mod.AUGMENT_SONG_STAT, 0, 0, 0, 10, 0, 24, 0, 0, false },

-- Emnity Songs
[xi.magic.spell.FOE_SIRVENTE ] = { 1, xi.effect.SIRVENTE, xi.mod.AUGMENT_SONG_STAT, 0, 0, 0, 35, 0, 35, 1, 0, true },
Expand Down
6 changes: 3 additions & 3 deletions scripts/items/choco-katana.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Food Effect: 3 Min, All Races
-----------------------------------
-- Agility 1
-- Speed 12.5%
-- Base speed 10% or +5
-----------------------------------
---@type TItemFood
local itemObject = {}
Expand All @@ -19,12 +19,12 @@ end

itemObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.AGI, 1)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

itemObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.AGI, 1)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

return itemObject
6 changes: 3 additions & 3 deletions scripts/items/choco-ligar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Food Effect: 3 Min, All Races
-----------------------------------
-- Vitality 1
-- Speed 12.5%
-- Base speed 10% or +5
-----------------------------------
---@type TItemFood
local itemObject = {}
Expand All @@ -19,12 +19,12 @@ end

itemObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.VIT, 1)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

itemObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.VIT, 1)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

return itemObject
6 changes: 3 additions & 3 deletions scripts/items/choco-scroll.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Food Effect: 3 Min, All Races
-----------------------------------
-- Mind 1
-- Speed 12.5%
-- Base speed 10% or +5
-----------------------------------
---@type TItemFood
local itemObject = {}
Expand All @@ -19,12 +19,12 @@ end

itemObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.MND, 1)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

itemObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.MND, 1)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

return itemObject
6 changes: 3 additions & 3 deletions scripts/items/chocolate_rarab_tail.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Food Effect: 3 Min, All Races
-----------------------------------
-- Dexterity 1
-- Speed 12.5%
-- Base speed 10% or +5
-----------------------------------
---@type TItemFood
local itemObject = {}
Expand All @@ -19,12 +19,12 @@ end

itemObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.DEX, 1)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

itemObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.DEX, 1)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

return itemObject
6 changes: 3 additions & 3 deletions scripts/items/fudgy-wudge.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Food Effect: 3 Min, All Races
-----------------------------------
-- Intelligence 1
-- Speed 12.5%
-- Base speed 10% or +5
-----------------------------------
---@type TItemFood
local itemObject = {}
Expand All @@ -19,12 +19,12 @@ end

itemObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.INT, 1)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

itemObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.INT, 1)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

return itemObject
3 changes: 2 additions & 1 deletion scripts/items/sprinters_shoes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-- ID: 15754
-- Item: Sprinter's Shoes
-- Item Effect: Quickening for 60 minutes
-- Base speed 10% or +5
-----------------------------------
---@type TItem
local itemObject = {}
Expand All @@ -11,7 +12,7 @@ itemObject.onItemCheck = function(target, item, param, caster)
end

itemObject.onItemUse = function(target)
target:addStatusEffect(xi.effect.QUICKENING, 10, 0, 3600)
target:addStatusEffect(xi.effect.QUICKENING, 5, 0, 3600)
target:messageBasic(xi.msg.basic.GAINS_EFFECT_OF_STATUS, xi.effect.QUICKENING)
end

Expand Down
5 changes: 3 additions & 2 deletions scripts/items/talaria.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
-- Item: Talaria
-- Enchantment: Increases movement speed.
-- Durration: 60 Mins
-- Base speed 10% or +5
-----------------------------------
---@type TItem
local itemObject = {}
Expand All @@ -18,11 +19,11 @@ itemObject.onItemUse = function(target)
end

itemObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

itemObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

return itemObject
6 changes: 3 additions & 3 deletions scripts/items/temple_truffle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Food Effect: 3 Min, All Races
-----------------------------------
-- Strength 1
-- Speed 12.5%
-- Base speed 10% or +5
-----------------------------------
---@type TItemFood
local itemObject = {}
Expand All @@ -19,12 +19,12 @@ end

itemObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.STR, 1)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:addMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

itemObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.STR, 1)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 12)
target:delMod(xi.mod.MOVE_SPEED_QUICKENING, 5)
end

return itemObject
2 changes: 1 addition & 1 deletion sql/item_latents.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ INSERT INTO `item_latents` VALUES (10961,22,-40,13,14); -- CHARMED:DARKRES
-- LAVALIER +1
INSERT INTO `item_latents` VALUES (10962,21,-50,13,14); -- CHARMED:LIGHTRES
INSERT INTO `item_latents` VALUES (10962,22,-50,13,14); -- CHARMED:DARKRES
INSERT INTO `item_latents` VALUES (10962,75,-12,13,14); -- CHARMED:MOVE_SPEED_STACKABLE
INSERT INTO `item_latents` VALUES (10962,75,-5,13,14); -- CHARMED:MOVE_SPEED_STACKABLE

-- Archon Cape +1
INSERT INTO `item_latents` VALUES (10975,23,13,52,8); -- DARK WEATHER:ATT
Expand Down
Loading
Loading