mirror of
https://github.com/kwsch/pkNX.git
synced 2026-09-13 13:05:17 -05:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user