mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-10-24 05:55:56 +02:00
* Implement Shed Tail * Fix leftover batonPass reference in docs * Fix ChillyReceptionAttr * oops * Remove unneeded default arg in ReturnPhase * Fix imports per Kev's suggestions Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Docs and Shed Tail on-add message * Remove mixin attribute * Update battler-tags.json * Update battler-tags.json * Update battler-tags.json * Update battler-tags.json * Update battler-tags.json * Update battler-tags.json * Update battler-tags.json * Update battler-tags.json * Update battler-tags.json * Update battler-tags.json * Fix indents * More nit fixes * Make Switch[Summon]Phase params readonly --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: Lugiad <adrien.grivel@hotmail.fr> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
29 lines
743 B
TypeScript
29 lines
743 B
TypeScript
import BattleScene from "#app/battle-scene";
|
|
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms";
|
|
import { SwitchType } from "#enums/switch-type";
|
|
import { SwitchSummonPhase } from "./switch-summon-phase";
|
|
|
|
export class ReturnPhase extends SwitchSummonPhase {
|
|
constructor(scene: BattleScene, fieldIndex: integer) {
|
|
super(scene, SwitchType.SWITCH, fieldIndex, -1, true);
|
|
}
|
|
|
|
switchAndSummon(): void {
|
|
this.end();
|
|
}
|
|
|
|
summon(): void { }
|
|
|
|
onEnd(): void {
|
|
const pokemon = this.getPokemon();
|
|
|
|
pokemon.resetSprite();
|
|
pokemon.resetTurnData();
|
|
pokemon.resetSummonData();
|
|
|
|
this.scene.updateFieldScale();
|
|
|
|
this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger);
|
|
}
|
|
}
|