[QoL] add dynamic default pp color (#2039)

This commit is contained in:
Adrian T 2024-06-10 22:46:08 +08:00 committed by GitHub
parent e29c08ba1f
commit 7d55c165df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -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";
}