mirror of
https://github.com/kwsch/pkNX.git
synced 2026-04-05 08:55:16 -05:00
Add forcedoubles setting
This commit is contained in:
parent
15974cd8d8
commit
c554e4a984
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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++)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user