mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-07 17:02:16 +02:00
Adjust Last X Item Unit Test
This commit is contained in:
parent
fda864c72a
commit
f0cbe8b679
@ -7,7 +7,6 @@ import { Moves } from "#app/enums/moves.js";
|
|||||||
import { TurnEndPhase } from "#app/phases/turn-end-phase.js";
|
import { TurnEndPhase } from "#app/phases/turn-end-phase.js";
|
||||||
import { SPLASH_ONLY } from "../utils/testUtils";
|
import { SPLASH_ONLY } from "../utils/testUtils";
|
||||||
import { Abilities } from "#app/enums/abilities.js";
|
import { Abilities } from "#app/enums/abilities.js";
|
||||||
import Overrides from "#app/overrides";
|
|
||||||
import { TempStatStageBoosterModifier } from "#app/modifier/modifier.js";
|
import { TempStatStageBoosterModifier } from "#app/modifier/modifier.js";
|
||||||
import { Mode } from "#app/ui/ui.js";
|
import { Mode } from "#app/ui/ui.js";
|
||||||
import { Button } from "#app/enums/buttons.js";
|
import { Button } from "#app/enums/buttons.js";
|
||||||
@ -39,8 +38,8 @@ describe("Items - Temporary Stat Stage Boosters", () => {
|
|||||||
game.override.battleType("single");
|
game.override.battleType("single");
|
||||||
game.override.enemySpecies(Species.MEW);
|
game.override.enemySpecies(Species.MEW);
|
||||||
game.override.enemyMoveset(SPLASH_ONLY);
|
game.override.enemyMoveset(SPLASH_ONLY);
|
||||||
game.override.enemyAbility(Abilities.PICKUP);
|
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||||
game.override.moveset([ Moves.TACKLE, Moves.HONE_CLAWS, Moves.BELLY_DRUM ]);
|
game.override.moveset([ Moves.TACKLE, Moves.SPLASH, Moves.HONE_CLAWS, Moves.BELLY_DRUM ]);
|
||||||
game.override.startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]);
|
game.override.startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -102,12 +101,14 @@ describe("Items - Temporary Stat Stage Boosters", () => {
|
|||||||
|
|
||||||
it("should renew how many battles are left of existing booster when picking up new booster of same type", async() => {
|
it("should renew how many battles are left of existing booster when picking up new booster of same type", async() => {
|
||||||
game.override.startingLevel(200);
|
game.override.startingLevel(200);
|
||||||
vi.spyOn(Overrides, "ITEM_REWARD_OVERRIDE", "get").mockReturnValue([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]);
|
game.override.itemRewards([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]);
|
||||||
await game.startBattle([
|
await game.startBattle([
|
||||||
Species.PIKACHU
|
Species.PIKACHU
|
||||||
]);
|
]);
|
||||||
|
|
||||||
game.move.select(Moves.TACKLE);
|
game.move.select(Moves.SPLASH);
|
||||||
|
|
||||||
|
await game.doKillOpponents();
|
||||||
|
|
||||||
await game.phaseInterceptor.to(BattleEndPhase);
|
await game.phaseInterceptor.to(BattleEndPhase);
|
||||||
|
|
||||||
|
@ -281,6 +281,12 @@ export class OverridesHelper extends GameManagerHelper {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
itemRewards(items: ModifierOverride[]) {
|
||||||
|
vi.spyOn(Overrides, "ITEM_REWARD_OVERRIDE", "get").mockReturnValue(items);
|
||||||
|
this.log("Item rewards set to:", items);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
private log(...params: any[]) {
|
private log(...params: any[]) {
|
||||||
console.log("Overrides:", ...params);
|
console.log("Overrides:", ...params);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user