public class HiddenPower extends SpecialAttackBase
Changes type and power depending on the Pokémon's IVs.
  • Constructor Details

    • HiddenPower

      public HiddenPower()
  • Method Details

    • applyEffectStart

      public AttackResult applyEffectStart(PixelmonWrapper user, PixelmonWrapper target)
      Description copied from class: EffectBase
      Causes effects before the move's power is calculated.
      Overrides:
      applyEffectStart in class EffectBase
      Parameters:
      user - The move's user.
      target - The move's target.
      Returns:
      The result of the effect.
    • getHiddenPowerType

      public static Element getHiddenPowerType(Pokemon pokemon, IVStore ivs, String reason)
      Gets Hidden Power's type based on IVs.
      Parameters:
      ivs - The IVs to calculate Hidden Power's type with.
      Returns:
      Hidden Power's type based on the given IVs.
    • getHiddenPowerType

      public static Element getHiddenPowerType(IVStore ivs)
      Gets Hidden Power's type based on IVs.
      Parameters:
      ivs - The IVs to calculate Hidden Power's type with.
      Returns:
      Hidden Power's type based on the given IVs.
    • getHiddenPowerType

      public static Element getHiddenPowerType(int... ivs)
      Gets Hidden Power's type based on IVs.
      Parameters:
      ivs - The IVs to calculate Hidden Power's type with.
      Returns:
      Hidden Power's type based on the given IVs.
    • calculateFedbca

      public static int calculateFedbca(int[] ivs)
    • getOptimalIVs

      public static IVStore getOptimalIVs(Element type)
      Gets the optimal IVs for a maximum-power Hidden Power of a certain type.
      Parameters:
      type - The type that Hidden Power has to be.
      Returns:
      The optimal IVs for a maximum-power Hidden Power of the specified type.
    • main

      public static void main(String[] args)
    • calculateOptimalIVs

      public static int[] calculateOptimalIVs(Element type, int[] initialIVs, boolean[] requiredIVs)