Add forcedoubles setting

This commit is contained in:
Kurt
2018-11-23 22:19:38 -08:00
parent 15974cd8d8
commit c554e4a984
2 changed files with 12 additions and 1 deletions

View File

@@ -84,6 +84,14 @@ private void SetupTeamCount(VsTrainer tr)
var pinfo = Personal.Table.OrderBy(pk => Math.Abs(avgBST - pk.BST)).First();
int avgSpec = Array.IndexOf(Personal.Table, pinfo);
if (Settings.ForceDoubles && !(special && count % 2 == 1))
{
if (tr.Team.Count % 2 != 0)
tr.Team.Add(GetBlankPKM(avgLevel, avgSpec));
tr.Self.AI |= (int)TrainerAI.Doubles;
tr.Self.Mode = BattleMode.Doubles;
}
if (Settings.ForceSpecialTeamCount6 && special && count == 6)
{
for (int g = tr.Team.Count; g < 6; g++)