From faf47d0ef08a12e441a9e5f6a2dc0628376e1970 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 14 Nov 2016 21:44:55 -0800 Subject: [PATCH] Add past gen evolution methods for half-alolans Regular Marowak and Exeggutor evolution info not present in EvoTables7, so manually add it to handle lineage checking for past gen imports. --- PKHeX/Legality/Structures/EvolutionTree.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PKHeX/Legality/Structures/EvolutionTree.cs b/PKHeX/Legality/Structures/EvolutionTree.cs index f541a5efa..1d2173c21 100644 --- a/PKHeX/Legality/Structures/EvolutionTree.cs +++ b/PKHeX/Legality/Structures/EvolutionTree.cs @@ -104,6 +104,15 @@ private void fixEvoTreeSM() Lineage[Personal.getFormeIndex(711, i)].Chain.Add(Lineage[711].Chain[3-i]); } 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); + 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 { exegg } }); + + var marowak = Lineage[Personal.getFormeIndex(105, 1)].Chain[0].StageEntryMethods[0].Copy(105); + marowak.Form = -1; marowak.Banlist = new[] {GameVersion.SN, GameVersion.MN}; + Lineage[105].Chain.Add(new EvolutionStage { StageEntryMethods = new List { marowak } }); } private void fixEvoTreeORAS() { @@ -193,6 +202,7 @@ public class EvolutionMethod public bool RequiresLevelUp; public static readonly int[] TradeMethods = {5, 6, 7}; + public GameVersion[] Banlist = new GameVersion[0]; public bool Valid(PKM pkm, int lvl) { @@ -201,6 +211,9 @@ public bool Valid(PKM pkm, int lvl) if (pkm.AltForm != Form) return false; + if (Banlist.Contains((GameVersion)pkm.Version)) + return false; + switch (Method) { case 8: // Use Item