Class BerryStatIncreaseItemTests

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

public class BerryStatIncreaseItemTests extends Object
  • Constructor Details

    • BerryStatIncreaseItemTests

      public BerryStatIncreaseItemTests()
  • Method Details

    • testApicotIncreasesSpecialDefenseByOneStage

      public static CompletableFuture<TestResult> testApicotIncreasesSpecialDefenseByOneStage(BattleTestHelper helper)
      An Apicot Berry that is consumed by a Pokémon should increase the stage of that Pokémon's Special Defense by 1.

      In this test, an Aggron that knows Sleep Talk, with the ability Sturdy, and holding an Apicot Berry faces off against a Lucario that knows Aura Sphere, with the Adaptability ability. - The Aggron attacks but never damages the Lucario with its Sleep Talk attack. The Lucario attacks the Aggron with Aura Sphere. - We verify that the Aggron's HP is at or below 25%, because an Apicot Berry by default activates at 1/4 health or below. We verify that the Aggron no longer has a held item, because the Apicot Berry should be consumed upon activating. We verify that the stage of the Aggron's Special Defense was raised to 1 from 0, as that is what an Apicot Berry does.

    • testGanlonIncreasesDefenseByOneStage

      public static CompletableFuture<TestResult> testGanlonIncreasesDefenseByOneStage(BattleTestHelper helper)
      A Ganlon Berry that is consumed by a Pokémon should increase the stage of that Pokémon's Defense by 1.

      In this test, an Aggron that knows Sleep Talk, with the ability Sturdy, and holding a Ganlon Berry faces off against a Lucario that knows Aura Sphere, with the Adaptability ability. - The Aggron attacks but never damages the Lucario with its Sleep Talk attack. The Lucario attacks the Aggron with Aura Sphere. - We verify that the Aggron's HP is at or below 25%, because a Ganlon Berry by default activates at 1/4 health or below. We verify that the Aggron no longer has a held item, because the Ganlon Berry should be consumed upon activating. We verify that the stage of the Aggron's Defense was raised to 1 from 0, as that is what a Ganlon Berry does.

    • testLansatIncreasesStageOfCriticalHitRatioByTwoWhenConsumed

      public static CompletableFuture<TestResult> testLansatIncreasesStageOfCriticalHitRatioByTwoWhenConsumed(BattleTestHelper helper)
      A Lansat Berry that is consumed by a Pokémon should increase the stage of that Pokémon's critical-hit ratio by 2.

      In this test, an Aggron that knows Sleep Talk, with the ability Sturdy, and holding a Lansat Berry faces off against a Lucario that knows Aura Sphere, with the Adaptability ability. - The Aggron attacks but never damages the Lucario with its Sleep Talk attack. The Lucario attacks the Aggron with Aura Sphere. - We verify that the Aggron's HP is at or below 25%, because a Lansat Berry by default activates at 1/4 health or below. We verify that the Aggron no longer has a held item, because the Lansat Berry should be consumed upon activating. We verify that the stage of the Aggron's critical-hit ratio was raised to 2 from 0, as that is what a Lansat Berry does.

    • testLansatIsAbleToApplyDuringMultiHitMoves

      public static CompletableFuture<TestResult> testLansatIsAbleToApplyDuringMultiHitMoves(BattleTestHelper helper)
      If a Pokémon that is holding a Lansat Berry, is damaged while using a multi-hit move, such as via a Rocky Helmet or the Iron Barbs ability, the Lansat Berry can activate and be consumed, and increase the critical-hit ratio of subsequent strikes from the multi-hit move.

      In this test, a Muk that knows Acid Armor, with the ability No Guard, and holding a Rocky Helmet faces off against a Makuhita that knows Triple Kick, with the Guts ability, while holding a Lansat Berry. - The two Pokemon attack each other twice over 2 turns. Each time, the Muk attacks with Acid Armor, never damages the Makuhita and just raises its Defense. Each time, the Makuhita attacks the Muk with Triple Kick. The Muk's Rocky Helmet will deal 1/6 of the Makuhita's health each time it strikes the Makuhita. - We verify that the Makuhita's HP is at or below 25%, because a Lansat Berry by default activates at 1/4 health or below and it should be taking damage from Rocky Helmet. We verify that the Makuhita no longer has a held item, because the Lansat Berry should be consumed upon activating. We verify that the stage of the Makuhita's critical-hit ratio was raised to 2 from 0, as that is what a Lansat Berry does. We finally verify that in the battle log the messages 'times!', 'consumed', and 'times!' are in that order, to prove that the Makuhita drops below 25% HP before the Makuhita finishes its second bout of attacks, and thus raising its critical-hit ratio mid-way through its second Triple Kick.

    • testLansatIsNotAffectedByRipen

      public static CompletableFuture<TestResult> testLansatIsNotAffectedByRipen(BattleTestHelper helper)
      The Lansat Berry is not affected by the Ripen ability.

      In this test, a Flapple that knows Endure, with the ability Ripen, and holding a Lansat Berry faces off against a Lapras that knows Ice Beam. Flapple was chosen because it can actually have Ripen as an ability, and has a higher speed than the other Pokemon in its evolutionary line. Lapras was chosen because it has a slower speed than Flapple and learns Ice Beam, which will be 4x super-effective. - The Flapple attacks with Endure, never damaging the Lapras and just guranteeing it survives Ice Beam. The Lapras attacks the Flapple with Ice Beam. The Flapple's Lansat Berry should activate after being hit by Ice Beam and dropping to 25% HP or less. - We verify that the Flapple's HP is at or below 25%, because a Lansat Berry by default activates at 1/4 health or below. We verify that the Flapple no longer has a held item, because the Lansat Berry should be consumed upon activating. We finally verify that the stage of the Flapple's critical-hit ratio was raised to 2 from 0, because while Flapple's Ripen double the effects of many stat raising berries, the Lansat Berry is an exception and should not be affected by Ripen.

    • testLiechiIncreasesAttackByOneStage

      public static CompletableFuture<TestResult> testLiechiIncreasesAttackByOneStage(BattleTestHelper helper)
      A Liechi Berry that is consumed by a Pokémon should increase the stage of that Pokémon's Attack by 1.

      In this test, an Aggron that knows Sleep Talk, with the ability Sturdy, and holding a Liechi Berry faces off against a Lucario that knows Aura Sphere, with the Adaptability ability. - The Aggron attacks but never damages the Lucario with its Sleep Talk attack. The Lucario attacks the Aggron with Aura Sphere. - We verify that the Aggron's HP is at or below 25%, because a Liechi Berry by default activates at 1/4 health or below. We verify that the Aggron no longer has a held item, because the Liechi Berry should be consumed upon activating. We verify that the stage of the Aggron's Attack was raised to 1 from 0, as that is what a Liechi Berry does.

    • testPetayaIncreasesSpecialAttackByOneStage

      public static CompletableFuture<TestResult> testPetayaIncreasesSpecialAttackByOneStage(BattleTestHelper helper)
      A Petaya Berry that is consumed by a Pokémon should increase the stage of that Pokémon's Special Attack by 1.

      In this test, an Aggron that knows Sleep Talk, with the ability Sturdy, and holding a Petaya Berry faces off against a Lucario that knows Aura Sphere, with the Adaptability ability. - The Aggron attacks but never damages the Lucario with its Sleep Talk attack. The Lucario attacks the Aggron with Aura Sphere. - We verify that the Aggron's HP is at or below 25%, because a Petaya Berry by default activates at 1/4 health or below. We verify that the Aggron no longer has a held item, because the Petaya Berry should be consumed upon activating. We verify that the stage of the Aggron's Special Attack was raised to 1 from 0, as that is what a Petaya Berry does.

    • testSalacIncreasesSpecialAttackByOneStage

      public static CompletableFuture<TestResult> testSalacIncreasesSpecialAttackByOneStage(BattleTestHelper helper)
      A Salac Berry that is consumed by a Pokémon should increase the stage of that Pokémon's Speed by 1.

      In this test, an Aggron that knows Sleep Talk, with the ability Sturdy, and holding a Salac Berry faces off against a Lucario that knows Aura Sphere, with the Adaptability ability. - The Aggron attacks but never damages the Lucario with its Sleep Talk attack. The Lucario attacks the Aggron with Aura Sphere. - We verify that the Aggron's HP is at or below 25%, because a Salac Berry by default activates at 1/4 health or below. We verify that the Aggron no longer has a held item, because the Salac Berry should be consumed upon activating. We verify that the stage of the Aggron's Speed was raised to 1 from 0, as that is what a Salac Berry does.

    • testStarfIncreasesRandomStatByTwoStages

      public static CompletableFuture<TestResult> testStarfIncreasesRandomStatByTwoStages(BattleTestHelper helper)
      A Starf Berry that is consumed by a Pokémon should increase the stage of one stat — either Attack, Defense, Special Attack, Special Defense, or Speed — by two stages.

      In this test, an Aggron that knows Sleep Talk, with the ability Sturdy, and holding a Starf Berry faces off against a Lucario that knows Aura Sphere, with the Adaptability ability. - The Aggron attacks but never damages the Lucario with its Sleep Talk attack. The Lucario attacks the Aggron with Aura Sphere. - We verify that the Aggron's HP is at or below 25%, because a Starf Berry by default activates at 1/4 health or below. We verify that the Aggron no longer has a held item, because the Starf Berry should be consumed upon activating. We verify that the Aggron has at least one stat that is not at the default 0 stages.

    • testDefaultStatBerriesAreAffectedByRipen

      public static CompletableFuture<TestResult> testDefaultStatBerriesAreAffectedByRipen(BattleTestHelper helper)
      The berries that increase stats are affected by the Ripen ability, except the Lansat Berry.

      In this test, a Flapple that knows Endure, with the ability Ripen, and holding an Apicot Berry faces off against a Lapras that knows Ice Beam. Flapple was chosen because it can actually have Ripen as an ability, and has a higher speed than the other Pokemon in its evolutionary line. Lapras was chosen because it has a slower speed than Flapple and learns Ice Beam, which will be 4x super-effective. - The Flapple attacks with Endure, never damaging the Lapras and just guranteeing it survives Ice Beam. The Lapras attacks the Flapple with Ice Beam. The Flapple's Apicot Berry should activate after being hit by Ice Beam and dropping to 25% HP or less. - We verify that the Flapple's HP is at or below 25%, because an Apicot Berry by default activates at 1/4 health or below. We verify that the Flapple no longer has a held item, because the Apicot Berry should be consumed upon activating. We finally verify that the stage of the Flapple's Special Defense was raised to 2 from 0, because Ripen doubles the effects of these berries.

    • testStarfRaisesByFourStagesDueToRipen

      public static CompletableFuture<TestResult> testStarfRaisesByFourStagesDueToRipen(BattleTestHelper helper)
      The Starf berry already raises a random stat by two stages, and the Ripen ability doubles that to four.

      In this test, a Flapple that knows Endure, with the ability Ripen, and holding a Starf Berry faces off against a Lapras that knows Ice Beam. Flapple was chosen because it can actually have Ripen as an ability, and has a higher speed than the other Pokemon in its evolutionary line. Lapras was chosen because it has a slower speed than Flapple and learns Ice Beam, which will be 4x super-effective. - The Flapple attacks with Endure, never damaging the Lapras and just guranteeing it survives Ice Beam. The Lapras attacks the Flapple with Ice Beam. The Flapple's Starf Berry should activate after being hit by Ice Beam and dropping to 25% HP or less. - We verify that the Flapple's HP is at or below 25%, because an Starf Berry by default activates at 1/4 health or below. We verify that the Flapple no longer has a held item, because the Starf Berry should be consumed upon activating. We finally verify that the stage of one of Flapple's stats is raised by four.

    • testGluttonyLowersHealthThresholdToHalfHealth

      public static CompletableFuture<TestResult> testGluttonyLowersHealthThresholdToHalfHealth(BattleTestHelper helper)
      The berries that increase stats are affected by the Gluttony ability, including the Lansat Berry and Starf Berry.

      In this test, a Flapple that knows Sleep Talk, with the ability Gluttony, holding an Apicot Berry, and also some HP EVs (to ensure that the attack leaves Flapple at above 25% HP) faces off against a Lapras that knows Ice Shard. - The Lapras attacks the Flapple with Ice Shard (has +1 priority). The Flapple attacks with Sleep Talk. The Flapple's Apicot Berry should activate after being hit by Ice Shard and dropping to 50% HP or less. - We verify that the Flapple's HP is at or below 50%. We verify that the Flapple's HP is above 25%. We verify that the Flapple no longer has a held item, because the Apicot Berry should be consumed upon activating. We finally verify that the stage of the Flapple's Special Defense was raised to 1, because Gluttony raises the threshold from 1/4 HP or less to 1/2 HP or less.