mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-06 15:39:27 +02:00
dddddd
This commit is contained in:
parent
040eaf8632
commit
5d7a3d28ff
@ -1,7 +1,8 @@
|
||||
import { AbilityId } from "#enums/ability-id";
|
||||
import { ModifierTier } from "#enums/modifier-tier";
|
||||
import { MoveId } from "#enums/move-id";
|
||||
import type { SelectModifierPhase } from "#phases/select-modifier-phase";
|
||||
import { UiMode } from "#enums/ui-mode";
|
||||
import { SelectModifierPhase } from "#phases/select-modifier-phase";
|
||||
import { GameManager } from "#test/test-utils/game-manager";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
@ -33,17 +34,20 @@ describe("Items - Lock Capsule", () => {
|
||||
|
||||
it("doesn't set the cost of common tier items to 0", async () => {
|
||||
await game.classicMode.startBattle();
|
||||
game.scene.phaseManager.clearAllPhases();
|
||||
game.scene.phaseManager.unshiftNew("SelectModifierPhase", 0, undefined, {
|
||||
guaranteedModifierTiers: [ModifierTier.COMMON, ModifierTier.COMMON, ModifierTier.COMMON],
|
||||
fillRemaining: false,
|
||||
game.scene.phaseManager.overridePhase(
|
||||
new SelectModifierPhase(0, undefined, {
|
||||
guaranteedModifierTiers: [ModifierTier.COMMON, ModifierTier.COMMON, ModifierTier.COMMON],
|
||||
fillRemaining: false,
|
||||
}),
|
||||
);
|
||||
|
||||
game.onNextPrompt("SelectModifierPhase", UiMode.MODIFIER_SELECT, () => {
|
||||
const selectModifierPhase = game.scene.phaseManager.getCurrentPhase() as SelectModifierPhase;
|
||||
const rerollCost = selectModifierPhase.getRerollCost(true);
|
||||
expect(rerollCost).toBe(150);
|
||||
});
|
||||
|
||||
game.doSelectModifier();
|
||||
await game.phaseInterceptor.to("SelectModifierPhase", false);
|
||||
|
||||
const selectModifierPhase = game.scene.phaseManager.getCurrentPhase() as SelectModifierPhase;
|
||||
const rerollCost = selectModifierPhase.getRerollCost(true);
|
||||
expect(rerollCost).toBe(150);
|
||||
await game.phaseInterceptor.to("SelectModifierPhase");
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user