Fix 6->7 non-alolan eggmove case

This commit is contained in:
Kurt 2017-01-27 05:34:27 -08:00
parent e5d9381c58
commit 16203b36b9

View file

@ -107,11 +107,18 @@ namespace PKHeX.Core
Lineage[711].Chain.RemoveRange(0, 3);
// Add past gen evolutions for other Marowak and Exeggutor
var exegg = Lineage[Personal.getFormeIndex(103, 1)].Chain[0].StageEntryMethods[0].Copy(103);
var raichu1 = Lineage[Personal.getFormeIndex(26, 1)];
var evo1 = raichu1.Chain[0].StageEntryMethods[0].Copy();
Lineage[26].Chain.Add(new EvolutionStage { StageEntryMethods = new List<EvolutionMethod> { evo1 } });
var evo2 = raichu1.Chain[1].StageEntryMethods[0].Copy();
evo2.Form = -1; evo2.Banlist = new[] { GameVersion.SN, GameVersion.MN };
Lineage[26].Chain.Add(new EvolutionStage { StageEntryMethods = new List<EvolutionMethod> { evo2 } });
var exegg = Lineage[Personal.getFormeIndex(103, 1)].Chain[0].StageEntryMethods[0].Copy();
exegg.Form = -1; exegg.Banlist = new[] { GameVersion.SN, GameVersion.MN }; exegg.Method = 4; // No night required (doesn't matter)
Lineage[103].Chain.Add(new EvolutionStage { StageEntryMethods = new List<EvolutionMethod> { exegg } });
var marowak = Lineage[Personal.getFormeIndex(105, 1)].Chain[0].StageEntryMethods[0].Copy(105);
var marowak = Lineage[Personal.getFormeIndex(105, 1)].Chain[0].StageEntryMethods[0].Copy();
marowak.Form = -1; marowak.Banlist = new[] {GameVersion.SN, GameVersion.MN};
Lineage[105].Chain.Add(new EvolutionStage { StageEntryMethods = new List<EvolutionMethod> { marowak } });
}
@ -212,7 +219,7 @@ namespace PKHeX.Core
{
RequiresLevelUp = false;
if (Form > -1)
if (pkm.AltForm != Form)
if (!skipChecks && pkm.AltForm != Form)
return false;
if (!skipChecks && Banlist.Contains((GameVersion)pkm.Version))
@ -308,8 +315,10 @@ namespace PKHeX.Core
};
}
public EvolutionMethod Copy(int species)
public EvolutionMethod Copy(int species = -1)
{
if (species < 0)
species = Species;
return new EvolutionMethod
{
Method = Method,