mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-29 11:42:21 +02:00
Introducing catchableStarters in biomes.ts
This commit is contained in:
parent
a255e06d82
commit
19bb326644
@ -102,6 +102,18 @@ export interface BiomePokemonPools {
|
|||||||
[key: integer]: BiomeTierPokemonPools
|
[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 {
|
export interface BiomeTierTrainerPools {
|
||||||
[key: integer]: TrainerType[]
|
[key: integer]: TrainerType[]
|
||||||
}
|
}
|
||||||
@ -7716,6 +7728,9 @@ export function initBiomes() {
|
|||||||
uncatchableSpecies.push(speciesId);
|
uncatchableSpecies.push(speciesId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// array of biome options for the current species
|
||||||
|
catchableSpecies[speciesId] = [];
|
||||||
|
|
||||||
for (const b of biomeEntries) {
|
for (const b of biomeEntries) {
|
||||||
const biome = b[0];
|
const biome = b[0];
|
||||||
const tier = b[1];
|
const tier = b[1];
|
||||||
@ -7725,6 +7740,12 @@ export function initBiomes() {
|
|||||||
: [ b[2] ]
|
: [ b[2] ]
|
||||||
: [ TimeOfDay.ALL ];
|
: [ TimeOfDay.ALL ];
|
||||||
|
|
||||||
|
catchableSpecies[speciesId].push({
|
||||||
|
biome: biome as Biome,
|
||||||
|
tier: tier as BiomePoolTier,
|
||||||
|
tod: timesOfDay as TimeOfDay[]
|
||||||
|
});
|
||||||
|
|
||||||
for (const tod of timesOfDay) {
|
for (const tod of timesOfDay) {
|
||||||
if (!biomePokemonPools.hasOwnProperty(biome) || !biomePokemonPools[biome].hasOwnProperty(tier) || !biomePokemonPools[biome][tier].hasOwnProperty(tod)) {
|
if (!biomePokemonPools.hasOwnProperty(biome) || !biomePokemonPools[biome].hasOwnProperty(tier) || !biomePokemonPools[biome][tier].hasOwnProperty(tod)) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user