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 give active probe advantage to target in woods when using woods cover option. #4945

Merged
merged 1 commit into from
Dec 12, 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
9 changes: 5 additions & 4 deletions megamek/src/megamek/common/actions/WeaponAttackAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -4433,10 +4433,11 @@ private static ToHitData compileTerrainAndLosToHitMods(Game game, Entity ae, Tar
if (game.getOptions().booleanOption(OptionsConstants.ADVANCED_TACOPS_BAP) && !isIndirect && (te != null)
&& ae.hasBAP() && (ae.getBAPRange() >= Compute.effectiveDistance(game, ae, te))
&& !ComputeECM.isAffectedByECM(ae, ae.getPosition(), te.getPosition())
&& (game.getBoard().getHex(te.getPosition()).containsTerrain(Terrains.WOODS)
|| game.getBoard().getHex(te.getPosition()).containsTerrain(Terrains.JUNGLE)
|| (los.getLightWoods() > 0) || (los.getHeavyWoods() > 0) || (los.getUltraWoods() > 0))
|| ae.hasNetworkBAP()) {
&& (!game.getOptions().booleanOption(OptionsConstants.ADVCOMBAT_TACOPS_WOODS_COVER) &&
(game.getBoard().getHex(te.getPosition()).containsTerrain(Terrains.WOODS)
|| game.getBoard().getHex(te.getPosition()).containsTerrain(Terrains.JUNGLE)))
|| (los.getLightWoods() > 0) || (los.getHeavyWoods() > 0) || (los.getUltraWoods() > 0)
|| ae.hasNetworkBAP()) {
if (ae.hasBAP()) {
// If you want the bonus, the entity with the BAP should fire first.
// Not sure how to get around this
Expand Down