From c37d90b1fa00a0eb7d4b64e934d8298ce12573e8 Mon Sep 17 00:00:00 2001 From: geeil-han Date: Wed, 11 Dec 2024 02:36:37 +0100 Subject: [PATCH] fixed automated tests --- src/data/move.ts | 3 +-- src/test/moves/shell_side_arm.test.ts | 33 +++++++++++++-------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index ba7c4d0a5d5..5d165e01dd6 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -10397,8 +10397,7 @@ export function initMoves() { .ignoresVirtual(), new AttackMove(Moves.SHELL_SIDE_ARM, Type.POISON, MoveCategory.SPECIAL, 90, 100, 10, 20, 0, 8) .attr(ShellSideArmCategoryAttr) - .attr(StatusEffectAttr, StatusEffect.POISON) - .makesContact(false), + .attr(StatusEffectAttr, StatusEffect.POISON), new AttackMove(Moves.MISTY_EXPLOSION, Type.FAIRY, MoveCategory.SPECIAL, 100, 100, 5, -1, 0, 8) .attr(SacrificialAttr) .target(MoveTarget.ALL_NEAR_OTHERS) diff --git a/src/test/moves/shell_side_arm.test.ts b/src/test/moves/shell_side_arm.test.ts index 566b5c1d42b..f3acd598c37 100644 --- a/src/test/moves/shell_side_arm.test.ts +++ b/src/test/moves/shell_side_arm.test.ts @@ -34,6 +34,22 @@ describe("Moves - Shell Side Arm", () => { .enemyMoveset(Moves.SPLASH); }); + it("should not make contact if the move stays special", async () => { + game.override.enemySpecies(Species.SLOWBRO).enemyAbility(Abilities.ROUGH_SKIN); + + await game.classicMode.startBattle([ Species.XURKITREE ]); + + const player = game.scene.getPlayerPokemon()!; + + vi.spyOn(shellSideArmAttr, "apply"); + + game.move.select(Moves.SHELL_SIDE_ARM); + await game.toNextTurn(); + + expect(shellSideArmAttr.apply).toHaveLastReturnedWith(false); + expect(player.getMaxHp()).toBe(player.hp); + }); + it("becomes a physical attack if forecasted to deal more damage as physical", async () => { game.override.enemySpecies(Species.SNORLAX); @@ -93,21 +109,4 @@ describe("Moves - Shell Side Arm", () => { expect(shellSideArmAttr.apply).toHaveLastReturnedWith(false); }); - - /** The move should stay special (which it does) and make no contact but the MAKES_CONTACT flag is set */ - it.skip("should not make contact if the move stays special", async () => { - game.override.enemySpecies(Species.SLOWBRO).enemyAbility(Abilities.ROUGH_SKIN); - - await game.classicMode.startBattle([ Species.XURKITREE ]); - - const player = game.scene.getPlayerPokemon()!; - - vi.spyOn(shellSideArmAttr, "apply"); - - game.move.select(Moves.SHELL_SIDE_ARM); - await game.toNextTurn(); - - expect(shellSideArmAttr.apply).toHaveLastReturnedWith(false); - expect(player.getMaxHp()).toBe(player.hp); - }); });