2
0
Fork 0
mirror of https://github.com/kwsch/PKHeX synced 2024-12-29 05:43:12 +00:00
PKHeX/PKHeX.Core/PKM/Shared/IDynamaxLevel.cs
2021-01-04 17:31:43 -08:00

24 lines
584 B
C#

using static PKHeX.Core.Species;
namespace PKHeX.Core
{
public interface IDynamaxLevel
{
byte DynamaxLevel { get; set; }
}
public static class DynamaxLevelExtensions
{
public static bool CanHaveDynamaxLevel(this IDynamaxLevel _, PKM pkm)
{
if (pkm.IsEgg)
return false;
return CanHaveDynamaxLevel(pkm.Species);
}
private static bool CanHaveDynamaxLevel(int species)
{
return species is not ((int)Zacian or (int)Zamazenta or (int)Eternatus);
}
}
}