From af20712cb52dd78513cab138239163684617c56b Mon Sep 17 00:00:00 2001 From: HighMans <42877729+HighMans@users.noreply.github.com> Date: Thu, 30 May 2024 18:39:25 -0400 Subject: [PATCH] [Feature] Make 31IVs show up as Gold (#1380) * Make 31IVs show as gold on summary & when caught. * Add comments to change. --- src/ui/stats-container.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ui/stats-container.ts b/src/ui/stats-container.ts index 54c10e0d9dc..f5b88773dd8 100644 --- a/src/ui/stats-container.ts +++ b/src/ui/stats-container.ts @@ -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])`;