Skip to content

Commit 25dd0c4

Browse files
authored
Merge pull request #7236 from IllianiBird/factionOverhaulFixedFailingTests
Fix: Fixed Failing Tests Following Faction Data Overhaul
2 parents 818fe2a + 22d2b54 commit 25dd0c4

File tree

6 files changed

+415
-271
lines changed

6 files changed

+415
-271
lines changed

MekHQ/src/mekhq/campaign/force/CombatTeam.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ public static int getStandardForceSize(Faction faction) {
109109
}
110110

111111
/**
112-
* Determines the standard size for a given faction. The size varies depending on whether the faction is a Clan,
113-
* ComStar/WoB, or others (Inner Sphere).
112+
* Determines the standard size for a given faction. The size varies depending on whether the faction is
113+
* ComStar/WoB, or others (Inner Sphere, Clan, etc).
114114
*
115115
* @param faction The {@link Faction} object for which the standard force size is to be calculated.
116116
* @param formationLevelDepth The {@link FormationLevel} {@code Depth} from which the standard force size is to be
@@ -119,11 +119,10 @@ public static int getStandardForceSize(Faction faction) {
119119
* @return The standard force size, at the provided formation level, for the provided faction
120120
*/
121121
public static int getStandardForceSize(Faction faction, int formationLevelDepth) {
122-
int formationSize = faction.getFormationBaseSize();
123-
for (int i = 1; i <= formationLevelDepth; i++) {
124-
formationSize *= faction.getFormationGrouping();
125-
}
126-
return formationSize;
122+
int multiplier = faction.isComStar() ? 6 : 3;
123+
int base = faction.getFormationBaseSize();
124+
125+
return (int) (base * Math.pow(multiplier, formationLevelDepth));
127126
}
128127

129128
/**

0 commit comments

Comments
 (0)