From 8f3979e401e3f7c4e4a970a19793ef8f096c6fa8 Mon Sep 17 00:00:00 2001 From: Iridar Date: Tue, 7 May 2024 02:53:27 +0300 Subject: [PATCH] Issue #1299 - prevent rupture bonus damage from being added to attacks that don't deal damage --- .../XComGame/Classes/X2Effect_ApplyWeaponDamage.uc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Effect_ApplyWeaponDamage.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Effect_ApplyWeaponDamage.uc index 54653208f..b7211558e 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Effect_ApplyWeaponDamage.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Effect_ApplyWeaponDamage.uc @@ -967,13 +967,18 @@ simulated function int CalculateDamageAmount(const out EffectAppliedData ApplyEf /// Remove the cap from the amount of bonus damage that can be added to an attack by rupture, and do not add rupture added by this attack to the attack's damage. //RuptureAmount = min(kTarget.GetRupturedValue() + NewRupture, RuptureCap); RuptureAmount = kTarget.GetRupturedValue(); - // End Issue #1299 - if (RuptureAmount != 0) + // While Rupture Cap is removed, we still want to add bonus damage from rupture only if the attack deals damage, + // as that was part of of the original functionality of the Rupture Cap. + if (WeaponDamage > 0) { - WeaponDamage += RuptureAmount; - `log("Target is ruptured, increases damage by" @ RuptureAmount $", new damage:" @ WeaponDamage, true, 'XCom_HitRolls'); + if (RuptureAmount != 0) + { + WeaponDamage += RuptureAmount; + `log("Target is ruptured, increases damage by" @ RuptureAmount $", new damage:" @ WeaponDamage, true, 'XCom_HitRolls'); + } } + // End Issue #1299 if( kSourceUnit != none) {