mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Simplify change
This commit is contained in:
parent
0fd7d59446
commit
3c9d48d64b
@ -82,14 +82,12 @@ export class FaintPhase extends PokemonPhase {
|
|||||||
* For EXP_SHARE purposes, if the current pokemon faints as the combat ends and it was the ONLY player pokemon
|
* For EXP_SHARE purposes, if the current pokemon faints as the combat ends and it was the ONLY player pokemon
|
||||||
* involved in combat, it needs to be counted as a participant so the other party pokemon can get their EXP,
|
* involved in combat, it needs to be counted as a participant so the other party pokemon can get their EXP,
|
||||||
* so the fainted pokemon has been included.
|
* so the fainted pokemon has been included.
|
||||||
*/
|
*/
|
||||||
globalScene.getPlayerField().forEach((pokemon, i) => {
|
for (const pokemon of globalScene.getPlayerField()) {
|
||||||
if (pokemon?.isActive() || pokemon?.isFainted()) {
|
if (pokemon.isActive() || pokemon.isFainted()) {
|
||||||
if (pokemon.isPlayer()) {
|
globalScene.currentBattle.addParticipant(pokemon);
|
||||||
globalScene.currentBattle.addParticipant(pokemon as PlayerPokemon);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
if (!this.tryOverrideForBattleSpec()) {
|
if (!this.tryOverrideForBattleSpec()) {
|
||||||
this.doFaint();
|
this.doFaint();
|
||||||
|
Loading…
Reference in New Issue
Block a user