Browse Source

Fix for weaponspeed effect modifier.

master
MagicBot 2 years ago
parent
commit
a35c5ef3cc
  1. 2
      src/engine/objects/PlayerCharacter.java
  2. 14
      src/engine/powers/effectmodifiers/WeaponSpeedEffectModifier.java

2
src/engine/objects/PlayerCharacter.java

@ -3885,7 +3885,7 @@ public void dismissNecroPets() { @@ -3885,7 +3885,7 @@ public void dismissNecroPets() {
else
speed = 20f; //unarmed attack speed
if (weapon != null)
speed *= (1 + weapon.getBonusPercent(ModType.WeaponSpeed, SourceType.None));
speed *= (1 + this.bonuses.getFloatPercentAll(ModType.WeaponSpeed, SourceType.None));
speed *= (1 + this.bonuses.getFloatPercentAll(ModType.AttackDelay, SourceType.None));
if (speed < 10)
speed = 10;

14
src/engine/powers/effectmodifiers/WeaponSpeedEffectModifier.java

@ -30,7 +30,19 @@ public class WeaponSpeedEffectModifier extends AbstractEffectModifier { @@ -30,7 +30,19 @@ public class WeaponSpeedEffectModifier extends AbstractEffectModifier {
}
@Override
public void applyBonus(AbstractCharacter ac, int trains) {}
public void applyBonus(AbstractCharacter ac, int trains) {
Float amount = 0f;
if (this.useRampAdd)
amount = this.percentMod + (this.ramp * trains);
else
amount = this.percentMod * (1 + (this.ramp * trains));
amount = amount/100;
ac.getBonuses().addFloat(this, amount);
}
@Override
public void applyBonus(Item item, int trains) {

Loading…
Cancel
Save