mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-09 00:49:27 +02:00
Fixed roost tsest
This commit is contained in:
parent
26e5daea9f
commit
0a5f9c2df9
@ -44,13 +44,13 @@ describe("Moves - Roost", () => {
|
||||
|
||||
// Should lose flying type temporarily
|
||||
expect(hawlucha.getTag(BattlerTagType.ROOSTED)).toBeDefined();
|
||||
expect(hawlucha.getTypes()).toEqual([PokemonType.FIGHTING]);
|
||||
expect(hawlucha).toHaveTypes([PokemonType.FIGHTING]);
|
||||
expect(hawlucha.isGrounded()).toBe(true);
|
||||
|
||||
await game.toEndOfTurn();
|
||||
|
||||
// Should have changed back to fighting/flying
|
||||
expect(hawlucha.getTypes()).toEqual([PokemonType.FIGHTING, PokemonType.FLYING]);
|
||||
expect(hawlucha).toHaveTypes([PokemonType.FIGHTING, PokemonType.FLYING]);
|
||||
expect(hawlucha.isGrounded()).toBe(false);
|
||||
});
|
||||
|
||||
@ -64,7 +64,7 @@ describe("Moves - Roost", () => {
|
||||
await game.toEndOfTurn(false);
|
||||
|
||||
// Should remain psychic type
|
||||
expect(mew.getTypes()).toEqual([PokemonType.PSYCHIC]);
|
||||
expect(mew).toHaveTypes([PokemonType.PSYCHIC]);
|
||||
expect(mew.isGrounded()).toBe(true);
|
||||
});
|
||||
|
||||
@ -93,7 +93,7 @@ describe("Moves - Roost", () => {
|
||||
await game.toEndOfTurn(false);
|
||||
|
||||
// Should only be normal type, and NOT flying type
|
||||
expect(tornadus.getTypes()).toEqual([PokemonType.NORMAL]);
|
||||
expect(tornadus).toHaveTypes([PokemonType.NORMAL]);
|
||||
expect(tornadus.isGrounded()).toBe(true);
|
||||
});
|
||||
|
||||
@ -110,7 +110,7 @@ describe("Moves - Roost", () => {
|
||||
await game.toNextTurn();
|
||||
|
||||
// Should be pure flying type
|
||||
expect(player.getTypes()).toEqual([PokemonType.FLYING]);
|
||||
expect(player).toHaveTypes([PokemonType.FLYING]);
|
||||
expect(player.isGrounded()).toBe(false);
|
||||
|
||||
game.move.use(MoveId.ROOST);
|
||||
@ -118,13 +118,13 @@ describe("Moves - Roost", () => {
|
||||
|
||||
// Should be typeless
|
||||
expect(player.getTag(BattlerTagType.ROOSTED)).toBeDefined();
|
||||
expect(player.getTypes()).toEqual([PokemonType.UNKNOWN]);
|
||||
expect(player).toHaveTypes([PokemonType.UNKNOWN]);
|
||||
expect(player.isGrounded()).toBe(true);
|
||||
|
||||
await game.toEndOfTurn();
|
||||
|
||||
// Should go back to being pure flying
|
||||
expect(player.getTypes()).toEqual([PokemonType.FLYING]);
|
||||
expect(player).toHaveTypes([PokemonType.FLYING]);
|
||||
expect(player.isGrounded()).toBe(false);
|
||||
});
|
||||
|
||||
@ -136,17 +136,17 @@ describe("Moves - Roost", () => {
|
||||
ditto.hp = 1;
|
||||
|
||||
expect(ditto.summonData.speciesForm).toBe(SpeciesId.CORVIKNIGHT);
|
||||
expect(ditto.getTypes()).toEqual([PokemonType.STEEL, PokemonType.FLYING]);
|
||||
expect(ditto).toHaveTypes([PokemonType.STEEL, PokemonType.FLYING]);
|
||||
|
||||
game.move.use(MoveId.ROOST);
|
||||
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
|
||||
await game.phaseInterceptor.to("MoveEffectPhase"); // Roost
|
||||
|
||||
expect(ditto.getTypes()).toEqual([PokemonType.STEEL]);
|
||||
expect(ditto).toHaveTypes([PokemonType.STEEL]);
|
||||
|
||||
await game.toEndOfTurn();
|
||||
|
||||
expect(ditto.getTypes()).toEqual([PokemonType.STEEL, PokemonType.FLYING, PokemonType.GHOST]);
|
||||
expect(ditto).toHaveTypes([PokemonType.STEEL, PokemonType.FLYING, PokemonType.GHOST]);
|
||||
});
|
||||
|
||||
it("should not change normally-Flying type Pokemon with 3 types into Normal-types", async () => {
|
||||
@ -157,22 +157,22 @@ describe("Moves - Roost", () => {
|
||||
tornadus.hp = 1;
|
||||
|
||||
expect(tornadus.summonData.speciesForm).toBe(SpeciesId.CORVIKNIGHT);
|
||||
expect(tornadus.getTypes()).toEqual([PokemonType.STEEL, PokemonType.FLYING]);
|
||||
expect(tornadus).toHaveTypes([PokemonType.STEEL, PokemonType.FLYING]);
|
||||
|
||||
game.move.use(MoveId.ROOST);
|
||||
await game.move.forceEnemyMove(MoveId.TRICK_OR_TREAT);
|
||||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||
await game.phaseInterceptor.to("MoveEffectPhase"); // Trick or treat
|
||||
|
||||
expect(tornadus.getTypes()).toEqual([PokemonType.STEEL, PokemonType.FLYING, PokemonType.GHOST]);
|
||||
expect(tornadus).toHaveTypes([PokemonType.STEEL, PokemonType.FLYING, PokemonType.GHOST]);
|
||||
|
||||
await game.phaseInterceptor.to("MoveEffectPhase"); // Roost
|
||||
|
||||
expect(tornadus.getTypes()).toEqual([PokemonType.STEEL, PokemonType.GHOST]);
|
||||
expect(tornadus).toHaveTypes([PokemonType.STEEL, PokemonType.GHOST]);
|
||||
|
||||
await game.toEndOfTurn();
|
||||
|
||||
expect(tornadus.getTypes()).toEqual([PokemonType.STEEL, PokemonType.FLYING, PokemonType.GHOST]);
|
||||
expect(tornadus).toHaveTypes([PokemonType.STEEL, PokemonType.FLYING, PokemonType.GHOST]);
|
||||
});
|
||||
|
||||
it("should revert to 3 types when affected by Forest's Curse or Trick-or-Treat", async () => {
|
||||
@ -185,12 +185,12 @@ describe("Moves - Roost", () => {
|
||||
await game.move.forceEnemyMove(MoveId.TRICK_OR_TREAT);
|
||||
await game.toEndOfTurn(false);
|
||||
|
||||
expect(moltres.getTypes()).toEqual([PokemonType.FIRE, PokemonType.GHOST]);
|
||||
expect(moltres).toHaveTypes([PokemonType.FIRE, PokemonType.GHOST]);
|
||||
expect(moltres.isGrounded()).toBe(true);
|
||||
|
||||
await game.toNextTurn();
|
||||
|
||||
expect(moltres.getTypes()).toEqual([PokemonType.FIRE, PokemonType.FLYING, PokemonType.GHOST]);
|
||||
expect(moltres).toHaveTypes([PokemonType.FIRE, PokemonType.FLYING, PokemonType.GHOST]);
|
||||
expect(moltres.isGrounded()).toBe(false);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user