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())
|
onComplete: () => enemyField.forEach(enemyPokemon => enemyPokemon.destroy())
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.scene.clearEnemyHeldItemModifiers();
|
||||||
|
|
||||||
enemyField.forEach(enemyPokemon => {
|
enemyField.forEach(enemyPokemon => {
|
||||||
enemyPokemon.hideInfo().then(() => enemyPokemon.destroy());
|
enemyPokemon.hideInfo().then(() => enemyPokemon.destroy());
|
||||||
enemyPokemon.hp = 0;
|
enemyPokemon.hp = 0;
|
||||||
enemyPokemon.trySetStatus(StatusEffect.FAINT);
|
enemyPokemon.trySetStatus(StatusEffect.FAINT);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.scene.clearEnemyHeldItemModifiers();
|
|
||||||
|
|
||||||
this.scene.pushPhase(new BattleEndPhase(this.scene));
|
this.scene.pushPhase(new BattleEndPhase(this.scene));
|
||||||
this.scene.pushPhase(new NewBattlePhase(this.scene));
|
this.scene.pushPhase(new NewBattlePhase(this.scene));
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -1423,7 +1423,8 @@ export default class BattleScene extends Phaser.Scene {
|
||||||
updatePartyForModifiers(party: Pokemon[], instant?: boolean): Promise<void> {
|
updatePartyForModifiers(party: Pokemon[], instant?: boolean): Promise<void> {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
Promise.allSettled(party.map(p => {
|
Promise.allSettled(party.map(p => {
|
||||||
p.calculateStats();
|
if (p.scene)
|
||||||
|
p.calculateStats();
|
||||||
return p.updateInfo(instant);
|
return p.updateInfo(instant);
|
||||||
})).then(() => resolve());
|
})).then(() => resolve());
|
||||||
});
|
});
|
||||||
|
|
|
@ -132,8 +132,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
this.fusionShiny = dataSource.fusionShiny;
|
this.fusionShiny = dataSource.fusionShiny;
|
||||||
this.fusionGender = dataSource.fusionGender;
|
this.fusionGender = dataSource.fusionGender;
|
||||||
} else {
|
} else {
|
||||||
this.generateAndPopulateMoveset();
|
|
||||||
|
|
||||||
this.id = Utils.randSeedInt(4294967295);
|
this.id = Utils.randSeedInt(4294967295);
|
||||||
this.ivs = ivs || [
|
this.ivs = ivs || [
|
||||||
Utils.binToDec(Utils.decToBin(this.id).substring(0, 5)),
|
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)
|
if (scene.gameMode === GameMode.SPLICED_ENDLESS)
|
||||||
this.generateFusionSpecies();
|
this.generateFusionSpecies();
|
||||||
|
|
||||||
|
this.generateAndPopulateMoveset();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.generateName();
|
this.generateName();
|
||||||
|
|
Loading…
Reference in New Issue