PKHeX/PKHeX.Core/PKM/Shared/IDynamaxLevel.cs

25 lines
584 B
C#
Raw Normal View History

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)
{
2021-01-05 01:31:43 +00:00
return species is not ((int)Zacian or (int)Zamazenta or (int)Eternatus);
}
}
}