Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check for Tick context to eHit_Crit and eHit-Graze #1443

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading