Browse Source

PlayerCombatStats final

lakebane-dex-penalty
FatBoy-DOTC 1 week ago
parent
commit
f6299f5b97
  1. 10
      src/engine/objects/PlayerCombatStats.java

10
src/engine/objects/PlayerCombatStats.java

@ -76,9 +76,10 @@ public class PlayerCombatStats {
if(this.owner.skills.containsKey(mastery)) if(this.owner.skills.containsKey(mastery))
masteryLevel = this.owner.skills.get(mastery).getTotalSkillPercet(); masteryLevel = this.owner.skills.get(mastery).getTotalSkillPercet();
float masteryCalc = masteryLevel * 3;
float primaryCalc = primary * 0.5f; float primaryCalc = primary * 0.5f;
float skillCalc = skillLevel * 4; float skillCalc = skillLevel * 4;
float masteryCalc = masteryLevel * 3;
float atrEnchants = 0; float atrEnchants = 0;
float stanceValue = 0.0f; float stanceValue = 0.0f;
@ -102,13 +103,14 @@ public class PlayerCombatStats {
atr = primaryCalc + skillCalc + masteryCalc + atrEnchants; atr = primaryCalc + skillCalc + masteryCalc + atrEnchants;
atr *= 1 + (this.owner.bonuses.getFloatPercentAll(Enum.ModType.OCV, Enum.SourceType.None) - stanceValue); atr *= 1 + (this.owner.bonuses.getFloatPercentAll(Enum.ModType.OCV, Enum.SourceType.None) - stanceValue);
atr *= 1 + stanceValue; atr *= 1 + stanceValue;
atr += 0.5f; atr = Math.round(atr);
if(mainHand){ if(mainHand){
this.atrHandOne = atr; this.atrHandOne = atr;
}else{ }else{
this.atrHandTwo = atr; this.atrHandTwo = atr;
if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){ if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){
if(!this.owner.charItemManager.getEquipped(2).getItemBase().isShield())
this.atrHandOne = 0.0f; this.atrHandOne = 0.0f;
} }
} }
@ -168,6 +170,7 @@ public class PlayerCombatStats {
} else { } else {
this.minDamageHandTwo = roundedMin; this.minDamageHandTwo = roundedMin;
if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){ if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){
if(!this.owner.charItemManager.getEquipped(2).getItemBase().isShield())
this.minDamageHandOne = 0; this.minDamageHandOne = 0;
} }
} }
@ -230,6 +233,7 @@ public class PlayerCombatStats {
}else{ }else{
this.maxDamageHandTwo = roundedMax; this.maxDamageHandTwo = roundedMax;
if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){ if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){
if(!this.owner.charItemManager.getEquipped(2).getItemBase().isShield())
this.maxDamageHandOne = 0; this.maxDamageHandOne = 0;
} }
} }
@ -289,6 +293,7 @@ public class PlayerCombatStats {
}else{ }else{
this.attackSpeedHandTwo = speed; this.attackSpeedHandTwo = speed;
if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){ if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){
if(!this.owner.charItemManager.getEquipped(2).getItemBase().isShield())
this.attackSpeedHandOne = 0.0f; this.attackSpeedHandOne = 0.0f;
} }
} }
@ -316,6 +321,7 @@ public class PlayerCombatStats {
}else{ }else{
this.rangeHandTwo = range; this.rangeHandTwo = range;
if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){ if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){
if(!this.owner.charItemManager.getEquipped(2).getItemBase().isShield())
this.rangeHandOne = 0.0f; this.rangeHandOne = 0.0f;
} }
} }

Loading…
Cancel
Save