diff --git a/public/locales b/public/locales index 3cf6d553541..fc4a1effd51 160000 --- a/public/locales +++ b/public/locales @@ -1 +1 @@ -Subproject commit 3cf6d553541d79ba165387bc73fb06544d00f1f9 +Subproject commit fc4a1effd5170def3c8314208a52cd0d8e6913ef diff --git a/src/data/ability.ts b/src/data/ability.ts index 6c503bb4100..2dfa89357cb 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -4856,7 +4856,7 @@ class ForceSwitchOutHelper { * - If the Pokémon is still alive (hp > 0), and if so, it leaves the field and a new SwitchPhase is initiated. */ if (switchOutTarget instanceof PlayerPokemon) { - if (switchOutTarget.scene.getParty().filter((p) => p.isAllowedInBattle() && !p.isOnField()).length < 1) { + if (switchOutTarget.scene.getPlayerParty().filter((p) => p.isAllowedInBattle() && !p.isOnField()).length < 1) { return false; } @@ -4937,7 +4937,7 @@ class ForceSwitchOutHelper { return false; } - const party = player ? pokemon.scene.getParty() : pokemon.scene.getEnemyParty(); + const party = player ? pokemon.scene.getPlayerParty() : pokemon.scene.getEnemyParty(); return (!player && pokemon.scene.currentBattle.battleType === BattleType.WILD) || party.filter(p => p.isAllowedInBattle() && (player || (p as EnemyPokemon).trainerSlot === (switchOutTarget as EnemyPokemon).trainerSlot)).length > pokemon.scene.currentBattle.getBattlerCount(); diff --git a/src/data/move.ts b/src/data/move.ts index 35fddc67bc1..1a9e385ecb6 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -7254,7 +7254,7 @@ const targetSleptOrComatoseCondition: MoveConditionFunc = (user: Pokemon, target const failIfLastCondition: MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => user.scene.phaseQueue.find(phase => phase instanceof MovePhase) !== undefined; const failIfLastInPartyCondition: MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => { - const party: Pokemon[] = user.isPlayer() ? user.scene.getParty() : user.scene.getEnemyParty(); + const party: Pokemon[] = user.isPlayer() ? user.scene.getPlayerParty() : user.scene.getEnemyParty(); return party.some(pokemon => pokemon.isActive() && !pokemon.isOnField()); }; diff --git a/src/test/abilities/wimp_out.test.ts b/src/test/abilities/wimp_out.test.ts index ee943befc16..6f56a2f4e7e 100644 --- a/src/test/abilities/wimp_out.test.ts +++ b/src/test/abilities/wimp_out.test.ts @@ -42,7 +42,7 @@ describe("Abilities - Wimp Out", () => { }); function confirmSwitch(): void { - const [ pokemon1, pokemon2 ] = game.scene.getParty(); + const [ pokemon1, pokemon2 ] = game.scene.getPlayerParty(); expect(game.phaseInterceptor.log).toContain("SwitchSummonPhase"); @@ -54,7 +54,7 @@ describe("Abilities - Wimp Out", () => { } function confirmNoSwitch(): void { - const [ pokemon1, pokemon2 ] = game.scene.getParty(); + const [ pokemon1, pokemon2 ] = game.scene.getPlayerParty(); expect(game.phaseInterceptor.log).not.toContain("SwitchSummonPhase"); @@ -135,7 +135,7 @@ describe("Abilities - Wimp Out", () => { expect(game.phaseInterceptor.log).toContain("SwitchSummonPhase"); expect(game.scene.getPlayerPokemon()!.getTag(BattlerTagType.TRAPPED)).toBeUndefined(); - expect(game.scene.getParty()[1].getTag(BattlerTagType.TRAPPED)).toBeUndefined(); + expect(game.scene.getPlayerParty()[1].getTag(BattlerTagType.TRAPPED)).toBeUndefined(); confirmSwitch(); }); @@ -263,7 +263,7 @@ describe("Abilities - Wimp Out", () => { game.doSelectPartyPokemon(1); await game.phaseInterceptor.to("TurnEndPhase"); - expect(game.scene.getParty()[1].getHpRatio()).toBeGreaterThan(0.5); + expect(game.scene.getPlayerParty()[1].getHpRatio()).toBeGreaterThan(0.5); expect(game.phaseInterceptor.log).toContain("SwitchSummonPhase"); expect(game.scene.getPlayerPokemon()!.species.speciesId).toBe(Species.TYRUNT); }); @@ -424,7 +424,7 @@ describe("Abilities - Wimp Out", () => { game.move.select(Moves.SPLASH); await game.phaseInterceptor.to("TurnEndPhase"); - expect(game.scene.getParty()[0].getHpRatio()).toEqual(0.51); + expect(game.scene.getPlayerParty()[0].getHpRatio()).toEqual(0.51); expect(game.phaseInterceptor.log).not.toContain("SwitchSummonPhase"); expect(game.scene.getPlayerPokemon()!.species.speciesId).toBe(Species.WIMPOD); }); @@ -522,7 +522,7 @@ describe("Abilities - Wimp Out", () => { game.doSelectPartyPokemon(1); await game.phaseInterceptor.to("TurnEndPhase"); - expect(game.scene.getParty()[1].status?.effect).toEqual(StatusEffect.POISON); + expect(game.scene.getPlayerParty()[1].status?.effect).toEqual(StatusEffect.POISON); confirmSwitch(); }); diff --git a/src/test/moves/shed_tail.test.ts b/src/test/moves/shed_tail.test.ts index 4d761a8af24..33a7d81e460 100644 --- a/src/test/moves/shed_tail.test.ts +++ b/src/test/moves/shed_tail.test.ts @@ -59,7 +59,7 @@ describe("Moves - Shed Tail", () => { await game.classicMode.startBattle([ Species.MAGIKARP ]); const magikarp = game.scene.getPlayerPokemon()!; - expect(game.scene.getParty().length).toBe(1); + expect(game.scene.getPlayerParty().length).toBe(1); game.move.select(Moves.SHED_TAIL);