Add more logic for trainers (WiP) and various changes
Add WiP logic for trainer Pokemon pools and biome trainer pools; add more music tracks; fix issue with implementation of Mimic move
This commit is contained in:
1 parent
5d5c8318fd
commit
6d73d71608
66 files changed
+4313
-191
No files matched your search
@@ -5,6 +5,7 @@ import { SpeciesWildEvolutionDelay, pokemonEvolutions, pokemonPrevolutions } fro
|
||||
import { Species } from './species';
|
||||
import { Type } from './type';
|
||||
import * as Utils from '../utils';
|
||||
import { TrainerType, trainerConfigs } from './trainer-type';
|
||||
|
||||
export function getPokemonSpecies(species: Species): PokemonSpecies {
|
||||
if (species >= Species.XERNEAS)
|
||||
@@ -12,6 +13,8 @@ export function getPokemonSpecies(species: Species): PokemonSpecies {
|
||||
return allSpecies[species - 1];
|
||||
}
|
||||
|
||||
export type PokemonSpeciesFilter = (species: PokemonSpecies) => boolean;
|
||||
|
||||
export abstract class PokemonSpeciesForm {
|
||||
public speciesId: Species;
|
||||
public formIndex: integer;
|
||||
@@ -272,7 +275,7 @@ export default class PokemonSpecies extends PokemonSpeciesForm {
|
||||
|
||||
for (let weight of evolutionPool.keys()) {
|
||||
if (randValue < weight)
|
||||
return evolutionPool.get(weight);
|
||||
return getPokemonSpecies(evolutionPool.get(weight)).getSpeciesForLevel(level, true);
|
||||
}
|
||||
|
||||
return this.speciesId;
|
||||
@@ -344,7 +347,7 @@ class PokemonForm extends PokemonSpeciesForm {
|
||||
}
|
||||
}
|
||||
|
||||
export const allSpecies = [];
|
||||
export const allSpecies: PokemonSpecies[] = [];
|
||||
|
||||
export function initSpecies() {
|
||||
allSpecies.push(
|
||||
@@ -1102,4 +1105,17 @@ export function initSpecies() {
|
||||
new PokemonSpecies(Species.YVELTAL, "Yveltal", 6, false, true, false, "Destruction Pokémon", Type.DARK, Type.FLYING, 5.8, 203, Abilities.DARK_AURA, Abilities.NONE, Abilities.NONE, 680, 126, 131, 95, 131, 98, 99, 45, 0, 306, GrowthRate.SLOW, "Undiscovered", null, null, 120, false),
|
||||
new PokemonSpecies(Species.ETERNATUS, 'Eternatus', 8, false, true, false, 'Gigantic Pokemon', Type.POISON, Type.DRAGON, 20, 950, Abilities.PRESSURE, Abilities.NONE, Abilities.NONE, 690, 140, 85, 95, 145, 95, 130, 255, 0, 345, GrowthRate.SLOW, "Undiscovered", null, null, 120, false, false)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Remove
|
||||
/*{
|
||||
setTimeout(() => {
|
||||
for (let tc of Object.keys(trainerConfigs)) {
|
||||
console.log(TrainerType[tc], !trainerConfigs[tc].speciesFilter ? 'all' : [...new Set(allSpecies.slice(0, -1).filter(trainerConfigs[tc].speciesFilter).map(s => {
|
||||
while (pokemonPrevolutions.hasOwnProperty(s.speciesId))
|
||||
s = getPokemonSpecies(pokemonPrevolutions[s.speciesId]);
|
||||
return s;
|
||||
}))].map(s => s.name));
|
||||
}
|
||||
}, 1000);
|
||||
}*/
|
||||
Reference in new issue
Block a user