mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 14:30:56 +00:00
1ae9cb7602
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)
22 lines
677 B
C#
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);
|
|
}
|
|
}
|
|
}
|