mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-18 08:23:12 +00:00
c2ec4d55e4
Add some xmldoc, remove some empty lines, move some small logic pieces to a better spot
30 lines
740 B
C#
30 lines
740 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)
|
|
{
|
|
if (species == (int)Zacian)
|
|
return false;
|
|
if (species == (int)Zamazenta)
|
|
return false;
|
|
if (species == (int)Eternatus)
|
|
return false;
|
|
return true;
|
|
}
|
|
}
|
|
}
|