[Bug] Allow second mon of a fusion to learn/remember on-evo moves (#1778)
Fixes #520
This commit is contained in:
parent
dce4518b93
commit
395fa6e33d
|
@ -1168,6 +1168,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
if (this.fusionSpecies) {
|
if (this.fusionSpecies) {
|
||||||
const evolutionLevelMoves = levelMoves.slice(0, Math.max(levelMoves.findIndex(lm => !!lm[0]), 0));
|
const evolutionLevelMoves = levelMoves.slice(0, Math.max(levelMoves.findIndex(lm => !!lm[0]), 0));
|
||||||
const fusionLevelMoves = this.getFusionSpeciesForm(true).getLevelMoves();
|
const fusionLevelMoves = this.getFusionSpeciesForm(true).getLevelMoves();
|
||||||
|
const fusionEvolutionLevelMoves = fusionLevelMoves.slice(0, Math.max(fusionLevelMoves.findIndex(flm => !!flm[0]), 0));
|
||||||
const newLevelMoves: LevelMoves = [];
|
const newLevelMoves: LevelMoves = [];
|
||||||
while (levelMoves.length && levelMoves[0][0] < startingLevel) {
|
while (levelMoves.length && levelMoves[0][0] < startingLevel) {
|
||||||
levelMoves.shift();
|
levelMoves.shift();
|
||||||
|
@ -1179,6 +1180,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
for (const elm of evolutionLevelMoves.reverse()) {
|
for (const elm of evolutionLevelMoves.reverse()) {
|
||||||
levelMoves.unshift(elm);
|
levelMoves.unshift(elm);
|
||||||
}
|
}
|
||||||
|
for (const felm of fusionEvolutionLevelMoves.reverse()) {
|
||||||
|
fusionLevelMoves.unshift(felm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (let l = includeEvolutionMoves ? 0 : startingLevel; l <= this.level; l++) {
|
for (let l = includeEvolutionMoves ? 0 : startingLevel; l <= this.level; l++) {
|
||||||
if (l === 1 && startingLevel > 1) {
|
if (l === 1 && startingLevel > 1) {
|
||||||
|
|
Loading…
Reference in New Issue