diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 9f9c0532..059aa2b7 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -5108,13 +5108,13 @@ public class PlayerCharacter extends AbstractCharacter { } - - if(this.combatStats == null){ - this.combatStats = new PlayerCombatStats(this); + if(this.isAlive() && this.isActive && this.enteredWorld) { + if (this.combatStats == null) { + this.combatStats = new PlayerCombatStats(this); + } + PlayerCombatStats cStats = this.combatStats; + cStats.update(); } - PlayerCombatStats cStats = this.combatStats; - cStats.update(); - } catch (Exception e) { Logger.error(e); } finally { diff --git a/src/engine/objects/PlayerCombatStats.java b/src/engine/objects/PlayerCombatStats.java index 35b44189..d4f8d2cf 100644 --- a/src/engine/objects/PlayerCombatStats.java +++ b/src/engine/objects/PlayerCombatStats.java @@ -112,7 +112,7 @@ public class PlayerCombatStats { public void calculateMin(boolean mainHand) { Item weapon; - double baseDMG = 6; + double baseDMG = 1; int primaryStat = this.owner.statDexCurrent; int secondaryStat = this.owner.statStrCurrent; double weaponSkill = 0; @@ -128,7 +128,7 @@ public class PlayerCombatStats { String mastery = "Unarmed Combat Mastery"; if (weapon != null) { - baseDMG = weapon.getItemBase().getMaxDamage(); + baseDMG = weapon.getItemBase().getMinDamage(); skill = weapon.getItemBase().getSkillRequired(); mastery = weapon.getItemBase().getMastery(); if (weapon.getItemBase().isStrBased()) { @@ -229,14 +229,14 @@ public class PlayerCombatStats { speed = weapon.getItemBase().getSpeed(); for(Effect eff : weapon.effects.values()){ for(AbstractEffectModifier mod : eff.getEffectModifiers()){ - if(mod.modType.equals(Enum.ModType.WeaponProc)){ + if(mod.modType.equals(Enum.ModType.WeaponSpeed)){ speed *= 1 + (mod.getPercentMod() * 0.01f); } } } } - float stanceValue = 1.0f; + float stanceValue = 0.0f; for(String effID : this.owner.effects.keySet()){ if(effID.contains("STC")){ for(AbstractEffectModifier mod : this.owner.effects.get(effID).getEffectModifiers()){ @@ -247,14 +247,14 @@ public class PlayerCombatStats { } } - float bonusValues = 1.0f; - if(this.owner.bonuses != null){ - for(AbstractEffectModifier mod : this.owner.bonuses.bonusFloats.keySet()){ - if(mod.modType.equals(Enum.ModType.AttackDelay)){ - bonusValues += mod.getPercentMod() * 0.01f; // calculate all alac bonuses - } - } - } + float bonusValues = 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.AttackDelay,Enum.SourceType.None);//1.0f; + //if(this.owner.bonuses != null){ + // for(AbstractEffectModifier mod : this.owner.bonuses.bonusFloats.keySet()){ + // if(mod.modType.equals(Enum.ModType.AttackDelay)){ + // bonusValues += mod.getPercentMod() * 0.01f; // calculate all alac bonuses + // } + // } + //} bonusValues -= stanceValue; // take away stance modifier from alac bonus values speed *= 1 + stanceValue; // apply stance bonus