diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index 1aebce7f457..16e23a105f8 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -35,6 +35,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container { private nameText: Phaser.GameObjects.Text; private genderText: Phaser.GameObjects.Text; private ownedIcon: Phaser.GameObjects.Sprite; + private championRibbon: Phaser.GameObjects.Sprite; private teraIcon: Phaser.GameObjects.Sprite; private shinyIcon: Phaser.GameObjects.Sprite; private fusionShinyIcon: Phaser.GameObjects.Sprite; @@ -96,6 +97,12 @@ export default class BattleInfo extends Phaser.GameObjects.Container { this.ownedIcon.setOrigin(0, 0); this.ownedIcon.setPositionRelative(this.nameText, 0, 11.75); this.add(this.ownedIcon); + + this.championRibbon = this.scene.add.sprite(0, 0, "champion_ribbon"); + this.championRibbon.setVisible(false); + this.championRibbon.setOrigin(0, 0); + this.championRibbon.setPositionRelative(this.nameText, 11.75, 11.75); + this.add(this.championRibbon); } this.teraIcon = this.scene.add.sprite(0, 0, "icon_tera"); @@ -266,6 +273,11 @@ export default class BattleInfo extends Phaser.GameObjects.Container { const dexEntry = pokemon.scene.gameData.dexData[pokemon.species.speciesId]; this.ownedIcon.setVisible(!!dexEntry.caughtAttr); const opponentPokemonDexAttr = pokemon.getDexAttr(); + if (pokemon.scene.gameMode.isClassic) { + if(pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId()].classicWinCount > 0 && pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId(true)].classicWinCount > 0) { + this.championRibbon.setVisible(true); + } + } // Check if Player owns all genders and forms of the Pokemon const missingDexAttrs = ((dexEntry.caughtAttr & opponentPokemonDexAttr) < opponentPokemonDexAttr);