Fix bug with generating moves before form
This commit is contained in:
parent
40439817ac
commit
e265c1961f
|
@ -3087,14 +3087,14 @@ export class AttemptRunPhase extends PokemonPhase {
|
|||
onComplete: () => enemyField.forEach(enemyPokemon => enemyPokemon.destroy())
|
||||
});
|
||||
|
||||
this.scene.clearEnemyHeldItemModifiers();
|
||||
|
||||
enemyField.forEach(enemyPokemon => {
|
||||
enemyPokemon.hideInfo().then(() => enemyPokemon.destroy());
|
||||
enemyPokemon.hp = 0;
|
||||
enemyPokemon.trySetStatus(StatusEffect.FAINT);
|
||||
});
|
||||
|
||||
this.scene.clearEnemyHeldItemModifiers();
|
||||
|
||||
this.scene.pushPhase(new BattleEndPhase(this.scene));
|
||||
this.scene.pushPhase(new NewBattlePhase(this.scene));
|
||||
} else
|
||||
|
|
|
@ -1423,6 +1423,7 @@ export default class BattleScene extends Phaser.Scene {
|
|||
updatePartyForModifiers(party: Pokemon[], instant?: boolean): Promise<void> {
|
||||
return new Promise(resolve => {
|
||||
Promise.allSettled(party.map(p => {
|
||||
if (p.scene)
|
||||
p.calculateStats();
|
||||
return p.updateInfo(instant);
|
||||
})).then(() => resolve());
|
||||
|
|
|
@ -132,8 +132,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
this.fusionShiny = dataSource.fusionShiny;
|
||||
this.fusionGender = dataSource.fusionGender;
|
||||
} else {
|
||||
this.generateAndPopulateMoveset();
|
||||
|
||||
this.id = Utils.randSeedInt(4294967295);
|
||||
this.ivs = ivs || [
|
||||
Utils.binToDec(Utils.decToBin(this.id).substring(0, 5)),
|
||||
|
@ -167,6 +165,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
|
||||
if (scene.gameMode === GameMode.SPLICED_ENDLESS)
|
||||
this.generateFusionSpecies();
|
||||
|
||||
this.generateAndPopulateMoveset();
|
||||
}
|
||||
|
||||
this.generateName();
|
||||
|
|
Loading…
Reference in New Issue