From 5761e313fd99194059b0fbb6ddec104b494762ac Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 20 Jan 2025 20:28:04 -0600 Subject: [PATCH] weapon speed --- src/engine/objects/PlayerCharacter.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index af5cf247..e202b9b3 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -4264,9 +4264,21 @@ public class PlayerCharacter extends AbstractCharacter { // } // } //} + + + if(weapon != null){ + for(Effect eff : weapon.effects.values()){ + for (AbstractEffectModifier mod : eff.getEffectModifiers()){ + if(mod.modType.equals(ModType.WeaponSpeed)){ + speed *= 1 + (mod.getPercentMod() * 0.01f); + } + } + } + } + if(this.bonuses!= null){ for (AbstractEffectModifier mod : this.bonuses.bonusFloats.keySet()) { - if (mod.modType.equals(ModType.AttackDelay) || mod.modType.equals(ModType.WeaponSpeed)) { + if (mod.modType.equals(ModType.AttackDelay)) { float modValue = 1 + mod.getPercentMod() * 0.01f; speed *= modValue; } @@ -4362,7 +4374,7 @@ public class PlayerCharacter extends AbstractCharacter { this.speedHandTwo = speed; } - this.calculateATR(); + //this.calculateATR(); //this.calculateDamage(); //this.calculateSpeed(); }