Skip to content

Commit

Permalink
Add notes for for Atma movement speed bonus and correct "typo"
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaver-DaRed committed Sep 3, 2024
1 parent c8246d4 commit b3fd755
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion scripts/commands/speed.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion scripts/enum/mod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions scripts/globals/abyssea/atma.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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] = { },
Expand All @@ -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] = { },
Expand Down
10 changes: 5 additions & 5 deletions src/map/entities/battleentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,16 @@ uint8 CBattleEntity::GetSpeed()
return std::clamp<uint8>(outputSpeed, std::numeric_limits<uint8>::min(), std::numeric_limits<uint8>::max());
}

// KIs, Gear penalties, Bolters Roll.
// Gear penalties, Bolters Roll.
float additiveMods = static_cast<float>(getMod(Mod::MOVE_SPEED_STACKABLE));

// Quickening and Mazurka. They share a cap. Additive.
float effectAdditiveBonus = std::clamp<float>(static_cast<float>(getMod(Mod::MOVE_SPEED_QUICKENING)) + static_cast<float>(getMod(Mod::MOVE_SPEED_MAZURKA)), 0.0f, 10.0f);
float effectAdditiveBonus = std::clamp<float>(getMod(Mod::MOVE_SPEED_QUICKENING) + getMod(Mod::MOVE_SPEED_MAZURKA), 0.0f, 10.0f);

// Flee.
float fleeFactor = std::clamp<float>(1.0f + static_cast<float>(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)
Expand All @@ -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<uint8>(outputSpeed, std::numeric_limits<uint8>::min(), std::numeric_limits<uint8>::max());
Expand Down
2 changes: 1 addition & 1 deletion src/map/modifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b3fd755

Please sign in to comment.