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

Damage over time effects applied by an attack that grazed are also halved in damage #1396

Open
faanlez opened this issue Oct 11, 2024 · 2 comments

Comments

@faanlez
Copy link

faanlez commented Oct 11, 2024

When using Dragon Rounds or other applied on hit effects their damage gets also halved by a dodge for all ticks of the effects because they remember the hit result being eHit_Graze. This can end up with them doing no damage at all.

X2Effect_ApplyWeaponDamage::CalculateDamageAmount()

else if (ApplyEffectParameters.AbilityResultContext.HitResult == eHit_Graze)
{
	WeaponDamage *= GRAZE_DMG_MULT;
	`log("GRAZE! Adjusted damage:" @ WeaponDamage, true, 'XCom_HitRolls');
}
@Iridar
Copy link
Contributor

Iridar commented Oct 11, 2024

That's pretty gnarly.

@Mitzruti
Copy link
Contributor

it's also true of crits, but generally not noticeable because DoTs are typically not set up with crit damage.

should be possible to gate it behind a (ApplyEffectParameters.EffectRef.ApplyOnTickIndex == INDEX_NONE) check.
(that is, DoT damage will always have a tick index, while directly applied damage effects will not)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants