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

Make SI damage round naturally and have minimum of 1 #5274

Merged
merged 1 commit into from
Mar 26, 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
8 changes: 2 additions & 6 deletions megamek/src/megamek/server/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -22627,14 +22627,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
Loading