From b3fd755e35c14937bc444cf89269b6845fbbd0a1 Mon Sep 17 00:00:00 2001 From: Xaver-DaRed Date: Tue, 3 Sep 2024 20:35:48 +0200 Subject: [PATCH] Add notes for for Atma movement speed bonus and correct "typo" --- scripts/commands/speed.lua | 2 +- scripts/enum/mod.lua | 2 +- scripts/globals/abyssea/atma.lua | 4 ++-- src/map/entities/battleentity.cpp | 10 +++++----- src/map/modifier.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/commands/speed.lua b/scripts/commands/speed.lua index 2717f6dcb90..2b6eb291940 100644 --- a/scripts/commands/speed.lua +++ b/scripts/commands/speed.lua @@ -47,7 +47,7 @@ commandObj.onTrigger = function(player, speed) player:printToPlayer(string.format('New speed: %u', speed)) end - player:setMod(xi.mod.MOVE_SPEED_OVERIDE, speed) + player:setMod(xi.mod.MOVE_SPEED_OVERRIDE, speed) player:setSpeed(baseSpeed) end diff --git a/scripts/enum/mod.lua b/scripts/enum/mod.lua index 126b1af2634..5343bc7afe6 100644 --- a/scripts/enum/mod.lua +++ b/scripts/enum/mod.lua @@ -235,7 +235,7 @@ xi.mod = SPELLINTERRUPT = 168, -- Movement speed modifiers - MOVE_SPEED_OVERIDE = 169, -- Modifier used to overide regular speed caps. (GM speed and Feast of Swords) + MOVE_SPEED_OVERRIDE = 169, -- Modifier used to overide regular speed caps. (GM speed and Feast of Swords) 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. diff --git a/scripts/globals/abyssea/atma.lua b/scripts/globals/abyssea/atma.lua index e749c5f5385..c9b610b86ae 100644 --- a/scripts/globals/abyssea/atma.lua +++ b/scripts/globals/abyssea/atma.lua @@ -124,7 +124,7 @@ xi.atma.atmaMods = [xi.ki.ATMA_OF_THE_AZURE_SKY] = { }, [xi.ki.ATMA_OF_ECHOES] = { }, [xi.ki.ATMA_OF_DREAD] = { }, - [xi.ki.ATMA_OF_AMBITION] = { }, + [xi.ki.ATMA_OF_AMBITION] = { }, -- Note: Speed modifier is the same as positive gear. Meaning, it doesnt stack. [xi.ki.ATMA_OF_THE_BEAST_KING] = { }, [xi.ki.ATMA_OF_THE_KIRIN] = { }, [xi.ki.ATMA_OF_HELLS_GUARDIAN] = { }, @@ -143,7 +143,7 @@ xi.atma.atmaMods = [xi.ki.ATMA_OF_THE_ILLUMINATOR] = { }, [xi.ki.ATMA_OF_THE_BUSHIN] = { }, [xi.ki.ATMA_OF_THE_ACE_ANGLER] = { }, - [xi.ki.ATMA_OF_THE_MASTER_CRAFTER] = { }, + [xi.ki.ATMA_OF_THE_MASTER_CRAFTER] = { }, -- Note: Speed modifier is the same as positive gear. Meaning, it doesnt stack [xi.ki.ATMA_OF_INGENUITY] = { }, [xi.ki.ATMA_OF_THE_GRIFFONS_CLAW] = { }, [xi.ki.ATMA_OF_THE_FETCHING_FOOTPAD] = { }, diff --git a/src/map/entities/battleentity.cpp b/src/map/entities/battleentity.cpp index 53e4e91df7b..e48e73196a9 100644 --- a/src/map/entities/battleentity.cpp +++ b/src/map/entities/battleentity.cpp @@ -255,16 +255,16 @@ uint8 CBattleEntity::GetSpeed() return std::clamp(outputSpeed, std::numeric_limits::min(), std::numeric_limits::max()); } - // KIs, Gear penalties, Bolters Roll. + // Gear penalties, Bolters Roll. float additiveMods = static_cast(getMod(Mod::MOVE_SPEED_STACKABLE)); // Quickening and Mazurka. They share a cap. Additive. - float effectAdditiveBonus = std::clamp(static_cast(getMod(Mod::MOVE_SPEED_QUICKENING)) + static_cast(getMod(Mod::MOVE_SPEED_MAZURKA)), 0.0f, 10.0f); + float effectAdditiveBonus = std::clamp(getMod(Mod::MOVE_SPEED_QUICKENING) + getMod(Mod::MOVE_SPEED_MAZURKA), 0.0f, 10.0f); // Flee. float fleeFactor = std::clamp(1.0f + static_cast(getMod(Mod::MOVE_SPEED_FLEE)) / 100.0f, 1.0f, 2.0f); - // Positive movement speed from gear. Only highest applies. Multiplicative to base speed. + // Positive movement speed from gear and from Atmas. Only highest applies. Multiplicative to base speed. float gearBonus = 1.0f; if (objtype == TYPE_PC) @@ -288,9 +288,9 @@ uint8 CBattleEntity::GetSpeed() // TODO: Find exceptions. Add them here. // GM speed bypass. - if (getMod(Mod::MOVE_SPEED_OVERIDE) > 0) + if (getMod(Mod::MOVE_SPEED_OVERRIDE) > 0) { - outputSpeed = getMod(Mod::MOVE_SPEED_OVERIDE); + outputSpeed = getMod(Mod::MOVE_SPEED_OVERRIDE); } return std::clamp(outputSpeed, std::numeric_limits::min(), std::numeric_limits::max()); diff --git a/src/map/modifier.h b/src/map/modifier.h index 44ce3ab4d1a..5b750cf8339 100644 --- a/src/map/modifier.h +++ b/src/map/modifier.h @@ -273,7 +273,7 @@ enum class Mod SPELLINTERRUPT = 168, // % Spell Interruption Rate // New movement speed modifiers. - MOVE_SPEED_OVERIDE = 169, // Modifier used to overide regular speed caps. (GM speed and Feast of Swords) + MOVE_SPEED_OVERRIDE = 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.