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:
parent
1f9655ee2b
commit
b20be66175
1 changed files with 2 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue