mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 08:46:55 +00:00
Wild spliced Pokemon generate shared movesets
This commit is contained in:
parent
1f67e2d870
commit
32f4d69041
@ -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 {
|
||||
|
@ -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');
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user