Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't override called shots (high) for units with partial cover. #4805

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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