PKHeX/PKHeX.Core/PKM/Shared/IGigantamax.cs
Kurt 1ae9cb7602 Handle pika/meow soup evolutions
Can lose gmax flag if its current species is able to eat soup, or its origin species could eat soup

this handles stuff like charmander->charizard, as charmeleon would not pass

hopefully there's never a mid-stage evo that has a gmax form, and its final evo doesn't... (don't get any ideas, gamefreak)
2020-06-24 18:59:26 -05:00

22 lines
677 B
C#

namespace PKHeX.Core
{
/// <summary>
/// Interface that exposes an indication if the Pokémon can Gigantamax.
/// </summary>
public interface IGigantamax
{
/// <summary>
/// Indicates if the Pokémon is capable of Gigantamax as opposed to regular Dynamax.
/// </summary>
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);
}
}
}