mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 23:13:42 +02:00
Fixed test stuff
This commit is contained in:
parent
7da255fe57
commit
76beb6c4a1
@ -195,10 +195,9 @@ describe("Moves - Delayed Attacks", () => {
|
||||
|
||||
const MEPs = game.scene.phaseManager["phaseQueue"].findAll("MoveEffectPhase");
|
||||
expect(MEPs).toHaveLength(4);
|
||||
expect(
|
||||
MEPs.map(mep => mep.getPokemon().getBattlerIndex()),
|
||||
"Delayed Attacks were not queued in correct order!",
|
||||
).toEqual(oldOrder);
|
||||
console.log(`Expected: ${oldOrder.map(o => game.scene.getField()[o].getNameToRender())}
|
||||
Actual: ${MEPs.map(mep => mep.getPokemon().getNameToRender())}`);
|
||||
expect(MEPs.map(mep => mep.getPokemon().getBattlerIndex())).toEqual(oldOrder);
|
||||
});
|
||||
|
||||
it("should vanish silently if it would otherwise hit the user", async () => {
|
||||
|
@ -17,8 +17,6 @@ describe("Moves - Destiny Bond", () => {
|
||||
let game: GameManager;
|
||||
|
||||
const defaultParty = [SpeciesId.BULBASAUR, SpeciesId.SQUIRTLE];
|
||||
const enemyFirst = [BattlerIndex.ENEMY, BattlerIndex.PLAYER] as const;
|
||||
const playerFirst = [BattlerIndex.PLAYER, BattlerIndex.ENEMY] as const;
|
||||
|
||||
beforeAll(() => {
|
||||
phaserGame = new Phaser.Game({
|
||||
@ -52,7 +50,7 @@ describe("Moves - Destiny Bond", () => {
|
||||
const playerPokemon = game.field.getPlayerPokemon();
|
||||
|
||||
game.move.select(moveToUse);
|
||||
await game.setTurnOrder(enemyFirst);
|
||||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||
await game.phaseInterceptor.to("BerryPhase");
|
||||
|
||||
expect(enemyPokemon.isFainted()).toBe(true);
|
||||
@ -70,7 +68,7 @@ describe("Moves - Destiny Bond", () => {
|
||||
|
||||
// Turn 1: Enemy uses Destiny Bond and doesn't faint
|
||||
game.move.select(MoveId.SPLASH);
|
||||
await game.setTurnOrder(playerFirst);
|
||||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||
await game.toNextTurn();
|
||||
|
||||
expect(enemyPokemon.isFainted()).toBe(false);
|
||||
@ -78,7 +76,6 @@ describe("Moves - Destiny Bond", () => {
|
||||
|
||||
// Turn 2: Player KO's the enemy before the enemy's turn
|
||||
game.move.select(moveToUse);
|
||||
await game.setTurnOrder(playerFirst);
|
||||
await game.phaseInterceptor.to("BerryPhase");
|
||||
|
||||
expect(enemyPokemon.isFainted()).toBe(true);
|
||||
@ -96,7 +93,7 @@ describe("Moves - Destiny Bond", () => {
|
||||
|
||||
// Turn 1: Enemy uses Destiny Bond and doesn't faint
|
||||
game.move.select(MoveId.SPLASH);
|
||||
await game.setTurnOrder(enemyFirst);
|
||||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||
await game.toNextTurn();
|
||||
|
||||
expect(enemyPokemon.isFainted()).toBe(false);
|
||||
@ -104,7 +101,6 @@ describe("Moves - Destiny Bond", () => {
|
||||
|
||||
// Turn 2: Enemy should fail Destiny Bond then get KO'd
|
||||
game.move.select(moveToUse);
|
||||
await game.setTurnOrder(enemyFirst);
|
||||
await game.phaseInterceptor.to("BerryPhase");
|
||||
|
||||
expect(enemyPokemon.isFainted()).toBe(true);
|
||||
@ -122,7 +118,7 @@ describe("Moves - Destiny Bond", () => {
|
||||
const playerPokemon = game.field.getPlayerPokemon();
|
||||
|
||||
game.move.select(moveToUse);
|
||||
await game.setTurnOrder(enemyFirst);
|
||||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||
await game.phaseInterceptor.to("BerryPhase");
|
||||
|
||||
expect(enemyPokemon.isFainted()).toBe(true);
|
||||
@ -140,7 +136,7 @@ describe("Moves - Destiny Bond", () => {
|
||||
|
||||
// Turn 1: Enemy uses Destiny Bond and doesn't faint
|
||||
game.move.select(MoveId.SPORE);
|
||||
await game.setTurnOrder(enemyFirst);
|
||||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||
await game.toNextTurn();
|
||||
|
||||
expect(enemyPokemon.isFainted()).toBe(false);
|
||||
@ -149,7 +145,6 @@ describe("Moves - Destiny Bond", () => {
|
||||
|
||||
// Turn 2: Enemy should skip a turn due to sleep, then get KO'd
|
||||
game.move.select(moveToUse);
|
||||
await game.setTurnOrder(enemyFirst);
|
||||
await game.phaseInterceptor.to("BerryPhase");
|
||||
|
||||
expect(enemyPokemon.isFainted()).toBe(true);
|
||||
@ -184,7 +179,7 @@ describe("Moves - Destiny Bond", () => {
|
||||
const playerPokemon = game.field.getPlayerPokemon();
|
||||
|
||||
game.move.select(moveToUse);
|
||||
await game.setTurnOrder(enemyFirst);
|
||||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||
await game.phaseInterceptor.to("BerryPhase");
|
||||
|
||||
expect(enemyPokemon.isFainted()).toBe(true);
|
||||
@ -238,7 +233,7 @@ describe("Moves - Destiny Bond", () => {
|
||||
const playerPokemon = game.field.getPlayerPokemon();
|
||||
|
||||
game.move.select(moveToUse);
|
||||
await game.setTurnOrder(enemyFirst);
|
||||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||
await game.phaseInterceptor.to("BerryPhase");
|
||||
|
||||
expect(enemyPokemon.isFainted()).toBe(true);
|
||||
|
Loading…
Reference in New Issue
Block a user