Browse Source

PlayerCombatStats 30% damage reduction for duel wielding

lakebane-dex-penalty
FatBoy-DOTC 6 days ago
parent
commit
80ec681a2c
  1. 12
      src/engine/objects/PlayerCombatStats.java

12
src/engine/objects/PlayerCombatStats.java

@ -270,6 +270,12 @@ public class PlayerCombatStats { @@ -270,6 +270,12 @@ public class PlayerCombatStats {
minDMG *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.MeleeDamageModifier, Enum.SourceType.None);
}
if(this.owner.charItemManager != null){
if(this.owner.charItemManager.getEquipped(1) != null && this.owner.charItemManager.getEquipped(2) != null && !this.owner.charItemManager.getEquipped(2).getItemBase().isShield()){
minDMG *= 0.7f;
}
}
int roundedMin = (int)Math.round(minDMG);
if (mainHand) {
@ -341,6 +347,12 @@ public class PlayerCombatStats { @@ -341,6 +347,12 @@ public class PlayerCombatStats {
maxDMG *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.MeleeDamageModifier, Enum.SourceType.None);
}
if(this.owner.charItemManager != null){
if(this.owner.charItemManager.getEquipped(1) != null && this.owner.charItemManager.getEquipped(2) != null && !this.owner.charItemManager.getEquipped(2).getItemBase().isShield()){
maxDMG *= 0.7f;
}
}
int roundedMax = (int)Math.round(maxDMG);
if(mainHand){

Loading…
Cancel
Save