Show convergent evolution to Gholdengo in HGSS dex (#7934)
This commit is contained in:
parent
14710eba04
commit
994dcc62a0
@ -6313,6 +6313,17 @@ static void HandlePreEvolutionSpeciesPrint(u8 taskId, u16 preSpecies, u16 specie
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool32 HasTwoPreEvolutions(u32 species)
|
||||||
|
{
|
||||||
|
switch (species)
|
||||||
|
{
|
||||||
|
case SPECIES_GHOLDENGO:
|
||||||
|
return TRUE;
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static u8 PrintPreEvolutions(u8 taskId, u16 species)
|
static u8 PrintPreEvolutions(u8 taskId, u16 species)
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
@ -6364,13 +6375,39 @@ static u8 PrintPreEvolutions(u8 taskId, u16 species)
|
|||||||
{
|
{
|
||||||
if (evolutions[j].targetSpecies == species)
|
if (evolutions[j].targetSpecies == species)
|
||||||
{
|
{
|
||||||
preEvolutionOne = i;
|
if (numPreEvolutions == 0)
|
||||||
numPreEvolutions += 1;
|
{
|
||||||
break;
|
preEvolutionOne = i;
|
||||||
|
numPreEvolutions += 1;
|
||||||
|
if (!HasTwoPreEvolutions(species))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
preEvolutionTwo = i;
|
||||||
|
numPreEvolutions += 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (HasTwoPreEvolutions(species))
|
||||||
|
{
|
||||||
|
CreateCaughtBallEvolutionScreen(preEvolutionOne, base_x - 9, base_y + base_y_offset*0, 0);
|
||||||
|
HandlePreEvolutionSpeciesPrint(taskId, preEvolutionOne, species, base_x, base_y, base_y_offset, 0);
|
||||||
|
|
||||||
|
CreateCaughtBallEvolutionScreen(preEvolutionTwo, base_x - 9, base_y + base_y_offset*(numPreEvolutions - 1), 0);
|
||||||
|
HandlePreEvolutionSpeciesPrint(taskId, preEvolutionTwo, species, base_x, base_y, base_y_offset, numPreEvolutions - 1);
|
||||||
|
|
||||||
|
sPokedexView->sEvoScreenData.targetSpecies[0] = preEvolutionOne;
|
||||||
|
sPokedexView->sEvoScreenData.targetSpecies[1] = preEvolutionTwo;
|
||||||
|
|
||||||
|
sPokedexView->numPreEvolutions = numPreEvolutions;
|
||||||
|
sPokedexView->sEvoScreenData.numAllEvolutions += numPreEvolutions;
|
||||||
|
return numPreEvolutions;
|
||||||
|
}
|
||||||
|
|
||||||
//Calculate if previous evolution also has a previous evolution
|
//Calculate if previous evolution also has a previous evolution
|
||||||
if (numPreEvolutions != 0)
|
if (numPreEvolutions != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user