Nondestructive unit cap enforcement

This commit is contained in:
Anuken
2020-07-22 14:31:44 -04:00
parent b4594b2274
commit 701aa840b3
18 changed files with 86 additions and 15 deletions

View File

@@ -35,6 +35,10 @@ public class Units{
}
public static int getCap(Team team){
//wave team has no cap
if((team == state.rules.waveTeam && state.rules.waves) || (state.isCampaign() && team == state.rules.waveTeam)){
return Integer.MAX_VALUE;
}
return state.rules.unitCap + indexer.getExtraUnits(team);
}