Skip to content

Commit

Permalink
Merge pull request #5274 from Sleet01/Fix_5273_min_1_damage_on_aero_SI
Browse files Browse the repository at this point in the history
Make SI damage round naturally and have minimum of 1
  • Loading branch information
Sleet01 authored Mar 26, 2024
2 parents f4765b6 + df1dab1 commit b44aefb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions megamek/src/megamek/server/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -22641,14 +22641,10 @@ public Vector<Report> damageEntity(Entity te, HitData hit, int damage,

// divide damage in half
// do not divide by half if it is an ammo explosion
// Minimum SI damage is now 1 (per errata: https://bg.battletech.com/forums/index.php?topic=81913.0 )
if (!ammoExplosion && !nukeS2S
&& !game.getOptions().booleanOption(OptionsConstants.ADVAERORULES_AERO_SANITY)) {
damage /= 2;
}

// this should result in a crit
// but only if it really did damage after rounding down
if (damage > 0) {
damage = (int) Math.round(damage / 2.0);
critSI = true;
}

Expand Down

0 comments on commit b44aefb

Please sign in to comment.