mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-21 17:12:44 +02:00
Fixed the test and such
This commit is contained in:
parent
69d329a460
commit
c021f3206e
@ -21,7 +21,7 @@ import type { EnemyPokemon, PlayerPokemon, TurnMove } from "#app/field/pokemon";
|
|||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { ArenaTagType } from "#enums/arena-tag-type";
|
import { ArenaTagType } from "#enums/arena-tag-type";
|
||||||
import { BattleSpec } from "#enums/battle-spec";
|
import { BattleSpec } from "#enums/battle-spec";
|
||||||
import type { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
import { PlayerGender } from "#enums/player-gender";
|
import { PlayerGender } from "#enums/player-gender";
|
||||||
import { MusicPreference } from "#app/system/settings/settings";
|
import { MusicPreference } from "#app/system/settings/settings";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
@ -73,7 +73,7 @@ export default class Battle {
|
|||||||
public battleScore = 0;
|
public battleScore = 0;
|
||||||
public postBattleLoot: PokemonHeldItemModifier[] = [];
|
public postBattleLoot: PokemonHeldItemModifier[] = [];
|
||||||
public escapeAttempts = 0;
|
public escapeAttempts = 0;
|
||||||
public lastMove: MoveId;
|
public lastMove: MoveId = MoveId.NONE;
|
||||||
public battleSeed: string = randomString(16, true);
|
public battleSeed: string = randomString(16, true);
|
||||||
private battleSeedState: string | null = null;
|
private battleSeedState: string | null = null;
|
||||||
public moneyScattered = 0;
|
public moneyScattered = 0;
|
||||||
|
@ -83,7 +83,7 @@ describe("Abilities - Gorilla Tactics", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should lock into calling moves, even if also in moveset", async () => {
|
it("should lock into calling moves, even if also in moveset", async () => {
|
||||||
vi.spyOn(RandomMoveAttr.prototype, "getMoveOverride").mockReturnValue(MoveId.TACKLE);
|
vi.spyOn(RandomMoveAttr.prototype, "getMove").mockReturnValue(MoveId.TACKLE);
|
||||||
await game.classicMode.startBattle([SpeciesId.GALAR_DARMANITAN]);
|
await game.classicMode.startBattle([SpeciesId.GALAR_DARMANITAN]);
|
||||||
|
|
||||||
const darmanitan = game.scene.getPlayerPokemon()!;
|
const darmanitan = game.scene.getPlayerPokemon()!;
|
||||||
|
@ -129,7 +129,7 @@ describe("Moves - Disable", () => {
|
|||||||
{ name: "Copycat", moveId: MoveId.COPYCAT },
|
{ name: "Copycat", moveId: MoveId.COPYCAT },
|
||||||
{ name: "Metronome", moveId: MoveId.METRONOME },
|
{ name: "Metronome", moveId: MoveId.METRONOME },
|
||||||
])("should ignore virtual moves called by $name", async ({ moveId }) => {
|
])("should ignore virtual moves called by $name", async ({ moveId }) => {
|
||||||
vi.spyOn(RandomMoveAttr.prototype, "getMoveOverride").mockReturnValue(MoveId.ABSORB);
|
vi.spyOn(RandomMoveAttr.prototype, "getMove").mockReturnValue(MoveId.ABSORB);
|
||||||
await game.classicMode.startBattle([SpeciesId.PIKACHU]);
|
await game.classicMode.startBattle([SpeciesId.PIKACHU]);
|
||||||
|
|
||||||
const playerMon = game.scene.getPlayerPokemon()!;
|
const playerMon = game.scene.getPlayerPokemon()!;
|
||||||
|
@ -144,7 +144,7 @@ describe("Moves - Instruct", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should fail on metronomed moves, even if also in moveset", async () => {
|
it("should fail on metronomed moves, even if also in moveset", async () => {
|
||||||
vi.spyOn(RandomMoveAttr.prototype, "getMoveOverride").mockReturnValue(MoveId.ABSORB);
|
vi.spyOn(RandomMoveAttr.prototype, "getMove").mockReturnValue(MoveId.ABSORB);
|
||||||
await game.classicMode.startBattle([SpeciesId.AMOONGUSS]);
|
await game.classicMode.startBattle([SpeciesId.AMOONGUSS]);
|
||||||
|
|
||||||
const enemy = game.field.getEnemyPokemon();
|
const enemy = game.field.getEnemyPokemon();
|
||||||
|
@ -4,7 +4,6 @@ import { allMoves } from "#app/data/data-lists";
|
|||||||
import { AbilityId } from "#enums/ability-id";
|
import { AbilityId } from "#enums/ability-id";
|
||||||
import { Stat } from "#app/enums/stat";
|
import { Stat } from "#app/enums/stat";
|
||||||
import { MoveResult } from "#enums/move-result";
|
import { MoveResult } from "#enums/move-result";
|
||||||
import { CommandPhase } from "#app/phases/command-phase";
|
|
||||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||||
import { MoveUseMode } from "#enums/move-use-mode";
|
import { MoveUseMode } from "#enums/move-use-mode";
|
||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
@ -122,7 +121,7 @@ describe("Moves - Metronome", () => {
|
|||||||
|
|
||||||
it("should charge for charging moves while still maintaining follow-up status", async () => {
|
it("should charge for charging moves while still maintaining follow-up status", async () => {
|
||||||
game.override.moveset([]).enemyMoveset(MoveId.SPITE);
|
game.override.moveset([]).enemyMoveset(MoveId.SPITE);
|
||||||
vi.spyOn(randomMoveAttr, "getMoveOverride").mockReturnValue(MoveId.SOLAR_BEAM);
|
vi.spyOn(randomMoveAttr, "getMove").mockReturnValue(MoveId.SOLAR_BEAM);
|
||||||
await game.classicMode.startBattle([SpeciesId.REGIELEKI]);
|
await game.classicMode.startBattle([SpeciesId.REGIELEKI]);
|
||||||
|
|
||||||
const player = game.field.getPlayerPokemon();
|
const player = game.field.getPlayerPokemon();
|
||||||
|
Loading…
Reference in New Issue
Block a user