mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-13 05:15:17 +00:00
27 lines
661 B
TypeScript
27 lines
661 B
TypeScript
import BattleScene from "#app/battle-scene.js";
|
|
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms.js";
|
|
import { SwitchSummonPhase } from "./switch-summon-phase";
|
|
|
|
export class ReturnPhase extends SwitchSummonPhase {
|
|
constructor(scene: BattleScene, fieldIndex: integer) {
|
|
super(scene, fieldIndex, -1, true, false);
|
|
}
|
|
|
|
switchAndSummon(): void {
|
|
this.end();
|
|
}
|
|
|
|
summon(): void { }
|
|
|
|
onEnd(): void {
|
|
const pokemon = this.getPokemon();
|
|
|
|
pokemon.resetTurnData();
|
|
pokemon.resetSummonData();
|
|
|
|
this.scene.updateFieldScale();
|
|
|
|
this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger);
|
|
}
|
|
}
|