diff --git a/pkNX.Randomization/Randomizers/TrainerRandSettings.cs b/pkNX.Randomization/Randomizers/TrainerRandSettings.cs index 41560393..feaa9d22 100644 --- a/pkNX.Randomization/Randomizers/TrainerRandSettings.cs +++ b/pkNX.Randomization/Randomizers/TrainerRandSettings.cs @@ -25,9 +25,12 @@ public class TrainerRandSettings [Category(General), Description("Force special strong battles to have a full team of 6 Pokémon.")] public bool ForceSpecialTeamCount6 { get; set; } = true; + + [Category(General), Description("Force all battles to be a Double Battle with an even (not odd) amount of Pokémon.")] + public bool ForceDoubles { get; set; } #endregion - #region General + #region Classes [Category(Classes), Description("Change Trainer Class to another random Trainer Class.")] public bool RandomTrainerClass { get; set; } = false; diff --git a/pkNX.Randomization/Randomizers/TrainerRandomizer.cs b/pkNX.Randomization/Randomizers/TrainerRandomizer.cs index 6d0c0216..9044fc59 100644 --- a/pkNX.Randomization/Randomizers/TrainerRandomizer.cs +++ b/pkNX.Randomization/Randomizers/TrainerRandomizer.cs @@ -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++)