Fixed erroneous species and item checks for Dynamax

This commit is contained in:
Eduardo Quezada 2023-10-10 09:00:59 -03:00
parent 0a84072ad2
commit ed2d28b244

View File

@ -124,13 +124,13 @@ bool32 CanDynamax(u16 battlerId)
return FALSE;
// Check if species isn't allowed to Dynamax.
if (species == SPECIES_ZACIAN && species == SPECIES_ZACIAN_CROWNED_SWORD
&& species == SPECIES_ZAMAZENTA && species == SPECIES_ZAMAZENTA_CROWNED_SHIELD
&& species == SPECIES_ETERNATUS && species == SPECIES_ETERNATUS_ETERNAMAX)
if (GET_BASE_SPECIES_ID(species) == SPECIES_ZACIAN
|| GET_BASE_SPECIES_ID(species) == SPECIES_ZAMAZENTA
|| GET_BASE_SPECIES_ID(species) == SPECIES_ETERNATUS)
return FALSE;
// Cannot Dynamax if you can Mega Evolve or use a Z-Move
if (holdEffect == HOLD_EFFECT_MEGA_STONE && holdEffect == HOLD_EFFECT_Z_CRYSTAL)
if (holdEffect == HOLD_EFFECT_MEGA_STONE || holdEffect == HOLD_EFFECT_Z_CRYSTAL)
return FALSE;
// Cannot Dynamax if your side has already or will Dynamax.