using System;
using System.Collections.Generic;
namespace PKHeX.Core
{
///
/// Logic related to breeding.
///
public static class Breeding
{
///
/// Species that have special handling for breeding.
///
internal static readonly HashSet MixedGenderBreeding = new()
{
(int)Species.NidoranF,
(int)Species.NidoranM,
(int)Species.Volbeat,
(int)Species.Illumise,
(int)Species.Indeedee, // male/female
};
///
/// Checks if the can be born with inherited moves from the parents.
///
/// Entity species ID
/// True if can inherit moves, false if cannot.
internal static bool GetCanInheritMoves(int species)
{
if (Legal.FixedGenderFromBiGender.Contains(species)) // Nincada -> Shedinja loses gender causing 'false', edge case
return true;
var pi = PKX.Personal[species];
if (!pi.Genderless && !pi.OnlyMale)
return true;
if (MixedGenderBreeding.Contains(species))
return true;
return false;
}
internal static readonly HashSet SplitBreed_3 = new()
{
// Incense
(int)Species.Marill, (int)Species.Azumarill,
(int)Species.Wobbuffet,
};
///
/// Species that can yield a different baby species when bred.
///
private static readonly HashSet SplitBreed = new(SplitBreed_3)
{
// Incense
(int)Species.Chansey, (int)Species.Blissey,
(int)Species.MrMime, (int)Species.MrRime,
(int)Species.Snorlax,
(int)Species.Sudowoodo,
(int)Species.Mantine,
(int)Species.Roselia, (int)Species.Roserade,
(int)Species.Chimecho,
};
internal static ICollection GetSplitBreedGeneration(int generation)
{
switch (generation)
{
case 3: return SplitBreed_3;
case 4:
case 5:
case 6:
case 7:
case 8:
return SplitBreed;
default: return Array.Empty();
}
}
}
}