Skip to content

Commit

Permalink
Merge pull request #4945 from MegaMek/bap_woods_cover
Browse files Browse the repository at this point in the history
Don't give active probe advantage to target in woods when using woods cover option.
  • Loading branch information
SJuliez authored Dec 12, 2023
2 parents 04eed42 + 7f650b5 commit 98ad929
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 98ad929

Please sign in to comment.