[Feature] Make 31IVs show up as Gold (#1380)

* Make 31IVs show as gold on summary & when caught.

* Add comments to change.
This commit is contained in:
HighMans 2024-05-30 18:39:25 -04:00 committed by GitHub
parent 3f6e43a12d
commit af20712cb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -68,7 +68,14 @@ export class StatsContainer extends Phaser.GameObjects.Container {
this.statsIvsCache = ivChartData.slice(0);
this.ivStatValueTexts.map((t: BBCodeText, i: integer) => {
let label = ivs[i].toString();
let label = "";
// Check to see if IVs are 31, if so change the text style to gold, otherwise leave them be.
if (ivs[i] === 31) {
label += `[color=${getTextColor(TextStyle.SUMMARY_GOLD, false, (this.scene as BattleScene).uiTheme)}][shadow]${ivs[i].toString()}[/shadow][/color]`;
} else {
label = ivs[i].toString();
}
if (this.showDiff && originalIvs) {
if (originalIvs[i] < ivs[i]) {
label += ` ([color=${getTextColor(TextStyle.SUMMARY_BLUE, false, (this.scene as BattleScene).uiTheme)}][shadow=${getTextColor(TextStyle.SUMMARY_BLUE, true, (this.scene as BattleScene).uiTheme)}]+${ivs[i] - originalIvs[i]}[/shadow][/color])`;