Class EjectPackTests

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

public class EjectPackTests extends Object
  • Constructor Details

    • EjectPackTests

      public EjectPackTests()
  • Method Details

    • testShouldSwitchOutTheHolderWhenTheHoldersStatsAreLowered

      public static CompletableFuture<TestResult> testShouldSwitchOutTheHolderWhenTheHoldersStatsAreLowered(BattleTestHelper helper)
      An Eject Pack held by a Pokémon switches the holder out when the holder has any of its stats lowered.

      In this test, a Magikarp holding an Eject Pack 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 Leer. - Turn 1 The Magikarp uses Splash. The Machop uses Leer. The Magikarp's Eject Pack switches it out and Mew is switched in by the particpant. - We verify that the Magikarp does not have a held item (Eject Pack 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 did not have its Defense lowered by 1.

    • testShouldSwitchOutTheHolderAfterMoodysStatDrop

      public static CompletableFuture<TestResult> testShouldSwitchOutTheHolderAfterMoodysStatDrop(BattleTestHelper helper)
      An Eject Pack held by a Pokémon switches the holder out when the Moody ability lowers on of the Pokémon's stats.

      In this test, a Glalie holding an Eject Pack that knows the move Protect is on a team with a Mew that also knows Protect. The Glalie starts off facing a second Mew that knows the move Protect. - Turn 1 The Mew uses Protect. The Glalie uses Protect. The Glalie's Moody activates and raises one of its stats by two stages and lowers one of its stats by one stage. The Glalie's Eject Pack switches it out and Mew is switched in by the particpant. - We verify that the Glalie is not on the battlefield. We verify that the Mew is on the battlefield.

    • testShouldNotSwitchOutTheHolderDuringPartingShotIfTheOpponentCanSwitch

      public static CompletableFuture<TestResult> testShouldNotSwitchOutTheHolderDuringPartingShotIfTheOpponentCanSwitch(BattleTestHelper helper)
      An Eject Pack held by a Pokémon doesn't switch out the holder when hit by a Parting Shot if the Parting Shot user switches out.

      In this test, a Mew that knows the move Parting Shot is on a team with a Muk that knows the move Sleep Talk. Their opponent's team has a Metapod that is holding a Eject Pack and that knows Sleep talk, along with a Magikarp that knows Splash. - Turn 1 The Mew uses Parting Shot. The Metapod's Attack and Special Attack are both lowered by one stage. The Mew is switched out. The Muk is switched in. The Metapod's Eject Pack does not activate and it uses Sleep Talk. - We verify that the Mew is not on the battlefield. We verify that the Muk is on the battlefield. We verify that the Metapod is on the battlefield. We verify that the Magikarp is not on the battlefield.

    • testShouldSwitchOutTheHolderIfTheHoldersStatsAreLoweredWhileSemiInvulnerable

      public static CompletableFuture<TestResult> testShouldSwitchOutTheHolderIfTheHoldersStatsAreLoweredWhileSemiInvulnerable(BattleTestHelper helper)
      An Eject Pack held by a Pokémon switches the holder out even if the holder has its stats lowered while semi-invulnerable.

      In this test, a Charmeleon holding an Eject Pack that knows the move Phantom Force is on a team with a Magikarp that knows Splash. They're facing a Wynaut with the No Guard ability that knows the move Growl. - Turn 1 The Charmeleon uses Phantom Force. Charmeleon enter a semi-invulnerable state. The Wynaut uses Growl. The Growl hits the Charmeleon and lowers its Attack. Charmeleon's Eject Pack activates and switches it out of battle. Magikarp switches in. - We verify that the Charmeleon is not on the battlefield. We verify that the Magikarp is on the battlefield.

    • testShouldSwitchOutTheHolderIfTheHoldersStatsAreLoweredDueToUsingSwallow

      public static CompletableFuture<TestResult> testShouldSwitchOutTheHolderIfTheHoldersStatsAreLoweredDueToUsingSwallow(BattleTestHelper helper)
      An Eject Pack held by a Pokémon switches the holder out if the holder's stats are decreased from using the Stockpile move followed by the Swallow move.

      In this test, a Charmeleon holding an Eject Pack that knows the moves Stockpile and Swallow is on a team with a Magikarp that knows Splash. They're facing a Wynaut that knows the move Tackle. - Turn 1 The Charmeleon uses Stockpile. The Charmeleon's Defense and Special Defense are raised by one stage. The Wynaut uses Tackle. Turn 2 The Charmeleon uses Swallow. The Charmeleon's Defense and Special Defense are lowered by one stage. The Charmeleon's Eject Pack activates and it switches out. Magikarp is switched in. The Wynaut uses Tackle. - We verify that the Charmeleon's Defense and Special Defense were raised by one stage after turn one. We verify that the Charmeleon is not on the battlefield after turn two. We verify that the Magikarp is on the battlefield after turn two. We verify that the Magikarp took damage from the Wynaut's Tackle.

    • testShouldNotSwitchOutTheHolderIfTheEjectPackWasAcquiredAfterAStatDrop

      public static CompletableFuture<TestResult> testShouldNotSwitchOutTheHolderIfTheEjectPackWasAcquiredAfterAStatDrop(BattleTestHelper helper)
      An Eject Pack held by a Pokémon does not switch the holder out if they receive a stat drop before they are given the Eject Pack.

      In this test, a Machop holding an Eject Pack that knows the move Low Sweep is on a team with a Magikarp that knows Splash. They're facing a Grimmsnarl with the Pickpocket ability that knows the move Sleep Talk along with a Wynaut that also knows Sleep Talk. - Turn 1 The Grimmsnarl uses Sleep Talk The Machop uses Low Sweep. The Grimmsnarl takes damage and its Speed is lowered by one stage. The Grimmsnarl's Pickpocket activates and it steals the Eject Pack. The Grimmsnarl's Eject Pack does not activate. - We verify that the Grimmsnarl's Speed was lowered by one stage. We verify that the Grimmsnarl has a held item. We verify that the Machop does not have a held item. We verify that the Grimmsnarl is on the battlefield. We verify that the Wynaut is not on the battlefield.

    • testShouldWaitUntilAfterAllOtherEndOfTurnEffectsBeforeSwitchingOutHolder

      public static CompletableFuture<TestResult> testShouldWaitUntilAfterAllOtherEndOfTurnEffectsBeforeSwitchingOutHolder(BattleTestHelper helper)
      An Eject Pack that activates due to an end-of-turn effect, won't switch the Pokémon out until all end-of-turn effects have finished.

      In this test, a Glalie with the Moody ability, holding an Eject Pack, and that knows the move Ice Beam is on a team with a Wynaut that knows Sleep Talk. They're facing a 50% Zygarde with the Power Construct ability, holding a Focus Sash, that knows the move Octolock. - Turn 1 The Zygarde uses Octolock. The Glalie uses Ice Beam. Zygarde's Power Construct activates and it changes to Zygarde Complete form. Glalie's Moody activates and lowers one of its stats and raises one of its stats. Glalie's Defense and Special Defense lower from Octolock. Glalie's Eject Pack activates and Glalie switches out. Wynaut switches in. - We verify that the battle log contains the message for Power Construct activating. We verify that the battle log contains the message for Moody activating. We verify that the battle log contains the message for Octolock's stat lowering activating. We verify that the battle log contains the message for Eject Pack activating. We verify that in the battle log the message for Power Construct activates before the message for Eject Pack. We verify that in the battle log the message for Moody activates before the message for Eject Pack. We verify that in the battle log the message for Octolock activates before the message for Eject Pack. We verify that the Zygarde is in its Complete form. We verify that the Glalie is not on the battlefield. We verify that the Wynaut is on the battlefield.

    • testShouldNotActivateIfAnEjectButtonCanActivateFirst

      public static CompletableFuture<TestResult> testShouldNotActivateIfAnEjectButtonCanActivateFirst(BattleTestHelper helper)
      If an Eject Button and an Eject Pack conditions to switch out their holder are triggered at the same time, the Eject Button will activate first.

      Showdown's version of this test is named 'testShouldNotActivateWhenAnotherSwitchingEffectWasTriggeredAsPartOfTheMove' In this test, a Zeraora holding an Eject Pack that knows the move Sleep Talk is on a team with a Mew that is holding an Eject Butotn that also knows Sleep Talk, along with a Wynaut with Sleep Talk. They're facing a Hydreigon that knows the move Breaking Swipe and a Horsea that knows Sleep Talk. - Turn 1 The Zeraora uses Sleep Talk The Mew uses Sleep Talk. The Hydreigon uses Breaking Swipe on Zeraora and Mew. The Zeraora's and the Mew's Attack are lowered by one stage. The Mew's Eject Button activates and Mew switches out. The Wynaut switches in. The Horsea uses Sleep Talk. - We verify that the Zeraora still has a held item. We verify that the Zeraora is on the battlefield. We verify that the Mew is not on the battlefield. We verify that the Zeraora's Attack was lowered by one stage. We verify that the Wynaut is on the battlefield.

    • testShouldOnlyTriggerTheFastestEjectPackWhenMultipleEjectPacksCouldActivate

      public static CompletableFuture<TestResult> testShouldOnlyTriggerTheFastestEjectPackWhenMultipleEjectPacksCouldActivate(BattleTestHelper helper)
      If multiple Eject Packs would activate in a turn, only the fastest Pokémon will switch out.

      In this test, a Morelull holding an Eject Pack that knows the move Sleep Talk is on a team with a Mew that is also holding an Eject Pack and that also knows Sleep Talk, along with a Wynaut that also knows Sleep Talk. They're facing a Hydreigon that knows the move Leer along with a Horsea that knows Sleep Talk. - Turn 1 The Mew uses Sleep Talk. The Hydreigon uses Leer. The Mew and the Morelull's Eject Pack can both activate, but Mew is faster so only its Eject Pack activates and only Mew switches out. Wynaut switches in. The Horsea uses Sleep Talk. The Morelull uses Sleep Talk. - We verify that the Morelull is on the battlefield. We verify that the Mew is not on the battlefield. We verify that the Wynaut is on the battlefield. We verify that the Morelull has its Defense lowered by one stage.

    • testShouldNotTriggerUntilAllEntranceAbilitiesHaveFinishedDuringSimultaneousSwitches

      public static CompletableFuture<TestResult> testShouldNotTriggerUntilAllEntranceAbilitiesHaveFinishedDuringSimultaneousSwitches(BattleTestHelper helper)
      If multiple Pokémon have abilities that activate upon entering the battlefield, an Eject Pact that would activate will only switch out the holder after all of those abilities have finished.

      In this test, a Morelull with the Drought ability, holding an Eject Pack, and that knows the move Sleep Talk is on a team with a Mew that is level 1, has the Electric Surge ability, and also knows Sleep Talk along with a Wynaut that also knows Sleep Talk. They're facing a Hydreigon with the Intimidate ability that knows the move Leer along with a Horsea that also knows Sleep Talk. - Turn 1 The Hydreigon's Intimidate activates. The Morelull's Drought activates. The Mew's Electric Surge activates. The Morelull's Eject Pack activates and it is switched out. The Wynaut switches in. The Mew uses Sleep Talk. The Hydreigon uses Sleep Talk. The Horsea uses Sleep Talk. - We verify that the Weather is Sunny. We verify that the Terrain is Electric Terrain. We verify that the Morelull is not on the battlefield. We verify that the Wynaut is on the battlefield. We verify that the Mew's Attack was lowered by one stage. We verify that the Wynaut's Attack was not lowered by one stage.

    • testShouldSwitchOutHolderIfTheySwitchInToStickyWeb

      public static CompletableFuture<TestResult> testShouldSwitchOutHolderIfTheySwitchInToStickyWeb(BattleTestHelper helper)
      An Eject Pack held by a Pokémon switches the holder out if the holder lands on a Sticky Web.

      In this test, a Magikarp that knows the move Splash is on a team with a Mew that is holding an Eject Pack and that knows Sleep Talk. The Magikarp starts off facing a Spinarak that knows the moves Sticky Web and Agility. - Turn 1 The Magikarp uses Splash. The Spinarak uses Sticky Web. Turn 2 The Magikarp is switched out for Mew. The Mew's Speed is lowered one stage by the Sticky Web. Mew's Eject Pack activates and it switches out. The Magikarp switches back in. The Spinarak uses Poison jab. - We verify that the Mew does not have a held item (Eject Pack was consumed). We verify that the Magikarp is on the battlefield. We verify that the Mew is not on the battlefield. We verify that the Magikarp did have its Speed lowered by 1. We verify that the Magikarp is not at full health.

    • testShouldActivateAfterWhiteHerb

      public static CompletableFuture<TestResult> testShouldActivateAfterWhiteHerb(BattleTestHelper helper)
      If a White Herb and an Eject Pack can activate due to the same thing, the White Herb will activate first, regardless of the Speed of the Pokémon holding the items.

      In this Double Battle test, a Volcarona that is holding an Eject Pack and that knows the move Amnesia is on a team with a Blissey that is holding a White Herb and that knows Sleep Talk along with a Metapod that knows the move Harden. They're facing an Incineroar with the Intimidate ability that knows the move Bulk Up, and a Magikarp that knows the move Splash. - Turn 1 All Pokemon are sent into the battle. Incineroar's Intimidate activates. Volcarona and Blissey have their Attack lowered by one stage. Blissey's White Herb activates first and returns its stats to normal. Volcarona's Eject Pack activates second and switches it out. Metapod switches in. Magikarp uses Splash. Incineroar uses Bulk Up. Blissey uses Sleep Talk. Metapod does nothing. - We verify that the Mew does not have a held item (Eject Pack was consumed). We verify that the Magikarp is on the battlefield. We verify that the Mew is not on the battlefield. We verify that the Magikarp did have its Speed lowered by 1. We verify that the Magikarp is not at full health.

    • testShouldNotActivateIfTheHolderUsesADamagingSwitchMove

      public static CompletableFuture<TestResult> testShouldNotActivateIfTheHolderUsesADamagingSwitchMove(BattleTestHelper helper)
      If a Pokémon holding an Eject Pack switches out via a switch move such as U-turn, Flip Turn, or Volt Switch, their Eject Pack will not activate and not be consumed.

      In this Double Battle test, a Goodra that has its hidden ability Gooey and that knows the move Curse is on a team with a Jirachi that is holding an Eject Pack and that knows the move U-turn. along with a Volcarona that knows the move Sleep Talk. They're facing a Tornadus that knows the move Agility and a Golisopod that knows the move Defense Curl. - Turn 1 Tornadus uses Agility. Jirachi uses U-turn onto Goodra. Goodra's Gooey ability activates and lowers Jirachi's Speed by one stage. Jirachi switches out via U-turn. Volcarona switches in. Goodra uses Curse. Golisopod uses Defense Curl. Volcarona does nothing. - We verify that the Jirachi has a held item. We verify that the Jirachi is not on the battlefield. We verify that the Volcarona is on the battlefield.

    • testShouldNotActivateForTheOriginalHolderOnTheSameTurnItIsPassedToAnAllyViaSymbiosis

      public static CompletableFuture<TestResult> testShouldNotActivateForTheOriginalHolderOnTheSameTurnItIsPassedToAnAllyViaSymbiosis(BattleTestHelper helper)
      If a Pokémon holding an Eject Pack has the Symbiosis ability, and their Eject Pack and Symbiosis have their conditions triggered at the same time, the Symbiosis will activate and pass the Eject Pack to an ally and the Eject Pack will not activate.

      In this Double Battle test, a Tapu-Lele that has the Psychic Surge ability and that knows the move Nature's Madness is on a team with a Dusclops that is holding a Sitrus Berry and that knows the move Snore as well as an Oranguru that has Symbiosis ability, is holding an Eject Pack, and knows Sleep Talk. along with a Volcarona that knows the move Sleep Talk. They're facing a Tornadus that knows the move Tailwind and a Raboot that knows the move Sucker Punch. - Turn 1 Tornadus uses Tailwind. Raboot uses Sucker Punch on Tornadus, but it fails. Tapu-Lele uses Nature's Madness on Dusclops. Dusclops uses Snore on Raboot, but it fails. Turn 2 Tapu-Lele switches out and Oranguru switches in. Raboot uses Sucker Punch on Dusclops, but Dusclops is protected by the Psychic Terrain. Tornadus uses Icy Wind, hitting both Oranguru and Dusclops. Oranguru and Dusclops both have their Speed lowered by one stage. Dusclops's HP has dropped below 50% so it consume its Sitrus Berry and heals some HP. Then, Oranguru's Symbiosis activates, and the Eject Pack is passed to Dusclops. Neither Oranguru nor Dusclops switches out. Dusclops uses Snore, but it fails. - After turn 1... We verify that the Dusclops is not at full HP. We verify that the Dusclops does not have less than 50% of its HP remaining. After turn 2... We verify that the Oranguru is on the battlefield. We verify that the Dusclops is on the battlefield. We verify that the Oranguru had its Speed lowered by one stage. We verify that the Dusclops had its Speed lowered by one stage. We verify that the Dusclops has a held item. We verify that the Dusclops' held item is not a berry that restores HP. We verify that the Dusclops' held item is an Eject Pack. We verify that the Oranguru does not have a held item.

    • testShouldOnlyAllowOnePokemonToSwitchOutPerMoveEvenWithMultipleParticipants

      public static CompletableFuture<TestResult> testShouldOnlyAllowOnePokemonToSwitchOutPerMoveEvenWithMultipleParticipants(BattleTestHelper helper)
      Only one Pokémon may switch out per move, even if every Pokémon on the field is owned by a different player.

      Player 1 owns Morelull. Player 2 owns Mew and Wynaut. Player 3 own Hydreigon. Player 4 own Horsea. In this test, a Morelull holding an Eject Pack that knows the move Sleep Talk is on a team with a Mew that is also holding an Eject Pack and that also knows Sleep Talk, along with a Wynaut that also knows Sleep Talk. They're facing a Hydreigon that knows the move Leer along with a Horsea that knows Sleep Talk. - Turn 1 The Mew uses Sleep Talk. The Hydreigon uses Leer. The Mew and the Morelull's Eject Pack can both activate, but Mew is faster so only its Eject Pack activates and only Mew switches out. Wynaut switches in. The Horsea uses Sleep Talk. The Morelull uses Sleep Talk. - We verify that the Morelull is on the battlefield. We verify that the Mew is not on the battlefield. We verify that the Wynaut is on the battlefield. We verify that the Morelull has its Defense lowered by one stage.

    • testShouldSwitchOutTheHolderIfAStatWasLoweredAfterTheEjectPackWasReceived

      public static CompletableFuture<TestResult> testShouldSwitchOutTheHolderIfAStatWasLoweredAfterTheEjectPackWasReceived(BattleTestHelper helper)
      An Eject Pack will switch out the holder, even on the turn they receive it, so long as one of their stats was lowered after they received the Eject Pack.

      In this test, a Mime Jr. that knows the move Trick is on a team with a Mew that knows Splash. The Mime Jr. starts off facing a Machop that is holding an Eject Pack and that knows the move Leer. - Turn 1 The Mime Jr. uses Trick. The Machop's Eject Pack is transferred to the Mime Jr. The Machop uses Leer. The Eject Pack activates and switches Mime Jr. out and Mew is switched in. - We verify that the Machop does not have a held item. We verify that the Mime Jr. does not have a held item. We verify that the Mime Jr. is not on the battlefield. We verify that the Mew is on the battlefield. We verify that the Mew did not have its Defense lowered by 1.