java.lang.Object
com.pixelmonmod.pixelmon.api.test.impl.ability.HarvestTests

public class HarvestTests extends Object
Tests for Harvest
  • Constructor Details

    • HarvestTests

      public HarvestTests()
  • Method Details

    • testHarvestRecoversBerries

      public static CompletableFuture<TestResult> testHarvestRecoversBerries(BattleTestHelper helper)
      If the Pokémon with the Harvest ability has used a Berry, it is possible for Harvest to restore the berry at the end of each turn.

      In this test, a Phantump that knows the move Confuse Ray faces a Smoliv with the Harvest ability that knows Sleep Talk and holds a Lum Berry. All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Phantump uses Confuse Ray on the Smoliv.
           The Smoliv becomes confused. The Smoliv's Lum Berry cures it of its confusion.
           The Smoliv uses Sleep Talk.
           -
           At the end of the first turn:
           We verify that the Smoliv is not confused.
           We verify that the Smoliv is holding a Lum Berry.
           We verify that the Smoliv's consumed item is No Item.
       
    • testHarvestRecoversBerriesEvenAfterSwitchingOutAndIn

      public static CompletableFuture<TestResult> testHarvestRecoversBerriesEvenAfterSwitchingOutAndIn(BattleTestHelper helper)
      If the Pokémon with the Harvest ability has used a Berry, it is possible for Harvest to restore the berry at the end of each turn. The held Berry is remembered even if it is not restored or if the Pokémon has switched out.

      In this test, a Phantump that knows the move Will-O-Wisp and a Tropius that knows the move Roar face a Smoliv with the Harvest ability that knows Sleep Talk and holds a Lum Berry as well as a Dolliv and an Arboliva, both with the Harvest ability and both knowing Sleep Talk. All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Phantump uses Will-O-Wisp on the Smoliv. The Smoliv becomes burned.
           The Dolliv uses Sleep Talk.
           The Smoliv's Lum Berry cures it of its burn.
           The Smoliv uses Sleep Talk.
           The Tropius uses Roar on the Smoliv. The Smoliv is switched out and the Arboliva is switched in.
           Turn 2
           The Arboliva uses Sleep Talk.
           The Phantump uses Will-O-Wisp on the Arboliva. The Arboliva becomes burned.
           The Dolliv uses Sleep Talk.
           The Tropius uses Roar on the Arboliva. The Smoliv is switched out and the Arboliva is switched in.
           The Smoliv's Harvest activates and it recovers its Lum Berry.
           -
           At the end of the first turn:
           We verify that the Smoliv is not burned.
           We verify that the Smoliv is not holding an item.
           We verify that the Smoliv's consumed item is a Lum Berry.
           We verify that the Dolliv is not holding an item.
           We verify that the Arboliva is not holding an item.
           We verify that the Phantump is not holding an item.
           We verify that the Tropius is not holding an item.
           At the end of the second turn:
           We verify that the Smoliv is not burned.
           We verify that the Smoliv is holding a Lum Berry.
           We verify that the Smoliv's consumed item is No Item.
           We verify that the Dolliv is not holding an item.
           We verify that the Arboliva is not holding an item.
           We verify that the Phantump is not holding an item.
           We verify that the Tropius is not holding an item.
       
    • testHarvestDoesNotRecoverNonBerries

      public static CompletableFuture<TestResult> testHarvestDoesNotRecoverNonBerries(BattleTestHelper helper)
      If the Pokémon has used an item that is not a berry, Harvest will not recover it.

      In this test, a Phantump that knows the move Confuse Ray faces a Smoliv with the Harvest ability that knows Sleep Talk and holds a Lum Berry. All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Phantump uses Confuse Ray on the Smoliv.
           The Smoliv becomes confused. The Smoliv's Lum Berry cures it of its confusion.
           The Smoliv uses Sleep Talk.
           -
           At the end of the first turn:
           We verify that the Smoliv is not confused.
           We verify that the Smoliv is holding a Lum Berry.
           We verify that the Smoliv's consumed item is No Item.
       
    • testHarvestAlwaysRecoversBerriesInHarshSunlight

      public static CompletableFuture<TestResult> testHarvestAlwaysRecoversBerriesInHarshSunlight(BattleTestHelper helper)
      If the Pokémon has used a Berry, there is a 50% chance of it being restored at the end of each turn. Harvest will always activate in harsh sunlight.

      In this test, a Phantump that knows the move Confuse Ray faces a Smoliv with the Harvest ability that knows Sleep Talk and holds a Lum Berry. All effects that have a chance of occurring do not have their chances adjusted.

           Before Turn 1
           The weather is forcibly changed by the battle controller to harsh sunlight.
      
           Turn 1
           The Phantump uses Confuse Ray on the Smoliv.
           The Smoliv becomes confused. The Smoliv's Lum Berry cures it of its confusion.
           The Smoliv uses Sleep Talk.
           Turn 2
           The Phantump uses Confuse Ray on the Smoliv.
           The Smoliv becomes confused. The Smoliv's Lum Berry cures it of its confusion.
           The Smoliv uses Sleep Talk.
           Turn 3
           The Phantump uses Confuse Ray on the Smoliv.
           The Smoliv becomes confused. The Smoliv's Lum Berry cures it of its confusion.
           The Smoliv uses Sleep Talk.
           Turn 4
           The Phantump uses Confuse Ray on the Smoliv.
           The Smoliv becomes confused. The Smoliv's Lum Berry cures it of its confusion.
           The Smoliv uses Sleep Talk.
           Turn 5
           The Phantump uses Confuse Ray on the Smoliv.
           The Smoliv becomes confused. The Smoliv's Lum Berry cures it of its confusion.
           The Smoliv uses Sleep Talk.
           -
           At the end of each turn:
           We verify that the Smoliv is not confused.
           We verify that the Smoliv is holding a Lum Berry.
           We verify that the Smoliv's consumed item is No Item.
       
    • testHarvestRecoversBerriesFromFling

      public static CompletableFuture<TestResult> testHarvestRecoversBerriesFromFling(BattleTestHelper helper)
      Harvest can recover Berries that the user throws with Fling.

      In this test, a Phantump that knows the move Sleep Talk faces an Arboliva with the Harvest ability that knows Fling and holds a Lum Berry. All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Arboliva uses Fling.
           The Phantump uses Sleep Talk.
           -
           At the end of the first turn:
           We verify that the Arboliva is holding a Lum Berry.
           We verify that the Arboliva's consumed item is No Item.
       
    • testHarvestRecoversBerriesConsumedByNaturalGift

      public static CompletableFuture<TestResult> testHarvestRecoversBerriesConsumedByNaturalGift(BattleTestHelper helper)
      Harvest can recover Berries consumed by Natural Gift.

      In this test, a Dolliv that knows the move Sleep Talk faces a Tropius with the Harvest ability that knows Natural Gift and holds a Lum Berry. All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Dolliv uses Sleep Talk.
           The Tropius uses Natural Gift on the Dolliv.
           -
           At the end of the first turn:
           We verify that the Tropius is holding a Lum Berry.
           We verify that the Tropius's consumed item is No Item.
       
    • testHarvestDoesNotRecoverTransferredBerries

      public static CompletableFuture<TestResult> testHarvestDoesNotRecoverTransferredBerries(BattleTestHelper helper)
      Harvest cannot recover Berries transferred to another Pokémon.

      In this test, a Zangoose that knows the moves Switcheroo and Sleep Talk faces a Phantump with the Harvest ability that knows Sleep Talk and Confuse Ray and holds a Lum Berry. All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Zangoose uses Switcheroo on the Phantump.
           The Phantump's Lum Berry is passed to the Zangoose.
           The Phantump uses Sleep Talk.
           Turn 2
           The Zangoose uses Sleep Talk.
           The Phantump uses Confuse Ray.
           The Zangoose becomes confused. The Zangoose cures its confusion with the Lum Berry.
           -
           At the end of the first turn:
           We verify that the Zangoose is holding a Lum Berry.
           We verify that the Phantump is not holding an item.
           We verify that the Phantump's consumed item is No Item.
           At the end of the second turn:
           We verify that the Zangoose does not have a status.
           We verify that the Zangoose is not holding an item.
           We verify that the Phantump is not holding an item.
           We verify that the Phantump's consumed item is No Item.
       
    • testHarvestDoesNotRecoverIncineratedBerries

      public static CompletableFuture<TestResult> testHarvestDoesNotRecoverIncineratedBerries(BattleTestHelper helper)
      Harvest cannot recover Berries destroyed by Incinerate.

      In this test, a Litleo that knows the move Incinerate faces a Dolliv with the Harvest ability that knows Sleep Talk and holds a Lum Berry. All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Litleo uses Incinerate on the Dolliv. The Dolliv's Lum Berry is destroyed.
           The Dolliv uses Sleep Talk.
           -
           At the end of the first turn:
           We verify that the Dolliv is not holding an item.
           We verify that the Dolliv's consumed item is No Item.
       
    • testHarvestDoesNotRecoverKnockOffedBerries

      public static CompletableFuture<TestResult> testHarvestDoesNotRecoverKnockOffedBerries(BattleTestHelper helper)
      Harvest cannot recover Berries removed by Knock Off.

      In this test, a Thwackey that knows the move Knock Off faces a Smoliv with the Harvest ability that knows Sleep Talk and holds a Lum Berry. All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Thwackey uses Knock Off on the Smoliv. The Smoliv's Lum Berry is destroyed.
           The Smoliv uses Sleep Talk.
           -
           At the end of the first turn:
           We verify that the Smoliv is not holding an item.
           We verify that the Smoliv's consumed item is No Item.
       
    • testHarvestDoesNotRecoverBerriesConsumedByBugBite

      public static CompletableFuture<TestResult> testHarvestDoesNotRecoverBerriesConsumedByBugBite(BattleTestHelper helper)
      Harvest cannot recover Berries removed by an opponent when an opponent uses Bug Bite or Pluck.

      In this test, a Kricketot that knows the move Bug Bite faces a Smoliv with the Harvest ability that knows Sleep Talk and holds a Lum Berry. All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Kricketot uses Bug Bite on the Smoliv. The Smoliv's Lum Berry is consumed by the Kricketot.
           The Smoliv uses Sleep Talk.
           -
           At the end of the first turn:
           We verify that the Smoliv is not holding an item.
           We verify that the Smoliv's consumed item is No Item.
       
    • testHarvestDoesNotRecoverBerriesCollectedByPickup

      public static CompletableFuture<TestResult> testHarvestDoesNotRecoverBerriesCollectedByPickup(BattleTestHelper helper)
      Harvest cannot restore a Berry if it is collected by a Pokémon with Pickup.

      In this test, a Phantump that knows the move Confuse Ray faces a Phanpy with the Pickup ability that knows the move Sleep Talk as well as a Smoliv with the Harvest ability that knows Sleep Talk and holds a Lum Berry All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Phantump uses Confuse Ray on the Smoliv.
           The Smoliv becomes confused. The Smoliv's Lum Berry cures it of its confusion.
           The Phanpy uses Sleep Talk.
           The Smoliv uses Sleep Talk.
           -
           At the end of the first turn:
           We verify that the Phanpy is holding a Lum Berry.
           We verify that the Smoliv is not holding an item.
           We verify that the Smoliv's consumed item is No Item.
       
    • testHarvestCanRecoverBerriesBeforePickup

      public static CompletableFuture<TestResult> testHarvestCanRecoverBerriesBeforePickup(BattleTestHelper helper)
      Harvest cannot restore a Berry if it is collected by a Pokémon with Pickup. If more than one Pokémon has Pickup or Harvest, the faster Pokémon will restore an item first.

      In this test, a Phantump that knows the move Confuse Ray faces a Phanpy with the Pickup ability that knows the move Sleep Talk as well as an Exeggutor with the Harvest ability that knows Sleep Talk and holds a Lum Berry All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Phantump uses Confuse Ray on the Exeggutor.
           The Exeggutor becomes confused. The Exeggutor's Lum Berry cures it of its confusion.
           The Exeggutor uses Sleep Talk.
           The Phanpy uses Sleep Talk.
           -
           At the end of the first turn:
           We verify that the Phanpy is not holding an item.
           We verify that the Exeggutor is holding a Lum Berry.
           We verify that the Exeggutor's consumed item is No Item.
       
    • testHarvestActivatesOnlyOncePerTurn

      public static CompletableFuture<TestResult> testHarvestActivatesOnlyOncePerTurn(BattleTestHelper helper)
      A single Pokémon's Harvest will not activate more than once per turn. If the held Berry is consumed immediately after it is restored, Harvest will not be able to restore it again until the next turn.

      In this test, a Trevenant that knows the move Toxic and a Phantump that knows the move Will-O-Wisp face an Oranguru with the Symbiosis ability that knows the move Sleep Talk but does not hold an item as well as a Smoliv with the Harvest ability that knows Sleep Talk and holds a Lum Berry All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Oranguru uses Sleep Talk.
           The Trevenant uses Toxic on the Smoliv.
           The Smoliv becomes badly poisoned. The Smoliv's Lum Berry cures it of its poison.
           The Phantump uses Will-O-Wisp on the Smoliv.
           The Smoliv becomes burned.
           The Smoliv uses Sleep Talk.
           The Smoliv's Harvest activates and restores its Lum Berry.
           The Smoliv consumes its Lum Berry and cures itself of its burn.
           -
           At the end of the first turn:
           We verify that the Oranguru is not holding an item.
           We verify that the Smoliv is not poisoned or badly poisoned.
           We verify that the Smoliv is not burned.
           We verify that the Smoliv is not holding an item.
           We verify that the Smoliv's consumed item is a Lum Berry.
       
    • testHarvestOnlyRecoversMostRecentConsumedItem

      public static CompletableFuture<TestResult> testHarvestOnlyRecoversMostRecentConsumedItem(BattleTestHelper helper)
      Harvest can recover Berries consumed that were originally another Pokémon's, but transferred to the Pokémon that has the Harvest ability. However, a Pokémon may only have one consumed item (including non-Berries) at a time; if a Pokémon consumes a Berry, obtains another item and consumes it, the original consumed Berry cannot be restored, even if the second item is restored and swapped away.

      In this test, a Trevenant that knows the move Toxic and a Phantump that knows the move Will-O-Wisp face an Oranguru with the Symbiosis ability that knows the move Sleep Talk and holds a Rawst Berry as well as a Smoliv with the Harvest ability that knows Sleep Talk and holds a Pecha Berry All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Oranguru uses Sleep Talk.
           The Trevenant uses Toxic on the Smoliv.
           The Smoliv becomes badly poisoned. The Smoliv's Pecha Berry cures it of its poison.
           The Oranguru's Symbiosis passes the Oranguru's Rawst Berry to the Smoliv.
           The Phantump uses Will-O-Wisp on the Smoliv.
           The Smoliv becomes burned. The Smoliv's Rawst Berry cures it of its burn.
           The Smoliv uses Sleep Talk.
           -
           At the end of the first turn:
           We verify that the Oranguru is not holding an item.
           We verify that the Smoliv is not poisoned or badly poisoned.
           We verify that the Smoliv is not burned.
           We verify that the Smoliv is holding a Rawst Berry.
           We verify that the Smoliv's consumed item is No Item.
       
    • testHarvestRecoversMostRecentItemConsumedNotHeld

      public static CompletableFuture<TestResult> testHarvestRecoversMostRecentItemConsumedNotHeld(BattleTestHelper helper)
      If the Pokémon with Harvest obtains an item after consuming a Berry, Harvest can still restore the old Berry as long as the Pokémon has no held item and did not consume any other items (including non-Berries) since consuming the old Berry.

      In this test, a Trevenant that knows the moves Toxic and Sleep Talk and a Phantump that knows the moves Sleep Talk and Thief face a Dhelmise that knows the moves Sleep Talk and Switcheroo and holds a Rawst Berry as well as a Smoliv with the Harvest ability that knows Sleep Talk and holds a Pecha Berry All effects that have a chance of occurring are forced to happen 100% of the time.

           Turn 1
           The Trevenant uses Toxic on the Smoliv.
           The Smoliv becomes badly poisoned. The Smoliv's Pecha Berry cures it of its poison.
           The Dhelmise uses Switcheroo to pass the Smoliv its Rawst Berry.
           The Phantump uses Sleep Talk.
           The Smoliv uses Sleep Talk.
           Turn 2
           The Trevenant uses Sleep Talk.
           The Dhelmise uses Sleep Talk.
           The Phantump uses Thief on the Smoliv and steals its Rawst Berry.
           The Smoliv uses Sleep Talk.
           -
           At the end of the first turn:
           We verify that the Dhelmise is not holding an item.
           We verify that the Smoliv is not poisoned or badly poisoned.
           We verify that the Smoliv is holding a Rawst Berry.
           We verify that the Smoliv's consumed item is a Pecha Berry.
           At the end of the second turn:
           We verify that the Dhelmise is not holding an item.
           We verify that the Phantump is holding a Rawst Berry.
           We verify that the Smoliv is holding a Pecha Berry.
           We verify that the Smoliv's consumed item is No Item.