From 7d55c165df99656ec2f53677d67470b196819c24 Mon Sep 17 00:00:00 2001 From: Adrian T <68144167+torranx@users.noreply.github.com> Date: Mon, 10 Jun 2024 22:46:08 +0800 Subject: [PATCH] [QoL] add dynamic default pp color (#2039) --- src/ui/fight-ui-handler.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 0ed3671ad18..7ca20bdb78d 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -10,6 +10,7 @@ import { MoveCategory } from "#app/data/move.js"; import i18next from "../plugins/i18n"; import {Button} from "../enums/buttons"; import Pokemon, { PokemonMove } from "#app/field/pokemon.js"; +import { UiTheme } from "#app/enums/ui-theme.js"; export default class FightUiHandler extends UiHandler { private movesContainer: Phaser.GameObjects.Container; @@ -180,7 +181,9 @@ export default class FightUiHandler extends UiHandler { this.ppText.setText(`${Utils.padInt(pp, 2, " ")}/${Utils.padInt(maxPP, 2, " ")}`); const ppPercentLeft = pp / maxPP; - let ppColor = "white"; + + let ppColor = this.scene.uiTheme === UiTheme.DEFAULT ? "white" : "black"; + if (ppPercentLeft <= 0.5) { ppColor = "yellow"; }