pokerogue/src/phases/return-phase.ts
innerthunder a6a61b2984
[Move] Implement Shed Tail (#4382)
* 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>
2024-09-25 17:17:46 -07:00

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);
}
}