Add banlist and form randomization to evo randomizer

Previously, no forms would be adjusted, so something like Milcery could evolve into Charmander-8 (invalid)
This commit is contained in:
sora10pls
2020-06-10 23:33:54 -04:00
parent ab047dda48
commit cfb1593ca7
2 changed files with 18 additions and 3 deletions

View File

@@ -9,11 +9,13 @@ public class EvolutionRandomizer : Randomizer
{
private readonly EvolutionSet[] Evolutions;
private readonly GameInfo Game;
private readonly PersonalTable Personal;
public readonly SpeciesRandomizer Randomizer;
public EvolutionRandomizer(GameInfo game, EvolutionSet[] evolutions, PersonalTable t)
{
Game = game;
Personal = t;
Evolutions = evolutions;
Randomizer = new SpeciesRandomizer(Game, t);
}
@@ -43,6 +45,7 @@ private void Randomize(EvolutionSet evos, int species)
if (evo.Method != 0)
{
evo.Species = Randomizer.GetRandomSpecies(evo.Species, species);
evo.Form = Legal.GetRandomForme(evo.Species, false, true, Game.SWSH, Personal);
}
}
}