mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 06:51:08 +00:00
use game.override.startingWave
This commit is contained in:
parent
b2fbc4d6b6
commit
bc1c267071
@ -39,7 +39,7 @@ describe("Abilities - BATTLE BOND", () => {
|
||||
async () => {
|
||||
const baseForm = 1,
|
||||
ashForm = 2;
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(4);
|
||||
game.override.startingWave(4);
|
||||
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
|
||||
[Species.GRENINJA]: ashForm,
|
||||
});
|
||||
|
@ -39,7 +39,7 @@ describe("Abilities - DISGUISE", () => {
|
||||
async () => {
|
||||
const baseForm = 0,
|
||||
bustedForm = 1;
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(4);
|
||||
game.override.startingWave(4);
|
||||
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
|
||||
[Species.MIMIKYU]: bustedForm,
|
||||
});
|
||||
|
@ -202,7 +202,7 @@ describe("Abilities - Ice Face", () => {
|
||||
});
|
||||
|
||||
it("reverts to Ice Face on arena reset", async () => {
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(4);
|
||||
game.override.startingWave(4);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(4);
|
||||
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP);
|
||||
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
|
||||
|
@ -34,7 +34,7 @@ describe("Abilities - Intimidate", () => {
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INTIMIDATE);
|
||||
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INTIMIDATE);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
});
|
||||
|
||||
@ -68,7 +68,7 @@ describe("Abilities - Intimidate", () => {
|
||||
}, 20000);
|
||||
|
||||
it("single - boss should only trigger once then switch", async () => {
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(10);
|
||||
game.override.startingWave(10);
|
||||
await game.runToSummon([Species.MIGHTYENA, Species.POOCHYENA]);
|
||||
game.onNextPrompt(
|
||||
"CheckSwitchPhase",
|
||||
@ -97,7 +97,7 @@ describe("Abilities - Intimidate", () => {
|
||||
}, 20000);
|
||||
|
||||
it("single - trainer should only trigger once with switch", async () => {
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
await game.runToSummon([Species.MIGHTYENA, Species.POOCHYENA]);
|
||||
game.onNextPrompt(
|
||||
"CheckSwitchPhase",
|
||||
@ -127,7 +127,7 @@ describe("Abilities - Intimidate", () => {
|
||||
|
||||
it("double - trainer should only trigger once per pokemon", async () => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
await game.runToSummon([Species.MIGHTYENA, Species.POOCHYENA]);
|
||||
game.onNextPrompt(
|
||||
"CheckSwitchPhase",
|
||||
@ -153,7 +153,7 @@ describe("Abilities - Intimidate", () => {
|
||||
|
||||
it("double - wild: should only trigger once per pokemon", async () => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
await game.runToSummon([Species.MIGHTYENA, Species.POOCHYENA]);
|
||||
game.onNextPrompt(
|
||||
"CheckSwitchPhase",
|
||||
@ -179,7 +179,7 @@ describe("Abilities - Intimidate", () => {
|
||||
|
||||
it("double - boss: should only trigger once per pokemon", async () => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(10);
|
||||
game.override.startingWave(10);
|
||||
await game.runToSummon([Species.MIGHTYENA, Species.POOCHYENA]);
|
||||
game.onNextPrompt(
|
||||
"CheckSwitchPhase",
|
||||
@ -204,7 +204,7 @@ describe("Abilities - Intimidate", () => {
|
||||
}, 20000);
|
||||
|
||||
it("single - wild next wave opp triger once, us: none", async () => {
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(2);
|
||||
game.override.startingWave(2);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.AERIAL_ACE]);
|
||||
await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]);
|
||||
let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats;
|
||||
@ -230,7 +230,7 @@ describe("Abilities - Intimidate", () => {
|
||||
}, 20000);
|
||||
|
||||
it("single - wild next turn - no retrigger on next turn", async () => {
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(2);
|
||||
game.override.startingWave(2);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH]);
|
||||
await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]);
|
||||
let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats;
|
||||
@ -256,7 +256,7 @@ describe("Abilities - Intimidate", () => {
|
||||
it("single - trainer should only trigger once and each time he switch", async () => {
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.VOLT_SWITCH, Moves.VOLT_SWITCH, Moves.VOLT_SWITCH, Moves.VOLT_SWITCH]);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]);
|
||||
let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats;
|
||||
expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1);
|
||||
@ -295,7 +295,7 @@ describe("Abilities - Intimidate", () => {
|
||||
it("single - trainer should only trigger once whatever turn we are", async () => {
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]);
|
||||
let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats;
|
||||
expect(battleStatsOpponent[BattleStat.ATK]).toBe(-1);
|
||||
@ -333,7 +333,7 @@ describe("Abilities - Intimidate", () => {
|
||||
|
||||
it("double - wild vs only 1 on player side", async () => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
vi.spyOn(Overrides, "OPP_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{ name: "COIN_CASE" }]);
|
||||
await game.runToSummon([Species.MIGHTYENA]);
|
||||
// Get rid of any modifiers that may alter power
|
||||
@ -351,7 +351,7 @@ describe("Abilities - Intimidate", () => {
|
||||
|
||||
it("double - wild vs only 1 alive on player side", async () => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
await game.runToTitle();
|
||||
|
||||
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
||||
|
@ -39,7 +39,7 @@ describe("Abilities - POWER CONSTRUCT", () => {
|
||||
async () => {
|
||||
const baseForm = 2,
|
||||
completeForm = 4;
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(4);
|
||||
game.override.startingWave(4);
|
||||
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
|
||||
[Species.ZYGARDE]: completeForm,
|
||||
});
|
||||
|
@ -39,7 +39,7 @@ describe("Abilities - SCHOOLING", () => {
|
||||
async () => {
|
||||
const soloForm = 0,
|
||||
schoolForm = 1;
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(4);
|
||||
game.override.startingWave(4);
|
||||
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
|
||||
[Species.WISHIWASHI]: schoolForm,
|
||||
});
|
||||
|
@ -39,7 +39,7 @@ describe("Abilities - SHIELDS DOWN", () => {
|
||||
async () => {
|
||||
const meteorForm = 0,
|
||||
coreForm = 7;
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(4);
|
||||
game.override.startingWave(4);
|
||||
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
|
||||
[Species.MINIOR]: coreForm,
|
||||
});
|
||||
|
@ -153,7 +153,7 @@ describe("Abilities - ZEN MODE", () => {
|
||||
async () => {
|
||||
const baseForm = 0,
|
||||
zenForm = 1;
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(4);
|
||||
game.override.startingWave(4);
|
||||
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
|
||||
[Species.DARMANITAN]: zenForm,
|
||||
});
|
||||
|
@ -39,7 +39,7 @@ describe("Abilities - ZERO TO HERO", () => {
|
||||
async () => {
|
||||
const baseForm = 0,
|
||||
heroForm = 1;
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(4);
|
||||
game.override.startingWave(4);
|
||||
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
|
||||
[Species.PALAFIN]: heroForm,
|
||||
});
|
||||
|
@ -106,10 +106,10 @@ describe("RibbonAchv", () => {
|
||||
vi.spyOn(Overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(0);
|
||||
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(0);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(0);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(0);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([]);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([]);
|
||||
game = new GameManager(phaserGame);
|
||||
game.override.startingWave(0);
|
||||
scene = game.scene;
|
||||
});
|
||||
|
||||
|
@ -93,7 +93,7 @@ describe("Test Battle Phase", () => {
|
||||
vi.spyOn(Overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MEWTWO);
|
||||
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
|
||||
@ -113,7 +113,7 @@ describe("Test Battle Phase", () => {
|
||||
vi.spyOn(Overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MEWTWO);
|
||||
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(5);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP]);
|
||||
@ -233,7 +233,7 @@ describe("Test Battle Phase", () => {
|
||||
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MIGHTYENA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
Species.CHARIZARD,
|
||||
@ -247,7 +247,7 @@ describe("Test Battle Phase", () => {
|
||||
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MIGHTYENA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
Species.CHARIZARD,
|
||||
@ -266,7 +266,7 @@ describe("Test Battle Phase", () => {
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
|
||||
await game.startBattle([
|
||||
@ -295,7 +295,7 @@ describe("Test Battle Phase", () => {
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
|
||||
await game.startBattle();
|
||||
@ -313,7 +313,7 @@ describe("Test Battle Phase", () => {
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
|
||||
await game.startBattle();
|
||||
|
@ -29,7 +29,7 @@ describe("Test Battle Phase", () => {
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
|
||||
});
|
||||
|
@ -36,7 +36,7 @@ describe("Test Battle Phase", () => {
|
||||
|
||||
it("startBattle 2vs1 boss", async() => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(10);
|
||||
game.override.startingWave(10);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
Species.CHARIZARD,
|
||||
@ -47,7 +47,7 @@ describe("Test Battle Phase", () => {
|
||||
|
||||
it("startBattle 2vs2 boss", async() => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(10);
|
||||
game.override.startingWave(10);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
Species.CHARIZARD,
|
||||
@ -58,7 +58,7 @@ describe("Test Battle Phase", () => {
|
||||
|
||||
it("startBattle 2vs2 trainer", async() => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
Species.CHARIZARD,
|
||||
@ -69,7 +69,7 @@ describe("Test Battle Phase", () => {
|
||||
|
||||
it("startBattle 2vs1 trainer", async() => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
Species.CHARIZARD,
|
||||
@ -80,7 +80,7 @@ describe("Test Battle Phase", () => {
|
||||
|
||||
it("startBattle 2vs1 rival", async() => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(8);
|
||||
game.override.startingWave(8);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
Species.CHARIZARD,
|
||||
@ -91,7 +91,7 @@ describe("Test Battle Phase", () => {
|
||||
|
||||
it("startBattle 2vs2 rival", async() => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(8);
|
||||
game.override.startingWave(8);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
Species.CHARIZARD,
|
||||
@ -102,7 +102,7 @@ describe("Test Battle Phase", () => {
|
||||
|
||||
it("startBattle 1vs1 trainer", async() => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
]);
|
||||
@ -112,7 +112,7 @@ describe("Test Battle Phase", () => {
|
||||
|
||||
it("startBattle 2vs2 trainer", async() => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
Species.CHARIZARD,
|
||||
@ -123,7 +123,7 @@ describe("Test Battle Phase", () => {
|
||||
|
||||
it("startBattle 4vs2 trainer", async() => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
Species.CHARIZARD,
|
||||
|
@ -105,7 +105,7 @@ describe("Moves - Ceaseless Edge", () => {
|
||||
"trainer - move should hit twice, apply two layers of spikes, force switch opponent - opponent takes damage",
|
||||
async () => {
|
||||
vi.spyOn(Overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{name: "MULTI_LENS"}]);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
|
||||
await game.startBattle([ Species.ILLUMISE ]);
|
||||
|
||||
|
@ -32,7 +32,7 @@ describe("Moves - Dynamax Cannon", () => {
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(200);
|
||||
|
||||
// Note that, for Waves 1-10, the level cap is 10
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(1);
|
||||
game.override.startingWave(1);
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single");
|
||||
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
|
||||
|
||||
|
@ -33,7 +33,7 @@ describe("Moves - Spikes", () => {
|
||||
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||
game.override.startingWave(3);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH,Moves.SPLASH,Moves.SPLASH,Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPIKES,Moves.SPLASH, Moves.ROAR]);
|
||||
});
|
||||
@ -86,7 +86,7 @@ describe("Moves - Spikes", () => {
|
||||
}, 20000);
|
||||
|
||||
it("trainer - wild - force switch opponent - should take damage", async() => {
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
// player set spikes on the field and do splash for 3 turns
|
||||
// opponent do splash for 4 turns
|
||||
// nobody should take damage
|
||||
@ -104,7 +104,7 @@ describe("Moves - Spikes", () => {
|
||||
}, 20000);
|
||||
|
||||
it("trainer - wild - force switch by himself opponent - should take damage", async() => {
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(5);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(5000);
|
||||
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(0);
|
||||
// turn 1: player set spikes, opponent do splash
|
||||
|
@ -34,7 +34,7 @@ describe("Moves - Tackle", () => {
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single");
|
||||
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(1);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(97);
|
||||
game.override.startingWave(97);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.GROWTH,Moves.GROWTH,Moves.GROWTH,Moves.GROWTH]);
|
||||
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
|
||||
|
@ -35,7 +35,7 @@ describe("UI - Transfer Items", () => {
|
||||
game = new GameManager(phaserGame);
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single");
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(1);
|
||||
game.override.startingWave(1);
|
||||
vi.spyOn(Overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([
|
||||
{ name: "BERRY", count: 1, type: BerryType.SITRUS },
|
||||
{ name: "BERRY", count: 2, type: BerryType.APICOT },
|
||||
|
Loading…
x
Reference in New Issue
Block a user