[Bug][Hotfix] Display caught forms in dex as intended #5319

Merge pull request #5319 from Wlowscha/hotfix-show-caught-forms-in-dex
This commit is contained in:
damocleas 2025-02-13 20:43:31 -05:00 committed by GitHub
commit f68a833fcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "pokemon-rogue-battle",
"version": "1.6.0",
"version": "1.6.1",
"lockfileVersion": 3,
"requires": true,
"packages": {

View File

@ -1,7 +1,7 @@
{
"name": "pokemon-rogue-battle",
"private": true,
"version": "1.6.0",
"version": "1.6.1",
"type": "module",
"scripts": {
"start": "vite",

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;
}