mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-06-03 05:14:12 -05:00
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:
parent
7b58c7857e
commit
a357c490d8
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user