Introducing catchableStarters in biomes.ts

This commit is contained in:
Wlowscha 2025-01-30 23:47:33 +01:00 committed by GitHub
parent a255e06d82
commit 19bb326644
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -102,6 +102,18 @@ export interface BiomePokemonPools {
[key: integer]: BiomeTierPokemonPools
}
export interface BiomeTierTod {
biome: Biome,
tier: BiomePoolTier,
tod: TimeOfDay[]
}
export interface CatchableSpecies{
[key: integer]: BiomeTierTod[]
}
export const catchableSpecies: CatchableSpecies = {};
export interface BiomeTierTrainerPools {
[key: integer]: TrainerType[]
}
@ -7716,6 +7728,9 @@ export function initBiomes() {
uncatchableSpecies.push(speciesId);
}
// array of biome options for the current species
catchableSpecies[speciesId] = [];
for (const b of biomeEntries) {
const biome = b[0];
const tier = b[1];
@ -7725,6 +7740,12 @@ export function initBiomes() {
: [ b[2] ]
: [ TimeOfDay.ALL ];
catchableSpecies[speciesId].push({
biome: biome as Biome,
tier: tier as BiomePoolTier,
tod: timesOfDay as TimeOfDay[]
});
for (const tod of timesOfDay) {
if (!biomePokemonPools.hasOwnProperty(biome) || !biomePokemonPools[biome].hasOwnProperty(tier) || !biomePokemonPools[biome][tier].hasOwnProperty(tod)) {
continue;