mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-23 10:53:10 +00:00
36dd5ece21
Co-Authored-By: sciresm <sciresm@users.noreply.github.com> Co-Authored-By: Matt <sora10pls@users.noreply.github.com> Co-Authored-By: Archit Date <architdate@gmail.com>
22 lines
527 B
C#
22 lines
527 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;
|
|
var species = pkm.Species;
|
|
if ((int)Zacian <= species && species <= (int)Eternatus)
|
|
return false;
|
|
return true;
|
|
}
|
|
}
|
|
}
|