Skip to content

Commit

Permalink
Merge pull request #4104 from SJuliez/MASC_Weight_Errata
Browse files Browse the repository at this point in the history
Errata: Minimum 1 crits and 1t weight for Mek MASC
  • Loading branch information
SJuliez authored Jan 14, 2023
2 parents fb45ccc + 9d0754d commit 2eb2476
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions megamek/src/megamek/common/MiscType.java
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ public double getTonnage(Entity entity, int location, double size, RoundWeight d
return defaultRounding.round(e.getWeightEngine(entity, defaultRounding) / 10.0, entity);
}

return RoundWeight.nearestTon(entity.getWeight() * (isClan() ? 0.04 : 0.05));
return Math.max(RoundWeight.nearestTon(entity.getWeight() * (isClan() ? 0.04 : 0.05)), 1);
}
} else if (hasFlag(F_QUAD_TURRET) || hasFlag(F_SHOULDER_TURRET) || hasFlag(F_HEAD_TURRET)) {
// Turrets weight 10% of the weight of equipment in them, not counting Heat Sinks, Ammo and Armor
Expand Down Expand Up @@ -1085,9 +1085,9 @@ public int getCriticals(Entity entity, double size) {
return 1 + (int) Math.ceil(entity.getWeight() / 20.0);
} else if (hasFlag(F_MASC)) {
if (TechConstants.isClan(getTechLevel(entity.getTechLevelYear()))) {
return (int) Math.round(entity.getWeight() / 25.0);
return Math.max((int) Math.round(entity.getWeight() / 25.0), 1);
}
return (int) Math.round(entity.getWeight() / 20.0);
return Math.max((int) Math.round(entity.getWeight() / 20.0), 1);

} else if ((entity instanceof Aero)
&& (hasFlag(F_REACTIVE) || hasFlag(F_REFLECTIVE) || hasFlag(F_ANTI_PENETRATIVE_ABLATIVE)
Expand Down

0 comments on commit 2eb2476

Please sign in to comment.