mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 13:22:18 +02:00
Bit of refactoring, added check for classic mode.
This commit is contained in:
parent
3872d6fb18
commit
0644ca85b7
@ -270,12 +270,14 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
this.ownedIcon.setVisible(!!dexEntry.caughtAttr);
|
this.ownedIcon.setVisible(!!dexEntry.caughtAttr);
|
||||||
|
|
||||||
const opponentPokemonDexAttr = pokemon.getDexAttr();
|
const opponentPokemonDexAttr = pokemon.getDexAttr();
|
||||||
if ((dexEntry.caughtAttr & opponentPokemonDexAttr) < opponentPokemonDexAttr || !(pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId()].abilityAttr & Math.pow(2, pokemon.abilityIndex))) {
|
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) {
|
||||||
if (!dexEntry.caughtAttr) {
|
if (!dexEntry.caughtAttr) {
|
||||||
this.championRibbon.setPositionRelative(this.nameText, 0, 11.75);
|
this.championRibbon.setPositionRelative(this.nameText, 0, 11.75);
|
||||||
}
|
}
|
||||||
this.championRibbon.setVisible(true);
|
this.championRibbon.setVisible(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check if Player owns all genders and forms of the Pokemon
|
// Check if Player owns all genders and forms of the Pokemon
|
||||||
const missingDexAttrs = ((dexEntry.caughtAttr & opponentPokemonDexAttr) < opponentPokemonDexAttr);
|
const missingDexAttrs = ((dexEntry.caughtAttr & opponentPokemonDexAttr) < opponentPokemonDexAttr);
|
||||||
@ -294,13 +296,6 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
if (missingDexAttrs || !rootFormHasHiddenAbility)
|
if (missingDexAttrs || !rootFormHasHiddenAbility)
|
||||||
this.ownedIcon.setTint(0x808080);
|
this.ownedIcon.setTint(0x808080);
|
||||||
|
|
||||||
if(pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId()].classicWinCount > 0 && pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId(true)].classicWinCount > 0) {
|
|
||||||
if (!dexEntry.caughtAttr) {
|
|
||||||
this.championRibbon.setPositionRelative(this.nameText, 0, 11.75);
|
|
||||||
}
|
|
||||||
this.championRibbon.setVisible(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.boss)
|
if (this.boss)
|
||||||
this.updateBossSegmentDividers(pokemon as EnemyPokemon);
|
this.updateBossSegmentDividers(pokemon as EnemyPokemon);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user