Add volt tackle special egg move gen3-5

Gen3 only has it on emerald
This commit is contained in:
Kurt
2017-04-10 18:20:58 -07:00
parent 6b65b905cc
commit 6378eddc62

View File

@@ -2584,7 +2584,8 @@ private CheckResult[] parseMovesWasEggPreRelearn(int[] Moves, List<int>[] validL
// Some games can have different egg movepools. Have to check all situations.
GameVersion[] Games = { };
switch (pkm.GenNumber)
int gen = pkm.GenNumber;
switch (gen)
{
case 1:
case 2:
@@ -2608,8 +2609,10 @@ private CheckResult[] parseMovesWasEggPreRelearn(int[] Moves, List<int>[] validL
{
var LvlupEggMoves = Legal.getBaseEggMoves(pkm, i, ver, 100)?.ToArray() ?? new int[0];
var EggMoves = Legal.getEggMoves(pkm, i, ver).ToArray();
bool volt = (gen > 3 || ver == GameVersion.E) && Legal.LightBall.Contains(pkm.Species);
var SpecialMoves = volt && EventEggMoves.Length == 0 ? new[] {344} : new int[0]; // Volt Tackle for bred Pichu line
res = parseMoves(Moves, validLevelMoves, new int[0], validTMHM, validTutor, new int[0], LvlupEggMoves, EggMoves, EventEggMoves, new int[0]);
res = parseMoves(Moves, validLevelMoves, new int[0], validTMHM, validTutor, SpecialMoves, LvlupEggMoves, EggMoves, EventEggMoves, new int[0]);
if (res.All(r => r.Valid)) // moves is satisfactory
return res;