From 80ec681a2c31dfa821c94ee8c92c491a74db2461 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 24 Jan 2025 06:08:08 -0600 Subject: [PATCH] PlayerCombatStats 30% damage reduction for duel wielding --- src/engine/objects/PlayerCombatStats.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/engine/objects/PlayerCombatStats.java b/src/engine/objects/PlayerCombatStats.java index fbce4eb2..a1ff45ee 100644 --- a/src/engine/objects/PlayerCombatStats.java +++ b/src/engine/objects/PlayerCombatStats.java @@ -270,6 +270,12 @@ public class PlayerCombatStats { minDMG *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.MeleeDamageModifier, Enum.SourceType.None); } + if(this.owner.charItemManager != null){ + if(this.owner.charItemManager.getEquipped(1) != null && this.owner.charItemManager.getEquipped(2) != null && !this.owner.charItemManager.getEquipped(2).getItemBase().isShield()){ + minDMG *= 0.7f; + } + } + int roundedMin = (int)Math.round(minDMG); if (mainHand) { @@ -341,6 +347,12 @@ public class PlayerCombatStats { maxDMG *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.MeleeDamageModifier, Enum.SourceType.None); } + if(this.owner.charItemManager != null){ + if(this.owner.charItemManager.getEquipped(1) != null && this.owner.charItemManager.getEquipped(2) != null && !this.owner.charItemManager.getEquipped(2).getItemBase().isShield()){ + maxDMG *= 0.7f; + } + } + int roundedMax = (int)Math.round(maxDMG); if(mainHand){