mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Added new function and updated tests
This commit is contained in:
parent
e2feddaf62
commit
334f30e49a
@ -4,7 +4,6 @@ import GameManager from "#test/utils/gameManager";
|
||||
import { Species } from "#enums/species";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { LearnMovePhase } from "#app/phases/learn-move-phase";
|
||||
import Overrides from "#app/overrides";
|
||||
|
||||
describe("Learn Move Phase", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
@ -22,7 +21,7 @@ describe("Learn Move Phase", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
Overrides.XP_MULTIPLIER_OVERRIDE = 50;
|
||||
game.override.xpMultiplier(50);
|
||||
});
|
||||
|
||||
it("If Pokemon has less than 4 moves, its newest move will be added to the lowest empty index", async () => {
|
||||
|
@ -48,6 +48,17 @@ export class OverridesHelper extends GameManagerHelper {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the XP Multiplier
|
||||
* @param value the XP multiplier to set
|
||||
* @returns this
|
||||
*/
|
||||
xpMultiplier(value: number): this {
|
||||
vi.spyOn(Overrides, "XP_MULTIPLIER_OVERRIDE", "get").mockReturnValue(value);
|
||||
this.log(`XP Multiplier set to ${value}!`);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the player (pokemon) starting held items
|
||||
* @param items the items to hold
|
||||
|
Loading…
Reference in New Issue
Block a user