Teach secondary Pokemon moveset when after fusing

pull/16/head
Flashfyre 2024-02-28 12:36:27 -05:00
parent d5eb20d842
commit 532a27016b
1 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,7 @@ import { initMoveAnim, loadMoveAnimAssets } from './data/battle-anims';
import { Status, StatusEffect } from './data/status-effect'; import { Status, StatusEffect } from './data/status-effect';
import { reverseCompatibleTms, tmSpecies } from './data/tms'; import { reverseCompatibleTms, tmSpecies } from './data/tms';
import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEvolutionCondition } from './data/pokemon-evolutions'; import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEvolutionCondition } from './data/pokemon-evolutions';
import { DamagePhase, FaintPhase, StatChangePhase, SwitchSummonPhase } from './phases'; import { DamagePhase, FaintPhase, LearnMovePhase, StatChangePhase, SwitchSummonPhase } from './phases';
import { BattleStat } from './data/battle-stat'; import { BattleStat } from './data/battle-stat';
import { BattlerTag, BattlerTagLapseType, EncoreTag, TypeBoostTag, getBattlerTag } from './data/battler-tags'; import { BattlerTag, BattlerTagLapseType, EncoreTag, TypeBoostTag, getBattlerTag } from './data/battler-tags';
import { BattlerTagType } from "./data/enums/battler-tag-type"; import { BattlerTagType } from "./data/enums/battler-tag-type";
@ -2065,6 +2065,7 @@ export class PlayerPokemon extends Pokemon {
this.generateName(); this.generateName();
this.calculateStats(); this.calculateStats();
this.generateCompatibleTms(); this.generateCompatibleTms();
pokemon.getMoveset(true).map(m => this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.scene.getParty().indexOf(this), m.getMove().id)));
this.updateInfo(true).then(() => { this.updateInfo(true).then(() => {
const fusedPartyMemberIndex = this.scene.getParty().indexOf(pokemon); const fusedPartyMemberIndex = this.scene.getParty().indexOf(pokemon);
const fusedPartyMemberHeldModifiers = this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier const fusedPartyMemberHeldModifiers = this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier