mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-27 18:52:19 +02:00
modifying and adding tests
This commit is contained in:
parent
c37ec802ed
commit
b8ad707f8b
@ -141,4 +141,17 @@ describe("Abilities - Dry Skin", () => {
|
||||
|
||||
expect(healthGainedFromWaterShuriken).toBe(healthGainedFromWaterGun);
|
||||
});
|
||||
|
||||
it("opposing water moves still heal regardless of accuracy check", async () => {
|
||||
await game.classicMode.startBattle();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
||||
|
||||
game.move.select(Moves.WATER_GUN);
|
||||
await game.phaseInterceptor.to("MoveEffectPhase");
|
||||
|
||||
await game.move.forceMiss();
|
||||
await game.phaseInterceptor.to("BerryPhase", false);
|
||||
expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp());
|
||||
});
|
||||
});
|
||||
|
@ -126,4 +126,23 @@ describe("Abilities - Flash Fire", () => {
|
||||
|
||||
expect(flashFireDmg).toBeGreaterThan(originalDmg);
|
||||
}, 20000);
|
||||
|
||||
it("still activates regardless of accuracy check", async () => {
|
||||
game.override.moveset(Moves.FLAMETHROWER);
|
||||
game.override.enemyMoveset(Moves.SPLASH);
|
||||
game.override.enemySpecies(Species.MAGIKARP);
|
||||
game.override.enemyAbility(Abilities.FLASH_FIRE);
|
||||
|
||||
await game.classicMode.startBattle();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
||||
|
||||
game.move.select(Moves.FLAMETHROWER);
|
||||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||
await game.phaseInterceptor.to("MoveEffectPhase");
|
||||
|
||||
await game.move.forceMiss();
|
||||
await game.phaseInterceptor.to("BerryPhase", false);
|
||||
expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp());
|
||||
}, 20000);
|
||||
});
|
||||
|
@ -165,4 +165,22 @@ describe("Abilities - Sap Sipper", () => {
|
||||
expect(initialEnemyHp - enemyPokemon.hp).toBe(0);
|
||||
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(1);
|
||||
});
|
||||
|
||||
it("still activates regardless of accuracy check", async () => {
|
||||
game.override.moveset(Moves.LEAF_BLADE);
|
||||
game.override.enemyMoveset(Moves.SPLASH);
|
||||
game.override.enemySpecies(Species.MAGIKARP);
|
||||
game.override.enemyAbility(Abilities.SAP_SIPPER);
|
||||
|
||||
await game.classicMode.startBattle();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
||||
|
||||
game.move.select(Moves.LEAF_BLADE);
|
||||
await game.phaseInterceptor.to("MoveEffectPhase");
|
||||
|
||||
await game.move.forceMiss();
|
||||
await game.phaseInterceptor.to("BerryPhase", false);
|
||||
expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp());
|
||||
});
|
||||
});
|
||||
|
@ -7,6 +7,7 @@ import { Species } from "#enums/species";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
|
||||
// See also: TypeImmunityAbAttr
|
||||
describe("Abilities - Volt Absorb", () => {
|
||||
@ -62,6 +63,7 @@ describe("Abilities - Volt Absorb", () => {
|
||||
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
||||
|
||||
game.move.select(Moves.THUNDERBOLT);
|
||||
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||
await game.phaseInterceptor.to("MoveEffectPhase");
|
||||
|
||||
await game.move.forceMiss();
|
||||
|
Loading…
Reference in New Issue
Block a user