mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 14:30:56 +00:00
Sync missing content
fixes tests
This commit is contained in:
parent
0597833899
commit
0b4adf9763
3 changed files with 12 additions and 12 deletions
|
@ -23,9 +23,9 @@ namespace PKHeX.Core
|
|||
int lvl = gen < 4 ? 5 : 1;
|
||||
if (baseSpecies <= max)
|
||||
{
|
||||
yield return new EncounterEgg { Game = ver, Level = lvl, Species = baseSpecies };
|
||||
yield return new EncounterEgg { Version = ver, Level = lvl, Species = baseSpecies };
|
||||
if (gen > 5 && (pkm.WasTradedEgg || all))
|
||||
yield return new EncounterEgg { Game = GetOtherTradePair(ver), Level = lvl, Species = baseSpecies };
|
||||
yield return new EncounterEgg { Version = GetOtherTradePair(ver), Level = lvl, Species = baseSpecies };
|
||||
}
|
||||
|
||||
if (!GetSplitBreedGeneration(pkm).Contains(pkm.Species))
|
||||
|
@ -34,9 +34,9 @@ namespace PKHeX.Core
|
|||
baseSpecies = GetBaseSpecies(pkm, 1);
|
||||
if (baseSpecies <= max)
|
||||
{
|
||||
yield return new EncounterEgg { Game = ver, Level = lvl, Species = baseSpecies, SplitBreed = true };
|
||||
yield return new EncounterEgg { Version = ver, Level = lvl, Species = baseSpecies, SplitBreed = true };
|
||||
if (gen > 5 && (pkm.WasTradedEgg || all))
|
||||
yield return new EncounterEgg { Game = GetOtherTradePair(ver), Level = lvl, Species = baseSpecies, SplitBreed = true };
|
||||
yield return new EncounterEgg { Version = GetOtherTradePair(ver), Level = lvl, Species = baseSpecies, SplitBreed = true };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,18 +89,18 @@ namespace PKHeX.Core
|
|||
// that means genderless species and male only species except Nidoran and Volbeat (they breed with female nidoran and illumise) could not have level up moves as an egg
|
||||
var AllowLevelUp = pkm.PersonalInfo.Gender > 0 && pkm.PersonalInfo.Gender < 255 || Legal.MixedGenderBreeding.Contains(e.Species);
|
||||
int BaseLevel = AllowLevelUp ? 100 : e.LevelMin;
|
||||
var LevelUp = Legal.GetBaseEggMoves(pkm, e.Species, e.Game, BaseLevel);
|
||||
var LevelUp = Legal.GetBaseEggMoves(pkm, e.Species, e.Version, BaseLevel);
|
||||
|
||||
var TradebackPreevo = pkm.Format == 2 && info.EncounterMatch.Species > 151;
|
||||
var NonTradebackLvlMoves = TradebackPreevo
|
||||
? Legal.GetExclusivePreEvolutionMoves(pkm, info.EncounterMatch.Species, info.EvoChainsAllGens[2], 2, e.Game).Where(m => m > Legal.MaxMoveID_1).ToArray()
|
||||
? Legal.GetExclusivePreEvolutionMoves(pkm, info.EncounterMatch.Species, info.EvoChainsAllGens[2], 2, e.Version).Where(m => m > Legal.MaxMoveID_1).ToArray()
|
||||
: new int[0];
|
||||
|
||||
var Egg = Legal.GetEggMoves(pkm, e.Species, pkm.AltForm, e.Game);
|
||||
var Egg = Legal.GetEggMoves(pkm, e.Species, pkm.AltForm, e.Version);
|
||||
if (info.Generation < 3 && pkm.Format >= 7 && pkm.VC1)
|
||||
Egg = Egg.Where(m => m <= Legal.MaxMoveID_1).ToArray();
|
||||
|
||||
bool volt = (info.Generation > 3 || e.Game == GameVersion.E) && Legal.LightBall.Contains(pkm.Species);
|
||||
bool volt = (info.Generation > 3 || e.Version == GameVersion.E) && Legal.LightBall.Contains(pkm.Species);
|
||||
var Special = volt && EventEggMoves.Length == 0 ? new[] { 344 } : new int[0]; // Volt Tackle for bred Pichu line
|
||||
|
||||
var source = new MoveParseSource
|
||||
|
@ -200,7 +200,7 @@ namespace PKHeX.Core
|
|||
};
|
||||
|
||||
if (info.EncounterMatch is EncounterEgg e)
|
||||
source.EggMoveSource = Legal.GetEggMoves(pkm, e.Species, pkm.AltForm, e.Game);
|
||||
source.EggMoveSource = Legal.GetEggMoves(pkm, e.Species, pkm.AltForm, e.Version);
|
||||
|
||||
CheckMoveResult[] res = ParseMoves(pkm, source, info);
|
||||
|
||||
|
|
|
@ -92,11 +92,11 @@ namespace PKHeX.Core
|
|||
bool inheritLvlMoves = Legal.GetCanInheritMoves(pkm, e);
|
||||
|
||||
// Obtain level1 moves
|
||||
var baseMoves = Legal.GetBaseEggMoves(pkm, e.Species, e.Game, 1);
|
||||
var baseMoves = Legal.GetBaseEggMoves(pkm, e.Species, e.Version, 1);
|
||||
int baseCt = Math.Min(4, baseMoves.Length);
|
||||
|
||||
// Obtain Inherited moves
|
||||
var inheritMoves = Legal.GetValidRelearn(pkm, e.Species, inheritLvlMoves, e.Game).ToList();
|
||||
var inheritMoves = Legal.GetValidRelearn(pkm, e.Species, inheritLvlMoves, e.Version).ToList();
|
||||
int reqBase = GetRequiredBaseMoves(RelearnMoves, baseMoves, baseCt, inheritMoves);
|
||||
|
||||
// Check if the required amount of Base Egg Moves are present.
|
||||
|
@ -107,7 +107,7 @@ namespace PKHeX.Core
|
|||
inheritMoves.Add(344); // Volt Tackle
|
||||
|
||||
// If any splitbreed moves are invalid, flag accordingly
|
||||
var splitMoves = e.SplitBreed ? Legal.GetValidRelearn(pkm, Legal.GetBaseEggSpecies(pkm), inheritLvlMoves, e.Game).ToList() : new List<int>();
|
||||
var splitMoves = e.SplitBreed ? Legal.GetValidRelearn(pkm, Legal.GetBaseEggSpecies(pkm), inheritLvlMoves, e.Version).ToList() : new List<int>();
|
||||
|
||||
// Inherited moves appear after the required base moves.
|
||||
// If the pkm is capable of split-species breeding and any inherited move is from the other split scenario, flag accordingly.
|
||||
|
|
Loading…
Reference in a new issue