mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-21 14:59:26 +02:00
Fix volt absorb test
This commit is contained in:
parent
6883498095
commit
6501c3b0f7
@ -52,6 +52,7 @@ describe("Abilities - Volt Absorb", () => {
|
|||||||
expect(playerPokemon.getTag(BattlerTagType.CHARGED)).toBeDefined();
|
expect(playerPokemon.getTag(BattlerTagType.CHARGED)).toBeDefined();
|
||||||
expect(game.phaseInterceptor.log).not.toContain("ShowAbilityPhase");
|
expect(game.phaseInterceptor.log).not.toContain("ShowAbilityPhase");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should activate regardless of accuracy checks", async () => {
|
it("should activate regardless of accuracy checks", async () => {
|
||||||
game.override.moveset(Moves.THUNDERBOLT);
|
game.override.moveset(Moves.THUNDERBOLT);
|
||||||
game.override.enemyMoveset(Moves.SPLASH);
|
game.override.enemyMoveset(Moves.SPLASH);
|
||||||
@ -71,6 +72,7 @@ describe("Abilities - Volt Absorb", () => {
|
|||||||
await game.phaseInterceptor.to("BerryPhase", false);
|
await game.phaseInterceptor.to("BerryPhase", false);
|
||||||
expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp());
|
expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp());
|
||||||
});
|
});
|
||||||
|
|
||||||
it("regardless of accuracy should not trigger on pokemon in semi invulnerable state", async () => {
|
it("regardless of accuracy should not trigger on pokemon in semi invulnerable state", async () => {
|
||||||
game.override.moveset(Moves.THUNDERBOLT);
|
game.override.moveset(Moves.THUNDERBOLT);
|
||||||
game.override.enemyMoveset(Moves.DIVE);
|
game.override.enemyMoveset(Moves.DIVE);
|
||||||
@ -84,9 +86,7 @@ describe("Abilities - Volt Absorb", () => {
|
|||||||
game.move.select(Moves.THUNDERBOLT);
|
game.move.select(Moves.THUNDERBOLT);
|
||||||
enemyPokemon.hp = enemyPokemon.hp - 1;
|
enemyPokemon.hp = enemyPokemon.hp - 1;
|
||||||
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
|
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
|
||||||
await game.phaseInterceptor.to("MoveEffectPhase");
|
|
||||||
|
|
||||||
await game.move.forceMiss();
|
|
||||||
await game.phaseInterceptor.to("BerryPhase", false);
|
await game.phaseInterceptor.to("BerryPhase", false);
|
||||||
expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp());
|
expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp());
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user