Skip to content

Commit

Permalink
Implement Issue X2CommunityCore#1213
Browse files Browse the repository at this point in the history
  • Loading branch information
ps2guides committed Jun 29, 2023
1 parent 1dbcd73 commit 69db7a4
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,10 @@ protected function int GetHitChance(XComGameState_Ability kAbility, AvailableTar
else if (bIndirectFire)
{
m_ShotBreakdown.HideShotBreakdown = true;
AddModifier(100, AbilityTemplate.LocFriendlyName, m_ShotBreakdown, eHit_Success, bDebugLog);

/// HL-Docs: ref:Bugfixes; issue:1213
/// Treat bIndirectFire same as bGuaranteedHit for the purposes of hit chance modifiers.
super.AddModifier(100, AbilityTemplate.LocFriendlyName, m_ShotBreakdown, eHit_Success, bDebugLog);
}

// Issue #346: AddModifier(BuiltIn...Mod) block moved later in method.
Expand Down Expand Up @@ -876,7 +879,9 @@ function int GetModifiedHitChanceForCurrentDifficulty(XComGameState_Player Insti

protected function AddModifier(const int ModValue, const string ModReason, out ShotBreakdown m_ShotBreakdown, EAbilityHitResult ModType = eHit_Success, bool bDebugLog = false)
{
if (bGuaranteedHit || m_ShotBreakdown.SpecialGuaranteedHit != '')
/// HL-Docs: ref:Bugfixes; issue:1213
/// Treat bIndirectFire same as bGuaranteedHit for the purposes of hit chance modifiers.
if (bGuaranteedHit || m_ShotBreakdown.SpecialGuaranteedHit != '' || bIndirectFire)
{
if (ModType != eHit_Crit) // for a guaranteed hit, the only possible modifier is to allow for crit
return;
Expand Down

0 comments on commit 69db7a4

Please sign in to comment.