mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-21 07:42:25 +02:00
Passing number to getPokemonSpecies
This commit is contained in:
parent
2154f0de52
commit
a90250cd17
@ -2,7 +2,6 @@ import { getPokemonSpecies, getPokemonSpeciesForm } from "#app/data/pokemon-spec
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { DexAttr, type SessionSaveData, type SystemSaveData } from "#app/system/game-data";
|
import { DexAttr, type SessionSaveData, type SystemSaveData } from "#app/system/game-data";
|
||||||
import * as Utils from "#app/utils";
|
import * as Utils from "#app/utils";
|
||||||
import { Species } from "#enums/species";
|
|
||||||
|
|
||||||
export const systemMigrators = [
|
export const systemMigrators = [
|
||||||
/**
|
/**
|
||||||
@ -14,7 +13,7 @@ export const systemMigrators = [
|
|||||||
if (data.starterData && data.dexData) {
|
if (data.starterData && data.dexData) {
|
||||||
Object.keys(data.starterData).forEach(sd => {
|
Object.keys(data.starterData).forEach(sd => {
|
||||||
const caughtAttr = data.dexData[sd]?.caughtAttr;
|
const caughtAttr = data.dexData[sd]?.caughtAttr;
|
||||||
const species = getPokemonSpecies(Species[sd]);
|
const species = getPokemonSpecies(Number(sd));
|
||||||
if (caughtAttr && species.forms?.length > 1) {
|
if (caughtAttr && species.forms?.length > 1) {
|
||||||
const selectableForms = species.forms.filter((form, formIndex) => form.isStarterSelectable && (caughtAttr & globalScene.gameData.getFormAttr(formIndex)));
|
const selectableForms = species.forms.filter((form, formIndex) => form.isStarterSelectable && (caughtAttr & globalScene.gameData.getFormAttr(formIndex)));
|
||||||
if (selectableForms.length === 0) {
|
if (selectableForms.length === 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user