isFormCaught() now always returns true if the species is caught and has only one or no forms

This commit is contained in:
Wlowscha 2025-03-01 19:54:05 +01:00
parent 9b2f649078
commit cb4b9f33e4
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -784,6 +784,10 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
const formIndex = otherFormIndex !== undefined ? otherFormIndex : this.formIndex;
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;
return isFormCaught;
}