Include Suggestions

This commit is contained in:
xsn34kzx 2025-03-26 22:29:54 -04:00
parent 9fb77dfc0a
commit b8d65c643e
2 changed files with 7 additions and 11 deletions

View File

@ -2822,10 +2822,7 @@ const modifierPool: ModifierPool = {
modifierTypes.MYSTICAL_ROCK, modifierTypes.MYSTICAL_ROCK,
(party: Pokemon[]) => { (party: Pokemon[]) => {
return party.some(p => { return party.some(p => {
const moveset = p const moveset = p.getMoveset(true).map(m => m.moveId);
.getMoveset(true)
.filter(m => !isNullOrUndefined(m))
.map(m => m.moveId);
const hasAbility = [ const hasAbility = [
Abilities.DRIZZLE, Abilities.DRIZZLE,

View File

@ -1,5 +1,4 @@
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { MoveEndPhase } from "#app/phases/move-end-phase";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
@ -25,37 +24,37 @@ describe("Items - Mystical Rock", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.SHUCKLE)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.moveset([Moves.SUNNY_DAY, Moves.GRASSY_TERRAIN]) .moveset([Moves.SUNNY_DAY, Moves.GRASSY_TERRAIN])
.startingHeldItems([{ name: "MYSTICAL_ROCK", count: 2 }]) .startingHeldItems([{ name: "MYSTICAL_ROCK", count: 2 }])
.battleType("single"); .battleType("single");
}, 20000); });
it("should increase weather duration by +2 turns per stack", async () => { it("should increase weather duration by +2 turns per stack", async () => {
await game.classicMode.startBattle([Species.GASTLY]); await game.classicMode.startBattle([Species.GASTLY]);
game.move.select(Moves.SUNNY_DAY); game.move.select(Moves.SUNNY_DAY);
await game.phaseInterceptor.to(MoveEndPhase); await game.phaseInterceptor.to("MoveEndPhase");
const weather = globalScene.arena.weather; const weather = globalScene.arena.weather;
expect(weather).toBeDefined(); expect(weather).toBeDefined();
expect(weather!.turnsLeft).to.equal(9); expect(weather!.turnsLeft).to.equal(9);
}, 20000); });
it("should increase terrain duration by +2 turns per stack", async () => { it("should increase terrain duration by +2 turns per stack", async () => {
await game.classicMode.startBattle([Species.GASTLY]); await game.classicMode.startBattle([Species.GASTLY]);
game.move.select(Moves.GRASSY_TERRAIN); game.move.select(Moves.GRASSY_TERRAIN);
await game.phaseInterceptor.to(MoveEndPhase); await game.phaseInterceptor.to("MoveEndPhase");
const terrain = globalScene.arena.terrain; const terrain = globalScene.arena.terrain;
expect(terrain).toBeDefined(); expect(terrain).toBeDefined();
expect(terrain!.turnsLeft).to.equal(9); expect(terrain!.turnsLeft).to.equal(9);
}, 20000); });
}); });