From 846ae97f7c75b4fdc0645699d009c1141b25372a Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Wed, 4 Sep 2024 12:55:38 -0700 Subject: [PATCH] add docs for `Pokemon.addToParty()` --- src/field/pokemon.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index d930bead2a7..2da49f296cd 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -4414,6 +4414,12 @@ export class EnemyPokemon extends Pokemon { return BattlerIndex.ENEMY + this.getFieldIndex(); } + /** + * Add a new pokemon to the player's party (at `slotIndex` if set). + * @param pokeballType the type of pokeball the pokemon was caught with + * @param slotIndex an optional index to place the pokemon in the party + * @returns the pokemon that was added or null if the pokemon could not be added + */ addToParty(pokeballType: PokeballType, slotIndex: number = -1) { const party = this.scene.getParty(); let ret: PlayerPokemon | null = null;