Class BerryRestoreHPTests

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

public class BerryRestoreHPTests extends Object
  • Constructor Details

    • BerryRestoreHPTests

      public BerryRestoreHPTests()
  • Method Details

    • testOranBerryHealAmount

      public static CompletableFuture<TestResult> testOranBerryHealAmount(BattleTestHelper helper)
      If the holder's HP falls below 50%, it will consume its held Oran Berry and restore 10 HP.

      In this test, an Aggron with the Sturdy ability, that holds a Oran Berry, and knows the move Sleep Talk faces a Lucario that knows the move Aura Sphere.

           Turn 1
           The Lucario uses Aura Sphere. The Aggron survive at 1 HP thanks to Sturdy.
           The Aggron consumes its Oran Berry and restores 10 HP.
           The Aggron uses Sleep Talk.
           -
           We verify that the Aggron does not have a held item.
           We verify that the Aggron has 11 HP.
       
    • testSitrusBerryHealAmount

      public static CompletableFuture<TestResult> testSitrusBerryHealAmount(BattleTestHelper helper)
      When held by a Pokémon, if the holder's HP falls below 50%, it will consume its held Sitrus Berry and restore 25% of its maximum HP.

      In this test, an Aggron with the Sturdy ability that holds a Sitrus Berry and knows the move Sleep Talk faces a Lucario with the Adaptability ability that knows the move Aura Sphere.

           Turn 1
           The Lucario uses Aura Sphere. The Aggron survive at 1 HP thanks to Sturdy.
           The Aggron consumes its Sitrus Berry and restores 25% of its maximum HP.
           The Aggron uses Sleep Talk.
           -
           We verify that the Aggron does not have a held item.
           We verify that the Aggron is at 1HP + 25% of its max HP.
       
    • testSitrusBerryAndRecycle

      public static CompletableFuture<TestResult> testSitrusBerryAndRecycle(BattleTestHelper helper)

      In this test, a Magnemite with the Sturdy ability that holds a Sitrus Berry and knows the move Recycle faces a Garchomp with the Rough Skin ability that knows the move Earthquake.

           Turn 1
           The Garchomp uses Earthquake. The Magnemite survive at 1 HP thanks to Sturdy.
           The Magnemite consumes its Sitrus Berry and restores 25% of its maximum HP.
           The Magnemite uses Recycle.
           Magnemite recovers a Sitrus Berry and immediately consumes it to restore 25% of its maximum HP.
           -
           We verify that the Magnemite does not have a held item.
           We verify that the Magnemite is at 1HP + 50% of its max HP.
       
    • testSitrusBerryAndKnockOff

      public static CompletableFuture<TestResult> testSitrusBerryAndKnockOff(BattleTestHelper helper)
      A Sitrus Berry or Oran Berry should not heal its holder if it gets Knocked Off.

      In this test, an Attack-form Deoxys with the Sturdy ability that holds a Sitrus Berry and knows the move Sleep Talk faces a Krookodile with the Intimidate ability that knows the move Knock Off.

           Turn 1
           The Deoxys uses Sleep Talk.
           The Krookodile uses Knock Off. The Deoxys survive at 1 HP thanks to Sturdy. The Sitrus Berry is knocked off.
           -
           We verify that the Deoxys is at 1HP.
       
    • testSitrusBerryAndConfusion

      public static CompletableFuture<TestResult> testSitrusBerryAndConfusion(BattleTestHelper helper)
      Due to a glitch in Generation V, dropping below half HP by taking self-inflicted damage from confusion will not activate the Sitrus Berry.

      This test has been turned off, because the results of this test no longer apply past Generation V.

      In this test, an Attack-form Deoxys with the Sturdy ability that holds a Sitrus Berry and knows the move Sleep Talk faces a Sableye with the Prankster ability that knows the move Confuse Ray.

           Turn 1
           The Sableye uses Confuse Ray. The Deoxys becomes confused.
           The Deoxys hits itself in its confusion.
           -
           We verify that the Deoxys still has a held item.
           We verify that the Deoxys is not at full health.
       
    • testSitrusBerryAndEndOfTurnEffects

      public static CompletableFuture<TestResult> testSitrusBerryAndEndOfTurnEffects(BattleTestHelper helper)
      Should heal 25% HP immediately after an end-of-turn effects.

      This test was based off of a test that Pokémon Showdown has, but since they have disabled that test, we have disabled our version of the test.

      In this test, a Darmanitan with the Zen Mode ability, 4 HP EVs, a Sitrus Berry, and Sleep Talk faces a Mimikyu that knows the move Curse.

           Turn 1
           The Mimikyu uses Curse. The Darmanitan becomes cursed.
           The Darmanitan uses Sleep Talk.
           The Darmanitan loses 25% of its maximum HP.
           Turn 2
           The Mimikyu uses Curse. The move fails.
           The Darmanitan uses Sleep Talk.
           The Darmanitan loses 25% of its maximum HP.
           The Darmanitan consumes its Sitrus Berry.
           -
           We verify that the Darmanitan is not in its Zen form.
       
    • testEnigmaBerryHealAmount

      public static CompletableFuture<TestResult> testEnigmaBerryHealAmount(BattleTestHelper helper)
      An Enigma Berry restores ¼ of the holder's max HP when the Pokémon is hit by a super effective move.

      In this test, an Aggron with the Sturdy ability, that holds a Enigma Berry, and knows the move Sleep Talk faces a Lucario that knows the move Aura Sphere.

           Turn 1
           The Lucario uses Aura Sphere. The Aggron survive at 1 HP thanks to Sturdy.
           The Aggron consumes its Enigma Berry and restores 25% of its maximum HP.
           The Aggron uses Sleep Talk.
           -
           We verify that the Aggron does not have a held item.
           We verify that the Aggron has 1 HP + 25% of its max HP.
       
    • testEnigmaBerryHealsOnSuperEffectiveMovesNotHealthPercentage

      public static CompletableFuture<TestResult> testEnigmaBerryHealsOnSuperEffectiveMovesNotHealthPercentage(BattleTestHelper helper)
      An Enigma Berry restores ¼ of the holder's max HP when the Pokémon is hit by a super effective move. This can happen even if the holder doesn't fall below 50% HP.

      In this test, an Aggron with the Sturdy ability, that holds a Enigma Berry, and knows the move Sleep Talk faces a Riolu that knows the move Rock Smash.

           Turn 1
           The Riolu uses Rock Smash.
           The Aggron consumes its Enigma Berry and restores 25% of its maximum HP.
           The Aggron uses Sleep Talk.
           -
           We verify that the Aggron does not have a held item.
       
    • testEnigmaBerryDoesNotHealOnNonSuperEffectiveMoves

      public static CompletableFuture<TestResult> testEnigmaBerryDoesNotHealOnNonSuperEffectiveMoves(BattleTestHelper helper)
      An Enigma Berry restores ¼ of the holder's max HP when the Pokémon is hit by a super effective move.

      In this test, an Aggron with the Sturdy ability, that holds a Enigma Berry, and knows the move Sleep Talk faces a Lucario that knows the move Flash Cannon.

           Turn 1
           The Lucario uses Flash Cannon.
           The Aggron does not consume its Enigma Berry.
           The Aggron uses Sleep Talk.
           -
           We verify that the Aggron has less than 50% of its maximum HP.
           We verify that the Aggron has a held item.
       
    • testBerryJuiceHealAmount

      public static CompletableFuture<TestResult> testBerryJuiceHealAmount(BattleTestHelper helper)
      If the holder's HP falls below 50%, it will consume its held Berry Juice and restore 20 HP.

      In this test, an Aggron with the Sturdy ability, that holds a Berry Juice, and knows the move Sleep Talk faces a Lucario that knows the move Aura Sphere.

           Turn 1
           The Lucario uses Aura Sphere. The Aggron survive at 1 HP thanks to Sturdy.
           The Aggron consumes its Berry Juice and restores 20 HP.
           The Aggron uses Sleep Talk.
           -
           We verify that the Aggron does not have a held item.
           We verify that the Aggron has 21 HP.