mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-30 18:27:39 -05:00
Flag gen2 egg moves when transferred from gen1
move must be removed 2->1 so cannot be permitted as egg move. remove unreachable code (ParseMovesRelearn only is called for Generation >= 6, and thus Format != 2).
This commit is contained in:
@@ -94,6 +94,8 @@ private static CheckMoveResult[] ParseMovesWasEggPreRelearn(PKM pkm, int[] Moves
|
||||
if (TradebackPreevo)
|
||||
NonTradebackLvlMoves = Legal.GetExclusivePreEvolutionMoves(pkm, info.EncounterMatch.Species, info.EvoChainsAllGens[2], 2, e.Game).Where(m => m > Legal.MaxMoveID_1).ToArray();
|
||||
var Egg = Legal.GetEggMoves(pkm, e.Species, pkm.AltForm);
|
||||
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);
|
||||
var Special = volt && EventEggMoves.Length == 0 ? new[] { 344 } : new int[0]; // Volt Tackle for bred Pichu line
|
||||
@@ -200,13 +202,8 @@ private static CheckMoveResult[] ParseMovesRelearn(PKM pkm, int[] Moves, LegalIn
|
||||
};
|
||||
|
||||
if (info.EncounterMatch is EncounterEgg e)
|
||||
{
|
||||
source.EggMoveSource = Legal.GetEggMoves(pkm, e.Species, pkm.AltForm);
|
||||
bool TradebackPreevo = pkm.Format == 2 && info.EncounterMatch.Species > 151 && pkm.InhabitedGeneration(1);
|
||||
if (TradebackPreevo)
|
||||
source.NonTradeBackLevelUpMoves = Legal.GetExclusivePreEvolutionMoves(pkm, info.EncounterMatch.Species, info.EvoChainsAllGens[2], 2, e.Game)
|
||||
.Where(m => m > Legal.MaxMoveID_1).ToArray();
|
||||
}
|
||||
|
||||
CheckMoveResult[] res = ParseMoves(pkm, source, info);
|
||||
|
||||
int[] RelearnMoves = pkm.RelearnMoves;
|
||||
|
||||
Reference in New Issue
Block a user