Skip to content

Commit

Permalink
Don't override called shots (high) for units with partial cover.
Browse files Browse the repository at this point in the history
  • Loading branch information
neoancient committed Sep 26, 2023
1 parent 5fa6bd8 commit 57ef600
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions megamek/src/megamek/common/actions/WeaponAttackAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -4399,12 +4399,14 @@ private static ToHitData compileTerrainAndLosToHitMods(Game game, Entity ae, Tar
toHit.setCover(LosEffects.COVER_UPPER);
} else {
if (game.getOptions().booleanOption(OptionsConstants.ADVCOMBAT_TACOPS_PARTIAL_COVER)) {
toHit.setHitTable(ToHitData.HIT_PARTIAL_COVER);
toHit.setCover(los.getTargetCover());
} else {
toHit.setHitTable(ToHitData.HIT_PARTIAL_COVER);
toHit.setCover(LosEffects.COVER_HORIZONTAL);
}
// If this is a called shot (high) the table has already been set and should be used instead of partial cover.
if (toHit.getHitTable() != ToHitData.HIT_ABOVE) {
toHit.setHitTable(ToHitData.HIT_PARTIAL_COVER);
}
// Set damageable cover state information
toHit.setDamagableCoverTypePrimary(los.getDamagableCoverTypePrimary());
toHit.setCoverLocPrimary(los.getCoverLocPrimary());
Expand Down

0 comments on commit 57ef600

Please sign in to comment.