mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 16:26:25 +00:00
[P3] Fix mistimed sound effect in LearnMovePhase
(#4698)
This commit is contained in:
parent
b76e54fe7f
commit
f51814467a
@ -170,13 +170,16 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
|
|||||||
pokemon.setMove(index, this.moveId);
|
pokemon.setMove(index, this.moveId);
|
||||||
initMoveAnim(this.scene, this.moveId).then(() => {
|
initMoveAnim(this.scene, this.moveId).then(() => {
|
||||||
loadMoveAnimAssets(this.scene, [ this.moveId ], true);
|
loadMoveAnimAssets(this.scene, [ this.moveId ], true);
|
||||||
this.scene.playSound("level_up_fanfare"); // Sound loaded into game as is
|
|
||||||
});
|
});
|
||||||
this.scene.ui.setMode(this.messageMode);
|
this.scene.ui.setMode(this.messageMode);
|
||||||
const learnMoveText = i18next.t("battle:learnMove", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name });
|
const learnMoveText = i18next.t("battle:learnMove", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name });
|
||||||
textMessage = textMessage ? textMessage + "$" + learnMoveText : learnMoveText;
|
if (textMessage) {
|
||||||
await this.scene.ui.showTextPromise(textMessage, this.messageMode === Mode.EVOLUTION_SCENE ? 1000 : undefined, true);
|
await this.scene.ui.showTextPromise(textMessage);
|
||||||
this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeMoveLearnedTrigger, true);
|
}
|
||||||
this.end();
|
this.scene.playSound("level_up_fanfare"); // Sound loaded into game as is
|
||||||
|
this.scene.ui.showText(learnMoveText, null, () => {
|
||||||
|
this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeMoveLearnedTrigger, true);
|
||||||
|
this.end();
|
||||||
|
}, this.messageMode === Mode.EVOLUTION_SCENE ? 1000 : undefined, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user