mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-14 16:27:21 +00:00
parent
3dd47dc898
commit
8c4b7e9060
2 changed files with 9 additions and 3 deletions
|
@ -122,7 +122,10 @@ namespace PKHeX.Core
|
|||
internal static EncounterSlot? GetCaptureLocation(PKM pkm)
|
||||
{
|
||||
var chain = EvolutionChain.GetValidPreEvolutions(pkm, maxLevel: 100, skipChecks: true);
|
||||
return GetPossible(pkm, chain).OrderBy(z => z.LevelMin).FirstOrDefault();
|
||||
return GetPossible(pkm, chain)
|
||||
.OrderBy(z => !chain.Any(s => s.Species == z.Species && s.Form == z.Form))
|
||||
.ThenBy(z => z.LevelMin)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
private static IEnumerable<EncounterArea> GetEncounterTable(PKM pkm, GameVersion gameSource = GameVersion.Any)
|
||||
|
|
|
@ -118,8 +118,11 @@ namespace PKHeX.Core
|
|||
case 2:
|
||||
return EncounterStatic7.GetVC2(species, pkm.Met_Level);
|
||||
default:
|
||||
var dl = EvolutionChain.GetValidPreEvolutions(pkm, maxLevel: 100, skipChecks: true);
|
||||
return GetPossible(pkm, dl).FirstOrDefault();
|
||||
var chain = EvolutionChain.GetValidPreEvolutions(pkm, maxLevel: 100, skipChecks: true);
|
||||
return GetPossible(pkm, chain)
|
||||
.OrderBy(z => !chain.Any(s => s.Species == z.Species && s.Form == z.Form))
|
||||
.ThenBy(z => z.LevelMin)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue