[P2] No Exp Gained after Switching in a Pokemon as the Opponent Faints (#4687)
* fixing the exp bug * fixing the exp bug * dont think need to reset turn data there * changing a little bit * Update src/phases/faint-phase.ts Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> --------- Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
This commit is contained in:
parent
afe6d2900d
commit
15dedf06ed
|
@ -65,6 +65,15 @@ export class FaintPhase extends PokemonPhase {
|
|||
}
|
||||
}
|
||||
|
||||
/** In case the current pokemon was just switched in, make sure it is counted as participating in the combat */
|
||||
this.scene.getPlayerField().forEach((pokemon, i) => {
|
||||
if (pokemon?.isActive(true)) {
|
||||
if (pokemon.isPlayer()) {
|
||||
this.scene.currentBattle.addParticipant(pokemon as PlayerPokemon);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (!this.tryOverrideForBattleSpec()) {
|
||||
this.doFaint();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue