Update tests with new override behavior

This commit is contained in:
NightKev 2024-09-05 21:49:35 -07:00
parent 38a266b3dd
commit d9738372c1
42 changed files with 89 additions and 89 deletions

View File

@ -51,7 +51,7 @@ describe("Abilities - Beast Boost", () => {
}, 20000);
it("should use in-battle overriden stats when determining the stat stage to raise by 1", async() => {
game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT));
game.override.enemyMoveset([Moves.GUARD_SPLIT]);
await game.classicMode.startBattle([Species.SLOWBRO]);

View File

@ -30,7 +30,7 @@ describe("Abilities - Dancer", () => {
.moveset([Moves.SWORDS_DANCE, Moves.SPLASH])
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.DANCER)
.enemyMoveset(Array(4).fill(Moves.VICTORY_DANCE));
.enemyMoveset([Moves.VICTORY_DANCE]);
});
// Reference Link: https://bulbapedia.bulbagarden.net/wiki/Dancer_(Ability)

View File

@ -108,7 +108,7 @@ describe("Abilities - Disguise", () => {
}, TIMEOUT);
it("persists form change when switched out", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK));
game.override.enemyMoveset([Moves.SHADOW_SNEAK]);
game.override.starterSpecies(0);
await game.classicMode.startBattle([ Species.MIMIKYU, Species.FURRET ]);
@ -194,7 +194,7 @@ describe("Abilities - Disguise", () => {
}, TIMEOUT);
it("doesn't faint twice when fainting due to Disguise break damage, nor prevent faint from Disguise break damage if using Endure", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.ENDURE));
game.override.enemyMoveset([Moves.ENDURE]);
await game.classicMode.startBattle();
const mimikyu = game.scene.getEnemyPokemon()!;

View File

@ -38,7 +38,7 @@ describe("Abilities - Flash Fire", () => {
it("immune to Fire-type moves", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset(SPLASH_ONLY);
game.override.enemyMoveset([Moves.EMBER]).moveset(SPLASH_ONLY);
await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!;
@ -49,7 +49,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000);
it("not activate if the Pokémon is protected from the Fire-type move", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset([Moves.PROTECT]);
game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.PROTECT]);
await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!;
@ -60,7 +60,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000);
it("activated by Will-O-Wisp", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.WILL_O_WISP)).moveset(SPLASH_ONLY);
game.override.enemyMoveset([Moves.WILL_O_WISP]).moveset(SPLASH_ONLY);
await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!;
@ -75,7 +75,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000);
it("activated after being frozen", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset(SPLASH_ONLY);
game.override.enemyMoveset([Moves.EMBER]).moveset(SPLASH_ONLY);
game.override.statusEffect(StatusEffect.FREEZE);
await game.startBattle([Species.BLISSEY]);
@ -88,7 +88,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000);
it("not passing with baton pass", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset([Moves.BATON_PASS]);
game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.BATON_PASS]);
await game.startBattle([Species.BLISSEY, Species.CHANSEY]);
// ensure use baton pass after enemy moved
@ -104,7 +104,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000);
it("boosts Fire-type move when the ability is activated", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.FIRE_PLEDGE)).moveset([Moves.EMBER, Moves.SPLASH]);
game.override.enemyMoveset([Moves.FIRE_PLEDGE]).moveset([Moves.EMBER, Moves.SPLASH]);
game.override.enemyAbility(Abilities.FLASH_FIRE).ability(Abilities.NONE);
await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!;

View File

@ -92,7 +92,7 @@ describe("Abilities - Flower Gift", () => {
});
it("reverts to Overcast Form when the Pokémon loses Flower Gift, changes form under Harsh Sunlight/Sunny when it regains it", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SKILL_SWAP)).weather(WeatherType.HARSH_SUN);
game.override.enemyMoveset([Moves.SKILL_SWAP]).weather(WeatherType.HARSH_SUN);
await game.classicMode.startBattle([Species.CHERRIM]);
@ -111,7 +111,7 @@ describe("Abilities - Flower Gift", () => {
});
it("reverts to Overcast Form when the Flower Gift is suppressed, changes form under Harsh Sunlight/Sunny when it regains it", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID)).weather(WeatherType.HARSH_SUN);
game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.HARSH_SUN);
await game.classicMode.startBattle([Species.CHERRIM, Species.MAGIKARP]);

