mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-16 17:27:41 +00:00
cleanup EnemyPokemon shiny initialization
This commit is contained in:
parent
4bc3e6e49c
commit
5ba47c7fb1
@ -4561,7 +4561,7 @@ export class EnemyPokemon extends Pokemon {
|
|||||||
|
|
||||||
constructor(scene: BattleScene, species: PokemonSpecies, level: integer, trainerSlot: TrainerSlot, boss: boolean, shinyLock: boolean = false, dataSource?: PokemonData) {
|
constructor(scene: BattleScene, species: PokemonSpecies, level: integer, trainerSlot: TrainerSlot, boss: boolean, shinyLock: boolean = false, dataSource?: PokemonData) {
|
||||||
super(scene, 236, 84, species, level, dataSource?.abilityIndex, dataSource?.formIndex, dataSource?.gender,
|
super(scene, 236, 84, species, level, dataSource?.abilityIndex, dataSource?.formIndex, dataSource?.gender,
|
||||||
shinyLock ? false : (dataSource ? dataSource.shiny : false), shinyLock ? undefined : (dataSource ? dataSource.variant : undefined),
|
(!shinyLock && dataSource) ? dataSource.shiny : false, (!shinyLock && dataSource) ? dataSource.variant : undefined,
|
||||||
undefined, dataSource ? dataSource.nature : undefined, dataSource);
|
undefined, dataSource ? dataSource.nature : undefined, dataSource);
|
||||||
|
|
||||||
this.trainerSlot = trainerSlot;
|
this.trainerSlot = trainerSlot;
|
||||||
@ -4591,12 +4591,15 @@ export class EnemyPokemon extends Pokemon {
|
|||||||
if (!dataSource) {
|
if (!dataSource) {
|
||||||
this.generateAndPopulateMoveset();
|
this.generateAndPopulateMoveset();
|
||||||
|
|
||||||
this.trySetShiny();
|
if (shinyLock || Overrides.OPP_SHINY_OVERRIDE === false) {
|
||||||
if (Overrides.OPP_SHINY_OVERRIDE) {
|
this.shiny = false;
|
||||||
|
} else {
|
||||||
|
this.trySetShiny();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.shiny && Overrides.OPP_SHINY_OVERRIDE) {
|
||||||
this.shiny = true;
|
this.shiny = true;
|
||||||
this.initShinySparkle();
|
this.initShinySparkle();
|
||||||
} else if (Overrides.OPP_SHINY_OVERRIDE === false) {
|
|
||||||
this.shiny = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.shiny) {
|
if (this.shiny) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user