Tweak milotic case

valid evolution check should check for entire range
fix comparison and always return false if beauty insufficient, same as
gender below. the trade method passes on skipChecks anyway.
This commit is contained in:
Kurt 2016-12-08 23:06:32 -08:00
parent 7b58c7857e
commit a357c490d8
2 changed files with 5 additions and 5 deletions

View File

@ -533,7 +533,7 @@ internal static bool getIsFossil(PKM pkm)
internal static bool getEvolutionValid(PKM pkm)
{
var curr = getValidPreEvolutions(pkm);
var poss = getValidPreEvolutions(pkm, 100);
var poss = getValidPreEvolutions(pkm, 100, skipChecks: true);
if (SplitBreed.Contains(getBaseSpecies(pkm, 1)))
return curr.Count() >= poss.Count() - 1;
@ -793,7 +793,7 @@ private static IEnumerable<EncounterArea> getSlots(PKM pkm, IEnumerable<Encounte
}
return slotLocations;
}
private static IEnumerable<DexLevel> getValidPreEvolutions(PKM pkm, int lvl = -1)
private static IEnumerable<DexLevel> getValidPreEvolutions(PKM pkm, int lvl = -1, bool skipChecks = false)
{
if (lvl < 0)
lvl = pkm.CurrentLevel;
@ -805,7 +805,7 @@ private static IEnumerable<DexLevel> getValidPreEvolutions(PKM pkm, int lvl = -1
};
var et = getEvolutionTable(pkm);
return et.getValidPreEvolutions(pkm, lvl);
return et.getValidPreEvolutions(pkm, lvl, skipChecks: skipChecks);
}
private static IEnumerable<EncounterStatic> getStatic(PKM pkm, IEnumerable<EncounterStatic> table, int lvl = -1)
{

View File

@ -237,8 +237,8 @@ public bool Valid(PKM pkm, int lvl, bool skipChecks)
// Special Levelup Cases
case 16:
if (pkm.CNT_Beauty > Argument)
return skipChecks;
if (pkm.CNT_Beauty < Argument)
return false;
goto default;
case 23: // Gender = Male
if (pkm.Gender != 0)