mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 06:19:29 +02:00
Apply suggestions from code review
This commit is contained in:
parent
6dcf53cbd1
commit
46a9ad1732
@ -5976,7 +5976,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find indices of off-field Pokemon that are eligible to be switched into
|
// Find indices of off-field Pokemon that are eligible to be switched into
|
||||||
const eligibleNewIndices = [] as number[];
|
const eligibleNewIndices: number[] = [];
|
||||||
switchOutTarget.scene.getPlayerParty().forEach((pokemon, index) => {
|
switchOutTarget.scene.getPlayerParty().forEach((pokemon, index) => {
|
||||||
if (pokemon.isAllowedInBattle() && !pokemon.isOnField()) {
|
if (pokemon.isAllowedInBattle() && !pokemon.isOnField()) {
|
||||||
eligibleNewIndices.push(index);
|
eligibleNewIndices.push(index);
|
||||||
@ -6020,7 +6020,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||||||
return false;
|
return false;
|
||||||
} else if (user.scene.currentBattle.battleType !== BattleType.WILD) { // Switch out logic for enemy trainers
|
} else if (user.scene.currentBattle.battleType !== BattleType.WILD) { // Switch out logic for enemy trainers
|
||||||
// Find indices of off-field Pokemon that are eligible to be switched into
|
// Find indices of off-field Pokemon that are eligible to be switched into
|
||||||
const eligibleNewIndices = [] as number[];
|
const eligibleNewIndices: number[] = [];
|
||||||
switchOutTarget.scene.getEnemyParty().forEach((pokemon, index) => {
|
switchOutTarget.scene.getEnemyParty().forEach((pokemon, index) => {
|
||||||
if (pokemon.isAllowedInBattle() && !pokemon.isOnField()) {
|
if (pokemon.isAllowedInBattle() && !pokemon.isOnField()) {
|
||||||
eligibleNewIndices.push(index);
|
eligibleNewIndices.push(index);
|
||||||
|
Loading…
Reference in New Issue
Block a user