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