getFullUnlockedData now properly accounts for forms

This commit is contained in:
Wlowscha 2025-02-14 02:13:28 +01:00
parent 1b16825a50
commit 5ad8f18950
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04
1 changed files with 5 additions and 1 deletions

View File

@ -1051,7 +1051,11 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali
caughtAttr += DexAttr.VARIANT_2;
caughtAttr += DexAttr.VARIANT_3;
}
caughtAttr += DexAttr.DEFAULT_FORM;
// Summing successive bigints for each obtainable form
caughtAttr += this.forms
.map((f, index) => f.isUnobtainable ? 0n : 128n * 2n ** BigInt(index))
.reduce((acc, val) => acc + val, 0n);
return caughtAttr;
}