mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
recursively check for prevolution
This commit is contained in:
parent
4e2f54baa9
commit
ed6e53df3d
@ -1080,6 +1080,13 @@ export class GameData {
|
||||
}
|
||||
|
||||
incrementStarterWinCount(species: PokemonSpecies): void {
|
||||
const hasPrevolution = pokemonPrevolutions.hasOwnProperty(species.speciesId);
|
||||
|
||||
if (hasPrevolution) {
|
||||
this.incrementStarterWinCount(getPokemonSpecies(pokemonPrevolutions[species.speciesId]));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.starterData[species.speciesId].winCount) {
|
||||
this.starterData[species.speciesId].winCount = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user