Browse Source

attack speed

lakebane-dex-penalty
FatBoy-DOTC 1 week ago
parent
commit
669c0b4cd7
  1. 38
      src/engine/objects/PlayerCharacter.java

38
src/engine/objects/PlayerCharacter.java

@ -3970,25 +3970,25 @@ public class PlayerCharacter extends AbstractCharacter {
else else
speed = 20f; //unarmed attack speed speed = 20f; //unarmed attack speed
if(this.effects != null) { //if(this.effects != null) {
for (Effect eff : this.effects.values()) { // for (Effect eff : this.effects.values()) {
for (AbstractEffectModifier mod : eff.getEffectModifiers()) { // for (AbstractEffectModifier mod : eff.getEffectModifiers()) {
if (mod.modType.equals(ModType.WeaponSpeed)) { // if (mod.modType.equals(ModType.WeaponSpeed)) {
float modValue = 1 + mod.getPercentMod() * 0.01f; // float modValue = 1 + mod.getPercentMod() * 0.01f;
speed *= modValue; // speed *= modValue;
} // }
} // }
} // }
for (Effect eff : this.effects.values()) { // for (Effect eff : this.effects.values()) {
for (AbstractEffectModifier mod : eff.getEffectModifiers()) { // for (AbstractEffectModifier mod : eff.getEffectModifiers()) {
if (mod.modType.equals(ModType.AttackDelay)) { // if (mod.modType.equals(ModType.AttackDelay)) {
float modValue = 1 + mod.getPercentMod() * 0.01f; // float modValue = 1 + mod.getPercentMod() * 0.01f;
speed *= modValue; // speed *= modValue;
} // }
} // }
} // }
} //}
if(this.bonuses!= null){ if(this.bonuses!= null){
for (AbstractEffectModifier mod : this.bonuses.bonusFloats.keySet()) { for (AbstractEffectModifier mod : this.bonuses.bonusFloats.keySet()) {
if (mod.modType.equals(ModType.AttackDelay) || mod.modType.equals(ModType.WeaponSpeed)) { if (mod.modType.equals(ModType.AttackDelay) || mod.modType.equals(ModType.WeaponSpeed)) {

Loading…
Cancel
Save