[Bug][UI/UX] Fix bug in Pokédex for Mothim and other niche cases (#5458)

This commit is contained in:
Wlowscha 2025-03-01 22:24:15 +01:00 committed by GitHub
parent 8f280bec49
commit b50d2c0783
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -789,6 +789,10 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
const formIndex = otherFormIndex !== undefined ? otherFormIndex : this.formIndex; const formIndex = otherFormIndex !== undefined ? otherFormIndex : this.formIndex;
const caughtAttr = this.isCaught(species); const caughtAttr = this.isCaught(species);
if (caughtAttr && (!species.forms.length || species.forms.length === 1)) {
return true;
}
const isFormCaught = (caughtAttr & globalScene.gameData.getFormAttr(formIndex ?? 0)) > 0n; const isFormCaught = (caughtAttr & globalScene.gameData.getFormAttr(formIndex ?? 0)) > 0n;
return isFormCaught; return isFormCaught;
} }