Skip to content

Commit

Permalink
Merge pull request #5044 from IllianiCBT/atb_StratConIntensity
Browse files Browse the repository at this point in the history
Add Check for StratCon Usage in `getAtBBattleChance` Method
  • Loading branch information
HammerGS authored Oct 14, 2024
2 parents 397e0d9 + 73f6669 commit c3f731b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion MekHQ/src/mekhq/campaign/CampaignOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -4465,9 +4465,13 @@ public void setPlayerControlsAttachedUnits(final boolean playerControlsAttachedU

/**
* @param role the {@link AtBLanceRole} to get the battle chance for
* @return the chance of having a battle for the specified role
* @return the chance of having a battle for the specified role, or {@code 0} if StratCon is enabled
*/
public int getAtBBattleChance(final AtBLanceRole role) {
if (useStratCon) {
return 0;
}

return role.isUnassigned() ? 0 : atbBattleChance[role.ordinal()];
}

Expand Down

0 comments on commit c3f731b

Please sign in to comment.