mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-21 17:12:44 +02:00
Added test for status moves
This commit is contained in:
parent
3a85c7830e
commit
f49e4d647e
@ -31,7 +31,7 @@ describe("Abilities - Rattled", () => {
|
|||||||
.battleType(BattleType.TRAINER)
|
.battleType(BattleType.TRAINER)
|
||||||
.disableCrits()
|
.disableCrits()
|
||||||
.battleStyle("single")
|
.battleStyle("single")
|
||||||
.enemySpecies(SpeciesId.MAGIKARP)
|
.enemySpecies(SpeciesId.DUSKULL)
|
||||||
.enemyAbility(AbilityId.INTIMIDATE)
|
.enemyAbility(AbilityId.INTIMIDATE)
|
||||||
.enemyPassiveAbility(AbilityId.NO_GUARD);
|
.enemyPassiveAbility(AbilityId.NO_GUARD);
|
||||||
});
|
});
|
||||||
@ -66,6 +66,25 @@ describe("Abilities - Rattled", () => {
|
|||||||
expect(game.textInterceptor.logs.filter(t => t === statChangeText)).toHaveLength(enemyHits);
|
expect(game.textInterceptor.logs.filter(t => t === statChangeText)).toHaveLength(enemyHits);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it.each<{ type: string; move: MoveId }>([
|
||||||
|
{ type: "Bug", move: MoveId.POWDER },
|
||||||
|
{ type: "Ghost", move: MoveId.CONFUSE_RAY },
|
||||||
|
{ type: "Dark", move: MoveId.TAUNT },
|
||||||
|
])("should not trigger from $type-type status moves", async ({ move }) => {
|
||||||
|
game.override.enemyAbility(AbilityId.BALL_FETCH);
|
||||||
|
await game.classicMode.startBattle([SpeciesId.GIMMIGHOUL]);
|
||||||
|
|
||||||
|
game.move.use(MoveId.SPLASH);
|
||||||
|
await game.move.forceEnemyMove(move);
|
||||||
|
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||||
|
await game.phaseInterceptor.to("MoveEndPhase");
|
||||||
|
|
||||||
|
const gimmighoul = game.field.getPlayerPokemon();
|
||||||
|
expect(gimmighoul.getStatStage(Stat.SPD)).toBe(0);
|
||||||
|
expect(game.phaseInterceptor.log).not.toContain("ShowAbilityPhase");
|
||||||
|
expect(game.phaseInterceptor.log).not.toContain("StatStageChangePhase");
|
||||||
|
});
|
||||||
|
|
||||||
it("should activate after Intimidate attack drop on initial send out", async () => {
|
it("should activate after Intimidate attack drop on initial send out", async () => {
|
||||||
// `runToSummon` used instead of `startBattle` to avoid skipping past initial "post send out" effects
|
// `runToSummon` used instead of `startBattle` to avoid skipping past initial "post send out" effects
|
||||||
await game.classicMode.runToSummon([SpeciesId.GIMMIGHOUL]);
|
await game.classicMode.runToSummon([SpeciesId.GIMMIGHOUL]);
|
||||||
|
Loading…
Reference in New Issue
Block a user