Class BrightPowderTests

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

public class BrightPowderTests extends Object
Tests for the Bright Powder
  • Constructor Details

    • BrightPowderTests

      public BrightPowderTests()
  • Method Details

    • testBrightPowderReducesAccuracyOfMovesTargetingHolderByTenPercent

      public static CompletableFuture<TestResult> testBrightPowderReducesAccuracyOfMovesTargetingHolderByTenPercent(BattleTestHelper helper)
      Bright Powder reduces the accuracy of moves targeting the holder by 10%.

      In this test, a Weepinbell that knows the move Cut faces a Miltank that holds a Bright Powder and knows Sleep Talk.

           Turn 1
           The Miltank uses Sleep Talk, which fails.
           The Weepinbell uses Cut.
           Turn 2
           The Miltank uses Sleep Talk, which fails.
           The Weepinbell uses Cut.
           -
           We verify that the Weepinbell's Cut original accuracy is 95.
           After each turn,
           We verify that the Weepinbell's Cut's accuracy after the Miltank's Bright Powder is 85 = (95 - (95 * 0.1)).
       
    • testBrightPowderDoesNotAffectOneHitKnockOutMoves

      public static CompletableFuture<TestResult> testBrightPowderDoesNotAffectOneHitKnockOutMoves(BattleTestHelper helper)
      Bright Powder reduces the accuracy of moves targeting the holder by 10%. The accuracy reduction does not apply to one-hit knockout moves.

      In this test, a Gliscor that knows the move Guillotine faces a Miltank that holds a Bright Powder and knows Sleep Talk.

           Turn 1
           The Miltank uses Sleep Talk, which fails.
           The Gliscor uses Guillotine.
           The Guillotine is forced to miss so the battle doesn't end early.
           Turn 2
           The Miltank uses Sleep Talk, which fails.
           The Gliscor uses Guillotine.
           The Guillotine is forced to miss so errors aren't produced from the battle ending early.
           -
           We verify that the Gliscor's Guillotine original accuracy is 30.
           After each turn,
           We verify that the Gliscor's Guillotine's accuracy after the Miltank's Bright Powder is still 30.