Skip to content

Commit

Permalink
fix: Avoid penalizing Improved Heavy Lasers in weapon bays
Browse files Browse the repository at this point in the history
While heavy lasers incur an accuracy penalty, this obviously isn't meant
to apply to improved heavy lasers, which are improved specifically by
avoiding that.

The check has also been made a bit more efficient.
  • Loading branch information
Saklad5 committed Aug 18, 2024
1 parent 0e7ec4b commit 73dbc79
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions megamek/src/megamek/common/actions/WeaponAttackAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -3838,8 +3838,7 @@ private static ToHitData compileAeroAttackerToHitMods(Game game, Entity ae, Targ
if (wtype.getAtClass() == WeaponType.CLASS_LASER) {
for (WeaponMounted bweap : weapon.getBayWeapons()) {
WeaponType bwtype = bweap.getType();
if ((bwtype.getInternalName().contains("Heavy"))
&& (bwtype.getInternalName().contains("Laser"))) {
if (bwtype.getInternalName().startsWith("CLHeavyLaser")) {
toHit.addModifier(+1, Messages.getString("WeaponAttackAction.HeavyLaserInBay"));
break;
}
Expand Down

0 comments on commit 73dbc79

Please sign in to comment.