This commit is contained in:
2025-02-06 20:23:24 -06:00
parent ec4cad5e19
commit 86c0bbb065
2 changed files with 21 additions and 8 deletions
+9 -1
View File
@@ -1233,6 +1233,14 @@ public enum CombatManager {
private static boolean testPassive(AbstractCharacter source, AbstractCharacter target, String type) {
if(target.getBonuses() != null)
if(target.getBonuses().getBool(ModType.Stunned, SourceType.None))
return false;
if(source.getBonuses() != null)
if(source.getBonuses().getBool(ModType.IgnorePassiveDefense, SourceType.None))
return false;
float chance = target.getPassiveChance(type, source.getLevel(), true);
if (chance == 0f)
@@ -1243,7 +1251,7 @@ public enum CombatManager {
if (chance > 75f)
chance = 75f;
int roll = ThreadLocalRandom.current().nextInt(100);
int roll = ThreadLocalRandom.current().nextInt(1,100);
return roll < chance;
+12 -7
View File
@@ -457,7 +457,7 @@ public class PlayerCombatStats {
float specialDex = this.owner.statDexBase;
specialDex += this.owner.bonuses.getFloat(Enum.ModType.Attr, Enum.SourceType.Dexterity);
float baseDMG = 1;
float primaryStat = specialDex;//getDexAfterPenalty(this.owner);
float primaryStat = specialDex;
float secondaryStat = this.owner.statStrCurrent;
double weaponSkill = 5;
double weaponMastery = 5;
@@ -476,8 +476,10 @@ public class PlayerCombatStats {
skill = weapon.getItemBase().getSkillRequired();
mastery = weapon.getItemBase().getMastery();
if (weapon.getItemBase().isStrBased()) {
//primaryStat = this.owner.statStrCurrent;
//secondaryStat = specialDex;//getDexAfterPenalty(this.owner);
primaryStat = this.owner.statStrCurrent;
secondaryStat = specialDex;//getDexAfterPenalty(this.owner);
secondaryStat = this.owner.statDexCurrent;
}
for(Effect eff : weapon.effects.values()){
for(AbstractEffectModifier mod : eff.getEffectModifiers()){
@@ -493,7 +495,7 @@ public class PlayerCombatStats {
}
if (this.owner.skills.containsKey(mastery)) {
weaponMastery = this.owner.skills.get(weaponMastery).getModifiedAmount();
weaponMastery = this.owner.skills.get(mastery).getModifiedAmount();
}
double minDMG = baseDMG * (
@@ -544,7 +546,7 @@ public class PlayerCombatStats {
weapon = this.owner.charItemManager.getEquipped(2);
}
int extraDamage = 0;
int extraDamage = 3;
String skill = "Unarmed Combat";
String mastery = "Unarmed Combat Mastery";
if (weapon != null) {
@@ -554,7 +556,7 @@ public class PlayerCombatStats {
if (weapon.getItemBase().isStrBased()) {
primaryStat = this.owner.statStrCurrent;
secondaryStat = this.owner.statDexCurrent;
extraDamage = 3;
//extraDamage = 3;
}
for(Effect eff : weapon.effects.values()){
for(AbstractEffectModifier mod : eff.getEffectModifiers()){
@@ -729,20 +731,23 @@ public class PlayerCombatStats {
float armorSkill = 0.0f;
float armorDefense = 0.0f;
ArrayList<String> armorsUsed = new ArrayList<>();
int itemdef = 0;
for(Item equipped : this.owner.charItemManager.getEquipped().values()){
ItemBase ib = equipped.getItemBase();
if(ib.isHeavyArmor() || ib.isMediumArmor() || ib.isLightArmor() || ib.isClothArmor()){
armorDefense += ib.getDefense();
itemdef = ib.getDefense();
for(Effect eff : equipped.effects.values()){
for(AbstractEffectModifier mod : eff.getEffectModifiers()){
if(mod.modType.equals(Enum.ModType.DR)){
armorDefense += mod.minMod + (mod.getRamp() * eff.getTrains());
itemdef += mod.minMod + (mod.getRamp() * eff.getTrains());
}
}
}
if(!ib.isClothArmor() && !armorsUsed.contains(ib.getSkillRequired())) {
armorsUsed.add(ib.getSkillRequired());
}
armorDefense += itemdef;
}
}
for(String armorUsed : armorsUsed){