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

Prevent Battle Armor allocation in TORNADO_F4 wind scenarios #4934

Merged
merged 2 commits into from
Oct 2, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@

import static java.lang.Math.round;
import static megamek.client.ratgenerator.MissionRole.CIVILIAN;
import static megamek.common.planetaryconditions.Wind.TORNADO_F4;
import static mekhq.campaign.mission.Scenario.T_GROUND;
import static mekhq.campaign.mission.ScenarioForceTemplate.SPECIAL_UNIT_TYPE_ATB_CIVILIANS;
import static mekhq.campaign.mission.ScenarioForceTemplate.SPECIAL_UNIT_TYPE_ATB_MIX;
Expand Down Expand Up @@ -829,7 +830,8 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac
}

// There is no point in adding extra Battle Armor to non-ground scenarios
if (scenario.getBoardType() == T_GROUND) {
// Similarly, there is no point adding Battle Armor to scenarios they cannot survive in.
if (scenario.getBoardType() == T_GROUND && scenario.getWind() != TORNADO_F4) {
// We want to purposefully exclude off-board artillery, to stop them being
// assigned random units of Battle Armor.
// If we ever implement the ability to move those units on-board, or for players
Expand Down