Showing proper gender for mons that can only be (or have only caught in) one gender

This commit is contained in:
Wlowscha 2025-01-30 01:47:14 +01:00
parent a534399ee4
commit 921af61fcc
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -826,9 +826,8 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
}
if (starterAttributes.female !== undefined) {
if (!(starterAttributes.female ? caughtAttr & DexAttr.FEMALE : caughtAttr & DexAttr.MALE)) {
// requested gender wasn't unlocked, purging setting
starterAttributes.female = true;
if ((starterAttributes.female && !(caughtAttr & DexAttr.FEMALE)) || (!starterAttributes.female && !(caughtAttr & DexAttr.MALE))) {
starterAttributes.female = !starterAttributes.female;
}
}