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

Prevent rupture bonus damage from being added to attack that don't deal damage #1344

Merged
merged 1 commit into from
May 6, 2024
Merged
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 @@ -967,13 +967,18 @@ simulated function int CalculateDamageAmount(const out EffectAppliedData ApplyEf
/// Remove the cap from the amount of bonus damage that can be added to an attack by rupture, and do not add rupture added by this attack to the attack's damage.
//RuptureAmount = min(kTarget.GetRupturedValue() + NewRupture, RuptureCap);
RuptureAmount = kTarget.GetRupturedValue();
// End Issue #1299

if (RuptureAmount != 0)
// While Rupture Cap is removed, we still want to add bonus damage from rupture only if the attack deals damage,
// as that was part of of the original functionality of the Rupture Cap.
if (WeaponDamage > 0)
{
WeaponDamage += RuptureAmount;
`log("Target is ruptured, increases damage by" @ RuptureAmount $", new damage:" @ WeaponDamage, true, 'XCom_HitRolls');
if (RuptureAmount != 0)
{
WeaponDamage += RuptureAmount;
`log("Target is ruptured, increases damage by" @ RuptureAmount $", new damage:" @ WeaponDamage, true, 'XCom_HitRolls');
}
}
// End Issue #1299

if( kSourceUnit != none)
{
Expand Down
Loading