View File

@ -229,7 +229,7 @@ describe("Abilities - Forecast", () => {
});
it("reverts to Normal Form when Forecast is suppressed, changes form to match the weather when it regains it", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID)).weather(WeatherType.RAIN);
game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.RAIN);
await game.startBattle([Species.CASTFORM, Species.PIKACHU]);
const castform = game.scene.getPlayerPokemon()!;
@ -260,7 +260,7 @@ describe("Abilities - Forecast", () => {
});
it("does not change Castform's form until after Stealth Rock deals damage", async () => {
game.override.weather(WeatherType.RAIN).enemyMoveset(Array(4).fill(Moves.STEALTH_ROCK));
game.override.weather(WeatherType.RAIN).enemyMoveset([Moves.STEALTH_ROCK]);
await game.startBattle([Species.PIKACHU, Species.CASTFORM]);
// First turn - set up stealth rock

View File

@ -108,7 +108,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("deals 1/4 of the attacker's maximum HP when hit by a damaging attack", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CRAMORANT]);
const enemy = game.scene.getEnemyPokemon()!;
@ -121,7 +121,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("does not have any effect when hit by non-damaging attack", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TAIL_WHIP));
game.override.enemyMoveset([Moves.TAIL_WHIP]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -140,7 +140,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("lowers attacker's DEF stat stage by 1 when hit in Gulping form", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -164,7 +164,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("paralyzes the enemy when hit in Gorging form", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -188,7 +188,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("does not activate the ability when underwater", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SURF));
game.override.enemyMoveset([Moves.SURF]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -201,7 +201,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("prevents effect damage but inflicts secondary effect on attacker with Magic Guard", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)).enemyAbility(Abilities.MAGIC_GUARD);
game.override.enemyMoveset([Moves.TACKLE]).enemyAbility(Abilities.MAGIC_GUARD);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -225,7 +225,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("cannot be suppressed", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID));
game.override.enemyMoveset([Moves.GASTRO_ACID]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -245,7 +245,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("cannot be swapped with another ability", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SKILL_SWAP));
game.override.enemyMoveset([Moves.SKILL_SWAP]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;

View File

@ -77,7 +77,7 @@ describe("Abilities - Imposter", () => {
}, 20000);
it("should copy in-battle overridden stats", async () => {
game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT));
game.override.enemyMoveset([Moves.POWER_SPLIT]);
await game.startBattle([
Species.DITTO

View File

@ -108,7 +108,7 @@ describe("Abilities - Intimidate", () => {
it("should lower ATK stat stage by 1 for every switch", async () => {
game.override.moveset([Moves.SPLASH])
.enemyMoveset(new Array(4).fill(Moves.VOLT_SWITCH))
.enemyMoveset([Moves.VOLT_SWITCH])
.startingWave(5);
await game.classicMode.startBattle([ Species.MIGHTYENA, Species.POOCHYENA ]);

View File

@ -175,7 +175,7 @@ describe("Abilities - Parental Bond", () => {
"should not apply multiplier to counter moves",
async () => {
game.override.moveset([Moves.COUNTER]);
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.classicMode.startBattle([Species.SHUCKLE]);
@ -465,7 +465,7 @@ describe("Abilities - Parental Bond", () => {
"should not cause user to hit into King's Shield more than once",
async () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemyMoveset(Array(4).fill(Moves.KINGS_SHIELD));
game.override.enemyMoveset([Moves.KINGS_SHIELD]);
await game.classicMode.startBattle([Species.MAGIKARP]);

View File

@ -32,7 +32,7 @@ describe("Abilities - Quick Draw", () => {
game.override.enemyLevel(100);
game.override.enemySpecies(Species.MAGIKARP);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
vi.spyOn(allAbilities[Abilities.QUICK_DRAW].getAttrs(BypassSpeedChanceAbAttr)[0], "chance", "get").mockReturnValue(100);
});
@ -76,7 +76,7 @@ describe("Abilities - Quick Draw", () => {
);
test("does not increase priority", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EXTREME_SPEED));
game.override.enemyMoveset([Moves.EXTREME_SPEED]);
await game.startBattle();

View File

@ -35,7 +35,7 @@ describe("Abilities - Sand Spit", () => {
});
it("should trigger when hit with damaging move", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle();
game.move.select(Moves.SPLASH);
@ -45,7 +45,7 @@ describe("Abilities - Sand Spit", () => {
}, 20000);
it("should not trigger when targetted with status moves", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GROWL));
game.override.enemyMoveset([Moves.GROWL]);
await game.startBattle();
game.move.select(Moves.COIL);

View File

@ -30,7 +30,7 @@ describe("Abilities - Tera Shell", () => {
.moveset([Moves.SPLASH])
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Array(4).fill(Moves.MACH_PUNCH))
.enemyMoveset([Moves.MACH_PUNCH])
.startingLevel(100)
.enemyLevel(100);
});
@ -60,7 +60,7 @@ describe("Abilities - Tera Shell", () => {
it(
"should not override type immunities",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK));
game.override.enemyMoveset([Moves.SHADOW_SNEAK]);
await game.classicMode.startBattle([Species.SNORLAX]);
@ -77,7 +77,7 @@ describe("Abilities - Tera Shell", () => {
it(
"should not override type multipliers less than 0.5x",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.QUICK_ATTACK));
game.override.enemyMoveset([Moves.QUICK_ATTACK]);
await game.classicMode.startBattle([Species.AGGRON]);
@ -94,7 +94,7 @@ describe("Abilities - Tera Shell", () => {
it(
"should not affect the effectiveness of fixed-damage moves",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.DRAGON_RAGE));
game.override.enemyMoveset([Moves.DRAGON_RAGE]);
await game.classicMode.startBattle([Species.CHARIZARD]);

View File

@ -31,7 +31,7 @@ describe("Weather - Fog", () => {
game.override.ability(Abilities.BALL_FETCH);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.MAGIKARP);
game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH));
game.override.enemyMoveset([Moves.SPLASH]);
});
it("move accuracy is multiplied by 90%", async () => {

View File

@ -31,7 +31,7 @@ describe("Moves - Alluring Voice", () => {
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.ICE_SCALES)
.enemyMoveset(Array(4).fill(Moves.HOWL))
.enemyMoveset([Moves.HOWL])
.startingLevel(10)
.enemyLevel(10)
.starterSpecies(Species.FEEBAS)

View File

@ -71,7 +71,7 @@ describe("Moves - Baton Pass", () => {
// round 2 - baton pass
game.scene.getEnemyPokemon()!.hp = 100;
game.override.enemyMoveset(new Array(4).fill(Moves.BATON_PASS));
game.override.enemyMoveset([Moves.BATON_PASS]);
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to("PostSummonPhase", false);
@ -90,7 +90,7 @@ describe("Moves - Baton Pass", () => {
}, 20000);
it("doesn't transfer effects that aren't transferrable", async() => {
game.override.enemyMoveset(Array(4).fill(Moves.SALT_CURE));
game.override.enemyMoveset([Moves.SALT_CURE]);
await game.classicMode.startBattle([Species.PIKACHU, Species.FEEBAS]);
const [player1, player2] = game.scene.getParty();

View File

@ -34,7 +34,7 @@ describe("Moves - Beak Blast", () => {
.moveset([Moves.BEAK_BLAST])
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Array(4).fill(Moves.TACKLE))
.enemyMoveset([Moves.TACKLE])
.startingLevel(100)
.enemyLevel(100);
});
@ -80,7 +80,7 @@ describe("Moves - Beak Blast", () => {
it(
"should not burn attackers that don't make contact",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.WATER_GUN));
game.override.enemyMoveset([Moves.WATER_GUN]);
await game.startBattle([Species.BLASTOISE]);
@ -116,7 +116,7 @@ describe("Moves - Beak Blast", () => {
it(
"should be blocked by Protect",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.PROTECT));
game.override.enemyMoveset([Moves.PROTECT]);
await game.startBattle([Species.BLASTOISE]);

View File

@ -29,7 +29,7 @@ describe("Moves - Beat Up", () => {
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyLevel(100);
game.override.enemyMoveset(Array(4).fill(Moves.SPLASH));
game.override.enemyMoveset([Moves.SPLASH]);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100);

View File

@ -32,7 +32,7 @@ describe("Moves - Burning Jealousy", () => {
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.ICE_SCALES)
.enemyMoveset(Array(4).fill(Moves.HOWL))
.enemyMoveset([Moves.HOWL])
.startingLevel(10)
.enemyLevel(10)
.starterSpecies(Species.FEEBAS)

View File

@ -33,7 +33,7 @@ describe("Moves - Crafty Shield", () => {
game.override.moveset([Moves.CRAFTY_SHIELD, Moves.SPLASH, Moves.SWORDS_DANCE]);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(Array(4).fill(Moves.GROWL));
game.override.enemyMoveset([Moves.GROWL]);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100);
@ -62,7 +62,7 @@ describe("Moves - Crafty Shield", () => {
test(
"should not protect the user and allies from attack moves",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
@ -84,7 +84,7 @@ describe("Moves - Crafty Shield", () => {
"should protect the user and allies from moves that ignore other protection",
async () => {
game.override.enemySpecies(Species.DUSCLOPS);
game.override.enemyMoveset(Array(4).fill(Moves.CURSE));
game.override.enemyMoveset([Moves.CURSE]);
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);

View File

@ -79,7 +79,7 @@ describe("Moves - Disable", () => {
}, 20000);
it("cannot disable STRUGGLE", async() => {
game.override.enemyMoveset(Array(4).fill(Moves.STRUGGLE));
game.override.enemyMoveset([Moves.STRUGGLE]);
await game.classicMode.startBattle();
const playerMon = game.scene.getPlayerPokemon()!;
@ -114,7 +114,7 @@ describe("Moves - Disable", () => {
}, 20000);
it("disables NATURE POWER, not the move invoked by it", async() => {
game.override.enemyMoveset(Array(4).fill(Moves.NATURE_POWER));
game.override.enemyMoveset([Moves.NATURE_POWER]);
await game.classicMode.startBattle();
const enemyMon = game.scene.getEnemyPokemon()!;

View File

@ -42,7 +42,7 @@ describe("Moves - Flame Burst", () => {
game.override.startingWave(4);
game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH));
game.override.enemyMoveset([Moves.SPLASH]);
});
it("inflicts damage to the target's ally equal to 1/16 of its max HP", async () => {

View File

@ -68,7 +68,7 @@ describe("Moves - Focus Punch", () => {
it(
"should fail if the user is hit",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CHARIZARD]);
@ -95,7 +95,7 @@ describe("Moves - Focus Punch", () => {
it(
"should be cancelled if the user falls asleep mid-turn",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SPORE));
game.override.enemyMoveset([Moves.SPORE]);
await game.startBattle([Species.CHARIZARD]);

View File

@ -55,7 +55,7 @@ describe("Moves - Foresight", () => {
});
it("should ignore target's evasiveness boosts", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.MINIMIZE));
game.override.enemyMoveset([Moves.MINIMIZE]);
await game.startBattle();
const pokemon = game.scene.getPlayerPokemon()!;

View File

@ -92,7 +92,7 @@ describe("Moves - Freeze-Dry", () => {
// enable once Electrify is implemented (and the interaction is fixed, as above)
it.todo("should deal 2x damage to water types under Electrify", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.ELECTRIFY));
game.override.enemyMoveset([Moves.ELECTRIFY]);
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;

View File

@ -29,7 +29,7 @@ describe("Moves - Glaive Rush", () => {
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(Array(4).fill(Moves.GLAIVE_RUSH))
.enemyMoveset([Moves.GLAIVE_RUSH])
.starterSpecies(Species.KLINK)
.ability(Abilities.BALL_FETCH)
.moveset([Moves.SHADOW_SNEAK, Moves.AVALANCHE, Moves.SPLASH, Moves.GLAIVE_RUSH]);
@ -67,7 +67,7 @@ describe("Moves - Glaive Rush", () => {
it("interacts properly with multi-lens", async () => {
game.override
.startingHeldItems([{ name: "MULTI_LENS", count: 2 }])
.enemyMoveset(Array(4).fill(Moves.AVALANCHE));
.enemyMoveset([Moves.AVALANCHE]);
await game.classicMode.startBattle();
const player = game.scene.getPlayerPokemon()!;
@ -88,7 +88,7 @@ describe("Moves - Glaive Rush", () => {
}, TIMEOUT);
it("secondary effects only last until next move", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK));
game.override.enemyMoveset([Moves.SHADOW_SNEAK]);
await game.classicMode.startBattle();
const player = game.scene.getPlayerPokemon()!;
@ -115,7 +115,7 @@ describe("Moves - Glaive Rush", () => {
it("secondary effects are removed upon switching", async () => {
game.override
.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK))
.enemyMoveset([Moves.SHADOW_SNEAK])
.starterSpecies(0);
await game.classicMode.startBattle([Species.KLINK, Species.FEEBAS]);
@ -152,7 +152,7 @@ describe("Moves - Glaive Rush", () => {
game.move.select(Moves.SHADOW_SNEAK);
await game.phaseInterceptor.to("TurnEndPhase");
game.override.enemyMoveset(Array(4).fill(Moves.SPLASH));
game.override.enemyMoveset([Moves.SPLASH]);
const damagedHP1 = 1000 - enemy.hp;
enemy.hp = 1000;

View File

@ -56,7 +56,7 @@ describe("Moves - Guard Split", () => {
}, 20000);
it("should be idempotent", async () => {
game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT));
game.override.enemyMoveset([Moves.GUARD_SPLIT]);
await game.startBattle([
Species.INDEEDEE
]);

View File

@ -27,7 +27,7 @@ describe("Moves - Guard Swap", () => {
game.override
.battleType("single")
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(new Array(4).fill(Moves.SHELL_SMASH))
.enemyMoveset([Moves.SHELL_SMASH])
.enemySpecies(Species.MEW)
.enemyLevel(200)
.moveset([ Moves.GUARD_SWAP ])

View File

@ -32,7 +32,7 @@ describe("Moves - Hyper Beam", () => {
game.override.ability(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset(Array(4).fill(Moves.SPLASH));
game.override.enemyMoveset([Moves.SPLASH]);
game.override.enemyLevel(100);
game.override.moveset([Moves.HYPER_BEAM, Moves.TACKLE]);

View File

@ -153,7 +153,7 @@ describe("Moves - Jaw Lock", () => {
it(
"should not trap either pokemon if the target is protected",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.PROTECT));
game.override.enemyMoveset([Moves.PROTECT]);
await game.startBattle([Species.BULBASAUR]);

View File

@ -30,7 +30,7 @@ describe("Moves - Lash Out", () => {
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.FUR_COAT)
.enemyMoveset(Array(4).fill(Moves.GROWL))
.enemyMoveset([Moves.GROWL])
.startingLevel(10)
.enemyLevel(10)
.starterSpecies(Species.FEEBAS)

View File

@ -31,7 +31,7 @@ describe("Moves - Lucky Chant", () => {
.moveset([Moves.LUCKY_CHANT, Moves.SPLASH, Moves.FOLLOW_ME])
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Array(4).fill(Moves.FLOWER_TRICK))
.enemyMoveset([Moves.FLOWER_TRICK])
.startingLevel(100)
.enemyLevel(100);
});
@ -87,7 +87,7 @@ describe("Moves - Lucky Chant", () => {
it(
"should prevent critical hits from field effects",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CHARIZARD]);

View File

@ -33,7 +33,7 @@ describe("Moves - Mat Block", () => {
game.override.moveset([Moves.MAT_BLOCK, Moves.SPLASH]);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100);
@ -62,7 +62,7 @@ describe("Moves - Mat Block", () => {
test(
"should not protect the user and allies from status moves",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GROWL));
game.override.enemyMoveset([Moves.GROWL]);
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);

View File

@ -125,7 +125,7 @@ describe("Moves - Parting Shot", () => {
game.override
.enemySpecies(Species.ALTARIA)
.enemyAbility(Abilities.NONE)
.enemyMoveset(Array(4).fill(Moves.MIST));
.enemyMoveset([Moves.MIST]);
await game.startBattle([Species.SNORLAX, Species.MEOWTH]);
const enemyPokemon = game.scene.getEnemyPokemon()!;

View File

@ -56,7 +56,7 @@ describe("Moves - Power Split", () => {
}, 20000);
it("should be idempotent", async () => {
game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT));
game.override.enemyMoveset([Moves.POWER_SPLIT]);
await game.startBattle([
Species.INDEEDEE
]);

View File

@ -27,7 +27,7 @@ describe("Moves - Power Swap", () => {
game.override
.battleType("single")
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(new Array(4).fill(Moves.SHELL_SMASH))
.enemyMoveset([Moves.SHELL_SMASH])
.enemySpecies(Species.MEW)
.enemyLevel(200)
.moveset([ Moves.POWER_SWAP ])

View File

@ -35,7 +35,7 @@ describe("Moves - Protect", () => {
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
game.override.startingLevel(100);
game.override.enemyLevel(100);
@ -59,7 +59,7 @@ describe("Moves - Protect", () => {
test(
"should prevent secondary effects from the opponent's attack",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.CEASELESS_EDGE));
game.override.enemyMoveset([Moves.CEASELESS_EDGE]);
vi.spyOn(allMoves[Moves.CEASELESS_EDGE], "accuracy", "get").mockReturnValue(100);
await game.classicMode.startBattle([Species.CHARIZARD]);
@ -78,7 +78,7 @@ describe("Moves - Protect", () => {
test(
"should protect the user from status moves",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.CHARM));
game.override.enemyMoveset([Moves.CHARM]);
await game.classicMode.startBattle([Species.CHARIZARD]);
@ -95,7 +95,7 @@ describe("Moves - Protect", () => {
test(
"should stop subsequent hits of a multi-hit move",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACHYON_CUTTER));
game.override.enemyMoveset([Moves.TACHYON_CUTTER]);
await game.classicMode.startBattle([Species.CHARIZARD]);
@ -114,7 +114,7 @@ describe("Moves - Protect", () => {
test(
"should fail if the user is the last to move in the turn",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.PROTECT));
game.override.enemyMoveset([Moves.PROTECT]);
await game.classicMode.startBattle([Species.CHARIZARD]);

View File

@ -32,7 +32,7 @@ describe("Moves - Quick Guard", () => {
game.override.moveset([Moves.QUICK_GUARD, Moves.SPLASH, Moves.FOLLOW_ME]);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(Array(4).fill(Moves.QUICK_ATTACK));
game.override.enemyMoveset([Moves.QUICK_ATTACK]);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100);
@ -59,7 +59,7 @@ describe("Moves - Quick Guard", () => {
"should protect the user and allies from Prankster-boosted moves",
async () => {
game.override.enemyAbility(Abilities.PRANKSTER);
game.override.enemyMoveset(Array(4).fill(Moves.GROWL));
game.override.enemyMoveset([Moves.GROWL]);
await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
@ -77,7 +77,7 @@ describe("Moves - Quick Guard", () => {
test(
"should stop subsequent hits of a multi-hit priority move",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.WATER_SHURIKEN));
game.override.enemyMoveset([Moves.WATER_SHURIKEN]);
await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
@ -98,7 +98,7 @@ describe("Moves - Quick Guard", () => {
"should fail if the user is the last to move in the turn",
async () => {
game.override.battleType("single");
game.override.enemyMoveset(Array(4).fill(Moves.QUICK_GUARD));
game.override.enemyMoveset([Moves.QUICK_GUARD]);
await game.classicMode.startBattle([Species.CHARIZARD]);

View File

@ -29,7 +29,7 @@ describe("Moves - Safeguard", () => {
game.override
.battleType("single")
.enemySpecies(Species.DRATINI)
.enemyMoveset(Array(4).fill(Moves.SAFEGUARD))
.enemyMoveset([Moves.SAFEGUARD])
.enemyAbility(Abilities.BALL_FETCH)
.enemyLevel(5)
.starterSpecies(Species.DRATINI)
@ -125,7 +125,7 @@ describe("Moves - Safeguard", () => {
expect(enemyPokemon.status?.effect).toEqual(StatusEffect.BURN);
game.override.enemyMoveset(Array(4).fill(Moves.REST));
game.override.enemyMoveset([Moves.REST]);
game.move.select(Moves.SPLASH);
await game.toNextTurn();
@ -141,7 +141,7 @@ describe("Moves - Safeguard", () => {
game.move.select(Moves.SPLASH);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextTurn();
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
game.move.select(Moves.SPLASH);
await game.toNextTurn();

View File

@ -33,7 +33,7 @@ describe("Moves - Shell Trap", () => {
.battleType("double")
.moveset([Moves.SHELL_TRAP, Moves.SPLASH, Moves.BULLDOZE])
.enemySpecies(Species.SNORLAX)
.enemyMoveset(Array(4).fill(Moves.RAZOR_LEAF))
.enemyMoveset([Moves.RAZOR_LEAF])
.startingLevel(100)
.enemyLevel(100);
@ -67,7 +67,7 @@ describe("Moves - Shell Trap", () => {
it(
"should fail if the user is only hit by special attacks",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SWIFT));
game.override.enemyMoveset([Moves.SWIFT]);
await game.startBattle([Species.CHARIZARD, Species.TURTONATOR]);

View File

@ -77,7 +77,7 @@ describe("Moves - Transform", () => {
}, 20000);
it("should copy in-battle overridden stats", async () => {
game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT));
game.override.enemyMoveset([Moves.POWER_SPLIT]);
await game.startBattle([
Species.DITTO

View File

@ -32,7 +32,7 @@ describe("Moves - Wide Guard", () => {
game.override.moveset([Moves.WIDE_GUARD, Moves.SPLASH, Moves.SURF]);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(Array(4).fill(Moves.SWIFT));
game.override.enemyMoveset([Moves.SWIFT]);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100);
@ -61,7 +61,7 @@ describe("Moves - Wide Guard", () => {
test(
"should protect the user and allies from multi-target status moves",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GROWL));
game.override.enemyMoveset([Moves.GROWL]);
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
@ -82,7 +82,7 @@ describe("Moves - Wide Guard", () => {
test(
"should not protect the user and allies from single-target moves",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
@ -103,7 +103,7 @@ describe("Moves - Wide Guard", () => {
test(
"should protect the user from its ally's multi-target move",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SPLASH));
game.override.enemyMoveset([Moves.SPLASH]);
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);