diff --git a/megamek/src/megamek/common/actions/WeaponAttackAction.java b/megamek/src/megamek/common/actions/WeaponAttackAction.java index 19a137259b1..3c21d30a349 100644 --- a/megamek/src/megamek/common/actions/WeaponAttackAction.java +++ b/megamek/src/megamek/common/actions/WeaponAttackAction.java @@ -3835,15 +3835,10 @@ private static ToHitData compileAeroAttackerToHitMods(Game game, Entity ae, Targ if (ae.usesWeaponBays() && wtype != null && weapon != null) { // any heavy lasers - if (wtype.getAtClass() == WeaponType.CLASS_LASER) { - for (WeaponMounted bweap : weapon.getBayWeapons()) { - WeaponType bwtype = bweap.getType(); - if ((bwtype.getInternalName().contains("Heavy")) - && (bwtype.getInternalName().contains("Laser"))) { - toHit.addModifier(+1, Messages.getString("WeaponAttackAction.HeavyLaserInBay")); - break; - } - } + if (wtype.getAtClass() == WeaponType.CLASS_LASER && + weapon.getBayWeapons().stream().anyMatch(bweap -> + bweap.getType().getInternalName().startsWith("CLHeavyLaser"))) { + toHit.addModifier(+1, Messages.getString("WeaponAttackAction.HeavyLaserInBay")); } // barracuda missiles else if (wtype.getAtClass() == WeaponType.CLASS_CAPITAL_MISSILE) {