Skip to content

Commit

Permalink
Adjust additive speed modifiers from a % to a flat number to add/remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaver-DaRed committed Sep 3, 2024
1 parent b254442 commit 58b08c4
Show file tree
Hide file tree
Showing 16 changed files with 85 additions and 87 deletions.
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/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
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

0 comments on commit 58b08c4

Please sign in to comment.