Class BlunderPolicyTests

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

public class BlunderPolicyTests extends Object
Tests for the Blunder Policy
  • Constructor Details

    • BlunderPolicyTests

      public BlunderPolicyTests()
  • Method Details

    • testBlunderPolicyIncreasesSpeedWhenAttacksMiss

      public static CompletableFuture<TestResult> testBlunderPolicyIncreasesSpeedWhenAttacksMiss(BattleTestHelper helper)
      If one of the holder's moves misses one of its targets because of an accuracy or evasion check, the Blunder Policy is consumed and the holder's Speed is increased by two stages.

      In this test, a Lampent that holds a Blunder Policy and knows the move Inferno (50% accuracy) faces a Kabutops that knows the move Splash.

           Turn 1
           The Lampent uses Inferno on the Kabutops. The Inferno is forced to miss by the battle controller.
           The Kabutops uses Splash.
           -
           We verify that the Lampent no longer has a held item.
           We verify the Lampent had its Speed raised by two stages.
       
    • testBlunderPolicyDoesNotActivateForOneHitKnockoutMoves

      public static CompletableFuture<TestResult> testBlunderPolicyDoesNotActivateForOneHitKnockoutMoves(BattleTestHelper helper)
      Blunder Policy does not activate if a one-hit knockout move misses.

      In this test, a level 42 Cubchoo that holds a Blunder Policy and knows the move Sheer Cold faces a level 43 Eelektrik that knows the move Splash.

           Turn 1
           The Eelektrik uses Splash.
           The Cubchoo uses Sheer Cold. The Sheer Cold fails/misses.
           -
           We verify that the Eelektrik still has all of its HP after the Cubchoo's attack.
           We verify that the Cubchoo no longer has a held item.
           We verify the Cubchoo had its Speed raised by two stages.
       
    • testBlunderPolicyDoesNotActivateForPopulationBombEndsEarly

      public static CompletableFuture<TestResult> testBlunderPolicyDoesNotActivateForPopulationBombEndsEarly(BattleTestHelper helper)
      Blunder Policy does not activate if Triple Axel, Triple Kick, or Population Bomb end early by failing one of their subsequent accuracy checks.

      In this test, a Maushold that holds a Blunder Policy and knows the move Population Bomb faces a Eelektrik that knows the move Splash.

           Turn 1
           The Eelektrik uses Splash.
           The Maushold uses Population Bomb.
           -
           We verify that the Maushold no longer has a held item.
           We verify the Maushold had its Speed raised by two stages.
       
    • testBlunderPolicyDoesNotActivateIfTargetIsSemiInvulnerable

      public static CompletableFuture<TestResult> testBlunderPolicyDoesNotActivateIfTargetIsSemiInvulnerable(BattleTestHelper helper)
      Blunder Policy does not activate if a move misses due to a target being in the semi-invulnerable turn of a move.

      In this test, a Lampent that holds a Blunder Policy and knows the move Ember faces a Maushold that knows the move Dig.

           Turn 1
           The Maushold uses Dig. The Maushold becomes semi-invulnerable.
           The Lampent uses Ember.
           -
           We verify that the Maushold still has all of its HP after the Lampent's attack.
           We verify that the Lampent still has a held item.
           We verify the Lampent did not have its Speed raised by two stages.
       
    • testBlunderPolicyDoesNotActivateDueToTypeImmunity

      public static CompletableFuture<TestResult> testBlunderPolicyDoesNotActivateDueToTypeImmunity(BattleTestHelper helper)
      Blunder Policy does not activate if a move does not affect its target.

      In this test, a Maushold that holds a Blunder Policy and knows the move Pound faces a Lampent that knows the move Ember.

           Turn 1
           The Maushold uses Pound. It does not affect the Lampent.
           The Lampent uses Ember.
           -
           We verify that the Lampent still has all of its HP after the Maushold's attack.
           We verify that the Maushold still has a held item.
           We verify the Maushold did not have its Speed raised by two stages.
       
    • testBlunderPolicyDoesNotActivateDueToProtectionMoves

      public static CompletableFuture<TestResult> testBlunderPolicyDoesNotActivateDueToProtectionMoves(BattleTestHelper helper)
      Blunder Policy does not activate if the target is protected by a protection move.

      In this test, a Lampent that holds a Blunder Policy and knows the move Ember faces a Maushold that knows the move Protect.

           Turn 1
           The Maushold uses Protect.
           The Lampent uses Ember.
           -
           We verify that the Maushold still has all of its HP after the Lampent's attack.
           We verify that the Lampent still has a held item.
           We verify the Lampent did not have its Speed raised by two stages.
       
    • testBlunderPolicyActivatesIfDragonDartsMissesInitialTarget

      public static CompletableFuture<TestResult> testBlunderPolicyActivatesIfDragonDartsMissesInitialTarget(BattleTestHelper helper)
      If Dragon Darts would have missed one of its targets in a Double Battle for accuracy or evasion reasons, but the other target is successfully hit with the move, that target will be hit twice, and the Blunder Policy will still activate even though no message about missing a target ever appears.

      In this test, a Dragapult that holds a Blunder Policy and knows the move Dragon Darts faces an Eelektrik that knows the move Splash and a Steenee that knows the move Sleep Talk.

           Turn 1
           The Dragapult uses Dragon Darts on Steenee. We force the Dragon Darts to miss the Steenee.
           The Steenee uses Sleep Talk.
           The Eelektrik uses Splash.
           -
           We verify that the Eelektrik was damaged by the Dragon Darts.
           We verify that the Steenee was not damaged by the Dragon Darts.
           We verify that the battlelog does not have a message that contains the string "avoided the attack".
           We verify that the Dragapult does not have a held item.
           We verify the Dragapult has its Speed raised by two stages.
       
    • testBlunderPolicyActivatesIfDragonDartsMissesSecondaryTarget

      public static CompletableFuture<TestResult> testBlunderPolicyActivatesIfDragonDartsMissesSecondaryTarget(BattleTestHelper helper)
      If Dragon Darts would have missed one of its targets in a Double Battle for accuracy or evasion reasons, but the other target is successfully hit with the move, that target will be hit twice, and the Blunder Policy will still activate even though no message about missing a target ever appears.

      In this test, a Dragapult that holds a Blunder Policy and knows the move Dragon Darts faces an Eelektrik that knows the move Splash and a Steenee that knows the move Sleep Talk.

           Turn 1
           The Dragapult uses Dragon Darts on Eelektrik. We force the Dragon Darts to miss the Steenee.
           The Steenee uses Sleep Talk.
           The Eelektrik uses Splash.
           -
           We verify that the Eelektrik was damaged by the Dragon Darts.
           We verify that the Steenee was not damaged by the Dragon Darts.
           We verify that the battlelog does not have a message that contains the string "avoided the attack".
           We verify that the Dragapult does not have a held item.
           We verify the Dragapult has its Speed raised by two stages.