Class PsychicTerrain


public class PsychicTerrain extends Terrain
  • Constructor Details

    • PsychicTerrain

      public PsychicTerrain(boolean extended)
    • PsychicTerrain

      public PsychicTerrain(int turnsToGo)
  • Method Details

    • getNewInstance

      public Terrain getNewInstance()
      Description copied from class: Terrain
      Gets a new instance of the subclass.
      Specified by:
      getNewInstance in class Terrain
      Returns:
      A new instance of the subclass.
    • getTerrainType

      @Nonnull public Terrain getTerrainType()
      Specified by:
      getTerrainType in class Terrain
    • getTypingForTerrain

      public Element getTypingForTerrain()
      Specified by:
      getTypingForTerrain in class Terrain
    • stopsIncomingAttack

      public boolean stopsIncomingAttack(PixelmonWrapper pokemon, PixelmonWrapper user)
      Description copied from class: StatusBase
      Determines whether the status stops an attack about to hit the statused Pokémon.
      Overrides:
      stopsIncomingAttack in class StatusBase
      Parameters:
      pokemon - The statused Pokémon.
      user - The attack's user.
      Returns:
      Whether the attack is stopped.
    • modifyPowerAndAccuracyTarget

      public int[] modifyPowerAndAccuracyTarget(int power, int accuracy, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Description copied from class: StatusBase
      Modifies the power and accuracy of the attack about to hit the statused Pokémon.
      Overrides:
      modifyPowerAndAccuracyTarget in class StatusBase
      Parameters:
      power - The attack's power.
      accuracy - The attack's accuracy.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The modified power and accuracy.
    • countBenefits

      protected int countBenefits(PixelmonWrapper user, PixelmonWrapper target)
      Count the benefits for anyone affected by the terrain. This checks for both allies and opponents, by passing allies and the user itself as a target. For terrain, we later (outside the function) compare if the allies have more benefits than the opponents and then decide if the move should be used.
      Specified by:
      countBenefits in class Terrain
      Parameters:
      user - The Pokémon using the terrain move.
      target - The Pokémon to count benefits for.
      Returns:
      A value representing how many benefits the affected Pokemon gets.
    • copy

      public StatusBase copy()
      Description copied from class: StatusBase
      If necessary, makes a deep copy of the status.
      Overrides:
      copy in class StatusBase
      Returns:
      A deep copy of the status.