mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-29 19:52:27 +02:00
Uncaught battle forms options are shown in dark text, like evolutions
This commit is contained in:
parent
e0c2343827
commit
a534399ee4
@ -1441,15 +1441,18 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
} else {
|
} else {
|
||||||
conditionText = "";
|
conditionText = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
let label: string = this.getFormString(bf.formKey, this.species);
|
let label: string = this.getFormString(bf.formKey, this.species);
|
||||||
if (label === "") {
|
if (label === "") {
|
||||||
label = this.species.name;
|
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) {
|
if (conditionText) {
|
||||||
options.push({
|
options.push({
|
||||||
label: label,
|
label: label,
|
||||||
|
style: isFormCaught ? TextStyle.WINDOW : TextStyle.SHADOW_TEXT,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
const newSpecies = this.species;
|
const newSpecies = this.species;
|
||||||
const newFormIndex = this.species.forms.find(f => f.formKey === bf.formKey)?.formIndex;
|
const newFormIndex = this.species.forms.find(f => f.formKey === bf.formKey)?.formIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user