From d9738372c1cbcd627fc12563a5666abc0dce185d Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Thu, 5 Sep 2024 21:49:35 -0700 Subject: [PATCH] Update tests with new override behavior --- src/test/abilities/beast_boost.test.ts | 2 +- src/test/abilities/dancer.test.ts | 2 +- src/test/abilities/disguise.test.ts | 4 ++-- src/test/abilities/flash_fire.test.ts | 12 ++++++------ src/test/abilities/flower_gift.test.ts | 4 ++-- src/test/abilities/forecast.test.ts | 4 ++-- src/test/abilities/gulp_missile.test.ts | 16 ++++++++-------- src/test/abilities/imposter.test.ts | 2 +- src/test/abilities/intimidate.test.ts | 2 +- src/test/abilities/parental_bond.test.ts | 4 ++-- src/test/abilities/quick_draw.test.ts | 4 ++-- src/test/abilities/sand_spit.test.ts | 4 ++-- src/test/abilities/tera_shell.test.ts | 8 ++++---- src/test/arena/weather_fog.test.ts | 2 +- src/test/moves/alluring_voice.test.ts | 2 +- src/test/moves/baton_pass.test.ts | 4 ++-- src/test/moves/beak_blast.test.ts | 6 +++--- src/test/moves/beat_up.test.ts | 2 +- src/test/moves/burning_jealousy.test.ts | 2 +- src/test/moves/crafty_shield.test.ts | 6 +++--- src/test/moves/disable.test.ts | 4 ++-- src/test/moves/flame_burst.test.ts | 2 +- src/test/moves/focus_punch.test.ts | 4 ++-- src/test/moves/foresight.test.ts | 2 +- src/test/moves/freeze_dry.test.ts | 2 +- src/test/moves/glaive_rush.test.ts | 10 +++++----- src/test/moves/guard_split.test.ts | 2 +- src/test/moves/guard_swap.test.ts | 2 +- src/test/moves/hyper_beam.test.ts | 2 +- src/test/moves/jaw_lock.test.ts | 2 +- src/test/moves/lash_out.test.ts | 2 +- src/test/moves/lucky_chant.test.ts | 4 ++-- src/test/moves/mat_block.test.ts | 4 ++-- src/test/moves/parting_shot.test.ts | 2 +- src/test/moves/power_split.test.ts | 2 +- src/test/moves/power_swap.test.ts | 2 +- src/test/moves/protect.test.ts | 10 +++++----- src/test/moves/quick_guard.test.ts | 8 ++++---- src/test/moves/safeguard.test.ts | 6 +++--- src/test/moves/shell_trap.test.ts | 4 ++-- src/test/moves/transform.test.ts | 2 +- src/test/moves/wide_guard.test.ts | 8 ++++---- 42 files changed, 89 insertions(+), 89 deletions(-) diff --git a/src/test/abilities/beast_boost.test.ts b/src/test/abilities/beast_boost.test.ts index 05645a1231d..518c9febc25 100644 --- a/src/test/abilities/beast_boost.test.ts +++ b/src/test/abilities/beast_boost.test.ts @@ -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]); diff --git a/src/test/abilities/dancer.test.ts b/src/test/abilities/dancer.test.ts index d80f497f8b2..ec5ce53f4c3 100644 --- a/src/test/abilities/dancer.test.ts +++ b/src/test/abilities/dancer.test.ts @@ -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) diff --git a/src/test/abilities/disguise.test.ts b/src/test/abilities/disguise.test.ts index ef145262954..b2dcd8641d1 100644 --- a/src/test/abilities/disguise.test.ts +++ b/src/test/abilities/disguise.test.ts @@ -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()!; diff --git a/src/test/abilities/flash_fire.test.ts b/src/test/abilities/flash_fire.test.ts index de40873998f..1df899275eb 100644 --- a/src/test/abilities/flash_fire.test.ts +++ b/src/test/abilities/flash_fire.test.ts @@ -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()!; diff --git a/src/test/abilities/flower_gift.test.ts b/src/test/abilities/flower_gift.test.ts index de07bd29478..a8783dd8bc4 100644 --- a/src/test/abilities/flower_gift.test.ts +++ b/src/test/abilities/flower_gift.test.ts @@ -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]); diff --git a/src/test/abilities/forecast.test.ts b/src/test/abilities/forecast.test.ts index 78453c5f4d2..4880049a663 100644 --- a/src/test/abilities/forecast.test.ts +++ b/src/test/abilities/forecast.test.ts @@ -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 diff --git a/src/test/abilities/gulp_missile.test.ts b/src/test/abilities/gulp_missile.test.ts index 286c3af1c56..33b940a675d 100644 --- a/src/test/abilities/gulp_missile.test.ts +++ b/src/test/abilities/gulp_missile.test.ts @@ -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()!; diff --git a/src/test/abilities/imposter.test.ts b/src/test/abilities/imposter.test.ts index 2857f80632a..e9f7e5d18ee 100644 --- a/src/test/abilities/imposter.test.ts +++ b/src/test/abilities/imposter.test.ts @@ -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 diff --git a/src/test/abilities/intimidate.test.ts b/src/test/abilities/intimidate.test.ts index f90ba6c0e1e..cb995e5632b 100644 --- a/src/test/abilities/intimidate.test.ts +++ b/src/test/abilities/intimidate.test.ts @@ -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 ]); diff --git a/src/test/abilities/parental_bond.test.ts b/src/test/abilities/parental_bond.test.ts index 81a30524a5e..636151b4356 100644 --- a/src/test/abilities/parental_bond.test.ts +++ b/src/test/abilities/parental_bond.test.ts @@ -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]); diff --git a/src/test/abilities/quick_draw.test.ts b/src/test/abilities/quick_draw.test.ts index 00d344ed333..a02ee5cf56a 100644 --- a/src/test/abilities/quick_draw.test.ts +++ b/src/test/abilities/quick_draw.test.ts @@ -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(); diff --git a/src/test/abilities/sand_spit.test.ts b/src/test/abilities/sand_spit.test.ts index 041e20faf7f..add13ede296 100644 --- a/src/test/abilities/sand_spit.test.ts +++ b/src/test/abilities/sand_spit.test.ts @@ -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); diff --git a/src/test/abilities/tera_shell.test.ts b/src/test/abilities/tera_shell.test.ts index f9cb2935619..5c67393054e 100644 --- a/src/test/abilities/tera_shell.test.ts +++ b/src/test/abilities/tera_shell.test.ts @@ -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]); diff --git a/src/test/arena/weather_fog.test.ts b/src/test/arena/weather_fog.test.ts index b36b0de2e06..b47145e8dd0 100644 --- a/src/test/arena/weather_fog.test.ts +++ b/src/test/arena/weather_fog.test.ts @@ -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 () => { diff --git a/src/test/moves/alluring_voice.test.ts b/src/test/moves/alluring_voice.test.ts index 9807d1bce85..b438d0f736a 100644 --- a/src/test/moves/alluring_voice.test.ts +++ b/src/test/moves/alluring_voice.test.ts @@ -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) diff --git a/src/test/moves/baton_pass.test.ts b/src/test/moves/baton_pass.test.ts index 1a4edafdd36..4ed0b52b2c2 100644 --- a/src/test/moves/baton_pass.test.ts +++ b/src/test/moves/baton_pass.test.ts @@ -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(); diff --git a/src/test/moves/beak_blast.test.ts b/src/test/moves/beak_blast.test.ts index 2a93dc00a54..fe748c87826 100644 --- a/src/test/moves/beak_blast.test.ts +++ b/src/test/moves/beak_blast.test.ts @@ -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]); diff --git a/src/test/moves/beat_up.test.ts b/src/test/moves/beat_up.test.ts index ce1598a49b4..70b33f56583 100644 --- a/src/test/moves/beat_up.test.ts +++ b/src/test/moves/beat_up.test.ts @@ -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); diff --git a/src/test/moves/burning_jealousy.test.ts b/src/test/moves/burning_jealousy.test.ts index 2cb6a0bc52a..8799550deae 100644 --- a/src/test/moves/burning_jealousy.test.ts +++ b/src/test/moves/burning_jealousy.test.ts @@ -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) diff --git a/src/test/moves/crafty_shield.test.ts b/src/test/moves/crafty_shield.test.ts index e73a1fd256d..7b962518944 100644 --- a/src/test/moves/crafty_shield.test.ts +++ b/src/test/moves/crafty_shield.test.ts @@ -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]); diff --git a/src/test/moves/disable.test.ts b/src/test/moves/disable.test.ts index 3d207035ce3..faf2931151c 100644 --- a/src/test/moves/disable.test.ts +++ b/src/test/moves/disable.test.ts @@ -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()!; diff --git a/src/test/moves/flame_burst.test.ts b/src/test/moves/flame_burst.test.ts index 2777b8178b8..b2858af2b24 100644 --- a/src/test/moves/flame_burst.test.ts +++ b/src/test/moves/flame_burst.test.ts @@ -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 () => { diff --git a/src/test/moves/focus_punch.test.ts b/src/test/moves/focus_punch.test.ts index 249647f0294..37b4e7f775a 100644 --- a/src/test/moves/focus_punch.test.ts +++ b/src/test/moves/focus_punch.test.ts @@ -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]); diff --git a/src/test/moves/foresight.test.ts b/src/test/moves/foresight.test.ts index b856ec0f852..312fb8471a6 100644 --- a/src/test/moves/foresight.test.ts +++ b/src/test/moves/foresight.test.ts @@ -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()!; diff --git a/src/test/moves/freeze_dry.test.ts b/src/test/moves/freeze_dry.test.ts index 445a432a812..5769e5e3e9c 100644 --- a/src/test/moves/freeze_dry.test.ts +++ b/src/test/moves/freeze_dry.test.ts @@ -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()!; diff --git a/src/test/moves/glaive_rush.test.ts b/src/test/moves/glaive_rush.test.ts index 5867ef751b8..9eed6868432 100644 --- a/src/test/moves/glaive_rush.test.ts +++ b/src/test/moves/glaive_rush.test.ts @@ -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; diff --git a/src/test/moves/guard_split.test.ts b/src/test/moves/guard_split.test.ts index f95d09f726c..83f74bb2204 100644 --- a/src/test/moves/guard_split.test.ts +++ b/src/test/moves/guard_split.test.ts @@ -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 ]); diff --git a/src/test/moves/guard_swap.test.ts b/src/test/moves/guard_swap.test.ts index 407d475de09..a27afaaa7ba 100644 --- a/src/test/moves/guard_swap.test.ts +++ b/src/test/moves/guard_swap.test.ts @@ -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 ]) diff --git a/src/test/moves/hyper_beam.test.ts b/src/test/moves/hyper_beam.test.ts index 1280d8b429a..7aa2dbfec2b 100644 --- a/src/test/moves/hyper_beam.test.ts +++ b/src/test/moves/hyper_beam.test.ts @@ -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]); diff --git a/src/test/moves/jaw_lock.test.ts b/src/test/moves/jaw_lock.test.ts index 42f7a244977..13843bd4803 100644 --- a/src/test/moves/jaw_lock.test.ts +++ b/src/test/moves/jaw_lock.test.ts @@ -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]); diff --git a/src/test/moves/lash_out.test.ts b/src/test/moves/lash_out.test.ts index 74d9fcd66c0..8c414832f36 100644 --- a/src/test/moves/lash_out.test.ts +++ b/src/test/moves/lash_out.test.ts @@ -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) diff --git a/src/test/moves/lucky_chant.test.ts b/src/test/moves/lucky_chant.test.ts index 7d5bfe02476..57e5ff80f1d 100644 --- a/src/test/moves/lucky_chant.test.ts +++ b/src/test/moves/lucky_chant.test.ts @@ -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]); diff --git a/src/test/moves/mat_block.test.ts b/src/test/moves/mat_block.test.ts index 4a95985eb92..b759f49bf98 100644 --- a/src/test/moves/mat_block.test.ts +++ b/src/test/moves/mat_block.test.ts @@ -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]); diff --git a/src/test/moves/parting_shot.test.ts b/src/test/moves/parting_shot.test.ts index d9535ca6482..a48e63379a5 100644 --- a/src/test/moves/parting_shot.test.ts +++ b/src/test/moves/parting_shot.test.ts @@ -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()!; diff --git a/src/test/moves/power_split.test.ts b/src/test/moves/power_split.test.ts index a532a90a54d..e53ff56fbb4 100644 --- a/src/test/moves/power_split.test.ts +++ b/src/test/moves/power_split.test.ts @@ -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 ]); diff --git a/src/test/moves/power_swap.test.ts b/src/test/moves/power_swap.test.ts index f1efeaa3af3..a3d4bfca19a 100644 --- a/src/test/moves/power_swap.test.ts +++ b/src/test/moves/power_swap.test.ts @@ -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 ]) diff --git a/src/test/moves/protect.test.ts b/src/test/moves/protect.test.ts index 83cd088aa47..24bbcbb9d34 100644 --- a/src/test/moves/protect.test.ts +++ b/src/test/moves/protect.test.ts @@ -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]); diff --git a/src/test/moves/quick_guard.test.ts b/src/test/moves/quick_guard.test.ts index 5f4af40eb71..9ab0fe1509c 100644 --- a/src/test/moves/quick_guard.test.ts +++ b/src/test/moves/quick_guard.test.ts @@ -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]); diff --git a/src/test/moves/safeguard.test.ts b/src/test/moves/safeguard.test.ts index 94a7aa6031e..62f6aed3b0e 100644 --- a/src/test/moves/safeguard.test.ts +++ b/src/test/moves/safeguard.test.ts @@ -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(); diff --git a/src/test/moves/shell_trap.test.ts b/src/test/moves/shell_trap.test.ts index 4549a8b2b73..c825a375bbd 100644 --- a/src/test/moves/shell_trap.test.ts +++ b/src/test/moves/shell_trap.test.ts @@ -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]); diff --git a/src/test/moves/transform.test.ts b/src/test/moves/transform.test.ts index 45769447e4d..76db703ae2a 100644 --- a/src/test/moves/transform.test.ts +++ b/src/test/moves/transform.test.ts @@ -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 diff --git a/src/test/moves/wide_guard.test.ts b/src/test/moves/wide_guard.test.ts index 6feeff815b5..b4e6e305539 100644 --- a/src/test/moves/wide_guard.test.ts +++ b/src/test/moves/wide_guard.test.ts @@ -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]);