mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Fix function name, this return all valid moves after evolving, not only the exclusive moves
This commit is contained in:
parent
710b126f60
commit
263f416edc
2 changed files with 4 additions and 4 deletions
|
@ -3204,7 +3204,7 @@ namespace PKHeX.Core
|
|||
if (EncounterMatch == null && pkm.WasEgg && Legal.BabyEvolutionWithMove.Contains(pkm.Species) && !IncenseMovesLearned.Any() && !EggMovesSplitLearned[0].Any())
|
||||
return;
|
||||
|
||||
var ValidMoves = Legal.getExclusivePostEvolutionMoves(pkm, pkm.Species, EvoChainsAllGens, GameVersion.Any);
|
||||
var ValidMoves = Legal.getValidPostEvolutionMoves(pkm, pkm.Species, EvoChainsAllGens, GameVersion.Any);
|
||||
// Add the evolution moves to valid moves in case some of this moves could not be learned after evolving
|
||||
switch(pkm.Species)
|
||||
{
|
||||
|
|
|
@ -1168,18 +1168,18 @@ namespace PKHeX.Core
|
|||
}
|
||||
return new int[0];
|
||||
}
|
||||
internal static List<int> getExclusivePostEvolutionMoves(PKM pkm, int Species, DexLevel[][] evoChains, GameVersion Version)
|
||||
internal static List<int> getValidPostEvolutionMoves(PKM pkm, int Species, DexLevel[][] evoChains, GameVersion Version)
|
||||
{
|
||||
// Return moves that the pokemon could learn after evolving
|
||||
var moves = new List<int>();
|
||||
for (int i = 1; i < evoChains.Length; i++)
|
||||
if (evoChains[i].Any())
|
||||
moves.AddRange(getExclusivePostEvolutionMoves(pkm, Species, evoChains[i], i, Version));
|
||||
moves.AddRange(getValidPostEvolutionMoves(pkm, Species, evoChains[i], i, Version));
|
||||
if (pkm.GenNumber >= 6)
|
||||
moves.AddRange(pkm.RelearnMoves.Where(m => m != 0));
|
||||
return moves.Distinct().ToList();
|
||||
}
|
||||
internal static IEnumerable<int> getExclusivePostEvolutionMoves(PKM pkm, int Species, DexLevel[] evoChain, int Generation, GameVersion Version)
|
||||
internal static IEnumerable<int> getValidPostEvolutionMoves(PKM pkm, int Species, DexLevel[] evoChain, int Generation, GameVersion Version)
|
||||
{
|
||||
var evomoves = new List<int>();
|
||||
var index = Array.FindIndex(evoChain, e => e.Species == Species);
|
||||
|
|
Loading…
Add table
Reference in a new issue