Add evolution tracker check tests (#4771)
This commit is contained in:
parent
000f144465
commit
416519220d
1 changed files with 44 additions and 0 deletions
|
@ -85,3 +85,47 @@ TEST("Form change targets have the appropriate species flags")
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST("No species has two evolutions that use the evolution tracker")
|
||||
{
|
||||
u32 i;
|
||||
u32 species = SPECIES_NONE;
|
||||
u32 evolutionTrackerEvolutions;
|
||||
bool32 hasGenderBasedRecoil;
|
||||
const struct Evolution *evolutions;
|
||||
|
||||
for (i = 0; i < NUM_SPECIES; i++)
|
||||
{
|
||||
if (GetSpeciesEvolutions(i) != NULL) PARAMETRIZE { species = i; }
|
||||
}
|
||||
|
||||
evolutionTrackerEvolutions = 0;
|
||||
hasGenderBasedRecoil = FALSE;
|
||||
evolutions = GetSpeciesEvolutions(species);
|
||||
|
||||
for (i = 0; evolutions[i].method != EVOLUTIONS_END; i++)
|
||||
{
|
||||
if (evolutions[i].method == EVO_LEVEL_MOVE_TWENTY_TIMES
|
||||
#ifdef EVO_DEFEAT_WITH_ITEM
|
||||
|| evolutions[i].method == EVO_DEFEAT_WITH_ITEM
|
||||
#endif //EVO_DEFEAT_WITH_ITEM
|
||||
#ifdef EVO_OVERWORLD_STEPS
|
||||
|| evolutions[i].method == EVO_OVERWORLD_STEPS
|
||||
#endif //EVO_OVERWORLD_STEPS
|
||||
)
|
||||
evolutionTrackerEvolutions++;
|
||||
|
||||
if (evolutions[i].method == EVO_LEVEL_RECOIL_DAMAGE_MALE
|
||||
|| evolutions[i].method == EVO_LEVEL_RECOIL_DAMAGE_FEMALE)
|
||||
{
|
||||
// Special handling for these since they can be combined as the evolution tracker field is used for the same purpose
|
||||
if (!hasGenderBasedRecoil)
|
||||
{
|
||||
hasGenderBasedRecoil = TRUE;
|
||||
evolutionTrackerEvolutions++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EXPECT(evolutionTrackerEvolutions < 2);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue