Class EncoreTests

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

public class EncoreTests extends Object
  • Constructor Details

    • EncoreTests

      public EncoreTests()
  • Method Details

    • testCausesTargetToRepeatMoves

      public static CompletableFuture<TestResult> testCausesTargetToRepeatMoves(BattleTestHelper helper)
      Encore should cause the target Pokemon (slowbro) to repeat the move that it used the turn prior. Turn 1: Whimsicott uses Sleep Talk Slowbro uses Iron Defense Turn 2: Whimsicott uses Encore on Slowbro causing it to use Iron Defense again Slowbro attempts to use Tackle but it is forced to use Iron Defense Then we check that whimsicott has lost no health, as tackle failed We also check that slowbro has the encore status We check that the encore status has 2 turns remaining We check that the encore status is forcing slowbro to use iron defense
    • testCausesTargetToMoveWithEncoredAttackAtOriginalPriorityOnce

      public static CompletableFuture<TestResult> testCausesTargetToMoveWithEncoredAttackAtOriginalPriorityOnce(BattleTestHelper helper)
      Encore should cause the target Pokemon (Terrakion) to repeat the move it used in the last turn (Headlong Rush). However, because it selected Quick Attack, it gets the priority of Quick Attack but uses Headlong Rush instead. Normally Regieleki would manage to place the Substitute before Terrakion attacks due to its higher speed and priority moves, causing it to survive. However, due to Encore forcing Terrakion to use Headlong Rush at Quick Attack's priority, Regieleki's Substitute is placed too late, resulting in Regieleki fainting. Turn 1: Regieleki uses Sleep Talk Pichu uses Sleep Talk Whimsicott uses Sleep Talk Terrakion uses Headlong Rush on Pichu Turn 2: Regieleki uses Substitute Pichu is fainted Whimsicott uses Encore on Terrakion causing it to use Headlong Rush again Terrakion uses Quick Attack on Regieleki but is forced to use Headlong Rush instead Then we check that Regieleki has fainted due to the boosted Headlong Rush hitting before Substitute could be placed.
    • testCausesTargetToMoveWithEncoredAttackAtOriginalPriorityOnceAndGetsBlockedWhenAppropriate

      public static CompletableFuture<TestResult> testCausesTargetToMoveWithEncoredAttackAtOriginalPriorityOnceAndGetsBlockedWhenAppropriate(BattleTestHelper helper)
      Encore should cause the target Pokemon (Terrakion) to repeat the move it used in the last turn (Headlong Rush). However, because it selected Quick Attack, it gets the priority of Quick Attack but uses Headlong Rush instead. Because Regieleki used Psychic Terrain, it blocks the move Headling Rush due to it having the priority of Quick Attack. This means Regieleki survives that turn. Then in the next turn, Terrakion uses Headlong Rush again due to Encore, but this time it hits Regieleki normally as the priority boost is no longer applied/set and Regieleki faints. Turn 1: Regieleki uses Psychic Terrain Pichu uses Sleep Talk Whimsicott uses Sleep Talk Terrakion uses Headlong Rush on Pichu Turn 2: Regieleki uses Psychic Terrain Pichu is fainted Whimsicott uses Encore on Terrakion causing it to use Headlong Rush again Terrakion uses Quick Attack on Regieleki but is forced to use Headlong Rush instead - this move is blocked by Psychic Terrain Then we check that Regieleki has not fained as Psychic Terrain blocked the priority move. Turn 3: Regieleki uses Psychic Terrain Pichu is fainted Whimsicott uses Sleep Talk Terrakion is forced to use Headlong Rush again due to Encore - this time it hits normally and Regieleki faints. Then we check that Regieleki has fainted due to the normal Headlong Rush hitting it.
    • testDoesNotAffectFocusPunchWhenUserDecisionRemainsTheSame

      public static CompletableFuture<TestResult> testDoesNotAffectFocusPunchWhenUserDecisionRemainsTheSame(BattleTestHelper helper)
      This test checks that if a Pokemon is encored into using Focus Punch it will still fail to execute Focus Punch when they are attacked whilst it is charging. Turn 1: Smeargle A uses Focus Punch on Smeargle B (successful) Abra uses Knock Off on Smeargle B (causing it to lose the lagging tail) Smeargle B uses Splash Zigzagoon uses Extreme Speed on Abra Here we check that Smeargle B took damage from Focus Punch Turn 2: Smeargle A uses Focus Punch and is forced into using it by Encore from Smeargle B Abra uses Teleport Smeargle B uses Encore on Smeargle A causing it to use Focus Punch Zigzagoon uses Extreme Speed on Smeargle A causing Focus Punch to fail Here we check that Smeargle B did not take damage from Focus Punch as it was interrupted
    • testDoesFocusPunchAlwaysSucceedIfDecisionChanged

      public static CompletableFuture<TestResult> testDoesFocusPunchAlwaysSucceedIfDecisionChanged(BattleTestHelper helper)
      This test checks that if a Pokemon is encored into using Focus Punch but has selected a different move that the Focus Punch will always succeed regardless of it being attacked at any point prior to the encore. Turn 1: Smeargle A uses Focus Punch on Smeargle B (successful) Abra uses Knock Off on Smeargle B (causing it to lose the lagging tail) Smeargle B uses Splash Zigzagoon uses Extreme Speed on Abra Here we check that Smeargle B took damage from Focus Punch Turn 2: Smeargle A selects Splash Abra uses Teleport Smeargle B uses Encore on Smeargle A causing it to use Focus Punch (which should succeed) Zigzagoon uses Extreme Speed on Smeargle A Here we check that Smeargle B took damage from Focus Punch as it should not be interrupted Turn 3: Smeargle A uses Focus Punch on Smeargle B (successful) Abra uses Teleport Smeargle B uses Splash Zigzagoon uses Extreme Speed on Smeargle A Here we check that Smeargle B took damage from Focus Punch as normal Focus Punch behaviour applies
    • testDoesNotAffectShellTrapIfTheUsersDecisionIsUnchanged

      public static CompletableFuture<TestResult> testDoesNotAffectShellTrapIfTheUsersDecisionIsUnchanged(BattleTestHelper helper)
      This test checks that if a Pokemon is encored into using Shell Trap and has selected Shell Trap as the move then it will only trigger the damage effect of Shell Trap if it is hit. Turn 1: Smeargle A uses Shell Trap on Smeargle B (successful) Abra uses Knock Off on Smeargle B (causing it to lose the lagging tail) Smeargle B uses Splash Zigzagoon uses Quick Attack on Smeargle A (causing Shell Trap to trigger) Here we check that Smeargle B took damage from Shell Trap Turn 2: Smeargle A selects Shell Trap Abra uses Teleport Smeargle B uses Encore on Smeargle A causing it to use Shell Trap Zigzagoon uses Quick Attack on Smeargle A (causing Shell Trap to trigger) Here we check that Smeargle B took damage from Shell Trap as it was hit Turn 3: Smeargle A uses Shell Trap on Smeargle B (successful) Abra uses Teleport Smeargle B uses Splash Zigzagoon uses Quick Attack on Smeargle A (causing Shell Trap to trigger) Here we check that Smeargle B took damage from Shell Trap as normal Shell Trap behaviour applies
    • testCausesShellTrapToAlwaysFailWhenUsersDecisionIsDifferent

      public static CompletableFuture<TestResult> testCausesShellTrapToAlwaysFailWhenUsersDecisionIsDifferent(BattleTestHelper helper)
      This test checks that if a Pokemon is encored into using Shell Trap and has not selected Shell Trap as the move then it will never trigger the damage effect of Shell Trap even if it is hit. Turn 1: Smeargle A uses Shell Trap on Smeargle B (successful) Abra uses Knock Off on Smeargle B (causing it to lose the lagging tail) Smeargle B uses Splash Zigzagoon uses Quick Attack on Smeargle A (causing Shell Trap to trigger) Here we check that Smeargle B took damage from Shell Trap Turn 2: Smeargle A selects Splash Abra uses Teleport Smeargle B uses Encore on Smeargle A causing it to use Shell Trap Zigzagoon uses Quick Attack on Smeargle A Here we check that Smeargle B did n ot take damage from Shell Trap as it was Encored into it but selected a different move Turn 3: Smeargle A uses Shell Trap on Smeargle B (successful) Abra uses Teleport Smeargle B uses Splash Zigzagoon uses Quick Attack on Smeargle A (causing Shell Trap to trigger) Here we check that Smeargle B took damage from Shell Trap as normal Shell Trap behaviour applies
    • testEncoreSucceedsOnUserSwitchIfUserMovesFirst

      public static CompletableFuture<TestResult> testEncoreSucceedsOnUserSwitchIfUserMovesFirst(BattleTestHelper helper)
      This test confirms that Encore works correctly when the target has just switched in but manages to move first.
      Parameters:
      helper -
      Returns: