mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
increment works properly
This commit is contained in:
parent
f2098c8e9e
commit
4e2f54baa9
@ -1079,15 +1079,12 @@ export class GameData {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
incrementStarterWinCount(species: PokemonSpecies):void {
|
incrementStarterWinCount(species: PokemonSpecies): void {
|
||||||
const speciesWinCount = this.starterData[species.speciesId].winCount;
|
if (!this.starterData[species.speciesId].winCount) {
|
||||||
|
|
||||||
if(Number.isNaN(speciesWinCount)) {
|
|
||||||
this.starterData[species.speciesId].winCount = 0;
|
this.starterData[species.speciesId].winCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.starterData[species.speciesId].winCount++;
|
this.starterData[species.speciesId].winCount++;
|
||||||
console.log(this.starterData[species.speciesId].winCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addStarterCandy(species: PokemonSpecies, count: integer): void {
|
addStarterCandy(species: PokemonSpecies, count: integer): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user