Class EjectButtonTests

java.lang.Object
com.pixelmonmod.pixelmon.api.test.impl.item.EjectButtonTests

public class EjectButtonTests extends Object
Tests for the Eject Button
  • Constructor Details

    • EjectButtonTests

      public EjectButtonTests()
  • Method Details

    • testEjectButtonShouldSwitchOutTheHolderUponTakingDamage

      public static CompletableFuture<TestResult> testEjectButtonShouldSwitchOutTheHolderUponTakingDamage(BattleTestHelper helper)
      If the holder of an Eject Button is hit by a damaging move and does not faint, it consumes the Eject Button and is immediately switched out for a Pokémon of its Trainer's choice.

      In this test, a Magikarp holding an Eject Button that knows the move Splash is on a team with a Mew that also knows Splash. The Magikarp starts off facing a Machop that knows the move Low Kick.

           Turn 1
           The Magikarp uses Splash.
           The Machop uses Low Kick.
           The Magikarp's Eject Button switches it out and Mew is switched in by the particpant.
           -
           We verify that the Magikarp does not have a held item (Eject Button was consumed).
           We verify that the Magikarp is not on the battlefield.
           We verify that the Mew is on the battlefield.
           We verify that the Mew is at full health.
       
    • testEjectButtonDoesNotActivateIfHolderCannotSwitch

      public static CompletableFuture<TestResult> testEjectButtonDoesNotActivateIfHolderCannotSwitch(BattleTestHelper helper)
      The Eject Button does not activate if the holder is a wild Pokémon or its Trainer has no Pokémon to switch in.

      In this test, a Magikarp holding an Eject Button that knows the move Splash faces a Machop that knows the move Low Kick.

           Turn 1
           The Magikarp uses Splash.
           The Machop uses Low Kick.
           The Magikarp's Eject Button does not activate.
           -
           We verify that the Magikarp has a held item.
           We verify that the Magikarp is on the battlefield.
       
    • testEjectButtonDoesNotActivateUponSubstituteTakingDamage

      public static CompletableFuture<TestResult> testEjectButtonDoesNotActivateUponSubstituteTakingDamage(BattleTestHelper helper)
      The Eject Button will not activate if a Pokémon's substitute takes the hit instead.

      In this test, a Mew holding an Eject Button that knows the move Substitute is on a team with a Magikarp that knows Splash. The Mew starts off facing a Machop that knows the move Low Kick.

           Turn 1
           The Mew uses Substitute.
           The Machop uses Low Kick.
           The Mew's Eject Button does not activate.
           -
           We verify that the Mew has a held item.
           We verify that the Mew is on the battlefield.
       
    • testEjectButtonDoesNotActivateFromMovesAffectedBySheerForce

      public static CompletableFuture<TestResult> testEjectButtonDoesNotActivateFromMovesAffectedBySheerForce(BattleTestHelper helper)
      If a move is affected by the effect of Sheer Force, that move will not activate the Eject Button.

      In this test, a Mew holding an Eject Button that knows the move Splash is on a team with a Magikarp that also knows Splash. The Mew starts off facing a Mawile with the Sheer Force ability that knows the move Astonish.

           Turn 1
           The Mew uses Splash.
           The Mawile uses Astonish.
           The Mew's Eject Button does not activate.
           -
           We verify that the Mew has a held item.
           We verify that the Mew is on the battlefield.
       
    • testEjectButtonActivatesAfterLastStrikeOfMultistrikeMove

      public static CompletableFuture<TestResult> testEjectButtonActivatesAfterLastStrikeOfMultistrikeMove(BattleTestHelper helper)
      The Eject Button activates after the last strike of a multistrike move.

      In this test, a Mew holding an Eject Button that knows the move Splash is on a team with a Magikarp that also knows Splash. The Mew starts off facing a Thwackey that knows the move Double Hit.

           Turn 1
           The Mew uses Splash.
           The Thwackey uses Double Hit. The Thwackey hits the Mew twice. The Mew's Eject Button activates.
           -
           We verify that the battlelog displayed a message stating that the Thwackey's attack hit 2 times.
           We verify that the Mew does not have a held item.
           We verify that the Mew is not on the battlefield.
           We verify that the Magikarp is on the battlefield.
           We verify that the Magikarp hasn't taken any damage.
       
    • testOnlyOneEjectButtonCanActivatePerAttack

      public static CompletableFuture<TestResult> testOnlyOneEjectButtonCanActivatePerAttack(BattleTestHelper helper)
      If multiple Pokémon, each holding an Eject Button, are hit by a single attack, only the fastest holder's held Eject Button will activate.

      In this Double Battle test, a Mew holding an Eject Button that knows the move Splash is on a team with a Magikarp holding an Eject Button that also knows Splash, a Metapod that knows the move Harden and a Kakuna that also knows the move Harden. The Mew and Magikarp start off facing a Tinkatink that knows the move Rock Slide.

           Turn 1
           The Mew uses Splash.
           The Magikarp uses Splash.
           The Tinkatink uses Rock Slide.
           The Mew's Eject Button activates. The Mew switches out for the Metapod.
           The Magikarp's Eject Button does not activate.
           -
           We verify that the Mew is not at full health.
           We verify that the Magikarp is not at full health.
           We verify that the Metapod is at full health.
           We verify that the Kakuna is at full health.
           We verify that the Mew does not have a held item.
           We verify that the Magikarp has a held item.
           We verify that the Mew is not on the battlefield.
           We verify that the Magikarp is on the battlefield.
           We verify that the Metapod is on the battlefield.
           We verify that the Kakuna is not on the battlefield.
       
    • testEjectButtonUnaffectedBySuctionCups

      public static CompletableFuture<TestResult> testEjectButtonUnaffectedBySuctionCups(BattleTestHelper helper)
      Suction Cups do not prevent a Pokémon being switched out by the Eject Button.

      In this test, a Inkay with the Suction Cups ability, that holds an Eject Button, and knows the move Splash is on a team with a Magikarp that also knows Splash. The Inkay is sent out first to face a Machop that knows the move Low Kick.

           Turn 1
           The Inkay uses Splash.
           The Machop uses Low Kick.
           The Inkay's Eject Button activates.
           -
           We verify that the Inkay does not have a held item.
           We verify that the Inkay is not on the battlefield.
           We verify that the Magikarp is on the battlefield.
       
    • testEjectButtonUnaffectedByTrappingMoves

      public static CompletableFuture<TestResult> testEjectButtonUnaffectedByTrappingMoves(BattleTestHelper helper)
      Trapping moves do not prevent a Pokémon being switched out by the Eject Button.

      In this test, a Mew holding an Eject Button that knows the move Splash is on a team with a Magikarp that also knows Splash. The Mew is sent out first to face a Decidueye that knows the move Spirit Shackle.

           Turn 1
           The Mew uses Splash.
           The Decidueye uses Spirit Shackle.
           The Mew's Eject Button activates.
           -
           We verify that the Mew does not have a held item.
           We verify that the Mew is not on the battlefield.
           We verify that the Magikarp is on the battlefield.
       
    • testEjectButtonUnaffectedByTrappingAbilities

      public static CompletableFuture<TestResult> testEjectButtonUnaffectedByTrappingAbilities(BattleTestHelper helper)
      Trapping abilities do not prevent a Pokémon being switched out by the Eject Button.

      In this test, a Mew holding an Eject Button that knows the move Splash is on a team with a Magikarp that also knows Splash. The Mew is sent out first to face a Trapinch with the Arena Trap ability that knows the move Mud-Slap.

           Turn 1
           The Mew uses Splash.
           The Trapinch uses Mud-Slap.
           The Mew's Eject Button activates.
           -
           We verify that the Mew does not have a held item.
           We verify that the Mew is not on the battlefield.
           We verify that the Magikarp is on the battlefield.
       
    • testEjectButtonUnaffectedByDynamax

      public static CompletableFuture<TestResult> testEjectButtonUnaffectedByDynamax(BattleTestHelper helper)
      Dynamax does not prevent a Pokémon being switched out by the Eject Button.

      In this test, a Mew holding an Eject Button that knows the move Struggle Bug is on a team with a Magikarp that also knows Splash. The Mew is sent out first to face a Machop that knows the move Low Kick.

           Turn 1
           The Mew Dynamaxes.
           The Mew uses Max Flutterby.
           The Machop uses Low Kick.
           The Mew's Eject Button activates.
           -
           We verify that the Mew does not have a held item.
           We verify that the Mew is not on the battlefield.
           We verify that the Magikarp is on the battlefield.
       
    • testEjectButtonRemovedByKnockOffBeforeActivating

      public static CompletableFuture<TestResult> testEjectButtonRemovedByKnockOffBeforeActivating(BattleTestHelper helper)
      The Eject Button will be removed from the holder by Knock Off before it has the opportunity to activate.

      In this test, a Mew holding an Eject Button that knows the move Splash is on a team with a Magikarp that also knows Splash. The Mew is sent out first to face a Iron Jugulis that knows the move Knock Off.

           Turn 1
           The Mew uses Splash.
           The Iron Jugulis uses Knock Off. The Mew's Eject Button is removed.
           -
           We verify that the Mew does not have a held item.
           We verify that the Mew is on the battlefield.
           We verify that the Magikarp is not on the battlefield.
       
    • testEjectButtonRemovedByThiefOrCovetBeforeActivating

      public static CompletableFuture<TestResult> testEjectButtonRemovedByThiefOrCovetBeforeActivating(BattleTestHelper helper)
      The Eject Button will be removed from the holder by Thief or Covet before it has the opportunity to activate.

      In this test, a Mew holding an Eject Button that knows the move Splash is on a team with a Magikarp that also knows Splash. The Mew is sent out first to face a Tinkatink that knows the move Covet.

           Turn 1
           The Mew uses Splash.
           The Tinkatink uses Covet. The Mew's Eject Button is stolen.
           -
           We verify that the Mew does not have a held item.
           We verify that the Tinkatink has a held item.
           We verify that the Mew is on the battlefield.
           We verify that the Magikarp is not on the battlefield.
       
    • testEjectButtonRemovedByMagicianBeforeActivating

      public static CompletableFuture<TestResult> testEjectButtonRemovedByMagicianBeforeActivating(BattleTestHelper helper)
      The Eject Button will be removed from the holder by Magician before it has the opportunity to activate.

      In this test, a Mew holding an Eject Button that knows the move Splash is on a team with a Magikarp that also knows Splash. The Mew is sent out first to face a Fennekin with the Magician ability that knows the move Ember.

           Turn 1
           The Mew uses Splash.
           The Fennekin uses Ember. The Mew's Eject Button is stolen.
           -
           We verify that the Mew does not have a held item.
           We verify that the Fennekin has a held item.
           We verify that the Mew is on the battlefield.
           We verify that the Magikarp is not on the battlefield.
       
    • testEjectButtonDoesNotActivateTheSameTurnPickpocketStoleIt

      public static CompletableFuture<TestResult> testEjectButtonDoesNotActivateTheSameTurnPickpocketStoleIt(BattleTestHelper helper)
      If a Pokémon steals an Eject Button due to Pickpocket, that Eject Button cannot activate for that same attack.

      In this test, a Mew holding an Eject Button that knows the move Pound is on a team with a Magikarp that knows Splash. A Tinkatink with the Pickpocket ability that knows the move Baby-Doll Eyes is on a team with a Metapod that knows the move Harden. The Mew is sent out first to face the Tinkatink.

           Turn 1
           The Mew uses Pound. The Mew's Eject Button is stolen by the Tinkatink. The Eject Button does not activate.
           The Tinkatink uses Baby-Doll Eyes.
           -
           We verify that the Mew does not have a held item.
           We verify that the Tinkatink has a held item.
           We verify that the Mew is on the battlefield.
           We verify that the Magikarp is not on the battlefield.
           We verify that the Tinkatink is on the battlefield.
           We verify that the Metapod is not on the battlefield.
       
    • testEjectButtonDoesNotActivateFromDragonTailOrCircleThrow

      public static CompletableFuture<TestResult> testEjectButtonDoesNotActivateFromDragonTailOrCircleThrow(BattleTestHelper helper)
      If a Pokémon holding an Eject Button is hit by Dragon Tail or Circle Throw, it is forced to switch out or flee before its held Eject Button has the opportunity to activate.

      In this test, a Mew holding an Eject Button that knows the move Splash is on a team with a Magikarp that also knows Splash. The Mew is sent out first to face a Tarountula that knows the move Circle Throw.

           Turn 1
           The Mew uses Splash.
           The Tarountula uses Circle Throw. The Mew is forced to switch out and its Eject Button does not activate.
           -
           We verify that the Mew has a held item.
           We verify that the Tarountula does not have a held item.
           We verify that the Mew is not on the battlefield.
           We verify that the Magikarp is on the battlefield.
       
    • testEjectButtonPreventsAttackerFromSwitchingOutFromTheirMove

      public static CompletableFuture<TestResult> testEjectButtonPreventsAttackerFromSwitchingOutFromTheirMove(BattleTestHelper helper)
      If U-turn or Volt Switch causes its target's held Eject Button to activate, the Pokémon that used the move is not switched out.

      In this test, a Mew holding an Eject Button that knows the move Splash is on a team with a Magikarp that also knows Splash. A Drizzile that knows the move U-turn is on a team with a Metapod that knows the move Harden. The Mew is sent out first to face the Drizzile.

           Turn 1
           The Mew uses Splash.
           The Drizzile uses U-turn. The Mew's Eject Button activates.
           The Drizzile does not switch out.
           -
           We verify that the Mew does not have a held item.
           We verify that the Mew is not on the battlefield.
           We verify that the Magikarp is on the battlefield.
           We verify that the Drizzile is on the battlefield.
           We verify that the Metapod is not on the battlefield.
       
    • testEjectButtonActivatesBeforeEmergencyExitAndWimpOut

      public static CompletableFuture<TestResult> testEjectButtonActivatesBeforeEmergencyExitAndWimpOut(BattleTestHelper helper)
      If a Pokémon with Emergency Exit or Wimp Out holds an Eject Button, the Eject Button activates before their ability has the opportunity to.

      In this test, a Wimpod holding an Eject Button that knows the move Sleep Talk is on a team with a Magikarp that knows Splash. The Wimpod is sent out first to face a Tinkatink that knows the move Rock Slide.

           Turn 1
           The Wimpod uses Sleep Talk.
           The Tinkatink uses Rock Slide. The Wimpod drops below 50% HP.
           The Wimpod's Eject Button activates.
           -
           We verify that the Wimpod does not have a held item.
           We verify that the Wimpod is not on the battlefield.
           We verify that the Magikarp is on the battlefield.
       
    • testEjectButtonActivatingDoesNotTriggerSymbiosis

      public static CompletableFuture<TestResult> testEjectButtonActivatingDoesNotTriggerSymbiosis(BattleTestHelper helper)
      The Eject Button activating cannot trigger Symbiosis.

      In this Double Battle test, a Mew holding an Eject Button that knows the move Splash is on a team with a Oranguru holding a Sitrus Berry that knows the move Sleep Talk and a Magikarp that also knows Splash. The Mew is sent out first to face a Tinkatink that knows the move Stone Edge.

           Turn 1
           The Mew uses Splash.
           The Tinkatink uses Stone Edge.
           The Mew's Eject Button activates. The Oranguru's Symbiosis does not activate.
           The Oranguru uses Sleep Talk.
           -
           We verify that the Mew does not have a held item.
           We verify that the Oranguru has a held item.
           We verify that the Magikarp does not have a held item.
           We verify that the Mew is not on the battlefield.
           We verify that the Magikarp is on the battlefield.