[Misc] Update comment in src/utils/pokemon-utils.ts

This commit is contained in:
NightKev 2025-09-28 22:06:58 -07:00
parent 3d69fc3b30
commit 6c8130db54

View File

@ -18,7 +18,8 @@ export function getPokemonSpecies(species: SpeciesId | SpeciesId[]): PokemonSpec
species = species[Math.floor(Math.random() * species.length)];
}
if (species >= 2000) {
return allSpecies.find(s => s.speciesId === species)!; // TODO: is this bang correct?
// the `!` is safe, `allSpecies` is static and contains all `SpeciesId`s
return allSpecies.find(s => s.speciesId === species)!;
}
return allSpecies[species - 1];
}