Fix incorrect resetSprite timing

This commit is contained in:
innerthunder 2024-09-11 21:48:44 -07:00
parent 1ed1380781
commit 67249b75e2
3 changed files with 5 additions and 5 deletions

View File

@ -3584,6 +3584,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
* info container. * info container.
*/ */
leaveField(clearEffects: boolean = true, hideInfo: boolean = true) { leaveField(clearEffects: boolean = true, hideInfo: boolean = true) {
this.resetSprite();
this.resetTurnData(); this.resetTurnData();
if (clearEffects) { if (clearEffects) {
this.resetSummonData(); this.resetSummonData();
@ -3592,7 +3593,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
if (hideInfo) { if (hideInfo) {
this.hideInfo(); this.hideInfo();
} }
this.resetSprite();
this.scene.field.remove(this); this.scene.field.remove(this);
this.scene.triggerPokemonFormChange(this, SpeciesFormChangeActiveTrigger, true); this.scene.triggerPokemonFormChange(this, SpeciesFormChangeActiveTrigger, true);
} }

View File

@ -16,9 +16,9 @@ export class ReturnPhase extends SwitchSummonPhase {
onEnd(): void { onEnd(): void {
const pokemon = this.getPokemon(); const pokemon = this.getPokemon();
pokemon.resetSprite();
pokemon.resetTurnData(); pokemon.resetTurnData();
pokemon.resetSummonData(); pokemon.resetSummonData();
pokemon.resetSprite();
this.scene.updateFieldScale(); this.scene.updateFieldScale();