diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index f738fba5573..0ed3671ad18 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -179,6 +179,18 @@ export default class FightUiHandler extends UiHandler { const pp = maxPP - pokemonMove.ppUsed; this.ppText.setText(`${Utils.padInt(pp, 2, " ")}/${Utils.padInt(maxPP, 2, " ")}`); + const ppPercentLeft = pp / maxPP; + let ppColor = "white"; + if (ppPercentLeft <= 0.5) { + ppColor = "yellow"; + } + if (ppPercentLeft <= 0.25) { + ppColor = "orange"; + } + if (pp === 0) { + ppColor = "red"; + } + this.ppText.setColor(ppColor); this.powerText.setText(`${power >= 0 ? power : "---"}`); this.accuracyText.setText(`${accuracy >= 0 ? accuracy : "---"}`);