Class BreedingLogicProxy

java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.egg.BreedingLogicProxy

public class BreedingLogicProxy extends Object
Static proxy for using the BreedingLogicProxy instance
Since:
24/06/2022
  • Constructor Details

    • BreedingLogicProxy

      public BreedingLogicProxy()
  • Method Details

    • hasImplementation

      public static boolean hasImplementation()
      Used to check if an implementation of the breeding logic is set
      Returns:
      True if set
    • setInstance

      public static void setInstance(BreedingLogicFactory instance)
      Sets the instance of the breeding logic
      Parameters:
      instance - The breeding logic instance
    • getInstance

      public static BreedingLogicFactory getInstance()
      Gets the breeding logic instance
      Returns:
      The current breeding logic instance
    • makeEgg

      public static Optional<Pokemon> makeEgg(Pokemon parentOne, Pokemon parentTwo)
      Attempts to make an egg using the two given Pokemon
      Parameters:
      parentOne - The first parent
      parentTwo - The second parent
      Returns:
      The potential egg
    • canBreed

      public static boolean canBreed(Pokemon parentOne, Pokemon parentTwo)
      Checks if the two Pokemon can breed
      Parameters:
      parentOne - The first parent
      parentTwo - The second parent
      Returns:
      true if they can breed
    • makeRandomEgg

      public static Pokemon makeRandomEgg(Pokemon parentOne, Pokemon parentTwo)
      Makes a random Pokemon egg using the two parents for stats such as IVs and abilities
      Parameters:
      parentOne - The first parent
      parentTwo - The second parent
      Returns:
      The new Pokemon egg
    • calculateSpecies

      public static Species calculateSpecies(Pokemon parentOne, Pokemon parentTwo)
      Calculates the species created by the two parent Pokemons
      Parameters:
      parentOne - The first parent
      parentTwo - The second parent
      Returns:
      The created species
    • getIVsForEgg

      public static IVStore getIVsForEgg(Pokemon parentOne, Pokemon parentTwo)
      Calculates the new IVs for the Pokemon from the two parents
      Parameters:
      parentOne - First parent
      parentTwo - Second parent
      Returns:
      The new IVs
    • getNatureForEgg

      public static Nature getNatureForEgg(Pokemon parentOne, Pokemon parentTwo)
      Calculates the new Nature for the Pokemon from the two parents
      Parameters:
      parentOne - First parent
      parentTwo - Second parent
      Returns:
      The new Nature
    • getPokeBall

      public static PokeBall getPokeBall(Pokemon parentOne, Pokemon parentTwo)
      Calculates the new PokeBall for the Pokemon from the two parents
      Parameters:
      parentOne - First parent
      parentTwo - Second parent
      Returns:
      The new PokeBall
    • getEggGrowth

      public static EnumGrowth getEggGrowth(Pokemon parentOne, Pokemon parentTwo)
      Calculates the new Growth for the Pokemon from the two parents
      Parameters:
      parentOne - First parent
      parentTwo - Second parent
      Returns:
      The new Growth
    • getEggAbility

      public static Ability getEggAbility(Stats form, Pokemon parentOne, Pokemon parentTwo)
      Calculates the new Ability for the Pokemon from the two parents
      Parameters:
      parentOne - First parent
      parentTwo - Second parent
      Returns:
      The new Ability
    • shouldEggBeShiny

      public static boolean shouldEggBeShiny(Pokemon parentOne, Pokemon parentTwo)
      Check used to determine if the child should be shiny
      Parameters:
      parentOne - The first parent
      parentTwo - The second parent
      Returns:
      True if shiny
    • getEggMoveset

      public static Moveset getEggMoveset(Stats egg, Pokemon parentOne, Pokemon parentTwo)
      Calculates the egg move set
      Parameters:
      egg - The egg's form
      parentOne - The first parent
      parentTwo - The second parent
      Returns:
      The moveset of the child
    • getPokemonLevelupMoves

      public static List<ImmutableAttack> getPokemonLevelupMoves(Stats egg, Pokemon parentOne, Pokemon parentTwo)
      Gets the level up moves for the egg
      Parameters:
      egg - The form of the egg
      parentOne - The first parent
      parentTwo - The second parent
      Returns:
      The level up moves
    • getFirstFourMoves

      public static Moveset getFirstFourMoves(List<ImmutableAttack> masterAttackList)
      Gets the first four moves from the attack list given
      Parameters:
      masterAttackList - The attack list
      Returns:
      The move set equivalent of the attack list
    • getEggMoves

      public static List<ImmutableAttack> getEggMoves(Stats egg, Pokemon parent, Set<ImmutableAttack> allEggMoves)
      Gets the egg moves
      Parameters:
      egg - The egg's form
      parent - The parent
      allEggMoves - The child's egg moves
      Returns:
      The egg moves
    • canLearnVoltTackle

      public static boolean canLearnVoltTackle(Species species, Pokemon parentOne, Pokemon parentTwo)
      If the pokemon can learn volt tackle move
      Parameters:
      species - The egg species
      parentOne - The first parent
      parentTwo - The second parent
      Returns:
      True if it can learn volt tackle
    • getFathersTMHMTutorMoves

      public static List<ImmutableAttack> getFathersTMHMTutorMoves(Stats egg, Pokemon father)
      Gets the father's TM, HM and Tutor moves
      Parameters:
      egg - The egg
      father - The father
      Returns:
      The TM, HM and Tutor moves
    • findFather

      public static Pokemon findFather(Pokemon parentOne, Pokemon parentTwo)
      Obtains the father of the two parents
      Parameters:
      parentOne - The first parent
      parentTwo - The second parent
      Returns:
      The father
    • findMother

      public static Pokemon findMother(Pokemon parentOne, Pokemon parentTwo)
      Obtains the mother of the two parents
      Parameters:
      parentOne - The first parent
      parentTwo - The second parent
      Returns:
      The mother