Fix some bugs and add factory bg
This commit is contained in:
1 parent
7e0974a6c2
commit
105b5cd510
12 files changed
+28
-22
No files matched your search
+12
-18
@@ -738,26 +738,17 @@ export class TurnInitPhase extends FieldPhase {
|
||||
start() {
|
||||
super.start();
|
||||
|
||||
this.scene.getPlayerField().forEach(playerPokemon => {
|
||||
if (playerPokemon.isActive())
|
||||
this.scene.currentBattle.addParticipant(playerPokemon);
|
||||
this.scene.getField().forEach((pokemon, i) => {
|
||||
if (pokemon?.isActive()) {
|
||||
if (pokemon.isPlayer())
|
||||
this.scene.currentBattle.addParticipant(pokemon as PlayerPokemon);
|
||||
|
||||
playerPokemon.resetTurnData();
|
||||
pokemon.resetTurnData();
|
||||
|
||||
this.scene.pushPhase(pokemon.isPlayer() ? new CommandPhase(this.scene, i) : new EnemyCommandPhase(this.scene, i - BattlerIndex.ENEMY));
|
||||
}
|
||||
});
|
||||
|
||||
this.scene.getEnemyField().forEach(enemyPokemon => {
|
||||
if (enemyPokemon.isActive())
|
||||
enemyPokemon.resetTurnData()
|
||||
});
|
||||
|
||||
const order = this.getOrder();
|
||||
for (let o of order) {
|
||||
if (o < BattlerIndex.ENEMY)
|
||||
this.scene.pushPhase(new CommandPhase(this.scene, o));
|
||||
else
|
||||
this.scene.pushPhase(new EnemyCommandPhase(this.scene, o - BattlerIndex.ENEMY));
|
||||
}
|
||||
|
||||
this.scene.pushPhase(new TurnStartPhase(this.scene));
|
||||
|
||||
this.end();
|
||||
@@ -2392,7 +2383,10 @@ export class AttemptRunPhase extends PokemonPhase {
|
||||
ease: 'Sine.easeIn'
|
||||
});
|
||||
|
||||
enemyField.forEach(enemyPokemon => enemyPokemon.hp = 0);
|
||||
enemyField.forEach(enemyPokemon => {
|
||||
enemyPokemon.hideInfo();
|
||||
enemyPokemon.hp = 0;
|
||||
});
|
||||
|
||||
this.scene.pushPhase(new BattleEndPhase(this.scene));
|
||||
this.scene.pushPhase(new NewBattlePhase(this.scene));
|
||||
|
||||
Reference in new issue
Block a user