Counting default form in caughtAttr for mons that don't have alternative forms

This commit is contained in:
Wlowscha 2025-02-14 03:03:14 +01:00
parent f68a833fcf
commit 8f498f1197
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04
1 changed files with 3 additions and 3 deletions

View File

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