From e7d22717cd4a7468eff004bf1b1325b0b42330e6 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 20 Jan 2025 15:24:48 -0600 Subject: [PATCH] attack speed calculations --- src/engine/objects/PlayerCharacter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 4b34c256..1f7ad191 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -3974,7 +3974,8 @@ public class PlayerCharacter extends AbstractCharacter { for(Effect eff : this.effects.values()){ for(AbstractEffectModifier mod : eff.getEffectModifiers()){ if(mod.modType.equals(ModType.WeaponSpeed)){ - speed *= 1 + mod.getPercentMod(); + float modValue = 1 + mod.getPercentMod() * 0.01f; + speed *= modValue; } } } @@ -3984,7 +3985,8 @@ public class PlayerCharacter extends AbstractCharacter { for(Effect eff : this.effects.values()){ for(AbstractEffectModifier mod : eff.getEffectModifiers()){ if(mod.modType.equals(ModType.AttackDelay)){ - speed *= 1 + mod.getPercentMod(); + float modValue = 1 + mod.getPercentMod() * 0.01f; + speed *= modValue; } } }