mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
dcc0e79435
Like move validation, evolutions are the earliest thing we wish to traverse when determining what encounters may have originated the current Pokémon. To determine the permitted species-form-levels a Pokémon could originate with, we must devolve a Pokémon by traveling down-generation to origin. Once we have an encounter, we can then evolve it to the current species, traversing upwards from origin to the current format.
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using System;
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
/// <summary>
|
|
/// Group that checks the source of a move in the games that it represents.
|
|
/// </summary>
|
|
public interface ILearnGroup
|
|
{
|
|
/// <summary>
|
|
/// Gets the maximum move ID that this group can learn.
|
|
/// </summary>
|
|
ushort MaxMoveID { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the next group to traverse to continue checking moves.
|
|
/// </summary>
|
|
ILearnGroup? GetPrevious(PKM pk, EvolutionHistory history, IEncounterTemplate enc, LearnOption option);
|
|
|
|
/// <summary>
|
|
/// Checks if it is plausible that the <see cref="pk"/> has visited this game group.
|
|
/// </summary>
|
|
bool HasVisited(PKM pk, EvolutionHistory history);
|
|
|
|
bool Check(Span<MoveResult> result, ReadOnlySpan<ushort> current, PKM pk, EvolutionHistory history, IEncounterTemplate enc, MoveSourceType types = MoveSourceType.All, LearnOption option = LearnOption.Current);
|
|
|
|
void GetAllMoves(Span<bool> result, PKM pk, EvolutionHistory history, IEncounterTemplate enc, MoveSourceType types = MoveSourceType.All, LearnOption option = LearnOption.Current);
|
|
}
|