Refactored to check for other non-root starterDex entities.

pull/881/head
Jon Studders 2024-05-14 23:43:05 +01:00
parent f19baef227
commit 0584ca0a4e
1 changed files with 1 additions and 2 deletions

View File

@ -273,8 +273,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
if ((dexEntry.caughtAttr & dexAttr) < dexAttr || !(pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId()].abilityAttr & Math.pow(2, pokemon.abilityIndex)))
this.ownedIcon.setTint(0x808080);
const starterDataEntry: StarterDataEntry = pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId()];
if(starterDataEntry.classicWinCount > 0) {
if(pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId()].classicWinCount > 0 && pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId(true)].classicWinCount > 0) {
this.championRibbon.setVisible(true);
}