using System; using System.Diagnostics.CodeAnalysis; namespace PKHeX.Core; /// /// Exposes information about how moves are learned in game. /// public interface ILearnSource { /// /// Yields an iterable list of all potential moves that an can learn from this . /// /// Result storage for flags /// Entity reference /// Details about the state of the entity /// Types of move sources to iterate public void GetAllMoves(Span result, PKM pk, EvoCriteria evo, MoveSourceType types = MoveSourceType.All); /// /// Gets the learnset for the given and . /// /// Entity species /// Entity form public Learnset GetLearnset(ushort species, byte form); } /// /// Exposes information about how moves are learned in game based on the game's . /// public interface ILearnSource : ILearnSource where T : PersonalInfo { /// /// Checks if the can learn the requested while existing as . /// /// Entity reference /// Entity game stats /// Details about the state of the entity /// Move ID to check /// Types of move sources to iterate /// Option to check if it can be currently known, or previously known. /// Details about how the move can be learned. Will be equivalent to default if cannot learn. public MoveLearnInfo GetCanLearn(PKM pk, T pi, EvoCriteria evo, ushort move, MoveSourceType types = MoveSourceType.All, LearnOption option = LearnOption.Current); /// /// Gets the for the given and . /// /// Entity species /// Entity form /// Result value /// True if the reference is a valid entity reference. public bool TryGetPersonal(ushort species, byte form, [NotNullWhen(true)] out T? pi); }