From d8c62b700f41d5568992dce254261d1d682db4ee Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sat, 16 Dec 2023 00:46:01 -0500 Subject: [PATCH] Update Eternatus' moveset --- src/egg-hatch-phase.ts | 21 ++++++++++++++------- src/pokemon.ts | 19 +++++++++++++------ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/egg-hatch-phase.ts b/src/egg-hatch-phase.ts index cead91f9b..9e1b1dd05 100644 --- a/src/egg-hatch-phase.ts +++ b/src/egg-hatch-phase.ts @@ -71,9 +71,8 @@ export class EggHatchPhase extends BattlePhase { this.scene.fieldUI.add(this.eggHatchOverlay); const pokemon = this.generatePokemon(); - const preName = pokemon.name; - console.log(preName, pokemon); + console.log(pokemon.name, pokemon); this.pokemonSprite.setVisible(false); @@ -112,15 +111,23 @@ export class EggHatchPhase extends BattlePhase { this.eggContainer.setVisible(false); this.pokemonSprite.play(pokemon.getSpriteKey(true)); this.pokemonSprite.setVisible(true); - this.scene.time.delayedCall(Utils.fixedInt(1000), () => pokemon.cry()); + this.scene.time.delayedCall(Utils.fixedInt(1000), () => { + pokemon.cry(); + this.scene.time.delayedCall(Utils.fixedInt(1250), () => { + this.scene.playSoundWithoutBgm('evolution_fanfare'); + + this.scene.ui.showText(`${pokemon.name} hatched from the egg!`, null, () => { + this.scene.ui.showText(null, 0); + this.end(); + }, null, true, 3000); + this.scene.time.delayedCall(Utils.fixedInt(4250), () => this.scene.playBgm()); + }); + }); this.scene.tweens.add({ duration: Utils.fixedInt(3000), targets: this.eggHatchOverlay, alpha: 0, - ease: 'Cubic.easeOut', - onComplete: () => { - this.scene.time.delayedCall(1000, () => this.end()); - } + ease: 'Cubic.easeOut' }); }); }); diff --git a/src/pokemon.ts b/src/pokemon.ts index ca9f0785d..f533d021a 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -1853,12 +1853,19 @@ export class EnemyPokemon extends Pokemon { generateAndPopulateMoveset(): void { switch (true) { case (this.species.speciesId === Species.ETERNATUS): - this.moveset = [ - new PokemonMove(Moves.DYNAMAX_CANNON), - new PokemonMove(Moves.CROSS_POISON), - new PokemonMove(Moves.DRAGON_DANCE), - new PokemonMove(Moves.RECOVER) - ]; + this.moveset = this.formIndex + ? [ + new PokemonMove(Moves.DYNAMAX_CANNON), + new PokemonMove(Moves.SLUDGE_BOMB), + new PokemonMove(Moves.FLAMETHROWER), + new PokemonMove(Moves.RECOVER) + ] + : [ + new PokemonMove(Moves.ETERNABEAM), + new PokemonMove(Moves.CROSS_POISON), + new PokemonMove(Moves.DRAGON_DANCE), + new PokemonMove(Moves.RECOVER) + ]; break; default: super.generateAndPopulateMoveset();