|
|
@ -51,6 +51,7 @@ public class PlayerCombatStats { |
|
|
|
public void calculateATR(boolean mainHand) { |
|
|
|
public void calculateATR(boolean mainHand) { |
|
|
|
Item weapon; |
|
|
|
Item weapon; |
|
|
|
float atr; |
|
|
|
float atr; |
|
|
|
|
|
|
|
|
|
|
|
if(mainHand) { |
|
|
|
if(mainHand) { |
|
|
|
weapon = this.owner.charItemManager.getEquipped(1); |
|
|
|
weapon = this.owner.charItemManager.getEquipped(1); |
|
|
|
}else { |
|
|
|
}else { |
|
|
@ -59,16 +60,16 @@ public class PlayerCombatStats { |
|
|
|
|
|
|
|
|
|
|
|
String skill = "Unarmed Combat"; |
|
|
|
String skill = "Unarmed Combat"; |
|
|
|
String mastery = "Unarmed Combat Mastery"; |
|
|
|
String mastery = "Unarmed Combat Mastery"; |
|
|
|
int primary = this.owner.statDexCurrent; |
|
|
|
int primaryStat = this.owner.statDexCurrent; |
|
|
|
if(weapon != null) { |
|
|
|
if(weapon != null) { |
|
|
|
skill= weapon.getItemBase().getSkillRequired(); |
|
|
|
skill= weapon.getItemBase().getSkillRequired(); |
|
|
|
mastery = weapon.getItemBase().getMastery(); |
|
|
|
mastery = weapon.getItemBase().getMastery(); |
|
|
|
if(weapon.getItemBase().isStrBased()) |
|
|
|
if(weapon.getItemBase().isStrBased()) |
|
|
|
primary = this.owner.statStrCurrent; |
|
|
|
primaryStat = this.owner.statStrCurrent; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
float skillLevel = 5; |
|
|
|
float skillLevel = 0; |
|
|
|
float masteryLevel = 5; |
|
|
|
float masteryLevel = 0; |
|
|
|
|
|
|
|
|
|
|
|
if(this.owner.skills.containsKey(skill)) |
|
|
|
if(this.owner.skills.containsKey(skill)) |
|
|
|
skillLevel = this.owner.skills.get(skill).getTotalSkillPercet(); |
|
|
|
skillLevel = this.owner.skills.get(skill).getTotalSkillPercet(); |
|
|
@ -76,12 +77,8 @@ 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 skillCalc = skillLevel * 4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float atrEnchants = 0; |
|
|
|
|
|
|
|
float stanceValue = 0.0f; |
|
|
|
float stanceValue = 0.0f; |
|
|
|
|
|
|
|
float atrEnchants = 0; |
|
|
|
|
|
|
|
|
|
|
|
for(String effID : this.owner.effects.keySet()) { |
|
|
|
for(String effID : this.owner.effects.keySet()) { |
|
|
|
if (effID.contains("Stance")) { |
|
|
|
if (effID.contains("Stance")) { |
|
|
@ -93,17 +90,48 @@ public class PlayerCombatStats { |
|
|
|
stanceValue += modValue * 0.01f; |
|
|
|
stanceValue += modValue * 0.01f; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
for (AbstractEffectModifier mod : this.owner.effects.get(effID).getEffectModifiers()) { |
|
|
|
|
|
|
|
if (mod.modType.equals(Enum.ModType.OCV)) { |
|
|
|
|
|
|
|
float value = mod.getMinMod(); |
|
|
|
|
|
|
|
int trains = this.owner.effects.get(effID).getTrains(); |
|
|
|
|
|
|
|
float modValue = value + (trains * mod.getRamp()); |
|
|
|
|
|
|
|
atrEnchants += modValue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(this.owner.bonuses != null){ |
|
|
|
float prefixValues = 0.0f; |
|
|
|
atrEnchants = this.owner.bonuses.getFloat(Enum.ModType.OCV, Enum.SourceType.None); |
|
|
|
if(weapon != null){ |
|
|
|
|
|
|
|
if(this.owner.charItemManager.getEquipped(1) != null){ |
|
|
|
|
|
|
|
for(Effect eff : this.owner.charItemManager.getEquipped(1).effects.values()){ |
|
|
|
|
|
|
|
for(AbstractEffectModifier mod : eff.getEffectModifiers()){ |
|
|
|
|
|
|
|
if(mod.modType.equals(Enum.ModType.OCV)){ |
|
|
|
|
|
|
|
prefixValues += mod.minMod * (mod.getRamp() * eff.getTrains()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(this.owner.charItemManager.getEquipped(2) != null){ |
|
|
|
|
|
|
|
for(Effect eff : this.owner.charItemManager.getEquipped(2).effects.values()){ |
|
|
|
|
|
|
|
for(AbstractEffectModifier mod : eff.getEffectModifiers()){ |
|
|
|
|
|
|
|
if(mod.modType.equals(Enum.ModType.OCV)){ |
|
|
|
|
|
|
|
prefixValues += mod.minMod * (mod.getRamp() * eff.getTrains()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
atr = primaryCalc + skillCalc + masteryCalc + atrEnchants; |
|
|
|
float preciseRune = 1.0f; |
|
|
|
atr *= 1 + (this.owner.bonuses.getFloatPercentAll(Enum.ModType.OCV, Enum.SourceType.None) - stanceValue); |
|
|
|
for(CharacterRune rune : this.owner.runes){ |
|
|
|
atr *= 1 + stanceValue; |
|
|
|
if(rune.getRuneBase().getName().equals("Precise")) |
|
|
|
atr = (float) Math.ceil(atr); |
|
|
|
preciseRune += 0.05f; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
atr = (((primaryStat / 2) + (skillLevel * 4 + masteryLevel * 3) + prefixValues) * preciseRune + atrEnchants) * (1.0f + stanceValue); |
|
|
|
|
|
|
|
|
|
|
|
if(mainHand){ |
|
|
|
if(mainHand){ |
|
|
|
this.atrHandOne = atr; |
|
|
|
this.atrHandOne = atr; |
|
|
|