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.
This commit is contained in:
Kurt
2016-11-14 21:44:55 -08:00
parent 8b3e7b9bd0
commit faf47d0ef0

View File

@@ -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<EvolutionMethod> { 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<EvolutionMethod> { 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