diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index d83b5c6835f..b5574c02c8b 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -2822,10 +2822,7 @@ const modifierPool: ModifierPool = { modifierTypes.MYSTICAL_ROCK, (party: Pokemon[]) => { return party.some(p => { - const moveset = p - .getMoveset(true) - .filter(m => !isNullOrUndefined(m)) - .map(m => m.moveId); + const moveset = p.getMoveset(true).map(m => m.moveId); const hasAbility = [ Abilities.DRIZZLE, diff --git a/test/items/mystical_rock.test.ts b/test/items/mystical_rock.test.ts index 91fd6405704..0558bc21fe1 100644 --- a/test/items/mystical_rock.test.ts +++ b/test/items/mystical_rock.test.ts @@ -1,5 +1,4 @@ import { globalScene } from "#app/global-scene"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; import { Moves } from "#enums/moves"; import { Abilities } from "#enums/abilities"; import { Species } from "#enums/species"; @@ -25,37 +24,37 @@ describe("Items - Mystical Rock", () => { game = new GameManager(phaserGame); game.override - .enemySpecies(Species.MAGIKARP) + .enemySpecies(Species.SHUCKLE) .enemyMoveset(Moves.SPLASH) .enemyAbility(Abilities.BALL_FETCH) .moveset([Moves.SUNNY_DAY, Moves.GRASSY_TERRAIN]) .startingHeldItems([{ name: "MYSTICAL_ROCK", count: 2 }]) .battleType("single"); - }, 20000); + }); it("should increase weather duration by +2 turns per stack", async () => { await game.classicMode.startBattle([Species.GASTLY]); game.move.select(Moves.SUNNY_DAY); - await game.phaseInterceptor.to(MoveEndPhase); + await game.phaseInterceptor.to("MoveEndPhase"); const weather = globalScene.arena.weather; expect(weather).toBeDefined(); expect(weather!.turnsLeft).to.equal(9); - }, 20000); + }); it("should increase terrain duration by +2 turns per stack", async () => { await game.classicMode.startBattle([Species.GASTLY]); game.move.select(Moves.GRASSY_TERRAIN); - await game.phaseInterceptor.to(MoveEndPhase); + await game.phaseInterceptor.to("MoveEndPhase"); const terrain = globalScene.arena.terrain; expect(terrain).toBeDefined(); expect(terrain!.turnsLeft).to.equal(9); - }, 20000); + }); });