From 8f498f1197df29673b25e2f9116589feae59065b Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Fri, 14 Feb 2025 03:03:14 +0100 Subject: [PATCH] Counting default form in caughtAttr for mons that don't have alternative forms --- src/data/pokemon-species.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 8473f7788e3..4349cee2cbf 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -1053,9 +1053,9 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali } // 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); + caughtAttr += this?.forms?.length > 1 ? + this.forms.map((f, index) => f.isUnobtainable ? 0n : 128n * 2n ** BigInt(index)).reduce((acc, val) => acc + val, 0n) : + DexAttr.DEFAULT_FORM; return caughtAttr; }