mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 16:32:16 +02:00
Fix iv scanner only doing color for the right pokemon in double fight
This commit is contained in:
parent
edd5966be8
commit
0133fc4485
@ -210,7 +210,7 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
|
|||||||
} else
|
} else
|
||||||
shownStats = stats;
|
shownStats = stats;
|
||||||
for (let s of stats)
|
for (let s of stats)
|
||||||
levelUpStatsValuesText += `${shownStats.indexOf(s) > -1 ? this.getIvDescriptor(ivs[s], s) : '???'}\n`;
|
levelUpStatsValuesText += `${shownStats.indexOf(s) > -1 ? this.getIvDescriptor(ivs[s], s, pokemonId) : '???'}\n`;
|
||||||
this.levelUpStatsValuesContent.text = levelUpStatsValuesText;
|
this.levelUpStatsValuesContent.text = levelUpStatsValuesText;
|
||||||
this.levelUpStatsIncrContent.setVisible(false);
|
this.levelUpStatsIncrContent.setVisible(false);
|
||||||
this.levelUpStatsContainer.setVisible(true);
|
this.levelUpStatsContainer.setVisible(true);
|
||||||
@ -223,8 +223,8 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getIvDescriptor(value: integer, typeIv: integer): string {
|
getIvDescriptor(value: integer, typeIv: integer, pokemonId: integer): string {
|
||||||
const starterSpecies = this.scene.getEnemyPokemon().species.getRootSpeciesId(true);
|
const starterSpecies = this.scene.getPokemonById(pokemonId).species.getRootSpeciesId(true);
|
||||||
const starterIvs: number[] = this.scene.gameData.dexData[starterSpecies].ivs;
|
const starterIvs: number[] = this.scene.gameData.dexData[starterSpecies].ivs;
|
||||||
const uiTheme = (this.scene as BattleScene).uiTheme; // Assuming uiTheme is accessible
|
const uiTheme = (this.scene as BattleScene).uiTheme; // Assuming uiTheme is accessible
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user