|
|
@ -7,7 +7,6 @@ import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
|
|
|
|
public class PlayerCombatStats { |
|
|
|
public class PlayerCombatStats { |
|
|
|
public static HashMap<PlayerCharacter, PlayerCombatStats> combatstats = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public PlayerCharacter owner; |
|
|
|
public PlayerCharacter owner; |
|
|
|
//main hand data
|
|
|
|
//main hand data
|
|
|
@ -47,7 +46,6 @@ public class PlayerCombatStats { |
|
|
|
this.calculateAttackRange(false); |
|
|
|
this.calculateAttackRange(false); |
|
|
|
this.calculateRegen(); |
|
|
|
this.calculateRegen(); |
|
|
|
this.calculateDefense(); |
|
|
|
this.calculateDefense(); |
|
|
|
combatstats.put(this.owner, this); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void calculateATR(boolean mainHand) { |
|
|
|
public void calculateATR(boolean mainHand) { |
|
|
@ -338,7 +336,6 @@ public class PlayerCombatStats { |
|
|
|
double blockSkill = 0; |
|
|
|
double blockSkill = 0; |
|
|
|
double weaponSkill = 0; |
|
|
|
double weaponSkill = 0; |
|
|
|
double weaponMastery = 0; |
|
|
|
double weaponMastery = 0; |
|
|
|
int flatBonuses = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//armor defense value need to loop all equipped items and log armor defense values
|
|
|
|
//armor defense value need to loop all equipped items and log armor defense values
|
|
|
|
ArrayList<String> armorTypes = new ArrayList<>(); |
|
|
|
ArrayList<String> armorTypes = new ArrayList<>(); |
|
|
@ -399,21 +396,23 @@ public class PlayerCombatStats { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
float stanceValue = 0.0f; |
|
|
|
float stanceValue = 0.0f; |
|
|
|
|
|
|
|
float bonusValues = 0; |
|
|
|
|
|
|
|
float percentBonus = 0; |
|
|
|
if (this.owner.bonuses != null) { |
|
|
|
if (this.owner.bonuses != null) { |
|
|
|
for (String effID : this.owner.effects.keySet()) { |
|
|
|
for (String effID : this.owner.effects.keySet()) { |
|
|
|
if(effID.contains("STC")){ |
|
|
|
if (effID.contains("Stance")) { |
|
|
|
|
|
|
|
if (this.owner.effects != null) { |
|
|
|
for (AbstractEffectModifier mod : this.owner.effects.get(effID).getEffectModifiers()) { |
|
|
|
for (AbstractEffectModifier mod : this.owner.effects.get(effID).getEffectModifiers()) { |
|
|
|
if(mod.modType.equals(Enum.ModType.AttackDelay)){ |
|
|
|
if (mod.modType.equals(Enum.ModType.DCV)) { |
|
|
|
stanceValue = mod.getPercentMod() * 0.01f; // account for weapon prefix and suffix mods
|
|
|
|
stanceValue = mod.getPercentMod() * 0.01f; // account for weapon prefix and suffix mods
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
float bonusValues = 1.0f + this.owner.bonuses.getFloat(Enum.ModType.DCV, Enum.SourceType.None); |
|
|
|
bonusValues = this.owner.bonuses.getFloat(Enum.ModType.DCV, Enum.SourceType.None); |
|
|
|
|
|
|
|
percentBonus = this.owner.bonuses.getFloatPercentAll(Enum.ModType.DCV, Enum.SourceType.None) - stanceValue; |
|
|
|
bonusValues -= stanceValue; // take away stance modifier from alac bonus values
|
|
|
|
|
|
|
|
flatBonuses += bonusValues; // apply alac bonuses without stance mod
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double defense = (1 + armorSkill / 50.0) * armorDefense + |
|
|
|
double defense = (1 + armorSkill / 50.0) * armorDefense + |
|
|
@ -421,8 +420,10 @@ public class PlayerCombatStats { |
|
|
|
(weaponSkill / 2.0) + |
|
|
|
(weaponSkill / 2.0) + |
|
|
|
(weaponMastery / 2.0) + |
|
|
|
(weaponMastery / 2.0) + |
|
|
|
dexterity * 2.0 + |
|
|
|
dexterity * 2.0 + |
|
|
|
flatBonuses; |
|
|
|
bonusValues; |
|
|
|
|
|
|
|
defense *= 1.0f + percentBonus; |
|
|
|
|
|
|
|
defense *= 1.0f + stanceValue; |
|
|
|
|
|
|
|
|
|
|
|
this.defense = (int) (defense * 1.0f + stanceValue); |
|
|
|
this.defense = (int) defense; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|