Class EndeavorTests

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

public class EndeavorTests extends Object
Tests for Endeavor
  • Constructor Details

    • EndeavorTests

      public EndeavorTests()
  • Method Details

    • testEndeavor

      public static CompletableFuture<TestResult> testEndeavor(BattleTestHelper helper)
      Endeavor causes the target's HP to equal the user's current HP. It will deduct the difference from the target's HP.

      In this test, a Taillow at 10% HP that knows Endeavor faces a Swellow that knows Sleep Talk.

           Turn 1
           The Swellow uses Sleep Talk.
           The Taillow uses Endeavor.
           -
           After Turn 1
           We verify that the Swellow's HP is equal to the Taillow's HP.
           We verify that the Taillow's Endeavor had a priority of 0.
           We verify that the Taillow's Endeavor total damage is equal to the Swellow's missing HP.
           We verify that the Taillow's Endeavor total potential damage is equal to the Swellow's missing HP.
           We verify that the Taillow's Endeavor had a power of 0.
           We verify that the Taillow's Endeavor was recorded as a successful attack result.
       
    • testEndeavorAtHigherHP

      public static CompletableFuture<TestResult> testEndeavorAtHigherHP(BattleTestHelper helper)
      Endeavor does nothing if the user's HP is greater than or equal to the target's.

      In this test, a Taillow that knows Endeavor faces a Swellow at 50% HP that knows Sleep Talk.

           Turn 1
           The Swellow uses Sleep Talk.
           The Taillow uses Endeavor.
           -
           After Turn 1
           We verify that the Swellow's HP hasn't changed.
           We verify that the Taillow's Endeavor had a priority of 0.
           We verify that the Taillow's Endeavor total damage is equal to 0.
           We verify that the Taillow's Endeavor total potential damage is equal to 0.
           We verify that the Taillow's Endeavor had a power of 0.
           We verify that the Taillow's Endeavor was recorded as a failed attack result.
       
    • testEndeavorAgainstGhostType

      public static CompletableFuture<TestResult> testEndeavorAgainstGhostType(BattleTestHelper helper)
      Endeavor does not ignore type immunity and thus cannot affect Ghost-types.

      In this test, a Taillow at 50% HP that knows Endeavor faces a Marshadow that knows Sleep Talk. The Taillow is given the Guts ability so that it never randomly receives the Scrappy ability.

           Turn 1
           The Marshadow uses Sleep Talk.
           The Taillow uses Endeavor.
           -
           After Turn 1
           We verify that the Marshadow's HP hasn't changed.
           We verify that the Taillow's Endeavor had a priority of 0.
           We verify that the Taillow's Endeavor total damage is equal to 0.
           We verify that the Taillow's Endeavor total potential damage is equal to 0.
           We verify that the Taillow's Endeavor had a power of 0.
           We verify that the Taillow's Endeavor was recorded as an immune attack result.
       
    • testEndeavorAndEatingBerry

      public static CompletableFuture<TestResult> testEndeavorAndEatingBerry(BattleTestHelper helper)
      The target of an Endeavor attack should be able to eat a berry after taking damage.

      In this test, a Taillow at 10% HP that knows Endeavor faces a Swellow with a Sitrus Berry that knows Sleep Talk.

           Turn 1
           The Swellow uses Sleep Talk.
           The Taillow uses Endeavor.
           -
           After Turn 1
           We verify that the Swellow's HP is not equal to the Taillow's HP.
           We verify that the Swellow does not have a held item.
           We verify that the Taillow's Endeavor was recorded as a successful attack result.