Make iv scanner check against baby form IVs (#1214)
This commit is contained in:
parent
b524be1db1
commit
49c365f154
|
@ -149,6 +149,13 @@ export abstract class PokemonSpeciesForm {
|
|||
this.genderDiffs = genderDiffs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the root species id of a Pokemon.
|
||||
* Magmortar.getRootSpeciesId(true) => Magmar
|
||||
* Magmortar.getRootSpeciesId(false) => Magby
|
||||
* @param forStarter boolean to get the nonbaby form of a starter
|
||||
* @returns The species
|
||||
*/
|
||||
getRootSpeciesId(forStarter: boolean = false): Species {
|
||||
let ret = this.speciesId;
|
||||
while (pokemonPrevolutions.hasOwnProperty(ret) && (!forStarter || !speciesStarters.hasOwnProperty(ret))) {
|
||||
|
|
|
@ -166,7 +166,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
|||
this.pokemonFusionShinyIcon.setTint(getVariantTint(pokemon.fusionVariant));
|
||||
}
|
||||
|
||||
const starterSpeciesId = pokemon.species.getRootSpeciesId(true);
|
||||
const starterSpeciesId = pokemon.species.getRootSpeciesId();
|
||||
const originalIvs: integer[] = this.scene.gameData.dexData[starterSpeciesId].caughtAttr
|
||||
? this.scene.gameData.dexData[starterSpeciesId].ivs
|
||||
: null;
|
||||
|
|
Loading…
Reference in New Issue