Skip to content

Commit

Permalink
Add check for Tick context to eHit_Crit and eHit-Graze
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackDog86 committed Jan 2, 2025
1 parent 12e1fb5 commit 74a898e
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -950,17 +950,21 @@ simulated function int CalculateDamageAmount(const out EffectAppliedData ApplyEf
WeaponDamage++;
`log("Rolled for PlusOne off AmmoDamage, succeeded. Damage:" @ WeaponDamage, true, 'XCom_HitRolls');
}

if (ApplyEffectParameters.AbilityResultContext.HitResult == eHit_Crit)
// Start Issue #1396
/// HL-Docs: ref:Bugfixes; issue:1396
/// Ensure that Damage-over-time effects applied by abilities that grazed or critted the target do not get their damage adjusted
/// by checking for ApplyOnTick behavior
if (ApplyEffectParameters.AbilityResultContext.HitResult == eHit_Crit && ApplyEffectParameters.EffectRef.ApplyOnTickIndex == INDEX_NONE)
{
WeaponDamage += CritDamage;
`log("CRIT! Adjusted damage:" @ WeaponDamage, true, 'XCom_HitRolls');
}
else if (ApplyEffectParameters.AbilityResultContext.HitResult == eHit_Graze)
}
else if (ApplyEffectParameters.AbilityResultContext.HitResult == eHit_Graze && ApplyEffectParameters.EffectRef.ApplyOnTickIndex == INDEX_NONE)
{
WeaponDamage *= GRAZE_DMG_MULT;
`log("GRAZE! Adjusted damage:" @ WeaponDamage, true, 'XCom_HitRolls');
}
// End Issue #1396

// Start Issue #1299
/// HL-Docs: ref:Bugfixes; issue:1299
Expand Down

0 comments on commit 74a898e

Please sign in to comment.