diff --git a/src/data/move.ts b/src/data/move.ts index c601be76a3f..24b737854d7 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1699,7 +1699,7 @@ export class EndureAttr extends ProtectAttr { export class IgnoreAccuracyAttr extends AddBattlerTagAttr { constructor() { - super(BattlerTagType.IGNORE_ACCURACY, true, false, 1); + super(BattlerTagType.IGNORE_ACCURACY, true, false, 2); } apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { diff --git a/src/evolution-phase.ts b/src/evolution-phase.ts index d1095d2703b..73b9e0d1b96 100644 --- a/src/evolution-phase.ts +++ b/src/evolution-phase.ts @@ -207,7 +207,7 @@ export class EvolutionPhase extends Phase { this.pokemon.evolve(this.evolution).then(() => { const levelMoves = this.pokemon.getLevelMoves(this.lastLevel + 1, true); for (let lm of levelMoves) - this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.scene.getParty().indexOf(this.pokemon), lm)); + this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.scene.getParty().indexOf(this.pokemon), lm[1])); this.scene.unshiftPhase(new EndEvolutionPhase(this.scene)); this.scene.playSound('shine'); diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index c65b6a04d97..7b3fca5bdc2 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -619,7 +619,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } getLearnableLevelMoves(): Moves[] { - return this.getLevelMoves(1, true).filter(lm => !this.moveset.filter(m => m.moveId === lm).length).filter((move: Moves, i: integer, array: Moves[]) => array.indexOf(move) === i); + return this.getLevelMoves(1, true).map(lm => lm[1]).filter(lm => !this.moveset.filter(m => m.moveId === lm).length).filter((move: Moves, i: integer, array: Moves[]) => array.indexOf(move) === i); } getTypes(includeTeraType = false, ignoreOverride?: boolean): Type[] { @@ -755,11 +755,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return null; } - getLevelMoves(startingLevel?: integer, includeEvolutionMoves?: boolean): Moves[] { - const ret: Moves[] = []; + getLevelMoves(startingLevel?: integer, includeEvolutionMoves?: boolean): LevelMoves { + const ret: LevelMoves = []; let levelMoves = this.getSpeciesForm().getLevelMoves(); if (!startingLevel) - startingLevel = this.level; + startingLevel = this.level; if (this.fusionSpecies) { const evolutionLevelMoves = levelMoves.slice(0, Math.max(levelMoves.findIndex(lm => !!lm[0]), 0)); const fusionLevelMoves = this.getFusionSpeciesForm().getLevelMoves(); @@ -795,7 +795,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { continue; else if (level > this.level) break; - ret.push(lm[1]); + ret.push(lm); } } @@ -884,7 +884,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { generateAndPopulateMoveset(): void { this.moveset = []; const movePool = []; - const allLevelMoves = this.getSpeciesForm().getLevelMoves(); + const allLevelMoves = this.getLevelMoves(1); if (!allLevelMoves) { console.log(this.species.speciesId, 'ERROR') return; diff --git a/src/phases.ts b/src/phases.ts index c78c0d7306f..2ca981a8649 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -3166,7 +3166,7 @@ export class LevelUpPhase extends PlayerPartyMemberPokemonPhase { if (this.level <= 100) { const levelMoves = this.getPokemon().getLevelMoves(this.lastLevel + 1); for (let lm of levelMoves) - this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.partyMemberIndex, lm)); + this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.partyMemberIndex, lm[1])); } if (!pokemon.pauseEvolutions) { const evolution = pokemon.getEvolution();