Class MagicRoomTests

java.lang.Object
com.pixelmonmod.pixelmon.api.test.impl.move.MagicRoomTests

public class MagicRoomTests extends Object
  • Constructor Details

    • MagicRoomTests

      public MagicRoomTests()
  • Method Details

    • testShouldNegateResidualHealingEvents

      public static CompletableFuture<TestResult> testShouldNegateResidualHealingEvents(BattleTestHelper helper)
      Magic Room should prevent items, such as Leftovers, from healing Pokémon at the end of a turn.

      In this test, a Lopunny that has the Limber ability, that is holding a Leftovers, and that knows the move Belly Drum faces a Golem that knows Magic Room. - The Lopunny uses Belly Drum, which cuts its HP in half. The Golem uses Magic Room. Magic Room prevents the Lopunny's Leftovers from activating. - We verify that the Magic Room status is active. We verify that the Lopunny is at 50% HP.

    • testShouldPreventItemsFromBeingConsumed

      public static CompletableFuture<TestResult> testShouldPreventItemsFromBeingConsumed(BattleTestHelper helper)
      Magic Room should prevent items from being consumed.

      In this test, a Lopunny that has the Limber ability, that is holding a Chople Berry (halves the damage from a super-effective Fighting-type attack), and that knows the move Magic Room faces a Golem that knows the Fighting-type move Low Kick. - The Lopunny uses Magic Room. The Golem uses Low Kick. Magic Room prevents the Lopunny from consuming its Chople Berry and reducing the damage from Low Kick. - We verify that the Magic Room status is active. We verify that the Lopunny has a held item.

    • testShouldIgnoreTheEffectsOfItemsThatDisableMoves

      public static CompletableFuture<TestResult> testShouldIgnoreTheEffectsOfItemsThatDisableMoves(BattleTestHelper helper)
      Magic Room should prevent items, such as Assault Vest, from disabling the moves a Pokémon can use.

      In this test, a Lopunny that has the Limber ability, that is holding an Assault Vest, and that knows the move Protect faces a Golem that knows Magic Room. - Turn 1 The Lopunny is unable to use Protect due to its Assault Vest so it uses Struggle instead. The Lopunny takes 25% of its max HP in recoil from Struggle. The Golem uses Magic Room. Turn 2 Magic Room prevents the Lopunny's Assault Vest from having any effect. The Lopunny uses Protect. The Golem uses Magic Room. - After turn 1... We verify that the Lopunny is not at full health. We verify that the Lopunny is at 75% HP. After turn 2... We verify that the Magic Room status is active. We verify that the Lopunny is at 75% HP.

    • testShouldCauseFlingToFail

      public static CompletableFuture<TestResult> testShouldCauseFlingToFail(BattleTestHelper helper)
      Magic Room should prevent Fling from throwing its item, causing it to fail.

      In this test, a Lopunny that has the Limber ability, that is holding a Sea Incense, and that knows the move Fling faces a Speed-form Deoxys that knows the move Magic Room. - The Deoxys uses Magic Room. The Lopunny uses Fling. It fails. - We verify that the Magic Room status is active. We verify that the Deoxys is at full health. We verify that the Lopunny has a held item.

    • testShouldNotPreventMegaEvolution

      public static CompletableFuture<TestResult> testShouldNotPreventMegaEvolution(BattleTestHelper helper)
      Magic Room should not prevent Pokémon from Mega Evolving.

      In this test, a Lopunny that has the Limber ability, that is holding a Lopunnite, and that knows the move Sleep Talk faces a Speed-form Deoxys that knows the moves Magic Room and Sleep Talk. - Turn 1 The Deoxys uses Magic Room. The Lopunny uses Sleep Talk. Turn 2 The Deoxys uses Sleep Talk. The Lopunny Mega Evolves and uses Sleep Talk. - After turn 2... We verify that the Magic Room status is active. We verify that the Lopunny has Mega Evolved.

    • testShouldNotPreventPrimalReversion

      public static CompletableFuture<TestResult> testShouldNotPreventPrimalReversion(BattleTestHelper helper)
      Magic Room should not prevent Pokémon from undergoing Primal Reversion.

      In this test, a Zapdos that knows the move U-turn and a Groudon that is holding a Red Orb and that knows the move Protect face an Accelgor that knows the moves Magic Room. Accelgor is the fastest Pokémon among these three and will move first. - Turn 1 The Accelgor uses Magic Room. The Zapdos uses U-turn. It switches out and is replaced by the Groudon. The Groudon, holding its Red Orb, immediately undergoes Primal Reversion. - We verify that the Magic Room status is active. We verify that the Groudon is on the field. We verify that the Groudon's ability is Desolate Land, which signals that it underwent Primal Reversion.

    • testShouldRemoveTheEffectIfUsedWhileAlreadyActive

      public static CompletableFuture<TestResult> testShouldRemoveTheEffectIfUsedWhileAlreadyActive(BattleTestHelper helper)
      Using Magic Room while it is already in effect will remove the effects of Magic Room immediately.

      In this test, a Lopunny that has the Limber ability, that is holding a Leftovers, and that knows the move Belly Drum faces a Lunatone that knows Magic Room. - Turn 1 The Lopunny uses Belly Drum, which cuts its HP in half. The Lunatone uses Magic Room. Magic Room prevents the Lopunny's Leftovers from activating. Turn 2 The Lopunny uses Sleep Talk. The Lunatone uses Magic Room. The Lopunny's Leftovers can now activate and restores 1/16 of its max HP. - After turn 1: We verify that the Magic Room status is active. We verify that the Lopunny is at 50% HP. After turn 2: We verify that the Magic Room status is gone. We verify that the Lopunny is at 56% HP.

    • testShouldNotSuppressPluckOrBugBite

      public static CompletableFuture<TestResult> testShouldNotSuppressPluckOrBugBite(BattleTestHelper helper)
      Magic Room does not suppress the ability for Pluck or Bug Bite to consume the target's berry.

      In this test, a Weedle that knows the move Bug Bite faces a Lunatone that holds a Liechi Berry and that knows the move Magic Room. - Turn 1 The Lunatone uses Magic Room. The Weedle uses Bug Bite. The Weedle eats the Lunatone's Liechi Berry. - We verify that the Magic Room status is active. We verify that the Lunatone does not have a held item. We verify that the Weedle had its Attack raised by one stage.

    • testShouldNotPreventTrickFromWorking

      public static CompletableFuture<TestResult> testShouldNotPreventTrickFromWorking(BattleTestHelper helper)
      Magic Room does not prevent effects that move items around from working.

      In this test, a Banette that knows the move Trick faces a Lunatone that holds a Liechi Berry and that knows the move Magic Room. - The Lunatone uses Magic Room. The Banette uses Trick. The Banette receives the Liechi Berry. - We verify that the Magic Room status is active. We verify that the Lunatone does not have a held item. We verify that the Banette does have a held item.

    • testShouldNotPreventPickpocketFromWorking

      public static CompletableFuture<TestResult> testShouldNotPreventPickpocketFromWorking(BattleTestHelper helper)
      Magic Room does not prevent effects that move items around from working.

      In this test, a Seedot that has the Pickpocket ability and that knows the move Sleep Talk, faces a Lunatone that holds a Liechi Berry and knows the moves Magic Room and Stomping Tantrum. - Turn 1 The Lunatone uses Magic Room. The Seedot uses Trick. The Seedot receives the Liechi Berry. - We verify that the Magic Room status is active. We verify that the Lunatone does not have a held item. We verify that the Seedot does have a held item.

    • testShouldMakeAttacksWithTypesBasedOnHeldItemsNormalType

      public static CompletableFuture<TestResult> testShouldMakeAttacksWithTypesBasedOnHeldItemsNormalType(BattleTestHelper helper)
      If a Pokémon uses Judgment, Techno Blast, or Multi-Attack while Magic Room is in effect, it will be a Normal-type move.

      In this test, an Arceus that is holding a Draco Plate and that knows the move Judgment faces a Klefki that has the Magician ability and that knows the moves Magic Room and Sleep Talk. - Turn 1 The Arceus uses a Dragon-typed Judgment. The Klefki uses Magic Room. Turn 2 The Arceus uses Judgment, which is now Normal-typed. The Klefki uses Sleep Talk. - After turn 1: We verify that the Magic Room status is active. We verify that the Arceus' last attack was Dragon-typed. After turn 2: We verify that the Magic Room status is active. We verify that the Arceus' last attack was Normal-typed.

    • testShouldNotNegateExpGainingHeldItems

      public static CompletableFuture<TestResult> testShouldNotNegateExpGainingHeldItems(BattleTestHelper helper)
      Magic Room does not negate item effects that affect experience.

      In this test, a level 50 Gastly that is holding a Lucky Egg and that knows the move Sleep Talk and a level 50 Gastly that knows the move Sleep Talk are on a team. In a Double Battle, they face a Klefki that knows the move Magic Room and a Glimmet that knows Self-Destruct. Level 50 is used because the experience value a Pokémon has is only the experience for their current level, which is reset to 0 upon leveling up. So we don't want the Gastly's to level up in this test. - The Klefki uses Magic Room. The Glimmet uses Self-Destruct. The first Gastly uses Sleep Talk. The second Gastly uses Sleep Talk. - We verify that the Magic Room status is active. We verify that the Glimmet fainted. We verify that the first Gastly gained 150% of the experience that the second Gastly gained.

    • testShouldNotNegateEVGainingHeldItems

      public static CompletableFuture<TestResult> testShouldNotNegateEVGainingHeldItems(BattleTestHelper helper)
      Magic Room does not negate item effects that affect effort values.

      In this test, a level 1 Gastly that is holding a Macho Brace and that knows the move Sleep Talk and a level 1 Gastly that knows the move Sleep Talk are on a team. In a Double Battle, they face a Klefki that knows the move Magic Room and a Glimmet that knows Self-Destruct. - The Klefki uses Magic Room. The Glimmet uses Self-Destruct. The first Gastly uses Sleep Talk. The second Gastly uses Sleep Talk. - We verify that the Magic Room status is active. We verify that the Glimmet fainted. We verify that the first Gastly gained twice the Special Attack EVs that the second Gastly gained.

    • testShouldNotNegateFriendshipGainingHeldItems

      public static CompletableFuture<TestResult> testShouldNotNegateFriendshipGainingHeldItems(BattleTestHelper helper)
      Magic Room does not negate item effects that affect friendship.

      In this test, a level 20 Gastly with 200 Friendship that is holding a Soothe Bell and that knows the move Sleep Talk, and a level 20 Gastly with 200 Friendship that also knows the move Sleep Talk are on a team. In a Double Battle, they face a Klefki that knows the moves Magic Room and Self-Destruct and a Glimmet that knows Self-Destruct. - 200 Friendship is used because at less than 200 Friendship Pokemon earn an odd number of points of Friendship per level up, while the 1.5x multiplier from the Soothe Bell is rounded down, effectively losing 1 Friendship from it for each level up under 200 Friendship and making the number of Friendship points earned in the test not a consistent 1.5x more than without the Soothe Bell. - Turn 1 The Klefki uses Magic Room. The Glimmet uses Self-Destruct. The first Gastly uses Sleep Talk. The second Gastly uses Sleep Talk. Turn 2 The Klefki uses Self-Destruct. The battle ends. - After turn 1: We verify that the Magic Room status is active. We verify that the Glimmet fainted. After turn 2: We verify that the Magic Room status is active. We verify that the Klefki fainted. After the battle ends: We verify that the first Gastly's Friendship value is 50% more than the second Gastly's.

    • testShouldNegateTheSpeedDropFromMachoBrace

      public static CompletableFuture<TestResult> testShouldNegateTheSpeedDropFromMachoBrace(BattleTestHelper helper)
      Magic Room negates the Speed drop from the Macho Brace and Power items (such as the Power Weight).

      In this test, an Grumpig that is holding a Macho Brace and that knows the move Sleep Talk faces a Klefki that has the Magician ability and that knows the moves Magic Room and Sleep Talk. - Turn 1 The Klefki uses Magic Room. The Grumpig uses Payback. Turn 2 The Grumpig uses Payback. The Klefki uses Sleep Talk. - After turn 1: We verify that the Magic Room status is active. We verify that the Grumpig's Payback power doubled to 100, which signals that Grumpig moved second. After turn 2: We verify that the Magic Room status is active. We verify that the Grumpig's Payback power is 50, which signals that Grumpig moved first.

    • testShouldNotPreventUsingZMoves

      public static CompletableFuture<TestResult> testShouldNotPreventUsingZMoves(BattleTestHelper helper)
      Magic Room does not prevent Pokémon from using a Z-Move with a Z-Crystal.

      In this test, an Articuno that is holding an Icium-Z and that knows the move Ice Beam faces a Delphox that knows the move Magic Room. - The Delphox uses Magic Room. The Articuno uses the Z-Move, Subzero Slammer. - We verify that the Magic Room status is active. We verify that the Articuno's last attack was a Z-Move. We verify that the Delphox is not at full health.

    • testShouldNotPreventBlankTMsFromWorking

      public static CompletableFuture<TestResult> testShouldNotPreventBlankTMsFromWorking(BattleTestHelper helper)
      Magic Room should not prevent Blank TMs and Blank TRs from having moves imprinted on them and incrementing the amount of times a move was used.

      In this test, a Seedot that is holding a Blank TR and that knows the move Sleep Talk, faces a Lunatone that knows the moves Magic Room. - Turn 1 The Lunatone uses Magic Room. The Seedot uses Sleep Talk. The Seedot's Blank TR becomes imprinted with Sleep Talk. - We verify that the Seedot's Blank TR has the tag signaling it has had a move imprinted onto it.