Skip to content

Commit

Permalink
Implement common cap for Quickening and Mazurka
Browse files Browse the repository at this point in the history
Co-authored-by: cocosolos <[email protected]>
  • Loading branch information
Xaver-DaRed and cocosolos committed Sep 3, 2024
1 parent eaf7833 commit c8246d4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/map/entities/battleentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,8 @@ uint8 CBattleEntity::GetSpeed()
// KIs, Gear penalties, Bolters Roll.
float additiveMods = static_cast<float>(getMod(Mod::MOVE_SPEED_STACKABLE));

// Quickening and Mazurka. Only highest applies. Additive.
Mod modToUse = getMod(Mod::MOVE_SPEED_QUICKENING) > getMod(Mod::MOVE_SPEED_MAZURKA) ? Mod::MOVE_SPEED_QUICKENING : Mod::MOVE_SPEED_MAZURKA;

float effectAdditiveBonus = static_cast<float>(getMod(modToUse));
// 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);

// Flee.
float fleeFactor = std::clamp<float>(1.0f + static_cast<float>(getMod(Mod::MOVE_SPEED_FLEE)) / 100.0f, 1.0f, 2.0f);
Expand Down

0 comments on commit c8246d4

Please sign in to comment.