Skip to content

Commit

Permalink
Implement Issue #1271 - add GetAdditionalHitModifiers_CH function.
Browse files Browse the repository at this point in the history
  • Loading branch information
ps2guides committed Oct 22, 2023
1 parent 339a38c commit 158480d
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,12 @@ protected function int GetHitChance(XComGameState_Ability kAbility, AvailableTar
}
}

/// HL-Docs: feature:GetAdditionalHitModifiers; issue:1271; tags:tactical
/// This feature adds a method that can be used by subclasses to apply
/// additional hit modifiers without having to override and copy paste
/// the entire `GetHitChance()` function.
GetAdditionalHitModifiers_CH(kAbility, kTarget, m_ShotBreakdown, bDebugLog);

// Final multiplier based on end Success chance
if (bReactionFire && !bGuaranteedHit)
{
Expand Down Expand Up @@ -1026,6 +1032,10 @@ function ECoverType NextTileOverCoverInSameDirection(const out TTile SourceTile,
return BestCover;
}

/// HL-Docs: ref:GetAdditionalHitModifiers;
/// Override this method in subclasses to apply additional hit modifiers.
function GetAdditionalHitModifiers_CH(XComGameState_Ability kAbility, AvailableTarget kTarget, optional out ShotBreakdown m_ShotBreakdown, optional bool bDebugLog = false) {}

DefaultProperties
{
bAllowCrit=true
Expand Down

0 comments on commit 158480d

Please sign in to comment.