Fix merge issues

This commit is contained in:
NightKev 2024-11-03 06:56:22 -08:00
parent 3017fdb71b
commit e0e659c605
5 changed files with 11 additions and 11 deletions

@ -1 +1 @@
Subproject commit 3cf6d553541d79ba165387bc73fb06544d00f1f9
Subproject commit fc4a1effd5170def3c8314208a52cd0d8e6913ef

View File

@ -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();

View File

@ -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());
};

View File

@ -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();
});

View File

@ -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);