From d8fce8b245a2bd51830157d5c72677fae619c4de Mon Sep 17 00:00:00 2001 From: Felix Staud Date: Fri, 12 Jul 2024 12:56:51 -0700 Subject: [PATCH] add `Pokemon.getEggMoves()` --- src/field/pokemon.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 08119931084..e32b5303dc7 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1319,6 +1319,15 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return ret; } + /** + * Get a list of all egg moves + * + * @returns list of egg moves + */ + getEggMoves() : Moves[] { + return speciesEggMoves[this.species.speciesId]; + } + setMove(moveIndex: integer, moveId: Moves): void { const move = moveId ? new PokemonMove(moveId) : null; this.moveset[moveIndex] = move;