[Test] Update roost tests, related to #4164 (#4230)

* updating roost tests to be more consistent

* updating roost tests to be more consistent

* updating roost tests to be more consistent
This commit is contained in:
PrabbyDD 2024-09-13 19:14:10 -07:00 committed by GitHub
parent c76827156c
commit 63feb88eea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,4 @@
import { BattlerIndex } from "#app/battle";
import { Type } from "#app/data/type";
import { BattlerTagType } from "#app/enums/battler-tag-type";
import { Moves } from "#app/enums/moves";
@ -29,10 +30,9 @@ describe("Moves - Roost", () => {
game.override.battleType("single");
game.override.enemySpecies(Species.RELICANTH);
game.override.startingLevel(100);
game.override.enemyLevel(60);
game.override.enemyLevel(100);
game.override.enemyMoveset(Moves.EARTHQUAKE);
game.override.moveset([Moves.ROOST, Moves.BURN_UP, Moves.DOUBLE_SHOCK]);
game.override.starterForms({ [Species.ROTOM]: 4 });
});
/**
@ -55,6 +55,7 @@ describe("Moves - Roost", () => {
const playerPokemon = game.scene.getPlayerPokemon()!;
const playerPokemonStartingHP = playerPokemon.hp;
game.move.select(Moves.ROOST);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase);
// Should only be normal type, and NOT flying type
@ -81,6 +82,7 @@ describe("Moves - Roost", () => {
const playerPokemon = game.scene.getPlayerPokemon()!;
const playerPokemonStartingHP = playerPokemon.hp;
game.move.select(Moves.ROOST);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase);
// Should only be normal type, and NOT flying type
@ -108,6 +110,7 @@ describe("Moves - Roost", () => {
const playerPokemon = game.scene.getPlayerPokemon()!;
const playerPokemonStartingHP = playerPokemon.hp;
game.move.select(Moves.ROOST);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase);
// Should only be pure fighting type and grounded
@ -131,13 +134,15 @@ describe("Moves - Roost", () => {
test(
"Pokemon with levitate after using roost should lose flying type but still be unaffected by ground moves",
async () => {
game.override.starterForms({ [Species.ROTOM]: 4 });
await game.classicMode.startBattle([Species.ROTOM]);
const playerPokemon = game.scene.getPlayerPokemon()!;
const playerPokemonStartingHP = playerPokemon.hp;
game.move.select(Moves.ROOST);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase);
// Should only be pure fighting type and grounded
// Should only be pure eletric type and grounded
let playerPokemonTypes = playerPokemon.getTypes();
expect(playerPokemonTypes[0] === Type.ELECTRIC).toBeTruthy();
expect(playerPokemonTypes.length === 1).toBeTruthy();
@ -145,7 +150,7 @@ describe("Moves - Roost", () => {
await game.phaseInterceptor.to(TurnEndPhase);
// Should have lost HP and is now back to being fighting/flying
// Should have lost HP and is now back to being electric/flying
playerPokemonTypes = playerPokemon.getTypes();
expect(playerPokemon.hp).toBe(playerPokemonStartingHP);
expect(playerPokemonTypes[0] === Type.ELECTRIC).toBeTruthy();
@ -162,6 +167,7 @@ describe("Moves - Roost", () => {
const playerPokemon = game.scene.getPlayerPokemon()!;
const playerPokemonStartingHP = playerPokemon.hp;
game.move.select(Moves.BURN_UP);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase);
// Should only be pure flying type after burn up
@ -171,6 +177,7 @@ describe("Moves - Roost", () => {
await game.phaseInterceptor.to(TurnEndPhase);
game.move.select(Moves.ROOST);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase);
// Should only be typeless type after roost and is grounded
@ -200,6 +207,7 @@ describe("Moves - Roost", () => {
const playerPokemon = game.scene.getPlayerPokemon()!;
const playerPokemonStartingHP = playerPokemon.hp;
game.move.select(Moves.DOUBLE_SHOCK);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase);
// Should only be pure flying type after burn up
@ -209,6 +217,7 @@ describe("Moves - Roost", () => {
await game.phaseInterceptor.to(TurnEndPhase);
game.move.select(Moves.ROOST);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to(MoveEffectPhase);
// Should only be typeless type after roost and is grounded