namespace PKHeX.Core;
using static LearnMethod;
///
/// Indicates the method of learning a move
///
public enum LearnMethod : byte
{
// Invalid
None,
Duplicate,
EmptyInvalid,
Unobtainable,
UnobtainableExpect,
// Valid
Empty,
Initial,
LevelUp,
TMHM,
Tutor,
Sketch,
Special,
Shared,
ShedinjaEvo,
// Relearn
Relearn,
// Egg
EggMove,
InheritLevelUp,
SpecialEgg,
}
///
/// Extension methods for .
///
public static class LearnMethodExtensions
{
///
/// Checks if the is a valid method of learning a move.
///
/// Method to check
/// True if the method is valid, false otherwise.
public static bool IsValid(this LearnMethod method) => method >= Empty;
///
/// Checks if the is expecting another move instead.
///
/// Method to check
/// True if the method is valid, false otherwise.
public static bool HasExpectedMove(this LearnMethod method) => method is UnobtainableExpect;
///
/// Checks if the is valid because of it being a Relearn move.
///
/// Method to check
/// True if the method is valid, false otherwise.
public static bool IsRelearn(this LearnMethod method) => method is Relearn;
///
/// Checks if the is valid because of it being an egg move.
///
/// Method to check
/// True if the method is valid, false otherwise.
public static bool IsEggSource(this LearnMethod method) => method is EggMove or InheritLevelUp or SpecialEgg;
}