From a8bd0ade13183f896b5860dc4cba0792ced5813a Mon Sep 17 00:00:00 2001 From: crabman Date: Sat, 23 Mar 2024 19:56:00 +0000 Subject: [PATCH] update outdated dependency --- common/src/combat.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/src/combat.rs b/common/src/combat.rs index eb420fc00e..25058d7f05 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -229,7 +229,12 @@ impl Attack { .clamp(0.0, 1.0); let raw_damage_reduction = Damage::compute_damage_reduction(Some(damage), target.inventory, target.stats, msm); - (1.0 - attacker_penetration) * raw_damage_reduction + + if raw_damage_reduction >= 1.0 { + raw_damage_reduction + } else { + (1.0 - attacker_penetration) * raw_damage_reduction + } } else { 0.0 }