mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 04:23:12 +00:00
parent
3e5c31a7b5
commit
77cac48d34
11 changed files with 21 additions and 5 deletions
|
@ -155,9 +155,6 @@ public sealed record EncounterEgg(ushort Species, byte Form, byte Level, int Gen
|
|||
{
|
||||
var learnset = GameData.GetLearnset(version, Species, Form);
|
||||
var baseMoves = learnset.GetBaseEggMoves(Level);
|
||||
if (baseMoves.Length == 0) return; pk.Move1 = baseMoves[0];
|
||||
if (baseMoves.Length == 1) return; pk.Move2 = baseMoves[1];
|
||||
if (baseMoves.Length == 2) return; pk.Move3 = baseMoves[2];
|
||||
if (baseMoves.Length == 3) return; pk.Move4 = baseMoves[3];
|
||||
pk.SetMoves(baseMoves);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -235,6 +235,9 @@ public sealed class EncounterGenerator2 : IEncounterGenerator
|
|||
private static IEnumerable<EncounterEgg> GetEggs(PKM pk, EvoCriteria[] chain)
|
||||
{
|
||||
var devolved = chain[^1];
|
||||
if (!devolved.InsideLevelRange(EggLevel))
|
||||
yield break;
|
||||
|
||||
// Ensure most devolved species is the same as the egg species.
|
||||
var (species, form) = GetBaby(devolved);
|
||||
if (species != devolved.Species)
|
||||
|
|
|
@ -338,6 +338,8 @@ public sealed class EncounterGenerator3 : IEncounterGenerator
|
|||
private static IEnumerable<EncounterEgg> GetEggs(EvoCriteria[] chain, GameVersion version)
|
||||
{
|
||||
var devolved = chain[^1];
|
||||
if (!devolved.InsideLevelRange(EggLevel))
|
||||
yield break;
|
||||
|
||||
// Ensure most devolved species is the same as the egg species.
|
||||
var (species, form) = GetBaby(devolved);
|
||||
|
|
|
@ -335,6 +335,8 @@ public sealed class EncounterGenerator4 : IEncounterGenerator
|
|||
private static IEnumerable<EncounterEgg> GetEggs(EvoCriteria[] chain, GameVersion version)
|
||||
{
|
||||
var devolved = chain[^1];
|
||||
if (!devolved.InsideLevelRange(EggLevel))
|
||||
yield break;
|
||||
|
||||
// Ensure most devolved species is the same as the egg species.
|
||||
var (species, form) = GetBaby(devolved);
|
||||
|
|
|
@ -266,6 +266,8 @@ public sealed class EncounterGenerator5 : IEncounterGenerator
|
|||
private static IEnumerable<EncounterEgg> GetEggs(EvoCriteria[] chain, GameVersion version)
|
||||
{
|
||||
var devolved = chain[^1];
|
||||
if (!devolved.InsideLevelRange(EggLevel))
|
||||
yield break;
|
||||
|
||||
// Ensure most devolved species is the same as the egg species.
|
||||
var (species, form) = GetBaby(devolved);
|
||||
|
|
|
@ -307,6 +307,8 @@ public sealed class EncounterGenerator6 : IEncounterGenerator
|
|||
private static IEnumerable<EncounterEgg> GetEggs(PKM pk, EvoCriteria[] chain, GameVersion version)
|
||||
{
|
||||
var devolved = chain[^1];
|
||||
if (!devolved.InsideLevelRange(EggLevel))
|
||||
yield break;
|
||||
|
||||
// Ensure most devolved species is the same as the egg species.
|
||||
var (species, form) = GetBaby(devolved);
|
||||
|
|
|
@ -308,6 +308,8 @@ public sealed class EncounterGenerator7 : IEncounterGenerator
|
|||
private static IEnumerable<EncounterEgg> GetEggs(PKM pk, EvoCriteria[] chain, GameVersion version)
|
||||
{
|
||||
var devolved = chain[^1];
|
||||
if (!devolved.InsideLevelRange(EggLevel))
|
||||
yield break;
|
||||
|
||||
// Ensure most devolved species is the same as the egg species.
|
||||
var (species, form) = GetBaby(devolved);
|
||||
|
|
|
@ -248,6 +248,8 @@ public sealed class EncounterGenerator8 : IEncounterGenerator
|
|||
private static IEnumerable<EncounterEgg> GetEggs(EvoCriteria[] chain, GameVersion version)
|
||||
{
|
||||
var devolved = chain[^1];
|
||||
if (!devolved.InsideLevelRange(EggLevel))
|
||||
yield break;
|
||||
|
||||
// Ensure most devolved species is the same as the egg species.
|
||||
var (species, form) = GetBaby(devolved);
|
||||
|
|
|
@ -382,6 +382,8 @@ public sealed class EncounterGenerator8b : IEncounterGenerator
|
|||
private static IEnumerable<EncounterEgg> GetEggs(EvoCriteria[] chain, GameVersion version)
|
||||
{
|
||||
var devolved = chain[^1];
|
||||
if (!devolved.InsideLevelRange(EggLevel))
|
||||
yield break;
|
||||
|
||||
// Ensure most devolved species is the same as the egg species.
|
||||
var (species, form) = GetBaby(devolved);
|
||||
|
|
|
@ -253,6 +253,8 @@ public sealed class EncounterGenerator9 : IEncounterGenerator
|
|||
private static IEnumerable<EncounterEgg> GetEggs(PKM pk, EvoCriteria[] chain, GameVersion version)
|
||||
{
|
||||
var devolved = chain[^1];
|
||||
if (!devolved.InsideLevelRange(EggLevel))
|
||||
yield break;
|
||||
if (version == 0 && pk.IsEgg)
|
||||
version = GameVersion.SL;
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ public static class EncounterOrigin
|
|||
|
||||
private static int GetLevelOriginMin(PKM pk, bool hasMet)
|
||||
{
|
||||
if (pk.Format == 3)
|
||||
if (pk.Format <= 3)
|
||||
{
|
||||
if (pk.IsEgg)
|
||||
return 5;
|
||||
|
|
Loading…
Reference in a new issue