Test for respecting TR
This commit is contained in:
parent
22a2905cf8
commit
2fbcd28ea8
|
@ -59,7 +59,7 @@ describe("Moves - Quash", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("makes multiple quashed targets move in speed order at the end of the turn", async () => {
|
it("makes multiple quashed targets move in speed order at the end of the turn", async () => {
|
||||||
game.override.enemySpecies(Species.REGIELEKI)
|
game.override.enemySpecies(Species.NINJASK)
|
||||||
.enemyLevel(100);
|
.enemyLevel(100);
|
||||||
|
|
||||||
await game.classicMode.startBattle([ Species.ACCELGOR, Species.RATTATA ]);
|
await game.classicMode.startBattle([ Species.ACCELGOR, Species.RATTATA ]);
|
||||||
|
@ -75,4 +75,25 @@ describe("Moves - Quash", () => {
|
||||||
expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.SUNNY);
|
expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.SUNNY);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("respects trick room", async () => {
|
||||||
|
game.override.enemyMoveset([ Moves.RAIN_DANCE, Moves.SPLASH, Moves.TRICK_ROOM ]);
|
||||||
|
|
||||||
|
await game.classicMode.startBattle([ Species.ACCELGOR, Species.RATTATA ]);
|
||||||
|
game.move.select(Moves.SPLASH, 0);
|
||||||
|
game.move.select(Moves.SPLASH, 1);
|
||||||
|
|
||||||
|
await game.forceEnemyMove(Moves.TRICK_ROOM);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH);
|
||||||
|
await game.phaseInterceptor.to("TurnInitPhase");
|
||||||
|
// both users are quashed - accelgor should move last w/ TR so rain should be up at end of turn
|
||||||
|
game.move.select(Moves.RAIN_DANCE, 0);
|
||||||
|
game.move.select(Moves.SUNNY_DAY, 1);
|
||||||
|
|
||||||
|
await game.forceEnemyMove(Moves.QUASH, BattlerIndex.PLAYER);
|
||||||
|
await game.forceEnemyMove(Moves.QUASH, BattlerIndex.PLAYER_2);
|
||||||
|
|
||||||
|
await game.phaseInterceptor.to("TurnEndPhase", false);
|
||||||
|
expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.RAIN);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue