mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 13:52:18 +02:00
Make iv scanner check against baby form IVs
This commit is contained in:
parent
33f8365192
commit
962cece57a
@ -139,6 +139,13 @@ export abstract class PokemonSpeciesForm {
|
|||||||
this.genderDiffs = genderDiffs;
|
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 {
|
getRootSpeciesId(forStarter: boolean = false): Species {
|
||||||
let ret = this.speciesId;
|
let ret = this.speciesId;
|
||||||
while (pokemonPrevolutions.hasOwnProperty(ret) && (!forStarter || !speciesStarters.hasOwnProperty(ret)))
|
while (pokemonPrevolutions.hasOwnProperty(ret) && (!forStarter || !speciesStarters.hasOwnProperty(ret)))
|
||||||
|
@ -164,7 +164,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
|||||||
if (isFusion)
|
if (isFusion)
|
||||||
this.pokemonFusionShinyIcon.setTint(getVariantTint(pokemon.fusionVariant));
|
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
|
const originalIvs: integer[] = this.scene.gameData.dexData[starterSpeciesId].caughtAttr
|
||||||
? this.scene.gameData.dexData[starterSpeciesId].ivs
|
? this.scene.gameData.dexData[starterSpeciesId].ivs
|
||||||
: null;
|
: null;
|
||||||
|
Loading…
Reference in New Issue
Block a user