Max Soup ban now checks for mythicals instead of array (#4017)

* Removed sGigantaxFactorLockedSpecies to instead check for mythicals

* Applied review comments

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
This commit is contained in:
Eduardo Quezada D'Ottone 2024-01-17 13:08:34 -03:00 committed by GitHub
parent 1f9655ee2b
commit b20be66175
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -308,16 +308,9 @@ void HasGigantamaxFactor(struct ScriptContext *ctx)
gSpecialVar_Result = FALSE;
}
static const u16 sGigantaxFactorLockedSpecies[] =
{
SPECIES_MELMETAL,
};
void ToggleGigantamaxFactor(struct ScriptContext *ctx)
{
u32 i;
u32 partyIndex = VarGet(ScriptReadHalfword(ctx));
u32 species;
gSpecialVar_Result = FALSE;
@ -325,12 +318,8 @@ void ToggleGigantamaxFactor(struct ScriptContext *ctx)
{
bool32 gigantamaxFactor;
species = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPECIES);
for (i = 0; i < ARRAY_COUNT(sGigantaxFactorLockedSpecies); i++)
{
if (species == sGigantaxFactorLockedSpecies[i])
return;
}
if (gSpeciesInfo[SanitizeSpeciesId(GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPECIES))].isMythical)
return;
gigantamaxFactor = GetMonData(&gPlayerParty[partyIndex], MON_DATA_GIGANTAMAX_FACTOR);
gigantamaxFactor = !gigantamaxFactor;