mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-01 05:52:17 +02:00
* Add setAbility method to pokemon.ts * Edit SwitchAbilitiesAttr to use setAbility * Change AbilityGiveAttr to use setAbility * Rename setAbility to be more accurate * Fix AbilityCopyAttr * Fix AbilityChangeAttr * Fix Transform * Fix imposter * Fix PostDefendAbilityGiveAbAttr * Actually fix imposter * Actually fix transform * Fix CopyFaintedAllyAbilityAbAttr * Fix Trace * Fix PostDefendAbilitySwapAbAttr * Add tests for skill swap * Add tests for doodle * Add tests for entrainment * Add tests for role play * Add test for simple beam * Add test for transform * Add test for imposter * Add tests for mummy * Add tests for trace * Add tests for wandering spirit * Consider legendary weather when changing ability * Ensure that passives are not (re)applied when main abilities change * Add general ability swap test cases * Fix test name * Add NoMidTurnActivationAttr * Remove NoMidTurnActivationAttr from illusion * Remove extraneous call to triggerWeatherBasedFormChanges * Fix primal weather clearing * Change "MidTurn" to "OnGain" * Change NoOnGainActivationAttr to a field in PostSummonAbAttr * Add passive support * Remove redundant parentheses Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --------- Co-authored-by: damocleas <damocleas25@gmail.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import { Abilities } from "#enums/abilities";
|
|
import { Moves } from "#enums/moves";
|
|
import { Species } from "#enums/species";
|
|
import GameManager from "#test/utils/gameManager";
|
|
import Phaser from "phaser";
|
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|
|
|
describe("Moves - Simple Beam", () => {
|
|
let phaserGame: Phaser.Game;
|
|
let game: GameManager;
|
|
|
|
beforeAll(() => {
|
|
phaserGame = new Phaser.Game({
|
|
type: Phaser.HEADLESS,
|
|
});
|
|
});
|
|
|
|
afterEach(() => {
|
|
game.phaseInterceptor.restoreOg();
|
|
});
|
|
|
|
beforeEach(() => {
|
|
game = new GameManager(phaserGame);
|
|
game.override
|
|
.moveset([ Moves.SPLASH, Moves.SIMPLE_BEAM ])
|
|
.ability(Abilities.BALL_FETCH)
|
|
.battleType("single")
|
|
.disableCrits()
|
|
.enemySpecies(Species.MAGIKARP)
|
|
.enemyAbility(Abilities.BALL_FETCH)
|
|
.enemyMoveset(Moves.SPLASH);
|
|
});
|
|
|
|
it("sets the target's ability to simple", async () => {
|
|
await game.classicMode.startBattle([ Species.FEEBAS ]);
|
|
|
|
game.move.select(Moves.SIMPLE_BEAM);
|
|
await game.phaseInterceptor.to("BerryPhase");
|
|
|
|
expect(game.scene.getEnemyPokemon()?.getAbility().id).toBe(Abilities.SIMPLE);
|
|
});
|
|
});
|