Fix form matching on prevolution levels logic
parent
dfbbe47f26
commit
c1cce43daf
|
@ -524,7 +524,7 @@ export default class PokemonSpecies extends PokemonSpeciesForm {
|
||||||
const allEvolvingPokemon = Object.keys(pokemonEvolutions);
|
const allEvolvingPokemon = Object.keys(pokemonEvolutions);
|
||||||
for (let p of allEvolvingPokemon) {
|
for (let p of allEvolvingPokemon) {
|
||||||
for (let e of pokemonEvolutions[p]) {
|
for (let e of pokemonEvolutions[p]) {
|
||||||
if (e.speciesId === this.speciesId && !e.evoFormKey) {
|
if (e.speciesId === this.speciesId && (!this.forms.length || e.evoFormKey === this.forms[this.formIndex].formKey)) {
|
||||||
const speciesId = parseInt(p) as Species;
|
const speciesId = parseInt(p) as Species;
|
||||||
let level = e.level;
|
let level = e.level;
|
||||||
prevolutionLevels.push([ speciesId, level ]);
|
prevolutionLevels.push([ speciesId, level ]);
|
||||||
|
|
Loading…
Reference in New Issue