mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-21 06:49:35 +02:00
added confusion test back (skipped)
This commit is contained in:
parent
d7b11550c2
commit
14ae2afb3a
@ -4,6 +4,7 @@ import { allMoves } from "#app/data/move";
|
||||
import { Abilities } from "#app/enums/abilities";
|
||||
import { ArenaTagType } from "#app/enums/arena-tag-type";
|
||||
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
||||
import { Stat } from "#app/enums/stat";
|
||||
import { StatusEffect } from "#app/enums/status-effect";
|
||||
import { WeatherType } from "#app/enums/weather-type";
|
||||
import { TurnEndPhase } from "#app/phases/turn-end-phase";
|
||||
@ -642,4 +643,33 @@ describe("Abilities - Wimp Out", () => {
|
||||
expect(enemyPokemon.turnData.hitsLeft).toBe(0);
|
||||
expect(enemyPokemon.turnData.hitCount).toBe(5);
|
||||
});
|
||||
it.skip("Wimp Out will not activate if the Pokémon's HP falls below half due to hurting itself in confusion", async () => { // This interaction is not implemented yet
|
||||
// arrange
|
||||
game.override
|
||||
.moveset([ Moves.SWORDS_DANCE ])
|
||||
.enemyMoveset([ Moves.SWAGGER ]);
|
||||
await game.startBattle([
|
||||
Species.WIMPOD,
|
||||
Species.TYRUNT
|
||||
]);
|
||||
const playerPokemon = game.scene.getPlayerPokemon()!;
|
||||
const playerHp = playerPokemon.hp;
|
||||
playerPokemon.hp = playerHp * 0.51;
|
||||
playerPokemon.setStatStage(Stat.ATK, 6);
|
||||
playerPokemon.addTag(BattlerTagType.CONFUSED);
|
||||
vi.spyOn(playerPokemon, "randSeedInt").mockReturnValue(0);
|
||||
vi.spyOn(allMoves[Moves.SWAGGER], "accuracy", "get").mockReturnValue(100);
|
||||
|
||||
// act
|
||||
while (playerPokemon.getHpRatio() > 0.49) {
|
||||
game.move.select(Moves.SWORDS_DANCE);
|
||||
game.move.select(Moves.SWAGGER);
|
||||
await game.phaseInterceptor.to(TurnEndPhase);
|
||||
}
|
||||
|
||||
// assert
|
||||
expect(playerPokemon.getHpRatio()).toBeLessThan(0.5);
|
||||
expect(game.phaseInterceptor.log).not.toContain("SwitchSummonPhase");
|
||||
expect(playerPokemon.species.speciesId).toBe(Species.WIMPOD);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user