PlayerCombatStats dex penalty applied correctly

This commit is contained in:
2025-01-25 16:31:56 -06:00
parent af4025d948
commit c01e87ee8b
+6 -3
View File
@@ -7,6 +7,7 @@ import org.pmw.tinylog.Logger;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
public class PlayerCombatStats { public class PlayerCombatStats {
@@ -534,10 +535,10 @@ public class PlayerCombatStats {
masteryName = weapon.getItemBase().getMastery(); masteryName = weapon.getItemBase().getMastery();
} }
if(this.owner.skills.containsKey(skillName)) if(this.owner.skills.containsKey(skillName))
weaponSkill = this.owner.skills.get(skillName).getModifiedAmount(); weaponSkill = this.owner.skills.get(skillName).getSkillPercentFromTrains();//calculateModifiedSkill(skillName,this.owner);//this.owner.skills.get(skillName).getModifiedAmount();
if(this.owner.skills.containsKey(masteryName)) if(this.owner.skills.containsKey(masteryName))
masterySkill = this.owner.skills.get(masteryName).getModifiedAmount(); masterySkill = this.owner.skills.get(masteryName).getSkillPercentFromTrains();//calculateModifiedSkill(masteryName,this.owner);//this.owner.skills.get(masteryName).getModifiedAmount();
float dexterity = getDexAfterPenalty(this.owner); float dexterity = getDexAfterPenalty(this.owner);
@@ -586,7 +587,9 @@ public class PlayerCombatStats {
defense += flatBonuses; defense += flatBonuses;
defense *= luckyRune; defense *= luckyRune;
defense *= stanceMod; defense *= stanceMod;
defense = Math.round(defense); defense = Math.round(defense);
this.defense = (int) defense; this.defense = (int) defense;
} }
@@ -664,7 +667,7 @@ public class PlayerCombatStats {
modAmount *= (1 + pc.getBonuses().getFloatPercentAll(Enum.ModType.Skill, sourceType)); modAmount *= (1 + pc.getBonuses().getFloatPercentAll(Enum.ModType.Skill, sourceType));
} }
float modifiedAmount = Math.round(modAmount); float modifiedAmount = (float) Math.round(modAmount);
return modifiedAmount; return modifiedAmount;
} }