fix getEggMoves() helper function
This commit is contained in:
parent
a1d1de2c0d
commit
219215f54c
|
@ -260,6 +260,9 @@ export const GlobalTradeSystemEncounter: MysteryEncounter =
|
|||
if (!tradePokemon.shiny && (!tradePokemon.species.abilityHidden || tradePokemon.abilityIndex < hiddenIndex)) {
|
||||
const eggMoves: Moves[] = tradePokemon.getEggMoves();
|
||||
|
||||
if (eggMoves) {
|
||||
|
||||
}
|
||||
// Cannot gen the rare egg move, only 1 of the first 3 common moves
|
||||
const eggMove = eggMoves[randSeedInt(3)];
|
||||
if (!tradePokemon.moveset.some(m => m?.moveId === eggMove)) {
|
||||
|
|
|
@ -1800,7 +1800,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
* @returns list of egg moves
|
||||
*/
|
||||
getEggMoves() : Moves[] {
|
||||
return speciesEggMoves[this.species.speciesId];
|
||||
return speciesEggMoves[this.getSpeciesForm().getRootSpeciesId(true)];
|
||||
}
|
||||
|
||||
setMove(moveIndex: integer, moveId: Moves): void {
|
||||
|
|
Loading…
Reference in New Issue