mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-01 05:52:17 +02:00
Removed unnecessary test timeout parameters from test files
We set it in vitest config anyways
This commit is contained in:
parent
dd2f475ded
commit
0ff7cdd7e8
@ -50,5 +50,5 @@ describe("Ability Timing", () => {
|
|||||||
|
|
||||||
await game.phaseInterceptor.to("MessagePhase");
|
await game.phaseInterceptor.to("MessagePhase");
|
||||||
expect(i18next.t).toHaveBeenCalledWith("battle:statFell", expect.objectContaining({ count: 1 }));
|
expect(i18next.t).toHaveBeenCalledWith("battle:statFell", expect.objectContaining({ count: 1 }));
|
||||||
}, 5000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -47,7 +47,7 @@ describe("Abilities - Beast Boost", () => {
|
|||||||
await game.phaseInterceptor.to("VictoryPhase");
|
await game.phaseInterceptor.to("VictoryPhase");
|
||||||
|
|
||||||
expect(playerPokemon.getStatStage(Stat.DEF)).toBe(1);
|
expect(playerPokemon.getStatStage(Stat.DEF)).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should use in-battle overriden stats when determining the stat stage to raise by 1", async () => {
|
it("should use in-battle overriden stats when determining the stat stage to raise by 1", async () => {
|
||||||
game.override.enemyMoveset([Moves.GUARD_SPLIT]);
|
game.override.enemyMoveset([Moves.GUARD_SPLIT]);
|
||||||
@ -66,7 +66,7 @@ describe("Abilities - Beast Boost", () => {
|
|||||||
await game.phaseInterceptor.to("VictoryPhase");
|
await game.phaseInterceptor.to("VictoryPhase");
|
||||||
|
|
||||||
expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1);
|
expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should have order preference in case of stat ties", async () => {
|
it("should have order preference in case of stat ties", async () => {
|
||||||
// Order preference follows the order of EFFECTIVE_STAT
|
// Order preference follows the order of EFFECTIVE_STAT
|
||||||
@ -84,5 +84,5 @@ describe("Abilities - Beast Boost", () => {
|
|||||||
await game.phaseInterceptor.to("VictoryPhase");
|
await game.phaseInterceptor.to("VictoryPhase");
|
||||||
|
|
||||||
expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1);
|
expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -36,7 +36,7 @@ describe("Abilities - Contrary", () => {
|
|||||||
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
||||||
|
|
||||||
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1);
|
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
describe("With Clear Body", () => {
|
describe("With Clear Body", () => {
|
||||||
it("should apply positive effects", async () => {
|
it("should apply positive effects", async () => {
|
||||||
|
@ -44,7 +44,7 @@ describe("Abilities - Flash Fire", () => {
|
|||||||
game.move.select(Moves.SPLASH);
|
game.move.select(Moves.SPLASH);
|
||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
expect(blissey.hp).toBe(blissey.getMaxHp());
|
expect(blissey.hp).toBe(blissey.getMaxHp());
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("not activate if the Pokémon is protected from the Fire-type move", async () => {
|
it("not activate if the Pokémon is protected from the Fire-type move", async () => {
|
||||||
game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.PROTECT]);
|
game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.PROTECT]);
|
||||||
@ -55,7 +55,7 @@ describe("Abilities - Flash Fire", () => {
|
|||||||
game.move.select(Moves.PROTECT);
|
game.move.select(Moves.PROTECT);
|
||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
expect(blissey!.getTag(BattlerTagType.FIRE_BOOST)).toBeUndefined();
|
expect(blissey!.getTag(BattlerTagType.FIRE_BOOST)).toBeUndefined();
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("activated by Will-O-Wisp", async () => {
|
it("activated by Will-O-Wisp", async () => {
|
||||||
game.override.enemyMoveset([Moves.WILL_O_WISP]).moveset(Moves.SPLASH);
|
game.override.enemyMoveset([Moves.WILL_O_WISP]).moveset(Moves.SPLASH);
|
||||||
@ -70,7 +70,7 @@ describe("Abilities - Flash Fire", () => {
|
|||||||
|
|
||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
expect(blissey!.getTag(BattlerTagType.FIRE_BOOST)).toBeDefined();
|
expect(blissey!.getTag(BattlerTagType.FIRE_BOOST)).toBeDefined();
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("activated after being frozen", async () => {
|
it("activated after being frozen", async () => {
|
||||||
game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH);
|
game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH);
|
||||||
@ -83,7 +83,7 @@ describe("Abilities - Flash Fire", () => {
|
|||||||
|
|
||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
expect(blissey!.getTag(BattlerTagType.FIRE_BOOST)).toBeDefined();
|
expect(blissey!.getTag(BattlerTagType.FIRE_BOOST)).toBeDefined();
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("not passing with baton pass", async () => {
|
it("not passing with baton pass", async () => {
|
||||||
game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.BATON_PASS]);
|
game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.BATON_PASS]);
|
||||||
@ -99,7 +99,7 @@ describe("Abilities - Flash Fire", () => {
|
|||||||
const chansey = game.scene.getPlayerPokemon()!;
|
const chansey = game.scene.getPlayerPokemon()!;
|
||||||
expect(game.scene.getPlayerPokemon()!.species.speciesId).toBe(Species.CHANSEY);
|
expect(game.scene.getPlayerPokemon()!.species.speciesId).toBe(Species.CHANSEY);
|
||||||
expect(chansey!.getTag(BattlerTagType.FIRE_BOOST)).toBeUndefined();
|
expect(chansey!.getTag(BattlerTagType.FIRE_BOOST)).toBeUndefined();
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("boosts Fire-type move when the ability is activated", async () => {
|
it("boosts Fire-type move when the ability is activated", async () => {
|
||||||
game.override.enemyMoveset([Moves.FIRE_PLEDGE]).moveset([Moves.EMBER, Moves.SPLASH]);
|
game.override.enemyMoveset([Moves.FIRE_PLEDGE]).moveset([Moves.EMBER, Moves.SPLASH]);
|
||||||
@ -124,7 +124,7 @@ describe("Abilities - Flash Fire", () => {
|
|||||||
const flashFireDmg = initialHP - blissey.hp;
|
const flashFireDmg = initialHP - blissey.hp;
|
||||||
|
|
||||||
expect(flashFireDmg).toBeGreaterThan(originalDmg);
|
expect(flashFireDmg).toBeGreaterThan(originalDmg);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("still activates regardless of accuracy check", async () => {
|
it("still activates regardless of accuracy check", async () => {
|
||||||
game.override.moveset(Moves.FIRE_PLEDGE).enemyMoveset(Moves.EMBER);
|
game.override.moveset(Moves.FIRE_PLEDGE).enemyMoveset(Moves.EMBER);
|
||||||
@ -153,5 +153,5 @@ describe("Abilities - Flash Fire", () => {
|
|||||||
const flashFireDmg = initialHP - blissey.hp;
|
const flashFireDmg = initialHP - blissey.hp;
|
||||||
|
|
||||||
expect(flashFireDmg).toBeGreaterThan(originalDmg);
|
expect(flashFireDmg).toBeGreaterThan(originalDmg);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -62,7 +62,7 @@ describe("Abilities - Intimidate", () => {
|
|||||||
expect(playerPokemon.species.speciesId).toBe(Species.POOCHYENA);
|
expect(playerPokemon.species.speciesId).toBe(Species.POOCHYENA);
|
||||||
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(0);
|
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(0);
|
||||||
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-2);
|
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should lower ATK stat stage by 1 for every enemy Pokemon in a double battle on entry", async () => {
|
it("should lower ATK stat stage by 1 for every enemy Pokemon in a double battle on entry", async () => {
|
||||||
game.override.battleStyle("double").startingWave(3);
|
game.override.battleStyle("double").startingWave(3);
|
||||||
@ -85,7 +85,7 @@ describe("Abilities - Intimidate", () => {
|
|||||||
expect(enemyField[1].getStatStage(Stat.ATK)).toBe(-2);
|
expect(enemyField[1].getStatStage(Stat.ATK)).toBe(-2);
|
||||||
expect(playerField[0].getStatStage(Stat.ATK)).toBe(-2);
|
expect(playerField[0].getStatStage(Stat.ATK)).toBe(-2);
|
||||||
expect(playerField[1].getStatStage(Stat.ATK)).toBe(-2);
|
expect(playerField[1].getStatStage(Stat.ATK)).toBe(-2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should not activate again if there is no switch or new entry", async () => {
|
it("should not activate again if there is no switch or new entry", async () => {
|
||||||
game.override.startingWave(2);
|
game.override.startingWave(2);
|
||||||
@ -103,7 +103,7 @@ describe("Abilities - Intimidate", () => {
|
|||||||
|
|
||||||
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1);
|
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1);
|
||||||
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-1);
|
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-1);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should lower ATK stat stage by 1 for every switch", async () => {
|
it("should lower ATK stat stage by 1 for every switch", async () => {
|
||||||
game.override.moveset([Moves.SPLASH]).enemyMoveset([Moves.VOLT_SWITCH]).startingWave(5);
|
game.override.moveset([Moves.SPLASH]).enemyMoveset([Moves.VOLT_SWITCH]).startingWave(5);
|
||||||
@ -130,5 +130,5 @@ describe("Abilities - Intimidate", () => {
|
|||||||
|
|
||||||
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-3);
|
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(-3);
|
||||||
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(0);
|
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(0);
|
||||||
}, 200000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -38,5 +38,5 @@ describe("Abilities - Intrepid Sword", () => {
|
|||||||
|
|
||||||
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(1);
|
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(1);
|
||||||
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1);
|
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -48,7 +48,7 @@ describe("Abilities - Moxie", () => {
|
|||||||
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(VictoryPhase);
|
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(VictoryPhase);
|
||||||
|
|
||||||
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(1);
|
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
// TODO: Activate this test when MOXIE is corrected to work on faint and not on battle victory
|
// TODO: Activate this test when MOXIE is corrected to work on faint and not on battle victory
|
||||||
it.todo(
|
it.todo(
|
||||||
|
@ -63,7 +63,7 @@ describe("Abilities - Mycelium Might", () => {
|
|||||||
|
|
||||||
// Despite the opponent's ability (Clear Body), its ATK stat stage is still reduced.
|
// Despite the opponent's ability (Clear Body), its ATK stat stage is still reduced.
|
||||||
expect(enemyPokemon?.getStatStage(Stat.ATK)).toBe(-1);
|
expect(enemyPokemon?.getStatStage(Stat.ATK)).toBe(-1);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("will still go first if a status move that is in a higher priority bracket than the opponent's move is used", async () => {
|
it("will still go first if a status move that is in a higher priority bracket than the opponent's move is used", async () => {
|
||||||
game.override.enemyMoveset(Moves.TACKLE);
|
game.override.enemyMoveset(Moves.TACKLE);
|
||||||
@ -86,7 +86,7 @@ describe("Abilities - Mycelium Might", () => {
|
|||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
// Despite the opponent's ability (Clear Body), its ATK stat stage is still reduced.
|
// Despite the opponent's ability (Clear Body), its ATK stat stage is still reduced.
|
||||||
expect(enemyPokemon?.getStatStage(Stat.ATK)).toBe(-1);
|
expect(enemyPokemon?.getStatStage(Stat.ATK)).toBe(-1);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("will not affect non-status moves", async () => {
|
it("will not affect non-status moves", async () => {
|
||||||
await game.classicMode.startBattle([Species.REGIELEKI]);
|
await game.classicMode.startBattle([Species.REGIELEKI]);
|
||||||
@ -105,5 +105,5 @@ describe("Abilities - Mycelium Might", () => {
|
|||||||
// This means that the commandOrder should be identical to the speedOrder
|
// This means that the commandOrder should be identical to the speedOrder
|
||||||
expect(speedOrder).toEqual([playerIndex, enemyIndex]);
|
expect(speedOrder).toEqual([playerIndex, enemyIndex]);
|
||||||
expect(commandOrder).toEqual([playerIndex, enemyIndex]);
|
expect(commandOrder).toEqual([playerIndex, enemyIndex]);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -55,7 +55,7 @@ describe("Abilities - Quick Draw", () => {
|
|||||||
expect(pokemon.isFainted()).toBe(false);
|
expect(pokemon.isFainted()).toBe(false);
|
||||||
expect(enemy.isFainted()).toBe(true);
|
expect(enemy.isFainted()).toBe(true);
|
||||||
expect(pokemon.waveData.abilitiesApplied).contain(Abilities.QUICK_DRAW);
|
expect(pokemon.waveData.abilitiesApplied).contain(Abilities.QUICK_DRAW);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
test(
|
test(
|
||||||
"does not triggered by non damage moves",
|
"does not triggered by non damage moves",
|
||||||
@ -97,5 +97,5 @@ describe("Abilities - Quick Draw", () => {
|
|||||||
expect(pokemon.isFainted()).toBe(true);
|
expect(pokemon.isFainted()).toBe(true);
|
||||||
expect(enemy.isFainted()).toBe(false);
|
expect(enemy.isFainted()).toBe(false);
|
||||||
expect(pokemon.waveData.abilitiesApplied).contain(Abilities.QUICK_DRAW);
|
expect(pokemon.waveData.abilitiesApplied).contain(Abilities.QUICK_DRAW);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -41,7 +41,7 @@ describe("Abilities - Sand Spit", () => {
|
|||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.SANDSTORM);
|
expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.SANDSTORM);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should trigger even when fainting", async () => {
|
it("should trigger even when fainting", async () => {
|
||||||
game.override.enemyMoveset([Moves.TACKLE]).enemyLevel(100).startingLevel(1);
|
game.override.enemyMoveset([Moves.TACKLE]).enemyLevel(100).startingLevel(1);
|
||||||
@ -62,5 +62,5 @@ describe("Abilities - Sand Spit", () => {
|
|||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
expect(game.scene.arena.weather?.weatherType).not.toBe(WeatherType.SANDSTORM);
|
expect(game.scene.arena.weather?.weatherType).not.toBe(WeatherType.SANDSTORM);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -70,7 +70,7 @@ describe("Abilities - Sheer Force", () => {
|
|||||||
await game.phaseInterceptor.to("BerryPhase", false);
|
await game.phaseInterceptor.to("BerryPhase", false);
|
||||||
|
|
||||||
expect(bindMove.calculateBattlePower).toHaveLastReturnedWith(bindMove.power);
|
expect(bindMove.calculateBattlePower).toHaveLastReturnedWith(bindMove.power);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("Sheer Force does not boost the base damage of moves with no secondary effect", async () => {
|
it("Sheer Force does not boost the base damage of moves with no secondary effect", async () => {
|
||||||
game.override.moveset([Moves.TACKLE]);
|
game.override.moveset([Moves.TACKLE]);
|
||||||
|
@ -36,5 +36,5 @@ describe("Abilities - Simple", () => {
|
|||||||
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
||||||
|
|
||||||
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-2);
|
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-2);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -53,7 +53,7 @@ describe("Abilities - Stall", () => {
|
|||||||
// The opponent Pokemon (with Stall) goes last despite having higher speed than the player Pokemon.
|
// The opponent Pokemon (with Stall) goes last despite having higher speed than the player Pokemon.
|
||||||
expect(speedOrder).toEqual([enemyIndex, playerIndex]);
|
expect(speedOrder).toEqual([enemyIndex, playerIndex]);
|
||||||
expect(commandOrder).toEqual([playerIndex, enemyIndex]);
|
expect(commandOrder).toEqual([playerIndex, enemyIndex]);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("Pokemon with Stall will go first if a move that is in a higher priority bracket than the opponent's move is used", async () => {
|
it("Pokemon with Stall will go first if a move that is in a higher priority bracket than the opponent's move is used", async () => {
|
||||||
await game.classicMode.startBattle([Species.SHUCKLE]);
|
await game.classicMode.startBattle([Species.SHUCKLE]);
|
||||||
@ -71,7 +71,7 @@ describe("Abilities - Stall", () => {
|
|||||||
// The player Pokemon goes second because its move is in a lower priority bracket.
|
// The player Pokemon goes second because its move is in a lower priority bracket.
|
||||||
expect(speedOrder).toEqual([enemyIndex, playerIndex]);
|
expect(speedOrder).toEqual([enemyIndex, playerIndex]);
|
||||||
expect(commandOrder).toEqual([enemyIndex, playerIndex]);
|
expect(commandOrder).toEqual([enemyIndex, playerIndex]);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("If both Pokemon have stall and use the same move, speed is used to determine who goes first.", async () => {
|
it("If both Pokemon have stall and use the same move, speed is used to determine who goes first.", async () => {
|
||||||
game.override.ability(Abilities.STALL);
|
game.override.ability(Abilities.STALL);
|
||||||
@ -91,5 +91,5 @@ describe("Abilities - Stall", () => {
|
|||||||
// The player Pokemon (with Stall) goes second because its speed is lower.
|
// The player Pokemon (with Stall) goes second because its speed is lower.
|
||||||
expect(speedOrder).toEqual([enemyIndex, playerIndex]);
|
expect(speedOrder).toEqual([enemyIndex, playerIndex]);
|
||||||
expect(commandOrder).toEqual([enemyIndex, playerIndex]);
|
expect(commandOrder).toEqual([enemyIndex, playerIndex]);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -48,7 +48,7 @@ describe("Battle order", () => {
|
|||||||
const order = phase.getCommandOrder();
|
const order = phase.getCommandOrder();
|
||||||
expect(order[0]).toBe(enemyPokemonIndex);
|
expect(order[0]).toBe(enemyPokemonIndex);
|
||||||
expect(order[1]).toBe(playerPokemonIndex);
|
expect(order[1]).toBe(playerPokemonIndex);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("Player faster than opponent 150 vs 50", async () => {
|
it("Player faster than opponent 150 vs 50", async () => {
|
||||||
await game.classicMode.startBattle([Species.BULBASAUR]);
|
await game.classicMode.startBattle([Species.BULBASAUR]);
|
||||||
@ -67,7 +67,7 @@ describe("Battle order", () => {
|
|||||||
const order = phase.getCommandOrder();
|
const order = phase.getCommandOrder();
|
||||||
expect(order[0]).toBe(playerPokemonIndex);
|
expect(order[0]).toBe(playerPokemonIndex);
|
||||||
expect(order[1]).toBe(enemyPokemonIndex);
|
expect(order[1]).toBe(enemyPokemonIndex);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("double - both opponents faster than player 50/50 vs 150/150", async () => {
|
it("double - both opponents faster than player 50/50 vs 150/150", async () => {
|
||||||
game.override.battleStyle("double");
|
game.override.battleStyle("double");
|
||||||
@ -111,11 +111,10 @@ describe("Battle order", () => {
|
|||||||
|
|
||||||
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
||||||
const order = phase.getCommandOrder();
|
const order = phase.getCommandOrder();
|
||||||
|
// enemy 2 should be first, followed by some other assortment of the other 3 pokemon
|
||||||
expect(order[0]).toBe(enemyIndices[1]);
|
expect(order[0]).toBe(enemyIndices[1]);
|
||||||
expect(order.slice(1, 4).includes(enemyIndices[0])).toBe(true);
|
expect(order.slice(1, 4)).toEqual(expect.arrayContaining([enemyIndices[0], ...playerIndices]));
|
||||||
expect(order.slice(1, 4).includes(playerIndices[0])).toBe(true);
|
});
|
||||||
expect(order.slice(1, 4).includes(playerIndices[1])).toBe(true);
|
|
||||||
}, 20000);
|
|
||||||
|
|
||||||
it("double - speed tie 100/150 vs 100/150", async () => {
|
it("double - speed tie 100/150 vs 100/150", async () => {
|
||||||
game.override.battleStyle("double");
|
game.override.battleStyle("double");
|
||||||
@ -136,9 +135,8 @@ describe("Battle order", () => {
|
|||||||
|
|
||||||
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
||||||
const order = phase.getCommandOrder();
|
const order = phase.getCommandOrder();
|
||||||
expect(order.slice(0, 2).includes(playerIndices[1])).toBe(true);
|
// P2/E2 should be randomly first/second, then P1/E1 randomly 3rd/4th
|
||||||
expect(order.slice(0, 2).includes(enemyIndices[1])).toBe(true);
|
expect(order.slice(0, 2)).toStrictEqual(expect.arrayContaining([playerIndices[1], enemyIndices[1]]));
|
||||||
expect(order.slice(2, 4).includes(playerIndices[0])).toBe(true);
|
expect(order.slice(2, 4)).toStrictEqual(expect.arrayContaining([playerIndices[0], enemyIndices[0]]));
|
||||||
expect(order.slice(2, 4).includes(enemyIndices[0])).toBe(true);
|
});
|
||||||
}, 20000);
|
|
||||||
});
|
});
|
||||||
|
@ -61,7 +61,7 @@ describe("Test Battle Phase", () => {
|
|||||||
|
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.TITLE);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.TITLE);
|
||||||
expect(game.scene.gameData.gender).toBe(PlayerGender.MALE);
|
expect(game.scene.gameData.gender).toBe(PlayerGender.MALE);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("test phase interceptor with prompt with preparation for a future prompt", async () => {
|
it("test phase interceptor with prompt with preparation for a future prompt", async () => {
|
||||||
await game.phaseInterceptor.run(LoginPhase);
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
@ -82,13 +82,13 @@ describe("Test Battle Phase", () => {
|
|||||||
|
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.TITLE);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.TITLE);
|
||||||
expect(game.scene.gameData.gender).toBe(PlayerGender.MALE);
|
expect(game.scene.gameData.gender).toBe(PlayerGender.MALE);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("newGame one-liner", async () => {
|
it("newGame one-liner", async () => {
|
||||||
await game.classicMode.startBattle();
|
await game.classicMode.startBattle();
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
||||||
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("do attack wave 3 - single battle - regular - OHKO", async () => {
|
it("do attack wave 3 - single battle - regular - OHKO", async () => {
|
||||||
game.override.starterSpecies(Species.MEWTWO);
|
game.override.starterSpecies(Species.MEWTWO);
|
||||||
@ -101,7 +101,7 @@ describe("Test Battle Phase", () => {
|
|||||||
await game.classicMode.startBattle();
|
await game.classicMode.startBattle();
|
||||||
game.move.select(Moves.TACKLE);
|
game.move.select(Moves.TACKLE);
|
||||||
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(SelectModifierPhase, false);
|
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(SelectModifierPhase, false);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("do attack wave 3 - single battle - regular - NO OHKO with opponent using non damage attack", async () => {
|
it("do attack wave 3 - single battle - regular - NO OHKO with opponent using non damage attack", async () => {
|
||||||
game.override.starterSpecies(Species.MEWTWO);
|
game.override.starterSpecies(Species.MEWTWO);
|
||||||
@ -115,7 +115,7 @@ describe("Test Battle Phase", () => {
|
|||||||
await game.classicMode.startBattle();
|
await game.classicMode.startBattle();
|
||||||
game.move.select(Moves.TACKLE);
|
game.move.select(Moves.TACKLE);
|
||||||
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase, false);
|
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase, false);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("load 100% data file", async () => {
|
it("load 100% data file", async () => {
|
||||||
await game.importData("./test/testUtils/saves/everything.prsv");
|
await game.importData("./test/testUtils/saves/everything.prsv");
|
||||||
@ -124,14 +124,14 @@ describe("Test Battle Phase", () => {
|
|||||||
return species.caughtAttr !== 0n;
|
return species.caughtAttr !== 0n;
|
||||||
}).length;
|
}).length;
|
||||||
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("start battle with selected team", async () => {
|
it("start battle with selected team", async () => {
|
||||||
await game.classicMode.startBattle([Species.CHARIZARD, Species.CHANSEY, Species.MEW]);
|
await game.classicMode.startBattle([Species.CHARIZARD, Species.CHANSEY, Species.MEW]);
|
||||||
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.CHARIZARD);
|
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.CHARIZARD);
|
||||||
expect(game.scene.getPlayerParty()[1].species.speciesId).toBe(Species.CHANSEY);
|
expect(game.scene.getPlayerParty()[1].species.speciesId).toBe(Species.CHANSEY);
|
||||||
expect(game.scene.getPlayerParty()[2].species.speciesId).toBe(Species.MEW);
|
expect(game.scene.getPlayerParty()[2].species.speciesId).toBe(Species.MEW);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("test remove random battle seed int", async () => {
|
it("test remove random battle seed int", async () => {
|
||||||
for (let i = 0; i < 10; i++) {
|
for (let i = 0; i < 10; i++) {
|
||||||
@ -145,12 +145,12 @@ describe("Test Battle Phase", () => {
|
|||||||
await game.phaseInterceptor.run(LoginPhase).catch(e => {
|
await game.phaseInterceptor.run(LoginPhase).catch(e => {
|
||||||
expect(e).toBe("Wrong phase: this is SelectGenderPhase and not LoginPhase");
|
expect(e).toBe("Wrong phase: this is SelectGenderPhase and not LoginPhase");
|
||||||
});
|
});
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("wrong phase but skip", async () => {
|
it("wrong phase but skip", async () => {
|
||||||
await game.phaseInterceptor.run(LoginPhase);
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
await game.phaseInterceptor.run(LoginPhase, () => game.isCurrentPhase(SelectGenderPhase));
|
await game.phaseInterceptor.run(LoginPhase, () => game.isCurrentPhase(SelectGenderPhase));
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("good run", async () => {
|
it("good run", async () => {
|
||||||
await game.phaseInterceptor.run(LoginPhase);
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
@ -165,7 +165,7 @@ describe("Test Battle Phase", () => {
|
|||||||
);
|
);
|
||||||
await game.phaseInterceptor.run(SelectGenderPhase, () => game.isCurrentPhase(TitlePhase));
|
await game.phaseInterceptor.run(SelectGenderPhase, () => game.isCurrentPhase(TitlePhase));
|
||||||
await game.phaseInterceptor.run(TitlePhase);
|
await game.phaseInterceptor.run(TitlePhase);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("good run from select gender to title", async () => {
|
it("good run from select gender to title", async () => {
|
||||||
await game.phaseInterceptor.run(LoginPhase);
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
@ -179,7 +179,7 @@ describe("Test Battle Phase", () => {
|
|||||||
() => game.isCurrentPhase(TitlePhase),
|
() => game.isCurrentPhase(TitlePhase),
|
||||||
);
|
);
|
||||||
await game.phaseInterceptor.runFrom(SelectGenderPhase).to(TitlePhase);
|
await game.phaseInterceptor.runFrom(SelectGenderPhase).to(TitlePhase);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("good run to SummonPhase phase", async () => {
|
it("good run to SummonPhase phase", async () => {
|
||||||
await game.phaseInterceptor.run(LoginPhase);
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
@ -200,7 +200,7 @@ describe("Test Battle Phase", () => {
|
|||||||
selectStarterPhase.initBattle(starters);
|
selectStarterPhase.initBattle(starters);
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.runFrom(SelectGenderPhase).to(SummonPhase);
|
await game.phaseInterceptor.runFrom(SelectGenderPhase).to(SummonPhase);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("2vs1", async () => {
|
it("2vs1", async () => {
|
||||||
game.override.battleStyle("single");
|
game.override.battleStyle("single");
|
||||||
@ -262,7 +262,7 @@ describe("Test Battle Phase", () => {
|
|||||||
await game.killPokemon(game.scene.currentBattle.enemyParty[0]);
|
await game.killPokemon(game.scene.currentBattle.enemyParty[0]);
|
||||||
expect(game.scene.currentBattle.enemyParty[0].isFainted()).toBe(true);
|
expect(game.scene.currentBattle.enemyParty[0].isFainted()).toBe(true);
|
||||||
await game.phaseInterceptor.to(VictoryPhase, false);
|
await game.phaseInterceptor.to(VictoryPhase, false);
|
||||||
}, 200000);
|
});
|
||||||
|
|
||||||
it("to next turn", async () => {
|
it("to next turn", async () => {
|
||||||
const moveToUse = Moves.SPLASH;
|
const moveToUse = Moves.SPLASH;
|
||||||
@ -280,7 +280,7 @@ describe("Test Battle Phase", () => {
|
|||||||
game.move.select(moveToUse);
|
game.move.select(moveToUse);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
expect(game.scene.currentBattle.turn).toBeGreaterThan(turn);
|
expect(game.scene.currentBattle.turn).toBeGreaterThan(turn);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("does not set new weather if staying in same biome", async () => {
|
it("does not set new weather if staying in same biome", async () => {
|
||||||
const moveToUse = Moves.SPLASH;
|
const moveToUse = Moves.SPLASH;
|
||||||
@ -304,7 +304,7 @@ describe("Test Battle Phase", () => {
|
|||||||
await game.toNextWave();
|
await game.toNextWave();
|
||||||
expect(game.scene.arena.trySetWeather).not.toHaveBeenCalled();
|
expect(game.scene.arena.trySetWeather).not.toHaveBeenCalled();
|
||||||
expect(game.scene.currentBattle.waveIndex).toBeGreaterThan(waveIndex);
|
expect(game.scene.currentBattle.waveIndex).toBeGreaterThan(waveIndex);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("does not force switch if active pokemon faints at same time as enemy mon and is revived in post-battle", async () => {
|
it("does not force switch if active pokemon faints at same time as enemy mon and is revived in post-battle", async () => {
|
||||||
const moveToUse = Moves.TAKE_DOWN;
|
const moveToUse = Moves.TAKE_DOWN;
|
||||||
@ -335,5 +335,5 @@ describe("Test Battle Phase", () => {
|
|||||||
() => game.isCurrentPhase(NextEncounterPhase),
|
() => game.isCurrentPhase(NextEncounterPhase),
|
||||||
);
|
);
|
||||||
await game.phaseInterceptor.to(SwitchPhase);
|
await game.phaseInterceptor.to(SwitchPhase);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -55,7 +55,7 @@ describe("Double Battles", () => {
|
|||||||
|
|
||||||
await game.phaseInterceptor.to(TurnInitPhase);
|
await game.phaseInterceptor.to(TurnInitPhase);
|
||||||
expect(game.scene.getPlayerField().filter(p => !p.isFainted())).toHaveLength(2);
|
expect(game.scene.getPlayerField().filter(p => !p.isFainted())).toHaveLength(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("randomly chooses between single and double battles if there is no battle type override", async () => {
|
it("randomly chooses between single and double battles if there is no battle type override", async () => {
|
||||||
let rngSweepProgress = 0; // Will simulate RNG rolls by slowly increasing from 0 to 1
|
let rngSweepProgress = 0; // Will simulate RNG rolls by slowly increasing from 0 to 1
|
||||||
|
@ -37,61 +37,61 @@ describe("Test Battle Phase", () => {
|
|||||||
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
||||||
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("startBattle 2vs2 boss", async () => {
|
it("startBattle 2vs2 boss", async () => {
|
||||||
game.override.battleStyle("double").startingWave(10);
|
game.override.battleStyle("double").startingWave(10);
|
||||||
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
||||||
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("startBattle 2vs2 trainer", async () => {
|
it("startBattle 2vs2 trainer", async () => {
|
||||||
game.override.battleStyle("double").startingWave(5);
|
game.override.battleStyle("double").startingWave(5);
|
||||||
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
||||||
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("startBattle 2vs1 trainer", async () => {
|
it("startBattle 2vs1 trainer", async () => {
|
||||||
game.override.battleStyle("single").startingWave(5);
|
game.override.battleStyle("single").startingWave(5);
|
||||||
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
||||||
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("startBattle 2vs1 rival", async () => {
|
it("startBattle 2vs1 rival", async () => {
|
||||||
game.override.battleStyle("single").startingWave(8);
|
game.override.battleStyle("single").startingWave(8);
|
||||||
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
||||||
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("startBattle 2vs2 rival", async () => {
|
it("startBattle 2vs2 rival", async () => {
|
||||||
game.override.battleStyle("double").startingWave(8);
|
game.override.battleStyle("double").startingWave(8);
|
||||||
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
||||||
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("startBattle 1vs1 trainer", async () => {
|
it("startBattle 1vs1 trainer", async () => {
|
||||||
game.override.battleStyle("single").startingWave(5);
|
game.override.battleStyle("single").startingWave(5);
|
||||||
await game.classicMode.startBattle([Species.BLASTOISE]);
|
await game.classicMode.startBattle([Species.BLASTOISE]);
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
||||||
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("startBattle 2vs2 trainer", async () => {
|
it("startBattle 2vs2 trainer", async () => {
|
||||||
game.override.battleStyle("double").startingWave(5);
|
game.override.battleStyle("double").startingWave(5);
|
||||||
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
||||||
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("startBattle 4vs2 trainer", async () => {
|
it("startBattle 4vs2 trainer", async () => {
|
||||||
game.override.battleStyle("double").startingWave(5);
|
game.override.battleStyle("double").startingWave(5);
|
||||||
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE]);
|
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE]);
|
||||||
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
|
||||||
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -94,7 +94,7 @@ describe("Escape chance calculations", () => {
|
|||||||
phase.attemptRunAway(playerPokemon, enemyField, escapePercentage);
|
phase.attemptRunAway(playerPokemon, enemyField, escapePercentage);
|
||||||
expect(escapePercentage.value).toBe(escapeChances[i].expectedEscapeChance);
|
expect(escapePercentage.value).toBe(escapeChances[i].expectedEscapeChance);
|
||||||
}
|
}
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("double non-boss opponent", async () => {
|
it("double non-boss opponent", async () => {
|
||||||
game.override.battleStyle("double");
|
game.override.battleStyle("double");
|
||||||
@ -180,7 +180,7 @@ describe("Escape chance calculations", () => {
|
|||||||
escapeChances[i].pokemonSpeedRatio * totalEnemySpeed,
|
escapeChances[i].pokemonSpeedRatio * totalEnemySpeed,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("single boss opponent", async () => {
|
it("single boss opponent", async () => {
|
||||||
game.override.startingWave(10);
|
game.override.startingWave(10);
|
||||||
@ -259,7 +259,7 @@ describe("Escape chance calculations", () => {
|
|||||||
phase.attemptRunAway(playerPokemon, enemyField, escapePercentage);
|
phase.attemptRunAway(playerPokemon, enemyField, escapePercentage);
|
||||||
expect(escapePercentage.value).toBe(escapeChances[i].expectedEscapeChance);
|
expect(escapePercentage.value).toBe(escapeChances[i].expectedEscapeChance);
|
||||||
}
|
}
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("double boss opponent", async () => {
|
it("double boss opponent", async () => {
|
||||||
game.override.battleStyle("double");
|
game.override.battleStyle("double");
|
||||||
@ -358,5 +358,5 @@ describe("Escape chance calculations", () => {
|
|||||||
escapeChances[i].pokemonSpeedRatio * totalEnemySpeed,
|
escapeChances[i].pokemonSpeedRatio * totalEnemySpeed,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -37,7 +37,7 @@ describe("Items - Dire Hit", () => {
|
|||||||
.moveset([Moves.POUND])
|
.moveset([Moves.POUND])
|
||||||
.startingHeldItems([{ name: "DIRE_HIT" }])
|
.startingHeldItems([{ name: "DIRE_HIT" }])
|
||||||
.battleStyle("single");
|
.battleStyle("single");
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should raise CRIT stage by 1", async () => {
|
it("should raise CRIT stage by 1", async () => {
|
||||||
await game.classicMode.startBattle([Species.GASTLY]);
|
await game.classicMode.startBattle([Species.GASTLY]);
|
||||||
@ -51,7 +51,7 @@ describe("Items - Dire Hit", () => {
|
|||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
|
|
||||||
expect(enemyPokemon.getCritStage).toHaveReturnedWith(1);
|
expect(enemyPokemon.getCritStage).toHaveReturnedWith(1);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should renew how many battles are left of existing DIRE_HIT when picking up new DIRE_HIT", async () => {
|
it("should renew how many battles are left of existing DIRE_HIT when picking up new DIRE_HIT", async () => {
|
||||||
game.override.itemRewards([{ name: "DIRE_HIT" }]);
|
game.override.itemRewards([{ name: "DIRE_HIT" }]);
|
||||||
@ -93,5 +93,5 @@ describe("Items - Dire Hit", () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect(count).toBe(1);
|
expect(count).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -36,5 +36,5 @@ describe("EXP Modifier Items", () => {
|
|||||||
const expHolder = new NumberHolder(partyMember.exp);
|
const expHolder = new NumberHolder(partyMember.exp);
|
||||||
game.scene.applyModifiers(PokemonExpBoosterModifier, true, partyMember, expHolder);
|
game.scene.applyModifiers(PokemonExpBoosterModifier, true, partyMember, expHolder);
|
||||||
expect(expHolder.value).toBe(440);
|
expect(expHolder.value).toBe(440);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -43,7 +43,7 @@ describe("Items - Leek", () => {
|
|||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
|
|
||||||
expect(enemyMember.getCritStage).toHaveReturnedWith(2);
|
expect(enemyMember.getCritStage).toHaveReturnedWith(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should raise CRIT stage by 2 when held by GALAR_FARFETCHD", async () => {
|
it("should raise CRIT stage by 2 when held by GALAR_FARFETCHD", async () => {
|
||||||
await game.classicMode.startBattle([Species.GALAR_FARFETCHD]);
|
await game.classicMode.startBattle([Species.GALAR_FARFETCHD]);
|
||||||
@ -57,7 +57,7 @@ describe("Items - Leek", () => {
|
|||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
|
|
||||||
expect(enemyMember.getCritStage).toHaveReturnedWith(2);
|
expect(enemyMember.getCritStage).toHaveReturnedWith(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should raise CRIT stage by 2 when held by SIRFETCHD", async () => {
|
it("should raise CRIT stage by 2 when held by SIRFETCHD", async () => {
|
||||||
await game.classicMode.startBattle([Species.SIRFETCHD]);
|
await game.classicMode.startBattle([Species.SIRFETCHD]);
|
||||||
@ -71,7 +71,7 @@ describe("Items - Leek", () => {
|
|||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
|
|
||||||
expect(enemyMember.getCritStage).toHaveReturnedWith(2);
|
expect(enemyMember.getCritStage).toHaveReturnedWith(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should raise CRIT stage by 2 when held by FARFETCHD line fused with Pokemon", async () => {
|
it("should raise CRIT stage by 2 when held by FARFETCHD line fused with Pokemon", async () => {
|
||||||
// Randomly choose from the Farfetch'd line
|
// Randomly choose from the Farfetch'd line
|
||||||
@ -99,7 +99,7 @@ describe("Items - Leek", () => {
|
|||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
|
|
||||||
expect(enemyMember.getCritStage).toHaveReturnedWith(2);
|
expect(enemyMember.getCritStage).toHaveReturnedWith(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should raise CRIT stage by 2 when held by Pokemon fused with FARFETCHD line", async () => {
|
it("should raise CRIT stage by 2 when held by Pokemon fused with FARFETCHD line", async () => {
|
||||||
// Randomly choose from the Farfetch'd line
|
// Randomly choose from the Farfetch'd line
|
||||||
@ -127,7 +127,7 @@ describe("Items - Leek", () => {
|
|||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
|
|
||||||
expect(enemyMember.getCritStage).toHaveReturnedWith(2);
|
expect(enemyMember.getCritStage).toHaveReturnedWith(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should not raise CRIT stage when held by a Pokemon outside of FARFETCHD line", async () => {
|
it("should not raise CRIT stage when held by a Pokemon outside of FARFETCHD line", async () => {
|
||||||
await game.classicMode.startBattle([Species.PIKACHU]);
|
await game.classicMode.startBattle([Species.PIKACHU]);
|
||||||
@ -141,5 +141,5 @@ describe("Items - Leek", () => {
|
|||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
|
|
||||||
expect(enemyMember.getCritStage).toHaveReturnedWith(0);
|
expect(enemyMember.getCritStage).toHaveReturnedWith(0);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -56,5 +56,5 @@ describe("Items - Leftovers", () => {
|
|||||||
// Check if leftovers heal us
|
// Check if leftovers heal us
|
||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
expect(leadPokemon.hp).toBeGreaterThan(leadHpAfterDamage);
|
expect(leadPokemon.hp).toBeGreaterThan(leadHpAfterDamage);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -108,7 +108,7 @@ describe("Items - Light Ball", () => {
|
|||||||
|
|
||||||
expect(atkValue.value / atkStat).toBe(2);
|
expect(atkValue.value / atkStat).toBe(2);
|
||||||
expect(spAtkValue.value / spAtkStat).toBe(2);
|
expect(spAtkValue.value / spAtkStat).toBe(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("LIGHT_BALL held by fused PIKACHU (base)", async () => {
|
it("LIGHT_BALL held by fused PIKACHU (base)", async () => {
|
||||||
await game.classicMode.startBattle([Species.PIKACHU, Species.MAROWAK]);
|
await game.classicMode.startBattle([Species.PIKACHU, Species.MAROWAK]);
|
||||||
@ -147,7 +147,7 @@ describe("Items - Light Ball", () => {
|
|||||||
|
|
||||||
expect(atkValue.value / atkStat).toBe(2);
|
expect(atkValue.value / atkStat).toBe(2);
|
||||||
expect(spAtkValue.value / spAtkStat).toBe(2);
|
expect(spAtkValue.value / spAtkStat).toBe(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("LIGHT_BALL held by fused PIKACHU (part)", async () => {
|
it("LIGHT_BALL held by fused PIKACHU (part)", async () => {
|
||||||
await game.classicMode.startBattle([Species.MAROWAK, Species.PIKACHU]);
|
await game.classicMode.startBattle([Species.MAROWAK, Species.PIKACHU]);
|
||||||
@ -186,7 +186,7 @@ describe("Items - Light Ball", () => {
|
|||||||
|
|
||||||
expect(atkValue.value / atkStat).toBe(2);
|
expect(atkValue.value / atkStat).toBe(2);
|
||||||
expect(spAtkValue.value / spAtkStat).toBe(2);
|
expect(spAtkValue.value / spAtkStat).toBe(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("LIGHT_BALL not held by PIKACHU", async () => {
|
it("LIGHT_BALL not held by PIKACHU", async () => {
|
||||||
await game.classicMode.startBattle([Species.MAROWAK]);
|
await game.classicMode.startBattle([Species.MAROWAK]);
|
||||||
@ -215,5 +215,5 @@ describe("Items - Light Ball", () => {
|
|||||||
|
|
||||||
expect(atkValue.value / atkStat).toBe(1);
|
expect(atkValue.value / atkStat).toBe(1);
|
||||||
expect(spAtkValue.value / spAtkStat).toBe(1);
|
expect(spAtkValue.value / spAtkStat).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -49,5 +49,5 @@ describe("Items - Lock Capsule", () => {
|
|||||||
|
|
||||||
game.doSelectModifier();
|
game.doSelectModifier();
|
||||||
await game.phaseInterceptor.to("SelectModifierPhase");
|
await game.phaseInterceptor.to("SelectModifierPhase");
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -102,7 +102,7 @@ describe("Items - Metal Powder", () => {
|
|||||||
game.scene.applyModifiers(SpeciesStatBoosterModifier, true, partyMember, Stat.DEF, defValue);
|
game.scene.applyModifiers(SpeciesStatBoosterModifier, true, partyMember, Stat.DEF, defValue);
|
||||||
|
|
||||||
expect(defValue.value / defStat).toBe(2);
|
expect(defValue.value / defStat).toBe(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("METAL_POWDER held by fused DITTO (base)", async () => {
|
it("METAL_POWDER held by fused DITTO (base)", async () => {
|
||||||
await game.classicMode.startBattle([Species.DITTO, Species.MAROWAK]);
|
await game.classicMode.startBattle([Species.DITTO, Species.MAROWAK]);
|
||||||
@ -135,7 +135,7 @@ describe("Items - Metal Powder", () => {
|
|||||||
game.scene.applyModifiers(SpeciesStatBoosterModifier, true, partyMember, Stat.DEF, defValue);
|
game.scene.applyModifiers(SpeciesStatBoosterModifier, true, partyMember, Stat.DEF, defValue);
|
||||||
|
|
||||||
expect(defValue.value / defStat).toBe(2);
|
expect(defValue.value / defStat).toBe(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("METAL_POWDER held by fused DITTO (part)", async () => {
|
it("METAL_POWDER held by fused DITTO (part)", async () => {
|
||||||
await game.classicMode.startBattle([Species.MAROWAK, Species.DITTO]);
|
await game.classicMode.startBattle([Species.MAROWAK, Species.DITTO]);
|
||||||
@ -168,7 +168,7 @@ describe("Items - Metal Powder", () => {
|
|||||||
game.scene.applyModifiers(SpeciesStatBoosterModifier, true, partyMember, Stat.DEF, defValue);
|
game.scene.applyModifiers(SpeciesStatBoosterModifier, true, partyMember, Stat.DEF, defValue);
|
||||||
|
|
||||||
expect(defValue.value / defStat).toBe(2);
|
expect(defValue.value / defStat).toBe(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("METAL_POWDER not held by DITTO", async () => {
|
it("METAL_POWDER not held by DITTO", async () => {
|
||||||
await game.classicMode.startBattle([Species.MAROWAK]);
|
await game.classicMode.startBattle([Species.MAROWAK]);
|
||||||
@ -191,5 +191,5 @@ describe("Items - Metal Powder", () => {
|
|||||||
game.scene.applyModifiers(SpeciesStatBoosterModifier, true, partyMember, Stat.DEF, defValue);
|
game.scene.applyModifiers(SpeciesStatBoosterModifier, true, partyMember, Stat.DEF, defValue);
|
||||||
|
|
||||||
expect(defValue.value / defStat).toBe(1);
|
expect(defValue.value / defStat).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -28,7 +28,7 @@ describe("Items - Scope Lens", () => {
|
|||||||
.moveset([Moves.POUND])
|
.moveset([Moves.POUND])
|
||||||
.startingHeldItems([{ name: "SCOPE_LENS" }])
|
.startingHeldItems([{ name: "SCOPE_LENS" }])
|
||||||
.battleStyle("single");
|
.battleStyle("single");
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should raise CRIT stage by 1", async () => {
|
it("should raise CRIT stage by 1", async () => {
|
||||||
await game.classicMode.startBattle([Species.GASTLY]);
|
await game.classicMode.startBattle([Species.GASTLY]);
|
||||||
@ -42,5 +42,5 @@ describe("Items - Scope Lens", () => {
|
|||||||
await game.phaseInterceptor.to(TurnEndPhase);
|
await game.phaseInterceptor.to(TurnEndPhase);
|
||||||
|
|
||||||
expect(enemyPokemon.getCritStage).toHaveReturnedWith(1);
|
expect(enemyPokemon.getCritStage).toHaveReturnedWith(1);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -50,7 +50,7 @@ describe("Items - Temporary Stat Stage Boosters", () => {
|
|||||||
await game.phaseInterceptor.runFrom("EnemyCommandPhase").to(TurnEndPhase);
|
await game.phaseInterceptor.runFrom("EnemyCommandPhase").to(TurnEndPhase);
|
||||||
|
|
||||||
expect(partyMember.getStatStageMultiplier).toHaveReturnedWith(1.3);
|
expect(partyMember.getStatStageMultiplier).toHaveReturnedWith(1.3);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should increase existing ACC stat stage by 1 for X_ACCURACY only", async () => {
|
it("should increase existing ACC stat stage by 1 for X_ACCURACY only", async () => {
|
||||||
game.override.startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }]).ability(Abilities.SIMPLE);
|
game.override.startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }]).ability(Abilities.SIMPLE);
|
||||||
@ -72,7 +72,7 @@ describe("Items - Temporary Stat Stage Boosters", () => {
|
|||||||
|
|
||||||
// ACC at +3 stat stages yields a x2 multiplier
|
// ACC at +3 stat stages yields a x2 multiplier
|
||||||
expect(partyMember.getAccuracyMultiplier).toHaveReturnedWith(2);
|
expect(partyMember.getAccuracyMultiplier).toHaveReturnedWith(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should increase existing stat stage multiplier by 3/10 for the rest of the boosters", async () => {
|
it("should increase existing stat stage multiplier by 3/10 for the rest of the boosters", async () => {
|
||||||
await game.classicMode.startBattle([Species.PIKACHU]);
|
await game.classicMode.startBattle([Species.PIKACHU]);
|
||||||
@ -92,7 +92,7 @@ describe("Items - Temporary Stat Stage Boosters", () => {
|
|||||||
|
|
||||||
// ATK at +1 stat stage yields a x1.5 multiplier, add 0.3 from X_ATTACK
|
// ATK at +1 stat stage yields a x1.5 multiplier, add 0.3 from X_ATTACK
|
||||||
expect(partyMember.getStatStageMultiplier).toHaveReturnedWith(1.8);
|
expect(partyMember.getStatStageMultiplier).toHaveReturnedWith(1.8);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should not increase past maximum stat stage multiplier", async () => {
|
it("should not increase past maximum stat stage multiplier", async () => {
|
||||||
game.override.startingModifier([
|
game.override.startingModifier([
|
||||||
@ -116,7 +116,7 @@ describe("Items - Temporary Stat Stage Boosters", () => {
|
|||||||
|
|
||||||
expect(partyMember.getAccuracyMultiplier).toHaveReturnedWith(3);
|
expect(partyMember.getAccuracyMultiplier).toHaveReturnedWith(3);
|
||||||
expect(partyMember.getStatStageMultiplier).toHaveReturnedWith(4);
|
expect(partyMember.getStatStageMultiplier).toHaveReturnedWith(4);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should renew how many battles are left of existing booster when picking up new booster of same type", async () => {
|
it("should renew how many battles are left of existing booster when picking up new booster of same type", async () => {
|
||||||
game.override.startingLevel(200).itemRewards([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]);
|
game.override.startingLevel(200).itemRewards([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]);
|
||||||
@ -161,5 +161,5 @@ describe("Items - Temporary Stat Stage Boosters", () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect(count).toBe(1);
|
expect(count).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -55,7 +55,7 @@ describe("Moves - Baton Pass", () => {
|
|||||||
playerPokemon = game.scene.getPlayerPokemon()!;
|
playerPokemon = game.scene.getPlayerPokemon()!;
|
||||||
expect(playerPokemon.species.speciesId).toEqual(Species.SHUCKLE);
|
expect(playerPokemon.species.speciesId).toEqual(Species.SHUCKLE);
|
||||||
expect(playerPokemon.getStatStage(Stat.SPATK)).toEqual(2);
|
expect(playerPokemon.getStatStage(Stat.SPATK)).toEqual(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("passes stat stage buffs when AI uses it", async () => {
|
it("passes stat stage buffs when AI uses it", async () => {
|
||||||
// arrange
|
// arrange
|
||||||
@ -87,7 +87,7 @@ describe("Moves - Baton Pass", () => {
|
|||||||
"SummonPhase",
|
"SummonPhase",
|
||||||
"PostSummonPhase",
|
"PostSummonPhase",
|
||||||
]);
|
]);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("doesn't transfer effects that aren't transferrable", async () => {
|
it("doesn't transfer effects that aren't transferrable", async () => {
|
||||||
game.override.enemyMoveset([Moves.SALT_CURE]);
|
game.override.enemyMoveset([Moves.SALT_CURE]);
|
||||||
@ -103,7 +103,7 @@ describe("Moves - Baton Pass", () => {
|
|||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
expect(player2.findTag(t => t.tagType === BattlerTagType.SALT_CURED)).toBeUndefined();
|
expect(player2.findTag(t => t.tagType === BattlerTagType.SALT_CURED)).toBeUndefined();
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("doesn't allow binding effects from the user to persist", async () => {
|
it("doesn't allow binding effects from the user to persist", async () => {
|
||||||
game.override.moveset([Moves.FIRE_SPIN, Moves.BATON_PASS]);
|
game.override.moveset([Moves.FIRE_SPIN, Moves.BATON_PASS]);
|
||||||
|
@ -60,7 +60,7 @@ describe("Moves - Disable", () => {
|
|||||||
result: MoveResult.FAIL,
|
result: MoveResult.FAIL,
|
||||||
});
|
});
|
||||||
expect(enemyMon.isMoveRestricted(Moves.SPLASH)).toBe(false);
|
expect(enemyMon.isMoveRestricted(Moves.SPLASH)).toBe(false);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("causes STRUGGLE if all usable moves are disabled", async () => {
|
it("causes STRUGGLE if all usable moves are disabled", async () => {
|
||||||
await game.classicMode.startBattle();
|
await game.classicMode.startBattle();
|
||||||
@ -78,7 +78,7 @@ describe("Moves - Disable", () => {
|
|||||||
expect(enemyHistory).toHaveLength(2);
|
expect(enemyHistory).toHaveLength(2);
|
||||||
expect(enemyHistory[0].move).toBe(Moves.SPLASH);
|
expect(enemyHistory[0].move).toBe(Moves.SPLASH);
|
||||||
expect(enemyHistory[1].move).toBe(Moves.STRUGGLE);
|
expect(enemyHistory[1].move).toBe(Moves.STRUGGLE);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("cannot disable STRUGGLE", async () => {
|
it("cannot disable STRUGGLE", async () => {
|
||||||
game.override.enemyMoveset([Moves.STRUGGLE]);
|
game.override.enemyMoveset([Moves.STRUGGLE]);
|
||||||
@ -94,7 +94,7 @@ describe("Moves - Disable", () => {
|
|||||||
expect(playerMon.getLastXMoves()[0].result).toBe(MoveResult.FAIL);
|
expect(playerMon.getLastXMoves()[0].result).toBe(MoveResult.FAIL);
|
||||||
expect(enemyMon.getLastXMoves()[0].move).toBe(Moves.STRUGGLE);
|
expect(enemyMon.getLastXMoves()[0].move).toBe(Moves.STRUGGLE);
|
||||||
expect(enemyMon.isMoveRestricted(Moves.STRUGGLE)).toBe(false);
|
expect(enemyMon.isMoveRestricted(Moves.STRUGGLE)).toBe(false);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("interrupts target's move when target moves after", async () => {
|
it("interrupts target's move when target moves after", async () => {
|
||||||
await game.classicMode.startBattle();
|
await game.classicMode.startBattle();
|
||||||
@ -116,7 +116,7 @@ describe("Moves - Disable", () => {
|
|||||||
result: MoveResult.SUCCESS,
|
result: MoveResult.SUCCESS,
|
||||||
});
|
});
|
||||||
expect(enemyHistory[1].result).toBe(MoveResult.FAIL);
|
expect(enemyHistory[1].result).toBe(MoveResult.FAIL);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("disables NATURE POWER, not the move invoked by it", async () => {
|
it("disables NATURE POWER, not the move invoked by it", async () => {
|
||||||
game.override.enemyMoveset([Moves.NATURE_POWER]);
|
game.override.enemyMoveset([Moves.NATURE_POWER]);
|
||||||
@ -130,7 +130,7 @@ describe("Moves - Disable", () => {
|
|||||||
|
|
||||||
expect(enemyMon.isMoveRestricted(Moves.NATURE_POWER)).toBe(true);
|
expect(enemyMon.isMoveRestricted(Moves.NATURE_POWER)).toBe(true);
|
||||||
expect(enemyMon.isMoveRestricted(enemyMon.getLastXMoves(2)[0].move)).toBe(false);
|
expect(enemyMon.isMoveRestricted(enemyMon.getLastXMoves(2)[0].move)).toBe(false);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("disables most recent move", async () => {
|
it("disables most recent move", async () => {
|
||||||
game.override.enemyMoveset([Moves.SPLASH, Moves.TACKLE]);
|
game.override.enemyMoveset([Moves.SPLASH, Moves.TACKLE]);
|
||||||
@ -150,5 +150,5 @@ describe("Moves - Disable", () => {
|
|||||||
|
|
||||||
expect(enemyMon.isMoveRestricted(Moves.TACKLE)).toBe(true);
|
expect(enemyMon.isMoveRestricted(Moves.TACKLE)).toBe(true);
|
||||||
expect(enemyMon.isMoveRestricted(Moves.SPLASH)).toBe(false);
|
expect(enemyMon.isMoveRestricted(Moves.SPLASH)).toBe(false);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -59,7 +59,7 @@ describe("Moves - Dynamax Cannon", () => {
|
|||||||
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(dynamaxCannon.id);
|
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(dynamaxCannon.id);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(100);
|
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(100);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should return 100 power against an enemy at level cap", async () => {
|
it("should return 100 power against an enemy at level cap", async () => {
|
||||||
game.override.enemyLevel(10);
|
game.override.enemyLevel(10);
|
||||||
@ -71,7 +71,7 @@ describe("Moves - Dynamax Cannon", () => {
|
|||||||
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(dynamaxCannon.id);
|
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(dynamaxCannon.id);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(100);
|
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(100);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should return 120 power against an enemy 1% above level cap", async () => {
|
it("should return 120 power against an enemy 1% above level cap", async () => {
|
||||||
game.override.enemyLevel(101);
|
game.override.enemyLevel(101);
|
||||||
@ -86,7 +86,7 @@ describe("Moves - Dynamax Cannon", () => {
|
|||||||
vi.spyOn(game.scene, "getMaxExpLevel").mockReturnValue(100);
|
vi.spyOn(game.scene, "getMaxExpLevel").mockReturnValue(100);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(120);
|
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(120);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should return 140 power against an enemy 2% above level capp", async () => {
|
it("should return 140 power against an enemy 2% above level capp", async () => {
|
||||||
game.override.enemyLevel(102);
|
game.override.enemyLevel(102);
|
||||||
@ -101,7 +101,7 @@ describe("Moves - Dynamax Cannon", () => {
|
|||||||
vi.spyOn(game.scene, "getMaxExpLevel").mockReturnValue(100);
|
vi.spyOn(game.scene, "getMaxExpLevel").mockReturnValue(100);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(140);
|
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(140);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should return 160 power against an enemy 3% above level cap", async () => {
|
it("should return 160 power against an enemy 3% above level cap", async () => {
|
||||||
game.override.enemyLevel(103);
|
game.override.enemyLevel(103);
|
||||||
@ -116,7 +116,7 @@ describe("Moves - Dynamax Cannon", () => {
|
|||||||
vi.spyOn(game.scene, "getMaxExpLevel").mockReturnValue(100);
|
vi.spyOn(game.scene, "getMaxExpLevel").mockReturnValue(100);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(160);
|
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(160);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should return 180 power against an enemy 4% above level cap", async () => {
|
it("should return 180 power against an enemy 4% above level cap", async () => {
|
||||||
game.override.enemyLevel(104);
|
game.override.enemyLevel(104);
|
||||||
@ -131,7 +131,7 @@ describe("Moves - Dynamax Cannon", () => {
|
|||||||
vi.spyOn(game.scene, "getMaxExpLevel").mockReturnValue(100);
|
vi.spyOn(game.scene, "getMaxExpLevel").mockReturnValue(100);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(180);
|
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(180);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should return 200 power against an enemy 5% above level cap", async () => {
|
it("should return 200 power against an enemy 5% above level cap", async () => {
|
||||||
game.override.enemyLevel(105);
|
game.override.enemyLevel(105);
|
||||||
@ -146,7 +146,7 @@ describe("Moves - Dynamax Cannon", () => {
|
|||||||
vi.spyOn(game.scene, "getMaxExpLevel").mockReturnValue(100);
|
vi.spyOn(game.scene, "getMaxExpLevel").mockReturnValue(100);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(200);
|
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(200);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should return 200 power against an enemy way above level cap", async () => {
|
it("should return 200 power against an enemy way above level cap", async () => {
|
||||||
game.override.enemyLevel(999);
|
game.override.enemyLevel(999);
|
||||||
@ -159,5 +159,5 @@ describe("Moves - Dynamax Cannon", () => {
|
|||||||
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(dynamaxCannon.id);
|
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(dynamaxCannon.id);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(200);
|
expect(dynamaxCannon.calculateBattlePower).toHaveLastReturnedWith(200);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -45,5 +45,5 @@ describe("Moves - Fusion Bolt", () => {
|
|||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
expect(initialHp - partyMember.hp).toBe(0);
|
expect(initialHp - partyMember.hp).toBe(0);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -64,7 +64,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
|
|||||||
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionBolt.id);
|
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionBolt.id);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(fusionBolt.calculateBattlePower).toHaveLastReturnedWith(200);
|
expect(fusionBolt.calculateBattlePower).toHaveLastReturnedWith(200);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("FUSION_BOLT should double power of subsequent FUSION_FLARE", async () => {
|
it("FUSION_BOLT should double power of subsequent FUSION_FLARE", async () => {
|
||||||
await game.classicMode.startBattle([Species.ZEKROM, Species.ZEKROM]);
|
await game.classicMode.startBattle([Species.ZEKROM, Species.ZEKROM]);
|
||||||
@ -84,7 +84,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
|
|||||||
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionFlare.id);
|
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionFlare.id);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(fusionFlare.calculateBattlePower).toHaveLastReturnedWith(200);
|
expect(fusionFlare.calculateBattlePower).toHaveLastReturnedWith(200);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("FUSION_FLARE should double power of subsequent FUSION_BOLT if a move failed in between", async () => {
|
it("FUSION_FLARE should double power of subsequent FUSION_BOLT if a move failed in between", async () => {
|
||||||
await game.classicMode.startBattle([Species.ZEKROM, Species.ZEKROM]);
|
await game.classicMode.startBattle([Species.ZEKROM, Species.ZEKROM]);
|
||||||
@ -109,7 +109,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
|
|||||||
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionBolt.id);
|
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionBolt.id);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(fusionBolt.calculateBattlePower).toHaveLastReturnedWith(200);
|
expect(fusionBolt.calculateBattlePower).toHaveLastReturnedWith(200);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("FUSION_FLARE should not double power of subsequent FUSION_BOLT if a move succeeded in between", async () => {
|
it("FUSION_FLARE should not double power of subsequent FUSION_BOLT if a move succeeded in between", async () => {
|
||||||
game.override.enemyMoveset(Moves.SPLASH);
|
game.override.enemyMoveset(Moves.SPLASH);
|
||||||
@ -134,7 +134,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
|
|||||||
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionBolt.id);
|
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionBolt.id);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(fusionBolt.calculateBattlePower).toHaveLastReturnedWith(100);
|
expect(fusionBolt.calculateBattlePower).toHaveLastReturnedWith(100);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("FUSION_FLARE should double power of subsequent FUSION_BOLT if moves are aimed at allies", async () => {
|
it("FUSION_FLARE should double power of subsequent FUSION_BOLT if moves are aimed at allies", async () => {
|
||||||
await game.classicMode.startBattle([Species.ZEKROM, Species.RESHIRAM]);
|
await game.classicMode.startBattle([Species.ZEKROM, Species.RESHIRAM]);
|
||||||
@ -154,7 +154,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
|
|||||||
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionFlare.id);
|
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionFlare.id);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(fusionFlare.calculateBattlePower).toHaveLastReturnedWith(200);
|
expect(fusionFlare.calculateBattlePower).toHaveLastReturnedWith(200);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("FUSION_FLARE and FUSION_BOLT alternating throughout turn should double power of subsequent moves", async () => {
|
it("FUSION_FLARE and FUSION_BOLT alternating throughout turn should double power of subsequent moves", async () => {
|
||||||
game.override.enemyMoveset(fusionFlare.id);
|
game.override.enemyMoveset(fusionFlare.id);
|
||||||
@ -208,7 +208,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
|
|||||||
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionFlare.id);
|
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionFlare.id);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(fusionFlare.calculateBattlePower).toHaveLastReturnedWith(200);
|
expect(fusionFlare.calculateBattlePower).toHaveLastReturnedWith(200);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("FUSION_FLARE and FUSION_BOLT alternating throughout turn should double power of subsequent moves if moves are aimed at allies", async () => {
|
it("FUSION_FLARE and FUSION_BOLT alternating throughout turn should double power of subsequent moves if moves are aimed at allies", async () => {
|
||||||
game.override.enemyMoveset(fusionFlare.id);
|
game.override.enemyMoveset(fusionFlare.id);
|
||||||
@ -262,5 +262,5 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
|
|||||||
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionFlare.id);
|
expect((game.scene.getCurrentPhase() as MoveEffectPhase).move.id).toBe(fusionFlare.id);
|
||||||
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
await game.phaseInterceptor.to(DamageAnimPhase, false);
|
||||||
expect(fusionFlare.calculateBattlePower).toHaveLastReturnedWith(200);
|
expect(fusionFlare.calculateBattlePower).toHaveLastReturnedWith(200);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -52,7 +52,7 @@ describe("Moves - Gigaton Hammer", () => {
|
|||||||
const enemy2 = game.scene.getEnemyPokemon()!;
|
const enemy2 = game.scene.getEnemyPokemon()!;
|
||||||
|
|
||||||
expect(enemy2.hp).toBe(enemy2.getMaxHp());
|
expect(enemy2.hp).toBe(enemy2.getMaxHp());
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("can be used again if recalled and sent back out", async () => {
|
it("can be used again if recalled and sent back out", async () => {
|
||||||
game.override.startingWave(4);
|
game.override.startingWave(4);
|
||||||
@ -75,5 +75,5 @@ describe("Moves - Gigaton Hammer", () => {
|
|||||||
const enemy2 = game.scene.getEnemyPokemon()!;
|
const enemy2 = game.scene.getEnemyPokemon()!;
|
||||||
|
|
||||||
expect(enemy2.hp).toBeLessThan(enemy2.getMaxHp());
|
expect(enemy2.hp).toBeLessThan(enemy2.getMaxHp());
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -42,5 +42,5 @@ describe("Moves - Growth", () => {
|
|||||||
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase);
|
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase);
|
||||||
|
|
||||||
expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1);
|
expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -50,7 +50,7 @@ describe("Moves - Guard Split", () => {
|
|||||||
|
|
||||||
expect(player.getStat(Stat.SPDEF, false)).toBe(avgSpDef);
|
expect(player.getStat(Stat.SPDEF, false)).toBe(avgSpDef);
|
||||||
expect(enemy.getStat(Stat.SPDEF, false)).toBe(avgSpDef);
|
expect(enemy.getStat(Stat.SPDEF, false)).toBe(avgSpDef);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should be idempotent", async () => {
|
it("should be idempotent", async () => {
|
||||||
game.override.enemyMoveset([Moves.GUARD_SPLIT]);
|
game.override.enemyMoveset([Moves.GUARD_SPLIT]);
|
||||||
@ -73,5 +73,5 @@ describe("Moves - Guard Split", () => {
|
|||||||
|
|
||||||
expect(player.getStat(Stat.SPDEF, false)).toBe(avgSpDef);
|
expect(player.getStat(Stat.SPDEF, false)).toBe(avgSpDef);
|
||||||
expect(enemy.getStat(Stat.SPDEF, false)).toBe(avgSpDef);
|
expect(enemy.getStat(Stat.SPDEF, false)).toBe(avgSpDef);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -42,7 +42,7 @@ describe("Moves - Magnet Rise", () => {
|
|||||||
const finalHp = game.scene.getPlayerParty()[0].hp;
|
const finalHp = game.scene.getPlayerParty()[0].hp;
|
||||||
const hpLost = finalHp - startingHp;
|
const hpLost = finalHp - startingHp;
|
||||||
expect(hpLost).toBe(0);
|
expect(hpLost).toBe(0);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("MAGNET RISE - Gravity", async () => {
|
it("MAGNET RISE - Gravity", async () => {
|
||||||
await game.classicMode.startBattle();
|
await game.classicMode.startBattle();
|
||||||
@ -58,5 +58,5 @@ describe("Moves - Magnet Rise", () => {
|
|||||||
finalHp = game.scene.getPlayerParty()[0].hp;
|
finalHp = game.scene.getPlayerParty()[0].hp;
|
||||||
hpLost = finalHp - startingHp;
|
hpLost = finalHp - startingHp;
|
||||||
expect(hpLost).not.toBe(0);
|
expect(hpLost).not.toBe(0);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -50,7 +50,7 @@ describe("Moves - Power Split", () => {
|
|||||||
|
|
||||||
expect(player.getStat(Stat.SPATK, false)).toBe(avgSpAtk);
|
expect(player.getStat(Stat.SPATK, false)).toBe(avgSpAtk);
|
||||||
expect(enemy.getStat(Stat.SPATK, false)).toBe(avgSpAtk);
|
expect(enemy.getStat(Stat.SPATK, false)).toBe(avgSpAtk);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should be idempotent", async () => {
|
it("should be idempotent", async () => {
|
||||||
game.override.enemyMoveset([Moves.POWER_SPLIT]);
|
game.override.enemyMoveset([Moves.POWER_SPLIT]);
|
||||||
@ -73,5 +73,5 @@ describe("Moves - Power Split", () => {
|
|||||||
|
|
||||||
expect(player.getStat(Stat.SPATK, false)).toBe(avgSpAtk);
|
expect(player.getStat(Stat.SPATK, false)).toBe(avgSpAtk);
|
||||||
expect(enemy.getStat(Stat.SPATK, false)).toBe(avgSpAtk);
|
expect(enemy.getStat(Stat.SPATK, false)).toBe(avgSpAtk);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -47,5 +47,5 @@ describe("Moves - Speed Swap", () => {
|
|||||||
|
|
||||||
expect(player.getStat(Stat.SPD, false)).toBe(enemySpd);
|
expect(player.getStat(Stat.SPD, false)).toBe(enemySpd);
|
||||||
expect(enemy.getStat(Stat.SPD, false)).toBe(playerSpd);
|
expect(enemy.getStat(Stat.SPD, false)).toBe(playerSpd);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -48,7 +48,7 @@ describe("Moves - Spikes", () => {
|
|||||||
|
|
||||||
const player = game.scene.getPlayerParty()[0];
|
const player = game.scene.getPlayerParty()[0];
|
||||||
expect(player.hp).toBe(player.getMaxHp());
|
expect(player.hp).toBe(player.getMaxHp());
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should damage opposing pokemon that are forced to switch in", async () => {
|
it("should damage opposing pokemon that are forced to switch in", async () => {
|
||||||
game.override.startingWave(5);
|
game.override.startingWave(5);
|
||||||
@ -62,7 +62,7 @@ describe("Moves - Spikes", () => {
|
|||||||
|
|
||||||
const enemy = game.scene.getEnemyParty()[0];
|
const enemy = game.scene.getEnemyParty()[0];
|
||||||
expect(enemy.hp).toBeLessThan(enemy.getMaxHp());
|
expect(enemy.hp).toBeLessThan(enemy.getMaxHp());
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should damage opposing pokemon that choose to switch in", async () => {
|
it("should damage opposing pokemon that choose to switch in", async () => {
|
||||||
game.override.startingWave(5);
|
game.override.startingWave(5);
|
||||||
@ -77,7 +77,7 @@ describe("Moves - Spikes", () => {
|
|||||||
|
|
||||||
const enemy = game.scene.getEnemyParty()[0];
|
const enemy = game.scene.getEnemyParty()[0];
|
||||||
expect(enemy.hp).toBeLessThan(enemy.getMaxHp());
|
expect(enemy.hp).toBeLessThan(enemy.getMaxHp());
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should work when all targets fainted", async () => {
|
it("should work when all targets fainted", async () => {
|
||||||
game.override.enemySpecies(Species.DIGLETT);
|
game.override.enemySpecies(Species.DIGLETT);
|
||||||
@ -90,5 +90,5 @@ describe("Moves - Spikes", () => {
|
|||||||
await game.phaseInterceptor.to("TurnEndPhase");
|
await game.phaseInterceptor.to("TurnEndPhase");
|
||||||
|
|
||||||
expect(game.scene.arena.getTagOnSide(ArenaTrapTag, ArenaTagSide.ENEMY)).toBeDefined();
|
expect(game.scene.arena.getTagOnSide(ArenaTrapTag, ArenaTagSide.ENEMY)).toBeDefined();
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -43,7 +43,7 @@ describe("Moves - Tackle", () => {
|
|||||||
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnEndPhase);
|
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnEndPhase);
|
||||||
const hpLost = hpOpponent - game.scene.currentBattle.enemyParty[0].hp;
|
const hpLost = hpOpponent - game.scene.currentBattle.enemyParty[0].hp;
|
||||||
expect(hpLost).toBe(0);
|
expect(hpLost).toBe(0);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("TACKLE against not resistant", async () => {
|
it("TACKLE against not resistant", async () => {
|
||||||
const moveToUse = Moves.TACKLE;
|
const moveToUse = Moves.TACKLE;
|
||||||
@ -58,5 +58,5 @@ describe("Moves - Tackle", () => {
|
|||||||
const hpLost = hpOpponent - game.scene.currentBattle.enemyParty[0].hp;
|
const hpLost = hpOpponent - game.scene.currentBattle.enemyParty[0].hp;
|
||||||
expect(hpLost).toBeGreaterThan(0);
|
expect(hpLost).toBeGreaterThan(0);
|
||||||
expect(hpLost).toBeLessThan(4);
|
expect(hpLost).toBeLessThan(4);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -45,5 +45,5 @@ describe("Moves - Tail whip", () => {
|
|||||||
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase);
|
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase);
|
||||||
|
|
||||||
expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(-1);
|
expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(-1);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -62,7 +62,7 @@ describe("Moves - Tera Blast", () => {
|
|||||||
await game.phaseInterceptor.to("MoveEffectPhase");
|
await game.phaseInterceptor.to("MoveEffectPhase");
|
||||||
|
|
||||||
expect(spy).toHaveReturnedWith(2);
|
expect(spy).toHaveReturnedWith(2);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("increases power if user is Stellar tera type", async () => {
|
it("increases power if user is Stellar tera type", async () => {
|
||||||
await game.classicMode.startBattle();
|
await game.classicMode.startBattle();
|
||||||
|
@ -45,7 +45,7 @@ describe("Moves - Tidy Up", () => {
|
|||||||
game.move.select(Moves.TIDY_UP);
|
game.move.select(Moves.TIDY_UP);
|
||||||
await game.phaseInterceptor.to(MoveEndPhase);
|
await game.phaseInterceptor.to(MoveEndPhase);
|
||||||
expect(game.scene.arena.getTag(ArenaTagType.SPIKES)).toBeUndefined();
|
expect(game.scene.arena.getTag(ArenaTagType.SPIKES)).toBeUndefined();
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("stealth rocks are cleared", async () => {
|
it("stealth rocks are cleared", async () => {
|
||||||
game.override.moveset([Moves.STEALTH_ROCK, Moves.TIDY_UP]).enemyMoveset(Moves.STEALTH_ROCK);
|
game.override.moveset([Moves.STEALTH_ROCK, Moves.TIDY_UP]).enemyMoveset(Moves.STEALTH_ROCK);
|
||||||
@ -56,7 +56,7 @@ describe("Moves - Tidy Up", () => {
|
|||||||
game.move.select(Moves.TIDY_UP);
|
game.move.select(Moves.TIDY_UP);
|
||||||
await game.phaseInterceptor.to(MoveEndPhase);
|
await game.phaseInterceptor.to(MoveEndPhase);
|
||||||
expect(game.scene.arena.getTag(ArenaTagType.STEALTH_ROCK)).toBeUndefined();
|
expect(game.scene.arena.getTag(ArenaTagType.STEALTH_ROCK)).toBeUndefined();
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("toxic spikes are cleared", async () => {
|
it("toxic spikes are cleared", async () => {
|
||||||
game.override.moveset([Moves.TOXIC_SPIKES, Moves.TIDY_UP]).enemyMoveset(Moves.TOXIC_SPIKES);
|
game.override.moveset([Moves.TOXIC_SPIKES, Moves.TIDY_UP]).enemyMoveset(Moves.TOXIC_SPIKES);
|
||||||
@ -67,7 +67,7 @@ describe("Moves - Tidy Up", () => {
|
|||||||
game.move.select(Moves.TIDY_UP);
|
game.move.select(Moves.TIDY_UP);
|
||||||
await game.phaseInterceptor.to(MoveEndPhase);
|
await game.phaseInterceptor.to(MoveEndPhase);
|
||||||
expect(game.scene.arena.getTag(ArenaTagType.TOXIC_SPIKES)).toBeUndefined();
|
expect(game.scene.arena.getTag(ArenaTagType.TOXIC_SPIKES)).toBeUndefined();
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("sticky webs are cleared", async () => {
|
it("sticky webs are cleared", async () => {
|
||||||
game.override.moveset([Moves.STICKY_WEB, Moves.TIDY_UP]).enemyMoveset(Moves.STICKY_WEB);
|
game.override.moveset([Moves.STICKY_WEB, Moves.TIDY_UP]).enemyMoveset(Moves.STICKY_WEB);
|
||||||
@ -79,7 +79,7 @@ describe("Moves - Tidy Up", () => {
|
|||||||
game.move.select(Moves.TIDY_UP);
|
game.move.select(Moves.TIDY_UP);
|
||||||
await game.phaseInterceptor.to(MoveEndPhase);
|
await game.phaseInterceptor.to(MoveEndPhase);
|
||||||
expect(game.scene.arena.getTag(ArenaTagType.STICKY_WEB)).toBeUndefined();
|
expect(game.scene.arena.getTag(ArenaTagType.STICKY_WEB)).toBeUndefined();
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("substitutes are cleared", async () => {
|
it("substitutes are cleared", async () => {
|
||||||
game.override.moveset([Moves.SUBSTITUTE, Moves.TIDY_UP]).enemyMoveset(Moves.SUBSTITUTE);
|
game.override.moveset([Moves.SUBSTITUTE, Moves.TIDY_UP]).enemyMoveset(Moves.SUBSTITUTE);
|
||||||
@ -96,7 +96,7 @@ describe("Moves - Tidy Up", () => {
|
|||||||
expect(p).toBeDefined();
|
expect(p).toBeDefined();
|
||||||
expect(p!.getTag(SubstituteTag)).toBeUndefined();
|
expect(p!.getTag(SubstituteTag)).toBeUndefined();
|
||||||
});
|
});
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("user's stats are raised with no traps set", async () => {
|
it("user's stats are raised with no traps set", async () => {
|
||||||
await game.classicMode.startBattle();
|
await game.classicMode.startBattle();
|
||||||
@ -111,5 +111,5 @@ describe("Moves - Tidy Up", () => {
|
|||||||
|
|
||||||
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(1);
|
expect(playerPokemon.getStatStage(Stat.ATK)).toBe(1);
|
||||||
expect(playerPokemon.getStatStage(Stat.SPD)).toBe(1);
|
expect(playerPokemon.getStatStage(Stat.SPD)).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -50,7 +50,7 @@ describe("Moves - U-turn", () => {
|
|||||||
);
|
);
|
||||||
expect(game.phaseInterceptor.log).toContain("SwitchSummonPhase");
|
expect(game.phaseInterceptor.log).toContain("SwitchSummonPhase");
|
||||||
expect(game.scene.getPlayerPokemon()!.species.speciesId).toBe(Species.SHUCKLE);
|
expect(game.scene.getPlayerPokemon()!.species.speciesId).toBe(Species.SHUCKLE);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("triggers rough skin on the u-turn user before a new pokemon is switched in", async () => {
|
it("triggers rough skin on the u-turn user before a new pokemon is switched in", async () => {
|
||||||
// arrange
|
// arrange
|
||||||
@ -68,7 +68,7 @@ describe("Moves - U-turn", () => {
|
|||||||
expect(game.scene.getEnemyPokemon()!.waveData.abilityRevealed).toBe(true); // proxy for asserting ability activated
|
expect(game.scene.getEnemyPokemon()!.waveData.abilityRevealed).toBe(true); // proxy for asserting ability activated
|
||||||
expect(playerPkm.species.speciesId).toEqual(Species.RAICHU);
|
expect(playerPkm.species.speciesId).toEqual(Species.RAICHU);
|
||||||
expect(game.phaseInterceptor.log).not.toContain("SwitchSummonPhase");
|
expect(game.phaseInterceptor.log).not.toContain("SwitchSummonPhase");
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("triggers contact abilities on the u-turn user (eg poison point) before a new pokemon is switched in", async () => {
|
it("triggers contact abilities on the u-turn user (eg poison point) before a new pokemon is switched in", async () => {
|
||||||
// arrange
|
// arrange
|
||||||
@ -86,7 +86,7 @@ describe("Moves - U-turn", () => {
|
|||||||
expect(playerPkm.species.speciesId).toEqual(Species.RAICHU);
|
expect(playerPkm.species.speciesId).toEqual(Species.RAICHU);
|
||||||
expect(game.scene.getEnemyPokemon()!.waveData.abilityRevealed).toBe(true); // proxy for asserting ability activated
|
expect(game.scene.getEnemyPokemon()!.waveData.abilityRevealed).toBe(true); // proxy for asserting ability activated
|
||||||
expect(game.phaseInterceptor.log).not.toContain("SwitchSummonPhase");
|
expect(game.phaseInterceptor.log).not.toContain("SwitchSummonPhase");
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("still forces a switch if u-turn KO's the opponent", async () => {
|
it("still forces a switch if u-turn KO's the opponent", async () => {
|
||||||
game.override.startingLevel(1000); // Ensure that U-Turn KO's the opponent
|
game.override.startingLevel(1000); // Ensure that U-Turn KO's the opponent
|
||||||
|
@ -305,7 +305,7 @@ describe("The Winstrate Challenge - Mystery Encounter", () => {
|
|||||||
) as ModifierSelectUiHandler;
|
) as ModifierSelectUiHandler;
|
||||||
expect(modifierSelectHandler.options.length).toEqual(1);
|
expect(modifierSelectHandler.options.length).toEqual(1);
|
||||||
expect(modifierSelectHandler.options[0].modifierTypeOption.type.id).toBe("MYSTERY_ENCOUNTER_MACHO_BRACE");
|
expect(modifierSelectHandler.options[0].modifierTypeOption.type.id).toBe("MYSTERY_ENCOUNTER_MACHO_BRACE");
|
||||||
}, 15000);
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Option 2 - Refuse the Challenge", () => {
|
describe("Option 2 - Refuse the Challenge", () => {
|
||||||
|
@ -51,6 +51,6 @@ describe("Phases", () => {
|
|||||||
scene.unshiftPhase(unavailablePhase);
|
scene.unshiftPhase(unavailablePhase);
|
||||||
await game.phaseInterceptor.to(UnavailablePhase);
|
await game.phaseInterceptor.to(UnavailablePhase);
|
||||||
expect(scene.ui.getMode()).to.equal(UiMode.UNAVAILABLE);
|
expect(scene.ui.getMode()).to.equal(UiMode.UNAVAILABLE);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -43,7 +43,7 @@ describe("Reload", () => {
|
|||||||
const postReloadRngState = Phaser.Math.RND.state();
|
const postReloadRngState = Phaser.Math.RND.state();
|
||||||
|
|
||||||
expect(preReloadRngState).toBe(postReloadRngState);
|
expect(preReloadRngState).toBe(postReloadRngState);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should not have RNG inconsistencies after a biome switch", async () => {
|
it("should not have RNG inconsistencies after a biome switch", async () => {
|
||||||
game.override
|
game.override
|
||||||
@ -75,7 +75,7 @@ describe("Reload", () => {
|
|||||||
const postReloadRngState = Phaser.Math.RND.state();
|
const postReloadRngState = Phaser.Math.RND.state();
|
||||||
|
|
||||||
expect(preReloadRngState).toBe(postReloadRngState);
|
expect(preReloadRngState).toBe(postReloadRngState);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should not have weather inconsistencies after a biome switch", async () => {
|
it("should not have weather inconsistencies after a biome switch", async () => {
|
||||||
game.override
|
game.override
|
||||||
@ -101,7 +101,7 @@ describe("Reload", () => {
|
|||||||
const postReloadWeather = game.scene.arena.weather;
|
const postReloadWeather = game.scene.arena.weather;
|
||||||
|
|
||||||
expect(postReloadWeather).toStrictEqual(preReloadWeather);
|
expect(postReloadWeather).toStrictEqual(preReloadWeather);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should not have RNG inconsistencies at a Daily run wild Pokemon fight", async () => {
|
it("should not have RNG inconsistencies at a Daily run wild Pokemon fight", async () => {
|
||||||
await game.dailyMode.startBattle();
|
await game.dailyMode.startBattle();
|
||||||
@ -113,7 +113,7 @@ describe("Reload", () => {
|
|||||||
const postReloadRngState = Phaser.Math.RND.state();
|
const postReloadRngState = Phaser.Math.RND.state();
|
||||||
|
|
||||||
expect(preReloadRngState).toBe(postReloadRngState);
|
expect(preReloadRngState).toBe(postReloadRngState);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should not have RNG inconsistencies at a Daily run double battle", async () => {
|
it("should not have RNG inconsistencies at a Daily run double battle", async () => {
|
||||||
game.override.battleStyle("double");
|
game.override.battleStyle("double");
|
||||||
@ -126,7 +126,7 @@ describe("Reload", () => {
|
|||||||
const postReloadRngState = Phaser.Math.RND.state();
|
const postReloadRngState = Phaser.Math.RND.state();
|
||||||
|
|
||||||
expect(preReloadRngState).toBe(postReloadRngState);
|
expect(preReloadRngState).toBe(postReloadRngState);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should not have RNG inconsistencies at a Daily run Gym Leader fight", async () => {
|
it("should not have RNG inconsistencies at a Daily run Gym Leader fight", async () => {
|
||||||
game.override.battleStyle("single").startingWave(40);
|
game.override.battleStyle("single").startingWave(40);
|
||||||
@ -139,7 +139,7 @@ describe("Reload", () => {
|
|||||||
const postReloadRngState = Phaser.Math.RND.state();
|
const postReloadRngState = Phaser.Math.RND.state();
|
||||||
|
|
||||||
expect(preReloadRngState).toBe(postReloadRngState);
|
expect(preReloadRngState).toBe(postReloadRngState);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should not have RNG inconsistencies at a Daily run regular trainer fight", async () => {
|
it("should not have RNG inconsistencies at a Daily run regular trainer fight", async () => {
|
||||||
game.override.battleStyle("single").startingWave(45);
|
game.override.battleStyle("single").startingWave(45);
|
||||||
@ -152,7 +152,7 @@ describe("Reload", () => {
|
|||||||
const postReloadRngState = Phaser.Math.RND.state();
|
const postReloadRngState = Phaser.Math.RND.state();
|
||||||
|
|
||||||
expect(preReloadRngState).toBe(postReloadRngState);
|
expect(preReloadRngState).toBe(postReloadRngState);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("should not have RNG inconsistencies at a Daily run wave 50 Boss fight", async () => {
|
it("should not have RNG inconsistencies at a Daily run wave 50 Boss fight", async () => {
|
||||||
game.override.battleStyle("single").startingWave(50);
|
game.override.battleStyle("single").startingWave(50);
|
||||||
@ -165,5 +165,5 @@ describe("Reload", () => {
|
|||||||
const postReloadRngState = Phaser.Math.RND.state();
|
const postReloadRngState = Phaser.Math.RND.state();
|
||||||
|
|
||||||
expect(preReloadRngState).toBe(postReloadRngState);
|
expect(preReloadRngState).toBe(postReloadRngState);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -94,7 +94,7 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getPlayerParty()[0].shiny).toBe(true);
|
expect(game.scene.getPlayerParty()[0].shiny).toBe(true);
|
||||||
expect(game.scene.getPlayerParty()[0].variant).toBe(2);
|
expect(game.scene.getPlayerParty()[0].variant).toBe(2);
|
||||||
expect(game.scene.getPlayerParty()[0].gender).toBe(Gender.MALE);
|
expect(game.scene.getPlayerParty()[0].gender).toBe(Gender.MALE);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("Bulbasaur - shiny - variant 2 female hardy overgrow", async () => {
|
it("Bulbasaur - shiny - variant 2 female hardy overgrow", async () => {
|
||||||
await game.importData("./test/testUtils/saves/everything.prsv");
|
await game.importData("./test/testUtils/saves/everything.prsv");
|
||||||
@ -156,7 +156,7 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getPlayerParty()[0].variant).toBe(2);
|
expect(game.scene.getPlayerParty()[0].variant).toBe(2);
|
||||||
expect(game.scene.getPlayerParty()[0].nature).toBe(Nature.HARDY);
|
expect(game.scene.getPlayerParty()[0].nature).toBe(Nature.HARDY);
|
||||||
expect(game.scene.getPlayerParty()[0].getAbility().id).toBe(Abilities.OVERGROW);
|
expect(game.scene.getPlayerParty()[0].getAbility().id).toBe(Abilities.OVERGROW);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("Bulbasaur - shiny - variant 2 female lonely chlorophyl", async () => {
|
it("Bulbasaur - shiny - variant 2 female lonely chlorophyl", async () => {
|
||||||
await game.importData("./test/testUtils/saves/everything.prsv");
|
await game.importData("./test/testUtils/saves/everything.prsv");
|
||||||
@ -221,7 +221,7 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getPlayerParty()[0].gender).toBe(Gender.FEMALE);
|
expect(game.scene.getPlayerParty()[0].gender).toBe(Gender.FEMALE);
|
||||||
expect(game.scene.getPlayerParty()[0].nature).toBe(Nature.LONELY);
|
expect(game.scene.getPlayerParty()[0].nature).toBe(Nature.LONELY);
|
||||||
expect(game.scene.getPlayerParty()[0].getAbility().id).toBe(Abilities.CHLOROPHYLL);
|
expect(game.scene.getPlayerParty()[0].getAbility().id).toBe(Abilities.CHLOROPHYLL);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("Bulbasaur - shiny - variant 2 female", async () => {
|
it("Bulbasaur - shiny - variant 2 female", async () => {
|
||||||
await game.importData("./test/testUtils/saves/everything.prsv");
|
await game.importData("./test/testUtils/saves/everything.prsv");
|
||||||
@ -282,7 +282,7 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getPlayerParty()[0].shiny).toBe(true);
|
expect(game.scene.getPlayerParty()[0].shiny).toBe(true);
|
||||||
expect(game.scene.getPlayerParty()[0].variant).toBe(2);
|
expect(game.scene.getPlayerParty()[0].variant).toBe(2);
|
||||||
expect(game.scene.getPlayerParty()[0].gender).toBe(Gender.FEMALE);
|
expect(game.scene.getPlayerParty()[0].gender).toBe(Gender.FEMALE);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("Bulbasaur - not shiny", async () => {
|
it("Bulbasaur - not shiny", async () => {
|
||||||
await game.importData("./test/testUtils/saves/everything.prsv");
|
await game.importData("./test/testUtils/saves/everything.prsv");
|
||||||
@ -342,7 +342,7 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.BULBASAUR);
|
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.BULBASAUR);
|
||||||
expect(game.scene.getPlayerParty()[0].shiny).toBe(false);
|
expect(game.scene.getPlayerParty()[0].shiny).toBe(false);
|
||||||
expect(game.scene.getPlayerParty()[0].variant).toBe(0);
|
expect(game.scene.getPlayerParty()[0].variant).toBe(0);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("Bulbasaur - shiny - variant 1", async () => {
|
it("Bulbasaur - shiny - variant 1", async () => {
|
||||||
await game.importData("./test/testUtils/saves/everything.prsv");
|
await game.importData("./test/testUtils/saves/everything.prsv");
|
||||||
@ -404,7 +404,7 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.BULBASAUR);
|
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.BULBASAUR);
|
||||||
expect(game.scene.getPlayerParty()[0].shiny).toBe(true);
|
expect(game.scene.getPlayerParty()[0].shiny).toBe(true);
|
||||||
expect(game.scene.getPlayerParty()[0].variant).toBe(1);
|
expect(game.scene.getPlayerParty()[0].variant).toBe(1);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("Bulbasaur - shiny - variant 0", async () => {
|
it("Bulbasaur - shiny - variant 0", async () => {
|
||||||
await game.importData("./test/testUtils/saves/everything.prsv");
|
await game.importData("./test/testUtils/saves/everything.prsv");
|
||||||
@ -465,7 +465,7 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.BULBASAUR);
|
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.BULBASAUR);
|
||||||
expect(game.scene.getPlayerParty()[0].shiny).toBe(true);
|
expect(game.scene.getPlayerParty()[0].shiny).toBe(true);
|
||||||
expect(game.scene.getPlayerParty()[0].variant).toBe(0);
|
expect(game.scene.getPlayerParty()[0].variant).toBe(0);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("Check if first pokemon in party is caterpie from gen 1 and 1rd row, 3rd column", async () => {
|
it("Check if first pokemon in party is caterpie from gen 1 and 1rd row, 3rd column", async () => {
|
||||||
await game.importData("./test/testUtils/saves/everything.prsv");
|
await game.importData("./test/testUtils/saves/everything.prsv");
|
||||||
@ -529,7 +529,7 @@ describe("UI - Starter select", () => {
|
|||||||
});
|
});
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
||||||
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.CATERPIE);
|
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.CATERPIE);
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("Check if first pokemon in party is nidoran_m from gen 1 and 2nd row, 4th column (cursor (9+4)-1)", async () => {
|
it("Check if first pokemon in party is nidoran_m from gen 1 and 2nd row, 4th column (cursor (9+4)-1)", async () => {
|
||||||
await game.importData("./test/testUtils/saves/everything.prsv");
|
await game.importData("./test/testUtils/saves/everything.prsv");
|
||||||
@ -595,5 +595,5 @@ describe("UI - Starter select", () => {
|
|||||||
});
|
});
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
||||||
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.NIDORAN_M);
|
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.NIDORAN_M);
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
@ -76,7 +76,7 @@ describe("UI - Transfer Items", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await game.phaseInterceptor.to("SelectModifierPhase");
|
await game.phaseInterceptor.to("SelectModifierPhase");
|
||||||
}, 20000);
|
});
|
||||||
|
|
||||||
it("check transfer option for pokemon to transfer to", async () => {
|
it("check transfer option for pokemon to transfer to", async () => {
|
||||||
game.onNextPrompt("SelectModifierPhase", UiMode.PARTY, () => {
|
game.onNextPrompt("SelectModifierPhase", UiMode.PARTY, () => {
|
||||||
@ -97,5 +97,5 @@ describe("UI - Transfer Items", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await game.phaseInterceptor.to("SelectModifierPhase");
|
await game.phaseInterceptor.to("SelectModifierPhase");
|
||||||
}, 20000);
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user