diff --git a/src/data/move.ts b/src/data/move.ts index c601be76a..24b737854 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 d1095d270..73b9e0d1b 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 c65b6a04d..7b3fca5bd 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 c78c0d730..2ca981a86 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();