mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-20 09:23:17 +00:00
18 lines
567 B
C#
18 lines
567 B
C#
|
namespace PKHeX.Core
|
|||
|
{
|
|||
|
public static class EggStateLegality
|
|||
|
{
|
|||
|
public static int GetMinimumEggHatchCycles(PKM pkm) => pkm switch
|
|||
|
{
|
|||
|
PK7 => 0, // pelago can decrement to 0
|
|||
|
_ => 1, // whenever it hits 0, it hatches, so anything above that is fine.
|
|||
|
};
|
|||
|
|
|||
|
public static bool IsValidHTEgg(PKM pkm) => pkm switch
|
|||
|
{
|
|||
|
PB8 { Met_Location: Locations.LinkTrade6NPC } pb8 when pb8.HT_Friendship == PersonalTable.BDSP[pb8.Species].BaseFriendship => true,
|
|||
|
_ => false,
|
|||
|
};
|
|||
|
}
|
|||
|
}
|