Skip to content

Commit

Permalink
[Bug] Prevent Relearnable Egg Moves in Fresh Start
Browse files Browse the repository at this point in the history
  • Loading branch information
xsn34kzx committed Aug 9, 2024
1 parent 762feea commit da14b66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/field/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { getPokemonNameWithAffix } from "#app/messages.js";
import { Challenges } from "#app/enums/challenges";

export enum FieldPosition {
CENTER,
Expand Down Expand Up @@ -922,7 +923,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
*/
getLearnableLevelMoves(): Moves[] {
let levelMoves = this.getLevelMoves(1, true).map(lm => lm[1]);
if (this.metBiome === -1) {
if (this.metBiome === -1 && !this.scene.gameMode.challenges.some(c => c.id === Challenges.FRESH_START)) {
levelMoves = this.getUnlockedEggMoves().concat(levelMoves);
}
return levelMoves.filter(lm => !this.moveset.some(m => m?.moveId === lm));
Expand Down

0 comments on commit da14b66

Please sign in to comment.