Add vc2 evo chain check

queue should be checking against none left rather than any left.
Add test cases
This commit is contained in:
Kurt
2018-06-20 21:43:54 -07:00
parent ce667729f3
commit 1db41c8b21
3 changed files with 2 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ private static EvoCriteria[][] GetChainAll(PKM pkm, IEncounterable Encounter, IE
// If the pokemon origin is illegal (e.g. Gen3 Infernape) the list will be emptied -- species lineage did not exist at any evolution stage.
while (mostEvolved.Species > maxspeciesgen)
{
if (queue.Count == 1)
if (queue.Count == 0)
return GensEvoChains;
if (mostEvolved.RequiresLvlUp)
{
@@ -93,7 +93,7 @@ private static EvoCriteria[][] GetChainAll(PKM pkm, IEncounterable Encounter, IE
{
if (g < 7 && pkm.Format >= 7 && mostEvolved.Form > 0)
{
if (queue.Count == 1)
if (queue.Count == 0)
break;
mostEvolved = queue.Dequeue();
}