Skip to content

Commit

Permalink
Merge pull request #6298 from psikomonkie/issue-6273-flak-can-make-ai…
Browse files Browse the repository at this point in the history
…med-shot-against-immobile

Issue 6273: Prevent flak from making aimed shots on immobile targets
  • Loading branch information
HammerGS authored Dec 22, 2024
2 parents 73ee61b + 317b175 commit aabb973
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion megamek/src/megamek/common/actions/WeaponAttackAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -4427,7 +4427,11 @@ else if ((atype != null)
if ((null != te) && !te.isAirborne() && !te.isSpaceborne() && (te instanceof Dropship)) {
immobileMod = new ToHitData(-4, Messages.getString("WeaponAttackAction.ImmobileDs"));
} else {
immobileMod = Compute.getImmobileMod(target, aimingAt, aimingMode);
if(Compute.allowAimedShotWith(weapon, aimingMode)) {
immobileMod = Compute.getImmobileMod(target, aimingAt, aimingMode);
} else {
immobileMod = Compute.getImmobileMod(target, aimingAt, AimingMode.NONE);
}
}

if (immobileMod != null) {
Expand Down

0 comments on commit aabb973

Please sign in to comment.