PKHeX/PKHeX.Core/PKM/Shared/IGigantamax.cs

23 lines
677 B
C#
Raw Normal View History

2019-11-16 01:34:18 +00:00
namespace PKHeX.Core
{
2020-06-22 00:46:06 +00:00
/// <summary>
/// Interface that exposes an indication if the Pokémon can Gigantamax.
/// </summary>
2019-11-16 01:34:18 +00:00
public interface IGigantamax
{
2020-06-22 00:46:06 +00:00
/// <summary>
/// Indicates if the Pokémon is capable of Gigantamax as opposed to regular Dynamax.
/// </summary>
2019-11-16 01:34:18 +00:00
bool CanGigantamax { get; set; }
}
public static class GigantamaxExtensions
{
public static bool CanToggleGigantamax(this IGigantamax _, int currentSpecies, int originSpecies)
{
var soup = Legal.CanEatMaxSoup;
return soup.Contains(currentSpecies) || soup.Contains(originSpecies);
}
}
}