Add egg base move branch

Closes #1991
Thanks @iiippppk  !

Improve pk2 version detect to better provide gs vs c egg base moves
This commit is contained in:
Kurt 2018-06-11 07:23:48 -07:00
parent 1d24e459f9
commit 9faba26e90
3 changed files with 4 additions and 1 deletions

View file

@ -359,6 +359,8 @@ namespace PKHeX.Core
{
if (!Parsed)
return new int[4];
if (pkm.IsEgg && pkm.Format <= 5) // pre relearn
return Legal.GetBaseEggMoves(pkm, pkm.Species, (GameVersion)pkm.Version, pkm.CurrentLevel);
return Legal.GetValidMoves(pkm, Info.EvoChainsAllGens, Tutor: tutor, Machine: tm, MoveReminder: reminder).Skip(1).ToArray(); // skip move 0
}
public EncounterStatic GetSuggestedMetInfo() => EncounterSuggestion.GetSuggestedMetInfo(pkm);

View file

@ -232,6 +232,7 @@ namespace PKHeX.Core
switch (gameSource)
{
case GameVersion.GSC:
case GameVersion.GS:
// If checking back-transfer specimen (GSC->RBY), remove moves that must be deleted prior to transfer
int[] getRBYCompatibleMoves(int[] moves) => pkm.Format == 1 ? moves.Where(m => m <= MaxMoveID_1).ToArray() : moves;

View file

@ -351,7 +351,7 @@ namespace PKHeX.Core
public override int Egg_Location { get => 0; set { } }
public override int OT_Friendship { get => 0; set { } }
public override int Ball { get => 0; set { } }
public override int Version { get => (int)GameVersion.GSC; set { } }
public override int Version { get => HasOriginalMetLocation ? (int)GameVersion.C : (int)GameVersion.GSC; set { } }
public override int SID { get => 0; set { } }
#endregion