Skip to content

Commit

Permalink
Add a check for MEs on the X1 wave
Browse files Browse the repository at this point in the history
This allows capture on the X2 wave instead
  • Loading branch information
DayKev committed Sep 19, 2024
1 parent b0c9fbe commit d381734
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/data/challenge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -929,15 +929,16 @@ export class NoStarterLegendsChallenge extends Challenge {
}
}

// TODO: Check for ME compatibility
/** Challenge that only allows the first pokemon of every 10 waves to be caught */
export class LimitedCatchChallenge extends Challenge {
constructor() {
super(Challenges.LIMITED_CATCH, 1);
}

override applyAddPokemonToParty(pokemon: EnemyPokemon, waveIndex: number, canAddToParty: BooleanHolder): boolean {
canAddToParty.value = waveIndex % 10 === 1;
if (!(waveIndex % 10 === 1) && !(pokemon.scene.lastMysteryEncounter && (waveIndex % 10 === 2))) {
canAddToParty.value = false;
}
return true;
}

Expand Down

0 comments on commit d381734

Please sign in to comment.