From 6c239f39a615fdb9fa13994fcc89cdc8eeb3234d Mon Sep 17 00:00:00 2001 From: Iridar Date: Sun, 29 Oct 2023 16:13:43 +0600 Subject: [PATCH] Implement Issue #1281 - if a damage effect ignores armor, max out Pierce in its Damage Preview --- .../Src/XComGame/Classes/X2Effect_ApplyWeaponDamage.uc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Effect_ApplyWeaponDamage.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Effect_ApplyWeaponDamage.uc index 2395caabb..acb3439c3 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Effect_ApplyWeaponDamage.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Effect_ApplyWeaponDamage.uc @@ -660,6 +660,16 @@ simulated function GetDamagePreview(StateObjectReference TargetRef, XComGameStat if (!bDoesDamageIgnoreShields) AllowsShield += MaxDamagePreview.Damage; + + // Start Issue #1281 + /// HL-Docs: ref:Bugfixes; issue:1281 + /// If the effect ignores all armor, max out the Pierce value in the Damage Preview so it will show up on the unit flag damage preview. + if (bIgnoreArmor) + { + MinDamagePreview.Pierce = MaxInt; + MaxDamagePreview.Pierce = MaxInt; + } + // End Issue #1281 } simulated function ApplyFalloff( out int WeaponDamage, Damageable Target, XComGameState_Item kSourceItem, XComGameState_Ability kAbility, XComGameState NewGameState )