From a534399ee46f1b6b6840833334f999dd0bdee56a Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Thu, 30 Jan 2025 00:53:43 +0100 Subject: [PATCH] Uncaught battle forms options are shown in dark text, like evolutions --- src/ui/pokedex-page-ui-handler.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/pokedex-page-ui-handler.ts b/src/ui/pokedex-page-ui-handler.ts index e3ab50452d5..c6e08212ab3 100644 --- a/src/ui/pokedex-page-ui-handler.ts +++ b/src/ui/pokedex-page-ui-handler.ts @@ -1441,15 +1441,18 @@ export default class PokedexPageUiHandler extends MessageUiHandler { } else { conditionText = ""; } - let label: string = this.getFormString(bf.formKey, this.species); if (label === "") { label = this.species.name; } + const matchingForm = this.species?.forms.find(form => form.formKey === bf.formKey); + const newFormIndex = matchingForm ? matchingForm.formIndex : 0; + const isFormCaught = this.isFormCaught(this.species, newFormIndex); if (conditionText) { options.push({ label: label, + style: isFormCaught ? TextStyle.WINDOW : TextStyle.SHADOW_TEXT, handler: () => { const newSpecies = this.species; const newFormIndex = this.species.forms.find(f => f.formKey === bf.formKey)?.formIndex;