Add AllowRandomFusions to Trainer Randomizer Settings

Move BattleExclusiveForms outside of Tables7 since it'll be used for every Generation, and update it with Gen 8 species.
Also fix FormRandomizer allowing Zen/Galarian Zen Darmanitan.
This commit is contained in:
sora10pls
2020-07-01 15:16:03 -04:00
parent cd29f974e7
commit caf9e635b4
10 changed files with 66 additions and 71 deletions

View File

@@ -162,7 +162,7 @@ private void RandomizeSpecFormItem(IPokeData pk, int Type)
else // every other pkm
{
pk.Species = RandSpec.GetRandomSpeciesType(pk.Species, Type);
pk.Form = RandForm.GetRandomForme(pk.Species, Settings.AllowRandomMegaForms, true, true, Personal.Table);
pk.Form = RandForm.GetRandomForme(pk.Species, Settings.AllowRandomMegaForms, Settings.AllowRandomFusions, true, true, Personal.Table);
}
}
@@ -181,7 +181,7 @@ private void RandomizeSpecForm(TrainerPoke7b pk, int type)
else
{
pk.Species = RandSpec.GetRandomSpeciesType(pk.Species, type);
pk.Form = RandForm.GetRandomForme(pk.Species, Settings.AllowRandomMegaForms, true, false, Personal.Table);
pk.Form = RandForm.GetRandomForme(pk.Species, Settings.AllowRandomMegaForms, Settings.AllowRandomFusions, true, false, Personal.Table);
}
}
@@ -255,7 +255,7 @@ private void UpdatePKMFromSettings(TrainerPoke pk)
return;
c.Species = AllowedGigantamaxes[Util.Random.Next(AllowedGigantamaxes.Length)];
c.Form = c.Species == (int)Species.Pikachu || c.Species == (int)Species.Meowth ? 0 : RandForm.GetRandomForme(c.Species, false, false, false, Personal.Table); // Pikachu & Meowth altforms can't gmax
c.Form = c.Species == (int)Species.Pikachu || c.Species == (int)Species.Meowth ? 0 : RandForm.GetRandomForme(c.Species, false, false, false, false, Personal.Table); // Pikachu & Meowth altforms can't gmax
}
if (Settings.MaxDynamaxLevel && c.CanDynamax)
c.DynamaxLevel = 10;