Fix fusion palette swaps not showing on evolution screen
This commit is contained in:
parent
8ad08edd53
commit
3b72878e47
|
@ -59,9 +59,7 @@ export class EvolutionPhase extends BattlePhase {
|
|||
this.evolutionBgOverlay.setAlpha(0);
|
||||
this.evolutionContainer.add(this.evolutionBgOverlay);
|
||||
|
||||
const getPokemonSprite = () => {
|
||||
return this.scene.add.sprite(this.evolutionBaseBg.displayWidth / 2, this.evolutionBaseBg.displayHeight / 2, `pkmn__sub`);
|
||||
};
|
||||
const getPokemonSprite = () => this.scene.add.sprite(this.evolutionBaseBg.displayWidth / 2, this.evolutionBaseBg.displayHeight / 2, `pkmn__sub`);
|
||||
|
||||
this.evolutionContainer.add((this.pokemonSprite = getPokemonSprite()));
|
||||
this.evolutionContainer.add((this.pokemonTintSprite = getPokemonSprite()));
|
||||
|
@ -82,17 +80,20 @@ export class EvolutionPhase extends BattlePhase {
|
|||
const pokemon = this.scene.getParty()[this.partyMemberIndex];
|
||||
const preName = pokemon.name;
|
||||
|
||||
this.pokemonSprite.play(pokemon.getSpriteKey());
|
||||
this.pokemonTintSprite.play(pokemon.getSpriteKey());
|
||||
this.pokemonEvoSprite.play(pokemon.getSpriteKey());
|
||||
this.pokemonEvoTintSprite.play(pokemon.getSpriteKey());
|
||||
[ this.pokemonSprite, this.pokemonTintSprite, this.pokemonEvoSprite, this.pokemonEvoTintSprite ].map(sprite => {
|
||||
sprite.play(pokemon.getSpriteKey());
|
||||
sprite.setPipeline(this.scene.spritePipeline, { tone: [ 0.0, 0.0, 0.0, 0.0 ], hasShadow: false });
|
||||
[ 'spriteColors', 'fusionSpriteColors' ].map(k => sprite.pipelineData[k] = pokemon.getSprite().pipelineData[k]);
|
||||
});
|
||||
|
||||
this.scene.ui.showText(`What?\n${preName} is evolving!`, null, () => {
|
||||
pokemon.cry();
|
||||
|
||||
pokemon.evolve(this.evolution).then(() => {
|
||||
this.pokemonEvoSprite.play(pokemon.getSpriteKey());
|
||||
this.pokemonEvoTintSprite.play(pokemon.getSpriteKey());
|
||||
[ this.pokemonEvoSprite, this.pokemonEvoTintSprite ].map(sprite => {
|
||||
sprite.play(pokemon.getSpriteKey());
|
||||
[ 'spriteColors', 'fusionSpriteColors' ].map(k => sprite.pipelineData[k] = pokemon.getSprite().pipelineData[k]);
|
||||
});
|
||||
});
|
||||
|
||||
const levelMoves = pokemon.getLevelMoves(this.lastLevel + 1);
|
||||
|
|
|
@ -636,6 +636,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
&& !species.pseudoLegendary
|
||||
&& !species.legendary
|
||||
&& !species.mythical
|
||||
&& species.speciesId !== this.species.speciesId
|
||||
};
|
||||
|
||||
this.fusionSpecies = this.scene.randomSpecies(this.scene.currentBattle?.waveIndex || 0, this.level, false, filter, true);
|
||||
|
|
Loading…
Reference in New Issue